//
// PauseLayer::setupLegacyProgressBars from 0x7d5edc to 0x7d6278 (924 bytes)
//
// 2 xrefs:
// > PauseLayer::setupProgressBars @ 0x7d8090
// > ??> @ 0x59c20
//
// 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:54:21 +0000
//
__int64 __fastcall PauseLayer::setupLegacyProgressBars(PauseLayer *this)
{
cocos2d::CCDirector *v2; // x0
int *v3; // x27
cocos2d::CCDirector *v4; // x0
int NormalPercent; // w0
long double v6; // q0
__int64 ProgressBar; // x20
__n128 (__fastcall *v8)(__int64, __int64 *); // x22
long double v9; // q0
__int64 v10; // x22
void (__fastcall *v11)(__int64, __int64 *); // x24
__int64 v12; // x25
unsigned int v13; // w0
cocos2d::CCString *v14; // x0
cocos2d::CCLabelBMFont *CString; // x0
const char *v16; // x2
__int64 v17; // x25
__int64 v18; // x0
cocos2d::CCString *v19; // x0
cocos2d::CCLabelBMFont *v20; // x0
const char *v21; // x2
__int64 v22; // x25
void (__fastcall *v23)(__int64, __int64); // x27
__int64 v24; // x0
const char *v25; // x2
__int64 v26; // x25
__int64 v27; // x0
__int64 (__fastcall *v28)(__int64); // x1
void (__fastcall *v29)(__int64, __int64 *); // x20
__int64 v30; // x27
const char *v31; // x2
__int64 v32; // x20
__int64 v33; // x0
__int64 (__fastcall *v34)(__int64); // x1
void (__fastcall *v35)(__int64, __int64 *); // x22
__int64 v36; // x23
void (__fastcall *v38)(__int64, __int64); // [xsp+78h] [xbp+78h]
const char *v39; // [xsp+88h] [xbp+88h]
__int64 v40; // [xsp+90h] [xbp+90h] BYREF
_BYTE v41[8]; // [xsp+98h] [xbp+98h] BYREF
__int64 v42; // [xsp+A0h] [xbp+A0h] BYREF
v2 = *(cocos2d::CCDirector **)(GameManager::sharedState(_stack_chk_guard) + 544);
v3 = *((int **)v2 + 242);
v4 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v2);
cocos2d::CCDirector::getWinSize(&v40, v4);
NormalPercent = GJGameLevel::getNormalPercent((GJGameLevel *)v3);
LODWORD(v6) = 1.0;
ProgressBar = GameToolbox::createProgressBar(NormalPercent, (const char *)&elf_hash_bucket[16194], v6);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 79) + 464LL))(
*((_QWORD *)this + 79),
ProgressBar,
3);
v8 = *(__n128 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)ProgressBar + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v42,
*(float *)&v40 * 0.5,
(float)((float)(*((float *)&v40 + 1) * 0.5) + 80.0) + 0.0);
*(__n128 *)&v9 = v8(ProgressBar, &v42);
LOWORD(v39) = -256;
BYTE2(v39) = -1;
LODWORD(v9) = 1.0;
v10 = GameToolbox::createProgressBar(v3[222], v39, v9);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 79) + 464LL))(*((_QWORD *)this + 79), v10, 3);
v11 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v10 + 184LL);
v12 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)ProgressBar + 192LL))(ProgressBar);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, 0.0, -50.0);
cocos2d::CCPoint::operator+(&v42, v12);
v11(v10, &v42);
v13 = GJGameLevel::getNormalPercent((GJGameLevel *)v3);
v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i%%", (const char *)v13);
CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v14);
v17 = cocos2d::CCLabelBMFont::create(CString, "bigFont.fnt", v16);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 79) + 464LL))(*((_QWORD *)this + 79), v17, 4);
v38 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v17 + 184LL);
v18 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)ProgressBar + 192LL))(ProgressBar);
v38(v17, v18);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v17 + 160LL))(v17, 0.5);
v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i%%",
(const char *)(unsigned int)v3[222]);
v20 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v19);
v22 = cocos2d::CCLabelBMFont::create(v20, "bigFont.fnt", v21);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 79) + 464LL))(*((_QWORD *)this + 79), v22, 4);
v23 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v22 + 184LL);
v24 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v10 + 192LL))(v10);
v23(v22, v24);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v22 + 160LL))(v22, 0.5);
v26 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Normal Mode", "bigFont.fnt", v25);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 79) + 464LL))(*((_QWORD *)this + 79), v26, 4);
v27 = ProgressBar;
v28 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)ProgressBar + 192LL);
v29 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v26 + 184LL);
v30 = v28(v27);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, 0.0, 20.0);
cocos2d::CCPoint::operator+(&v42, v30);
v29(v26, &v42);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v26 + 160LL))(v26, 0.5);
v32 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Practice Mode", "bigFont.fnt", v31);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 79) + 464LL))(*((_QWORD *)this + 79), v32, 4);
v33 = v10;
v34 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v10 + 192LL);
v35 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v32 + 184LL);
v36 = v34(v33);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, 0.0, 20.0);
cocos2d::CCPoint::operator+(&v42, v36);
v35(v32, &v42);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v32 + 160LL))(v32, 0.5);
return _stack_chk_guard;
}