// File: /workspace/github_cpp_makefile_star2_O1/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 $0x98, %rsp
leaq 0x75e81(%rip), %rax     # 0xfdcd0
movq (%rax), %r12
movq 0x1ae0(%r12), %rbx
movb $0x1, 0x90(%rbx)
cmpb $0x0, 0x93(%rbx)
jne 0x87f1e
leal -0x1(%rdx), %eax
cmpl $0x3f, %eax
ja 0x88a4e
movl %ecx, %r13d
movq %rdi, %r14
movq %rsi, -0x38(%rbp)
movq %rdx, -0x58(%rbp)
movq %r8, %r15
btl $0x18, %ecx
jae 0x87e9d
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x88a6d
movaps %xmm0, -0x70(%rbp)
callq 0x52f20
movaps %xmm0, %xmm2
movsd (%r15), %xmm0
movaps %xmm2, %xmm1
maxss 0x2f12b(%rip), %xmm1    # 0xb6fe4
testl $0x3000000, %r13d       # imm = 0x3000000
je 0x87f25
shufps $0x55, %xmm2, %xmm2     # xmm2 = xmm2[1,1,1,1]
maxss 0x2f116(%rip), %xmm2    # 0xb6fe4
callq 0x57311
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 -0x50(%rbp), %rdi
movq %rax, (%rdi)
movlps %xmm1, 0x8(%rdi)
xorl %esi, %esi
xorl %edx, %edx
callq 0x4709d
testb %al, %al
je 0x87f57
leaq -0x50(%rbp), %rdi
movss 0x2f0b7(%rip), %xmm0    # 0xb6fd0
callq 0x56a82
xorl %eax, %eax
jmp 0x889e7
xorps %xmm2, %xmm2
callq 0x57311
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, -0x50(%rbp)
movlps %xmm1, -0x48(%rbp)
movq %r14, -0x78(%rbp)
leaq 0x20b0(%r12), %rdi
movq %rdi, -0x80(%rbp)
movq -0x38(%rbp), %rsi
callq 0x916aa
movq %rax, %r14
movl 0x1a68(%r12), %eax
xorl %ecx, %ecx
cmpl %eax, 0x68(%r14)
jne 0x87f8a
movswl 0x78(%r14), %ecx
incl %ecx
movq %rbx, -0x30(%rbp)
movl 0x4(%r14), %edx
movl %edx, -0x3c(%rbp)
testl %ecx, %ecx
movaps -0x70(%rbp), %xmm2
movq -0x58(%rbp), %r8
jle 0x87fab
cmpl %r8d, 0x6c(%r14)
jne 0x88aab
movl %r13d, %edx
testl $0xe000, %r13d          # imm = 0xE000
sete 0x254(%r14)
jne 0x87fe3
movl $0x2000, %edx           # imm = 0x2000
btl $0x18, %r13d
jb 0x87fe0
movq -0x30(%rbp), %rdx
testb $0x40, 0xc(%rdx)
movl $0x8000, %esi           # imm = 0x8000
movl $0x2000, %edx           # imm = 0x2000
cmovel %esi, %edx
orl %r13d, %edx
movl %edx, %esi
andl $0xe000, %esi           # imm = 0xE000
movl %edx, %edi
orl $0x40000, %edi          # imm = 0x40000
cmpl $0x4000, %esi           # imm = 0x4000
cmovnel %edx, %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
movq -0x38(%rbp), %r9
leal (%rcx,%r9), %r10d
movl %esi, %ebx
andl $0xfffff7ff, %ebx       # imm = 0xFFFFF7FF
btl $0xc, %esi
cmovael %esi, %ebx
movl %ebx, %edx
orl $0x10, %edx
testb $0xf, %bl
cmovel %edx, %ebx
movq -0x30(%rbp), %rdi
movq 0x390(%rdi), %rsi
btl $0x8, 0xc(%rsi)
cmovbl %edx, %ebx
movl %r9d, (%r14)
movl %ebx, 0x4(%r14)
movw %cx, 0x78(%r14)
movl %eax, 0x68(%r14)
movq %rdi, 0x1d0(%r14)
movq %rdi, 0x1c8(%r14)
movl %r8d, 0x6c(%r14)
movb $0x0, 0x248(%r14)
movss %xmm2, 0xd4(%r14)
movq (%r15), %rax
movq %rax, 0x1b4(%r14)
testl $0x3000000, %r13d       # imm = 0x3000000
je 0x880fe
movl $0x1000000, %ecx        # imm = 0x1000000
movl %ebx, %r13d
andl %ecx, %r13d
movl %ebx, %eax
andl $0x3000000, %eax        # imm = 0x3000000
cmpl %ecx, %eax
sete %cl
xorps %xmm0, %xmm0
cmpltss %xmm2, %xmm0
movss 0x2f787(%rip), %xmm1    # 0xb7840
testl %r13d, %r13d
jne 0x880c1
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
movl %r10d, %r15d
jne 0x88147
movaps %xmm0, %xmm1
cmpneqss 0x2f751(%rip), %xmm1    # 0xb7840
andps %xmm0, %xmm1
cmpl $0x1000000, %eax        # imm = 0x1000000
je 0x8812a
xorps %xmm0, %xmm0
jmp 0x88132
movups -0x50(%rbp), %xmm0
movups %xmm0, 0xfc(%r14)
movups -0x50(%rbp), %xmm0
movups %xmm0, 0xec(%r14)
movups -0x50(%rbp), %xmm0
movups %xmm0, 0x10c(%r14)
movl %r10d, %r15d
jmp 0x8822f
movss 0x48d26(%rip), %xmm0    # 0xd0e58
leaq -0xc0(%rbp), %rdi
movss %xmm1, (%rdi)
movss %xmm0, 0x4(%rdi)
callq 0x556f9
testl $0x3000000, -0x3c(%rbp) # imm = 0x3000000
jne 0x88163
leaq -0xc0(%rbp), %rdi
movq $0x0, (%rdi)
callq 0x5572e
movss -0x48(%rbp), %xmm0
movss -0x44(%rbp), %xmm1
subss -0x50(%rbp), %xmm0
subss -0x4c(%rbp), %xmm1
shrl $0xd, %r13d
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
leaq -0xc0(%rbp), %rdx
movlps %xmm0, (%rdx)
movq -0x78(%rbp), %rdi
movl %r15d, %esi
xorl %ecx, %ecx
movl %r13d, %r8d
callq 0x52cfd
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
jne 0x88a2f
jp 0x88a2f
movss 0x44(%rax), %xmm1
ucomiss %xmm0, %xmm1
jne 0x88a2f
jp 0x88a2f
movss 0x4c(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x88a2f
jp 0x88a2f
movl %r15d, %edi
callq 0x5605a
movq 0x1d0(%r14), %r13
movss 0x118(%r13), %xmm0
movss %xmm0, 0xb0(%r14)
movups 0x258(%r13), %xmm0
movups %xmm0, 0x15c(%r14)
movb 0x93(%r13), %al
movb %al, 0x256(%r14)
movups 0x238(%r13), %xmm0
movups %xmm0, 0x16c(%r14)
movups 0x248(%r13), %xmm0
movups %xmm0, 0x17c(%r14)
movq -0x30(%rbp), %rcx
movl 0x11c(%rcx), %eax
movl %eax, 0x1bc(%r14)
movq 0x108(%r13), %rax
movq %rax, 0x19c(%r14)
movq 0x100(%r13), %rax
movq %rax, 0x1a4(%r14)
movq 0xf0(%r13), %rax
movq %rax, 0x1ac(%r14)
movss 0x1d0(%rcx), %xmm0
movss %xmm0, 0x1c0(%r14)
movl 0x1d8(%rcx), %eax
movl %eax, 0x1c4(%r14)
btl $0x16, %ebx
setae %al
testl $0x200400, %ebx         # imm = 0x200400
setne %cl
btl $0x9, %ebx
xorps %xmm2, %xmm2
xorps %xmm3, %xmm3
jae 0x8830b
movss 0x2ecd9(%rip), %xmm3    # 0xb6fe4
xorps %xmm0, %xmm0
movups %xmm0, 0x100(%r13)
testl $0x800200, %ebx         # imm = 0x800200
jne 0x88328
movss 0x15b8(%r12), %xmm2
movl %ebx, %edx
andl $0x800200, %edx         # imm = 0x800200
xorps %xmm1, %xmm1
xorps %xmm0, %xmm0
cmpl $0x200, %edx            # imm = 0x200
jne 0x88348
movss 0x15b8(%r12), %xmm0
andb %cl, %al
addss %xmm2, %xmm3
movss %xmm3, 0xc4(%r14)
movss %xmm2, 0xc8(%r14)
movss %xmm0, 0xbc(%r14)
movss 0x15bc(%r12), %xmm2
movss %xmm2, 0xc0(%r14)
btl $0xa, %ebx
xorps %xmm2, %xmm2
jae 0x8838d
movss 0x2ec57(%rip), %xmm2    # 0xb6fe4
leaq 0x258(%r13), %rcx
leaq 0x15c(%r14), %rsi
testb %al, %al
je 0x883a9
movss 0x15b8(%r12), %xmm1
addss %xmm1, %xmm2
subss %xmm0, %xmm2
movss %xmm2, 0xb8(%r14)
movq $-0x1, 0x70(%r14)
movl $0x0, 0x94(%r14)
movzwl 0x90(%r14), %eax
movl %eax, 0x90(%r14)
leaq 0x10c(%r14), %rax
cmpq -0x30(%rbp), %r13
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
minss 0x114(%r14), %xmm0
movss 0x128(%r14), %xmm1
minss 0x118(%r14), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movlps %xmm0, 0x124(%r14)
callq 0x5f4e6
btl $0x11, %ebx
movq %r13, -0x38(%rbp)
jb 0x8849a
movss 0x264(%r13), %xmm0
jmp 0x884ac
movss 0x128(%r14), %xmm0
minss 0x244(%r13), %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 0x2eaef(%rip), %xmm0    # 0xb6fe4
movl $0x2b, %edi
callq 0x445bd
movl %eax, 0xa0(%r14)
movl $0x2c, %edi
movss 0x2ead1(%rip), %xmm0    # 0xb6fe4
callq 0x445bd
movl %eax, 0xa4(%r14)
movq -0x80(%rbp), %rdi
movq %r14, %rsi
callq 0x9171a
movl %eax, %r13d
movl 0x20d8(%r12), %r15d
movl 0x20dc(%r12), %eax
cmpl %eax, %r15d
jne 0x885ba
incl %r15d
testl %eax, %eax
je 0x88557
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x8855c
movl $0x8, %ecx
cmpl %r15d, %ecx
cmovgl %ecx, %r15d
cmpl %r15d, %eax
jge 0x885ba
movslq %r15d, %rdi
shlq $0x4, %rdi
callq 0x424fb
movq 0x20e0(%r12), %rsi
testq %rsi, %rsi
je 0x885aa
movslq 0x20d8(%r12), %rdx
shlq $0x4, %rdx
movq %rax, %rdi
movq %rax, -0x70(%rbp)
callq 0xc080
movq 0x20e0(%r12), %rdi
callq 0x425d4
movq -0x70(%rbp), %rax
movq %rax, 0x20e0(%r12)
movl %r15d, 0x20dc(%r12)
movq 0x20e0(%r12), %rax
movslq 0x20d8(%r12), %rcx
shlq $0x4, %rcx
movq $0x0, (%rax,%rcx)
movl %r13d, 0x8(%rax,%rcx)
incl 0x20d8(%r12)
movq %r14, 0x20a8(%r12)
movq -0x30(%rbp), %rax
movl %r13d, 0x1b8(%rax)
movq -0x38(%rbp), %rcx
cmpq %rax, %rcx
je 0x88606
movl %r13d, 0x1b8(%rcx)
testb $0x2, -0x3c(%rbp)
movq -0x58(%rbp), %r15
je 0x8861d
andl $0x2, %ebx
jne 0x8861d
movb $0x1, 0x252(%r14)
cmpl 0x20e8(%r12), %r13d
jl 0x886e9
leal 0x1(%r13), %ebx
movl 0x20ec(%r12), %eax
cmpl %r13d, %eax
jg 0x886b6
testl %eax, %eax
je 0x88652
movl %eax, %r15d
shrl $0x1f, %r15d
addl %eax, %r15d
sarl %r15d
addl %eax, %r15d
jmp 0x88658
movl $0x8, %r15d
cmpl %ebx, %r15d
cmovlel %ebx, %r15d
cmpl %r15d, %eax
jge 0x886b6
movslq %r15d, %rdi
shlq $0x2, %rdi
callq 0x424fb
movq 0x20f0(%r12), %rsi
testq %rsi, %rsi
je 0x886a6
movslq 0x20e8(%r12), %rdx
shlq $0x2, %rdx
movq %rax, %rdi
movq %rax, -0x30(%rbp)
callq 0xc080
movq 0x20f0(%r12), %rdi
callq 0x425d4
movq -0x30(%rbp), %rax
movq %rax, 0x20f0(%r12)
movl %r15d, 0x20ec(%r12)
movslq 0x20e8(%r12), %rax
cmpl %r13d, %eax
jg 0x886dd
movslq %ebx, %rcx
movq 0x20f0(%r12), %rdx
movl $0xbf800000, (%rdx,%rax,4) # imm = 0xBF800000
incq %rax
cmpq %rax, %rcx
jne 0x886c6
movl %ebx, 0x20e8(%r12)
movq -0x58(%rbp), %r15
testl %r13d, %r13d
js 0x88a8c
cmpl %r13d, 0x20e8(%r12)
jle 0x88a8c
xorps %xmm0, %xmm0
cvtsd2ss 0x1a60(%r12), %xmm0
movq 0x20f0(%r12), %rax
movl %r13d, %ecx
movss %xmm0, (%rax,%rcx,4)
movb $0x0, 0x255(%r14)
movq 0x18(%r14), %rax
subq 0x10(%r14), %rax
shrq $0x3, %rax
imull $0xc4ec4ec5, %eax, %eax # imm = 0xC4EC4EC5
testl %eax, %eax
sete %cl
cmpl %r15d, %eax
sete %al
orb %cl, %al
jne 0x88757
movq 0x8(%r14), %rdi
callq 0x425d4
movq $0x0, 0x8(%r14)
cmpq $0x0, 0x8(%r14)
movq -0x38(%rbp), %rbx
jne 0x8877d
movq %r14, %rdi
movl %r15d, %esi
callq 0x88aca
movb $0x1, %al
movb %al, 0x24e(%r14)
movb %al, 0x24a(%r14)
cmpb $0x1, 0x251(%r14)
jne 0x887a9
movb $0x1, 0x24a(%r14)
movb $0x0, 0x251(%r14)
movw $0x100, 0x24e(%r14)     # imm = 0x100
movl $0x0, 0x60(%r14)
cmpb $0x1, 0x24a(%r14)
jne 0x888f1
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 %r15d, %r15d
jle 0x888f1
movl %r15d, %ecx
movl $0x60, %edx
leaq -0x8c(%rbp), %rsi
xorl %edi, %edi
xorps %xmm0, %xmm0
movl $0xbf800000, %r8d       # imm = 0xBF800000
movq 0x10(%r14), %r9
leaq (%r9,%rdx), %r10
addq $-0x60, %r10
cmpq 0x18(%r14), %r10
jae 0x889f9
movss -0x4c(%r9,%rdx), %xmm1
movups %xmm0, -0x95(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0xb0(%rbp)
movaps %xmm0, -0xc0(%rbp)
movl %eax, 0x3(%rsi)
movl %eax, (%rsi)
movups %xmm0, (%r10)
movq %r8, -0x50(%r9,%rdx)
movl $0xbf800000, -0x48(%r9,%rdx) # imm = 0xBF800000
movaps -0xc0(%rbp), %xmm2
movaps -0xb0(%rbp), %xmm3
movaps -0xa0(%rbp), %xmm4
movups %xmm2, -0x44(%r9,%rdx)
movups %xmm3, -0x34(%r9,%rdx)
movups %xmm4, -0x24(%r9,%rdx)
movups -0x95(%rbp), %xmm2
movups %xmm2, -0x19(%r9,%rdx)
movw $0xffff, -0x9(%r9,%rdx) # imm = 0xFFFF
movb $-0x1, -0x7(%r9,%rdx)
movq $0x0, -0x6(%r9,%rdx)
movl $0x0, 0x2(%r9,%rdx)
movss %xmm1, -0x4c(%r9,%rdx)
movb $0x1, (%r9,%rdx)
movq 0x20(%r14), %r10
addq %rdi, %r10
cmpq 0x28(%r14), %r10
jae 0x88a10
movb %dil, (%r10)
movb %dil, -0xe(%r9,%rdx)
movw $0x101, -0x6(%r9,%rdx)  # imm = 0x101
incq %rdi
addq $0x68, %rdx
cmpq %rdi, %rcx
jne 0x88810
cmpb $0x1, 0x24e(%r14)
jne 0x88903
movq %r14, %rdi
callq 0x88bdc
movss 0x1980(%r12), %xmm0
movss 0xe8(%r14), %xmm2
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm2
jne 0x88920
jnp 0x8895b
ucomiss %xmm0, %xmm2
jne 0x88927
jnp 0x8895b
testl %r15d, %r15d
jle 0x8895b
movaps %xmm0, %xmm1
divss %xmm2, %xmm1
movq 0x10(%r14), %rax
movl %r15d, %ecx
cmpq 0x18(%r14), %rax
jae 0x889f9
movss 0x10(%rax), %xmm2
mulss %xmm1, %xmm2
movss %xmm2, 0x10(%rax)
addq $0x68, %rax
decq %rcx
jne 0x8893a
movss %xmm0, 0xe8(%r14)
movb $0x1, 0x93(%rbx)
cmpl $0x0, 0x1d8(%r14)
jle 0x889dd
movl 0x1dc(%r14), %eax
testl %eax, %eax
jns 0x889d2
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
xorl %ebx, %ebx
testl %ecx, %ecx
cmovgl %ecx, %ebx
movq %rbx, %rdi
callq 0x424fb
movq %rax, %r15
movq 0x1e0(%r14), %rsi
testq %rsi, %rsi
je 0x889c4
movslq 0x1d8(%r14), %rdx
movq %r15, %rdi
callq 0xc080
movq 0x1e0(%r14), %rdi
callq 0x425d4
movq %r15, 0x1e0(%r14)
movl %ebx, 0x1dc(%r14)
movl $0x0, 0x1d8(%r14)
movq %r14, %rdi
callq 0x88de0
movb $0x1, %al
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x33cb8(%rip), %rdi     # 0xbc6b8
leaq 0x32c38(%rip), %rsi     # 0xbb63f
leaq 0x33cc3(%rip), %rcx     # 0xbc6d1
jmp 0x88a25
leaq 0x33ca1(%rip), %rdi     # 0xbc6b8
leaq 0x32c21(%rip), %rsi     # 0xbb63f
leaq 0x4a044(%rip), %rcx     # 0xd2a69
movl $0x20e, %edx            # imm = 0x20E
callq 0xc140
leaq 0x4858b(%rip), %rdi     # 0xd0fc1
leaq 0x4847d(%rip), %rsi     # 0xd0eba
leaq 0x48495(%rip), %rcx     # 0xd0ed9
movl $0x177, %edx            # imm = 0x177
callq 0xc140
leaq 0x4841b(%rip), %rdi     # 0xd0e70
leaq 0x4845e(%rip), %rsi     # 0xd0eba
leaq 0x48476(%rip), %rcx     # 0xd0ed9
movl $0x133, %edx            # imm = 0x133
callq 0xc140
leaq 0x484c2(%rip), %rdi     # 0xd0f36
leaq 0x4843f(%rip), %rsi     # 0xd0eba
leaq 0x48457(%rip), %rcx     # 0xd0ed9
movl $0x135, %edx            # imm = 0x135
callq 0xc140
leaq 0x32be5(%rip), %rdi     # 0xbb678
leaq 0x32bf1(%rip), %rsi     # 0xbb68b
leaq 0x48353(%rip), %rcx     # 0xd0df4
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140
leaq 0x48498(%rip), %rdi     # 0xd0f4a
leaq 0x48401(%rip), %rsi     # 0xd0eba
leaq 0x48419(%rip), %rcx     # 0xd0ed9
movl $0x148, %edx            # imm = 0x148
callq 0xc140