//
// sub_82A5C from 0x82a5c to 0x82a9e (66 bytes)
//
// 1 xrefs:
// > sub_83348 @ 0x83548
//
// 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:18 +0000
//
int __fastcall sub_82A5C(int a1)
{
unsigned int v1; // r3
int v2; // r1
int v3; // r0
int v4; // r0
v1 = *(unsigned __int8 *)(a1 + 217);
v2 = *(_DWORD *)(a1 + 4);
if ( (v1 & 0xF) == 0 )
*(_DWORD *)(v2 + 44) += v1 >> 4;
v3 = *(_DWORD *)(v2 + 44);
if ( (v1 & 0xF0) == 0 )
{
v3 -= v1 & 0xF;
*(_DWORD *)(v2 + 44) = v3;
}
if ( v3 > 64 )
{
v4 = 64;
LABEL_9:
*(_DWORD *)(v2 + 44) = v4;
goto LABEL_10;
}
if ( v3 <= -1 )
{
v4 = 0;
goto LABEL_9;
}
LABEL_10:
*(_BYTE *)(v2 + 36) |= 2u;
return 0;
}