//
// sub_103FAF4 from 0x103faf4 to 0x103fba4 (176 bytes)
//
// 1 xrefs:
// > OBJ_add_object @ 0x10403d8
//
// 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 13:16:29 +0000
//
__int64 __fastcall sub_103FAF4(__int64 a1, __int64 a2)
{
unsigned int v2; // w2
unsigned int v3; // w3
__int64 v4; // x4
__int64 v5; // x1
const char *v7; // x0
const char *v8; // x1
int v9; // w3
int v10; // w0
v2 = *(_DWORD *)a1;
v3 = *(_DWORD *)a1 - *(_DWORD *)a2;
if ( *(_DWORD *)a1 == *(_DWORD *)a2 )
{
v4 = *(_QWORD *)(a1 + 8);
v5 = *(_QWORD *)(a2 + 8);
switch ( v2 )
{
case 0u:
v9 = *(_DWORD *)(v4 + 20);
v10 = *(_DWORD *)(v5 + 20);
v2 = v9 - v10;
if ( v9 != v10 )
return v2;
return memcmp(*(const void **)(v4 + 24), *(const void **)(v5 + 24), v9);
case 1u:
v7 = *(const char **)v4;
if ( !*(_QWORD *)v4 )
goto LABEL_16;
v8 = *(const char **)v5;
if ( v8 )
return strcmp(v7, v8);
return v2;
case 2u:
v7 = *(const char **)(v4 + 8);
if ( v7 )
{
v8 = *(const char **)(v5 + 8);
if ( v8 )
return strcmp(v7, v8);
v2 = 1;
}
else
{
LABEL_16:
v2 = -1;
}
break;
case 3u:
return (unsigned int)(*(_DWORD *)(v4 + 16) - *(_DWORD *)(v5 + 16));
default:
return v3;
}
}
else
{
return v3;
}
return v2;
}