// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui_tables.cpp
// Function: ImGui::BeginTableEx(char const*, unsigned int, int, int, ImVec2 const&, float)
bool    ImGui::BeginTableEx(const char* name, ImGuiID id, int columns_count, ImGuiTableFlags flags, const ImVec2& outer_size, float inner_width)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* outer_window = GetCurrentWindow();
    if (outer_window->SkipItems) // Consistent with other tables + beneficial side effect that assert on miscalling EndTable() will be more visible.
        return false;

    // Sanity checks
    IM_ASSERT(columns_count > 0 && columns_count <= IMGUI_TABLE_MAX_COLUMNS && "Only 1..64 columns allowed!");
    if (flags & ImGuiTableFlags_ScrollX)
        IM_ASSERT(inner_width >= 0.0f);

    // If an outer size is specified ahead we will be able to early out when not visible. Exact clipping rules may evolve.
    const bool use_child_window = (flags & (ImGuiTableFlags_ScrollX | ImGuiTableFlags_ScrollY)) != 0;
    const ImVec2 avail_size = GetContentRegionAvail();
    ImVec2 actual_outer_size = CalcItemSize(outer_size, ImMax(avail_size.x, 1.0f), use_child_window ? ImMax(avail_size.y, 1.0f) : 0.0f);
    ImRect outer_rect(outer_window->DC.CursorPos, outer_window->DC.CursorPos + actual_outer_size);
    if (use_child_window && IsClippedEx(outer_rect, 0, false))
    {
        ItemSize(outer_rect);
        return false;
    }

    // Acquire storage for the table
    ImGuiTable* table = g.Tables.GetOrAddByKey(id);
    const int instance_no = (table->LastFrameActive != g.FrameCount) ? 0 : table->InstanceCurrent + 1;
    const ImGuiID instance_id = id + instance_no;
    const ImGuiTableFlags table_last_flags = table->Flags;
    if (instance_no > 0)
        IM_ASSERT(table->ColumnsCount == columns_count && "BeginTable(): Cannot change columns count mid-frame while preserving same ID");

    // Fix flags
    table->IsDefaultSizingPolicy = (flags & ImGuiTableFlags_SizingMask_) == 0;
    flags = TableFixFlags(flags, outer_window);

    // Initialize
    table->ID = id;
    table->Flags = flags;
    table->InstanceCurrent = (ImS16)instance_no;
    table->LastFrameActive = g.FrameCount;
    table->OuterWindow = table->InnerWindow = outer_window;
    table->ColumnsCount = columns_count;
    table->IsLayoutLocked = false;
    table->InnerWidth = inner_width;
    table->UserOuterSize = outer_size;

    // When not using a child window, WorkRect.Max will grow as we append contents.
    if (use_child_window)
    {
        // Ensure no vertical scrollbar appears if we only want horizontal one, to make flag consistent
        // (we have no other way to disable vertical scrollbar of a window while keeping the horizontal one showing)
        ImVec2 override_content_size(FLT_MAX, FLT_MAX);
        if ((flags & ImGuiTableFlags_ScrollX) && !(flags & ImGuiTableFlags_ScrollY))
            override_content_size.y = FLT_MIN;

        // Ensure specified width (when not specified, Stretched columns will act as if the width == OuterWidth and
        // never lead to any scrolling). We don't handle inner_width < 0.0f, we could potentially use it to right-align
        // based on the right side of the child window work rect, which would require knowing ahead if we are going to
        // have decoration taking horizontal spaces (typically a vertical scrollbar).
        if ((flags & ImGuiTableFlags_ScrollX) && inner_width > 0.0f)
            override_content_size.x = inner_width;

        if (override_content_size.x != FLT_MAX || override_content_size.y != FLT_MAX)
            SetNextWindowContentSize(ImVec2(override_content_size.x != FLT_MAX ? override_content_size.x : 0.0f, override_content_size.y != FLT_MAX ? override_content_size.y : 0.0f));

        // Reset scroll if we are reactivating it
        if ((table_last_flags & (ImGuiTableFlags_ScrollX | ImGuiTableFlags_ScrollY)) == 0)
            SetNextWindowScroll(ImVec2(0.0f, 0.0f));

        // Create scrolling region (without border and zero window padding)
        ImGuiWindowFlags child_flags = (flags & ImGuiTableFlags_ScrollX) ? ImGuiWindowFlags_HorizontalScrollbar : ImGuiWindowFlags_None;
        BeginChildEx(name, instance_id, outer_rect.GetSize(), false, child_flags);
        table->InnerWindow = g.CurrentWindow;
        table->WorkRect = table->InnerWindow->WorkRect;
        table->OuterRect = table->InnerWindow->Rect();
        table->InnerRect = table->InnerWindow->InnerRect;
        IM_ASSERT(table->InnerWindow->WindowPadding.x == 0.0f && table->InnerWindow->WindowPadding.y == 0.0f && table->InnerWindow->WindowBorderSize == 0.0f);
    }
    else
    {
        // For non-scrolling tables, WorkRect == OuterRect == InnerRect.
        // But at this point we do NOT have a correct value for .Max.y (unless a height has been explicitly passed in). It will only be updated in EndTable().
        table->WorkRect = table->OuterRect = table->InnerRect = outer_rect;
    }

    // Push a standardized ID for both child-using and not-child-using tables
    PushOverrideID(instance_id);

    // Backup a copy of host window members we will modify
    ImGuiWindow* inner_window = table->InnerWindow;
    table->HostIndentX = inner_window->DC.Indent.x;
    table->HostClipRect = inner_window->ClipRect;
    table->HostSkipItems = inner_window->SkipItems;
    table->HostBackupWorkRect = inner_window->WorkRect;
    table->HostBackupParentWorkRect = inner_window->ParentWorkRect;
    table->HostBackupColumnsOffset = outer_window->DC.ColumnsOffset;
    table->HostBackupPrevLineSize = inner_window->DC.PrevLineSize;
    table->HostBackupCurrLineSize = inner_window->DC.CurrLineSize;
    table->HostBackupCursorMaxPos = inner_window->DC.CursorMaxPos;
    table->HostBackupItemWidth = outer_window->DC.ItemWidth;
    table->HostBackupItemWidthStackSize = outer_window->DC.ItemWidthStack.Size;
    inner_window->DC.PrevLineSize = inner_window->DC.CurrLineSize = ImVec2(0.0f, 0.0f);

    // Padding and Spacing
    // - None               ........Content..... Pad .....Content........
    // - PadOuter           | Pad ..Content..... Pad .....Content.. Pad |
    // - PadInner           ........Content.. Pad | Pad ..Content........
    // - PadOuter+PadInner  | Pad ..Content.. Pad | Pad ..Content.. Pad |
    const bool pad_outer_x = (flags & ImGuiTableFlags_NoPadOuterX) ? false : (flags & ImGuiTableFlags_PadOuterX) ? true : (flags & ImGuiTableFlags_BordersOuterV) != 0;
    const bool pad_inner_x = (flags & ImGuiTableFlags_NoPadInnerX) ? false : true;
    const float inner_spacing_for_border = (flags & ImGuiTableFlags_BordersInnerV) ? TABLE_BORDER_SIZE : 0.0f;
    const float inner_spacing_explicit = (pad_inner_x && (flags & ImGuiTableFlags_BordersInnerV) == 0) ? g.Style.CellPadding.x : 0.0f;
    const float inner_padding_explicit = (pad_inner_x && (flags & ImGuiTableFlags_BordersInnerV) != 0) ? g.Style.CellPadding.x : 0.0f;
    table->CellSpacingX1 = inner_spacing_explicit + inner_spacing_for_border;
    table->CellSpacingX2 = inner_spacing_explicit;
    table->CellPaddingX = inner_padding_explicit;
    table->CellPaddingY = g.Style.CellPadding.y;

    const float outer_padding_for_border = (flags & ImGuiTableFlags_BordersOuterV) ? TABLE_BORDER_SIZE : 0.0f;
    const float outer_padding_explicit = pad_outer_x ? g.Style.CellPadding.x : 0.0f;
    table->OuterPaddingX = (outer_padding_for_border + outer_padding_explicit) - table->CellPaddingX;

    table->CurrentColumn = -1;
    table->CurrentRow = -1;
    table->RowBgColorCounter = 0;
    table->LastRowFlags = ImGuiTableRowFlags_None;
    table->InnerClipRect = (inner_window == outer_window) ? table->WorkRect : inner_window->ClipRect;
    table->InnerClipRect.ClipWith(table->WorkRect);     // We need this to honor inner_width
    table->InnerClipRect.ClipWithFull(table->HostClipRect);
    table->InnerClipRect.Max.y = (flags & ImGuiTableFlags_NoHostExtendY) ? ImMin(table->InnerClipRect.Max.y, inner_window->WorkRect.Max.y) : inner_window->ClipRect.Max.y;

    table->RowPosY1 = table->RowPosY2 = table->WorkRect.Min.y; // This is needed somehow
    table->RowTextBaseline = 0.0f; // This will be cleared again by TableBeginRow()
    table->FreezeRowsRequest = table->FreezeRowsCount = 0; // This will be setup by TableSetupScrollFreeze(), if any
    table->FreezeColumnsRequest = table->FreezeColumnsCount = 0;
    table->IsUnfrozenRows = true;
    table->DeclColumnsCount = 0;

    // Using opaque colors facilitate overlapping elements of the grid
    table->BorderColorStrong = GetColorU32(ImGuiCol_TableBorderStrong);
    table->BorderColorLight = GetColorU32(ImGuiCol_TableBorderLight);

    // Make table current
    const int table_idx = g.Tables.GetIndex(table);
    g.CurrentTableStack.push_back(ImGuiPtrOrIndex(table_idx));
    g.CurrentTable = table;
    outer_window->DC.CurrentTableIdx = table_idx;
    if (inner_window != outer_window) // So EndChild() within the inner window can restore the table properly.
        inner_window->DC.CurrentTableIdx = table_idx;

    if ((table_last_flags & ImGuiTableFlags_Reorderable) && (flags & ImGuiTableFlags_Reorderable) == 0)
        table->IsResetDisplayOrderRequest = true;

    // Mark as used
    if (table_idx >= g.TablesLastTimeActive.Size)
        g.TablesLastTimeActive.resize(table_idx + 1, -1.0f);
    g.TablesLastTimeActive[table_idx] = (float)g.Time;
    table->MemoryCompacted = false;

    // Setup memory buffer (clear data if columns count changed)
    const int stored_size = table->Columns.size();
    if (stored_size != 0 && stored_size != columns_count)
    {
        IM_FREE(table->RawData);
        table->RawData = NULL;
    }
    if (table->RawData == NULL)
    {
        TableBeginInitMemory(table, columns_count);
        table->IsInitializing = table->IsSettingsRequestLoad = true;
    }
    if (table->IsResetAllRequest)
        TableResetSettings(table);
    if (table->IsInitializing)
    {
        // Initialize
        table->SettingsOffset = -1;
        table->IsSortSpecsDirty = true;
        table->InstanceInteracted = -1;
        table->ContextPopupColumn = -1;
        table->ReorderColumn = table->ResizedColumn = table->LastResizedColumn = -1;
        table->AutoFitSingleColumn = -1;
        table->HoveredColumnBody = table->HoveredColumnBorder = -1;
        for (int n = 0; n < columns_count; n++)
        {
            ImGuiTableColumn* column = &table->Columns[n];
            float width_auto = column->WidthAuto;
            *column = ImGuiTableColumn();
            column->WidthAuto = width_auto;
            column->IsPreserveWidthAuto = true; // Preserve WidthAuto when reinitializing a live table: not technically necessary but remove a visible flicker
            column->DisplayOrder = table->DisplayOrderToIndex[n] = (ImGuiTableColumnIdx)n;
            column->IsEnabled = column->IsEnabledNextFrame = true;
        }
    }

    // Load settings
    if (table->IsSettingsRequestLoad)
        TableLoadSettings(table);

    // Handle DPI/font resize
    // This is designed to facilitate DPI changes with the assumption that e.g. style.CellPadding has been scaled as well.
    // It will also react to changing fonts with mixed results. It doesn't need to be perfect but merely provide a decent transition.
    // FIXME-DPI: Provide consistent standards for reference size. Perhaps using g.CurrentDpiScale would be more self explanatory.
    // This is will lead us to non-rounded WidthRequest in columns, which should work but is a poorly tested path.
    const float new_ref_scale_unit = g.FontSize; // g.Font->GetCharAdvance('A') ?
    if (table->RefScale != 0.0f && table->RefScale != new_ref_scale_unit)
    {
        const float scale_factor = new_ref_scale_unit / table->RefScale;
        //IMGUI_DEBUG_LOG("[table] %08X RefScaleUnit %.3f -> %.3f, scaling width by %.3f\n", table->ID, table->RefScaleUnit, new_ref_scale_unit, scale_factor);
        for (int n = 0; n < columns_count; n++)
            table->Columns[n].WidthRequest = table->Columns[n].WidthRequest * scale_factor;
    }
    table->RefScale = new_ref_scale_unit;

    // Disable output until user calls TableNextRow() or TableNextColumn() leading to the TableUpdateLayout() call..
    // This is not strictly necessary but will reduce cases were "out of table" output will be misleading to the user.
    // Because we cannot safely assert in EndTable() when no rows have been created, this seems like our best option.
    inner_window->SkipItems = true;

    // Clear names
    // At this point the ->NameOffset field of each column will be invalid until TableUpdateLayout() or the first call to TableSetupColumn()
    if (table->ColumnsNames.Buf.Size > 0)
        table->ColumnsNames.Buf.resize(0);

    // Apply queued resizing/reordering/hiding requests
    TableBeginApplyRequests(table);

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, -0x40(%rbp)
leaq 0x75b7d(%rip), %rax     # 0xfbcd0
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq 0x1ae0(%rax), %rbx
movb $0x1, 0x90(%rbx)
cmpb $0x0, 0x93(%rbx)
jne 0x86223
movq -0x40(%rbp), %rax
decl %eax
cmpl $0x3f, %eax
ja 0x86dec
movq %r8, %r15
movl %ecx, %r12d
movl %esi, %r13d
movq %rdi, %r14
btl $0x18, %ecx
jae 0x861a2
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x86e0b
movaps %xmm0, -0x70(%rbp)
callq 0x51f24
movaps %xmm0, %xmm2
movsd (%r15), %xmm0
movaps %xmm2, %xmm1
maxss 0x2ee26(%rip), %xmm1    # 0xb4fe4
testl $0x3000000, %r12d       # imm = 0x3000000
je 0x8622a
shufps $0x55, %xmm2, %xmm2     # xmm2 = xmm2[1,1,1,1]
maxss 0x2ee11(%rip), %xmm2    # 0xb4fe4
callq 0x5620c
movss 0xd8(%rbx), %xmm1
addss %xmm0, %xmm1
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
addss 0xdc(%rbx), %xmm0
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movq 0xd8(%rbx), %rax
leaq -0x58(%rbp), %rdi
movq %rax, (%rdi)
movlps %xmm1, 0x8(%rdi)
xorl %esi, %esi
xorl %edx, %edx
callq 0x46579
testb %al, %al
je 0x8625c
leaq -0x58(%rbp), %rdi
movss 0x2edb2(%rip), %xmm0    # 0xb4fd0
callq 0x559be
xorl %eax, %eax
jmp 0x86d85
xorps %xmm2, %xmm2
callq 0x5620c
movss 0xd8(%rbx), %xmm1
addss %xmm0, %xmm1
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
addss 0xdc(%rbx), %xmm0
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movq 0xd8(%rbx), %rax
movq %rax, -0x58(%rbp)
movlps %xmm1, -0x50(%rbp)
movq %r15, -0x78(%rbp)
movq %r14, -0x80(%rbp)
movq %rbx, -0x30(%rbp)
movq -0x38(%rbp), %rbx
leaq 0x20b0(%rbx), %r15
movq %r15, %rdi
movl %r13d, %esi
callq 0x8f990
movq %rax, %r14
movl 0x1a68(%rbx), %eax
cmpl %eax, 0x68(%r14)
jne 0x862d5
movswl 0x78(%r14), %edx
leal 0x1(%rdx), %ecx
leal (%rdx,%r13), %r9d
incl %r9d
movl 0x4(%r14), %r8d
testl %edx, %edx
movaps -0x70(%rbp), %xmm2
js 0x862e8
movq -0x40(%rbp), %rdx
cmpl %edx, 0x6c(%r14)
movq -0x30(%rbp), %rbx
je 0x862ec
leaq 0x48c5d(%rip), %rdi     # 0xcef1a
leaq 0x48bc6(%rip), %rsi     # 0xcee8a
leaq 0x48bde(%rip), %rcx     # 0xceea9
movl $0x148, %edx            # imm = 0x148
callq 0xc140
movl 0x4(%r14), %r8d
xorl %ecx, %ecx
movl %r13d, %r9d
movq -0x30(%rbp), %rbx
movaps -0x70(%rbp), %xmm2
jmp 0x862ec
movq -0x30(%rbp), %rbx
movl %r12d, %edx
movl %r12d, %esi
andl $0xe000, %edx           # imm = 0xE000
sete 0x254(%r14)
jne 0x8631f
movl $0x2000, %edx           # imm = 0x2000
btl $0x18, %r12d
jb 0x8631a
testb $0x40, 0xc(%rbx)
movl $0x8000, %esi           # imm = 0x8000
cmovel %esi, %edx
movl %edx, %esi
orl %r12d, %esi
movq %r15, -0x88(%rbp)
movl %esi, %edi
orl $0x40000, %edi          # imm = 0x40000
cmpl $0x4000, %edx           # imm = 0x4000
cmovnel %esi, %edi
movl %edi, %edx
andl $0x1, %edx
shll $0x9, %edx
orl %edi, %edx
movl %edx, %esi
andl $0xfffcffff, %esi       # imm = 0xFFFCFFFF
testl $0x3000000, %edi        # imm = 0x3000000
cmovel %edx, %esi
movl %esi, %r15d
andl $0xfffff7ff, %r15d      # imm = 0xFFFFF7FF
btl $0xc, %esi
cmovael %esi, %r15d
movl %r15d, %edx
orl $0x10, %edx
testb $0xf, %r15b
cmovel %edx, %r15d
movq 0x390(%rbx), %rsi
btl $0x8, 0xc(%rsi)
cmovbl %edx, %r15d
movl %r13d, (%r14)
movl %r15d, 0x4(%r14)
movw %cx, 0x78(%r14)
movl %eax, 0x68(%r14)
movq %rbx, 0x1d0(%r14)
movq %rbx, 0x1c8(%r14)
movq -0x40(%rbp), %rax
movl %eax, 0x6c(%r14)
movb $0x0, 0x248(%r14)
movss %xmm2, 0xd4(%r14)
movq -0x78(%rbp), %rax
movq (%rax), %rax
movq %rax, 0x1b4(%r14)
testl $0x3000000, %r12d       # imm = 0x3000000
movl %r8d, -0x44(%rbp)
je 0x86447
movl $0x1000000, %ecx        # imm = 0x1000000
movl %r15d, %ebx
andl %ecx, %ebx
movl %r15d, %eax
andl $0x3000000, %eax        # imm = 0x3000000
cmpl %ecx, %eax
sete %cl
xorps %xmm0, %xmm0
cmpltss %xmm2, %xmm0
movss 0x2f445(%rip), %xmm1    # 0xb5840
testl %ebx, %ebx
movq -0x38(%rbp), %r12
jne 0x86406
movaps %xmm1, %xmm2
andps %xmm0, %xmm2
andnps %xmm1, %xmm0
orps %xmm2, %xmm0
ucomiss %xmm1, %xmm0
setp %dl
setne %sil
orb %dl, %sil
orb %cl, %sil
cmpb $0x1, %sil
jne 0x86498
movaps %xmm0, %xmm1
cmpneqss 0x2f40f(%rip), %xmm1    # 0xb5840
andps %xmm0, %xmm1
cmpl $0x1000000, %eax        # imm = 0x1000000
movl %r9d, -0x70(%rbp)
movl %r8d, %r13d
je 0x86474
xorps %xmm0, %xmm0
jmp 0x8647c
movups -0x58(%rbp), %xmm0
movups %xmm0, 0xfc(%r14)
movups -0x58(%rbp), %xmm0
movups %xmm0, 0xec(%r14)
movups -0x58(%rbp), %xmm0
movups %xmm0, 0x10c(%r14)
movq -0x38(%rbp), %r12
jmp 0x8658f
movss 0x489a4(%rip), %xmm0    # 0xcee20
leaq -0xd0(%rbp), %rdi
movss %xmm1, (%rdi)
movss %xmm0, 0x4(%rdi)
callq 0x5465e
movl %r13d, %r8d
movl -0x70(%rbp), %r9d
testl $0x3000000, %r8d        # imm = 0x3000000
jne 0x864ba
leaq -0xd0(%rbp), %rdi
movq $0x0, (%rdi)
movl %r9d, %r13d
callq 0x54693
movl %r13d, %r9d
movss -0x50(%rbp), %xmm0
movss -0x4c(%rbp), %xmm1
subss -0x58(%rbp), %xmm0
subss -0x54(%rbp), %xmm1
shrl $0xd, %ebx
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
leaq -0xd0(%rbp), %rdx
movlps %xmm0, (%rdx)
movq -0x80(%rbp), %rdi
movl %r9d, %esi
xorl %ecx, %ecx
movl %ebx, %r8d
movl %r9d, %ebx
callq 0x51d01
movl %ebx, %r9d
movq 0x1ae0(%r12), %rax
movq %rax, 0x1d0(%r14)
movups 0x238(%rax), %xmm0
movups %xmm0, 0x10c(%r14)
movss 0x10(%rax), %xmm0
movss 0x14(%rax), %xmm1
addss 0x18(%rax), %xmm0
addss 0x1c(%rax), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movsd 0x10(%rax), %xmm1
movlhps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movups %xmm1, 0xec(%r14)
movups 0x218(%rax), %xmm0
movups %xmm0, 0xfc(%r14)
movss 0x40(%rax), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
movq -0x30(%rbp), %rbx
jne 0x86dcd
jp 0x86dcd
movss 0x44(%rax), %xmm1
ucomiss %xmm0, %xmm1
jne 0x86dcd
jp 0x86dcd
movss 0x4c(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x86dcd
jp 0x86dcd
movl %r9d, %edi
callq 0x54f5b
movq 0x1d0(%r14), %r8
movss 0x118(%r8), %xmm0
movss %xmm0, 0xb0(%r14)
movups 0x258(%r8), %xmm0
movups %xmm0, 0x15c(%r14)
movb 0x93(%r8), %al
movb %al, 0x256(%r14)
movups 0x238(%r8), %xmm0
movups %xmm0, 0x16c(%r14)
movups 0x248(%r8), %xmm0
movups %xmm0, 0x17c(%r14)
movl 0x11c(%rbx), %eax
movl %eax, 0x1bc(%r14)
movq 0x108(%r8), %rax
movq %rax, 0x19c(%r14)
movq 0x100(%r8), %rax
movq %rax, 0x1a4(%r14)
movq 0xf0(%r8), %rax
movq %rax, 0x1ac(%r14)
movss 0x1d0(%rbx), %xmm0
movss %xmm0, 0x1c0(%r14)
movl 0x1d8(%rbx), %eax
movl %eax, 0x1c4(%r14)
btl $0x16, %r15d
setae %al
testl $0x200400, %r15d        # imm = 0x200400
setne %cl
btl $0x9, %r15d
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
jae 0x8666a
movss 0x2e97a(%rip), %xmm1    # 0xb4fe4
movl %r15d, %edx
andl $0x800200, %edx         # imm = 0x800200
xorps %xmm2, %xmm2
movups %xmm2, 0x100(%r8)
cmpl $0x200, %edx            # imm = 0x200
je 0x86696
testl %edx, %edx
jne 0x866a0
movss 0x15b8(%r12), %xmm2
jmp 0x866a3
movss 0x15b8(%r12), %xmm0
xorps %xmm2, %xmm2
andb %cl, %al
addss %xmm2, %xmm1
movss %xmm1, 0xc4(%r14)
movss %xmm2, 0xc8(%r14)
movss %xmm0, 0xbc(%r14)
movss 0x15bc(%r12), %xmm1
movss %xmm1, 0xc0(%r14)
btl $0xa, %r15d
xorps %xmm2, %xmm2
xorps %xmm1, %xmm1
jae 0x866ec
movss 0x2e8f8(%rip), %xmm1    # 0xb4fe4
leaq 0x258(%r8), %rcx
leaq 0x15c(%r14), %rsi
testb %al, %al
je 0x86708
movss 0x15b8(%r12), %xmm2
addss %xmm2, %xmm1
subss %xmm0, %xmm1
movss %xmm1, 0xb8(%r14)
movq $-0x1, 0x70(%r14)
movl $0x0, 0x94(%r14)
movzwl 0x90(%r14), %eax
movl %eax, 0x90(%r14)
leaq 0x10c(%r14), %rax
cmpq %rbx, %r8
cmoveq %rax, %rcx
movq %r14, %rdi
addq $0x11c, %rdi            # imm = 0x11C
movups (%rcx), %xmm0
movups %xmm0, 0x11c(%r14)
movss 0x11c(%r14), %xmm0
movss 0x120(%r14), %xmm1
movss 0x10c(%r14), %xmm2
movss 0x110(%r14), %xmm3
movaps %xmm2, %xmm4
cmpless %xmm0, %xmm4
andps %xmm4, %xmm0
andnps %xmm2, %xmm4
orps %xmm0, %xmm4
movaps %xmm3, %xmm0
cmpless %xmm1, %xmm0
andps %xmm0, %xmm1
andnps %xmm3, %xmm0
orps %xmm1, %xmm0
unpcklps %xmm0, %xmm4            # xmm4 = xmm4[0],xmm0[0],xmm4[1],xmm0[1]
movlps %xmm4, 0x11c(%r14)
movss 0x124(%r14), %xmm0
movss 0x128(%r14), %xmm1
minss 0x114(%r14), %xmm0
minss 0x118(%r14), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movlps %xmm0, 0x124(%r14)
movq %r8, %rbx
callq 0x5e30c
btl $0x11, %r15d
movq %rbx, -0x70(%rbp)
jb 0x867fb
movss 0x264(%rbx), %xmm0
jmp 0x8680c
movss 0x128(%r14), %xmm0
minss 0x244(%rbx), %xmm0
movss %xmm0, 0x128(%r14)
movss 0x110(%r14), %xmm0
movss %xmm0, 0x80(%r14)
movss %xmm0, 0x7c(%r14)
xorl %eax, %eax
movl %eax, 0x88(%r14)
movl %eax, 0x240(%r14)
movb $0x1, 0x253(%r14)
movb $0x0, 0x233(%r14)
movss 0x2e78f(%rip), %xmm0    # 0xb4fe4
movl $0x2b, %edi
callq 0x43bca
movl %eax, 0xa0(%r14)
movl $0x2c, %edi
movss 0x2e771(%rip), %xmm0    # 0xb4fe4
callq 0x43bca
movl %eax, 0xa4(%r14)
movq -0x88(%rbp), %rdi
movq %r14, %rsi
callq 0x8fa00
movl %eax, %ebx
movl 0x20d8(%r12), %eax
cmpl 0x20dc(%r12), %eax
jne 0x868b6
leal 0x1(%rax), %edx
testl %eax, %eax
je 0x868c4
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x868c9
movq -0x40(%rbp), %rcx
movq 0x20e0(%r12), %r13
jmp 0x86931
movl $0x8, %ecx
cmpl %edx, %ecx
cmovgl %ecx, %edx
movl %edx, -0x78(%rbp)
movslq %edx, %rdi
shlq $0x4, %rdi
callq 0x41c63
movq %rax, %r13
movq -0x38(%rbp), %r12
movq 0x20e0(%r12), %rsi
testq %rsi, %rsi
je 0x86912
movslq 0x20d8(%r12), %rdx
shlq $0x4, %rdx
movq %r13, %rdi
callq 0xc080
movq 0x20e0(%r12), %rdi
callq 0x41d3c
movq %r13, 0x20e0(%r12)
movl -0x78(%rbp), %eax
movl %eax, 0x20dc(%r12)
movl 0x20d8(%r12), %eax
movq -0x40(%rbp), %rcx
movl -0x44(%rbp), %edi
cltq
shlq $0x4, %rax
movq $0x0, (%r13,%rax)
movl %ebx, 0x8(%r13,%rax)
incl 0x20d8(%r12)
movq %r14, 0x20a8(%r12)
movq -0x30(%rbp), %rax
movl %ebx, 0x1b8(%rax)
movq -0x70(%rbp), %rdx
cmpq %rax, %rdx
je 0x86971
movl %ebx, 0x1b8(%rdx)
testb $0x2, %dil
movq %rcx, %r13
je 0x86988
andl $0x2, %r15d
jne 0x86988
movb $0x1, 0x252(%r14)
movl 0x20e8(%r12), %eax
cmpl %eax, %ebx
jge 0x8699c
movl %eax, %r15d
jmp 0x86a5d
leal 0x1(%rbx), %r15d
movl 0x20ec(%r12), %ecx
cmpl %ebx, %ecx
jg 0x86a35
testl %ecx, %ecx
je 0x869c6
movl %ecx, %r13d
shrl $0x1f, %r13d
addl %ecx, %r13d
sarl %r13d
addl %ecx, %r13d
jmp 0x869cc
movl $0x8, %r13d
cmpl %r15d, %r13d
cmovlel %r15d, %r13d
movslq %r13d, %rdi
shlq $0x2, %rdi
callq 0x41c63
movq -0x38(%rbp), %r12
movq 0x20f0(%r12), %rsi
testq %rsi, %rsi
je 0x86a19
movslq 0x20e8(%r12), %rdx
shlq $0x2, %rdx
movq %rax, %rdi
movq %rax, -0x30(%rbp)
callq 0xc080
movq 0x20f0(%r12), %rdi
callq 0x41d3c
movq -0x30(%rbp), %rax
movq %rax, 0x20f0(%r12)
movl %r13d, 0x20ec(%r12)
movl 0x20e8(%r12), %eax
movq -0x40(%rbp), %r13
cmpl %ebx, %eax
jg 0x86a55
cltq
movslq %r15d, %rcx
movq 0x20f0(%r12), %rdx
movl $0xbf800000, (%rdx,%rax,4) # imm = 0xBF800000
incq %rax
cmpq %rax, %rcx
jne 0x86a3e
movl %r15d, 0x20e8(%r12)
testl %ebx, %ebx
js 0x86e2a
cmpl %ebx, %r15d
jle 0x86e2a
xorps %xmm0, %xmm0
cvtsd2ss 0x1a60(%r12), %xmm0
movq 0x20f0(%r12), %rax
movl %ebx, %ecx
movss %xmm0, (%rax,%rcx,4)
movb $0x0, 0x255(%r14)
movq 0x18(%r14), %rax
subq 0x10(%r14), %rax
movq 0x8(%r14), %rdi
shrq $0x3, %rax
imull $0xc4ec4ec5, %eax, %eax # imm = 0xC4EC4EC5
testl %eax, %eax
sete %cl
cmpl %r13d, %eax
sete %al
orb %cl, %al
je 0x86abe
testq %rdi, %rdi
jne 0x86b25
jmp 0x86acb
callq 0x41d3c
movq $0x0, 0x8(%r14)
imull $0x68, %r13d, %ebx
imull $0x69, %r13d, %r12d
imull $0x71, %r13d, %r15d
movq %r15, %rdi
callq 0x41c63
movq %rax, 0x8(%r14)
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0xc260
movq 0x8(%r14), %rax
addq %rax, %rbx
movq %rax, 0x10(%r14)
movq %rbx, 0x18(%r14)
addq %rax, %r12
movq %rbx, 0x20(%r14)
movq %r12, 0x28(%r14)
addq %r15, %rax
movq %r12, 0x30(%r14)
movq %rax, 0x38(%r14)
movb $0x1, %al
movb %al, 0x24e(%r14)
movb %al, 0x24a(%r14)
cmpb $0x1, 0x251(%r14)
jne 0x86b57
movb $0x1, 0x24a(%r14)
movb $0x0, 0x251(%r14)
movw $0x100, 0x24e(%r14)     # imm = 0x100
movl $0x0, 0x60(%r14)
movq -0x38(%rbp), %rbx
jmp 0x86b69
testb $0x1, 0x24a(%r14)
movq -0x38(%rbp), %rbx
je 0x86c9d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x64(%r14)
movb $0x1, 0x24b(%r14)
movw $0xffff, 0x7a(%r14)     # imm = 0xFFFF
movb $-0x1, %cl
movb %cl, 0x23f(%r14)
movb %cl, 0x23a(%r14)
movl %eax, 0x234(%r14)
movb %cl, 0x238(%r14)
testl %r13d, %r13d
jle 0x86c9d
movl %r13d, %ecx
movl $0x60, %edx
leaq -0x9c(%rbp), %rsi
xorl %edi, %edi
xorps %xmm0, %xmm0
movl $0xbf800000, %r8d       # imm = 0xBF800000
xorl %r9d, %r9d
movq 0x10(%r14), %r10
leaq (%r10,%rdx), %r11
addq $-0x60, %r11
cmpq 0x18(%r14), %r11
jae 0x86d97
movss -0x4c(%r10,%rdx), %xmm1
movl %edi, -0xa0(%rbp)
movaps %xmm0, -0xb0(%rbp)
movaps %xmm0, -0xc0(%rbp)
movaps %xmm0, -0xd0(%rbp)
movl %eax, 0x3(%rsi)
movl %eax, (%rsi)
movups %xmm0, (%r11)
movl %r8d, -0x50(%r10,%rdx)
movl %r8d, -0x48(%r10,%rdx)
movaps -0xd0(%rbp), %xmm2
movaps -0xc0(%rbp), %xmm3
movaps -0xb0(%rbp), %xmm4
movups %xmm2, -0x44(%r10,%rdx)
movups %xmm3, -0x34(%r10,%rdx)
movups %xmm4, -0x24(%r10,%rdx)
movups -0xa5(%rbp), %xmm2
movups %xmm2, -0x19(%r10,%rdx)
movw $0xffff, -0x9(%r10,%rdx) # imm = 0xFFFF
movb $-0x1, -0x7(%r10,%rdx)
movl %edi, 0x2(%r10,%rdx)
movq $0x0, -0x6(%r10,%rdx)
movss %xmm1, -0x4c(%r10,%rdx)
movb $0x1, (%r10,%rdx)
movq 0x20(%r14), %r11
addq %r9, %r11
cmpq 0x28(%r14), %r11
jae 0x86dae
movb %r9b, (%r11)
movb %r9b, -0xe(%r10,%rdx)
movw $0x101, -0x6(%r10,%rdx) # imm = 0x101
incq %r9
addq $0x68, %rdx
cmpq %r9, %rcx
jne 0x86bc5
cmpb $0x1, 0x24e(%r14)
jne 0x86caf
movq %r14, %rdi
callq 0x86ed6
movss 0x1980(%rbx), %xmm0
movss 0xe8(%r14), %xmm2
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm2
movq -0x70(%rbp), %rdx
jne 0x86cce
jnp 0x86d09
ucomiss %xmm0, %xmm2
jne 0x86cd5
jnp 0x86d09
testl %r13d, %r13d
jle 0x86d09
movaps %xmm0, %xmm1
divss %xmm2, %xmm1
movq 0x10(%r14), %rax
movl %r13d, %ecx
cmpq 0x18(%r14), %rax
jae 0x86d97
movss 0x10(%rax), %xmm2
mulss %xmm1, %xmm2
movss %xmm2, 0x10(%rax)
addq $0x68, %rax
decq %rcx
jne 0x86ce8
movss %xmm0, 0xe8(%r14)
movb $0x1, 0x93(%rdx)
cmpl $0x0, 0x1d8(%r14)
jle 0x86d7b
cmpl $0x0, 0x1dc(%r14)
jns 0x86d70
xorl %edi, %edi
callq 0x41c63
movq %rax, %rbx
movq 0x1e0(%r14), %rsi
testq %rsi, %rsi
je 0x86d5e
movslq 0x1d8(%r14), %rdx
movq %rbx, %rdi
callq 0xc080
movq 0x1e0(%r14), %rdi
callq 0x41d3c
movq %rbx, 0x1e0(%r14)
movl $0x0, 0x1dc(%r14)
movl $0x0, 0x1d8(%r14)
movq %r14, %rdi
callq 0x870e7
movb $0x1, %al
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3391a(%rip), %rdi     # 0xba6b8
leaq 0x3289a(%rip), %rsi     # 0xb963f
leaq 0x33925(%rip), %rcx     # 0xba6d1
jmp 0x86dc3
leaq 0x33903(%rip), %rdi     # 0xba6b8
leaq 0x32883(%rip), %rsi     # 0xb963f
leaq 0x49c76(%rip), %rcx     # 0xd0a39
movl $0x20e, %edx            # imm = 0x20E
callq 0xc140
leaq 0x481bd(%rip), %rdi     # 0xcef91
leaq 0x480af(%rip), %rsi     # 0xcee8a
leaq 0x480c7(%rip), %rcx     # 0xceea9
movl $0x177, %edx            # imm = 0x177
callq 0xc140
leaq 0x4804d(%rip), %rdi     # 0xcee40
leaq 0x48090(%rip), %rsi     # 0xcee8a
leaq 0x480a8(%rip), %rcx     # 0xceea9
movl $0x133, %edx            # imm = 0x133
callq 0xc140
leaq 0x480f4(%rip), %rdi     # 0xcef06
leaq 0x48071(%rip), %rsi     # 0xcee8a
leaq 0x48089(%rip), %rcx     # 0xceea9
movl $0x135, %edx            # imm = 0x135
callq 0xc140
leaq 0x32847(%rip), %rdi     # 0xb9678
leaq 0x32853(%rip), %rsi     # 0xb968b
leaq 0x47f7e(%rip), %rcx     # 0xcedbd
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140