//
// sub_C9180 from 0xc9180 to 0xc91bc (60 bytes)
//
// 1 xrefs:
// > sub_CA5FC @ 0xca6c8
//
// 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:54 +0000
//
_DWORD *__fastcall sub_C9180(_DWORD *result, int a2)
{
int v2; // r1
int v3; // r3
int v4; // r1
int v5; // kr00_4
int v6; // kr04_4
v2 = a2 + result[1];
v3 = result[4];
if ( *result <= v3 - ((v2 + 7) >> 3) )
{
v5 = v2;
v6 = v2;
v4 = v2 & 7;
*result += v5 / 8;
result[3] += v6 / 8;
}
else
{
*result = v3;
result[3] = 0;
v4 = 1;
}
result[1] = v4;
return result;
}