//
// sub_A4C74 from 0xa4c74 to 0xa4e0a (406 bytes)
//
// 1 xrefs:
// > sub_A5978 @ 0xa597a
//
// 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_A4C74(int a1, int a2, int a3, int a4)
{
int v5; // r8
int v6; // r5
int v7; // r0
_DWORD *v8; // r0
int v9; // r0
int v10; // r6
unsigned int v11; // r10
float v12; // s16
float v13; // s18
float v14; // s20
int v15; // r0
int v16; // r1
int v17; // r2
float v18; // s0
float v19; // s26
float v20; // s2
float v21; // s0
float v22; // s2
float v23; // s0
_DWORD *v24; // r12
int v25; // r6
int v26; // r0
int v27; // r2
int v28; // r3
int v29; // r5
int v30; // r4
_DWORD *v31; // r0
v5 = a1 + 9472;
v6 = 0;
*(float *)(a1 + 9540) = (float)*(int *)(*(_DWORD *)(a1 + 128) + 1184);
while ( 1 )
{
v7 = *(_DWORD *)(a1 + 164);
if ( v6 >= *(_DWORD *)(v7 + 72) )
break;
v8 = *(_DWORD **)(*(_DWORD *)(v7 + 76) + 4 * v6);
if ( *v8 )
v9 = sub_AB28A(a1, v6, v8[12], a4);
else
v9 = sub_AB218(a1, v6, v8[12]);
++v6;
v10 = v9;
if ( v9 )
return v10;
}
v11 = 0;
*(_DWORD *)(v5 + 16) = 0;
*(_DWORD *)(v5 + 36) = 0;
v12 = *(float *)(v5 + 80);
v13 = *(float *)(v5 + 84);
v14 = *(float *)(v5 + 88);
*(float *)v5 = v12;
*(float *)(v5 + 20) = v13;
*(float *)(v5 + 40) = v14;
v15 = *(_DWORD *)(v5 + 92);
v16 = *(_DWORD *)(v5 + 96);
v17 = *(_DWORD *)(v5 + 100);
*(_DWORD *)(v5 + 56) = 0;
*(_DWORD *)(v5 + 60) = v15;
*(_DWORD *)(v5 + 64) = v16;
*(_DWORD *)(v5 + 76) = v17;
v18 = powf(10.0, v12 * 0.05);
v19 = 0.0;
v20 = 0.0;
if ( v12 > -80.0 )
v20 = v18;
*(float *)(v5 + 4) = v20;
v21 = powf(10.0, v13 * 0.05);
v22 = 0.0;
if ( v13 > -80.0 )
v22 = v21;
*(float *)(v5 + 24) = v22;
v23 = powf(10.0, v14 * 0.05);
v24 = (_DWORD *)(a1 + 5384);
if ( v14 > -80.0 )
v19 = v23;
*(float *)(v5 + 44) = v19;
while ( v11 != 4 )
{
v25 = 32;
v26 = a1 + 112 * (v11 >> 1);
v27 = v26 + 1056;
v28 = v26 + 832;
v29 = v26 + 608;
v30 = v26 + 384;
v31 = v24;
while ( v25 )
{
*(v31 - 1024) = v30;
--v25;
*(v31 - 512) = v29;
v31[512] = v27;
*v31 = v28;
v31 += 4;
}
v24 += 128;
++v11;
}
v10 = 0;
sub_A4E20(a1, 0);
sub_A4F28(a1, 0);
*(_DWORD *)(v5 + 72) = 0;
return v10;
}