//
// sub_72014 from 0x72014 to 0x72044 (48 bytes)
//
// 7 xrefs:
// > ??> @ 0x72012
// > sub_72048 @ 0x7204c
// > sub_CFEB4 @ 0xd0048
// > sub_CFEB4 @ 0xd008e
// > sub_CFEB4 @ 0xd0152
// > sub_CFEB4 @ 0xd01ac
// > sub_D1B98 @ 0xd1bbc
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall sub_72014(int a1, int a2)
{
int result; // r0
int v4; // r0
int v5; // r2
int v6; // r1
int v7; // r1
int v8; // r2
int v9; // r1
result = 0;
if ( dword_F66A0 )
{
if ( dword_F66A4 >= 1 )
{
v4 = a1 - 1;
v5 = -a1;
v6 = a2 + v4;
result = (v4 + dword_F66A0) & v5;
v7 = v6 & v5;
v8 = result + v7;
v9 = dword_F66A4 - (v7 + result - dword_F66A0);
dword_F66A0 = v8;
dword_F66A4 = v9;
}
}
return result;
}