//
// GameToolbox::highestChildZ from 0x3ccbd4 to 0x3ccc24 (80 bytes)
//
// 5 xrefs:
// > FLAlertLayer::show @ 0x3cb28c
// > FLAlertLayer::show @ 0x3cb298
// > FLAlertLayer::show @ 0x3cb308
// > FLAlertLayer::show @ 0x3cb314
// > CCTextInputNode::openEditMenu @ 0x3dcd5c
//
// 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:46:38 +0000
//
int __fastcall GameToolbox::highestChildZ(int a1)
{
int v1; // r7
int v2; // r0
_DWORD *v3; // r2
int *v4; // r4
int *v5; // r5
int v6; // r6
int v7; // t1
if ( !a1 )
return 0;
v2 = (*(int (__fastcall **)(int))(*(_DWORD *)a1 + 244))(a1);
if ( !v2 )
return 0;
v3 = *(_DWORD **)(v2 + 52);
if ( !*v3 )
return 0;
v4 = (int *)v3[3];
v1 = 0;
v5 = &v4[*v3 - 1];
while ( v4 <= v5 )
{
v7 = *v4++;
v6 = v7;
if ( !v7 )
break;
if ( v1 < (*(int (__fastcall **)(int))(*(_DWORD *)v6 + 52))(v6) )
v1 = (*(int (__fastcall **)(int))(*(_DWORD *)v6 + 52))(v6);
}
return v1;
}