int __cdecl ikfakov_resolver(int a1)
{
int result;
_DWORD *v2;
int v3;
int *v4;
int v5;
float *v6;
float m_nChokedCommands;
int *v8;
int v9;
int v10;
int v11;
float m_nChokedCommands_1;
double v13;
float v14;
void *v15;
int v16;
int v17;
float v18;
float v19;
double v20;
int v21;
int (__thiscall *v22)(int);
int v23;
int (__thiscall *v24)(int);
int v25;
int v26;
int (__thiscall *v27)(int);
int v28;
float m_nChokedCommands_2;
float v30;
int v31;
double m_flFakeGoalFeetYaw;
int (__thiscall *v33)(int);
int v34;
float m_nChokedCommands_3;
int m_flFakeGoalFeetYaw_1;
_DWORD *GetLowerBodyYaw;
double v38;
int (__thiscall *v39)(int);
int v40;
char v41;
char v42;
char v43;
double v44;
double v45;
double v46;
double flMinBodyYaw;
double v48;
double v49;
float flDuckingSpeed;
float v51;
float Right;
float v53;
float Left;
int v55;
int v56;
float v57;
int v58;
float v59;
float v60;
float v61;
float v62;
int v63;
int v64;
int v65;
int v66;
float m_flGroundFraction;
float v68;
char *flMaxBodyYaw;
char *v70;
float flDuckingSpeed_1;
float flDuckAmount;
char v73;
int v74;
int v75;
int v76;
float m_flGoalFeetYaw;
int Misscount;
float flMaxBodyYaw_1;
float flMinBodyYaw_1;
float speed;
float flRunningSpeed;
float flMaxMovementSpeed;
float v84;
float v85;
float v86;
float v87;
int i;
float flYawModifier;
char *animState;
float flEyeYaw;
void *v92;
int v93[65];
result = (unsigned __int8)sub_2DA9EAC0(0);
if ( (_BYTE)result )
{
for ( i = 1; i < (*(int (__thiscall **)(signed int))(MEMORY[0x5F938178] + 80))(1603502456); ++i )
{
v92 = (void *)sub_2DA26E00(i);
if ( v92 && (unsigned __int8)sub_2DA9E4B0(v92) )
{
if ( v92 )
{
v2 = LBYTarget(v92);
*(_DWORD *)(sub_2DA26E20(v92) + 4) = *v2;
v3 = sub_2DA26E20(v92);
sub_2DA26640(v3);
}
}
}
animState = sub_2DA9E8D0((char *)a1);
v4 = (int *)sub_2DA21C30(a1);
v74 = *v4;
v75 = v4[1];
v76 = v4[2];
v53 = sub_2DA26380(&v74);
v51 = sub_2DA25E80(1134297088, 0x40000000);
if ( v53 > v51 )
{
sub_2DA261D0(&v43);
v5 = sub_2DA264D0(&v41, 1134297088);
sub_2DA263D0(v5);
}
v6 = (float *)sub_2DA270E0((void *)a1);
v85 = clamp(*v6 + *((float *)animState + 138), 0, 1065353216);
v87 = *((float *)animState + 139);
v64 = MEMORY[0x136471B0];
v49 = (double)MEMORY[0x136471B0];
m_nChokedCommands = (double)MEMORY[0x136471B0];
v86 = m_nChokedCommands * 6.0;
if ( (float)(m_nChokedCommands * 6.0) < (float)(v85 - v87) )
{
v84 = v87 + v86;
}
else if ( (float)(v85 - v87) < COERCE_FLOAT(LODWORD(v86) ^ xmmword_2DAAF5F0) )
{
v84 = v87 - v86;
}
else
{
v84 = v85;
}
flDuckAmount = clamp(LODWORD(v84), 0, 1065353216);
v8 = (int *)sub_2DA21C30(a1);
v9 = *v8;
v10 = v8[1];
v11 = v8[2];
v63 = MEMORY[0x136471B0];
v48 = (double)MEMORY[0x136471B0];
m_nChokedCommands_1 = (double)MEMORY[0x136471B0];
GetSmoothedVelocity(&v42, m_nChokedCommands_1 * 2000.0, v74, v75, v76, v9, v10, v11);
v13 = sub_2DA26330(&v42, 1132593152);
v14 = v13;
MEMORY[0x7511F960](LODWORD(v14));
speed = v13;
v15 = sub_2DA21CE0((void *)a1);
sub_2DA27F50(v15);
flMaxMovementSpeed = 260.0;
if ( sub_2DA2B450(&v73) )
{
v16 = sub_2DA2B4A0(&v73);
v17 = sub_2DA9E6E0(v16, 981668463);
MEMORY[0x7511F890](*(_DWORD *)(v17 + 4));
flMaxMovementSpeed = v13;
}
m_flGroundFraction = *((float *)animState + 99116);
flRunningSpeed = speed / (float)(flMaxMovementSpeed * 0.51999998);
flDuckingSpeed = speed / (float)(flMaxMovementSpeed * 0.34);
flRunningSpeed = clamp(speed / (float)(flMaxMovementSpeed * 0.51999998), 0, 1065353216);
flYawModifier = (float)((float)((float)(m_flGroundFraction * -0.30000001) - 0.2) * flRunningSpeed) + 1.0;
if ( flDuckAmount > 0.0 )
{
flDuckingSpeed_1 = clamp(LODWORD(flDuckingSpeed_1), 0, 1065353216);
flYawModifier = (float)((float)(flDuckAmount * flDuckingSpeed_1) * (float)(0.5 - flYawModifier)) + flYawModifier;
}
v70 = animState + 816;
flMinBodyYaw = (double)(unsigned int)(animState + 816);
v18 = flMinBodyYaw;
flMinBodyYaw_1 = sub_2DA216B0(v18 * flYawModifier);
flMaxBodyYaw = animState + 820;
v46 = (double)(unsigned int)(animState + 820);
v19 = v46;
v20 = sub_2DA216B0(v19 * flYawModifier);
flMaxBodyYaw_1 = v20;
flEyeYaw = *(float *)(sub_2DA26E20(a1) + 4);
v21 = (*(int (__thiscall **)(int, signed int))(*(_DWORD *)(a1 + 8) + 40))(a1 + 8, 1135869952);
MEMORY[0x7515C070](flEyeYaw - *(float *)&v93[v21]);
v68 = v20;
if ( flMaxBodyYaw_1 < v68 )
{
v20 = sub_2DA25EF0(LODWORD(flMaxBodyYaw_1));
v60 = v20;
v24 = *(int (__thiscall **)(int))(*(_DWORD *)(a1 + 8) + 40);
v59 = flEyeYaw - v60;
v25 = v24(a1 + 8);
*(float *)&v93[v25] = v59;
}
else if ( flMinBodyYaw_1 > v68 )
{
v20 = sub_2DA25EF0(LODWORD(flMinBodyYaw_1));
v62 = v20;
v22 = *(int (__thiscall **)(int))(*(_DWORD *)(a1 + 8) + 40);
v61 = v62 + flEyeYaw;
v23 = v22(a1 + 8);
*(float *)&v93[v23] = v61;
}
v26 = (*(int (__thiscall **)(int, signed int))(*(_DWORD *)(a1 + 8) + 40))(a1 + 8, 1135869952);
MEMORY[0x7515C070](v93[v26]);
v27 = *(int (__thiscall **)(int))(*(_DWORD *)(a1 + 8) + 40);
*(float *)&v58 = v20;
v28 = v27(a1 + 8);
v93[v28] = v58;
if ( speed <= 0.1 && (v57 = sub_2DA25EF0(v76), v57 <= 100.0) )
{
v65 = MEMORY[0x136471B0];
v45 = (double)MEMORY[0x136471B0];
m_nChokedCommands_3 = (double)MEMORY[0x136471B0];
m_flFakeGoalFeetYaw_1 = v93[(*(int (__thiscall **)(int))(*(_DWORD *)(a1 + 8) + 40))(a1 + 8)];
GetLowerBodyYaw = LBYTarget((void *)a1);
v38 = ApproachAngle(*GetLowerBodyYaw, m_flFakeGoalFeetYaw_1, m_nChokedCommands_3 * 100.0);
v39 = *(int (__thiscall **)(int))(*(_DWORD *)(a1 + 8) + 40);
*(float *)&v55 = v38;
v40 = v39(a1 + 8);
v93[v40] = v55;
}
else
{
v66 = MEMORY[0x136471B0];
v44 = (double)MEMORY[0x136471B0];
m_nChokedCommands_2 = (double)MEMORY[0x136471B0];
v30 = (float)((float)(m_flGroundFraction * 20.0) + 30.0) * m_nChokedCommands_2;
v31 = (*(int (__thiscall **)(int))(*(_DWORD *)(a1 + 8) + 40))(a1 + 8);
m_flFakeGoalFeetYaw = ApproachAngle(LODWORD(flEyeYaw), v93[v31], LODWORD(v30));
v33 = *(int (__thiscall **)(int))(*(_DWORD *)(a1 + 8) + 40);
*(float *)&v56 = m_flFakeGoalFeetYaw;
v34 = v33(a1 + 8);
v93[v34] = v56;
}
Left = flEyeYaw + flMinBodyYaw_1;
Right = flEyeYaw + flMaxBodyYaw_1;
Misscount = Globals::MissedShots[(*(int (__thiscall **)(int))(*(_DWORD *)(a1 + 8) + 40))(a1 + 8)] % 3;
if ( Misscount )
{
if ( Misscount == 1 )
{
m_flGoalFeetYaw = *(float *)&v93[(*(int (__thiscall **)(int))(*(_DWORD *)(a1 + 8) + 40))(a1 + 8)];
}
else if ( Misscount == 2 )
{
m_flGoalFeetYaw = Right;
}
}
else
{
m_flGoalFeetYaw = Left;
}
result = sub_2DA21D90(animState);
*(float *)result = m_flGoalFeetYaw;
}
return result;
}