//
// sub_10044C738 from 0x10044c738 to 0x10044c7e0 (168 bytes)
//
// 2 xrefs:
// > sub_10044D440 @ 0x10044d574
// > sub_10044D590 @ 0x10044d770
//
// 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
//
__int64 __fastcall sub_10044C738(__int64 a1, int a2)
{
__int64 v4; // x19
__int64 v5; // x21
int v6; // w23
__int64 v7; // x0
__int64 v8; // x22
v4 = *(_QWORD *)(a1 + 32);
sub_1004B5C70(v4);
if ( a2 )
*(_DWORD *)(a1 + 12) += a2;
v5 = *(_QWORD *)(a1 + 32);
sub_1004B5C70(v5);
if ( *(int *)(a1 + 56) < 1 )
{
LABEL_7:
v8 = 0;
*(_DWORD *)(a1 + 56) = 0;
}
else
{
v6 = 0;
while ( 1 )
{
v7 = sub_1004B5DD4(*(_QWORD *)(a1 + 40));
if ( (_DWORD)v7 )
break;
if ( ++v6 >= *(_DWORD *)(a1 + 56) )
goto LABEL_7;
}
v8 = v7;
}
sub_1004B5CA0(v5);
sub_1004B5CA0(v4);
return v8;
}