// File: Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::GetNavInputAmount(int, ImGuiInputReadMode)
float ImGui::GetNavInputAmount(ImGuiNavInput n, ImGuiInputReadMode mode)
{
    ImGuiContext& g = *GImGui;
    if (mode == ImGuiInputReadMode_Down)
        return g.IO.NavInputs[n];                         // Instant, read analog input (0.0f..1.0f, as provided by user)

    const float t = g.IO.NavInputsDownDuration[n];
    if (t < 0.0f && mode == ImGuiInputReadMode_Released)  // Return 1.0f when just released, no repeat, ignore analog input.
        return (g.IO.NavInputsDownDurationPrev[n] >= 0.0f ? 1.0f : 0.0f);
    if (t < 0.0f)
        return 0.0f;
    if (mode == ImGuiInputReadMode_Pressed)               // Return 1.0f when just pressed, no repeat, ignore analog input.
        return (t == 0.0f) ? 1.0f : 0.0f;
    if (mode == ImGuiInputReadMode_Repeat)
        return (float)CalcTypematicRepeatAmount(t - g.IO.DeltaTime, t, g.IO.KeyRepeatDelay * 0.72f, g.IO.KeyRepeatRate * 0.80f);
    if (mode == ImGuiInputReadMode_RepeatSlow)
        return (float)CalcTypematicRepeatAmount(t - g.IO.DeltaTime, t, g.IO.KeyRepeatDelay * 1.25f, g.IO.KeyRepeatRate * 2.00f);
    if (mode == ImGuiInputReadMode_RepeatFast)
        return (float)CalcTypematicRepeatAmount(t - g.IO.DeltaTime, t, g.IO.KeyRepeatDelay * 0.72f, g.IO.KeyRepeatRate * 0.30f);
    return 0.0f;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq 0x1337ab(%rip), %rax    # 0x212f40
movq %rax, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0xdf7ba
movq -0x18(%rbp), %rax
movslq -0x8(%rbp), %rcx
movss 0x344(%rax,%rcx,4), %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0xdf95e
movq -0x18(%rbp), %rax
movslq -0x8(%rbp), %rcx
movss 0x14a0(%rax,%rcx,4), %xmm0
movss %xmm0, -0x1c(%rbp)
xorps %xmm0, %xmm0
ucomiss -0x1c(%rbp), %xmm0
jbe 0xdf819
cmpl $0x2, -0xc(%rbp)
jne 0xdf819
movq -0x18(%rbp), %rax
movslq -0x8(%rbp), %rcx
movss 0x14f4(%rax,%rcx,4), %xmm1
movss 0x91444(%rip), %xmm3    # 0x170c3c
xorps %xmm2, %xmm2
movaps %xmm2, %xmm0
cmpless %xmm1, %xmm0
movaps %xmm0, %xmm1
andps %xmm3, %xmm1
andnps %xmm2, %xmm0
orps %xmm1, %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0xdf95e
xorps %xmm0, %xmm0
ucomiss -0x1c(%rbp), %xmm0
jbe 0xdf82f
xorps %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0xdf95e
cmpl $0x1, -0xc(%rbp)
jne 0xdf860
movss -0x1c(%rbp), %xmm0
movss 0x913fa(%rip), %xmm3    # 0x170c3c
xorps %xmm2, %xmm2
cmpeqss %xmm2, %xmm0
movaps %xmm0, %xmm1
andps %xmm3, %xmm1
andnps %xmm2, %xmm0
orps %xmm1, %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0xdf95e
cmpl $0x3, -0xc(%rbp)
jne 0xdf8b4
movss -0x1c(%rbp), %xmm0
movq -0x18(%rbp), %rax
subss 0x18(%rax), %xmm0
movss -0x1c(%rbp), %xmm1
movq -0x18(%rbp), %rax
movss 0x92f3f(%rip), %xmm2    # 0x1727c4
mulss 0x94(%rax), %xmm2
movq -0x18(%rbp), %rax
movss 0x92f2f(%rip), %xmm3    # 0x1727c8
mulss 0x98(%rax), %xmm3
callq 0xd49f0
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0xdf95e
cmpl $0x4, -0xc(%rbp)
jne 0xdf905
movss -0x1c(%rbp), %xmm0
movq -0x18(%rbp), %rax
subss 0x18(%rax), %xmm0
movss -0x1c(%rbp), %xmm1
movq -0x18(%rbp), %rax
movss 0x92e53(%rip), %xmm2    # 0x17272c
mulss 0x94(%rax), %xmm2
movq -0x18(%rbp), %rax
movss 0x926df(%rip), %xmm3    # 0x171fcc
mulss 0x98(%rax), %xmm3
callq 0xd49f0
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0xdf95e
cmpl $0x5, -0xc(%rbp)
jne 0xdf956
movss -0x1c(%rbp), %xmm0
movq -0x18(%rbp), %rax
subss 0x18(%rax), %xmm0
movss -0x1c(%rbp), %xmm1
movq -0x18(%rbp), %rax
movss 0x92e9a(%rip), %xmm2    # 0x1727c4
mulss 0x94(%rax), %xmm2
movq -0x18(%rbp), %rax
movss 0x92e0e(%rip), %xmm3    # 0x17274c
mulss 0x98(%rax), %xmm3
callq 0xd49f0
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0xdf95e
xorps %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
movss -0x4(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)