// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::ColorEdit4(char const*, float*, int)
bool ImGui::ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags)
{
    ImGuiWindow* window = GetCurrentWindow();
    if (window->SkipItems)
        return false;

    ImGuiContext& g = *GImGui;
    const ImGuiStyle& style = g.Style;
    const float square_sz = GetFrameHeight();
    const float w_full = CalcItemWidth();
    const float w_button = (flags & ImGuiColorEditFlags_NoSmallPreview) ? 0.0f : (square_sz + style.ItemInnerSpacing.x);
    const float w_inputs = w_full - w_button;
    const char* label_display_end = FindRenderedTextEnd(label);
    g.NextItemData.ClearFlags();

    BeginGroup();
    PushID(label);

    // If we're not showing any slider there's no point in doing any HSV conversions
    const ImGuiColorEditFlags flags_untouched = flags;
    if (flags & ImGuiColorEditFlags_NoInputs)
        flags = (flags & (~ImGuiColorEditFlags__DisplayMask)) | ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_NoOptions;

    // Context menu: display and modify options (before defaults are applied)
    if (!(flags & ImGuiColorEditFlags_NoOptions))
        ColorEditOptionsPopup(col, flags);

    // Read stored options
    if (!(flags & ImGuiColorEditFlags__DisplayMask))
        flags |= (g.ColorEditOptions & ImGuiColorEditFlags__DisplayMask);
    if (!(flags & ImGuiColorEditFlags__DataTypeMask))
        flags |= (g.ColorEditOptions & ImGuiColorEditFlags__DataTypeMask);
    if (!(flags & ImGuiColorEditFlags__PickerMask))
        flags |= (g.ColorEditOptions & ImGuiColorEditFlags__PickerMask);
    if (!(flags & ImGuiColorEditFlags__InputMask))
        flags |= (g.ColorEditOptions & ImGuiColorEditFlags__InputMask);
    flags |= (g.ColorEditOptions & ~(ImGuiColorEditFlags__DisplayMask | ImGuiColorEditFlags__DataTypeMask | ImGuiColorEditFlags__PickerMask | ImGuiColorEditFlags__InputMask));
    IM_ASSERT(ImIsPowerOfTwo(flags & ImGuiColorEditFlags__DisplayMask)); // Check that only 1 is selected
    IM_ASSERT(ImIsPowerOfTwo(flags & ImGuiColorEditFlags__InputMask));   // Check that only 1 is selected

    const bool alpha = (flags & ImGuiColorEditFlags_NoAlpha) == 0;
    const bool hdr = (flags & ImGuiColorEditFlags_HDR) != 0;
    const int components = alpha ? 4 : 3;

    // Convert to the formats we need
    float f[4] = { col[0], col[1], col[2], alpha ? col[3] : 1.0f };
    if ((flags & ImGuiColorEditFlags_InputHSV) && (flags & ImGuiColorEditFlags_DisplayRGB))
        ColorConvertHSVtoRGB(f[0], f[1], f[2], f[0], f[1], f[2]);
    else if ((flags & ImGuiColorEditFlags_InputRGB) && (flags & ImGuiColorEditFlags_DisplayHSV))
    {
        // Hue is lost when converting from greyscale rgb (saturation=0). Restore it.
        ColorConvertRGBtoHSV(f[0], f[1], f[2], f[0], f[1], f[2]);
        if (memcmp(g.ColorEditLastColor, col, sizeof(float) * 3) == 0)
        {
            if (f[1] == 0)
                f[0] = g.ColorEditLastHue;
            if (f[2] == 0)
                f[1] = g.ColorEditLastSat;
        }
    }
    int i[4] = { IM_F32_TO_INT8_UNBOUND(f[0]), IM_F32_TO_INT8_UNBOUND(f[1]), IM_F32_TO_INT8_UNBOUND(f[2]), IM_F32_TO_INT8_UNBOUND(f[3]) };

    bool value_changed = false;
    bool value_changed_as_float = false;

    const ImVec2 pos = window->DC.CursorPos;
    const float inputs_offset_x = (style.ColorButtonPosition == ImGuiDir_Left) ? w_button : 0.0f;
    window->DC.CursorPos.x = pos.x + inputs_offset_x;

    if ((flags & (ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_DisplayHSV)) != 0 && (flags & ImGuiColorEditFlags_NoInputs) == 0)
    {
        // RGB/HSV 0..255 Sliders
        const float w_item_one  = ImMax(1.0f, IM_FLOOR((w_inputs - (style.ItemInnerSpacing.x) * (components - 1)) / (float)components));
        const float w_item_last = ImMax(1.0f, IM_FLOOR(w_inputs - (w_item_one + style.ItemInnerSpacing.x) * (components - 1)));

        const bool hide_prefix = (w_item_one <= CalcTextSize((flags & ImGuiColorEditFlags_Float) ? "M:0.000" : "M:000").x);
        static const char* ids[4] = { "##X", "##Y", "##Z", "##W" };
        static const char* fmt_table_int[3][4] =
        {
            {   "%3d",   "%3d",   "%3d",   "%3d" }, // Short display
            { "R:%3d", "G:%3d", "B:%3d", "A:%3d" }, // Long display for RGBA
            { "H:%3d", "S:%3d", "V:%3d", "A:%3d" }  // Long display for HSVA
        };
        static const char* fmt_table_float[3][4] =
        {
            {   "%0.3f",   "%0.3f",   "%0.3f",   "%0.3f" }, // Short display
            { "R:%0.3f", "G:%0.3f", "B:%0.3f", "A:%0.3f" }, // Long display for RGBA
            { "H:%0.3f", "S:%0.3f", "V:%0.3f", "A:%0.3f" }  // Long display for HSVA
        };
        const int fmt_idx = hide_prefix ? 0 : (flags & ImGuiColorEditFlags_DisplayHSV) ? 2 : 1;

        for (int n = 0; n < components; n++)
        {
            if (n > 0)
                SameLine(0, style.ItemInnerSpacing.x);
            SetNextItemWidth((n + 1 < components) ? w_item_one : w_item_last);

            // FIXME: When ImGuiColorEditFlags_HDR flag is passed HS values snap in weird ways when SV values go below 0.
            if (flags & ImGuiColorEditFlags_Float)
            {
                value_changed |= DragFloat(ids[n], &f[n], 1.0f / 255.0f, 0.0f, hdr ? 0.0f : 1.0f, fmt_table_float[fmt_idx][n]);
                value_changed_as_float |= value_changed;
            }
            else
            {
                value_changed |= DragInt(ids[n], &i[n], 1.0f, 0, hdr ? 0 : 255, fmt_table_int[fmt_idx][n]);
            }
            if (!(flags & ImGuiColorEditFlags_NoOptions))
                OpenPopupOnItemClick("context");
        }
    }
    else if ((flags & ImGuiColorEditFlags_DisplayHex) != 0 && (flags & ImGuiColorEditFlags_NoInputs) == 0)
    {
        // RGB Hexadecimal Input
        char buf[64];
        if (alpha)
            ImFormatString(buf, IM_ARRAYSIZE(buf), "#%02X%02X%02X%02X", ImClamp(i[0], 0, 255), ImClamp(i[1], 0, 255), ImClamp(i[2], 0, 255), ImClamp(i[3], 0, 255));
        else
            ImFormatString(buf, IM_ARRAYSIZE(buf), "#%02X%02X%02X", ImClamp(i[0], 0, 255), ImClamp(i[1], 0, 255), ImClamp(i[2], 0, 255));
        SetNextItemWidth(w_inputs);
        if (InputText("##Text", buf, IM_ARRAYSIZE(buf), ImGuiInputTextFlags_CharsHexadecimal | ImGuiInputTextFlags_CharsUppercase))
        {
            value_changed = true;
            char* p = buf;
            while (*p == '#' || ImCharIsBlankA(*p))
                p++;
            i[0] = i[1] = i[2] = i[3] = 0;
            if (alpha)
                sscanf(p, "%02X%02X%02X%02X", (unsigned int*)&i[0], (unsigned int*)&i[1], (unsigned int*)&i[2], (unsigned int*)&i[3]); // Treat at unsigned (%X is unsigned)
            else
                sscanf(p, "%02X%02X%02X", (unsigned int*)&i[0], (unsigned int*)&i[1], (unsigned int*)&i[2]);
        }
        if (!(flags & ImGuiColorEditFlags_NoOptions))
            OpenPopupOnItemClick("context");
    }

    ImGuiWindow* picker_active_window = NULL;
    if (!(flags & ImGuiColorEditFlags_NoSmallPreview))
    {
        const float button_offset_x = ((flags & ImGuiColorEditFlags_NoInputs) || (style.ColorButtonPosition == ImGuiDir_Left)) ? 0.0f : w_inputs + style.ItemInnerSpacing.x;
        window->DC.CursorPos = ImVec2(pos.x + button_offset_x, pos.y);

        const ImVec4 col_v4(col[0], col[1], col[2], alpha ? col[3] : 1.0f);
        if (ColorButton("##ColorButton", col_v4, flags))
        {
            if (!(flags & ImGuiColorEditFlags_NoPicker))
            {
                // Store current color and open a picker
                g.ColorPickerRef = col_v4;
                OpenPopup("picker");
                SetNextWindowPos(window->DC.LastItemRect.GetBL() + ImVec2(-1, style.ItemSpacing.y));
            }
        }
        if (!(flags & ImGuiColorEditFlags_NoOptions))
            OpenPopupOnItemClick("context");

        if (BeginPopup("picker"))
        {
            picker_active_window = g.CurrentWindow;
            if (label != label_display_end)
            {
                TextEx(label, label_display_end);
                Spacing();
            }
            ImGuiColorEditFlags picker_flags_to_forward = ImGuiColorEditFlags__DataTypeMask | ImGuiColorEditFlags__PickerMask | ImGuiColorEditFlags__InputMask | ImGuiColorEditFlags_HDR | ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_AlphaBar;
            ImGuiColorEditFlags picker_flags = (flags_untouched & picker_flags_to_forward) | ImGuiColorEditFlags__DisplayMask | ImGuiColorEditFlags_NoLabel | ImGuiColorEditFlags_AlphaPreviewHalf;
            SetNextItemWidth(square_sz * 12.0f); // Use 256 + bar sizes?
            value_changed |= ColorPicker4("##picker", col, picker_flags, &g.ColorPickerRef.x);
            EndPopup();
        }
    }

    if (label != label_display_end && !(flags & ImGuiColorEditFlags_NoLabel))
    {
        const float text_offset_x = (flags & ImGuiColorEditFlags_NoInputs) ? w_button : w_full + style.ItemInnerSpacing.x;
        window->DC.CursorPos = ImVec2(pos.x + text_offset_x, pos.y + style.FramePadding.y);
        TextEx(label, label_display_end);
    }

    // Convert back
    if (value_changed && picker_active_window == NULL)
    {
        if (!value_changed_as_float)
            for (int n = 0; n < 4; n++)
                f[n] = i[n] / 255.0f;
        if ((flags & ImGuiColorEditFlags_DisplayHSV) && (flags & ImGuiColorEditFlags_InputRGB))
        {
            g.ColorEditLastHue = f[0];
            g.ColorEditLastSat = f[1];
            ColorConvertHSVtoRGB(f[0], f[1], f[2], f[0], f[1], f[2]);
            memcpy(g.ColorEditLastColor, f, sizeof(float) * 3);
        }
        if ((flags & ImGuiColorEditFlags_DisplayRGB) && (flags & ImGuiColorEditFlags_InputHSV))
            ColorConvertRGBtoHSV(f[0], f[1], f[2], f[0], f[1], f[2]);

        col[0] = f[0];
        col[1] = f[1];
        col[2] = f[2];
        if (alpha)
            col[3] = f[3];
    }

    PopID();
    EndGroup();

    // Drag and Drop Target
    // NB: The flag test is merely an optional micro-optimization, BeginDragDropTarget() does the same test.
    if ((window->DC.LastItemStatusFlags & ImGuiItemStatusFlags_HoveredRect) && !(flags & ImGuiColorEditFlags_NoDragDrop) && BeginDragDropTarget())
    {
        bool accepted_drag_drop = false;
        if (const ImGuiPayload* payload = AcceptDragDropPayload(IMGUI_PAYLOAD_TYPE_COLOR_3F))
        {
            memcpy((float*)col, payload->Data, sizeof(float) * 3); // Preserve alpha if any //-V512
            value_changed = accepted_drag_drop = true;
        }
        if (const ImGuiPayload* payload = AcceptDragDropPayload(IMGUI_PAYLOAD_TYPE_COLOR_4F))
        {
            memcpy((float*)col, payload->Data, sizeof(float) * components);
            value_changed = accepted_drag_drop = true;
        }

        // Drag-drop payloads are always RGB
        if (accepted_drag_drop && (flags & ImGuiColorEditFlags_InputHSV))
            ColorConvertRGBtoHSV(col[0], col[1], col[2], col[0], col[1], col[2]);
        EndDragDropTarget();
    }

    // When picker is being actively used, use its active id so IsItemActive() will function on ColorEdit4().
    if (picker_active_window && g.ActiveId != 0 && g.ActiveIdWindow == picker_active_window)
        window->DC.LastItemId = g.ActiveId;

    if (value_changed)
        MarkItemEdited(window->DC.LastItemId);

    return value_changed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rsi, -0x58(%rbp)
leaq 0x5f039(%rip), %rax     # 0xfbcd0
movq (%rax), %r12
movq 0x1ae0(%r12), %rax
movb $0x1, 0x90(%rax)
movq %rax, -0x68(%rbp)
cmpb $0x0, 0x93(%rax)
je 0x9ccbe
xorl %r14d, %r14d
jmp 0x9d8dc
movl %edx, %r14d
movq %rdi, %r15
callq 0x562ff
movss %xmm0, -0xa0(%rbp)
callq 0x5614d
movss %xmm0, -0xa8(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x5c(%rbp)
testb $0x10, %r14b
jne 0x9cd03
movss 0x15b0(%r12), %xmm0
addss -0xa0(%rbp), %xmm0
movss %xmm0, -0x5c(%rbp)
movq %r15, %rdi
xorl %esi, %esi
callq 0x4443d
movq %rax, -0xb8(%rbp)
movl $0x0, 0x1bf8(%r12)
callq 0x56428
movq %r15, %rdi
callq 0x54b5f
movl %r14d, %esi
andl $0xff8ffff7, %esi       # imm = 0xFF8FFFF7
orl $0x100008, %esi         # imm = 0x100008
testb $0x20, %r14b
cmovel %r14d, %esi
testb $0x8, %sil
jne 0x9cd59
movq -0x58(%rbp), %rdi
movl %esi, %r13d
callq 0x9d933
movl %r13d, %esi
testl $0x700000, %esi         # imm = 0x700000
jne 0x9cd70
movl $0x700000, %eax         # imm = 0x700000
andl 0x306c(%r12), %eax
orl %eax, %esi
testl $0x1800000, %esi        # imm = 0x1800000
jne 0x9cd87
movl $0x1800000, %eax        # imm = 0x1800000
andl 0x306c(%r12), %eax
orl %eax, %esi
testl $0x6000000, %esi        # imm = 0x6000000
jne 0x9cd9e
movl $0x6000000, %eax        # imm = 0x6000000
andl 0x306c(%r12), %eax
orl %eax, %esi
movl 0x306c(%r12), %edi
movl %edi, %eax
andl $0x18000000, %eax       # imm = 0x18000000
xorl %edx, %edx
testl $0x18000000, %esi       # imm = 0x18000000
cmovel %eax, %edx
movl %esi, %eax
andl $0x700000, %eax         # imm = 0x700000
leal -0x1(%rax), %ecx
xorl %ecx, %eax
cmpl %ecx, %eax
jbe 0x9d8f5
movl %r14d, -0xcc(%rbp)
movl %esi, -0x80(%rbp)
orl %esi, %edx
movl %edx, %eax
andl $0x18000000, %eax       # imm = 0x18000000
leal -0x1(%rax), %ecx
xorl %ecx, %eax
cmpl %ecx, %eax
jbe 0x9d914
andl $0xe00fffff, %edi       # imm = 0xE00FFFFF
orl %edx, %edi
testb $0x2, %dil
movl %edi, %esi
sete %r14b
movq -0x58(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0x50(%rbp)
movss 0x4(%rax), %xmm1
movss %xmm1, -0x4c(%rbp)
movss 0x8(%rax), %xmm2
movss %xmm2, -0x48(%rbp)
movl %edi, -0x2c(%rbp)
testb $0x2, %sil
jne 0x9ce33
movq -0x58(%rbp), %rax
movss 0xc(%rax), %xmm3
jmp 0x9ce3b
movss 0x181a9(%rip), %xmm3    # 0xb4fe4
leaq -0x4c(%rbp), %rsi
leaq -0x48(%rbp), %rcx
movss %xmm3, 0x4(%rcx)
movl $0x10100000, %eax       # imm = 0x10100000
movl %edx, %edi
andl %eax, %edi
movl %edi, -0xd0(%rbp)
cmpl %eax, %edi
movl %edx, -0x9c(%rbp)
movq %r15, -0xc8(%rbp)
jne 0x9ce7e
leaq -0x50(%rbp), %rbx
movq %rcx, %rdx
movq %rbx, %rdi
callq 0x42749
movss 0x4(%rbx), %xmm1
jmp 0x9cec1
movl %edx, %eax
notl %eax
testl $0x8200000, %eax        # imm = 0x8200000
jne 0x9cec1
leaq -0x50(%rbp), %rbx
movq %rbx, %rdi
leaq -0x48(%rbp), %rdx
callq 0x426ad
movq 0x3078(%r12), %rax
movq -0x58(%rbp), %rdx
xorq (%rdx), %rax
movl 0x3080(%r12), %ecx
xorl 0x8(%rdx), %ecx
orq %rax, %rcx
movss 0x4(%rbx), %xmm1
je 0x9d3ef
xorl %edx, %edx
movb %r14b, %dl
movss -0x50(%rbp), %xmm5
movss -0x48(%rbp), %xmm4
xorps %xmm0, %xmm0
xorps %xmm6, %xmm6
cmpless %xmm5, %xmm6
movss 0x18121(%rip), %xmm2    # 0xb5004
movaps %xmm6, %xmm7
andps %xmm2, %xmm7
movss 0x189d3(%rip), %xmm3    # 0xb58c4
andnps %xmm3, %xmm6
orps %xmm7, %xmm6
movss 0x18949(%rip), %xmm7    # 0xb5848
mulss %xmm7, %xmm5
addss %xmm6, %xmm5
cvttss2si %xmm5, %ecx
movl %ecx, -0x90(%rbp)
xorps %xmm5, %xmm5
cmpless %xmm1, %xmm5
movaps %xmm5, %xmm6
andps %xmm2, %xmm6
andnps %xmm3, %xmm5
orps %xmm6, %xmm5
mulss %xmm7, %xmm1
addss %xmm5, %xmm1
cvttss2si %xmm1, %r8d
xorps %xmm1, %xmm1
cmpless %xmm4, %xmm1
movaps %xmm1, %xmm5
andps %xmm2, %xmm5
andnps %xmm3, %xmm1
orps %xmm5, %xmm1
mulss %xmm7, %xmm4
addss %xmm1, %xmm4
cvttss2si %xmm4, %r9d
movl %r8d, -0x8c(%rbp)
movl %r9d, -0x88(%rbp)
movss -0x44(%rbp), %xmm1
cmpless %xmm1, %xmm0
andps %xmm0, %xmm2
andnps %xmm3, %xmm0
orps %xmm2, %xmm0
mulss %xmm7, %xmm1
addss %xmm0, %xmm1
cvttss2si %xmm1, %eax
movl %eax, -0x84(%rbp)
movq -0x68(%rbp), %rsi
movss 0xd8(%rsi), %xmm1
cmpl $0x0, 0x15f0(%r12)
movss -0x5c(%rbp), %xmm0
je 0x9cfa5
xorps %xmm0, %xmm0
movss -0xa8(%rbp), %xmm2
subss -0x5c(%rbp), %xmm2
movss %xmm2, -0x6c(%rbp)
addl $0x3, %edx
movq %rdx, -0xc0(%rbp)
movq -0x68(%rbp), %rdx
movss 0xdc(%rdx), %xmm2
movss %xmm2, -0xa4(%rbp)
movss %xmm1, -0x70(%rbp)
addss %xmm1, %xmm0
movss %xmm0, 0xd8(%rdx)
movl -0x2c(%rbp), %r14d
movl %r14d, %edx
andl $0x20, %edx
testl $0x300000, -0x80(%rbp)  # imm = 0x300000
je 0x9d2ae
testl %edx, %edx
jne 0x9d2ae
movq %r12, -0xe0(%rbp)
movss 0x15b0(%r12), %xmm0
movss %xmm0, -0x38(%rbp)
movq -0xc0(%rbp), %rax
leal -0x1(%rax), %ebx
movl -0x80(%rbp), %r15d
btl $0x18, %r15d
leaq 0x3543a(%rip), %rax     # 0xd246f
leaq 0x3542b(%rip), %rdi     # 0xd2467
cmovaeq %rax, %rdi
movss 0x17f88(%rip), %xmm0    # 0xb4fd0
xorl %esi, %esi
xorl %edx, %edx
callq 0x44a23
btl $0x15, %r15d
movl $0x0, %eax
adcl $0x1, %eax
btl $0x13, %r14d
xorps %xmm1, %xmm1
cvtsi2ss %ebx, %xmm1
movq -0xc0(%rbp), %rcx
movss -0x38(%rbp), %xmm6
movaps %xmm6, %xmm2
mulss %xmm1, %xmm2
movss -0x6c(%rbp), %xmm4
movaps %xmm4, %xmm3
subss %xmm2, %xmm3
xorps %xmm2, %xmm2
cvtsi2ss %ecx, %xmm2
divss %xmm2, %xmm3
cvttps2dq %xmm3, %xmm2
cvtdq2ps %xmm2, %xmm2
movss 0x17f41(%rip), %xmm3    # 0xb4fe4
movaps %xmm3, %xmm5
maxss %xmm2, %xmm5
movss %xmm5, -0xb0(%rbp)
movaps %xmm6, %xmm2
addss %xmm5, %xmm2
mulss %xmm1, %xmm2
movaps %xmm4, %xmm1
subss %xmm2, %xmm1
cvttps2dq %xmm1, %xmm1
cvtdq2ps %xmm1, %xmm1
movss %xmm3, -0x74(%rbp)
movss %xmm3, -0xac(%rbp)
jae 0x9d0e5
xorps %xmm2, %xmm2
movss %xmm2, -0xac(%rbp)
movl $0xff, %esi
movl $0x0, %edx
cmovbl %edx, %esi
movl %esi, -0xd4(%rbp)
movss -0x74(%rbp), %xmm2
maxss %xmm1, %xmm2
movss %xmm2, -0x74(%rbp)
ucomiss -0xb0(%rbp), %xmm0
movl %ecx, %ecx
cmovael %edx, %eax
shll $0x5, %eax
leaq 0x59a54(%rip), %rdx     # 0xf6b70
addq %rax, %rdx
movq %rdx, -0xf0(%rbp)
leaq 0x59aa3(%rip), %rdx     # 0xf6bd0
addq %rax, %rdx
movq %rdx, -0xe8(%rbp)
movq %rcx, -0x100(%rbp)
negq %rcx
movq %rcx, -0xf8(%rbp)
movl $0x1, %r12d
leaq -0x90(%rbp), %r14
leaq 0x599f4(%rip), %r15     # 0xf6b50
leaq -0x50(%rbp), %rbx
movq $0x0, -0x38(%rbp)
xorl %r13d, %r13d
cmpq $0x1, %r12
je 0x9d188
movq -0xe0(%rbp), %rax
movss 0x15b0(%rax), %xmm1
xorps %xmm0, %xmm0
callq 0x5591d
movss -0xb0(%rbp), %xmm0
cmpq -0x100(%rbp), %r12
jb 0x9d19e
movss -0x74(%rbp), %xmm0
callq 0x42f61
btl $0x18, -0x80(%rbp)
movq (%r15), %rdi
jb 0x9d1ff
movq -0xf0(%rbp), %rax
movq -0x8(%rax,%r12,8), %r9
xorl %eax, %eax
movl %eax, -0x140(%rbp)
movl -0xd4(%rbp), %ecx
movl %ecx, -0x98(%rbp)
movl %eax, (%rsp)
movl $0x4, %esi
movq %r14, %rdx
movss 0x17e04(%rip), %xmm0    # 0xb4fe4
leaq -0x140(%rbp), %rcx
leaq -0x98(%rbp), %r8
callq 0x95c7f
movq -0x38(%rbp), %rcx
orb %al, %cl
movq %rcx, -0x38(%rbp)
jmp 0x9d256
movq -0xe8(%rbp), %rax
movq -0x8(%rax,%r12,8), %r9
xorl %eax, %eax
movl %eax, -0x140(%rbp)
movss -0xac(%rbp), %xmm0
movss %xmm0, -0x98(%rbp)
movl %eax, (%rsp)
movl $0x8, %esi
movq %rbx, %rdx
movss 0x18616(%rip), %xmm0    # 0xb584c
leaq -0x140(%rbp), %rcx
leaq -0x98(%rbp), %r8
callq 0x95c7f
movq -0x38(%rbp), %rcx
orb %al, %cl
movq %rcx, -0x38(%rbp)
orb %cl, %r13b
testb $0x8, -0x2c(%rbp)
jne 0x9d26d
leaq 0x1b026(%rip), %rdi     # 0xb8289
movl $0x1, %esi
callq 0x57551
addq $0x4, %r14
addq $0x8, %r15
addq $0x4, %rbx
movq -0xf8(%rbp), %rax
addq %r12, %rax
incq %rax
incq %r12
cmpq $0x1, %rax
jne 0x9d16b
movq -0xe0(%rbp), %r12
movl -0x2c(%rbp), %r14d
movss 0x185a2(%rip), %xmm1    # 0xb5848
movq %r13, %rbx
jmp 0x9d474
xorl %ebx, %ebx
btl $0x16, -0x80(%rbp)
movss 0x1858b(%rip), %xmm1    # 0xb5848
jae 0x9d319
movl $0x0, %esi
movq %rsi, -0x38(%rbp)
testl %edx, %edx
jne 0x9d474
movl $0xff, %edx
cmpl %edx, %ecx
cmovgel %edx, %ecx
xorl %esi, %esi
testl %ecx, %ecx
cmovlel %esi, %ecx
cmpl %edx, %r8d
cmovgel %edx, %r8d
testl %r8d, %r8d
cmovlel %esi, %r8d
cmpl %edx, %r9d
cmovgel %edx, %r9d
testl %r9d, %r9d
cmovlel %esi, %r9d
testb $0x2, %r14b
jne 0x9d326
cmpl %edx, %eax
cmovll %eax, %edx
testl %edx, %edx
cmovlel %esi, %edx
movl %edx, (%rsp)
leaq 0x351d0(%rip), %rdx     # 0xd24e7
jmp 0x9d32d
movq $0x0, -0x38(%rbp)
jmp 0x9d474
leaq 0x351cc(%rip), %rdx     # 0xd24f9
leaq -0x140(%rbp), %rdi
movl $0x40, %esi
xorl %eax, %eax
callq 0x41f22
movss -0x6c(%rbp), %xmm0
callq 0x42f61
leaq -0x98(%rbp), %r8
movq $0x0, (%r8)
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
leaq 0x351a1(%rip), %rdi     # 0xd2507
movq $0x0, -0x38(%rbp)
leaq -0x140(%rbp), %rbx
xorl %esi, %esi
movq %rbx, %rdx
movl $0x40, %ecx
movl $0x6, %r9d
callq 0x97d69
testb %al, %al
je 0x9d453
leaq -0x8c(%rbp), %rcx
leaq -0x88(%rbp), %r8
leaq -0x84(%rbp), %r9
movabsq $0x900000200, %rax      # imm = 0x900000200
movzbl (%rbx), %edx
cmpq $0x23, %rdx
ja 0x9d3c5
btq %rdx, %rax
jae 0x9d3c5
incq %rbx
jmp 0x9d3b1
xorps %xmm0, %xmm0
movaps %xmm0, -0x90(%rbp)
testb $0x2, %r14b
jne 0x9d435
leaq 0x3510c(%rip), %rsi     # 0xd24e8
leaq -0x90(%rbp), %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0xc0c0
jmp 0x9d44d
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
movl $0x0, %edx
jne 0x9d40d
jp 0x9d40d
movss 0x3070(%r12), %xmm2
movss %xmm2, -0x50(%rbp)
movss -0x48(%rbp), %xmm2
ucomiss %xmm0, %xmm2
jne 0x9cec3
jp 0x9cec3
movss 0x3074(%r12), %xmm1
movss %xmm1, -0x4c(%rbp)
jmp 0x9cec3
leaq 0x350be(%rip), %rsi     # 0xd24fa
leaq -0x90(%rbp), %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0xc0c0
movb $0x1, %al
movq %rax, -0x38(%rbp)
testb $0x8, %r14b
jne 0x9d46a
leaq 0x1ae29(%rip), %rdi     # 0xb8289
movl $0x1, %esi
callq 0x57551
xorl %ebx, %ebx
movss 0x183d4(%rip), %xmm1    # 0xb5848
testb $0x10, %r14b
jne 0x9d4a4
xorps %xmm0, %xmm0
testb $0x20, %r14b
jne 0x9d4b7
cmpl $0x0, 0x15f0(%r12)
movss -0x70(%rbp), %xmm1
je 0x9d4bc
movss -0x6c(%rbp), %xmm0
addss 0x15b0(%r12), %xmm0
jmp 0x9d4bc
xorl %r13d, %r13d
movq -0xb8(%rbp), %rsi
movq -0x38(%rbp), %r14
jmp 0x9d670
movss -0x70(%rbp), %xmm1
addss %xmm1, %xmm0
movq -0x68(%rbp), %rax
movss %xmm0, 0xd8(%rax)
movss -0xa4(%rbp), %xmm0
movss %xmm0, 0xdc(%rax)
movq -0x58(%rbp), %rax
movss (%rax), %xmm0
movss 0x4(%rax), %xmm1
movss 0x8(%rax), %xmm2
testb $0x2, %r14b
jne 0x9d4ff
movq -0x58(%rbp), %rax
movss 0xc(%rax), %xmm3
jmp 0x9d507
movss 0x17add(%rip), %xmm3    # 0xb4fe4
leaq -0x140(%rbp), %rsi
movss %xmm0, (%rsi)
movss %xmm1, 0x4(%rsi)
movss %xmm2, 0x8(%rsi)
movss %xmm3, 0xc(%rsi)
leaq 0x34fe6(%rip), %rdi     # 0xd250e
xorps %xmm0, %xmm0
movl %r14d, %edx
callq 0x9dd70
testb $0x4, %r14b
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x9d5a5
movups -0x140(%rbp), %xmm0
movups %xmm0, 0x3084(%r12)
leaq 0x2181c(%rip), %rdi     # 0xbed74
xorl %esi, %esi
callq 0x56c96
movq -0x68(%rbp), %rax
movups 0x12c(%rax), %xmm0
movaps %xmm0, %xmm1
addss 0x17a5b(%rip), %xmm0    # 0xb4fd0
shufps $0xff, %xmm1, %xmm1     # xmm1 = xmm1[3,3,3,3]
addss 0x15ac(%r12), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
leaq -0x98(%rbp), %rdi
movlps %xmm0, (%rdi)
leaq -0x148(%rbp), %rdx
movq $0x0, (%rdx)
xorl %esi, %esi
callq 0x545cf
testb $0x8, %r14b
jne 0x9d5bc
leaq 0x1acd7(%rip), %rdi     # 0xb8289
movl $0x1, %esi
callq 0x57551
leaq 0x217b1(%rip), %rdi     # 0xbed74
xorl %r13d, %r13d
xorl %esi, %esi
callq 0x573f5
testb %al, %al
movq -0x38(%rbp), %r14
je 0x9d661
movq %rbx, -0x80(%rbp)
movq 0x1ae0(%r12), %r13
movq -0xc8(%rbp), %rdi
movq -0xb8(%rbp), %rbx
cmpq %rdi, %rbx
je 0x9d607
movq %rbx, %rsi
xorl %edx, %edx
callq 0x8fe70
callq 0x933f0
movl -0xcc(%rbp), %r14d
andl $0x1f890002, %r14d      # imm = 0x1F890002
orl $0x740080, %r14d        # imm = 0x740080
movss -0xa0(%rbp), %xmm0
mulss 0x182d8(%rip), %xmm0    # 0xb5904
callq 0x42f61
leaq 0x3084(%r12), %rcx
leaq 0x21732(%rip), %rdi     # 0xbed72
movq -0x58(%rbp), %rsi
movl %r14d, %edx
callq 0x9e2cd
movq -0x38(%rbp), %r14
orb %al, %r14b
callq 0x5732f
movq %rbx, %rsi
movq -0x80(%rbp), %rbx
jmp 0x9d668
movq -0xb8(%rbp), %rsi
movss 0x181d8(%rip), %xmm1    # 0xb5848
cmpq -0xc8(%rbp), %rsi
je 0x9d6e6
movl -0x2c(%rbp), %eax
andl $0x80, %eax
jne 0x9d6e6
testb $0x20, -0x2c(%rbp)
jne 0x9d6a0
movss -0xa8(%rbp), %xmm0
addss 0x15b0(%r12), %xmm0
movss %xmm0, -0x5c(%rbp)
movss -0x70(%rbp), %xmm0
addss -0x5c(%rbp), %xmm0
movss -0xa4(%rbp), %xmm1
addss 0x159c(%r12), %xmm1
movq -0x68(%rbp), %rax
movss %xmm0, 0xd8(%rax)
movss %xmm1, 0xdc(%rax)
movq -0xc8(%rbp), %rdi
xorl %edx, %edx
callq 0x8fe70
movss 0x18162(%rip), %xmm1    # 0xb5848
testb $0x1, %r14b
je 0x9d7dd
testq %r13, %r13
jne 0x9d7dd
testb $0x1, %bl
jne 0x9d71f
xorl %eax, %eax
xorps %xmm0, %xmm0
cvtsi2ssl -0x90(%rbp,%rax,4), %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x50(%rbp,%rax,4)
incq %rax
cmpq $0x4, %rax
jne 0x9d700
movl -0x9c(%rbp), %eax
notl %eax
movss -0x50(%rbp), %xmm0
movss -0x4c(%rbp), %xmm1
movss -0x48(%rbp), %xmm2
testl $0x8200000, %eax        # imm = 0x8200000
jne 0x9d789
movss %xmm0, 0x3070(%r12)
movss %xmm1, 0x3074(%r12)
leaq -0x50(%rbp), %rbx
movq %rbx, %rdi
leaq -0x4c(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq 0x42749
movl 0x8(%rbx), %eax
movl %eax, 0x3080(%r12)
movq (%rbx), %rax
movq %rax, 0x3078(%r12)
movss (%rbx), %xmm0
movss 0x4(%rbx), %xmm1
movss 0x8(%rbx), %xmm2
cmpl $0x10100000, -0xd0(%rbp) # imm = 0x10100000
jne 0x9d7b7
leaq -0x50(%rbp), %rbx
movq %rbx, %rdi
leaq -0x4c(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq 0x426ad
movss (%rbx), %xmm0
movss 0x4(%rbx), %xmm1
movss 0x8(%rbx), %xmm2
movq -0x58(%rbp), %rax
movss %xmm0, (%rax)
movss %xmm1, 0x4(%rax)
movss %xmm2, 0x8(%rax)
testb $0x2, -0x2c(%rbp)
jne 0x9d7dd
movss -0x44(%rbp), %xmm0
movq -0x58(%rbp), %rax
movss %xmm0, 0xc(%rax)
callq 0x55082
callq 0x55617
movq -0x68(%rbp), %rax
testb $0x1, 0x128(%rax)
je 0x9d8a2
andl $0x200, -0x2c(%rbp)     # imm = 0x200
jne 0x9d8a2
callq 0x58898
testb %al, %al
je 0x9d8a2
leaq 0x21592(%rip), %rdi     # 0xbedab
xorl %esi, %esi
callq 0x58978
testq %rax, %rax
setne %bl
je 0x9d83e
movq (%rax), %rax
movl 0x8(%rax), %ecx
movq -0x58(%rbp), %rdx
movl %ecx, 0x8(%rdx)
movq (%rax), %rax
movq %rax, (%rdx)
movb $0x1, %r14b
leaq 0x2156d(%rip), %rdi     # 0xbedb2
xorl %esi, %esi
callq 0x58978
testq %rax, %rax
je 0x9d86c
movq (%rax), %rsi
movq -0xc0(%rbp), %rdx
shll $0x2, %edx
movq -0x58(%rbp), %rdi
callq 0xc080
movb $0x1, %r14b
movb $0x1, %bl
btl $0x1c, -0x9c(%rbp)
setae %al
xorb $0x1, %bl
orb %al, %bl
jne 0x9d89d
movq -0x58(%rbp), %rdi
leaq 0x4(%rdi), %rsi
leaq 0x8(%rdi), %rdx
movss (%rdi), %xmm0
movss 0x4(%rdi), %xmm1
movss 0x8(%rdi), %xmm2
callq 0x426ad
callq 0x58c5d
testq %r13, %r13
je 0x9d8c7
movl 0x1b30(%r12), %eax
testl %eax, %eax
je 0x9d8c7
cmpq %r13, 0x1b60(%r12)
jne 0x9d8c7
movq -0x68(%rbp), %rcx
movl %eax, 0x124(%rcx)
testb $0x1, %r14b
je 0x9d8dc
movq -0x68(%rbp), %rax
movl 0x124(%rax), %edi
callq 0x4618e
andb $0x1, %r14b
movl %r14d, %eax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x34ab8(%rip), %rdi     # 0xd23b4
leaq 0x33715(%rip), %rsi     # 0xd1018
leaq 0x34ae3(%rip), %rcx     # 0xd23ed
movl $0x123b, %edx           # imm = 0x123B
callq 0xc140
leaq 0x34b15(%rip), %rdi     # 0xd2430
leaq 0x336f6(%rip), %rsi     # 0xd1018
leaq 0x34ac4(%rip), %rcx     # 0xd23ed
movl $0x123c, %edx           # imm = 0x123C
callq 0xc140