//
// sub_1005110EC from 0x1005110ec to 0x10051116c (128 bytes)
//
// 1 xrefs:
// > sub_10043E2C8 @ 0x10043e5a4
//
// 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_1005110EC(_QWORD *a1, int a2)
{
__int64 v3; // x20
__int64 v4; // x0
__int64 result; // x0
if ( a2 == -1 )
v3 = 0;
else
v3 = sub_100510098(a1[21] + 73984LL, a2);
v4 = a1[71];
if ( v3 == v4 )
return 0;
if ( !v4 || (result = sub_100510220(v4, (__int64)a1), !(_DWORD)result) )
{
if ( !v3 || (result = sub_1005101F4(v3, a1), !(_DWORD)result) )
{
a1[71] = v3;
return 0;
}
}
return result;
}