//
// sub_8A818 from 0x8a818 to 0x8a8c4 (172 bytes)
//
// 2 xrefs:
// > sub_8AB64 @ 0x8abb8
// > sub_8AB64 @ 0x8ac5c
//
// 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 12:14:11 +0000
//
__int64 *__fastcall sub_8A818(__int64 a1, __int64 a2)
{
__int64 *v4; // x20
__int64 *v5; // x21
__int64 v7; // [xsp+0h] [xbp-40h] BYREF
int v8; // [xsp+8h] [xbp-38h]
char v9; // [xsp+Ch] [xbp-34h]
__int64 v10; // [xsp+10h] [xbp-30h] BYREF
v10 = 0;
v4 = nullptr;
if ( (sub_8A8C4(a2, &v10) & 1) == 0 )
{
v9 = 0;
v7 = a1;
v8 = 19;
sub_520A0((__int64)&v7);
v5 = (__int64 *)(a1 + 74040);
v4 = v5;
while ( 1 )
{
v4 = (__int64 *)*v4;
if ( v4 == v5 )
break;
if ( (sub_8A8C4(a2, v4 + 2) & 1) != 0 )
{
++*((_DWORD *)v4 + 8);
goto LABEL_7;
}
}
v4 = nullptr;
LABEL_7:
sub_51F94((__int64)&v7);
}
return v4;
}