//
// FMOD::ChannelControl::setDelay from 0xd043c to 0xd04ec (176 bytes)
//
// 4 xrefs:
// > FMOD::ChannelControl::setDelay @ 0x107edc
// > ??> @ 0x3400
// > FMOD::ChannelControl::setDelay @ 0x107ed4
// > ??> @ 0x110830
//
// 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 12:14:50 +0000
//
__int64 __fastcall FMOD::ChannelControl::setDelay(FMOD::ChannelControl *this, unsigned __int64 a2, __int64 a3)
{
__int64 v3; // x22
__int64 v5; // x0
char v6; // w3
char v7; // w23
unsigned int v8; // w0
unsigned int v9; // w21
__int64 v10; // x0
char v11; // w8
__int64 v13; // [xsp+0h] [xbp-140h] BYREF
__int64 v14; // [xsp+108h] [xbp-38h]
v5 = sub_D1FD4(this);
v7 = v6;
v8 = sub_D1E44(v5);
if ( v8 )
{
v9 = v8;
}
else
{
v3 <<= 20;
a3 <<= 20;
v10 = (*(__int64 (__fastcall **)(__int64, __int64, __int64, _QWORD))(*(_QWORD *)v14 + 224LL))(v14, v3, a3, v7 & 1);
v9 = v10;
if ( !(_DWORD)v10 )
goto LABEL_6;
}
v10 = sub_D1CCC();
if ( v11 < 0 )
{
sub_D04EC(&v13, 256, v3, a3, v7 & 1);
v10 = sub_D1D58(v9, 4);
}
LABEL_6:
sub_D1E80(v10);
return v9;
}