//
// sub_180001FF0 from 0x180001ff0 to 0x18000206a (122 bytes)
//
// 5 xrefs:
// > sub_180002070 @ 0x1800020da
// > sub_180002070 @ 0x1800020ef
// > sub_180002070 @ 0x18000210c
// > sub_180002070 @ 0x180002125
// > ??> @ 0x1801b715c
//
// This function is hookable on this platform (idp: pc, 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:21:15 +0000
//
__int64 __fastcall sub_180001FF0(
__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;
}