//
// GJRateLevelLayer::createStatPillar from 0x951a50 to 0x951dd8 (904 bytes)
//
// 3 xrefs:
// > GJRateLevelLayer::setupRateInfo @ 0x9549dc
// > GJRateLevelLayer::setupRateInfo @ 0x954ca4
// > ??> @ 0xd5820
//
// This function is hookable on this platform (idp: arm, 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:57:23 +0000
//
__int64 __fastcall GJRateLevelLayer::createStatPillar(
__int64 a1,
const char *a2,
int a3,
int a4,
__int64 a5,
__int64 a6,
__int64 a7,
unsigned __int8 *a8)
{
int v10; // w20
const char *v11; // x1
float v12; // s9
cocos2d::CCNode *v13; // x27
const char *v14; // x1
__int64 v15; // x28
void (__fastcall *v16)(__int64, __int64 *); // x26
void (__fastcall *v17)(cocos2d::CCNode *, float); // x26
float *v18; // x0
void (__fastcall *v19)(cocos2d::CCNode *, float); // x26
__int64 v20; // x0
float v21; // s8
float v22; // s8
float v23; // s8
float v24; // s0
float v25; // s2
float v26; // s1
long double v27; // q0
const char *v28; // x2
int v29; // w1
cocos2d::CCLabelBMFont *v30; // x0
__int64 v31; // x20
void (__fastcall *v32)(__int64, __int64 *); // x21
__int64 v38; // [xsp+C0h] [xbp+C0h] BYREF
__int64 v39; // [xsp+C8h] [xbp+C8h] BYREF
float v40[2]; // [xsp+D0h] [xbp+D0h] BYREF
_BYTE v41[8]; // [xsp+D8h] [xbp+D8h] BYREF
__int64 v42; // [xsp+E0h] [xbp+E0h] BYREF
v39 = a5;
v38 = a6;
if ( a4 > 0 )
{
v10 = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v40);
v11 = a2;
v12 = (float)a3;
do
{
v13 = (cocos2d::CCNode *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"whiteSquare60_001.png",
v11);
v15 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"whiteSquare60_001.png", v14);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64, __int64))(*(_QWORD *)v13 + 464LL))(v13, v15, 1);
v16 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v15 + 184LL);
cocos2d::CCNode::convertToNodeSpace(&v42, v13, (const cocos2d::CCPoint *)&unk_155CFD0);
v16(v15, &v42);
(*(void (__fastcall **)(_QWORD, cocos2d::CCNode *, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v13,
3);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64 *))(*(_QWORD *)v13 + 960LL))(v13, &v38);
(*(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v15 + 960LL))(v15, &v39);
v17 = *(void (__fastcall **)(cocos2d::CCNode *, float))(*(_QWORD *)v13 + 128LL);
v18 = (float *)(*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v13 + 328LL))(v13);
v17(v13, (float)(int)a2 / *v18);
v19 = *(void (__fastcall **)(cocos2d::CCNode *, float))(*(_QWORD *)v13 + 144LL);
v20 = (*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v13 + 328LL))(v13);
v19(v13, v12 / *(float *)(v20 + 4));
v21 = (*(float (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v13 + 136LL))(v13);
v22 = v21 / (*(float (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v13 + 152LL))(v13);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v15 + 128LL))(v15, 0.75);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v15 + 144LL))(v15, 0.75 / v22);
v23 = *(float *)((*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v13 + 328LL))(v13) + 4);
v24 = (*(float (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v13 + 152LL))(v13);
v25 = (float)v10++;
v26 = (float)(v23 * v24) * 0.25 * 0.5;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, 0.0, (float)(v12 - v26) * v25);
cocos2d::CCPoint::operator+(&v42, a7);
*(__n128 *)&v27 = cocos2d::CCPoint::operator=(v40, &v42);
(*(void (__fastcall **)(cocos2d::CCNode *, float *, long double))(*(_QWORD *)v13 + 184LL))(v13, v40, v27);
}
while ( v10 != a4 );
v29 = *a8;
if ( (v29 & 1) == 0 )
{
v30 = (cocos2d::CCLabelBMFont *)(a8 + 1);
if ( !(v29 >> 1) )
return _stack_chk_guard;
goto LABEL_7;
}
if ( *((_QWORD *)a8 + 1) )
{
v30 = *((cocos2d::CCLabelBMFont **)a8 + 2);
LABEL_7:
v31 = cocos2d::CCLabelBMFont::create(v30, "chatFont.fnt", v28);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(
*(_QWORD *)(a1 + 584),
v31,
3);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v31 + 1072LL))(v31, &unk_1168540);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v31 + 1024LL))(v31, 125);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v31 + 160LL))(v31, 0.8);
v32 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v31 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v42, v40[0], v40[1] + 13.0);
v32(v31, &v42);
}
}
return _stack_chk_guard;
}