//
// sub_180002030 from 0x180002030 to 0x1800020aa (122 bytes)
//
// 5 xrefs:
// > sub_1800020B0 @ 0x18000211a
// > sub_1800020B0 @ 0x18000212f
// > sub_1800020B0 @ 0x18000214c
// > sub_1800020B0 @ 0x180002165
// > ??> @ 0x1801ad150
//
// 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_180002030(
__int64 *a1,
__int64 *a2,
__int64 *a3,
unsigned __int8 (__fastcall *a4)(__int64, __int64))
{
__int64 v8; // r10
__int64 result; // rax
__int64 v10; // rcx
__int64 v11; // rcx
if ( a4(*a2, *a1) )
{
v8 = *a2;
*a2 = *a1;
*a1 = v8;
}
result = ((__int64 (__fastcall *)(__int64, __int64))a4)(*a3, *a2);
if ( (_BYTE)result )
{
v10 = *a3;
*a3 = *a2;
*a2 = v10;
result = ((__int64 (__fastcall *)(__int64, __int64))a4)(v10, *a1);
if ( (_BYTE)result )
{
result = *a1;
v11 = *a2;
*a2 = *a1;
*a1 = v11;
}
}
return result;
}