//
// sub_14035DB90 from 0x14035db90 to 0x14035dc36 (166 bytes)
//
// 5 xrefs:
// > sub_14035AD80 @ 0x14035adf9
// > sub_14035AD80 @ 0x14035ae0e
// > sub_14035AD80 @ 0x14035ae2c
// > sub_14035AD80 @ 0x14035ae42
// > ??> @ 0x140921194
//
// 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:30:52 +0000
//
__int64 __fastcall sub_14035DB90(
__int64 *a1,
__int64 *a2,
__int64 *a3,
unsigned __int8 (__fastcall *a4)(__int64 *, __int64 *))
{
__int64 v8; // r8
__int64 result; // rax
__int64 v10; // rcx
__int64 v11; // rax
__int64 v12; // rcx
__int64 v13; // [rsp+40h] [rbp+8h] BYREF
__int64 v14; // [rsp+48h] [rbp+10h] BYREF
v13 = *a1;
v14 = *a2;
if ( a4(&v14, &v13) )
{
v8 = *a2;
*a2 = *a1;
*a1 = v8;
}
v13 = *a2;
v14 = *a3;
result = ((__int64 (__fastcall *)(__int64 *, __int64 *))a4)(&v14, &v13);
if ( (_BYTE)result )
{
v10 = *a3;
*a3 = *a2;
*a2 = v10;
v11 = *a1;
v14 = v10;
v13 = v11;
result = ((__int64 (__fastcall *)(__int64 *, __int64 *))a4)(&v14, &v13);
if ( (_BYTE)result )
{
result = *a1;
v12 = *a2;
*a2 = *a1;
*a1 = v12;
}
}
return result;
}