//
// FMODAudioEngine::channelForChannelID from 0x140060f50 to 0x14006100e (190 bytes)
//
// 35 xrefs:
// > FMODAudioEngine::resumeSuspendedAudio @ 0x14005e085
// > FMODAudioEngine::saveAudioState @ 0x14005e7ef
// > FMODAudioEngine::loadAudioState @ 0x14005ec4c
// > FMODAudioEngine::playEffectAdvanced @ 0x14005fc06
// > FMODAudioEngine::setChannelVolume @ 0x140061b18
// > FMODAudioEngine::setChannelVolume @ 0x140061b48
// > FMODAudioEngine::setChannelVolumeMod @ 0x140061ce8
// > FMODAudioEngine::setChannelVolumeMod @ 0x140061d18
// > FMODAudioEngine::setChannelPitch @ 0x140061e51
// > FMODAudioEngine::isMusicPlaying_1 @ 0x140062977
// > FMODAudioEngine::stopAllMusic @ 0x140062a75
// > FMODAudioEngine::resumeAllMusic @ 0x140062adc
// > FMODAudioEngine::loadAndPlayMusic @ 0x140062d0c
// > FMODAudioEngine::playMusic @ 0x140062e1e
// > FMODAudioEngine::playMusic @ 0x140062e83
// > FMODAudioEngine::loadMusic @ 0x140062fac
// > FMODAudioEngine::startMusic @ 0x1400632f2
// > FMODAudioEngine::updateQueuedMusic @ 0x14006446e
// > FMODAudioEngine::setMusicTimeMS @ 0x140064fdb
// > FMODAudioEngine::getMusicTimeMS @ 0x140065105
// > FMODAudioEngine::getMusicLengthMS @ 0x14006516b
// > FMODAudioEngine::fadeInMusic @ 0x1400653bb
// > FMODAudioEngine::fadeOutMusic @ 0x1400654fb
// > FMODAudioEngine::fadeMusic @ 0x140065643
// > FMODAudioEngine::stopAndRemoveMusic @ 0x140065a7a
// > AppDelegate::applicationDidEnterBackground @ 0x1400986e6
// > GJBaseGameLayer::pauseAudio @ 0x140340406
// > GJBaseGameLayer::processActivatedAudioTriggers @ 0x14034dd9f
// > GJBaseGameLayer::processActivatedAudioTriggers @ 0x14034ef4f
// > GJBaseGameLayer::processSongState @ 0x14034ff60
// > PlayLayer::showCompleteEffect @ 0x140507d61
// > PlayLayer::destroyPlayer @ 0x140512e5c
// > PlayLayer::loadFromCheckpoint @ 0x1405168fc
// > PlayLayer::resetLevel @ 0x140518dfc
// > ??> @ 0x140910aa8
//
// This function is hookable on this platform (idp: pc, 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:25:44 +0000
//
__int64 __fastcall FMODAudioEngine::channelForChannelID(_QWORD *a1, int a2)
{
__int64 *v3; // rcx
__int64 result; // rax
__int64 v5; // rcx
_BYTE v6[24]; // [rsp+20h] [rbp-18h] BYREF
int v7; // [rsp+48h] [rbp+10h] BYREF
v7 = a2;
v3 = (__int64 *)(a1[208]
+ 16
* (a1[211]
& (0x100000001B3LL
* ((0x100000001B3LL
* (BYTE2(a2)
^ (0x100000001B3LL
* (BYTE1(a2) ^ (0x100000001B3LL * ((unsigned __int8)a2 ^ 0xCBF29CE484222325uLL))))))
^ HIBYTE(a2)))));
result = v3[1];
if ( result != a1[206] )
{
v5 = *v3;
if ( a2 == *(_DWORD *)(result + 16) )
goto LABEL_7;
while ( result != v5 )
{
result = *(_QWORD *)(result + 8);
if ( a2 == *(_DWORD *)(result + 16) )
goto LABEL_7;
}
}
result = 0;
LABEL_7:
if ( result )
return *(_QWORD *)(*(_QWORD *)sub_1400677E0(a1 + 205, v6, &v7) + 24LL);
return result;
}