//
// sub_8AAD8 from 0x8aad8 to 0x8ab64 (140 bytes)
//
// 1 xrefs:
// > sub_8AB64 @ 0x8ad28
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_8AAD8(__int64 a1, __int64 a2, __int64 *a3)
{
__int64 v4; // x1
__int64 v7; // x0
__int64 v8; // x1
__int64 v9; // x22
__int64 result; // x0
*a3 = 0;
v4 = *(unsigned int *)(a2 + 16);
if ( !(_DWORD)v4 )
return 0;
v7 = sub_8B500(*(__int64 *)((char *)&qword_1B0 + (_QWORD)off_114000), v4);
if ( !v7 )
return 38;
v9 = v7;
result = sub_8B52C(a1, v8, 1, *(unsigned int *)(a2 + 16));
if ( !(_DWORD)result )
*a3 = v9;
return result;
}