//
// GJBaseGameLayer::buttonIsRelevant from 0x1002970a8 to 0x1002971b0 (264 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::shouldUseSubstepForButton @ 0x100297064
//
// 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:02:06 +0000
//
__int64 __fastcall GJBaseGameLayer::buttonIsRelevant(__int64 a1, __int64 a2)
{
_BYTE *v4; // x22
int v5; // w24
int v6; // w21
int v7; // w23
__int64 v8; // x0
int v9; // w0
char v10; // w0
char v11; // w8
int v12; // w21
if ( *(_DWORD *)a2 != 1 )
return 0;
v4 = (_BYTE *)(a1 + 12204);
v5 = *(unsigned __int8 *)(a2 + 5);
v6 = v5 ^ 1;
v7 = *(unsigned __int8 *)(*(_QWORD *)(a1 + 3272) + 340LL);
if ( (*(_BYTE *)(a1 + 12238) & 1) == 0 && (*(_BYTE *)(a1 + 12448) & 1) == 0 )
{
v8 = GameManager::sharedState(a1);
GameManager::getGameVariable(v8, "0010");
if ( v9 )
v6 = v5;
}
v10 = sub_100015188(*(_QWORD *)(a1 + 2152));
if ( (*(_BYTE *)(a2 + 4) & 1) == 0 )
v10 &= *v4;
if ( !(v6 & 1 | ((v10 & 1) == 0)) )
return 0;
v11 = v6 | v7 ^ 1;
if ( (*v4 & 1) != 0 )
{
v12 = 0;
if ( (v11 & 1) == 0 )
return v12 && (sub_1002971B0(*(_QWORD *)(a1 + 3264), a2) & 1) != 0;
LABEL_17:
if ( (sub_1002971B0(*(_QWORD *)(a1 + 3256), a2) & 1) != 0 )
return 1;
return v12 && (sub_1002971B0(*(_QWORD *)(a1 + 3264), a2) & 1) != 0;
}
if ( *(_BYTE *)(a1 + 1010) == 1 )
v12 = v6 & v7 ^ 1;
else
v12 = 0;
if ( (v11 & 1) != 0 )
goto LABEL_17;
return v12 && (sub_1002971B0(*(_QWORD *)(a1 + 3264), a2) & 1) != 0;
}