//
// sub_7A102 from 0x7a102 to 0x7a14a (72 bytes)
//
// 2 xrefs:
// > sub_7A76C @ 0x7a8a2
// > sub_7A76C @ 0x7a8b2
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:41:13 +0000
//
int __fastcall sub_7A102(int a1)
{
int v1; // r1
int v2; // r2
int v3; // r3
int v4; // r0
v1 = *(_DWORD *)(a1 + 4);
v2 = *(_DWORD *)(a1 + 224);
v3 = *(_DWORD *)(v1 + 40);
if ( v3 < v2 )
{
v3 += 4 * *(unsigned __int8 *)(a1 + 228);
if ( v3 > v2 )
v3 = *(_DWORD *)(a1 + 224);
*(_DWORD *)(v1 + 40) = v3;
v2 = *(_DWORD *)(a1 + 224);
}
if ( v3 > v2 )
{
v4 = v3 - 4 * *(unsigned __int8 *)(a1 + 228);
if ( v4 < v2 )
v4 = v2;
*(_DWORD *)(v1 + 40) = v4;
}
*(_BYTE *)(v1 + 36) |= 1u;
return 0;
}