//
// sub_F2BF80 from 0xf2bf80 to 0xf2c010 (144 bytes)
//
// 3 xrefs:
// > sub_EE1754 @ 0xee1a8c
// > sub_EE1754 @ 0xee1d60
// > sub_EE1754 @ 0xee1d84
//
// 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:12:50 +0000
//
__int64 __fastcall sub_F2BF80(__int64 result, unsigned __int64 *a2, unsigned __int64 a3)
{
unsigned __int64 *v3; // x3
unsigned __int64 *v4; // x2
unsigned __int64 v5; // t1
v3 = (unsigned __int64 *)((char *)a2 + a3);
*(_DWORD *)(result + 8) = 254;
*(_QWORD *)result = 0;
*(_DWORD *)(result + 12) = -8;
*(_DWORD *)(result + 40) = 0;
*(_QWORD *)(result + 16) = a2;
*(_QWORD *)(result + 24) = (char *)a2 + a3;
if ( a3 <= 7 )
{
*(_QWORD *)(result + 32) = a2;
}
else
{
v4 = (unsigned __int64 *)((char *)a2 + a3 - 7);
*(_QWORD *)(result + 32) = v4;
if ( a2 < v4 )
{
v5 = *a2;
*(_QWORD *)(result + 16) = (char *)a2 + 7;
*(_DWORD *)(result + 12) = 48;
*(_QWORD *)result = bswap64(v5) >> 8;
return result;
}
}
*(_DWORD *)(result + 12) = 0;
if ( a2 < v3 )
{
*(_QWORD *)(result + 16) = (char *)a2 + 1;
*(_QWORD *)result = *(unsigned __int8 *)a2;
}
else
{
*(_DWORD *)(result + 40) = 1;
}
return result;
}