//
// GJBaseGameLayer::claimRotationAction from 0x5a303c to 0x5a3180 (324 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::processRotationActions @ 0x5a3310
// > GJBaseGameLayer::processTransformActions @ 0x5a3950
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:53:18 +0000
//
int *__fastcall GJBaseGameLayer::claimRotationAction(
GJBaseGameLayer *this,
int a2,
int a3,
float *a4,
float *a5,
bool a6,
bool a7)
{
int *result; // r0
_DWORD *v9; // r4
_DWORD *v10; // r2
int v11; // r12
int v12; // r12
int v13; // r2
int v14; // r2
int *v15; // r2
std::logic_error *exception; // r4
int *v17; // r4
int *i; // r1
int v19; // r2
int v20; // t1
double v21; // d7
double v22; // d6
float v23; // s14
_DWORD *v24; // r2
int **v25; // r2
int *v26; // [sp+0h] [bp-14h] BYREF
int v27[2]; // [sp+4h] [bp-10h] BYREF
result = *((int **)this + 381);
v9 = (_DWORD *)result[227];
v27[0] = a2;
v10 = v9;
v27[1] = a3;
while ( 1 )
{
while ( 1 )
{
if ( !v10 )
return result;
v11 = v10[4];
if ( a2 >= v11 )
{
if ( v11 < a2 )
goto LABEL_9;
v12 = v10[5];
if ( a3 >= v12 )
break;
}
v10 = (_DWORD *)*v10;
}
if ( v12 >= a3 )
break;
LABEL_9:
v10 = (_DWORD *)v10[1];
}
if ( !v9 )
{
v25 = (int **)(result + 227);
v26 = result + 227;
goto LABEL_17;
}
while ( 2 )
{
v13 = v9[4];
if ( a2 < v13 )
goto LABEL_28;
if ( v13 < a2 )
goto LABEL_31;
v14 = v9[5];
if ( a3 < v14 )
{
LABEL_28:
v24 = (_DWORD *)*v9;
if ( !*v9 )
{
v26 = v9;
v25 = (int **)v9;
goto LABEL_17;
}
goto LABEL_29;
}
if ( v14 >= a3 )
{
v26 = v9;
v25 = &v26;
goto LABEL_17;
}
LABEL_31:
v24 = (_DWORD *)v9[1];
if ( v24 )
{
LABEL_29:
v9 = v24;
continue;
}
break;
}
v26 = v9;
v25 = (int **)(v9 + 1);
LABEL_17:
v15 = *v25;
if ( !v15 )
{
exception = (std::logic_error *)_cxa_allocate_exception(8u);
std::logic_error::logic_error(exception, "map::at: key not found");
*(_DWORD *)exception = &off_D1548C;
_cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::out_of_range,
(void (*)(void *))std::length_error::~length_error);
}
v17 = (int *)v15[7];
for ( i = (int *)v15[6]; i != v17; ++i )
{
v20 = *i;
v19 = v20;
if ( !*(_BYTE *)(v20 + 424) )
{
*(_BYTE *)(v19 + 424) = 1;
if ( a6 )
{
v21 = *(double *)(v19 + 168);
v22 = *(double *)(v19 + 280);
}
else
{
v21 = *(double *)(v19 + 160);
v22 = *(double *)(v19 + 272);
}
v23 = v21 - v22;
*a4 = *a4 + v23;
if ( !*(_BYTE *)(v19 + 184) )
*a5 = *a5 + v23;
}
}
return std::__tree,std::vector>,std::__map_value_compare,std::__value_type,std::vector>,std::less>,true>,std::allocator,std::vector>>>::__erase_unique>(
(int **)result + 226,
v27);
}