//
// sub_140060B20 from 0x140060b20 to 0x140060d65 (581 bytes)
//
// 118 xrefs:
// > FMODAudioEngine::loadAudioState @ 0x1400560cd
// > FMODAudioEngine::loadAudioState @ 0x1400560e5
// > FMODAudioEngine::loadAudioState @ 0x140056113
// > FMODAudioEngine::loadAudioState @ 0x140056384
// > FMODAudioEngine::loadAudioState @ 0x1400563b7
// > FMODAudioEngine::loadAudioState @ 0x1400563e2
// > FMODAudioEngine::loadAudioState @ 0x140056400
// > FMODAudioEngine::loadAudioState @ 0x140056417
// > FMODAudioEngine::loadAudioState @ 0x140056445
// > FMODAudioEngine::loadAudioState @ 0x1400564b4
// > FMODAudioEngine::loadAudioState @ 0x1400564e7
// > FMODAudioEngine::loadAudioState @ 0x140056512
// > FMODAudioEngine::loadAudioState @ 0x140056530
// > FMODAudioEngine::loadAudioState @ 0x140056547
// > FMODAudioEngine::loadAudioState @ 0x140056575
// > FMODAudioEngine::getChannelGroup @ 0x140056ce5
// > FMODAudioEngine::getChannelGroup @ 0x140056d18
// > FMODAudioEngine::getChannelGroup @ 0x140056d4b
// > FMODAudioEngine::playEffectAdvanced @ 0x140057178
// > FMODAudioEngine::playEffectAdvanced @ 0x1400571af
// > FMODAudioEngine::registerChannel @ 0x140057b9d
// > FMODAudioEngine::registerChannel @ 0x140057bbe
// > FMODAudioEngine::registerChannel @ 0x140057bf0
// > FMODAudioEngine::registerChannel @ 0x140057c17
// > FMODAudioEngine::registerChannel @ 0x140057c34
// > FMODAudioEngine::unregisterChannel @ 0x140057dff
// > FMODAudioEngine::channelIDForUniqueID @ 0x140058490
// > FMODAudioEngine::updateChannel @ 0x140058cba
// > FMODAudioEngine::setChannelVolume @ 0x140058e1f
// > FMODAudioEngine::setChannelVolume @ 0x140058e60
// > FMODAudioEngine::setChannelVolume @ 0x140058e99
// > FMODAudioEngine::setChannelVolume @ 0x140058edf
// > FMODAudioEngine::setChannelVolume @ 0x140058f45
// > FMODAudioEngine::setChannelVolume @ 0x140058f74
// > FMODAudioEngine::setChannelVolumeMod @ 0x140058fef
// > FMODAudioEngine::setChannelVolumeMod @ 0x140059030
// > FMODAudioEngine::setChannelVolumeMod @ 0x140059069
// > FMODAudioEngine::setChannelVolumeMod @ 0x1400590af
// > FMODAudioEngine::setChannelVolumeMod @ 0x140059115
// > FMODAudioEngine::setChannelVolumeMod @ 0x140059144
// > FMODAudioEngine::setChannelPitch @ 0x1400591ab
// > FMODAudioEngine::setChannelPitch @ 0x1400591f9
// > FMODAudioEngine::setChannelPitch @ 0x14005924d
// > FMODAudioEngine::loadMusic @ 0x14005a505
// > FMODAudioEngine::loadMusic @ 0x14005a523
// > FMODAudioEngine::loadMusic @ 0x14005a556
// > FMODAudioEngine::loadMusic @ 0x14005a590
// > FMODAudioEngine::swapMusicIndex @ 0x14005bd94
// > FMODAudioEngine::swapMusicIndex @ 0x14005bdbf
// > FMODAudioEngine::swapMusicIndex @ 0x14005bdf1
// > FMODAudioEngine::swapMusicIndex @ 0x14005be1c
// > FMODAudioEngine::swapMusicIndex @ 0x14005be4e
// > FMODAudioEngine::swapMusicIndex @ 0x14005be79
// > FMODAudioEngine::swapMusicIndex @ 0x14005be93
// > FMODAudioEngine::swapMusicIndex @ 0x14005beab
// > FMODAudioEngine::swapMusicIndex @ 0x14005bebe
// > FMODAudioEngine::swapMusicIndex @ 0x14005bed7
// > FMODAudioEngine::swapMusicIndex @ 0x14005beef
// > FMODAudioEngine::swapMusicIndex @ 0x14005bf07
// > FMODAudioEngine::swapMusicIndex @ 0x14005bf1a
// > FMODAudioEngine::swapMusicIndex @ 0x14005bf33
// > FMODAudioEngine::swapMusicIndex @ 0x14005bf4b
// > FMODAudioEngine::swapMusicIndex @ 0x14005bf63
// > FMODAudioEngine::swapMusicIndex @ 0x14005bf76
// > FMODAudioEngine::swapMusicIndex @ 0x14005bf8f
// > EditorUI::pasteObjects @ 0x140113976
// > EditorUI::pasteObjects @ 0x140113aab
// > EditorUI::pasteObjects @ 0x140113bc5
// > EditorUI::pasteObjects @ 0x140113c96
// > EditorUI::pasteObjects @ 0x140113d5c
// > EditorUI::pasteObjects @ 0x140113e9d
// > EditorUI::pasteObjects @ 0x140113f39
// > EditorUI::dynamicGroupUpdate @ 0x140118f13
// > sub_140184A80 @ 0x140184b2d
// > GameStatsManager::getStat @ 0x1401d5285
// > GameStatsManager::getStat @ 0x1401d52a1
// > GameStatsManager::setStat @ 0x1401d53e0
// > GameStatsManager::setStat @ 0x1401d5401
// > GJBaseGameLayer::generateEnterEasingBuffer @ 0x14020eb7e
// > GJBaseGameLayer::generateEnterEasingBuffer @ 0x14020ec40
// > GJBaseGameLayer::getSavedPosition @ 0x1402194e9
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x140219f08
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x140219f26
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x140219f40
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x14021a02a
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x14021a1b6
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x14021a1d5
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x14021a1ec
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x14021a31e
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x14021a33a
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x14021a354
// > GJBaseGameLayer::checkSpawnObjects @ 0x14021a99d
// > GJBaseGameLayer::checkSpawnObjects @ 0x14021ab69
// > GJBaseGameLayer::generateSpawnRemap @ 0x14021e123
// > GJBaseGameLayer::activatePersistentItemTrigger @ 0x140234ddb
// > GJBaseGameLayer::activatePersistentItemTrigger @ 0x140234df5
// > GJBaseGameLayer::canProcessSFX @ 0x1402432c7
// > GJBaseGameLayer::canProcessSFX @ 0x14024338a
// > GJBaseGameLayer::canProcessSFX @ 0x1402433cb
// > GJBaseGameLayer::canProcessSFX @ 0x1402433eb
// > GJBaseGameLayer::processActivatedAudioTriggers @ 0x14024425e
// > GJBaseGameLayer::processActivatedAudioTriggers @ 0x1402444b1
// > GJBaseGameLayer::processSongState @ 0x14024580f
// > GJBaseGameLayer::processSongState @ 0x140245a6d
// > GJBaseGameLayer::resetSpawnChannelIndex @ 0x140245e83
// > GJEffectManager::updateCountForItem @ 0x14026250e
// > GJEffectManager::updateCountForItem @ 0x1402625cf
// > GJEffectManager::transferPersistentItems @ 0x140262f27
// > sub_1402E1FD0 @ 0x1402e2143
// > EffectGameObject::triggerObject @ 0x1404a5fcf
// > EffectGameObject::triggerObject @ 0x1404a5ff8
// > SequenceTriggerGameObject::triggerObject @ 0x1404b496b
// > SequenceTriggerGameObject::triggerObject @ 0x1404b4991
// > SequenceTriggerGameObject::triggerObject @ 0x1404b4a1e
// > SequenceTriggerGameObject::triggerObject @ 0x1404b4ad7
// > CountTriggerGameObject::triggerObject @ 0x1404bb2d6
// > ??> @ 0x1406c5970
// > ??> @ 0x1406c597c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=2
__int64 __fastcall sub_140060B20(float *a1, __int64 a2, unsigned __int8 *a3)
{
unsigned __int64 v6; // r13
__int64 v7; // rcx
__int64 v8; // rax
__int64 *v9; // rbx
__int64 *v10; // r15
__int64 *v11; // rbp
__int64 *v12; // rcx
_DWORD *v14; // rdi
__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
_QWORD *v25; // rdx
__int64 v26; // rcx
__int64 v27; // rax
__int64 *v28; // r8
__int64 *v29; // [rsp+20h] [rbp-38h]
v6 = 0x100000001B3LL
* (a3[3]
^ (0x100000001B3LL * (a3[2] ^ (0x100000001B3LL * (a3[1] ^ (0x100000001B3LL * (*a3 ^ 0xCBF29CE484222325uLL)))))));
v7 = 2 * (v6 & *((_QWORD *)a1 + 6));
v8 = *((_QWORD *)a1 + 3);
v9 = *(__int64 **)(v8 + 8 * v7 + 8);
v10 = *((__int64 **)a1 + 1);
if ( v9 == v10 )
{
v9 = *((__int64 **)a1 + 1);
v11 = v9;
goto LABEL_9;
}
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_6;
}
v10 = v9;
v11 = v9;
LABEL_9:
if ( *((_QWORD *)a1 + 2) == 0xAAAAAAAAAAAAAAALL )
std::_Xlength_error("unordered_map/set too long");
v14 = operator new(0x18u);
v14[4] = *(_DWORD *)a3;
v14[5] = 0;
v15 = *((_QWORD *)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 = *((_QWORD *)a1 + 7);
if ( v17 < 0 )
{
v19 = *((_QWORD *)a1 + 7) & 1LL | ((unsigned __int64)v17 >> 1);
v18 = (float)(int)v19 + (float)(int)v19;
}
else
{
v18 = (float)(int)v17;
}
if ( (float)(v16 / v18) <= *a1 )
{
LABEL_25:
v25 = (_QWORD *)v9[1];
++*((_QWORD *)a1 + 2);
*(_QWORD *)v14 = v10;
*((_QWORD *)v14 + 1) = v25;
*v25 = v14;
v9[1] = (__int64)v14;
v26 = *((_QWORD *)a1 + 3);
v27 = 2 * (v6 & *((_QWORD *)a1 + 6));
v28 = *(__int64 **)(v26 + 16 * (v6 & *((_QWORD *)a1 + 6)));
if ( v28 == *((__int64 **)a1 + 1) )
{
*(_QWORD *)(v26 + 16 * (v6 & *((_QWORD *)a1 + 6))) = v14;
LABEL_31:
*(_QWORD *)(v26 + 8 * v27 + 8) = v14;
goto LABEL_32;
}
if ( v28 == v11 )
{
*(_QWORD *)(v26 + 16 * (v6 & *((_QWORD *)a1 + 6))) = v14;
}
else if ( *(_QWORD **)(v26 + 16 * (v6 & *((_QWORD *)a1 + 6)) + 8) == v25 )
{
goto LABEL_31;
}
LABEL_32:
*(_QWORD *)a2 = v14;
*(_BYTE *)(a2 + 8) = 1;
return a2;
}
v20 = sub_14005F0F0((__int64)a1, v15);
sub_14005EF40(a1, v20);
v21 = *((_QWORD *)a1 + 3);
v22 = *(__int64 **)(v21 + 16 * (v6 & *((_QWORD *)a1 + 6)) + 8);
v9 = *((__int64 **)a1 + 1);
if ( v22 != v9 )
{
v23 = *(__int64 **)(v21 + 16 * (v6 & *((_QWORD *)a1 + 6)));
v24 = v14[4];
if ( v24 != *((_DWORD *)v22 + 4) )
{
while ( 1 )
{
v9 = v22;
if ( v22 == v23 )
break;
v22 = (__int64 *)v22[1];
if ( v24 == *((_DWORD *)v22 + 4) )
goto LABEL_22;
}
v29 = v22;
goto LABEL_24;
}
LABEL_22:
v9 = (__int64 *)*v22;
}
v29 = v9;
LABEL_24:
v11 = v9;
v10 = v29;
goto LABEL_25;
}
LABEL_6:
*(_QWORD *)a2 = v9;
*(_BYTE *)(a2 + 8) = 0;
return a2;
}