//
// sub_10061A1D0 from 0x10061a1d0 to 0x10061a30c (316 bytes)
//
// 1 xrefs:
// > GJKeybindManager::applyMovementOverride @ 0x100615c25
//
// 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 12:34:38 +0000
//
void __fastcall sub_10061A1D0(_QWORD *a1, int *a2, int *a3)
{
int *v3; // r14
__int64 **v4; // r15
__int64 *v5; // rax
__int64 *v6; // r12
__int64 *v7; // rcx
__int64 *v8; // rsi
bool v9; // zf
int v10; // ecx
__int64 *v11; // rbx
__int64 *v12; // r15
_DWORD *v13; // rax
__int64 v14; // rcx
int v15; // eax
int *v16; // [rsp-40h] [rbp-40h]
if ( a2 != a3 )
{
v3 = a2;
v4 = (__int64 **)a1;
v16 = a3;
do
{
v5 = v4[1];
v6 = a1 + 1;
if ( *v4 == a1 + 1 )
goto LABEL_11;
v7 = v4[1];
v8 = a1 + 1;
if ( v5 )
{
do
{
v6 = v7;
v7 = (__int64 *)v7[1];
}
while ( v7 );
}
else
{
do
{
v6 = (__int64 *)v8[2];
v9 = *v6 == (_QWORD)v8;
v8 = v6;
}
while ( v9 );
}
v10 = *v3;
if ( *((_DWORD *)v6 + 7) < *v3 )
{
LABEL_11:
v11 = v6 + 1;
if ( !v5 )
{
v6 = a1 + 1;
v11 = a1 + 1;
}
if ( *v11 )
goto LABEL_4;
}
else
{
v11 = a1 + 1;
v6 = a1 + 1;
LABEL_18:
if ( v5 )
{
do
{
v6 = v5;
v15 = *((_DWORD *)v5 + 7);
if ( v10 < v15 )
{
v5 = (__int64 *)*v6;
v11 = v6;
goto LABEL_18;
}
if ( v10 <= v15 )
goto LABEL_4;
v5 = (__int64 *)v6[1];
}
while ( v5 );
v11 = v6 + 1;
}
}
v12 = *v4;
v13 = operator new(0x20u);
v13[7] = *v3;
*(_OWORD *)v13 = 0;
*((_QWORD *)v13 + 2) = v6;
*v11 = (__int64)v13;
v14 = *v12;
v4 = (__int64 **)a1;
if ( v14 )
*a1 = v14;
sub_10001B680((__int64 *)a1[1], (__int64 *)v13);
++a1[2];
a3 = v16;
LABEL_4:
++v3;
}
while ( v3 != a3 );
}
}