//
// sub_10055EEE8 from 0x10055eee8 to 0x10055ef70 (136 bytes)
//
// 0 xrefs:
//
// 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:08:06 +0000
//
__int64 __fastcall sub_10055EEE8(__int64 result, int a2, int a3)
{
unsigned int v3; // w8
int v4; // w9
int v5; // w10
int v6; // w10
int v7; // w11
bool v8; // zf
unsigned int v9; // w9
unsigned int v10; // w9
unsigned int v11; // w11
if ( (int)result < a2 )
{
v3 = a3 - a2;
v4 = a3 + result;
v5 = a3 + result - a2;
if ( a2 > v5 )
v5 = a2;
v6 = v5 + a2;
if ( v6 == v4 )
v7 = a3 + result;
else
v7 = v4 + 1;
v8 = v6 == v4;
v9 = (v6 - v7) / v3;
if ( !v8 )
++v9;
v10 = v9 + 1;
if ( v10 < 2 )
goto LABEL_18;
result = (unsigned int)result + (v10 & 0xFFFFFFFE) * v3;
v11 = v10 & 0xFFFFFFFE;
do
v11 -= 2;
while ( v11 );
if ( v10 != (v10 & 0xFFFFFFFE) )
{
LABEL_18:
do
result = (unsigned int)result + v3;
while ( (int)result < a2 );
}
}
for ( ; (int)result >= a3; result = (unsigned int)(result + a2 - a3) )
;
return result;
}