//
// sub_C2DA8 from 0xc2da8 to 0xc2e2e (134 bytes)
//
// 1 xrefs:
// > sub_C2AA8 @ 0xc2ab0
//
// 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:49 +0000
//
int __fastcall sub_C2DA8(int *a1, int a2, int a3, unsigned int *a4)
{
int v7; // r5
unsigned int v8; // r4
int v10; // [sp+8h] [bp-20h] BYREF
unsigned int v11; // [sp+Ch] [bp-1Ch] BYREF
v10 = 0;
v7 = sub_BFE7C((int)&v10);
if ( !v7 )
{
sub_71348(1u, &v11, a1[1]);
v8 = sub_C0E20(v10, a1[56], a1[59], a1[57]);
if ( v8 == -1 )
{
v7 = 16;
*a4 = 0;
}
else
{
*a4 = v8 / v11;
v7 = 0;
(*(void (__fastcall **)(int, int, _DWORD, unsigned int, int))(*(_DWORD *)v10 + 800))(v10, a1[57], 0, v8, a2);
}
}
return v7;
}