//
// sub_86848 from 0x86848 to 0x86886 (62 bytes)
//
// 3 xrefs:
// > sub_874A4 @ 0x876c6
// > sub_874A4 @ 0x8779e
// > sub_874A4 @ 0x877d0
//
// 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:20 +0000
//
int __fastcall sub_86848(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 )
{
v4 = v3 + 4 * *(unsigned __int8 *)(a1 + 228);
if ( v4 > v2 )
v4 = v2;
LABEL_8:
*(_DWORD *)(v1 + 40) = v4;
goto LABEL_9;
}
if ( v3 > v2 )
{
v4 = v3 - 4 * *(unsigned __int8 *)(a1 + 228);
if ( v4 < v2 )
v4 = v2;
goto LABEL_8;
}
LABEL_9:
*(_BYTE *)(v1 + 36) |= 1u;
return 0;
}