//
// sub_140067F60 from 0x140067f60 to 0x140068182 (546 bytes)
//
// 124 xrefs:
// > FMODAudioEngine::loadAudioState @ 0x14005ec6c
// > FMODAudioEngine::loadAudioState @ 0x14005ec83
// > FMODAudioEngine::loadAudioState @ 0x14005ecb0
// > FMODAudioEngine::loadAudioState @ 0x14005ef1c
// > FMODAudioEngine::loadAudioState @ 0x14005ef47
// > FMODAudioEngine::loadAudioState @ 0x14005ef72
// > FMODAudioEngine::loadAudioState @ 0x14005ef8c
// > FMODAudioEngine::loadAudioState @ 0x14005ef9f
// > FMODAudioEngine::loadAudioState @ 0x14005efc6
// > FMODAudioEngine::loadAudioState @ 0x14005f03c
// > FMODAudioEngine::loadAudioState @ 0x14005f067
// > FMODAudioEngine::loadAudioState @ 0x14005f092
// > FMODAudioEngine::loadAudioState @ 0x14005f0ac
// > FMODAudioEngine::loadAudioState @ 0x14005f0bf
// > FMODAudioEngine::loadAudioState @ 0x14005f0e6
// > FMODAudioEngine::getChannelGroup @ 0x14005f8a5
// > FMODAudioEngine::getChannelGroup @ 0x14005f8d8
// > FMODAudioEngine::getChannelGroup @ 0x14005f90b
// > FMODAudioEngine::playEffectAdvanced @ 0x14005fd36
// > FMODAudioEngine::playEffectAdvanced @ 0x14005fd64
// > FMODAudioEngine::registerChannel @ 0x14006074e
// > FMODAudioEngine::registerChannel @ 0x14006076f
// > FMODAudioEngine::registerChannel @ 0x1400607a1
// > FMODAudioEngine::registerChannel @ 0x1400607c8
// > FMODAudioEngine::registerChannel @ 0x1400607e5
// > FMODAudioEngine::unregisterChannel @ 0x14006099e
// > FMODAudioEngine::channelIDForUniqueID @ 0x140060f38
// > FMODAudioEngine::updateChannel @ 0x140061863
// > FMODAudioEngine::updateChannel @ 0x14006189f
// > FMODAudioEngine::setChannelVolume @ 0x140061a0f
// > FMODAudioEngine::setChannelVolume @ 0x140061a50
// > FMODAudioEngine::setChannelVolume @ 0x140061a89
// > FMODAudioEngine::setChannelVolume @ 0x140061acf
// > FMODAudioEngine::setChannelVolume @ 0x140061b35
// > FMODAudioEngine::setChannelVolume @ 0x140061b64
// > FMODAudioEngine::setChannelVolumeMod @ 0x140061bdf
// > FMODAudioEngine::setChannelVolumeMod @ 0x140061c20
// > FMODAudioEngine::setChannelVolumeMod @ 0x140061c59
// > FMODAudioEngine::setChannelVolumeMod @ 0x140061c9f
// > FMODAudioEngine::setChannelVolumeMod @ 0x140061d05
// > FMODAudioEngine::setChannelVolumeMod @ 0x140061d34
// > FMODAudioEngine::setChannelPitch @ 0x140061d9b
// > FMODAudioEngine::setChannelPitch @ 0x140061de9
// > FMODAudioEngine::setChannelPitch @ 0x140061e3d
// > FMODAudioEngine::loadMusic @ 0x140063153
// > FMODAudioEngine::loadMusic @ 0x140063171
// > FMODAudioEngine::loadMusic @ 0x1400631a4
// > FMODAudioEngine::loadMusic @ 0x1400631de
// > FMODAudioEngine::swapMusicIndex @ 0x140064b84
// > FMODAudioEngine::swapMusicIndex @ 0x140064baf
// > FMODAudioEngine::swapMusicIndex @ 0x140064be1
// > FMODAudioEngine::swapMusicIndex @ 0x140064c0c
// > FMODAudioEngine::swapMusicIndex @ 0x140064c3e
// > FMODAudioEngine::swapMusicIndex @ 0x140064c69
// > FMODAudioEngine::swapMusicIndex @ 0x140064c83
// > FMODAudioEngine::swapMusicIndex @ 0x140064c9b
// > FMODAudioEngine::swapMusicIndex @ 0x140064cae
// > FMODAudioEngine::swapMusicIndex @ 0x140064cc7
// > FMODAudioEngine::swapMusicIndex @ 0x140064cdf
// > FMODAudioEngine::swapMusicIndex @ 0x140064cf7
// > FMODAudioEngine::swapMusicIndex @ 0x140064d0a
// > FMODAudioEngine::swapMusicIndex @ 0x140064d23
// > FMODAudioEngine::swapMusicIndex @ 0x140064d3b
// > FMODAudioEngine::swapMusicIndex @ 0x140064d53
// > FMODAudioEngine::swapMusicIndex @ 0x140064d66
// > FMODAudioEngine::swapMusicIndex @ 0x140064d7f
// > EditorSFXManager::deserializeAll @ 0x140189569
// > EditorSFXSettingsPopup::valueDidChange @ 0x14018d860
// > EditorUI::dynamicGroupUpdate @ 0x1401b89ee
// > EditorUI::pasteObjects @ 0x1401c65e9
// > EditorUI::pasteObjects @ 0x1401c6818
// > EditorUI::pasteObjects @ 0x1401c6936
// > EditorUI::pasteObjects @ 0x1401c6a08
// > EditorUI::pasteObjects @ 0x1401c6ad6
// > EditorUI::pasteObjects @ 0x1401c6c1c
// > EditorUI::pasteObjects @ 0x1401c6cbc
// > GameLevelManager::applyDeathBlob @ 0x140227fc1
// > sub_140280240 @ 0x1402802f1
// > GameStatsManager::getStat @ 0x1402db24b
// > GameStatsManager::getStat @ 0x1402db267
// > GameStatsManager::setStat @ 0x1402db3b5
// > GameStatsManager::setStat @ 0x1402db3d6
// > GJBaseGameLayer::generateEnterEasingBuffer @ 0x140314c1e
// > GJBaseGameLayer::generateEnterEasingBuffer @ 0x140314d75
// > GJBaseGameLayer::getSavedPosition @ 0x140320a59
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x1403216d8
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x1403216f9
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x140321716
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x1403217f9
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x140321991
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x1403219b3
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x1403219cd
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x140321ab5
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x140321ad7
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x140321af4
// > GJBaseGameLayer::checkSpawnObjects @ 0x14032212d
// > GJBaseGameLayer::checkSpawnObjects @ 0x140322334
// > GJBaseGameLayer::registerSpawnRemap @ 0x140325903
// > GJBaseGameLayer::activatePersistentItemTrigger @ 0x14033daf7
// > GJBaseGameLayer::activatePersistentItemTrigger @ 0x14033db11
// > GJBaseGameLayer::canProcessSFX @ 0x14034d46a
// > GJBaseGameLayer::canProcessSFX @ 0x14034d529
// > GJBaseGameLayer::canProcessSFX @ 0x14034d568
// > GJBaseGameLayer::canProcessSFX @ 0x14034d58b
// > GJBaseGameLayer::processActivatedAudioTriggers @ 0x14034e5a4
// > GJBaseGameLayer::processActivatedAudioTriggers @ 0x14034e83f
// > GJBaseGameLayer::processSongState @ 0x14034fb0e
// > GJBaseGameLayer::processSongState @ 0x14034fd77
// > GJBaseGameLayer::resetSpawnChannelIndex @ 0x140350193
// > GJEffectManager::updateCountForItem @ 0x14036cc8e
// > GJEffectManager::updateCountForItem @ 0x14036cd42
// > GJEffectManager::transferPersistentItems @ 0x14036d707
// > IDNameInput::useRank @ 0x1403c773f
// > sub_140401A50 @ 0x140401b83
// > sub_140529350 @ 0x1405294e7
// > sub_140529F00 @ 0x14052a09b
// > EffectGameObject::triggerObject @ 0x140647c8f
// > EffectGameObject::triggerObject @ 0x140647cb8
// > SequenceTriggerGameObject::triggerObject @ 0x140655d51
// > SequenceTriggerGameObject::triggerObject @ 0x140655d77
// > SequenceTriggerGameObject::triggerObject @ 0x140655e04
// > SequenceTriggerGameObject::triggerObject @ 0x140655ec7
// > CountTriggerGameObject::triggerObject @ 0x14065c370
// > ??> @ 0x1409110f0
//
// 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:46 +0000
//
// Hidden C++ exception states: #wind=2
__int64 __fastcall sub_140067F60(_QWORD *a1, __int64 a2, unsigned __int8 *a3)
{
unsigned __int64 v6; // rbp
__int64 v7; // rdx
__int64 v8; // rcx
__int64 *v9; // rax
__int64 **v10; // r12
__int64 *v11; // rsi
__int64 *v12; // rdx
__int64 **v14; // rbx
__int64 v15; // rdx
float v16; // xmm0_4
__int64 v17; // rcx
float v18; // xmm1_4
__int64 v19; // rax
unsigned __int64 v20; // rax
__int64 v21; // rcx
__int64 *v22; // rax
__int64 *v23; // rdx
int v24; // ecx
__int64 *v25; // rdx
__int64 v26; // rax
__int64 v27; // rcx
__int64 *v28; // r8
v6 = 0x100000001B3LL
* (a3[3]
^ (0x100000001B3LL * (a3[2] ^ (0x100000001B3LL * (a3[1] ^ (0x100000001B3LL * (*a3 ^ 0xCBF29CE484222325uLL)))))));
v7 = 2 * (a1[6] & v6);
v8 = a1[3];
v9 = *(__int64 **)(v8 + 8 * v7 + 8);
v10 = (__int64 **)(a1 + 1);
v11 = (__int64 *)a1[1];
if ( v9 == v11 )
goto LABEL_8;
v12 = *(__int64 **)(v8 + 8 * v7);
if ( *(_DWORD *)a3 != *((_DWORD *)v9 + 4) )
{
while ( v9 != v12 )
{
v9 = (__int64 *)v9[1];
if ( *(_DWORD *)a3 == *((_DWORD *)v9 + 4) )
goto LABEL_5;
}
v11 = v9;
LABEL_8:
if ( a1[2] == 0xAAAAAAAAAAAAAAALL )
std::_Xlength_error("unordered_map/set too long");
v14 = (__int64 **)operator new(0x18u);
v14[2] = (__int64 *)*(unsigned int *)a3;
v15 = a1[2] + 1LL;
if ( v15 < 0 )
v16 = (float)(v15 & 1 | (unsigned int)((unsigned __int64)v15 >> 1))
+ (float)(v15 & 1 | (unsigned int)((unsigned __int64)v15 >> 1));
else
v16 = (float)(int)v15;
v17 = a1[7];
if ( v17 < 0 )
{
v19 = a1[7] & 1LL | ((unsigned __int64)v17 >> 1);
v18 = (float)(int)v19 + (float)(int)v19;
}
else
{
v18 = (float)(int)v17;
}
if ( (float)(v16 / v18) > *(float *)a1 )
{
v20 = sub_14006A6B0(a1, v15);
sub_14003F310(a1, v20);
v21 = a1[3];
v22 = *(__int64 **)(v21 + 16 * (v6 & a1[6]) + 8);
v11 = *v10;
if ( v22 != *v10 )
{
v23 = *(__int64 **)(v21 + 16 * (v6 & a1[6]));
v24 = *((_DWORD *)v14 + 4);
if ( v24 == *((_DWORD *)v22 + 4) )
{
LABEL_21:
v11 = (__int64 *)*v22;
}
else
{
while ( v22 != v23 )
{
v22 = (__int64 *)v22[1];
if ( v24 == *((_DWORD *)v22 + 4) )
goto LABEL_21;
}
v11 = v22;
}
}
}
v25 = (__int64 *)v11[1];
++a1[2];
*v14 = v11;
v14[1] = v25;
*v25 = (__int64)v14;
v11[1] = (__int64)v14;
v26 = 2 * (v6 & a1[6]);
v27 = a1[3];
v28 = *(__int64 **)(v27 + 16 * (v6 & a1[6]));
if ( v28 == *v10 )
{
*(_QWORD *)(v27 + 16 * (v6 & a1[6])) = v14;
LABEL_28:
*(_QWORD *)(v27 + 8 * v26 + 8) = v14;
goto LABEL_29;
}
if ( v28 == v11 )
{
*(_QWORD *)(v27 + 16 * (v6 & a1[6])) = v14;
}
else if ( *(__int64 **)(v27 + 16 * (v6 & a1[6]) + 8) == v25 )
{
goto LABEL_28;
}
LABEL_29:
*(_QWORD *)a2 = v14;
*(_BYTE *)(a2 + 8) = 1;
return a2;
}
LABEL_5:
*(_QWORD *)a2 = v9;
*(_BYTE *)(a2 + 8) = 0;
return a2;
}