//
// 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!
//
// 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
//
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;
}