//
// sub_100627E54 from 0x100627e54 to 0x100627eb4 (96 bytes)
//
// 5 xrefs:
// > sub_1006223D4 @ 0x10062276c
// > sub_1006223D4 @ 0x1006227e0
// > sub_1006223D4 @ 0x1006228c8
// > sub_1006223D4 @ 0x100622974
// > sub_10062597C @ 0x1006259c0
//
// 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:10:23 +0000
//
__int64 __fastcall sub_100627E54(int a1, int a2)
{
bool v2; // cc
int v3; // w13
int v4; // w14
__int64 result; // x0
int v6; // w11
int v7; // w12
if ( qword_100A0B430 )
v2 = dword_100A0B438 < 1;
else
v2 = 1;
if ( v2 )
return 0;
v3 = a1 + a2;
v4 = -a1;
result = (qword_100A0B430 + a1 - 1) & -a1;
v6 = result - qword_100A0B430;
v7 = (v3 - 1) & v4;
qword_100A0B430 = result + v7;
dword_100A0B438 = dword_100A0B438 - v7 - v6;
return result;
}