//
// sub_1002A9280 from 0x1002a9280 to 0x1002a9318 (152 bytes)
//
// 1 xrefs:
// > sub_1002A91F8 @ 0x1002a921c
//
// 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:16 +0000
//
__int64 *__fastcall sub_1002A9280(__int64 a1, _QWORD *a2, int *a3)
{
__int64 *result; // x0
__int64 *v4; // x12
__int64 *v5; // t1
int v6; // w9
int v7; // w10
int v8; // w11
__int64 *v9; // x8
int v10; // w12
int v11; // w12
int v12; // w12
v5 = *(__int64 **)(a1 + 8);
result = (__int64 *)(a1 + 8);
v4 = v5;
if ( v5 )
{
v6 = *a3;
v7 = a3[1];
v8 = a3[2];
while ( 1 )
{
while ( 1 )
{
v9 = v4;
v10 = *((_DWORD *)v4 + 7);
if ( v6 >= v10 )
break;
LABEL_4:
v4 = (__int64 *)*v9;
result = v9;
if ( !*v9 )
goto LABEL_17;
}
if ( v10 >= v6 )
{
v11 = *((_DWORD *)v9 + 8);
if ( v7 < v11 || v11 >= v7 && v8 < *((_DWORD *)v9 + 9) )
goto LABEL_4;
v12 = *((_DWORD *)v9 + 8);
if ( v12 >= v7 && (v7 < v12 || *((_DWORD *)v9 + 9) >= v8) )
goto LABEL_17;
}
result = v9 + 1;
v4 = (__int64 *)v9[1];
if ( !v4 )
goto LABEL_17;
}
}
v9 = result;
LABEL_17:
*a2 = v9;
return result;
}