//
// MenuGameLayer::tryJump from 0x100442030 to 0x100442284 (596 bytes)
//
// 1 xrefs:
// > MenuGameLayer::init @ 0x100441ee8
//
// 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 11:05:12 +0000
//
__int64 __fastcall MenuGameLayer::tryJump(__int64 a1)
{
__int64 v2; // x0
__n128 v3; // q0
_BYTE *v4; // x0
float v5; // s8
__int64 v6; // x0
float v7; // s9
float v8; // s9
__int64 v9; // x0
_BYTE *v11; // x0
float v12; // s8
__int64 v13; // x0
__int64 v14; // x0
__int64 v15; // [xsp+8h] [xbp-28h] BYREF
v2 = cocos2d::CCDirector::sharedDirector();
v3.n128_f64[0] = cocos2d::CCDirector::getWinSize(v2, &v15);
v3.n128_u32[0] = 1045220557;
if ( *(_BYTE *)(a1 + 412) )
v3.n128_f32[0] = 0.4;
v4 = *(_BYTE **)(a1 + 432);
if ( v4[2417] == 1 )
{
v5 = *(float *)((*(__int64 (__fastcall **)(_BYTE *, __n128))(*(_QWORD *)v4 + 192LL))(v4, v3) + 4);
v6 = cocos2d::CCDirector::sharedDirector();
if ( v5 >= (float)((float)((float)(sub_100207EA0(v6) + 90.0) + 15.0) + 100.0) )
v7 = 0.0;
else
v7 = 0.3;
goto LABEL_13;
}
v7 = -1.0;
if ( (v4[2419] & 1) == 0 && (v4[2422] & 1) == 0 )
{
if ( v4[2418] == 1 )
{
v8 = *(float *)((*(__int64 (__fastcall **)(_BYTE *, __n128))(*(_QWORD *)v4 + 192LL))(v4, v3) + 4);
v9 = cocos2d::CCDirector::sharedDirector();
if ( v8 >= (float)((float)((float)(sub_100207EA0(v9) + 90.0) + 15.0) + 200.0) )
v7 = 0.0;
else
v7 = 0.4;
goto LABEL_13;
}
if ( v4[2420] == 1 )
{
v12 = *(float *)((*(__int64 (__fastcall **)(_BYTE *, __n128))(*(_QWORD *)v4 + 192LL))(v4, v3) + 4);
v13 = cocos2d::CCDirector::sharedDirector();
v7 = 1.0;
if ( v12 >= (float)((float)(sub_100207EA0(v13) + 90.0) + 75.0) )
{
v14 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 432) + 192LL))(*(_QWORD *)(a1 + 432));
if ( *(float *)(v14 + 4) <= (float)(*((float *)&v15 + 1) + -75.0) )
v7 = 0.5;
else
v7 = 0.0;
}
goto LABEL_13;
}
v7 = v3.n128_f32[0];
if ( v4[2428] != 1 )
goto LABEL_13;
if ( (v4[2423] & 1) == 0 )
{
if ( *(float *)((*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)v4 + 192LL))(v4) + 4) < 150.0 )
goto LABEL_29;
v4 = *(_BYTE **)(a1 + 432);
if ( (v4[2423] & 1) == 0 )
{
LABEL_31:
v7 = 0.0;
goto LABEL_13;
}
}
if ( *(float *)((*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)v4 + 192LL))(v4) + 4) <= 210.0 )
goto LABEL_31;
LABEL_29:
v7 = 0.9;
}
LABEL_13:
if ( vcvts_n_f32_s32(rand(), 0x1Fu) > v7 )
return PlayerObject::releaseButton(*(_QWORD *)(a1 + 432), 1);
v11 = *(_BYTE **)(a1 + 432);
if ( (v11[2500] & 1) == 0 )
{
if ( !(unsigned int)PlayerObject::isFlying(v11) )
return PlayerObject::releaseButton(*(_QWORD *)(a1 + 432), 1);
v11 = *(_BYTE **)(a1 + 432);
}
return PlayerObject::pushButton((__int64)v11, 1);
}