//
// sub_1002A810C from 0x1002a810c to 0x1002a81d8 (204 bytes)
//
// 1 xrefs:
// > sub_1002A77D8 @ 0x1002a7dc0
//
// 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_1002A810C(__int64 result, _QWORD *a2, __int64 (__fastcall **a3)(_QWORD *, _QWORD))
{
__int64 v3; // x29
__int64 v4; // x30
_QWORD *v6; // x21
_QWORD *v7; // x8
__int64 v9; // x23
_QWORD *v10; // x22
_QWORD *v11; // x1
__int64 v12; // x24
_QWORD *v13; // x8
_QWORD v14[9]; // [xsp+8h] [xbp-48h] BYREF
if ( (_QWORD *)result != a2 )
{
v14[7] = v3;
v14[8] = v4;
v6 = (_QWORD *)result;
v7 = (_QWORD *)(result + 8);
if ( (_QWORD *)(result + 8) != a2 )
{
v9 = 0;
v10 = (_QWORD *)result;
do
{
v11 = v10;
v10 = v7;
result = (*a3)(v7, v11);
if ( (_DWORD)result )
{
v14[0] = *v10;
v12 = v9;
while ( 1 )
{
*(_QWORD *)((char *)v6 + v12 + 8) = *(_QWORD *)((char *)v6 + v12);
if ( !v12 )
break;
v12 -= 8;
result = (*a3)(v14, (char *)v6 + v12);
if ( (result & 1) == 0 )
{
v13 = (_QWORD *)((char *)v6 + v12 + 8);
goto LABEL_10;
}
}
v13 = v6;
LABEL_10:
*v13 = v14[0];
}
v7 = v10 + 1;
v9 += 8;
}
while ( v10 + 1 != a2 );
}
}
return result;
}