// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_tables.cpp
// Function: ImGui::TableBeginApplyRequests(ImGuiTable*)
void ImGui::TableBeginApplyRequests(ImGuiTable* table)
{
    // Handle resizing request
    // (We process this at the first TableBegin of the frame)
    // FIXME-TABLE: Contains columns if our work area doesn't allow for scrolling?
    if (table->InstanceCurrent == 0)
    {
        if (table->ResizedColumn != -1 && table->ResizedColumnNextWidth != FLT_MAX)
            TableSetColumnWidth(table->ResizedColumn, table->ResizedColumnNextWidth);
        table->LastResizedColumn = table->ResizedColumn;
        table->ResizedColumnNextWidth = FLT_MAX;
        table->ResizedColumn = -1;

        // Process auto-fit for single column, which is a special case for stretch columns and fixed columns with FixedSame policy.
        // FIXME-TABLE: Would be nice to redistribute available stretch space accordingly to other weights, instead of giving it all to siblings.
        if (table->AutoFitSingleColumn != -1)
        {
            TableSetColumnWidth(table->AutoFitSingleColumn, table->Columns[table->AutoFitSingleColumn].WidthAuto);
            table->AutoFitSingleColumn = -1;
        }
    }

    // Handle reordering request
    // Note: we don't clear ReorderColumn after handling the request.
    if (table->InstanceCurrent == 0)
    {
        if (table->HeldHeaderColumn == -1 && table->ReorderColumn != -1)
            table->ReorderColumn = -1;
        table->HeldHeaderColumn = -1;
        if (table->ReorderColumn != -1 && table->ReorderColumnDir != 0)
        {
            // We need to handle reordering across hidden columns.
            // In the configuration below, moving C to the right of E will lead to:
            //    ... C [D] E  --->  ... [D] E  C   (Column name/index)
            //    ... 2  3  4        ...  2  3  4   (Display order)
            const int reorder_dir = table->ReorderColumnDir;
            IM_ASSERT(reorder_dir == -1 || reorder_dir == +1);
            IM_ASSERT(table->Flags & ImGuiTableFlags_Reorderable);
            ImGuiTableColumn* src_column = &table->Columns[table->ReorderColumn];
            ImGuiTableColumn* dst_column = &table->Columns[(reorder_dir == -1) ? src_column->PrevEnabledColumn : src_column->NextEnabledColumn];
            IM_UNUSED(dst_column);
            const int src_order = src_column->DisplayOrder;
            const int dst_order = dst_column->DisplayOrder;
            src_column->DisplayOrder = (ImGuiTableColumnIdx)dst_order;
            for (int order_n = src_order + reorder_dir; order_n != dst_order + reorder_dir; order_n += reorder_dir)
                table->Columns[table->DisplayOrderToIndex[order_n]].DisplayOrder -= (ImGuiTableColumnIdx)reorder_dir;
            IM_ASSERT(dst_column->DisplayOrder == dst_order - reorder_dir);

            // Display order is stored in both columns->IndexDisplayOrder and table->DisplayOrder[],
            // rebuild the later from the former.
            for (int column_n = 0; column_n < table->ColumnsCount; column_n++)
                table->DisplayOrderToIndex[table->Columns[column_n].DisplayOrder] = (ImGuiTableColumnIdx)column_n;
            table->ReorderColumnDir = 0;
            table->IsSettingsDirty = true;
        }
    }

    // Handle display order reset request
    if (table->IsResetDisplayOrderRequest)
    {
        for (int n = 0; n < table->ColumnsCount; n++)
            table->DisplayOrderToIndex[n] = table->Columns[n].DisplayOrder = (ImGuiTableColumnIdx)n;
        table->IsResetDisplayOrderRequest = false;
        table->IsSettingsDirty = true;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpw $0x0, 0x78(%rdi)
jne 0x70e9b
movsbl 0x237(%rbx), %edi
cmpl $-0x1, %edi
je 0x70e4b
movss 0xe0(%rbx), %xmm0
ucomiss 0x2ba37(%rip), %xmm0    # 0x9c870
jne 0x70e3d
jnp 0x70e4e
callq 0x71073
movb 0x237(%rbx), %dil
jmp 0x70e4e
movb $-0x1, %dil
movb %dil, 0x238(%rbx)
movl $0x7f7fffff, 0xe0(%rbx) # imm = 0x7F7FFFFF
movb $-0x1, 0x237(%rbx)
movsbl 0x236(%rbx), %r14d
cmpl $-0x1, %r14d
je 0x70e94
leaq 0x10(%rbx), %rdi
movl %r14d, %esi
callq 0x4c4c6
movss 0x14(%rax), %xmm0
movl %r14d, %edi
callq 0x71073
movb $-0x1, 0x236(%rbx)
cmpw $0x0, 0x78(%rbx)
je 0x70ef4
cmpb $0x1, 0x252(%rbx)
jne 0x70ee5
leaq 0x10(%rbx), %r14
leaq 0x20(%rbx), %r15
xorl %r12d, %r12d
cmpl 0x6c(%rbx), %r12d
jge 0x70ed7
movq %r14, %rdi
movl %r12d, %esi
callq 0x4c4c6
movb %r12b, 0x52(%rax)
movq %r15, %rdi
movl %r12d, %esi
callq 0x787be
movb %r12b, (%rax)
incl %r12d
jmp 0x70eaf
movb $0x0, 0x252(%rbx)
movb $0x1, 0x24f(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpb $-0x1, 0x239(%rbx)
movsbl 0x23a(%rbx), %esi
je 0x70fb0
movb $-0x1, 0x239(%rbx)
cmpb $-0x1, %sil
je 0x70e9b
movsbl 0x23b(%rbx), %r12d
testl %r12d, %r12d
je 0x70e9b
cmpb $0x1, %r12b
je 0x70f3b
movzbl %r12b, %eax
cmpl $0xff, %eax
jne 0x71054
testb $0x2, 0x4(%rbx)
je 0x71016
xorl %r14d, %r14d
cmpb $-0x1, %r12b
sete %r14b
leaq 0x10(%rbx), %r13
movq %r13, %rdi
callq 0x4c4c6
movq %rax, %r15
xorq $0x55, %r14
movsbl (%rax,%r14), %esi
movq %r13, %r14
movq %r13, %rdi
callq 0x4c4c6
movsbl 0x52(%r15), %r13d
movq %rax, -0x38(%rbp)
movsbl 0x52(%rax), %eax
movl %eax, -0x2c(%rbp)
movb %al, 0x52(%r15)
leaq 0x20(%rbx), %r15
cmpl %r13d, -0x2c(%rbp)
je 0x70fc9
addl %r12d, %r13d
movq %r15, %rdi
movl %r13d, %esi
callq 0x787be
movsbl (%rax), %esi
movq %r14, %rdi
callq 0x4c4c6
subb %r12b, 0x52(%rax)
jmp 0x70f8b
cmpb $-0x1, %sil
je 0x70fbd
movb $-0x1, 0x23a(%rbx)
movb $-0x1, 0x239(%rbx)
jmp 0x70e9b
movq -0x38(%rbp), %rax
movsbl 0x52(%rax), %eax
movl -0x2c(%rbp), %ecx
subl %r12d, %ecx
cmpl %eax, %ecx
jne 0x71035
xorl %r12d, %r12d
cmpl 0x6c(%rbx), %r12d
jge 0x71003
movq %r14, %rdi
movl %r12d, %esi
callq 0x4c4c6
movsbl 0x52(%rax), %esi
movq %r15, %rdi
callq 0x787be
movb %r12b, (%rax)
incl %r12d
jmp 0x70fde
movb $0x0, 0x23b(%rbx)
movb $0x1, 0x24f(%rbx)
jmp 0x70e9b
leaq 0x452d4(%rip), %rdi     # 0xb62f1
leaq 0x450e2(%rip), %rsi     # 0xb6106
leaq 0x45294(%rip), %rcx     # 0xb62bf
movl $0x24e, %edx            # imm = 0x24E
callq 0xc140
leaq 0x452e0(%rip), %rdi     # 0xb631c
leaq 0x450c3(%rip), %rsi     # 0xb6106
leaq 0x45275(%rip), %rcx     # 0xb62bf
movl $0x257, %edx            # imm = 0x257
callq 0xc140
leaq 0x4523d(%rip), %rdi     # 0xb6298
leaq 0x450a4(%rip), %rsi     # 0xb6106
leaq 0x45256(%rip), %rcx     # 0xb62bf
movl $0x24d, %edx            # imm = 0x24D
callq 0xc140