//
// GJBaseGameLayer::shouldExitHackedLevel from 0x1001dd7f8 to 0x1001dd8b0 (184 bytes)
//
// 1 xrefs:
// > PlayLayer::setupHasCompleted @ 0x100117350
//
// 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
//
bool __fastcall GJBaseGameLayer::shouldExitHackedLevel(GJBaseGameLayer *a1)
{
std::__vector_base *, std::allocator *>>::pointer begin; // x9
unsigned __int64 v2; // x13
__int64 v3; // x10
int v4; // w8
int v5; // w12
int v6; // w11
__int64 v7; // x13
std::vector *v8; // x14
int *v9; // x14
unsigned __int64 v10; // x15
__int64 v11; // x15
int v12; // w16
int v13; // t1
int v14; // w9
begin = a1->m_sectionSizes.__begin_;
v2 = (char *)a1->m_sectionSizes.__end_ - (char *)begin;
if ( (int)(v2 >> 3) < 1 )
{
v4 = 0;
v14 = 8000;
}
else
{
v3 = 0;
v4 = 0;
v5 = 0;
v6 = 0;
v7 = (v2 >> 3) & 0x7FFFFFFF;
do
{
v8 = begin[v3];
if ( v8 )
{
v9 = v8->__begin_;
v10 = (char *)begin[v3]->__end_ - (char *)v9;
if ( (int)((v10 >> 2) - 1) >= 0 )
{
v11 = (unsigned int)(v10 >> 2);
do
{
v13 = *v9++;
v12 = v13;
if ( v13 > v4 )
v4 = v12;
if ( v12 > 0 )
++v6;
if ( v12 < 1 )
++v5;
--v11;
}
while ( v11 );
}
}
++v3;
}
while ( v3 != v7 );
if ( (float)((float)v5 / (float)v6) <= 0.9 )
v14 = 8000;
else
v14 = 4000;
}
return v4 > v14;
}