// File: 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
subq $0x210, %rsp            # imm = 0x210
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
callq 0xeb270
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
testb $0x1, 0x93(%rax)
je 0x14bed5
movb $0x0, -0x1(%rbp)
jmp 0x14d07a
leaq 0xc7064(%rip), %rax     # 0x212f40
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x1560, %rax           # imm = 0x1560
movq %rax, -0x38(%rbp)
callq 0xdd050
movss %xmm0, -0x3c(%rbp)
callq 0xdcdc0
movss %xmm0, -0x40(%rbp)
movl -0x1c(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x14bf1d
xorps %xmm0, %xmm0
movss %xmm0, -0x174(%rbp)
jmp 0x14bf33
movss -0x3c(%rbp), %xmm0
movq -0x38(%rbp), %rax
addss 0x50(%rax), %xmm0
movss %xmm0, -0x174(%rbp)
movss -0x174(%rbp), %xmm0
movss %xmm0, -0x44(%rbp)
movss -0x40(%rbp), %xmm0
subss -0x44(%rbp), %xmm0
movss %xmm0, -0x48(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xc8090
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rdi
addq $0x1bf8, %rdi           # imm = 0x1BF8
callq 0x162560
callq 0xdd220
movq -0x10(%rbp), %rdi
callq 0xdb440
movl -0x1c(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x1c(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x14bfa2
movl -0x1c(%rbp), %eax
andl $0xff8fffff, %eax       # imm = 0xFF8FFFFF
orl $0x100000, %eax         # imm = 0x100000
orl $0x8, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x14bfb9
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x14d090
movl -0x1c(%rbp), %eax
andl $0x700000, %eax         # imm = 0x700000
cmpl $0x0, %eax
jne 0x14bfdb
movq -0x30(%rbp), %rax
movl 0x306c(%rax), %eax
andl $0x700000, %eax         # imm = 0x700000
orl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
andl $0x1800000, %eax        # imm = 0x1800000
cmpl $0x0, %eax
jne 0x14bffd
movq -0x30(%rbp), %rax
movl 0x306c(%rax), %eax
andl $0x1800000, %eax        # imm = 0x1800000
orl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
andl $0x6000000, %eax        # imm = 0x6000000
cmpl $0x0, %eax
jne 0x14c01f
movq -0x30(%rbp), %rax
movl 0x306c(%rax), %eax
andl $0x6000000, %eax        # imm = 0x6000000
orl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
andl $0x18000000, %eax       # imm = 0x18000000
cmpl $0x0, %eax
jne 0x14c041
movq -0x30(%rbp), %rax
movl 0x306c(%rax), %eax
andl $0x18000000, %eax       # imm = 0x18000000
orl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x30(%rbp), %rax
movl 0x306c(%rax), %eax
andl $0xe00fffff, %eax       # imm = 0xE00FFFFF
orl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edi
andl $0x700000, %edi         # imm = 0x700000
callq 0x13de90
testb $0x1, %al
jne 0x14c06a
jmp 0x14c06c
jmp 0x14c08b
leaq 0x438ef(%rip), %rdi     # 0x18f962
leaq 0x42366(%rip), %rsi     # 0x18e3e0
movl $0x123b, %edx           # imm = 0x123B
leaq 0x43915(%rip), %rcx     # 0x18f99b
callq 0xd180
movl -0x1c(%rbp), %edi
andl $0x18000000, %edi       # imm = 0x18000000
callq 0x13de90
testb $0x1, %al
jne 0x14c09f
jmp 0x14c0a1
jmp 0x14c0c0
leaq 0x43936(%rip), %rdi     # 0x18f9de
leaq 0x42331(%rip), %rsi     # 0x18e3e0
movl $0x123c, %edx           # imm = 0x123C
leaq 0x438e0(%rip), %rcx     # 0x18f99b
callq 0xd180
movl -0x1c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movb %al, -0x55(%rbp)
movl -0x1c(%rbp), %eax
andl $0x80000, %eax          # imm = 0x80000
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x56(%rbp)
movb -0x55(%rbp), %dl
movl $0x3, %eax
movl $0x4, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x5c(%rbp)
movq -0x18(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0x70(%rbp)
movq -0x18(%rbp), %rax
movss 0x4(%rax), %xmm0
movss %xmm0, -0x6c(%rbp)
movq -0x18(%rbp), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, -0x68(%rbp)
leaq -0x70(%rbp), %rax
addq $0xc, %rax
movq %rax, -0x180(%rbp)
testb $0x1, -0x55(%rbp)
je 0x14c14b
movq -0x18(%rbp), %rax
movss 0xc(%rax), %xmm0
movss %xmm0, -0x184(%rbp)
jmp 0x14c15d
movss 0x24ae9(%rip), %xmm0    # 0x170c3c
movss %xmm0, -0x184(%rbp)
jmp 0x14c15d
movq -0x180(%rbp), %rax
movss -0x184(%rbp), %xmm0
movss %xmm0, (%rax)
movl -0x1c(%rbp), %eax
andl $0x10000000, %eax       # imm = 0x10000000
cmpl $0x0, %eax
je 0x14c1b7
movl -0x1c(%rbp), %eax
andl $0x100000, %eax         # imm = 0x100000
cmpl $0x0, %eax
je 0x14c1b7
movss -0x70(%rbp), %xmm0
movss -0x6c(%rbp), %xmm1
movss -0x68(%rbp), %xmm2
leaq -0x70(%rbp), %rdi
leaq -0x70(%rbp), %rsi
addq $0x4, %rsi
leaq -0x70(%rbp), %rdx
addq $0x8, %rdx
callq 0xc5c80
jmp 0x14c265
movl -0x1c(%rbp), %eax
andl $0x8000000, %eax        # imm = 0x8000000
cmpl $0x0, %eax
je 0x14c263
movl -0x1c(%rbp), %eax
andl $0x200000, %eax         # imm = 0x200000
cmpl $0x0, %eax
je 0x14c263
movss -0x70(%rbp), %xmm0
movss -0x6c(%rbp), %xmm1
movss -0x68(%rbp), %xmm2
leaq -0x70(%rbp), %rdi
leaq -0x70(%rbp), %rsi
addq $0x4, %rsi
leaq -0x70(%rbp), %rdx
addq $0x8, %rdx
callq 0xc5b00
movq -0x30(%rbp), %rdi
addq $0x3078, %rdi           # imm = 0x3078
movq -0x18(%rbp), %rsi
movl $0xc, %edx
callq 0xd9f0
cmpl $0x0, %eax
jne 0x14c261
movss -0x6c(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x14c23f
jp 0x14c23f
movq -0x30(%rbp), %rax
movss 0x3070(%rax), %xmm0
movss %xmm0, -0x70(%rbp)
movss -0x68(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x14c25f
jp 0x14c25f
movq -0x30(%rbp), %rax
movss 0x3074(%rax), %xmm0
movss %xmm0, -0x6c(%rbp)
jmp 0x14c261
jmp 0x14c263
jmp 0x14c265
movss -0x70(%rbp), %xmm0
movss -0x70(%rbp), %xmm2
movss 0x25d61(%rip), %xmm4    # 0x171fd8
movss 0x41f7d(%rip), %xmm3    # 0x18e1fc
xorps %xmm1, %xmm1
cmpless %xmm2, %xmm1
movaps %xmm1, %xmm2
andps %xmm4, %xmm2
andnps %xmm3, %xmm1
orps %xmm2, %xmm1
movss 0x264c1(%rip), %xmm2    # 0x17275c
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x80(%rbp)
movss -0x6c(%rbp), %xmm0
movss -0x6c(%rbp), %xmm2
movss 0x25d1c(%rip), %xmm4    # 0x171fd8
movss 0x41f38(%rip), %xmm3    # 0x18e1fc
xorps %xmm1, %xmm1
cmpless %xmm2, %xmm1
movaps %xmm1, %xmm2
andps %xmm4, %xmm2
andnps %xmm3, %xmm1
orps %xmm2, %xmm1
movss 0x2647c(%rip), %xmm2    # 0x17275c
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x7c(%rbp)
movss -0x68(%rbp), %xmm0
movss -0x68(%rbp), %xmm2
movss 0x25cd7(%rip), %xmm4    # 0x171fd8
movss 0x41ef3(%rip), %xmm3    # 0x18e1fc
xorps %xmm1, %xmm1
cmpless %xmm2, %xmm1
movaps %xmm1, %xmm2
andps %xmm4, %xmm2
andnps %xmm3, %xmm1
orps %xmm2, %xmm1
movss 0x26437(%rip), %xmm2    # 0x17275c
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x78(%rbp)
movss -0x64(%rbp), %xmm0
movss -0x64(%rbp), %xmm2
movss 0x25c92(%rip), %xmm4    # 0x171fd8
movss 0x41eae(%rip), %xmm3    # 0x18e1fc
xorps %xmm1, %xmm1
cmpless %xmm2, %xmm1
movaps %xmm1, %xmm2
andps %xmm4, %xmm2
andnps %xmm3, %xmm1
orps %xmm2, %xmm1
movss 0x263f2(%rip), %xmm2    # 0x17275c
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x74(%rbp)
movb $0x0, -0x81(%rbp)
movb $0x0, -0x82(%rbp)
movq -0x28(%rbp), %rax
movq 0xd8(%rax), %rax
movq %rax, -0x8c(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x0, 0x90(%rax)
jne 0x14c3b5
movss -0x44(%rbp), %xmm0
movss %xmm0, -0x188(%rbp)
jmp 0x14c3c2
xorps %xmm0, %xmm0
movss %xmm0, -0x188(%rbp)
jmp 0x14c3c2
movss -0x188(%rbp), %xmm0
movss %xmm0, -0x90(%rbp)
movss -0x8c(%rbp), %xmm0
addss -0x90(%rbp), %xmm0
movq -0x28(%rbp), %rax
movss %xmm0, 0xd8(%rax)
movl -0x1c(%rbp), %eax
andl $0x300000, %eax         # imm = 0x300000
cmpl $0x0, %eax
je 0x14c77b
movl -0x1c(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x14c77b
movss -0x48(%rbp), %xmm0
movq -0x38(%rbp), %rax
movss 0x50(%rax), %xmm1
movl -0x5c(%rbp), %eax
movl %eax, %ecx
decl %ecx
cvtsi2ss %ecx, %xmm2
mulss %xmm2, %xmm1
subss %xmm1, %xmm0
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm1
movss 0x247f6(%rip), %xmm0    # 0x170c3c
movss %xmm0, -0x190(%rbp)
callq 0x139050
movaps %xmm0, %xmm1
movss -0x190(%rbp), %xmm0
movss %xmm1, -0x94(%rbp)
movss -0x48(%rbp), %xmm1
movss -0x94(%rbp), %xmm2
movq -0x38(%rbp), %rax
movss 0x50(%rax), %xmm3
addss %xmm3, %xmm2
movl -0x5c(%rbp), %eax
decl %eax
cvtsi2ss %eax, %xmm3
mulss %xmm3, %xmm2
subss %xmm2, %xmm1
cvttps2dq %xmm1, %xmm1
cvtdq2ps %xmm1, %xmm1
callq 0x139050
movss %xmm0, -0x98(%rbp)
movss -0x94(%rbp), %xmm0
movss %xmm0, -0x18c(%rbp)
movl -0x1c(%rbp), %ecx
leaq 0x43556(%rip), %rax     # 0x18fa15
leaq 0x43557(%rip), %rdi     # 0x18fa1d
testl $0x1000000, %ecx        # imm = 0x1000000
cmovneq %rax, %rdi
xorl %edx, %edx
movl %edx, %esi
movss 0x25aa4(%rip), %xmm0    # 0x171f80
callq 0xc87e0
movss -0x18c(%rbp), %xmm1
movlpd %xmm0, -0xa4(%rbp)
movss -0xa4(%rbp), %xmm0
ucomiss %xmm1, %xmm0
setae %al
andb $0x1, %al
movb %al, -0x99(%rbp)
testb $0x1, -0x99(%rbp)
je 0x14c51a
xorl %eax, %eax
movl %eax, -0x194(%rbp)
jmp 0x14c539
movl -0x1c(%rbp), %edx
andl $0x200000, %edx         # imm = 0x200000
movl $0x1, %eax
movl $0x2, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x194(%rbp)
movl -0x194(%rbp), %eax
movl %eax, -0xa8(%rbp)
movl $0x0, -0xac(%rbp)
movl -0xac(%rbp), %eax
cmpl -0x5c(%rbp), %eax
jge 0x14c776
cmpl $0x0, -0xac(%rbp)
jle 0x14c578
movq -0x38(%rbp), %rax
movss 0x50(%rax), %xmm1
xorps %xmm0, %xmm0
callq 0xdc1c0
movl -0xac(%rbp), %eax
addl $0x1, %eax
cmpl -0x5c(%rbp), %eax
jge 0x14c598
movss -0x94(%rbp), %xmm0
movss %xmm0, -0x198(%rbp)
jmp 0x14c5a8
movss -0x98(%rbp), %xmm0
movss %xmm0, -0x198(%rbp)
movss -0x198(%rbp), %xmm0
callq 0xc6860
movl -0x1c(%rbp), %eax
andl $0x1000000, %eax        # imm = 0x1000000
cmpl $0x0, %eax
je 0x14c6bd
movslq -0xac(%rbp), %rcx
leaq 0xc66ec(%rip), %rax     # 0x212cc0
movq (%rax,%rcx,8), %rax
movq %rax, -0x1b0(%rbp)
movslq -0xac(%rbp), %rcx
leaq -0x70(%rbp), %rax
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x1a8(%rbp)
movb -0x56(%rbp), %al
xorps %xmm0, %xmm0
movss 0x24636(%rip), %xmm1    # 0x170c3c
movss %xmm1, -0x1a0(%rbp)
testb $0x1, %al
movss %xmm0, -0x19c(%rbp)
jne 0x14c62a
movss -0x1a0(%rbp), %xmm0
movss %xmm0, -0x19c(%rbp)
movq -0x1a8(%rbp), %rsi
movq -0x1b0(%rbp), %rdi
movss -0x19c(%rbp), %xmm2
movslq -0xa8(%rbp), %rcx
leaq 0xc66f2(%rip), %rax     # 0x212d40
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0xac(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movss 0x41b98(%rip), %xmm0    # 0x18e200
xorps %xmm1, %xmm1
xorl %ecx, %ecx
callq 0x142f00
andb $0x1, %al
movzbl %al, %ecx
movb -0x81(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
orl %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x81(%rbp)
movb -0x81(%rbp), %al
andb $0x1, %al
movzbl %al, %ecx
movb -0x82(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
orl %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x82(%rbp)
jmp 0x14c744
movslq -0xac(%rbp), %rcx
leaq 0xc65f5(%rip), %rax     # 0x212cc0
movq (%rax,%rcx,8), %rdi
movslq -0xac(%rbp), %rax
leaq -0x80(%rbp), %rsi
shlq $0x2, %rax
addq %rax, %rsi
movb -0x56(%rbp), %dl
movl $0xff, %ecx
xorl %eax, %eax
testb $0x1, %dl
cmovnel %eax, %ecx
movslq -0xa8(%rbp), %rdx
leaq 0xc65e1(%rip), %rax     # 0x212ce0
shlq $0x5, %rdx
addq %rdx, %rax
movslq -0xac(%rbp), %rdx
movq (%rax,%rdx,8), %r8
movss 0x24523(%rip), %xmm0    # 0x170c3c
xorl %r9d, %r9d
movl %r9d, %edx
callq 0x143390
andb $0x1, %al
movzbl %al, %ecx
movb -0x81(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
orl %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x81(%rbp)
movl -0x1c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x14c760
leaq 0x28b51(%rip), %rdi     # 0x1752a7
movl $0x1, %esi
callq 0xde7f0
jmp 0x14c762
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
jmp 0x14c54f
jmp 0x14c9de
movl -0x1c(%rbp), %eax
andl $0x400000, %eax         # imm = 0x400000
cmpl $0x0, %eax
je 0x14c9dc
movl -0x1c(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x14c9dc
testb $0x1, -0x55(%rbp)
je 0x14c834
leaq -0xf0(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movl -0x80(%rbp), %edi
xorl %esi, %esi
movl $0xff, %edx
callq 0x140f50
movl %eax, -0x1bc(%rbp)
movl -0x7c(%rbp), %edi
xorl %esi, %esi
movl $0xff, %edx
callq 0x140f50
movl %eax, -0x1b8(%rbp)
movl -0x78(%rbp), %edi
xorl %esi, %esi
movl $0xff, %edx
callq 0x140f50
movl %eax, -0x1b4(%rbp)
movl -0x74(%rbp), %edi
xorl %esi, %esi
movl $0xff, %edx
callq 0x140f50
movq -0x1c8(%rbp), %rdi
movl -0x1bc(%rbp), %ecx
movl -0x1b8(%rbp), %r8d
movl -0x1b4(%rbp), %r9d
movl $0x40, %esi
leaq 0x4326d(%rip), %rdx     # 0x18fa95
movl %eax, (%rsp)
movb $0x0, %al
callq 0xc4d30
jmp 0x14c8a5
leaq -0xf0(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movl -0x80(%rbp), %edi
xorl %esi, %esi
movl $0xff, %edx
callq 0x140f50
movl %eax, -0x1d0(%rbp)
movl -0x7c(%rbp), %edi
xorl %esi, %esi
movl $0xff, %edx
callq 0x140f50
movl %eax, -0x1cc(%rbp)
movl -0x78(%rbp), %edi
xorl %esi, %esi
movl $0xff, %edx
callq 0x140f50
movq -0x1d8(%rbp), %rdi
movl -0x1d0(%rbp), %ecx
movl -0x1cc(%rbp), %r8d
movl %eax, %r9d
movl $0x40, %esi
leaq 0x43209(%rip), %rdx     # 0x18faa7
movb $0x0, %al
callq 0xc4d30
movss -0x48(%rbp), %xmm0
callq 0xc6860
leaq -0xf0(%rbp), %rsi
leaq 0x431f8(%rip), %rdi     # 0x18fab5
movl $0x40, %edx
movl $0x6, %ecx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
callq 0x149cd0
testb $0x1, %al
jne 0x14c8dd
jmp 0x14c9be
movb $0x1, -0x81(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x23, %ecx
movb %al, -0x1d9(%rbp)
je 0x14c91e
movq -0xf8(%rbp), %rax
movsbl (%rax), %edi
callq 0x140f20
movb %al, -0x1d9(%rbp)
movb -0x1d9(%rbp), %al
testb $0x1, %al
jne 0x14c92a
jmp 0x14c93e
movq -0xf8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xf8(%rbp)
jmp 0x14c8f2
movl $0x0, -0x74(%rbp)
movl $0x0, -0x78(%rbp)
movl $0x0, -0x7c(%rbp)
movl $0x0, -0x80(%rbp)
testb $0x1, -0x55(%rbp)
je 0x14c993
movq -0xf8(%rbp), %rdi
leaq -0x80(%rbp), %rdx
leaq -0x80(%rbp), %rcx
addq $0x4, %rcx
leaq -0x80(%rbp), %r8
addq $0x8, %r8
leaq -0x80(%rbp), %r9
addq $0xc, %r9
leaq 0x4310c(%rip), %rsi     # 0x18fa96
movb $0x0, %al
callq 0xd0d0
jmp 0x14c9bc
movq -0xf8(%rbp), %rdi
leaq -0x80(%rbp), %rdx
leaq -0x80(%rbp), %rcx
addq $0x4, %rcx
leaq -0x80(%rbp), %r8
addq $0x8, %r8
leaq 0x430f3(%rip), %rsi     # 0x18faa8
movb $0x0, %al
callq 0xd0d0
jmp 0x14c9be
movl -0x1c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x14c9da
leaq 0x288d7(%rip), %rdi     # 0x1752a7
movl $0x1, %esi
callq 0xde7f0
jmp 0x14c9dc
jmp 0x14c9de
movq $0x0, -0x100(%rbp)
movl -0x1c(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x14ccdb
movl -0x1c(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x14ca10
movq -0x38(%rbp), %rax
cmpl $0x0, 0x90(%rax)
jne 0x14ca1d
xorps %xmm0, %xmm0
movss %xmm0, -0x1e0(%rbp)
jmp 0x14ca33
movss -0x48(%rbp), %xmm0
movq -0x38(%rbp), %rax
addss 0x50(%rax), %xmm0
movss %xmm0, -0x1e0(%rbp)
movss -0x1e0(%rbp), %xmm0
movss %xmm0, -0x104(%rbp)
movss -0x8c(%rbp), %xmm0
addss -0x104(%rbp), %xmm0
movss -0x88(%rbp), %xmm1
leaq -0x10c(%rbp), %rdi
callq 0xbf4c0
movq -0x28(%rbp), %rax
movq -0x10c(%rbp), %rcx
movq %rcx, 0xd8(%rax)
movq -0x18(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0x1ec(%rbp)
movq -0x18(%rbp), %rax
movss 0x4(%rax), %xmm0
movss %xmm0, -0x1e8(%rbp)
movq -0x18(%rbp), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, -0x1e4(%rbp)
testb $0x1, -0x55(%rbp)
je 0x14cac4
movq -0x18(%rbp), %rax
movss 0xc(%rax), %xmm0
movss %xmm0, -0x1f0(%rbp)
jmp 0x14cad6
movss 0x24170(%rip), %xmm0    # 0x170c3c
movss %xmm0, -0x1f0(%rbp)
jmp 0x14cad6
movss -0x1e4(%rbp), %xmm2
movss -0x1e8(%rbp), %xmm1
movss -0x1ec(%rbp), %xmm0
movss -0x1f0(%rbp), %xmm3
leaq -0x11c(%rbp), %rdi
callq 0xbf4f0
movl -0x1c(%rbp), %eax
movl %eax, -0x1f4(%rbp)
leaq -0x124(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0xbf4c0
movl -0x1f4(%rbp), %edx
movsd -0x124(%rbp), %xmm0
leaq 0x42f8a(%rip), %rdi     # 0x18fabc
leaq -0x11c(%rbp), %rsi
callq 0x14d5d0
testb $0x1, %al
jne 0x14cb47
jmp 0x14cbf6
movl -0x1c(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x14cbf4
movq -0x30(%rbp), %rax
movups -0x11c(%rbp), %xmm0
movups %xmm0, 0x3084(%rax)
leaq 0x2f77a(%rip), %rdi     # 0x17c2e9
xorl %esi, %esi
callq 0xdde00
movq -0x28(%rbp), %rdi
addq $0x12c, %rdi            # imm = 0x12C
callq 0xee510
movlpd %xmm0, -0x134(%rbp)
movq -0x38(%rbp), %rax
movss 0x4c(%rax), %xmm1
leaq -0x13c(%rbp), %rdi
movq %rdi, -0x200(%rbp)
movss 0x253d3(%rip), %xmm0    # 0x171f80
callq 0xbf4c0
movq -0x200(%rbp), %rsi
leaq -0x134(%rbp), %rdi
callq 0x139090
movlpd %xmm0, -0x12c(%rbp)
leaq -0x144(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0xbf4c0
leaq -0x12c(%rbp), %rdi
xorl %esi, %esi
leaq -0x144(%rbp), %rdx
callq 0xdab40
jmp 0x14cbf6
movl -0x1c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x14cc12
leaq 0x2869f(%rip), %rdi     # 0x1752a7
movl $0x1, %esi
callq 0xde7f0
leaq 0x2f6d0(%rip), %rdi     # 0x17c2e9
xorl %esi, %esi
callq 0xde5f0
testb $0x1, %al
jne 0x14cc29
jmp 0x14ccd9
movq -0x30(%rbp), %rax
movq 0x1ae0(%rax), %rax
movq %rax, -0x100(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x50(%rbp), %rax
je 0x14cc59
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
xorl %edx, %edx
callq 0x138a30
callq 0x13d880
movl $0x1f890002, -0x148(%rbp) # imm = 0x1F890002
movl -0x54(%rbp), %eax
andl -0x148(%rbp), %eax
orl $0x700000, %eax         # imm = 0x700000
orl $0x80, %eax
orl $0x40000, %eax          # imm = 0x40000
movl %eax, -0x14c(%rbp)
movss 0x25b4b(%rip), %xmm0    # 0x1727d4
mulss -0x3c(%rbp), %xmm0
callq 0xc6860
movq -0x18(%rbp), %rsi
movl -0x14c(%rbp), %edx
movq -0x30(%rbp), %rcx
addq $0x3084, %rcx           # imm = 0x3084
leaq 0x2f638(%rip), %rdi     # 0x17c2e7
callq 0x14dd20
andb $0x1, %al
movzbl %al, %ecx
movb -0x81(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
orl %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x81(%rbp)
callq 0xde4e0
jmp 0x14ccdb
movq -0x10(%rbp), %rax
cmpq -0x50(%rbp), %rax
je 0x14cd88
movl -0x1c(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0x14cd88
movl -0x1c(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x14cd14
movss -0x44(%rbp), %xmm0
movss %xmm0, -0x204(%rbp)
jmp 0x14cd2a
movss -0x40(%rbp), %xmm0
movq -0x38(%rbp), %rax
addss 0x50(%rax), %xmm0
movss %xmm0, -0x204(%rbp)
movss -0x204(%rbp), %xmm0
movss %xmm0, -0x150(%rbp)
movss -0x8c(%rbp), %xmm0
addss -0x150(%rbp), %xmm0
movss -0x88(%rbp), %xmm1
movq -0x38(%rbp), %rax
addss 0x3c(%rax), %xmm1
leaq -0x158(%rbp), %rdi
callq 0xbf4c0
movq -0x28(%rbp), %rax
movq -0x158(%rbp), %rcx
movq %rcx, 0xd8(%rax)
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
xorl %edx, %edx
callq 0x138a30
testb $0x1, -0x81(%rbp)
je 0x14cef5
cmpq $0x0, -0x100(%rbp)
jne 0x14cef5
testb $0x1, -0x82(%rbp)
jne 0x14cdf8
movl $0x0, -0x15c(%rbp)
cmpl $0x4, -0x15c(%rbp)
jge 0x14cdf6
movslq -0x15c(%rbp), %rax
cvtsi2ssl -0x80(%rbp,%rax,4), %xmm0
movss 0x25988(%rip), %xmm1    # 0x17275c
divss %xmm1, %xmm0
movslq -0x15c(%rbp), %rax
movss %xmm0, -0x70(%rbp,%rax,4)
movl -0x15c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x15c(%rbp)
jmp 0x14cdb6
jmp 0x14cdf8
movl -0x1c(%rbp), %eax
andl $0x200000, %eax         # imm = 0x200000
cmpl $0x0, %eax
je 0x14ce74
movl -0x1c(%rbp), %eax
andl $0x8000000, %eax        # imm = 0x8000000
cmpl $0x0, %eax
je 0x14ce74
movss -0x70(%rbp), %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x3070(%rax)
movss -0x6c(%rbp), %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x3074(%rax)
movss -0x70(%rbp), %xmm0
movss -0x6c(%rbp), %xmm1
movss -0x68(%rbp), %xmm2
leaq -0x70(%rbp), %rdi
leaq -0x70(%rbp), %rsi
addq $0x4, %rsi
leaq -0x70(%rbp), %rdx
addq $0x8, %rdx
callq 0xc5c80
movq -0x30(%rbp), %rax
movq -0x70(%rbp), %rcx
movq %rcx, 0x3078(%rax)
movl -0x68(%rbp), %ecx
movl %ecx, 0x3080(%rax)
movl -0x1c(%rbp), %eax
andl $0x100000, %eax         # imm = 0x100000
cmpl $0x0, %eax
je 0x14ceb6
movl -0x1c(%rbp), %eax
andl $0x10000000, %eax       # imm = 0x10000000
cmpl $0x0, %eax
je 0x14ceb6
movss -0x70(%rbp), %xmm0
movss -0x6c(%rbp), %xmm1
movss -0x68(%rbp), %xmm2
leaq -0x70(%rbp), %rdi
leaq -0x70(%rbp), %rsi
addq $0x4, %rsi
leaq -0x70(%rbp), %rdx
addq $0x8, %rdx
callq 0xc5b00
movss -0x70(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, (%rax)
movss -0x6c(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x4(%rax)
movss -0x68(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x8(%rax)
testb $0x1, -0x55(%rbp)
je 0x14cef3
movss -0x64(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0xc(%rax)
jmp 0x14cef5
callq 0xdb640
callq 0xdbe80
movq -0x28(%rbp), %rax
movl 0x128(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x14d018
movl -0x1c(%rbp), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
jne 0x14d018
callq 0xe0440
testb $0x1, %al
jne 0x14cf34
jmp 0x14d018
movb $0x0, -0x15d(%rbp)
leaq 0x2f3de(%rip), %rdi     # 0x17c320
xorl %esi, %esi
callq 0xe0600
movq %rax, -0x168(%rbp)
cmpq $0x0, -0x168(%rbp)
je 0x14cf82
movq -0x18(%rbp), %rax
movq -0x168(%rbp), %rcx
movq (%rcx), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
movb $0x1, -0x15d(%rbp)
movb $0x1, -0x81(%rbp)
leaq 0x2f39e(%rip), %rdi     # 0x17c327
xorl %esi, %esi
callq 0xe0600
movq %rax, -0x170(%rbp)
cmpq $0x0, -0x170(%rbp)
je 0x14cfca
movq -0x18(%rbp), %rdi
movq -0x170(%rbp), %rax
movq (%rax), %rsi
movslq -0x5c(%rbp), %rdx
shlq $0x2, %rdx
callq 0xd0a0
movb $0x1, -0x15d(%rbp)
movb $0x1, -0x81(%rbp)
testb $0x1, -0x15d(%rbp)
je 0x14d013
movl -0x1c(%rbp), %eax
andl $0x10000000, %eax       # imm = 0x10000000
cmpl $0x0, %eax
je 0x14d013
movq -0x18(%rbp), %rax
movss (%rax), %xmm0
movq -0x18(%rbp), %rax
movss 0x4(%rax), %xmm1
movq -0x18(%rbp), %rax
movss 0x8(%rax), %xmm2
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
movq -0x18(%rbp), %rdx
addq $0x8, %rdx
callq 0xc5b00
callq 0xe09b0
cmpq $0x0, -0x100(%rbp)
je 0x14d057
movq -0x30(%rbp), %rax
cmpl $0x0, 0x1b30(%rax)
je 0x14d057
movq -0x30(%rbp), %rax
movq 0x1b60(%rax), %rax
cmpq -0x100(%rbp), %rax
jne 0x14d057
movq -0x30(%rbp), %rax
movl 0x1b30(%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x124(%rax)
testb $0x1, -0x81(%rbp)
je 0x14d06f
movq -0x28(%rbp), %rax
movl 0x124(%rax), %edi
callq 0xca110
movb -0x81(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
nopl (%rax,%rax)