// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
pushq %rax
movq %rdi, %rbx
cmpw $0x0, 0x78(%rdi)
jne 0x88e6b
movsbl 0x237(%rbx), %edi
cmpl $-0x1, %edi
je 0x88e14
movss 0xe0(%rbx), %xmm0
ucomiss 0x2ea35(%rip), %xmm0    # 0xb7840
jne 0x88e0f
jnp 0x88e14
callq 0x890c5
movb 0x237(%rbx), %al
movb %al, 0x238(%rbx)
movl $0x7f7fffff, 0xe0(%rbx) # imm = 0x7F7FFFFF
movb $-0x1, 0x237(%rbx)
movsbq 0x236(%rbx), %rdi
cmpq $-0x1, %rdi
je 0x88e6b
testb %dil, %dil
js 0x89032
imulq $0x68, %rdi, %rax
addq 0x10(%rbx), %rax
cmpq 0x18(%rbx), %rax
jae 0x89032
movss 0x14(%rax), %xmm0
callq 0x890c5
movb $-0x1, 0x236(%rbx)
cmpw $0x0, 0x78(%rbx)
je 0x88ed3
cmpb $0x1, 0x252(%rbx)
jne 0x88ecc
cmpl $0x0, 0x6c(%rbx)
jle 0x88ebe
xorl %eax, %eax
xorl %ecx, %ecx
movq 0x10(%rbx), %rdx
leaq (%rdx,%rax), %rsi
cmpq 0x18(%rbx), %rsi
jae 0x89032
movb %cl, 0x52(%rdx,%rax)
movq 0x20(%rbx), %rdx
addq %rcx, %rdx
cmpq 0x28(%rbx), %rdx
jae 0x89049
movb %cl, (%rdx)
incq %rcx
movslq 0x6c(%rbx), %rdx
addq $0x68, %rax
cmpq %rdx, %rcx
jl 0x88e85
movb $0x0, 0x252(%rbx)
movb $0x1, 0x24f(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
cmpb $-0x1, 0x239(%rbx)
jne 0x88eec
cmpb $-0x1, 0x23a(%rbx)
je 0x88eec
movb $-0x1, 0x23a(%rbx)
movb $-0x1, 0x239(%rbx)
movsbq 0x23a(%rbx), %rdx
cmpq $-0x1, %rdx
je 0x88e72
movsbl 0x23b(%rbx), %eax
testl %eax, %eax
je 0x88e72
cmpb $0x1, %al
je 0x88f27
movzbl %al, %ecx
cmpl $0xff, %ecx
jne 0x890a6
testb $0x2, 0x4(%rbx)
je 0x89068
testb %dl, %dl
js 0x89032
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %rsi
imulq $0x68, %rdx, %r8
addq %rcx, %r8
cmpq %rsi, %r8
jae 0x89032
xorl %edx, %edx
cmpb $-0x1, %al
sete %dl
xorq $0x55, %rdx
movsbq (%r8,%rdx), %rdx
testq %rdx, %rdx
js 0x89032
imulq $0x68, %rdx, %rdx
addq %rcx, %rdx
cmpq %rsi, %rdx
jae 0x89032
movsbq 0x52(%r8), %rdi
movsbl 0x52(%rdx), %esi
movb %sil, 0x52(%r8)
cmpb %sil, %dil
je 0x88fd2
movq 0x20(%rbx), %r8
movslq %eax, %r9
leaq (%rdi,%r9), %r10
testq %r10, %r10
js 0x89049
leaq (%r8,%r10), %r11
cmpq 0x28(%rbx), %r11
jae 0x89049
movsbq (%r11), %r11
testq %r11, %r11
js 0x89032
imulq $0x68, %r11, %r11
addq %rcx, %r11
cmpq 0x18(%rbx), %r11
jae 0x89032
subb %al, 0x52(%r11)
addq %r9, %rdi
addq %r9, %r10
cmpl %esi, %edi
jne 0x88f97
movsbl 0x52(%rdx), %ecx
subl %eax, %esi
cmpl %ecx, %esi
jne 0x89087
cmpl $0x0, 0x6c(%rbx)
jle 0x8901f
xorl %eax, %eax
xorl %ecx, %ecx
movq 0x10(%rbx), %rdx
leaq (%rdx,%rax), %rsi
cmpq 0x18(%rbx), %rsi
jae 0x89032
movsbq 0x52(%rdx,%rax), %rdx
testq %rdx, %rdx
js 0x89049
addq 0x20(%rbx), %rdx
cmpq 0x28(%rbx), %rdx
jae 0x89049
movb %cl, (%rdx)
incq %rcx
movslq 0x6c(%rbx), %rdx
addq $0x68, %rax
cmpq %rdx, %rcx
jl 0x88fea
movb $0x0, 0x23b(%rbx)
movb $0x1, 0x24f(%rbx)
jmp 0x88e72
leaq 0x3367f(%rip), %rdi     # 0xbc6b8
leaq 0x325ff(%rip), %rsi     # 0xbb63f
leaq 0x3368a(%rip), %rcx     # 0xbc6d1
jmp 0x8905e
leaq 0x33668(%rip), %rdi     # 0xbc6b8
leaq 0x325e8(%rip), %rsi     # 0xbb63f
leaq 0x49a0b(%rip), %rcx     # 0xd2a69
movl $0x20e, %edx            # imm = 0x20E
callq 0xc140
leaq 0x48036(%rip), %rdi     # 0xd10a5
leaq 0x47e44(%rip), %rsi     # 0xd0eba
leaq 0x47ff6(%rip), %rcx     # 0xd1073
movl $0x24e, %edx            # imm = 0x24E
callq 0xc140
leaq 0x48042(%rip), %rdi     # 0xd10d0
leaq 0x47e25(%rip), %rsi     # 0xd0eba
leaq 0x47fd7(%rip), %rcx     # 0xd1073
movl $0x257, %edx            # imm = 0x257
callq 0xc140
leaq 0x47f9f(%rip), %rdi     # 0xd104c
leaq 0x47e06(%rip), %rsi     # 0xd0eba
leaq 0x47fb8(%rip), %rcx     # 0xd1073
movl $0x24d, %edx            # imm = 0x24D
callq 0xc140