//
// GJBaseGameLayer::claimRotationAction from 0x100294e60 to 0x100294f6c (268 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::processTransformActions @ 0x100293a9c
// > GJBaseGameLayer::processRotationActions @ 0x100294338
//
// 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:05 +0000
//
__int64 __fastcall GJBaseGameLayer::claimRotationAction(
__int64 result,
signed int a2,
__int64 a3,
float *a4,
float *a5,
int a6)
{
__int64 v6; // x22
__int64 *v7; // x8
int v11; // w9
int v12; // w9
__int64 **v13; // x0
__int64 *v14; // x8
__int64 *v15; // x9
__int64 v16; // x10
__int64 v17; // x11
__int64 v18; // x13
float v19; // s0
unsigned __int64 v20; // [xsp+8h] [xbp-28h] BYREF
v20 = (unsigned int)a2 | (unsigned __int64)(a3 << 32);
v6 = *(_QWORD *)(result + 2152);
v7 = *(__int64 **)(v6 + 1608);
if ( !v7 )
return result;
while ( 1 )
{
v11 = *((_DWORD *)v7 + 8);
if ( v11 <= a2 )
{
if ( v11 < a2 )
goto LABEL_7;
v12 = *((_DWORD *)v7 + 9);
if ( v12 <= (int)a3 )
break;
}
LABEL_8:
v7 = (__int64 *)*v7;
if ( !v7 )
return result;
}
if ( v12 < (int)a3 )
{
LABEL_7:
++v7;
goto LABEL_8;
}
v13 = (__int64 **)sub_1002954E4(v6 + 1600, &v20);
v14 = *v13;
v15 = v13[1];
if ( *v13 != v15 )
{
v16 = 160;
if ( a6 )
v16 = 168;
v17 = 272;
if ( a6 )
v17 = 280;
do
{
v18 = *v14;
if ( (*(_BYTE *)(*v14 + 424) & 1) == 0 )
{
*(_BYTE *)(v18 + 424) = 1;
v19 = *(double *)(v18 + v16) - *(double *)(v18 + v17);
*a4 = *a4 + v19;
if ( (*(_BYTE *)(v18 + 184) & 1) == 0 )
*a5 = *a5 + v19;
}
++v14;
}
while ( v14 != v15 );
}
return sub_1002AD62C(v6 + 1600, &v20);
}