//
// sub_C29E4 from 0xc29e4 to 0xc2a4a (102 bytes)
//
// 1 xrefs:
// > sub_C211A @ 0xc2120
//
// 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_C29E4(
int a1,
int a2,
unsigned int a3,
unsigned int a4,
_DWORD *a5,
_DWORD *a6,
unsigned int *a7,
int *a8)
{
unsigned int v8; // r6
int v9; // r0
v8 = *(_DWORD *)(a1 + 1256);
if ( v8 < a4 )
a4 = *(_DWORD *)(a1 + 1256);
if ( v8 <= a3 )
{
*a6 = 0;
*a5 = 0;
*a8 = 0;
*a7 = 0;
return 31;
}
else
{
*a5 = *(_DWORD *)(a1 + 1260) + a3;
if ( a4 + a3 <= v8 )
{
v9 = 0;
*a7 = a4;
*a6 = 0;
}
else
{
*a7 = v8 - a3;
*a6 = *(_DWORD *)(a1 + 1260);
v9 = a4 + a3 - *(_DWORD *)(a1 + 1256);
}
*a8 = v9;
return 0;
}
}