//
// MenuGameLayer::tryJump from 0x7d9c10 to 0x7d9e54 (580 bytes)
//
// 3 xrefs:
// > ??> @ 0x91528
// > MenuGameLayer::init @ 0x7db2d8
// > ??> @ 0x1543e48
//
// 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 12:54:23 +0000
//
__int64 __fastcall MenuGameLayer::tryJump(MenuGameLayer *this, float a2)
{
cocos2d::CCDirector *v3; // x0
_BYTE *v4; // x0
float v5; // s8
int v6; // w2
int v7; // w3
int v8; // w4
int v9; // w5
int v10; // w6
int v11; // w7
PlayerObject *v12; // x0
float *v14; // x0
float v15; // s8
cocos2d::CCDirector *v16; // x0
float v17; // s0
float *v18; // x0
float v19; // s8
cocos2d::CCDirector *v20; // x0
float v21; // s0
float *v22; // x0
float v23; // s8
cocos2d::CCDirector *v24; // x0
float v25; // s0
__int64 v26; // x0
char v27; // [xsp+0h] [xbp+0h]
__int64 v28; // [xsp+30h] [xbp+30h] BYREF
v3 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(_stack_chk_guard);
cocos2d::CCDirector::getWinSize(&v28, v3);
if ( !*((_BYTE *)this + 412) )
{
v4 = *((_BYTE **)this + 54);
v5 = 0.2;
if ( !v4[2417] )
goto LABEL_3;
LABEL_11:
v14 = (float *)(*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)v4 + 192LL))(v4);
v15 = v14[1];
v16 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)v14);
cocos2d::CCDirector::getScreenBottom(v16);
if ( v15 < (float)((float)((float)(v17 + 90.0) + 15.0) + 100.0) )
{
v5 = 0.3;
goto LABEL_5;
}
goto LABEL_22;
}
v4 = *((_BYTE **)this + 54);
v5 = 0.4;
if ( v4[2417] )
goto LABEL_11;
LABEL_3:
if ( v4[2419] || v4[2422] )
{
v5 = -1.0;
goto LABEL_5;
}
if ( v4[2418] )
{
v22 = (float *)(*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)v4 + 192LL))(v4);
v23 = v22[1];
v24 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)v22);
cocos2d::CCDirector::getScreenBottom(v24);
if ( v23 < (float)((float)((float)(v25 + 90.0) + 15.0) + 200.0) )
{
v5 = 0.4;
goto LABEL_5;
}
LABEL_22:
v5 = 0.0;
goto LABEL_5;
}
if ( !v4[2420] )
{
if ( !v4[2428] )
goto LABEL_5;
if ( v4[2423] )
goto LABEL_18;
if ( *(float *)((*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)v4 + 192LL))(v4) + 4) < 150.0 )
goto LABEL_19;
v4 = *((_BYTE **)this + 54);
if ( v4[2423] )
{
LABEL_18:
if ( *(float *)((*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)v4 + 192LL))(v4) + 4) > 210.0 )
{
LABEL_19:
v5 = 0.9;
goto LABEL_5;
}
}
goto LABEL_22;
}
v18 = (float *)(*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)v4 + 192LL))(v4);
v19 = v18[1];
v20 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)v18);
cocos2d::CCDirector::getScreenBottom(v20);
if ( v19 >= (float)((float)(v21 + 90.0) + 75.0) )
{
v5 = 0.0;
v26 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 54) + 192LL))(*((_QWORD *)this + 54));
if ( *(float *)(v26 + 4) <= (float)(*((float *)&v28 + 1) - 75.0) )
v5 = 0.5;
}
else
{
v5 = 1.0;
}
LABEL_5:
if ( v5 < (float)((float)rand() * 4.6566e-10) )
goto LABEL_8;
v12 = *((PlayerObject **)this + 54);
if ( !*((_BYTE *)v12 + 2500) )
{
if ( (unsigned __int8)PlayerObject::isFlying(v12) )
{
v12 = *((PlayerObject **)this + 54);
goto LABEL_7;
}
LABEL_8:
PlayerObject::releaseButton(*((_QWORD *)this + 54), 1);
return _stack_chk_guard;
}
LABEL_7:
PlayerObject::pushButton(v12, 1, v6, v7, v8, v9, v10, v11, v27);
return _stack_chk_guard;
}