//
// DeathHistogram::rebuildAxis from 0xc98ac4 to 0xc992d8 (2068 bytes)
//
// 5 xrefs:
// > DeathHistogram::setProgression @ 0xc99628
// > DeathHistogram::setSurvival @ 0xc99d54
// > DeathHistogram::setData @ 0xc9abb4
// > DeathHistogram::setAttemptLine @ 0xc9b564
// > ??> @ 0xf4528
//
// 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 13:05:55 +0000
//
__int64 __fastcall DeathHistogram::rebuildAxis(
cocos2d::CCDrawNode **this,
cocos2d::CCLabelBMFont *a2,
int a3,
float a4,
float a5,
cocos2d::CCLabelBMFont *a6)
{
float v10; // s8
const char *v11; // x2
__int64 v12; // x27
void (__fastcall *v13)(__int64, _DWORD *); // x2
void (__fastcall *v14)(__int64, _DWORD *); // x21
float v15; // s9
float v16; // s9
const char *v17; // x1
__int64 v18; // x21
void (__fastcall *v19)(__int64, _DWORD *); // x3
void (__fastcall *v20)(__int64, _DWORD *); // x27
const char *v21; // x1
__int64 v22; // x27
void (__fastcall *v23)(__int64, _DWORD *); // x3
float v24; // s8
float v25; // s0
float v26; // s8
float v27; // s0
const char *v28; // x2
__int64 v29; // x27
void (__fastcall *v30)(__int64, _DWORD *); // x2
void (__fastcall *v31)(__int64, _DWORD *); // x21
__int64 v32; // x21
float v33; // s9
int v34; // w26
int v36; // w21
int v37; // w24
float v38; // s15
float v39; // s8
float v40; // s14
__int64 v41; // x21
float v42; // s0
cocos2d::CCString *v43; // x0
cocos2d::CCLabelBMFont *i; // x0
const char *v45; // x2
__int64 v46; // x21
void (__fastcall *v47)(__int64, _BYTE *); // x28
void (__fastcall *v48)(__int64, _BYTE *); // x2
void (__fastcall *v49)(__int64, _BYTE *); // x28
__int64 v50; // x21
cocos2d::CCString *v51; // x0
void (__fastcall *v54)(__int64, _DWORD *); // [xsp+C0h] [xbp+C0h]
void (__fastcall *v55)(__int64, _DWORD *); // [xsp+C0h] [xbp+C0h]
_BYTE v56[8]; // [xsp+E8h] [xbp+E8h] BYREF
_BYTE v57[8]; // [xsp+F0h] [xbp+F0h] BYREF
_DWORD v58[4]; // [xsp+F8h] [xbp+F8h] BYREF
_DWORD v59[4]; // [xsp+108h] [xbp+108h] BYREF
cocos2d::CCDrawNode::clear(*(this + 42));
(*(void (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 43) + 576LL))(*(this + 43));
v10 = (float)((float)(*((float *)this + 79) - 22.0) * 0.5) + 22.0;
v12 = cocos2d::CCLabelBMFont::create(a6, "bigFont.fnt", v11);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v12 + 160LL))(v12, 0.26);
v13 = *(void (__fastcall **)(__int64, _DWORD *))(*(_QWORD *)v12 + 1072LL);
LOWORD(v59[0]) = -14081;
BYTE2(v59[0]) = 120;
v13(v12, v59);
v14 = *(void (__fastcall **)(__int64, _DWORD *))(*(_QWORD *)v12 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v59, v10, 12.0);
v14(v12, v59);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 43) + 456LL))(*(this + 43), v12);
v15 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v12 + 328LL))(v12);
v16 = v15 * (*(float (__fastcall **)(__int64))(*(_QWORD *)v12 + 168LL))(v12);
v18 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"edit_leftBtn_001.png", v17);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v18 + 128LL))(v18, 0.45);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v18 + 144LL))(v18, 0.315);
v19 = *(void (__fastcall **)(__int64, _DWORD *))(*(_QWORD *)v18 + 960LL);
LOWORD(v59[0]) = -14081;
BYTE2(v59[0]) = 120;
v19(v18, v59);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v18 + 912LL))(v18, 100);
v20 = *(void (__fastcall **)(__int64, _DWORD *))(*(_QWORD *)v18 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v59, (float)(v10 - (float)(v16 * 0.5)) - 16.0, 12.0);
v20(v18, v59);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 43) + 456LL))(*(this + 43), v18);
v22 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"edit_rightBtn_001.png", v21);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v22 + 128LL))(v22, 0.45);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v22 + 144LL))(v22, 0.315);
v23 = *(void (__fastcall **)(__int64, _DWORD *))(*(_QWORD *)v22 + 960LL);
LOWORD(v59[0]) = -14081;
BYTE2(v59[0]) = 120;
v23(v22, v59);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v22 + 912LL))(v22, 100);
v54 = *(void (__fastcall **)(__int64, _DWORD *))(*(_QWORD *)v22 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v59, (float)(v10 + (float)(v16 * 0.5)) + 16.0, 12.0);
v54(v22, v59);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 43) + 456LL))(*(this + 43), v22);
v24 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v18 + 224LL))(v18);
v25 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v18 + 240LL))(v18);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v59, v24 - 10.0, v25 - 10.0, 20.0, 20.0);
cocos2d::CCRect::operator=((char *)this + 356, v59);
v26 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v22 + 224LL))(v22);
v27 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v22 + 240LL))(v22);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v59, v26 - 10.0, v27 - 10.0, 20.0, 20.0);
cocos2d::CCRect::operator=((char *)this + 372, v59);
v29 = cocos2d::CCLabelBMFont::create(a2, "bigFont.fnt", v28);
v55 = *(void (__fastcall **)(__int64, _DWORD *))(*(_QWORD *)v29 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v59, 0.0, 0.5);
v55(v29, v59);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v29 + 160LL))(v29, 0.2);
v30 = *(void (__fastcall **)(__int64, _DWORD *))(*(_QWORD *)v29 + 1072LL);
LOWORD(v59[0]) = -14081;
BYTE2(v59[0]) = 120;
v30(v29, v59);
v31 = *(void (__fastcall **)(__int64, _DWORD *))(*(_QWORD *)v29 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v59, 12.0, (float)(a4 + a5) + 19.0);
v31(v29, v59);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 43) + 456LL))(*(this + 43), v29);
v32 = (__int64)*(this + 42);
v33 = *((float *)this + 79) - 4.0;
v58[2] = 1055957975;
v59[2] = 1055957975;
v58[1] = 1061729337;
v58[0] = 1.0;
v58[3] = 0.5;
v59[0] = 1.0;
v59[1] = 1061729337;
v59[3] = 1041865114;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, 22.0, a4);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v57, 22.0, (float)(a4 + a5) + 6.0);
cocos2d::CCDrawNode::drawSegment(v32, v56, v57, v58, 0.5);
if ( a3 <= 7 )
{
v34 = 1;
goto LABEL_3;
}
v36 = a3 >> 2;
if ( a3 >> 2 == 2 )
{
v34 = 2;
if ( a3 < 0 )
return _stack_chk_guard;
}
else if ( v36 <= 5 )
{
v34 = 5;
if ( a3 < 0 )
return _stack_chk_guard;
}
else if ( v36 <= 10 )
{
v34 = 10;
if ( a3 < 0 )
return _stack_chk_guard;
}
else if ( v36 <= 25 )
{
v34 = 25;
if ( a3 < 0 )
return _stack_chk_guard;
}
else if ( v36 <= 50 )
{
v34 = 50;
if ( a3 < 0 )
return _stack_chk_guard;
}
else if ( v36 <= 100 )
{
v34 = 100;
if ( a3 < 0 )
return _stack_chk_guard;
}
else if ( v36 <= 250 )
{
v34 = 250;
if ( a3 < 0 )
return _stack_chk_guard;
}
else if ( v36 <= 500 )
{
v34 = 500;
if ( a3 < 0 )
return _stack_chk_guard;
}
else if ( v36 <= 1000 )
{
v34 = 1000;
if ( a3 < 0 )
return _stack_chk_guard;
}
else if ( v36 <= 2500 )
{
v34 = 2500;
if ( a3 < 0 )
return _stack_chk_guard;
}
else
{
v34 = 5000;
if ( v36 <= 5000 || (v34 = 10000, v36 <= 10000) )
{
LABEL_3:
if ( a3 < 0 )
return _stack_chk_guard;
}
}
v37 = 0;
v39 = a4 + (float)((float)((float)0 / (float)a3) * a5);
LABEL_29:
v50 = (__int64)*(this + 42);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, 22.0, v39);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v57, v33, v39);
cocos2d::CCDrawNode::drawSegment(v50, v56, v57, v58, 0.5);
LABEL_30:
v51 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)(unsigned int)v37);
for ( i = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v51);
;
i = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v43) )
{
v37 += v34;
v46 = cocos2d::CCLabelBMFont::create(i, "chatFont.fnt", v45);
v47 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v46 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v57, 1.0, 0.5);
v47(v46, v57);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v46 + 160LL))(v46, 0.55);
v48 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v46 + 1072LL);
v57[0] = -1;
v57[1] = -56;
v57[2] = 120;
v48(v46, v57);
v49 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v46 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v57, 18.0, v39);
v49(v46, v57);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 43) + 456LL))(*(this + 43), v46);
if ( a3 < v37 )
break;
v38 = (float)a3;
v39 = a4 + (float)((float)((float)v37 / (float)a3) * a5);
if ( !v37 )
goto LABEL_29;
if ( v33 > 25.0 )
{
v40 = 25.0;
do
{
v41 = (__int64)*(this + 42);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v56, v40, a4 + (float)((float)((float)v37 / v38) * a5));
v42 = v40 + 2.0;
if ( v33 < (float)(v40 + 2.0) )
v42 = v33;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v57, v42, a4 + (float)((float)((float)v37 / v38) * a5));
cocos2d::CCDrawNode::drawSegment(v41, v56, v57, v59, 0.5);
v40 = v40 + 5.0;
}
while ( v33 > v40 );
}
if ( v37 <= 999 )
goto LABEL_30;
if ( v37 % 1000 )
v43 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i.%ik",
(const char *)(unsigned int)(v37 / 1000),
(unsigned int)(v37 % 1000 / 100));
else
v43 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%ik",
(const char *)(unsigned int)(v37 / 1000));
}
return _stack_chk_guard;
}