//
// sub_1008B8890 from 0x1008b8890 to 0x1008b8bd4 (836 bytes)
//
// 4 xrefs:
// > sub_1008B7FE0 @ 0x1008b82b7
// > sub_1008B8EA0 @ 0x1008b914c
// > sub_1008B8EA0 @ 0x1008b94a7
// > sub_1008BB6D0 @ 0x1008bbb16
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:37:24 +0000
//
__int64 __fastcall sub_1008B8890(__int64 a1, int a2, double a3, float a4, float a5)
{
char *v6; // r15
float *v7; // rax
__int64 v8; // rax
double v9; // xmm0_8
char *v10; // r14
float *v11; // rax
__int64 v12; // rax
double v13; // xmm0_8
float *v14; // r14
float v16; // [rsp+4h] [rbp-3Ch]
float v17; // [rsp+Ch] [rbp-34h]
float v18; // [rsp+10h] [rbp-30h] BYREF
float v19; // [rsp+18h] [rbp-28h]
__int16 v20; // [rsp+1Ch] [rbp-24h] BYREF
unsigned __int8 v21; // [rsp+1Eh] [rbp-22h]
v19 = a5;
v16 = *(float *)&a3;
v20 = a2;
v21 = BYTE2(a2);
v6 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"whiteSquare60_001.png", a3);
sub_100278250(&v18, 0.5, 0.0);
(*(void (__fastcall **)(char *, float *))(*(_QWORD *)v6 + 296LL))(v6, &v18);
v7 = (float *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v6 + 328LL))(v6);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v6 + 128LL))(v6, (float)(a4 + 4.0) / *v7);
v17 = v19 + 4.0;
v8 = (*(__int64 (__fastcall **)(char *))(*(_QWORD *)v6 + 328LL))(v6);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v6 + 144LL))(v6, v17 / *(float *)(v8 + 4));
(*(void (__fastcall **)(char *, void *))(*(_QWORD *)v6 + 960LL))(v6, &unk_100A13630);
sub_100278250(&v18, *(float *)&a3, 33.0);
(*(void (__fastcall **)(char *, float *))(*(_QWORD *)v6 + 184LL))(v6, &v18);
v9 = (*(double (__fastcall **)(__int64, char *))(*(_QWORD *)a1 + 456LL))(a1, v6);
v10 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"whiteSquare60_001.png", v9);
sub_100278250(&v18, 0.5, 0.0);
(*(void (__fastcall **)(char *, float *))(*(_QWORD *)v10 + 296LL))(v10, &v18);
v11 = (float *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v10 + 328LL))(v10);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v10 + 128LL))(v10, a4 / *v11);
v12 = (*(__int64 (__fastcall **)(char *))(*(_QWORD *)v10 + 328LL))(v10);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v10 + 144LL))(v10, v19 / *(float *)(v12 + 4));
(*(void (__fastcall **)(char *, __int16 *))(*(_QWORD *)v10 + 960LL))(v10, &v20);
sub_100278250(&v18, v16, 35.0);
(*(void (__fastcall **)(char *, float *))(*(_QWORD *)v10 + 184LL))(v10, &v18);
v13 = (*(double (__fastcall **)(__int64, char *))(*(_QWORD *)a1 + 456LL))(a1, v10);
v14 = (float *)cocos2d::CCSprite::createWithSpriteFrameName((__int64)"gradientBar.png", v13);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v14 + 360LL))(v14, -90.0);
sub_100278250(&v18, 1.0, 0.5);
(*(void (__fastcall **)(float *, float *))(*(_QWORD *)v14 + 296LL))(v14, &v18);
(*(void (__fastcall **)(float *, __int64))(*(_QWORD *)v14 + 912LL))(v14, 200);
(*(void (__fastcall **)(float *, __int64))(*(_QWORD *)v14 + 1080LL))(v14, 0x100000302LL);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v14 + 128LL))(
v14,
fmaxf(fminf(50.0, 0.60000002 * v19), 10.0) / v14[108]);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v14 + 144LL))(v14, a4 / v14[109]);
BYTE2(v18) = v21 + ((unsigned int)(120 - v21 + ((unsigned __int16)(120 - v21) >> 15)) >> 1);
LOWORD(v18) = ((unsigned __int8)(((unsigned int)(235 - HIBYTE(v20) + ((unsigned __int16)(235 - HIBYTE(v20)) >> 15)) >> 1)
+ HIBYTE(v20)) << 8)
| (unsigned __int8)(v20 + (((unsigned __int8)v20 >> 1) ^ 0x7F));
(*(void (__fastcall **)(float *, float *))(*(_QWORD *)v14 + 960LL))(v14, &v18);
sub_100278250(&v18, v16, v19 + 35.0);
(*(void (__fastcall **)(float *, float *))(*(_QWORD *)v14 + 184LL))(v14, &v18);
return (*(__int64 (__fastcall **)(__int64, float *))(*(_QWORD *)a1 + 456LL))(a1, v14);
}