//
// sub_80F714 from 0x80f714 to 0x80f754 (64 bytes)
//
// 3 xrefs:
// > sub_8101B8 @ 0x8101c0
// > sub_8110DC @ 0x8110e0
// > sub_811A50 @ 0x811a62
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:01:36 +0000
//
int *__fastcall sub_80F714(int *a1, int a2)
{
int v2; // r1
int v4; // r0
unsigned int v5; // r5
unsigned int v6; // r3
int v7; // r2
int *result; // r0
unsigned int v9; // r0
v2 = a2 + 3;
v4 = a1[1];
v5 = v2 & 0xFFFFFFFC;
v6 = (v2 & 0xFFFFFFFC) + v4;
if ( v6 <= 0x1000 )
{
v7 = *a1;
a1[1] = v6;
result = (int *)(v4 + v7);
return ++result;
}
v9 = v2 & 0xFFFFFFFC;
if ( v5 < 0x1000 )
v9 = 4096;
result = (int *)((void *(__fastcall *)(size_t))off_D2006C)(v9 + 4);
if ( result )
{
*result = *a1;
*a1 = (int)result;
a1[1] = v5;
return ++result;
}
return result;
}