//
// sub_1004F94E8 from 0x1004f94e8 to 0x1004f962c (324 bytes)
//
// 1 xrefs:
// > sub_1004F8DD0 @ 0x1004f8e08
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_1004F94E8(__int64 a1, unsigned int a2, __int64 a3)
{
__int64 v4; // x8
__int64 result; // x0
int v7; // w9
char *v8; // x0
int v9; // w10
_UNKNOWN **v10; // x8
void *v11; // x10
v4 = *(_QWORD *)(a1 + 368);
result = 19;
if ( (a2 & 0x200) == 0 && (*(_DWORD *)(v4 + 404) & 1) != 0 )
{
*(_DWORD *)(a1 + 40) = 18;
*(_QWORD *)(a1 + 328) = 0;
*(_QWORD *)(a1 + 360) = 0;
*(_DWORD *)(a1 + 24) = 0;
*(_QWORD *)(a1 + 8) = 0;
*(_OWORD *)(a1 + 288) = 0u;
*(_OWORD *)(a1 + 304) = 0u;
if ( a3 )
v7 = *(_DWORD *)(a3 + 204);
else
v7 = 0;
*(_DWORD *)(a1 + 376) = v7;
result = sub_1004AA8B8(v4, 0, 0);
if ( !(_DWORD)result )
{
result = sub_1004F962C(a1, (a2 >> 14) & 1);
if ( !(_DWORD)result )
{
result = sub_1004F9060((char *)a1);
if ( !(_DWORD)result )
{
v8 = (char *)sub_1004B14F8(
*((__int64 **)off_1008524C8 + 54),
56,
(char)"/opt/teamcity-agent/work/570ad728b1678096/core_api/platforms/ios/src/fmod_codec_audioqueue.cpp",
163,
0);
*(_QWORD *)(a1 + 312) = v8;
*(_QWORD *)(a1 + 8) = v8;
if ( v8 )
{
v9 = *(_DWORD *)(a1 + 444);
*((_DWORD *)v8 + 2) = 2;
*((_DWORD *)v8 + 3) = v9;
*((_DWORD *)v8 + 4) = (int)*(double *)(a1 + 416);
*(int32x2_t *)(v8 + 20) = vrev64_s32(*(int32x2_t *)(a1 + 456));
*((_DWORD *)v8 + 7) = *(_DWORD *)(a1 + 468);
v10 = &off_100853860 + 3 * *(unsigned int *)(*(_QWORD *)(a1 + 32) + 69816LL);
*(_QWORD *)(a1 + 400) = a1;
v11 = v10[1];
*(_QWORD *)(a1 + 384) = v10;
*(_QWORD *)(a1 + 392) = v11;
v10[1] = (_UNKNOWN *)(a1 + 384);
**(_QWORD **)(a1 + 392) = a1 + 384;
return 0;
}
else
{
return 38;
}
}
}
}
}
return result;
}