//
// sub_10053D880 from 0x10053d880 to 0x10053d99c (284 bytes)
//
// 2 xrefs:
// > sub_10053C0F0 @ 0x10053c330
// > sub_10053C0F0 @ 0x10053c484
//
// 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_10053D880(_QWORD *a1, unsigned __int8 *a2, int a3)
{
unsigned __int64 v5; // x21
unsigned __int64 v6; // x8
__int64 v7; // x4
__int64 v8; // x8
__int64 v10; // x8
__int64 v11; // x9
int v12; // w10
v5 = *((_QWORD *)a2 + 1);
v6 = *((_QWORD *)a2 + 4) + *((_QWORD *)a2 + 3);
if ( v6 > v5 )
{
v7 = 571;
LABEL_11:
sub_1005E0E48(20, 288, 152, "d1_both.c", v7);
return 47;
}
if ( v6 > a3 )
{
v7 = 576;
goto LABEL_11;
}
v8 = a1[17];
if ( *(_QWORD *)(v8 + 768) )
{
if ( v5 == *(_QWORD *)(v8 + 752) )
return 0;
v7 = 601;
goto LABEL_11;
}
if ( (unsigned int)sub_1005D9F48(a1[10], v5 + 12) )
{
v10 = a1[16];
*(_QWORD *)(v10 + 920) = v5;
v11 = a1[17];
*(_QWORD *)(v11 + 752) = v5;
v12 = *a2;
*(_DWORD *)(v10 + 928) = v12;
*(_BYTE *)(v11 + 744) = v12;
*(_WORD *)(v11 + 760) = *((_WORD *)a2 + 8);
return 0;
}
else
{
sub_1005E0E48(20, 288, 7, "d1_both.c", 587);
return 80;
}
}