//
// sub_83AE10 from 0x83ae10 to 0x83ae90 (128 bytes)
//
// 0 xrefs:
//
// 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:02:16 +0000
//
int __fastcall sub_83AE10(
int a1,
void *(*a2)(size_t byte_count),
void (*a3)(void *p),
void *(*a4)(void *p, size_t byte_count),
char *(*a5)(const char *),
void *(*a6)(size_t item_count, size_t item_size))
{
bool v6; // zf
bool v8; // zf
int v9; // r4
v6 = a3 == nullptr;
if ( a3 )
v6 = a2 == nullptr;
if ( v6 )
return 2;
v8 = a5 == nullptr;
if ( a5 )
v8 = a4 == nullptr;
v9 = v8;
if ( !a6 )
v9 |= 1u;
if ( v9 )
return 2;
if ( dword_D31650 )
{
++dword_D31650;
return 0;
}
dword_D31650 = 1;
off_D200AC = a2;
off_D200B0 = a3;
off_D200B4 = a4;
off_D200B8 = a5;
off_D200BC = a6;
if ( (a1 & 1) != 0 && !sub_8554A4() )
return 2;
sub_8426A4();
if ( (a1 & 4) != 0 )
dword_D31658 = 1;
dword_D31654 = a1;
sub_833BE0();
return 0;
}