//
// sub_1006141A4 from 0x1006141a4 to 0x1006141fc (88 bytes)
//
// 2 xrefs:
// > sub_10059F4B4 @ 0x10059f4d4
// > sub_10059F5B0 @ 0x10059f6f0
//
// 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:10:11 +0000
//
__int64 __fastcall sub_1006141A4(__int64 a1, unsigned int a2)
{
__int64 result; // x0
int v4; // w9
if ( !*(_DWORD *)(a1 + 8) )
return *(_QWORD *)(a1 + 112);
if ( (a2 & 0x80000000) != 0 )
{
v4 = *(_DWORD *)(a1 + 128);
result = *(_QWORD *)(a1 + 112);
if ( v4 >= 3 )
result += 32LL * *(int *)(a1 + 136);
}
else if ( *(_DWORD *)(a1 + 64) <= (signed int)a2 )
{
return 0;
}
else
{
return *(_QWORD *)(a1 + 112) + 32LL * a2;
}
return result;
}