//
// PlayLayer::updateTestModeLabel from 0x4061a4 to 0x406300 (348 bytes)
//
// 6 xrefs:
// > UILayer::handleAction @ 0x3fea88
// > PlayLayer::toggleIgnoreDamage @ 0x40633e
// > PlayLayer::resume @ 0x406488
// > PlayLayer::setupHasCompleted @ 0x40a8a4
// > PlayLayer::switchToStartPosObject @ 0x41222e
// > PlayLayer::resetLevel @ 0x4122f2
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:47:28 +0000
//
int __fastcall PlayLayer::updateTestModeLabel(PlayLayer *this)
{
int result; // r0
float *v3; // r7
char *v4; // r1
char *v5; // r1
const char *v6; // r1
char *CString; // r1
cocos2d::CCString *v8; // r0
int v9; // [sp+0h] [bp-14h] BYREF
char *v10; // [sp+4h] [bp-10h]
char *v11; // [sp+8h] [bp-Ch]
result = *((_DWORD *)this + 2952);
if ( !result )
return result;
v3 = (float *)((char *)this + 11148);
(*(void (__fastcall **)(int))(*(_DWORD *)result + 172))(result);
v9 = 0;
v10 = nullptr;
v11 = nullptr;
std::string::__init(&v9, &unk_B6B226, 0);
if ( *((_BYTE *)this + 1434) )
{
v4 = "Ignore Damage";
LABEL_4:
std::string::assign(&v9, v4);
goto LABEL_5;
}
if ( *((_BYTE *)this + 11797) )
{
v4 = "Used Ignore Damage";
goto LABEL_4;
}
if ( *((_BYTE *)this + 10836) )
{
v4 = "Testmode";
goto LABEL_4;
}
LABEL_5:
if ( *v3 != 1.0 || *((_BYTE *)this + 11798) )
{
if ( (v9 & 1) != 0 )
v6 = v10;
else
v6 = (const char *)((int)(unsigned __int8)v9 >> 1);
if ( v6 )
std::string::append(&v9, "\n");
if ( *((_BYTE *)this + 11798) && *v3 == 1.0 )
{
CString = "Used Speed Change";
}
else
{
v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Speed: %.01fx", v6, *v3);
CString = (char *)cocos2d::CCString::getCString(v8);
}
std::string::append(&v9, CString);
}
if ( (v9 & 1) != 0 )
v5 = v11;
else
v5 = (char *)&v9 + 1;
(*(void (__fastcall **)(_DWORD, char *, int))(**((_DWORD **)this + 2952) + 464))(
*((_DWORD *)this + 2952),
v5,
(unsigned __int8)v9 << 31);
return std::string::~string((int)&v9);
}