// File: Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: float ImGui::ScaleRatioFromValueT<unsigned long long, long long, double>(int, unsigned long long, unsigned long long, unsigned long long, bool, float, float)
float ImGui::ScaleRatioFromValueT(ImGuiDataType data_type, TYPE v, TYPE v_min, TYPE v_max, bool is_logarithmic, float logarithmic_zero_epsilon, float zero_deadzone_halfsize)
{
    if (v_min == v_max)
        return 0.0f;
    IM_UNUSED(data_type);

    const TYPE v_clamped = (v_min < v_max) ? ImClamp(v, v_min, v_max) : ImClamp(v, v_max, v_min);
    if (is_logarithmic)
    {
        bool flipped = v_max < v_min;

        if (flipped) // Handle the case where the range is backwards
            ImSwap(v_min, v_max);

        // Fudge min/max to avoid getting close to log(0)
        FLOATTYPE v_min_fudged = (ImAbs((FLOATTYPE)v_min) < logarithmic_zero_epsilon) ? ((v_min < 0.0f) ? -logarithmic_zero_epsilon : logarithmic_zero_epsilon) : (FLOATTYPE)v_min;
        FLOATTYPE v_max_fudged = (ImAbs((FLOATTYPE)v_max) < logarithmic_zero_epsilon) ? ((v_max < 0.0f) ? -logarithmic_zero_epsilon : logarithmic_zero_epsilon) : (FLOATTYPE)v_max;

        // Awkward special cases - we need ranges of the form (-100 .. 0) to convert to (-100 .. -epsilon), not (-100 .. epsilon)
        if ((v_min == 0.0f) && (v_max < 0.0f))
            v_min_fudged = -logarithmic_zero_epsilon;
        else if ((v_max == 0.0f) && (v_min < 0.0f))
            v_max_fudged = -logarithmic_zero_epsilon;

        float result;

        if (v_clamped <= v_min_fudged)
            result = 0.0f; // Workaround for values that are in-range but below our fudge
        else if (v_clamped >= v_max_fudged)
            result = 1.0f; // Workaround for values that are in-range but above our fudge
        else if ((v_min * v_max) < 0.0f) // Range crosses zero, so split into two portions
        {
            float zero_point_center = (-(float)v_min) / ((float)v_max - (float)v_min); // The zero point in parametric space.  There's an argument we should take the logarithmic nature into account when calculating this, but for now this should do (and the most common case of a symmetrical range works fine)
            float zero_point_snap_L = zero_point_center - zero_deadzone_halfsize;
            float zero_point_snap_R = zero_point_center + zero_deadzone_halfsize;
            if (v == 0.0f)
                result = zero_point_center; // Special case for exactly zero
            else if (v < 0.0f)
                result = (1.0f - (float)(ImLog(-(FLOATTYPE)v_clamped / logarithmic_zero_epsilon) / ImLog(-v_min_fudged / logarithmic_zero_epsilon))) * zero_point_snap_L;
            else
                result = zero_point_snap_R + ((float)(ImLog((FLOATTYPE)v_clamped / logarithmic_zero_epsilon) / ImLog(v_max_fudged / logarithmic_zero_epsilon)) * (1.0f - zero_point_snap_R));
        }
        else if ((v_min < 0.0f) || (v_max < 0.0f)) // Entirely negative slider
            result = 1.0f - (float)(ImLog(-(FLOATTYPE)v_clamped / -v_max_fudged) / ImLog(-v_min_fudged / -v_max_fudged));
        else
            result = (float)(ImLog((FLOATTYPE)v_clamped / v_min_fudged) / ImLog(v_max_fudged / v_min_fudged));

        return flipped ? (1.0f - result) : result;
    }

    // Linear slider
    return (float)((FLOATTYPE)(SIGNEDTYPE)(v_clamped - v_min) / (FLOATTYPE)(SIGNEDTYPE)(v_max - v_min));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movb %r8b, %al
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
movss %xmm0, -0x28(%rbp)
movss %xmm1, -0x2c(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x1651d3
xorps %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x165c04
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x1651f4
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x15b650
movq %rax, -0x68(%rbp)
jmp 0x165209
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x15b650
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x38(%rbp)
testb $0x1, -0x21(%rbp)
je 0x165bdd
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
setb %al
andb $0x1, %al
movb %al, -0x39(%rbp)
testb $0x1, -0x39(%rbp)
je 0x16523e
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x15b6a0
movaps 0x28ffb(%rip), %xmm1    # 0x18e240
movq -0x18(%rbp), %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x28ffa(%rip), %xmm1    # 0x18e250
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
callq 0x15b460
movaps %xmm0, %xmm1
movss -0x28(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x1652f5
movq -0x18(%rbp), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x70(%rbp)
testq %rax, %rax
movss %xmm0, -0x6c(%rbp)
js 0x1652b5
movss -0x70(%rbp), %xmm0
movss %xmm0, -0x6c(%rbp)
movss -0x6c(%rbp), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x1652db
movss -0x28(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss %xmm0, -0x74(%rbp)
jmp 0x1652e5
movss -0x28(%rbp), %xmm0
movss %xmm0, -0x74(%rbp)
movss -0x74(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x80(%rbp)
jmp 0x165321
movaps 0x28f44(%rip), %xmm1    # 0x18e240
movq -0x18(%rbp), %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x28f43(%rip), %xmm1    # 0x18e250
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x80(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movaps 0x28f0e(%rip), %xmm1    # 0x18e240
movq -0x20(%rbp), %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x28f0d(%rip), %xmm1    # 0x18e250
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
callq 0x15b460
movaps %xmm0, %xmm1
movss -0x28(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x165401
movq -0x20(%rbp), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x88(%rbp)
testq %rax, %rax
movss %xmm0, -0x84(%rbp)
js 0x1653b2
movss -0x88(%rbp), %xmm0
movss %xmm0, -0x84(%rbp)
movss -0x84(%rbp), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x1653de
movss -0x28(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss %xmm0, -0x8c(%rbp)
jmp 0x1653eb
movss -0x28(%rbp), %xmm0
movss %xmm0, -0x8c(%rbp)
movss -0x8c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x98(%rbp)
jmp 0x165430
movaps 0x28e38(%rip), %xmm1    # 0x18e240
movq -0x20(%rbp), %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x28e37(%rip), %xmm1    # 0x18e250
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd %xmm0, -0x98(%rbp)
movsd -0x98(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0xa0(%rbp)
testq %rax, %rax
movss %xmm0, -0x9c(%rbp)
js 0x165482
movss -0xa0(%rbp), %xmm0
movss %xmm0, -0x9c(%rbp)
movss -0x9c(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x165509
jp 0x165509
movq -0x20(%rbp), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0xa8(%rbp)
testq %rax, %rax
movss %xmm0, -0xa4(%rbp)
js 0x1654d9
movss -0xa8(%rbp), %xmm0
movss %xmm0, -0xa4(%rbp)
movss -0xa4(%rbp), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x165509
movss -0x28(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x48(%rbp)
jmp 0x1655d2
movq -0x20(%rbp), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0xb0(%rbp)
testq %rax, %rax
movss %xmm0, -0xac(%rbp)
js 0x16554e
movss -0xb0(%rbp), %xmm0
movss %xmm0, -0xac(%rbp)
movss -0xac(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x1655d0
jp 0x1655d0
movq -0x18(%rbp), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0xb8(%rbp)
testq %rax, %rax
movss %xmm0, -0xb4(%rbp)
js 0x1655a5
movss -0xb8(%rbp), %xmm0
movss %xmm0, -0xb4(%rbp)
movss -0xb4(%rbp), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x1655d0
movss -0x28(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x50(%rbp)
jmp 0x1655d2
movaps 0x28c67(%rip), %xmm0    # 0x18e240
movq -0x38(%rbp), %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0x28c66(%rip), %xmm0    # 0x18e250
subpd %xmm0, %xmm1
movaps %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm0, %xmm1
movsd -0x48(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x165611
xorps %xmm0, %xmm0
movss %xmm0, -0x54(%rbp)
jmp 0x165ba4
movaps 0x28c28(%rip), %xmm1    # 0x18e240
movq -0x38(%rbp), %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x28c27(%rip), %xmm1    # 0x18e250
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
ucomisd -0x50(%rbp), %xmm0
jb 0x165651
movss 0xb5f5(%rip), %xmm0     # 0x170c3c
movss %xmm0, -0x54(%rbp)
jmp 0x165ba2
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
imulq %rcx, %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0xc0(%rbp)
testq %rax, %rax
movss %xmm0, -0xbc(%rbp)
js 0x16569e
movss -0xc0(%rbp), %xmm0
movss %xmm0, -0xbc(%rbp)
movss -0xbc(%rbp), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x1659be
movq -0x18(%rbp), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0xc8(%rbp)
testq %rax, %rax
movss %xmm0, -0xc4(%rbp)
js 0x1656f7
movss -0xc8(%rbp), %xmm0
movss %xmm0, -0xc4(%rbp)
movss -0xc4(%rbp), %xmm0
movss %xmm0, -0xd8(%rbp)
movaps 0xc8e2(%rip), %xmm1     # 0x171ff0
pxor %xmm1, %xmm0
movss %xmm0, -0xd4(%rbp)
movq -0x20(%rbp), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0xd0(%rbp)
testq %rax, %rax
movss %xmm0, -0xcc(%rbp)
js 0x16575f
movss -0xd0(%rbp), %xmm0
movss %xmm0, -0xcc(%rbp)
movss -0xd4(%rbp), %xmm0
movss -0xd8(%rbp), %xmm2
movss -0xcc(%rbp), %xmm1
subss %xmm2, %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x58(%rbp)
movss -0x58(%rbp), %xmm0
movss -0x2c(%rbp), %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0x5c(%rbp)
movss -0x58(%rbp), %xmm0
movss -0x2c(%rbp), %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0xe0(%rbp)
testq %rax, %rax
movss %xmm0, -0xdc(%rbp)
js 0x1657ef
movss -0xe0(%rbp), %xmm0
movss %xmm0, -0xdc(%rbp)
movss -0xdc(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x165810
jp 0x165810
movss -0x58(%rbp), %xmm0
movss %xmm0, -0x54(%rbp)
jmp 0x1659b9
movq -0x10(%rbp), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0xe8(%rbp)
testq %rax, %rax
movss %xmm0, -0xe4(%rbp)
js 0x165855
movss -0xe8(%rbp), %xmm0
movss %xmm0, -0xe4(%rbp)
movss -0xe4(%rbp), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x16591d
movaps 0x289d0(%rip), %xmm1    # 0x18e240
movq -0x38(%rbp), %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x289cf(%rip), %xmm1    # 0x18e250
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movss -0x28(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
divsd %xmm1, %xmm0
callq 0x15b480
movsd %xmm0, -0xf0(%rbp)
movsd -0x48(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movss -0x28(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
divsd %xmm1, %xmm0
callq 0x15b480
movaps %xmm0, %xmm1
movsd -0xf0(%rbp), %xmm0
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm1
movss 0xb332(%rip), %xmm0     # 0x170c3c
subss %xmm1, %xmm0
mulss -0x5c(%rbp), %xmm0
movss %xmm0, -0x54(%rbp)
jmp 0x1659b7
movss -0x60(%rbp), %xmm0
movss %xmm0, -0xfc(%rbp)
movaps 0x2890f(%rip), %xmm1    # 0x18e240
movq -0x38(%rbp), %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x2890e(%rip), %xmm1    # 0x18e250
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movss -0x28(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
divsd %xmm1, %xmm0
callq 0x15b480
movsd %xmm0, -0xf8(%rbp)
movsd -0x50(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
divsd %xmm1, %xmm0
callq 0x15b480
movss -0xfc(%rbp), %xmm1
movaps %xmm0, %xmm2
movsd -0xf8(%rbp), %xmm0
divsd %xmm2, %xmm0
cvtsd2ss %xmm0, %xmm0
movss 0xb297(%rip), %xmm2     # 0x170c3c
subss -0x60(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x54(%rbp)
jmp 0x1659b9
jmp 0x165ba0
movq -0x18(%rbp), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x104(%rbp)
testq %rax, %rax
movss %xmm0, -0x100(%rbp)
js 0x165a03
movss -0x104(%rbp), %xmm0
movss %xmm0, -0x100(%rbp)
movss -0x100(%rbp), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
ja 0x165a6c
movq -0x20(%rbp), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x10c(%rbp)
testq %rax, %rax
movss %xmm0, -0x108(%rbp)
js 0x165a58
movss -0x10c(%rbp), %xmm0
movss %xmm0, -0x108(%rbp)
movss -0x108(%rbp), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x165b3e
movaps 0x287cd(%rip), %xmm1    # 0x18e240
movq -0x38(%rbp), %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x287cc(%rip), %xmm1    # 0x18e250
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd -0x50(%rbp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
divsd %xmm1, %xmm0
callq 0x15b480
movsd %xmm0, -0x118(%rbp)
movsd -0x48(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd -0x50(%rbp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
divsd %xmm1, %xmm0
callq 0x15b480
movaps %xmm0, %xmm1
movsd -0x118(%rbp), %xmm0
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm1
movss 0xb109(%rip), %xmm0     # 0x170c3c
subss %xmm1, %xmm0
movss %xmm0, -0x54(%rbp)
jmp 0x165b9e
movaps 0x286fb(%rip), %xmm1    # 0x18e240
movq -0x38(%rbp), %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x286fa(%rip), %xmm1    # 0x18e250
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
divsd -0x48(%rbp), %xmm0
callq 0x15b480
movsd %xmm0, -0x120(%rbp)
movsd -0x50(%rbp), %xmm0
divsd -0x48(%rbp), %xmm0
callq 0x15b480
movaps %xmm0, %xmm1
movsd -0x120(%rbp), %xmm0
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x54(%rbp)
jmp 0x165ba0
jmp 0x165ba2
jmp 0x165ba4
testb $0x1, -0x39(%rbp)
je 0x165bc1
movss 0xb08a(%rip), %xmm0     # 0x170c3c
subss -0x54(%rbp), %xmm0
movss %xmm0, -0x124(%rbp)
jmp 0x165bce
movss -0x54(%rbp), %xmm0
movss %xmm0, -0x124(%rbp)
movss -0x124(%rbp), %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x165c04
movq -0x38(%rbp), %rax
subq -0x18(%rbp), %rax
cvtsi2sd %rax, %xmm0
movq -0x20(%rbp), %rax
subq -0x18(%rbp), %rax
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
movss -0x4(%rbp), %xmm0
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)