// File: Ciaxur[P]yagb-emu/include/imgui/imgui_tables.cpp
// Function: ImGui::EndTable()
void    ImGui::EndTable()
{
    ImGuiContext& g = *GImGui;
    ImGuiTable* table = g.CurrentTable;
    IM_ASSERT(table != NULL && "Only call EndTable() if BeginTable() returns true!");

    // This assert would be very useful to catch a common error... unfortunately it would probably trigger in some
    // cases, and for consistency user may sometimes output empty tables (and still benefit from e.g. outer border)
    //IM_ASSERT(table->IsLayoutLocked && "Table unused: never called TableNextRow(), is that the intent?");

    // If the user never got to call TableNextRow() or TableNextColumn(), we call layout ourselves to ensure all our
    // code paths are consistent (instead of just hoping that TableBegin/TableEnd will work), get borders drawn, etc.
    if (!table->IsLayoutLocked)
        TableUpdateLayout(table);

    const ImGuiTableFlags flags = table->Flags;
    ImGuiWindow* inner_window = table->InnerWindow;
    ImGuiWindow* outer_window = table->OuterWindow;
    IM_ASSERT(inner_window == g.CurrentWindow);
    IM_ASSERT(outer_window == inner_window || outer_window == inner_window->ParentWindow);

    if (table->IsInsideRow)
        TableEndRow(table);

    // Context menu in columns body
    if (flags & ImGuiTableFlags_ContextMenuInBody)
        if (table->HoveredColumnBody != -1 && !IsAnyItemHovered() && IsMouseReleased(ImGuiMouseButton_Right))
            TableOpenContextMenu((int)table->HoveredColumnBody);

    // Finalize table height
    inner_window->DC.PrevLineSize = table->HostBackupPrevLineSize;
    inner_window->DC.CurrLineSize = table->HostBackupCurrLineSize;
    inner_window->DC.CursorMaxPos = table->HostBackupCursorMaxPos;
    const float inner_content_max_y = table->RowPosY2;
    IM_ASSERT(table->RowPosY2 == inner_window->DC.CursorPos.y);
    if (inner_window != outer_window)
        inner_window->DC.CursorMaxPos.y = inner_content_max_y;
    else if (!(flags & ImGuiTableFlags_NoHostExtendY))
        table->OuterRect.Max.y = table->InnerRect.Max.y = ImMax(table->OuterRect.Max.y, inner_content_max_y); // Patch OuterRect/InnerRect height
    table->WorkRect.Max.y = ImMax(table->WorkRect.Max.y, table->OuterRect.Max.y);
    table->LastOuterHeight = table->OuterRect.GetHeight();

    // Setup inner scrolling range
    // FIXME: This ideally should be done earlier, in BeginTable() SetNextWindowContentSize call, just like writing to inner_window->DC.CursorMaxPos.y,
    // but since the later is likely to be impossible to do we'd rather update both axises together.
    if (table->Flags & ImGuiTableFlags_ScrollX)
    {
        const float outer_padding_for_border = (table->Flags & ImGuiTableFlags_BordersOuterV) ? TABLE_BORDER_SIZE : 0.0f;
        float max_pos_x = table->InnerWindow->DC.CursorMaxPos.x;
        if (table->RightMostEnabledColumn != -1)
            max_pos_x = ImMax(max_pos_x, table->Columns[table->RightMostEnabledColumn].WorkMaxX + table->CellPaddingX + table->OuterPaddingX - outer_padding_for_border);
        if (table->ResizedColumn != -1)
            max_pos_x = ImMax(max_pos_x, table->ResizeLockMinContentsX2);
        table->InnerWindow->DC.CursorMaxPos.x = max_pos_x;
    }

    // Pop clipping rect
    if (!(flags & ImGuiTableFlags_NoClip))
        inner_window->DrawList->PopClipRect();
    inner_window->ClipRect = inner_window->DrawList->_ClipRectStack.back();

    // Draw borders
    if ((flags & ImGuiTableFlags_Borders) != 0)
        TableDrawBorders(table);

#if 0
    // Strip out dummy channel draw calls
    // We have no way to prevent user submitting direct ImDrawList calls into a hidden column (but ImGui:: calls will be clipped out)
    // Pros: remove draw calls which will have no effect. since they'll have zero-size cliprect they may be early out anyway.
    // Cons: making it harder for users watching metrics/debugger to spot the wasted vertices.
    if (table->DummyDrawChannel != (ImGuiTableColumnIdx)-1)
    {
        ImDrawChannel* dummy_channel = &table->DrawSplitter._Channels[table->DummyDrawChannel];
        dummy_channel->_CmdBuffer.resize(0);
        dummy_channel->_IdxBuffer.resize(0);
    }
#endif

    // Flatten channels and merge draw calls
    table->DrawSplitter.SetCurrentChannel(inner_window->DrawList, 0);
    if ((table->Flags & ImGuiTableFlags_NoClip) == 0)
        TableMergeDrawChannels(table);
    table->DrawSplitter.Merge(inner_window->DrawList);

    // Update ColumnsAutoFitWidth to get us ahead for host using our size to auto-resize without waiting for next BeginTable()
    const float width_spacings = (table->OuterPaddingX * 2.0f) + (table->CellSpacingX1 + table->CellSpacingX2) * (table->ColumnsEnabledCount - 1);
    table->ColumnsAutoFitWidth = width_spacings + (table->CellPaddingX * 2.0f) * table->ColumnsEnabledCount;
    for (int column_n = 0; column_n < table->ColumnsCount; column_n++)
        if (table->EnabledMaskByIndex & ((ImU64)1 << column_n))
        {
            ImGuiTableColumn* column = &table->Columns[column_n];
            if ((column->Flags & ImGuiTableColumnFlags_WidthFixed) && !(column->Flags & ImGuiTableColumnFlags_NoResize))
                table->ColumnsAutoFitWidth += column->WidthRequest;
            else
                table->ColumnsAutoFitWidth += TableGetColumnWidthAuto(table, column);
        }

    // Update scroll
    if ((table->Flags & ImGuiTableFlags_ScrollX) == 0 && inner_window != outer_window)
    {
        inner_window->Scroll.x = 0.0f;
    }
    else if (table->LastResizedColumn != -1 && table->ResizedColumn == -1 && inner_window->ScrollbarX && table->InstanceInteracted == table->InstanceCurrent)
    {
        // When releasing a column being resized, scroll to keep the resulting column in sight
        const float neighbor_width_to_keep_visible = table->MinColumnWidth + table->CellPaddingX * 2.0f;
        ImGuiTableColumn* column = &table->Columns[table->LastResizedColumn];
        if (column->MaxX < table->InnerClipRect.Min.x)
            SetScrollFromPosX(inner_window, column->MaxX - inner_window->Pos.x - neighbor_width_to_keep_visible, 1.0f);
        else if (column->MaxX > table->InnerClipRect.Max.x)
            SetScrollFromPosX(inner_window, column->MaxX - inner_window->Pos.x + neighbor_width_to_keep_visible, 1.0f);
    }

    // Apply resizing/dragging at the end of the frame
    if (table->ResizedColumn != -1 && table->InstanceCurrent == table->InstanceInteracted)
    {
        ImGuiTableColumn* column = &table->Columns[table->ResizedColumn];
        const float new_x2 = (g.IO.MousePos.x - g.ActiveIdClickOffset.x + TABLE_RESIZE_SEPARATOR_HALF_THICKNESS);
        const float new_width = ImFloor(new_x2 - column->MinX - table->CellSpacingX1 - table->CellPaddingX * 2.0f);
        table->ResizedColumnNextWidth = new_width;
    }

    // Pop from id stack
    IM_ASSERT_USER_ERROR(inner_window->IDStack.back() == table->ID + table->InstanceCurrent, "Mismatching PushID/PopID!");
    IM_ASSERT_USER_ERROR(outer_window->DC.ItemWidthStack.Size >= table->HostBackupItemWidthStackSize, "Too many PopItemWidth!");
    PopID();

    // Restore window data that we modified
    const ImVec2 backup_outer_max_pos = outer_window->DC.CursorMaxPos;
    inner_window->WorkRect = table->HostBackupWorkRect;
    inner_window->ParentWorkRect = table->HostBackupParentWorkRect;
    inner_window->SkipItems = table->HostSkipItems;
    outer_window->DC.CursorPos = table->OuterRect.Min;
    outer_window->DC.ItemWidth = table->HostBackupItemWidth;
    outer_window->DC.ItemWidthStack.Size = table->HostBackupItemWidthStackSize;
    outer_window->DC.ColumnsOffset = table->HostBackupColumnsOffset;

    // Layout in outer window
    // (FIXME: To allow auto-fit and allow desirable effect of SameLine() we dissociate 'used' vs 'ideal' size by overriding
    // CursorPosPrevLine and CursorMaxPos manually. That should be a more general layout feature, see same problem e.g. #3414)
    if (inner_window != outer_window)
    {
        EndChild();
    }
    else
    {
        ItemSize(table->OuterRect.GetSize());
        ItemAdd(table->OuterRect, 0);
    }

    // Override declared contents width/height to enable auto-resize while not needlessly adding a scrollbar
    if (table->Flags & ImGuiTableFlags_NoHostExtendX)
    {
        // FIXME-TABLE: Could we remove this section?
        // ColumnsAutoFitWidth may be one frame ahead here since for Fixed+NoResize is calculated from latest contents
        IM_ASSERT((table->Flags & ImGuiTableFlags_ScrollX) == 0);
        outer_window->DC.CursorMaxPos.x = ImMax(backup_outer_max_pos.x, table->OuterRect.Min.x + table->ColumnsAutoFitWidth);
    }
    else if (table->UserOuterSize.x <= 0.0f)
    {
        const float decoration_size = (table->Flags & ImGuiTableFlags_ScrollX) ? inner_window->ScrollbarSizes.x : 0.0f;
        outer_window->DC.IdealMaxPos.x = ImMax(outer_window->DC.IdealMaxPos.x, table->OuterRect.Min.x + table->ColumnsAutoFitWidth + decoration_size - table->UserOuterSize.x);
        outer_window->DC.CursorMaxPos.x = ImMax(backup_outer_max_pos.x, ImMin(table->OuterRect.Max.x, table->OuterRect.Min.x + table->ColumnsAutoFitWidth));
    }
    else
    {
        outer_window->DC.CursorMaxPos.x = ImMax(backup_outer_max_pos.x, table->OuterRect.Max.x);
    }
    if (table->UserOuterSize.y <= 0.0f)
    {
        const float decoration_size = (table->Flags & ImGuiTableFlags_ScrollY) ? inner_window->ScrollbarSizes.y : 0.0f;
        outer_window->DC.IdealMaxPos.y = ImMax(outer_window->DC.IdealMaxPos.y, inner_content_max_y + decoration_size - table->UserOuterSize.y);
        outer_window->DC.CursorMaxPos.y = ImMax(backup_outer_max_pos.y, ImMin(table->OuterRect.Max.y, inner_content_max_y));
    }
    else
    {
        // OuterRect.Max.y may already have been pushed downward from the initial value (unless ImGuiTableFlags_NoHostExtendY is set)
        outer_window->DC.CursorMaxPos.y = ImMax(backup_outer_max_pos.y, table->OuterRect.Max.y);
    }

    // Save settings
    if (table->IsSettingsDirty)
        TableSaveSettings(table);
    table->IsInitializing = false;

    // Clear or restore current table, if any
    IM_ASSERT(g.CurrentWindow == outer_window && g.CurrentTable == table);
    g.CurrentTableStack.pop_back();
    g.CurrentTable = g.CurrentTableStack.Size ? g.Tables.GetByIndex(g.CurrentTableStack.back().Index) : NULL;
    outer_window->DC.CurrentTableIdx = g.CurrentTable ? g.Tables.GetIndex(g.CurrentTable) : -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
leaq 0xe52ee(%rip), %rax     # 0x212f40
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x20a8(%rax), %rax
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x91(%rbp)
je 0x12dc81
movb $0x1, %al
movb %al, -0x91(%rbp)
jmp 0x12dc81
movb -0x91(%rbp), %al
testb $0x1, %al
jne 0x12dc8d
jmp 0x12dc8f
jmp 0x12dcae
leaq 0x5e6cb(%rip), %rdi     # 0x18c361
leaq 0x5e305(%rip), %rsi     # 0x18bfa2
movl $0x489, %edx            # imm = 0x489
leaq 0x5e700(%rip), %rcx     # 0x18c3a9
callq 0xd180
movq -0x10(%rbp), %rax
testb $0x1, 0x248(%rax)
jne 0x12dcc4
movq -0x10(%rbp), %rdi
callq 0x12b270
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x1d0(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x1c8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x1ae0(%rcx), %rax
jne 0x12dcff
jmp 0x12dd1e
leaq 0x5e6ba(%rip), %rdi     # 0x18c3c0
leaq 0x5e295(%rip), %rsi     # 0x18bfa2
movl $0x497, %edx            # imm = 0x497
leaq 0x5e690(%rip), %rcx     # 0x18c3a9
callq 0xd180
movq -0x28(%rbp), %rcx
movb $0x1, %al
cmpq -0x20(%rbp), %rcx
movb %al, -0x92(%rbp)
je 0x12dd48
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x388(%rcx), %rax
sete %al
movb %al, -0x92(%rbp)
movb -0x92(%rbp), %al
testb $0x1, %al
jne 0x12dd54
jmp 0x12dd56
jmp 0x12dd75
leaq 0x5e683(%rip), %rdi     # 0x18c3e0
leaq 0x5e23e(%rip), %rsi     # 0x18bfa2
movl $0x498, %edx            # imm = 0x498
leaq 0x5e639(%rip), %rcx     # 0x18c3a9
callq 0xd180
movq -0x10(%rbp), %rax
testb $0x1, 0x249(%rax)
je 0x12dd8b
movq -0x10(%rbp), %rdi
callq 0x12e9d0
movl -0x14(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x12ddd1
movq -0x10(%rbp), %rax
movsbl 0x234(%rax), %eax
cmpl $-0x1, %eax
je 0x12ddcf
callq 0xd5640
testb $0x1, %al
jne 0x12ddcf
movl $0x1, %edi
callq 0xd4e60
testb $0x1, %al
jne 0x12ddbf
jmp 0x12ddcf
movq -0x10(%rbp), %rax
movsbl 0x234(%rax), %edi
callq 0x12f350
jmp 0x12ddd1
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq 0x19c(%rcx), %rcx
movq %rcx, 0x108(%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq 0x1a4(%rcx), %rcx
movq %rcx, 0x100(%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq 0x1ac(%rcx), %rcx
movq %rcx, 0xf0(%rax)
movq -0x10(%rbp), %rax
movss 0x80(%rax), %xmm0
movss %xmm0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movss 0x80(%rax), %xmm0
movq -0x20(%rbp), %rax
ucomiss 0xdc(%rax), %xmm0
jne 0x12de41
jp 0x12de41
jmp 0x12de60
leaq 0x5e5e3(%rip), %rdi     # 0x18c42b
leaq 0x5e153(%rip), %rsi     # 0x18bfa2
movl $0x4a7, %edx            # imm = 0x4A7
leaq 0x5e54e(%rip), %rcx     # 0x18c3a9
callq 0xd180
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0x12de7d
movss -0x2c(%rbp), %xmm0
movq -0x20(%rbp), %rax
movss %xmm0, 0xf4(%rax)
jmp 0x12deba
movl -0x14(%rbp), %eax
andl $0x20000, %eax          # imm = 0x20000
cmpl $0x0, %eax
jne 0x12deb8
movq -0x10(%rbp), %rax
movss 0xf8(%rax), %xmm0
movss -0x2c(%rbp), %xmm1
callq 0x12a620
movq -0x10(%rbp), %rax
movss %xmm0, 0x108(%rax)
movq -0x10(%rbp), %rax
movss %xmm0, 0xf8(%rax)
jmp 0x12deba
movq -0x10(%rbp), %rax
movss 0x118(%rax), %xmm0
movq -0x10(%rbp), %rax
movss 0xf8(%rax), %xmm1
callq 0x12a620
movq -0x10(%rbp), %rax
movss %xmm0, 0x118(%rax)
movq -0x10(%rbp), %rdi
addq $0xec, %rdi
callq 0xeb860
movq -0x10(%rbp), %rax
movss %xmm0, 0xcc(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x1000000, %eax        # imm = 0x1000000
cmpl $0x0, %eax
je 0x12e021
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x400, %eax            # imm = 0x400
movss 0x42d14(%rip), %xmm0    # 0x170c3c
xorps %xmm1, %xmm1
movss %xmm1, -0x9c(%rbp)
cmpl $0x0, %eax
movss %xmm0, -0x98(%rbp)
jne 0x12df50
movss -0x9c(%rbp), %xmm0
movss %xmm0, -0x98(%rbp)
movss -0x98(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x1d0(%rax), %rax
movss 0xf0(%rax), %xmm0
movss %xmm0, -0x34(%rbp)
movq -0x10(%rbp), %rax
movsbl 0x23e(%rax), %eax
cmpl $-0x1, %eax
je 0x12dfde
movss -0x34(%rbp), %xmm0
movss %xmm0, -0xa0(%rbp)
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
movq -0x10(%rbp), %rax
movsbl 0x23e(%rax), %esi
callq 0xeea20
movss -0xa0(%rbp), %xmm0
movss 0x38(%rax), %xmm1
movq -0x10(%rbp), %rax
addss 0xbc(%rax), %xmm1
movq -0x10(%rbp), %rax
addss 0xb8(%rax), %xmm1
subss -0x30(%rbp), %xmm1
callq 0x12a620
movss %xmm0, -0x34(%rbp)
movq -0x10(%rbp), %rax
movsbl 0x237(%rax), %eax
cmpl $-0x1, %eax
je 0x12e009
movss -0x34(%rbp), %xmm0
movq -0x10(%rbp), %rax
movss 0xe4(%rax), %xmm1
callq 0x12a620
movss %xmm0, -0x34(%rbp)
movss -0x34(%rbp), %xmm0
movq -0x10(%rbp), %rax
movq 0x1d0(%rax), %rax
movss %xmm0, 0xf0(%rax)
movl -0x14(%rbp), %eax
andl $0x100000, %eax         # imm = 0x100000
cmpl $0x0, %eax
jne 0x12e03e
movq -0x20(%rbp), %rax
movq 0x2b8(%rax), %rdi
callq 0x10f6c0
movq -0x20(%rbp), %rax
movq 0x2b8(%rax), %rdi
addq $0x58, %rdi
callq 0xeb2a0
movq %rax, %rsi
leaq -0x44(%rbp), %rdi
callq 0xeb300
movq -0x20(%rbp), %rax
movq -0x44(%rbp), %rcx
movq %rcx, 0x258(%rax)
movq -0x3c(%rbp), %rcx
movq %rcx, 0x260(%rax)
movl -0x14(%rbp), %eax
andl $0x780, %eax            # imm = 0x780
cmpl $0x0, %eax
je 0x12e08e
movq -0x10(%rbp), %rdi
callq 0x12f450
movq -0x10(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movq -0x20(%rbp), %rax
movq 0x2b8(%rax), %rsi
xorl %edx, %edx
callq 0x115220
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x100000, %eax         # imm = 0x100000
cmpl $0x0, %eax
jne 0x12e0c5
movq -0x10(%rbp), %rdi
callq 0x12fbb0
movq -0x10(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movq -0x20(%rbp), %rax
movq 0x2b8(%rax), %rsi
callq 0x114e20
movq -0x10(%rbp), %rax
movss 0xb8(%rax), %xmm0
movq -0x10(%rbp), %rax
movss 0xc4(%rax), %xmm1
movq -0x10(%rbp), %rax
addss 0xc8(%rax), %xmm1
movq -0x10(%rbp), %rax
movsbl 0x231(%rax), %eax
subl $0x1, %eax
cvtsi2ss %eax, %xmm2
mulss %xmm2, %xmm1
addss %xmm0, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x48(%rbp)
movss -0x48(%rbp), %xmm1
movq -0x10(%rbp), %rax
movss 0x43e94(%rip), %xmm0    # 0x171fcc
mulss 0xbc(%rax), %xmm0
movq -0x10(%rbp), %rax
movsbl 0x231(%rax), %eax
cvtsi2ss %eax, %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0xdc(%rax)
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x6c(%rcx), %eax
jge 0x12e21b
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movl -0x4c(%rbp), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x12e20b
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
movl -0x4c(%rbp), %esi
callq 0xeea20
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movl (%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x12e1e8
movq -0x58(%rbp), %rax
movl (%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x12e1e8
movq -0x58(%rbp), %rax
movss 0x10(%rax), %xmm0
movq -0x10(%rbp), %rax
addss 0xdc(%rax), %xmm0
movss %xmm0, 0xdc(%rax)
jmp 0x12e209
movq -0x10(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x12ccd0
movq -0x10(%rbp), %rax
addss 0xdc(%rax), %xmm0
movss %xmm0, 0xdc(%rax)
jmp 0x12e20b
jmp 0x12e20d
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x12e16a
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x1000000, %eax        # imm = 0x1000000
cmpl $0x0, %eax
jne 0x12e247
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0x12e247
movq -0x20(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x5c(%rax)
jmp 0x12e361
movq -0x10(%rbp), %rax
movsbl 0x238(%rax), %eax
cmpl $-0x1, %eax
je 0x12e35f
movq -0x10(%rbp), %rax
movsbl 0x237(%rax), %eax
cmpl $-0x1, %eax
jne 0x12e35f
movq -0x20(%rbp), %rax
testb $0x1, 0x8c(%rax)
je 0x12e35f
movq -0x10(%rbp), %rax
movswl 0x7a(%rax), %eax
movq -0x10(%rbp), %rcx
movswl 0x78(%rcx), %ecx
cmpl %ecx, %eax
jne 0x12e35f
movq -0x10(%rbp), %rax
movss 0xb4(%rax), %xmm1
movq -0x10(%rbp), %rax
movss 0xbc(%rax), %xmm0
addss %xmm0, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x5c(%rbp)
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
movq -0x10(%rbp), %rax
movsbl 0x238(%rax), %esi
callq 0xeea20
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movss 0xc(%rax), %xmm1
movq -0x10(%rbp), %rax
movss 0x11c(%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x12e31d
movq -0x20(%rbp), %rdi
movq -0x68(%rbp), %rax
movss 0xc(%rax), %xmm0
movq -0x20(%rbp), %rax
subss 0x10(%rax), %xmm0
subss -0x5c(%rbp), %xmm0
movss 0x42926(%rip), %xmm1    # 0x170c3c
callq 0xdd690
jmp 0x12e35d
movq -0x68(%rbp), %rax
movss 0xc(%rax), %xmm0
movq -0x10(%rbp), %rax
ucomiss 0x124(%rax), %xmm0
jbe 0x12e35b
movq -0x20(%rbp), %rdi
movq -0x68(%rbp), %rax
movss 0xc(%rax), %xmm0
movq -0x20(%rbp), %rax
subss 0x10(%rax), %xmm0
addss -0x5c(%rbp), %xmm0
movss 0x428e6(%rip), %xmm1    # 0x170c3c
callq 0xdd690
jmp 0x12e35d
jmp 0x12e35f
jmp 0x12e361
movq -0x10(%rbp), %rax
movsbl 0x237(%rax), %eax
cmpl $-0x1, %eax
je 0x12e428
movq -0x10(%rbp), %rax
movswl 0x78(%rax), %eax
movq -0x10(%rbp), %rcx
movswl 0x7a(%rcx), %ecx
cmpl %ecx, %eax
jne 0x12e428
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
movq -0x10(%rbp), %rax
movsbl 0x237(%rax), %esi
callq 0xeea20
movq %rax, -0x70(%rbp)
movq -0x8(%rbp), %rax
movss 0x128(%rax), %xmm0
movq -0x8(%rbp), %rax
subss 0x1b58(%rax), %xmm0
movss 0x4436b(%rip), %xmm1    # 0x172734
addss %xmm1, %xmm0
movss %xmm0, -0x74(%rbp)
movss -0x74(%rbp), %xmm1
movq -0x70(%rbp), %rax
subss 0x8(%rax), %xmm1
movq -0x10(%rbp), %rax
subss 0xc4(%rax), %xmm1
movq -0x10(%rbp), %rax
movss 0xbc(%rax), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
addss %xmm0, %xmm0
addss %xmm1, %xmm0
callq 0x12cdc0
movss %xmm0, -0x78(%rbp)
movss -0x78(%rbp), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0xe0(%rax)
movq -0x20(%rbp), %rdi
addq $0xc8, %rdi
callq 0xe9130
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl (%rax), %edx
movq -0x10(%rbp), %rax
movswl 0x78(%rax), %eax
addl %eax, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0xa1(%rbp)
jne 0x12e460
movb $0x1, %al
movb %al, -0xa1(%rbp)
jmp 0x12e460
movb -0xa1(%rbp), %al
testb $0x1, %al
jne 0x12e46c
jmp 0x12e46e
jmp 0x12e48d
leaq 0x5e000(%rip), %rdi     # 0x18c475
leaq 0x5db26(%rip), %rsi     # 0x18bfa2
movl $0x500, %edx            # imm = 0x500
leaq 0x5df21(%rip), %rcx     # 0x18c3a9
callq 0xd180
movq -0x28(%rbp), %rax
movl 0x1d8(%rax), %ecx
movq -0x10(%rbp), %rdx
xorl %eax, %eax
cmpl 0x1c4(%rdx), %ecx
movb %al, -0xa2(%rbp)
jl 0x12e4b5
movb $0x1, %al
movb %al, -0xa2(%rbp)
jmp 0x12e4b5
movb -0xa2(%rbp), %al
testb $0x1, %al
jne 0x12e4c1
jmp 0x12e4c3
jmp 0x12e4e2
leaq 0x5e026(%rip), %rdi     # 0x18c4f0
leaq 0x5dad1(%rip), %rsi     # 0x18bfa2
movl $0x501, %edx            # imm = 0x501
leaq 0x5decc(%rip), %rcx     # 0x18c3a9
callq 0xd180
callq 0xdb640
movq -0x28(%rbp), %rax
movq 0xf0(%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq 0x16c(%rcx), %rdx
movq %rdx, 0x238(%rax)
movq 0x174(%rcx), %rcx
movq %rcx, 0x240(%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq 0x17c(%rcx), %rdx
movq %rdx, 0x248(%rax)
movq 0x184(%rcx), %rcx
movq %rcx, 0x250(%rax)
movq -0x10(%rbp), %rax
movb 0x256(%rax), %cl
movq -0x20(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x93(%rax)
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rax
movq 0xec(%rcx), %rcx
movq %rcx, 0xd8(%rax)
movq -0x10(%rbp), %rax
movss 0x1c0(%rax), %xmm0
movq -0x28(%rbp), %rax
movss %xmm0, 0x1d0(%rax)
movq -0x10(%rbp), %rax
movl 0x1c4(%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x1d8(%rax)
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rax
movl 0x1bc(%rcx), %ecx
movl %ecx, 0x11c(%rax)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0x12e5bc
callq 0xd5d90
jmp 0x12e5fe
movq -0x10(%rbp), %rdi
addq $0xec, %rdi
callq 0xeb560
movlpd %xmm0, -0x88(%rbp)
leaq -0x88(%rbp), %rdi
movss 0x4399d(%rip), %xmm0    # 0x171f80
callq 0xd6030
movq -0x10(%rbp), %rdi
addq $0xec, %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0xd6250
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x10000, %eax          # imm = 0x10000
cmpl $0x0, %eax
je 0x12e674
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x1000000, %eax        # imm = 0x1000000
cmpl $0x0, %eax
jne 0x12e622
jmp 0x12e641
leaq 0x5df31(%rip), %rdi     # 0x18c55a
leaq 0x5d972(%rip), %rsi     # 0x18bfa2
movl $0x520, %edx            # imm = 0x520
leaq 0x5dd6d(%rip), %rcx     # 0x18c3a9
callq 0xd180
movss -0x80(%rbp), %xmm0
movq -0x10(%rbp), %rax
movss 0xec(%rax), %xmm1
movq -0x10(%rbp), %rax
addss 0xdc(%rax), %xmm1
callq 0x12a620
movq -0x28(%rbp), %rax
movss %xmm0, 0xf0(%rax)
jmp 0x12e78d
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
ucomiss 0x1b4(%rax), %xmm0
jb 0x12e769
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x1000000, %eax        # imm = 0x1000000
cmpl $0x0, %eax
je 0x12e6af
movq -0x20(%rbp), %rax
movss 0x84(%rax), %xmm0
movss %xmm0, -0xa8(%rbp)
jmp 0x12e6bc
xorps %xmm0, %xmm0
movss %xmm0, -0xa8(%rbp)
jmp 0x12e6bc
movss -0xa8(%rbp), %xmm0
movss %xmm0, -0x8c(%rbp)
movq -0x28(%rbp), %rax
movss 0xf8(%rax), %xmm0
movq -0x10(%rbp), %rax
movss 0xec(%rax), %xmm1
movq -0x10(%rbp), %rax
addss 0xdc(%rax), %xmm1
addss -0x8c(%rbp), %xmm1
movq -0x10(%rbp), %rax
subss 0x1b4(%rax), %xmm1
callq 0x12a620
movq -0x28(%rbp), %rax
movss %xmm0, 0xf8(%rax)
movss -0x80(%rbp), %xmm0
movss %xmm0, -0xac(%rbp)
movq -0x10(%rbp), %rax
movss 0xf4(%rax), %xmm0
movq -0x10(%rbp), %rax
movss 0xec(%rax), %xmm1
movq -0x10(%rbp), %rax
addss 0xdc(%rax), %xmm1
callq 0x12a6b0
movaps %xmm0, %xmm1
movss -0xac(%rbp), %xmm0
callq 0x12a620
movq -0x28(%rbp), %rax
movss %xmm0, 0xf0(%rax)
jmp 0x12e78b
movss -0x80(%rbp), %xmm0
movq -0x10(%rbp), %rax
movss 0xf4(%rax), %xmm1
callq 0x12a620
movq -0x28(%rbp), %rax
movss %xmm0, 0xf0(%rax)
jmp 0x12e78d
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
ucomiss 0x1b8(%rax), %xmm0
jb 0x12e85c
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x2000000, %eax        # imm = 0x2000000
cmpl $0x0, %eax
je 0x12e7c8
movq -0x20(%rbp), %rax
movss 0x88(%rax), %xmm0
movss %xmm0, -0xb0(%rbp)
jmp 0x12e7d5
xorps %xmm0, %xmm0
movss %xmm0, -0xb0(%rbp)
jmp 0x12e7d5
movss -0xb0(%rbp), %xmm0
movss %xmm0, -0x90(%rbp)
movq -0x28(%rbp), %rax
movss 0xfc(%rax), %xmm0
movss -0x2c(%rbp), %xmm1
addss -0x90(%rbp), %xmm1
movq -0x10(%rbp), %rax
subss 0x1b8(%rax), %xmm1
callq 0x12a620
movq -0x28(%rbp), %rax
movss %xmm0, 0xfc(%rax)
movss -0x7c(%rbp), %xmm0
movss %xmm0, -0xb4(%rbp)
movq -0x10(%rbp), %rax
movss 0xf8(%rax), %xmm0
movss -0x2c(%rbp), %xmm1
callq 0x12a6b0
movaps %xmm0, %xmm1
movss -0xb4(%rbp), %xmm0
callq 0x12a620
movq -0x28(%rbp), %rax
movss %xmm0, 0xf4(%rax)
jmp 0x12e87e
movss -0x7c(%rbp), %xmm0
movq -0x10(%rbp), %rax
movss 0xf8(%rax), %xmm1
callq 0x12a620
movq -0x28(%rbp), %rax
movss %xmm0, 0xf4(%rax)
movq -0x10(%rbp), %rax
testb $0x1, 0x24f(%rax)
je 0x12e894
movq -0x10(%rbp), %rdi
callq 0x130670
movq -0x10(%rbp), %rax
movb $0x0, 0x24a(%rax)
movq -0x8(%rbp), %rax
movq 0x1ae0(%rax), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0xb5(%rbp)
jne 0x12e8d0
movq -0x8(%rbp), %rax
movq 0x20a8(%rax), %rax
cmpq -0x10(%rbp), %rax
sete %al
movb %al, -0xb5(%rbp)
movb -0xb5(%rbp), %al
testb $0x1, %al
jne 0x12e8dc
jmp 0x12e8de
jmp 0x12e8fd
leaq 0x5dca3(%rip), %rdi     # 0x18c588
leaq 0x5d6b6(%rip), %rsi     # 0x18bfa2
movl $0x53f, %edx            # imm = 0x53F
leaq 0x5dab1(%rip), %rcx     # 0x18c3a9
callq 0xd180
movq -0x8(%rbp), %rdi
addq $0x20d8, %rdi           # imm = 0x20D8
callq 0x137340
movq -0x8(%rbp), %rax
cmpl $0x0, 0x20d8(%rax)
je 0x12e953
movq -0x8(%rbp), %rax
addq $0x20b0, %rax           # imm = 0x20B0
movq %rax, -0xc8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x20d8, %rdi           # imm = 0x20D8
callq 0x137390
movq -0xc8(%rbp), %rdi
movl 0x8(%rax), %esi
callq 0xea9d0
movq %rax, -0xc0(%rbp)
jmp 0x12e95e
xorl %eax, %eax
movq %rax, -0xc0(%rbp)
jmp 0x12e95e
movq -0xc0(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20a8(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20a8(%rax)
je 0x12e9a1
movq -0x8(%rbp), %rdi
addq $0x20b0, %rdi           # imm = 0x20B0
movq -0x8(%rbp), %rax
movq 0x20a8(%rax), %rsi
callq 0x136eb0
movl %eax, -0xcc(%rbp)
jmp 0x12e9ae
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0xcc(%rbp)
jmp 0x12e9ae
movl -0xcc(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x1b8(%rax)
addq $0xd0, %rsp
popq %rbp
retq
nopw (%rax,%rax)