//
// GJKeybindManager::clearMovementOverride from 0xc0bafc to 0xc0bd24 (552 bytes)
//
// 5 xrefs:
// > UILayer::~UILayer @ 0x6ee24c
// > UILayer::applyLevelBindings @ 0x6ee8e0
// > GJKeybindManager::firstSetup @ 0xc0bd34
// > GJKeybindManager::applyMovementOverride @ 0xc0d55c
// > ??> @ 0x5d598
//
// 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:03:54 +0000
//
__int64 __fastcall GJKeybindManager::clearMovementOverride(GJKeybindManager *this)
{
char *v2; // x23
char *i; // x24
char *j; // x19
int *v5; // x22
int *v6; // x21
int *v7; // x19
__int64 *v8; // x0
__int64 *v9; // x19
__int64 *v10; // x21
__int64 *v11; // x0
__int64 *v13; // x1
__int64 *v14; // x1
int v15; // [xsp+6Ch] [xbp+6Ch] BYREF
void *v16; // [xsp+70h] [xbp+70h] BYREF
int *v17; // [xsp+78h] [xbp+78h]
if ( *((_BYTE *)this + 184) )
{
v2 = *((char **)this + 20);
for ( i = (char *)this + 168; i != v2; v2 = (char *)std::__tree_next *>(v2) )
{
for ( j = *((char **)v2 + 5); v2 + 48 != j; j = (char *)std::__tree_next *>(j) )
GJKeybindManager::bindChord(this, *((_DWORD *)v2 + 8), *((_DWORD *)j + 7));
}
v5 = (int *)&unk_119B410;
std::__tree>,std::__map_value_compare>,std::less,true>,std::allocator>>>::clear((_QWORD *)this + 20);
do
{
v15 = *v5;
GJKeybindManager::chordsForAction(this, v15, &v16);
v6 = v17;
v7 = (int *)v16;
if ( v16 != v17 )
{
do
GJKeybindManager::unbindChord(this, *v7++, v15);
while ( v6 != v7 );
}
v8 = std::__tree>,std::__map_value_compare>,std::less,true>,std::allocator>>>::find(
(__int64)this + 136,
&v15);
if ( v8 != (__int64 *)((char *)this + 144) )
{
v9 = (__int64 *)v8[5];
v10 = v8 + 6;
while ( v10 != v9 )
{
while ( 1 )
{
GJKeybindManager::bindChord(this, *((_DWORD *)v9 + 7), v15);
v11 = (__int64 *)v9[1];
if ( !v11 )
break;
do
{
v9 = v11;
v11 = (__int64 *)*v11;
}
while ( v11 );
if ( v10 == v9 )
goto LABEL_15;
}
do
{
v13 = v9;
v9 = (__int64 *)v9[2];
if ( v13 == (__int64 *)*v9 )
break;
v14 = v9;
v9 = (__int64 *)v9[2];
}
while ( v14 != (__int64 *)*v9 );
}
}
LABEL_15:
if ( v16 )
{
if ( v16 != v17 )
v17 += ~((unsigned __int64)((char *)(v17 - 1) - (_BYTE *)v16) >> 2);
operator delete(v16);
}
++v5;
}
while ( v5 != (int *)&unk_119B428 );
std::__tree>,std::__map_value_compare>,std::less,true>,std::allocator>>>::clear((_QWORD *)this + 17);
*((_BYTE *)this + 184) = 0;
}
return _stack_chk_guard;
}