// File: /workspace/github_cpp_makefile_star2_O1/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, -0x48(%rbp)
leaq 0x5f5fa(%rip), %rax     # 0xfdcd0
movq (%rax), %r13
movq 0x1ae0(%r13), %rax
movb $0x1, 0x90(%rax)
movq %rax, -0x60(%rbp)
cmpb $0x0, 0x93(%rax)
je 0x9e6fb
xorl %ebx, %ebx
jmp 0x9f2db
movl %edx, %r14d
movq %rdi, %rbx
callq 0x57404
movss %xmm0, -0x9c(%rbp)
callq 0x57252
movss %xmm0, -0xa4(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x4c(%rbp)
testb $0x10, %r14b
jne 0x9e73f
movss 0x15b0(%r13), %xmm0
addss -0x9c(%rbp), %xmm0
movss %xmm0, -0x4c(%rbp)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x44e8b
movq %rax, -0xc0(%rbp)
movl $0x0, 0x1bf8(%r13)
callq 0x5752d
movq %rbx, %rdi
callq 0x55c36
movl %r14d, %eax
andl $0xff8ffff7, %r14d      # imm = 0xFF8FFFF7
orl $0x100008, %r14d        # imm = 0x100008
testb $0x20, %al
movl %eax, -0xd4(%rbp)
cmovel %eax, %r14d
testb $0x8, %r14b
jne 0x9e797
movq -0x48(%rbp), %rdi
movl %r14d, %esi
callq 0x9f330
testl $0x700000, %r14d        # imm = 0x700000
jne 0x9e7af
movl $0x700000, %eax         # imm = 0x700000
andl 0x306c(%r13), %eax
orl %eax, %r14d
testl $0x1800000, %r14d       # imm = 0x1800000
jne 0x9e7c7
movl $0x1800000, %eax        # imm = 0x1800000
andl 0x306c(%r13), %eax
orl %eax, %r14d
testl $0x6000000, %r14d       # imm = 0x6000000
jne 0x9e7df
movl $0x6000000, %eax        # imm = 0x6000000
andl 0x306c(%r13), %eax
orl %eax, %r14d
testl $0x18000000, %r14d      # imm = 0x18000000
jne 0x9e7f7
movl $0x18000000, %eax       # imm = 0x18000000
andl 0x306c(%r13), %eax
orl %eax, %r14d
movl %r14d, %eax
andl $0x700000, %eax         # imm = 0x700000
leal -0x1(%rax), %ecx
xorl %ecx, %eax
cmpl %ecx, %eax
jbe 0x9f2f2
movq %rbx, -0xd0(%rbp)
movl %r14d, %eax
andl $0x18000000, %eax       # imm = 0x18000000
leal -0x1(%rax), %ecx
xorl %ecx, %eax
cmpl %ecx, %eax
jbe 0x9f311
movl $0xe00fffff, %eax       # imm = 0xE00FFFFF
andl 0x306c(%r13), %eax
orl %r14d, %eax
testb $0x2, %al
sete %bl
movq -0x48(%rbp), %rcx
movss (%rcx), %xmm0
movss %xmm0, -0x40(%rbp)
movss 0x4(%rcx), %xmm1
movss %xmm1, -0x3c(%rbp)
movss 0x8(%rcx), %xmm2
movss %xmm2, -0x38(%rbp)
movl %eax, -0x58(%rbp)
testb $0x2, %al
jne 0x9e86f
movq -0x48(%rbp), %rax
movss 0xc(%rax), %xmm3
jmp 0x9e877
movss 0x1876d(%rip), %xmm3    # 0xb6fe4
leaq -0x3c(%rbp), %rsi
leaq -0x38(%rbp), %rdx
movss %xmm3, 0x4(%rdx)
movl $0x10100000, %eax       # imm = 0x10100000
movl %r14d, %ecx
andl %eax, %ecx
movl %ecx, -0xd8(%rbp)
cmpl %eax, %ecx
jne 0x9e8a3
leaq -0x40(%rbp), %rdi
callq 0x42fe6
jmp 0x9e90c
movl %r14d, %eax
notl %eax
testl $0x8200000, %eax        # imm = 0x8200000
jne 0x9e90c
leaq -0x40(%rbp), %rdi
callq 0x42f4a
movq 0x3078(%r13), %rax
movq -0x48(%rbp), %rdx
xorq (%rdx), %rax
movl 0x3080(%r13), %ecx
xorl 0x8(%rdx), %ecx
orq %rax, %rcx
jne 0x9e90c
movss -0x3c(%rbp), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0x9e8f2
jp 0x9e8f2
movss 0x3070(%r13), %xmm1
movss %xmm1, -0x40(%rbp)
movss -0x38(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jne 0x9e90c
jp 0x9e90c
movss 0x3074(%r13), %xmm0
movss %xmm0, -0x3c(%rbp)
xorl %edx, %edx
movb %bl, %dl
movss -0x40(%rbp), %xmm3
movss -0x3c(%rbp), %xmm4
xorps %xmm0, %xmm0
xorps %xmm5, %xmm5
cmpless %xmm3, %xmm5
movss 0x186d7(%rip), %xmm1    # 0xb7004
movaps %xmm5, %xmm6
andps %xmm1, %xmm6
movss 0x18f89(%rip), %xmm2    # 0xb78c4
andnps %xmm2, %xmm5
orps %xmm6, %xmm5
movss 0x18eff(%rip), %xmm6    # 0xb7848
mulss %xmm6, %xmm3
addss %xmm5, %xmm3
cvttss2si %xmm3, %ecx
xorps %xmm3, %xmm3
cmpless %xmm4, %xmm3
movaps %xmm3, %xmm5
andps %xmm1, %xmm5
andnps %xmm2, %xmm3
orps %xmm5, %xmm3
mulss %xmm6, %xmm4
addss %xmm3, %xmm4
cvttss2si %xmm4, %r8d
movl %ecx, -0x90(%rbp)
movss -0x38(%rbp), %xmm3
xorps %xmm4, %xmm4
cmpless %xmm3, %xmm4
movaps %xmm4, %xmm5
andps %xmm1, %xmm5
andnps %xmm2, %xmm4
orps %xmm5, %xmm4
mulss %xmm6, %xmm3
addss %xmm4, %xmm3
cvttss2si %xmm3, %r9d
movl %r8d, -0x8c(%rbp)
movl %r9d, -0x88(%rbp)
movss -0x34(%rbp), %xmm3
cmpless %xmm3, %xmm0
andps %xmm0, %xmm1
andnps %xmm2, %xmm0
orps %xmm1, %xmm0
movaps %xmm6, %xmm1
mulss %xmm6, %xmm3
addss %xmm0, %xmm3
cvttss2si %xmm3, %eax
movl %eax, -0x84(%rbp)
movq -0x60(%rbp), %rsi
movss 0xd8(%rsi), %xmm0
movss %xmm0, -0x70(%rbp)
cmpl $0x0, 0x15f0(%r13)
movss -0x4c(%rbp), %xmm0
je 0x9e9fb
xorps %xmm0, %xmm0
movss -0xa4(%rbp), %xmm2
subss -0x4c(%rbp), %xmm2
movss %xmm2, -0x6c(%rbp)
addl $0x3, %edx
movq %rdx, -0xc8(%rbp)
movq -0x60(%rbp), %rdx
movss 0xdc(%rdx), %xmm2
movss %xmm2, -0xa0(%rbp)
addss -0x70(%rbp), %xmm0
movss %xmm0, 0xd8(%rdx)
movl -0x58(%rbp), %edx
andl $0x20, %edx
testl $0x300000, %r14d        # imm = 0x300000
movl %r14d, -0x78(%rbp)
je 0x9ecf6
testl %edx, %edx
jne 0x9ecf6
movq %r13, -0xb0(%rbp)
movss 0x15b0(%r13), %xmm0
movss %xmm0, -0x68(%rbp)
movq -0xc8(%rbp), %rax
leal -0x1(%rax), %ebx
btl $0x18, %r14d
leaq 0x35b40(%rip), %rax     # 0xd45c2
leaq 0x35b31(%rip), %rdi     # 0xd45ba
cmovaeq %rax, %rdi
movss 0x1853b(%rip), %xmm0    # 0xb6fd0
xorl %esi, %esi
xorl %edx, %edx
callq 0x4548d
btl $0x15, %r14d
movl $0x0, %eax
adcl $0x1, %eax
btl $0x13, -0x58(%rbp)
xorps %xmm1, %xmm1
cvtsi2ss %ebx, %xmm1
movq -0xc8(%rbp), %rcx
movss -0x68(%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 0x184f4(%rip), %xmm3    # 0xb6fe4
movaps %xmm3, %xmm5
maxss %xmm2, %xmm5
movss %xmm5, -0xb8(%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, -0xa8(%rbp)
jae 0x9eb32
xorps %xmm2, %xmm2
movss %xmm2, -0xa8(%rbp)
movl $0xff, %esi
movl $0x0, %edx
cmovbl %edx, %esi
movl %esi, -0xdc(%rbp)
movss -0x74(%rbp), %xmm2
maxss %xmm1, %xmm2
movss %xmm2, -0x74(%rbp)
ucomiss -0xb8(%rbp), %xmm0
movl %ecx, %ecx
cmovael %edx, %eax
shll $0x5, %eax
leaq 0x5a007(%rip), %rdx     # 0xf8b70
addq %rax, %rdx
movq %rdx, -0xf0(%rbp)
leaq 0x5a056(%rip), %rdx     # 0xf8bd0
addq %rax, %rdx
movq %rdx, -0xe8(%rbp)
movq %rcx, -0x100(%rbp)
negq %rcx
movq %rcx, -0xf8(%rbp)
movl $0x1, %r15d
leaq -0x90(%rbp), %r12
leaq 0x59fa7(%rip), %r13     # 0xf8b50
leaq -0x40(%rbp), %rbx
xorl %r14d, %r14d
movq $0x0, -0x68(%rbp)
cmpq $0x1, %r15
je 0x9ebd5
movq -0xb0(%rbp), %rax
movss 0x15b0(%rax), %xmm1
xorps %xmm0, %xmm0
callq 0x569e1
movss -0xb8(%rbp), %xmm0
cmpq -0x100(%rbp), %r15
jb 0x9ebeb
movss -0x74(%rbp), %xmm0
callq 0x437f3
btl $0x18, -0x78(%rbp)
movq (%r13), %rdi
jb 0x9ec46
movq -0xf0(%rbp), %rax
movq -0x8(%rax,%r15,8), %r9
xorl %eax, %eax
movl %eax, -0x140(%rbp)
movl -0xdc(%rbp), %ecx
movl %ecx, -0x98(%rbp)
movl %eax, (%rsp)
movl $0x4, %esi
movq %r12, %rdx
movss 0x183b6(%rip), %xmm0    # 0xb6fe4
leaq -0x140(%rbp), %rcx
leaq -0x98(%rbp), %r8
callq 0x978bf
orb %al, %r14b
jmp 0x9eca2
movq -0xe8(%rbp), %rax
movq -0x8(%rax,%r15,8), %r9
xorl %eax, %eax
movl %eax, -0x140(%rbp)
movss -0xa8(%rbp), %xmm0
movss %xmm0, -0x98(%rbp)
movl %eax, (%rsp)
movl $0x8, %esi
movq %rbx, %rdx
movss 0x18bcf(%rip), %xmm0    # 0xb784c
leaq -0x140(%rbp), %rcx
leaq -0x98(%rbp), %r8
callq 0x978bf
movq %r14, %rcx
orb %al, %cl
movq %rcx, %r14
movq -0x68(%rbp), %rax
orb %cl, %al
movq %rax, -0x68(%rbp)
testb $0x8, -0x58(%rbp)
jne 0x9ecb9
leaq 0x1b5da(%rip), %rdi     # 0xba289
movl $0x1, %esi
callq 0x586a5
addq $0x4, %r12
addq $0x8, %r13
addq $0x4, %rbx
movq -0xf8(%rbp), %rax
addq %r15, %rax
incq %rax
incq %r15
cmpq $0x1, %rax
jne 0x9ebb8
movq -0xb0(%rbp), %r13
movq -0xd0(%rbp), %r15
movl -0x58(%rbp), %r12d
jmp 0x9ee72
movq $0x0, -0x68(%rbp)
btl $0x16, %r14d
movq -0xd0(%rbp), %r15
jae 0x9ed66
movl $0x0, %ebx
testl %edx, %edx
movl -0x58(%rbp), %r12d
jne 0x9ee7d
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, %r12b
jne 0x9ed71
cmpl %edx, %eax
cmovll %eax, %edx
testl %edx, %edx
cmovlel %esi, %edx
movl %edx, (%rsp)
leaq 0x358d6(%rip), %rdx     # 0xd463a
jmp 0x9ed78
xorl %ebx, %ebx
movl -0x58(%rbp), %r12d
jmp 0x9ee7d
leaq 0x358d4(%rip), %rdx     # 0xd464c
leaq -0x140(%rbp), %rdi
movl $0x40, %esi
xorl %eax, %eax
callq 0x427cb
movss -0x6c(%rbp), %xmm0
callq 0x437f3
leaq -0x98(%rbp), %r8
movq $0x0, (%r8)
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
leaq 0x358a9(%rip), %rdi     # 0xd465a
xorl %r14d, %r14d
leaq -0x140(%rbp), %rbx
xorl %esi, %esi
movq %rbx, %rdx
movl $0x40, %ecx
movl $0x6, %r9d
callq 0x99b49
testb %al, %al
je 0x9ee4c
leaq -0x8c(%rbp), %rcx
leaq -0x88(%rbp), %r8
leaq -0x84(%rbp), %r9
movabsq $0x900000200, %rax      # imm = 0x900000200
movzbl (%rbx), %edx
cmpq $0x23, %rdx
ja 0x9ee07
btq %rdx, %rax
jae 0x9ee07
incq %rbx
jmp 0x9edf3
xorps %xmm0, %xmm0
movaps %xmm0, -0x90(%rbp)
testb $0x2, %r12b
jne 0x9ee31
leaq 0x3581d(%rip), %rsi     # 0xd463b
leaq -0x90(%rbp), %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0xc0c0
jmp 0x9ee49
leaq 0x35815(%rip), %rsi     # 0xd464d
leaq -0x90(%rbp), %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0xc0c0
movb $0x1, %r14b
testb $0x8, %r12b
jne 0x9ee63
leaq 0x1b430(%rip), %rdi     # 0xba289
movl $0x1, %esi
callq 0x586a5
movq $0x0, -0x68(%rbp)
movq -0xd0(%rbp), %r15
movss 0x189ce(%rip), %xmm1    # 0xb7848
movq %r14, %rbx
testb $0x10, %r12b
jne 0x9eee8
xorps %xmm0, %xmm0
testb $0x20, %r12b
jne 0x9eea4
cmpl $0x0, 0x15f0(%r13)
je 0x9eea4
movss -0x6c(%rbp), %xmm0
addss 0x15b0(%r13), %xmm0
addss -0x70(%rbp), %xmm0
movq -0x60(%rbp), %rax
movss %xmm0, 0xd8(%rax)
movss -0xa0(%rbp), %xmm0
movss %xmm0, 0xdc(%rax)
movq -0x48(%rbp), %rax
movss (%rax), %xmm0
movss 0x4(%rax), %xmm1
movss 0x8(%rax), %xmm2
testb $0x2, %r12b
jne 0x9eef7
movq -0x48(%rbp), %rax
movss 0xc(%rax), %xmm3
jmp 0x9eeff
xorl %r14d, %r14d
movq -0xc0(%rbp), %rsi
jmp 0x9f065
movss 0x180e5(%rip), %xmm3    # 0xb6fe4
leaq -0x140(%rbp), %rsi
movss %xmm0, (%rsi)
movss %xmm1, 0x4(%rsi)
movss %xmm2, 0x8(%rsi)
movss %xmm3, 0xc(%rsi)
leaq 0x35741(%rip), %rdi     # 0xd4661
xorps %xmm0, %xmm0
movl %r12d, %edx
callq 0x9f744
testb $0x4, %r12b
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x9ef9d
movups -0x140(%rbp), %xmm0
movups %xmm0, 0x3084(%r13)
leaq 0x21e55(%rip), %rdi     # 0xc0da4
xorl %esi, %esi
callq 0x57da5
movq -0x60(%rbp), %rax
movss 0x12c(%rax), %xmm0
addss 0x18066(%rip), %xmm0    # 0xb6fd0
movss 0x138(%rax), %xmm1
addss 0x15ac(%r13), %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 0x5566a
testb $0x8, %r12b
jne 0x9efb4
leaq 0x1b2df(%rip), %rdi     # 0xba289
movl $0x1, %esi
callq 0x586a5
leaq 0x21de9(%rip), %rdi     # 0xc0da4
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x58541
testb %al, %al
je 0x9f056
movq %rbx, %r12
movq 0x1ae0(%r13), %rax
movq %rax, -0xb8(%rbp)
movq -0xc0(%rbp), %r14
cmpq %r15, %r14
je 0x9effc
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x91b8c
callq 0x95099
movl -0xd4(%rbp), %ebx
andl $0x1f890002, %ebx       # imm = 0x1F890002
orl $0x740080, %ebx         # imm = 0x740080
movss -0x9c(%rbp), %xmm0
mulss 0x188e6(%rip), %xmm0    # 0xb7904
callq 0x437f3
leaq 0x3084(%r13), %rcx
leaq 0x21d71(%rip), %rdi     # 0xc0da2
movq -0x48(%rbp), %rsi
movl %ebx, %edx
callq 0x9fca1
movq %r12, %rbx
orb %al, %bl
callq 0x5847b
movq %r14, %rsi
movl -0x58(%rbp), %r12d
movq -0xb8(%rbp), %r14
jmp 0x9f05d
movq -0xc0(%rbp), %rsi
movss 0x187e3(%rip), %xmm1    # 0xb7848
cmpq %r15, %rsi
je 0x9f0d1
movl %r12d, %eax
andl $0x80, %eax
jne 0x9f0d1
testb $0x20, %r12b
jne 0x9f090
movss -0xa4(%rbp), %xmm0
addss 0x15b0(%r13), %xmm0
movss %xmm0, -0x4c(%rbp)
movss -0x70(%rbp), %xmm0
addss -0x4c(%rbp), %xmm0
movss -0xa0(%rbp), %xmm1
addss 0x159c(%r13), %xmm1
movq -0x60(%rbp), %rax
movss %xmm0, 0xd8(%rax)
movss %xmm1, 0xdc(%rax)
movq %r15, %rdi
xorl %edx, %edx
callq 0x91b8c
movss 0x18777(%rip), %xmm1    # 0xb7848
testb $0x1, %bl
je 0x9f1d6
testq %r14, %r14
jne 0x9f1d6
testb $0x1, -0x68(%rbp)
jne 0x9f10a
xorl %eax, %eax
xorps %xmm0, %xmm0
cvtsi2ssl -0x90(%rbp,%rax,4), %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x40(%rbp,%rax,4)
incq %rax
cmpq $0x4, %rax
jne 0x9f0eb
movl -0x78(%rbp), %eax
notl %eax
testl $0x8200000, %eax        # imm = 0x8200000
leaq -0x3c(%rbp), %rsi
jne 0x9f17a
movq %rbx, -0x58(%rbp)
leaq -0x40(%rbp), %rbx
movss (%rbx), %xmm0
movss %xmm0, 0x3070(%r13)
movss 0x4(%rbx), %xmm1
movss %xmm1, 0x3074(%r13)
movss 0x8(%rbx), %xmm2
movq %rbx, %rdi
movq %r13, -0xb0(%rbp)
movq %rsi, %r13
leaq -0x38(%rbp), %rdx
callq 0x42fe6
movq %r13, %rsi
movq -0xb0(%rbp), %r13
movl 0x8(%rbx), %eax
movl %eax, 0x3080(%r13)
movq (%rbx), %rax
movq -0x58(%rbp), %rbx
movq %rax, 0x3078(%r13)
cmpl $0x10100000, -0xd8(%rbp) # imm = 0x10100000
leaq -0x38(%rbp), %rdx
jne 0x9f1a1
leaq -0x40(%rbp), %rdi
movss (%rdi), %xmm0
movss 0x4(%rdi), %xmm1
movss 0x8(%rdi), %xmm2
callq 0x42f4a
movss -0x40(%rbp), %xmm0
movq -0x48(%rbp), %rax
movss %xmm0, (%rax)
movss -0x3c(%rbp), %xmm0
movss %xmm0, 0x4(%rax)
movss -0x38(%rbp), %xmm0
movss %xmm0, 0x8(%rax)
testb $0x2, %r12b
jne 0x9f1d6
movss -0x34(%rbp), %xmm0
movq -0x48(%rbp), %rax
movss %xmm0, 0xc(%rax)
callq 0x56188
callq 0x56723
movq -0x60(%rbp), %rax
testb $0x1, 0x128(%rax)
je 0x9f2a4
andl $0x200, %r12d           # imm = 0x200
jne 0x9f2a4
callq 0x59a1c
testb %al, %al
je 0x9f2a4
movq %r14, %r12
movq %rbx, %r14
leaq 0x21bc3(%rip), %rdi     # 0xc0ddb
xorl %esi, %esi
callq 0x59b01
testq %rax, %rax
setne %bl
je 0x9f23d
movq (%rax), %rax
movl 0x8(%rax), %ecx
movq -0x48(%rbp), %rdx
movl %ecx, 0x8(%rdx)
movq (%rax), %rax
movq %rax, (%rdx)
movb $0x1, %r14b
leaq 0x21b9e(%rip), %rdi     # 0xc0de2
xorl %esi, %esi
callq 0x59b01
testq %rax, %rax
je 0x9f26b
movq (%rax), %rsi
movq -0xc8(%rbp), %rdx
shll $0x2, %edx
movq -0x48(%rbp), %rdi
callq 0xc080
movb $0x1, %r14b
movb $0x1, %bl
btl $0x1c, -0x78(%rbp)
setae %al
xorb $0x1, %bl
orb %al, %bl
jne 0x9f299
movq -0x48(%rbp), %rdi
leaq 0x4(%rdi), %rsi
leaq 0x8(%rdi), %rdx
movss (%rdi), %xmm0
movss 0x4(%rdi), %xmm1
movss 0x8(%rdi), %xmm2
callq 0x42f4a
callq 0x59df7
movq %r14, %rbx
movq %r12, %r14
testq %r14, %r14
je 0x9f2c7
movl 0x1b30(%r13), %eax
testl %eax, %eax
je 0x9f2c7
cmpq %r14, 0x1b60(%r13)
jne 0x9f2c7
movq -0x60(%rbp), %rcx
movl %eax, 0x124(%rcx)
testb $0x1, %bl
je 0x9f2db
movq -0x60(%rbp), %rax
movl 0x124(%rax), %edi
callq 0x46ca4
andb $0x1, %bl
movl %ebx, %eax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3520e(%rip), %rdi     # 0xd4507
leaq 0x33e48(%rip), %rsi     # 0xd3148
leaq 0x35239(%rip), %rcx     # 0xd4540
movl $0x123b, %edx           # imm = 0x123B
callq 0xc140
leaq 0x3526b(%rip), %rdi     # 0xd4583
leaq 0x33e29(%rip), %rsi     # 0xd3148
leaq 0x3521a(%rip), %rcx     # 0xd4540
movl $0x123c, %edx           # imm = 0x123C
callq 0xc140