//
// GJBaseGameLayer::claimRotationAction from 0x9bfac8 to 0x9bfc7c (436 bytes)
//
// 3 xrefs:
// > GJBaseGameLayer::processRotationActions @ 0x9bfe74
// > GJBaseGameLayer::processTransformActions @ 0x9c0770
// > ??> @ 0xa2ee0
//
// 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:58:28 +0000
//
__int64 __fastcall GJBaseGameLayer::claimRotationAction(
GJBaseGameLayer *this,
int a2,
int a3,
float *a4,
float *a5,
char a6)
{
__int64 v6; // x0
__int64 *v7; // x7
__int64 *v8; // x6
int v9; // w8
int v10; // w8
int v11; // w6
bool v12; // cc
int v13; // w6
__int64 *v14; // x8
__int64 *i; // x6
double v16; // d0
__int64 v17; // x1
float v18; // s0
__int64 *v20; // x6
int v21; // w6
std::logic_error *exception; // x19
int v23[2]; // [xsp+28h] [xbp+28h] BYREF
__int64 *v24; // [xsp+30h] [xbp+30h]
v6 = *((_QWORD *)this + 269);
v23[0] = a2;
v7 = *(__int64 **)(v6 + 1608);
v23[1] = a3;
if ( !v7 )
return _stack_chk_guard;
v8 = v7;
while ( 1 )
{
while ( 1 )
{
v9 = *((_DWORD *)v8 + 8);
if ( a2 >= v9 )
break;
LABEL_27:
v8 = (__int64 *)*v8;
if ( !v8 )
return _stack_chk_guard;
}
if ( a2 <= v9 )
break;
LABEL_21:
v8 = (__int64 *)v8[1];
if ( !v8 )
return _stack_chk_guard;
}
v10 = *((_DWORD *)v8 + 9);
if ( a3 < v10 )
goto LABEL_27;
if ( a3 > v10 )
goto LABEL_21;
v11 = *((_DWORD *)v7 + 8);
v12 = a2 <= v11;
if ( a2 < v11 )
goto LABEL_25;
LABEL_8:
if ( !v12 )
{
LABEL_23:
v20 = (__int64 *)v7[1];
if ( v20 )
goto LABEL_24;
goto LABEL_26;
}
v13 = *((_DWORD *)v7 + 9);
if ( a3 < v13 )
{
LABEL_25:
while ( 1 )
{
v20 = (__int64 *)*v7;
if ( !*v7 )
break;
LABEL_24:
v7 = v20;
v21 = *((_DWORD *)v20 + 8);
v12 = a2 <= v21;
if ( a2 >= v21 )
goto LABEL_8;
}
LABEL_26:
v24 = v7;
exception = (std::logic_error *)_cxa_allocate_exception(0x10u);
std::logic_error::logic_error(exception, "map::at: key not found");
*(_QWORD *)exception = off_1536D68;
_cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::out_of_range,
(void (*)(void *))std::logic_error::~logic_error);
}
if ( a3 > v13 )
goto LABEL_23;
v14 = (__int64 *)v7[6];
for ( i = (__int64 *)v7[5]; v14 != i; ++i )
{
v17 = *i;
if ( !*(_BYTE *)(*i + 424) )
{
*(_BYTE *)(v17 + 424) = 1;
if ( a6 )
v16 = *(double *)(v17 + 168) - *(double *)(v17 + 280);
else
v16 = *(double *)(v17 + 160) - *(double *)(v17 + 272);
v18 = v16;
*a4 = *a4 + v18;
if ( !*(_BYTE *)(v17 + 184) )
*a5 = *a5 + v18;
}
}
std::__tree,std::vector>,std::__map_value_compare,std::__value_type,std::vector>,std::less>,true>,std::allocator,std::vector>>>::__erase_unique>(
(_QWORD *)(v6 + 1600),
v23);
return _stack_chk_guard;
}