//
// sub_54244 from 0x54244 to 0x54322 (222 bytes)
//
// 0 xrefs:
//
// 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:40:45 +0000
//
int __fastcall sub_54244(
_DWORD *a1,
unsigned int a2,
unsigned int a3,
_DWORD *a4,
_DWORD *a5,
unsigned int *a6,
_DWORD *a7)
{
int result; // r0
unsigned int v12; // r0
unsigned int v13; // r9
bool v14; // cc
unsigned int v15; // r3
int v16; // r1
int v17; // [sp+0h] [bp-20h] BYREF
int v18; // [sp+4h] [bp-1Ch] BYREF
result = sub_54322(a1, 8, &v18, 1);
if ( !result )
{
result = sub_54322(a1, a1[11], &v17, 1);
if ( !result )
{
v12 = a1[63];
v13 = a3 + a2;
if ( !v12 )
goto LABEL_7;
v14 = v13 > v12;
if ( v13 > v12 )
v14 = v12 + v18 > a2;
if ( !v14 || (result = sub_5433C(a1)) == 0 )
{
LABEL_7:
v15 = a1[12];
if ( v15 <= a2 || v15 < a3 )
{
*a4 = 0;
if ( a5 )
*a5 = 0;
if ( a6 )
*a6 = 0;
if ( a7 )
*a7 = 0;
return 31;
}
else
{
v16 = a1[58];
*a4 = v16 + a2;
if ( v13 <= v15 )
{
if ( a6 )
*a6 = a3;
if ( a5 )
*a5 = 0;
result = 0;
if ( a7 )
*a7 = 0;
}
else
{
if ( a6 )
*a6 = v15 - a2;
if ( a5 )
*a5 = v16;
if ( a7 )
*a7 = v13 - a1[12];
return 0;
}
}
}
}
}
return result;
}