//
// PlayLayer::isJumpHeldForPlayer from 0x6f6338 to 0x6f6418 (224 bytes)
//
// 3 xrefs:
// > PlayLayer::loadFromCheckpoint @ 0x70f7b0
// > PlayLayer::loadFromCheckpoint @ 0x70faa4
// > ??> @ 0xd0f00
//
// 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:51:50 +0000
//
__int64 __fastcall PlayLayer::isJumpHeldForPlayer(PlayLayer *this, unsigned __int8 a2)
{
int v2; // w20
unsigned int v3; // w1
__int64 v5; // x1
GameManager *v6; // x0
int v7; // w23
int isJumpButtonPressed; // w22
int v9; // w21
GameManager *v11; // x0
v2 = a2;
v3 = 0;
if ( !*((_BYTE *)this + 12238) )
{
v5 = *((_QWORD *)this + 409);
v6 = (GameManager *)*((unsigned __int8 *)this + 12448);
v7 = *(unsigned __int8 *)(v5 + 340);
if ( (_DWORD)v6
|| (v11 = (GameManager *)GameManager::sharedState(v6), !(unsigned __int8)GameManager::getGameVariable(v11, "0010")) )
{
isJumpButtonPressed = (unsigned __int8)UILayer::isJumpButtonPressed(*((UILayer **)this + 1661), 1);
v9 = (unsigned __int8)UILayer::isJumpButtonPressed(*((UILayer **)this + 1661), 0);
}
else
{
v9 = (unsigned __int8)UILayer::isJumpButtonPressed(*((UILayer **)this + 1661), 1);
isJumpButtonPressed = (unsigned __int8)UILayer::isJumpButtonPressed(*((UILayer **)this + 1661), 0);
}
v3 = 1;
if ( v2 )
{
if ( !isJumpButtonPressed )
return (v7 | v9 ^ 1) ^ 1u;
}
else if ( !v9 )
{
return (v7 | isJumpButtonPressed ^ 1) ^ 1u;
}
}
return v3;
}