//
// sub_1001D1A8C from 0x1001d1a8c to 0x1001d1b20 (148 bytes)
//
// 1 xrefs:
// > sub_1001DE250 @ 0x1001de298
//
// 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:00:23 +0000
//
__int64 __fastcall sub_1001D1A8C(__int64 *a1, __int64 *a2)
{
__int64 v2; // x12
__int64 v3; // x11
int v4; // w8
int v5; // w9
__int64 result; // x0
const void *v7; // x8
size_t v8; // x9
const void *v9; // x10
size_t v10; // x11
size_t v11; // x19
const void *v12; // x0
size_t v13; // x20
const void *v14; // x1
size_t v15; // x2
unsigned int v16; // w8
v2 = *a1;
v3 = *a2;
v4 = *(_DWORD *)(*a2 + 452);
v5 = *(_DWORD *)(*a1 + 452);
result = (unsigned int)(v4 - v5);
if ( v4 == v5 )
{
v7 = (const void *)(v3 + 696);
v8 = *(unsigned __int8 *)(v3 + 719);
v9 = *(const void **)(v3 + 696);
v10 = *(_QWORD *)(v3 + 704);
v11 = *(char *)(v2 + 719);
if ( (v11 & 0x8000000000000000LL) != 0 )
{
v11 = *(_QWORD *)(v2 + 704);
v12 = *(const void **)(v2 + 696);
}
else
{
v12 = (const void *)(v2 + 696);
}
if ( (v8 & 0x80u) == 0LL )
v13 = v8;
else
v13 = v10;
if ( (v8 & 0x80u) == 0LL )
v14 = v7;
else
v14 = v9;
if ( v13 >= v11 )
v15 = v11;
else
v15 = v13;
LODWORD(result) = memcmp(v12, v14, v15);
if ( v11 < v13 )
v16 = -1;
else
v16 = v13 < v11;
if ( (_DWORD)result )
return (unsigned int)result;
else
return v16;
}
return result;
}