//
// sub_1005DEF18 from 0x1005def18 to 0x1005df048 (304 bytes)
//
// 1 xrefs:
// > sub_1005F7390 @ 0x1005f79f8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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:09:39 +0000
//
__int64 __fastcall sub_1005DEF18(__int64 *a1, int a2)
{
_OWORD *v4; // x0
__int64 v5; // x0
__int64 result; // x0
void *v7; // x0
__int64 v8; // x22
unsigned int v9; // w21
__int64 v10; // x20
_QWORD *v11; // x0
if ( !a1[9] )
return 67;
if ( !a2 )
return 0;
v4 = sub_1005D7364(
*((__int64 **)off_1009DA5E8 + 54),
32,
(char)"/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod_output_emulated.cpp",
65,
0,
0);
if ( !v4 )
{
a1[8] = 0;
return 38;
}
sub_1005854A0(v4);
a1[8] = v5;
result = sub_1005854AC(v5, a1[9], (__int64)a1, a2);
if ( (_DWORD)result )
return result;
v7 = sub_1005D7660(
*((__int64 **)off_1009DA5E8 + 54),
112 * a2,
(char)"/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod_output_emulated.cpp",
77,
0);
a1[131] = (__int64)v7;
if ( !v7 )
return 38;
if ( a2 < 1 )
return 0;
v8 = 0;
v9 = 0;
v10 = 112LL * (unsigned int)a2;
do
{
sub_10057C3D4(a1[131] + v8);
*v11 = off_1009AABD8;
result = sub_100585764(a1[8], v9, a1[131] + v8);
if ( (_DWORD)result )
break;
++v9;
v8 += 112;
}
while ( v10 != v8 );
return result;
}