//
// sub_A5300 from 0xa5300 to 0xa5378 (120 bytes)
//
// 1 xrefs:
// > sub_A5654 @ 0xa5856
//
// 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 11:41:34 +0000
//
int __fastcall sub_A5300(int a1, _DWORD *a2, int *a3, int a4, int a5)
{
int *v6; // r10
int i; // r4
int v11; // r0
int v12; // r0
v6 = (int *)(a1 + 9548);
LABEL_2:
if ( a4 )
{
--a4;
sub_A5378(a1);
for ( i = 0; ; ++i )
{
if ( a5 == i )
goto LABEL_2;
v11 = *v6;
if ( *v6 == 2 )
{
v12 = sub_A5580(a1, *a2, i);
}
else if ( v11 == 1 )
{
v12 = sub_A54EC(a1, *a2, i);
}
else
{
if ( v11 )
continue;
v12 = sub_A5478(a1, *a2, i);
}
++a2;
*a3++ = v12;
}
}
return 0;
}