//
// sub_10057C5B0 from 0x10057c5b0 to 0x10057c5e4 (52 bytes)
//
// 4 xrefs:
// > sub_10057DEF0 @ 0x10057df00
// > sub_10057F0E8 @ 0x10057f10c
// > ??> @ 0x1009aac68
// > ??> @ 0x1009aad60
//
// 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:27 +0000
//
__int64 __fastcall sub_10057C5B0(__int64 a1, unsigned int a2, int a3)
{
__int64 v3; // x9
unsigned int v4; // w9
unsigned int v5; // w10
bool v6; // cf
bool v7; // zf
v3 = *(_QWORD *)(a1 + 40);
if ( !v3 )
return 31;
v4 = *(_DWORD *)(v3 + 68);
v5 = a3 + a2;
if ( v4 > a2 )
{
v6 = v5 >= v4;
v7 = v5 == v4;
}
else
{
v6 = 1;
v7 = 0;
}
if ( !v7 && v6 )
return 31;
*(_DWORD *)(a1 + 88) = a2;
*(_DWORD *)(a1 + 92) = a3;
return 0;
}