//
// sub_1006A7558 from 0x1006a7558 to 0x1006a7618 (192 bytes)
//
// 1 xrefs:
// > sub_1006825B8 @ 0x100682640
//
// 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:11:42 +0000
//
_QWORD *__fastcall sub_1006A7558(_QWORD *result, __int64 a2)
{
__int64 v3; // x19
__int64 v4; // x21
_QWORD *v5; // x1
__int64 *v6[3]; // [xsp+8h] [xbp-38h] BYREF
v3 = (__int64)result;
v4 = *(_QWORD *)(a2 + 1600);
if ( v4 )
{
result = *(_QWORD **)(v4 + 16);
v5 = (_QWORD *)*result;
if ( *result )
{
while ( *v5 != a2 )
{
v5 = (_QWORD *)v5[2];
if ( !v5 )
goto LABEL_7;
}
result = (_QWORD *)sub_100691D08((__int64)result, v5, 0);
--*(_QWORD *)(v4 + 8);
*(_QWORD *)(a2 + 1600) = 0;
}
LABEL_7:
if ( !*(_QWORD *)(v4 + 8) && v3 )
{
sub_1006925D0(v3, (__int64)v6);
while ( 1 )
{
result = (_QWORD *)sub_1006925E0(v6);
if ( !result )
break;
if ( *result == v4 )
{
result = (_QWORD *)sub_100692234(v3, result[1], result[2]);
break;
}
}
}
if ( v3 )
--*(_QWORD *)(v3 + 48);
}
return result;
}