//
// LevelControlConfig::bindGlobalBinds from 0xcf2418 to 0xcf2574 (348 bytes)
//
// 5 xrefs:
// > LevelBindingsLayer::init @ 0xcf0ddc
// > LevelBindingsLayer::onApplyGlobal @ 0xcf1900
// > LevelControlConfig::createFromGlobal @ 0xcf4280
// > LevelControlConfig::createFromGlobal @ 0xcf428c
// > ??> @ 0x86878
//
// 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 13:06:46 +0000
//
__int64 __fastcall LevelControlConfig::bindGlobalBinds(LevelControlConfig *this, KeybindSource *a2)
{
int v3; // w22
unsigned int *v4; // x25
__int64 *isControllerChord; // x0
unsigned int v6; // w24
GJKeybindManager *v7; // x0
unsigned int *v8; // x19
unsigned int *v9; // x21
unsigned int v10; // w20
void *v12; // [xsp+60h] [xbp+60h] BYREF
void *v13; // [xsp+68h] [xbp+68h]
v3 = (unsigned __int8)a2;
v4 = (unsigned int *)&unk_11A5100;
isControllerChord = (__int64 *)_stack_chk_guard;
do
{
v6 = *v4;
v7 = (GJKeybindManager *)GJKeybindManager::sharedState((GJKeybindManager *)isControllerChord);
isControllerChord = GJKeybindManager::globalChordsForAction(v7, v6, (__int64 *)&v12);
v8 = (unsigned int *)v12;
v9 = (unsigned int *)v13;
if ( v12 != v13 )
{
do
{
while ( 1 )
{
v10 = *v8;
isControllerChord = (__int64 *)GJKeybindManager::isControllerChord((GJKeybindManager *)*v8);
if ( v3 == (unsigned __int8)isControllerChord )
break;
if ( v9 == ++v8 )
goto LABEL_7;
}
isControllerChord = (__int64 *)(*(__int64 (__fastcall **)(LevelControlConfig *, _QWORD, _QWORD))(*(_QWORD *)this + 32LL))(
this,
v10,
v6);
++v8;
}
while ( v9 != v8 );
LABEL_7:
v9 = (unsigned int *)v12;
}
if ( v9 )
{
if ( v9 != v13 )
v13 = (char *)v13 + 4 * ~((unsigned __int64)((char *)v13 - 4 - (char *)v9) >> 2);
operator delete(v9);
}
++v4;
}
while ( v4 != (unsigned int *)&unk_11A5118 );
return _stack_chk_guard;
}