//
// __gnu_end_cleanup from 0x743018 to 0x743088 (112 bytes)
//
// 1 xrefs:
// > __cxa_end_cleanup @ 0x742eee
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int _gnu_end_cleanup()
{
int globals; // r0
int v1; // r3
int v3; // r2
globals = _cxa_get_globals();
v1 = *(_DWORD *)(globals + 8);
if ( !v1 )
std::terminate();
if ( *(_BYTE *)(v1 + 32) != 71
|| *(_BYTE *)(v1 + 33) != 78
|| *(_BYTE *)(v1 + 34) != 85
|| *(_BYTE *)(v1 + 35) != 67
|| *(_BYTE *)(v1 + 36) != 67
|| *(_BYTE *)(v1 + 37) != 43
|| *(_BYTE *)(v1 + 38) != 43
|| *(unsigned __int8 *)(v1 + 39) > 1u )
{
*(_DWORD *)(globals + 8) = 0;
return v1 + 32;
}
v3 = *(_DWORD *)(v1 + 28) - 1;
*(_DWORD *)(v1 + 28) = v3;
if ( v3 )
return v1 + 32;
*(_DWORD *)(globals + 8) = *(_DWORD *)(v1 + 24);
*(_DWORD *)(v1 + 24) = 0;
return v1 + 32;
}