//
// sub_1005E0E3C from 0x1005e0e3c to 0x1005e0f38 (252 bytes)
//
// 0 xrefs:
//
// 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:40 +0000
//
__int64 __fastcall sub_1005E0E3C(
__int64 a1,
AudioUnitRenderActionFlags *a2,
const AudioTimeStamp *a3,
UInt32 a4,
UInt32 a5)
{
UInt32 v7; // w10
UInt32 v8; // w8
int v10; // w9
int v11; // w8
void *v12; // x0
__int64 v13; // x21
unsigned int v14; // w10
int v15; // w22
UInt32 v16; // w23
int v17; // w8
const void *v18; // x1
size_t v19; // x2
AudioBufferList ioData; // [xsp+8h] [xbp-48h] BYREF
*(_QWORD *)&ioData.mNumberBuffers = 0;
v7 = *(_DWORD *)(a1 + 1480);
ioData.mNumberBuffers = 1;
v8 = *(_DWORD *)(a1 + 1464) * *(_DWORD *)(a1 + 1468);
ioData.mBuffers[0].mNumberChannels = v7;
ioData.mBuffers[0].mDataByteSize = v8;
ioData.mBuffers[0].mData = *(void **)(a1 + 1456);
if ( AudioUnitRender(*(AudioUnit *)(a1 + 1440), a2, a3, a4, a5, &ioData) )
return 49;
v10 = *(_DWORD *)(a1 + 1472);
v11 = *(_DWORD *)(a1 + 1464);
v12 = (void *)(*(_QWORD *)(a1 + 1448) + v11 * v10);
v13 = *(_QWORD *)(a1 + 1456);
v14 = *(_DWORD *)(a1 + 1476);
if ( v10 + a5 <= v14 )
{
v19 = v11 * a5;
v18 = *(const void **)(a1 + 1456);
}
else
{
v15 = v14 - v10;
v16 = a5 - (v14 - v10);
memcpy(v12, *(const void **)(a1 + 1456), (int)((v14 - v10) * v11));
v12 = *(void **)(a1 + 1448);
v17 = *(_DWORD *)(a1 + 1464);
v18 = (const void *)(v13 + v17 * v15);
v19 = (int)(v17 * v16);
}
memcpy(v12, v18, v19);
*(_DWORD *)(a1 + 1472) = (int)(*(_DWORD *)(a1 + 1472) + a5) % *(_DWORD *)(a1 + 1476);
return 0;
}