//
// sub_1000CF4C0 from 0x1000cf4c0 to 0x1000cf5ec (300 bytes)
//
// 5 xrefs:
// > GJGameLevel::handleStatsConflict @ 0x1000b22d0
// > GJGameLevel::handleStatsConflict @ 0x1000b235c
// > PlayLayer::levelComplete @ 0x100142d6c
// > PlayLayer::levelComplete @ 0x100142db0
// > PlayLayer::levelComplete @ 0x100142e24
//
// 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 10:58:53 +0000
//
__int64 __fastcall sub_1000CF4C0(
__int64 a1,
__int64 a2,
__int64 a3,
int a4,
int a5,
int a6,
const std::string *a7,
int a8)
{
int v12; // w11
bool v13; // zf
__int64 v15; // x22
int v16; // w11
bool v17; // zf
if ( !(_DWORD)a3 )
{
if ( (int)a2 >= 1 )
{
v16 = *(_DWORD *)(a1 + 1296);
v17 = v16 > (int)a2 || v16 == 0;
if ( v17 || a8 != 0 )
{
*(_DWORD *)(a1 + 1296) = a2;
*(_DWORD *)(a1 + 1300) = a4;
*(_DWORD *)(a1 + 1304) = a5;
*(_DWORD *)(a1 + 1308) = a6;
*(_DWORD *)(a1 + 1376) = sub_1000CF35C(
a2,
*(_DWORD *)(a1 + 1336),
a5,
a4,
a6,
*(_DWORD *)(a1 + 1344),
*(_DWORD *)(a1 + 1340),
*(_DWORD *)(a1 + 1348));
std::string::operator=((std::string *)(a1 + 1312), a7);
v15 = 1;
*(_BYTE *)(a1 + 1432) = 1;
goto LABEL_21;
}
}
LABEL_20:
v15 = 0;
goto LABEL_21;
}
if ( !(_DWORD)a2 )
goto LABEL_20;
v12 = *(_DWORD *)(a1 + 1336);
v13 = v12 < (int)a2 || v12 == 0;
if ( !v13 && a8 == 0 )
goto LABEL_20;
*(_DWORD *)(a1 + 1336) = a2;
*(_DWORD *)(a1 + 1340) = a4;
*(_DWORD *)(a1 + 1344) = a5;
*(_DWORD *)(a1 + 1348) = a6;
*(_DWORD *)(a1 + 1376) = sub_1000CF35C(
*(_DWORD *)(a1 + 1296),
a2,
*(_DWORD *)(a1 + 1304),
*(_DWORD *)(a1 + 1300),
*(_DWORD *)(a1 + 1308),
a5,
a4,
a6);
std::string::operator=((std::string *)(a1 + 1352), a7);
v15 = 1;
*(_BYTE *)(a1 + 1433) = 1;
LABEL_21:
sub_1000CF5EC(a1, a2, a3);
return v15;
}