//
// sub_C17FC from 0xc17fc to 0xc18fc (256 bytes)
//
// 1 xrefs:
// > ??> @ 0xc17fa
//
// 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_C17FC(int *a1, int *a2)
{
int v2; // r4
int result; // r0
unsigned __int64 *v6; // r0
int *v7; // r5
unsigned int v8; // r11
int v9; // r1
int v10; // r0
int v11; // r1
unsigned __int64 *v12; // r0
int v13; // [sp+10h] [bp-28h] BYREF
unsigned int v14; // [sp+14h] [bp-24h] BYREF
int v15; // [sp+18h] [bp-20h] BYREF
v2 = *a1;
if ( *(_DWORD *)(*a1 + 8880) )
return 68;
v6 = sub_BD580(
*(int *)((char *)&dword_14C + (_DWORD)off_E8000),
0x1Cu,
"../android/src/fmod_output_aaudio.cpp",
0x476u,
0);
if ( !v6 )
return 38;
v7 = (int *)v6;
result = sub_C10E8(a1, v6, 1, *a2, (int)v6);
if ( !result )
{
v14 = 0;
v15 = 0;
sub_C0B18((int)&v14, *v7, a2 + 7, a2 + 6, a2 + 8, &v15, &v14);
v8 = v14;
sub_4C894(a2[6], &v13);
if ( v8 <= 0x800 )
v8 = 2048;
v9 = v13;
v10 = a2[8];
v7[6] = (int)a1;
*((_BYTE *)v7 + 20) = 0;
v7[1] = 0;
v11 = v9 / 8 * v10;
v7[2] = v8;
v7[3] = v11;
v12 = sub_BD580(
*(int *)((char *)&dword_14C + (_DWORD)off_E8000),
v11 * v8,
"../android/src/fmod_output_aaudio.cpp",
0x494u,
0);
v7[4] = (int)v12;
if ( !v12 )
sub_C085C(*v7);
a2[9] = v7[2];
a2[10] = (int)v7;
if ( so_AAudioStream_requestStart(*v7) )
{
return 28;
}
else
{
*(_DWORD *)(v2 + 8880) = a2;
return 0;
}
}
return result;
}