//
// sub_1005526F8 from 0x1005526f8 to 0x10055274c (84 bytes)
//
// 1 xrefs:
// > sub_1005547B0 @ 0x1005548c8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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:07:54 +0000
//
int *__fastcall sub_1005526F8(int *result, int a2)
{
int v2; // w9
int v3; // w8
int v4; // w10
int v5; // w10
int v6; // w10
v2 = *result;
v3 = result[1] + a2;
v4 = result[6];
if ( *result <= v4 - ((v3 + 7) >> 3) )
{
if ( v3 >= 0 )
v5 = result[1] + a2;
else
v5 = v3 + 7;
v6 = v5 >> 3;
*((_QWORD *)result + 2) += v6;
*result = v6 + v2;
result[1] = v3 & 7;
}
else
{
*((_QWORD *)result + 2) = 0;
*result = v4;
result[1] = 1;
}
return result;
}