// File: Ciaxur[P]yagb-emu/include/imgui/imgui_tables.cpp
// Function: ImGui::TableSetupColumn(char const*, int, float, unsigned int)
void ImGui::TableSetupColumn(const char* label, ImGuiTableColumnFlags flags, float init_width_or_weight, ImGuiID user_id)
{
    ImGuiContext& g = *GImGui;
    ImGuiTable* table = g.CurrentTable;
    IM_ASSERT(table != NULL && "Need to call TableSetupColumn() after BeginTable()!");
    IM_ASSERT(table->IsLayoutLocked == false && "Need to call call TableSetupColumn() before first row!");
    IM_ASSERT((flags & ImGuiTableColumnFlags_StatusMask_) == 0 && "Illegal to pass StatusMask values to TableSetupColumn()");
    if (table->DeclColumnsCount >= table->ColumnsCount)
    {
        IM_ASSERT_USER_ERROR(table->DeclColumnsCount < table->ColumnsCount, "Called TableSetupColumn() too many times!");
        return;
    }

    ImGuiTableColumn* column = &table->Columns[table->DeclColumnsCount];
    table->DeclColumnsCount++;

    // Assert when passing a width or weight if policy is entirely left to default, to avoid storing width into weight and vice-versa.
    // Give a grace to users of ImGuiTableFlags_ScrollX.
    if (table->IsDefaultSizingPolicy && (flags & ImGuiTableColumnFlags_WidthMask_) == 0 && (flags & ImGuiTableFlags_ScrollX) == 0)
        IM_ASSERT(init_width_or_weight <= 0.0f && "Can only specify width/weight if sizing policy is set explicitely in either Table or Column.");

    // When passing a width automatically enforce WidthFixed policy
    // (whereas TableSetupColumnFlags would default to WidthAuto if table is not Resizable)
    if ((flags & ImGuiTableColumnFlags_WidthMask_) == 0 && init_width_or_weight > 0.0f)
        if ((table->Flags & ImGuiTableFlags_SizingMask_) == ImGuiTableFlags_SizingFixedFit || (table->Flags & ImGuiTableFlags_SizingMask_) == ImGuiTableFlags_SizingFixedSame)
            flags |= ImGuiTableColumnFlags_WidthFixed;

    TableSetupColumnFlags(table, column, flags);
    column->UserID = user_id;
    flags = column->Flags;

    // Initialize defaults
    column->InitStretchWeightOrWidth = init_width_or_weight;
    if (table->IsInitializing)
    {
        // Init width or weight
        if (column->WidthRequest < 0.0f && column->StretchWeight < 0.0f)
        {
            if ((flags & ImGuiTableColumnFlags_WidthFixed) && init_width_or_weight > 0.0f)
                column->WidthRequest = init_width_or_weight;
            if (flags & ImGuiTableColumnFlags_WidthStretch)
                column->StretchWeight = (init_width_or_weight > 0.0f) ? init_width_or_weight : -1.0f;

            // Disable auto-fit if an explicit width/weight has been specified
            if (init_width_or_weight > 0.0f)
                column->AutoFitQueue = 0x00;
        }

        // Init default visibility/sort state
        if ((flags & ImGuiTableColumnFlags_DefaultHide) && (table->SettingsLoadedFlags & ImGuiTableFlags_Hideable) == 0)
            column->IsEnabled = column->IsEnabledNextFrame = false;
        if (flags & ImGuiTableColumnFlags_DefaultSort && (table->SettingsLoadedFlags & ImGuiTableFlags_Sortable) == 0)
        {
            column->SortOrder = 0; // Multiple columns using _DefaultSort will be reassigned unique SortOrder values when building the sort specs.
            column->SortDirection = (column->Flags & ImGuiTableColumnFlags_PreferSortDescending) ? (ImS8)ImGuiSortDirection_Descending : (ImU8)(ImGuiSortDirection_Ascending);
        }
    }

    // Store name (append with zero-terminator in contiguous buffer)
    column->NameOffset = -1;
    if (label != NULL && label[0] != 0)
    {
        column->NameOffset = (ImS16)table->ColumnsNames.size();
        table->ColumnsNames.append(label, label + strlen(label) + 1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movss %xmm0, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0xe2572(%rip), %rax     # 0x212f40
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x20a8(%rax), %rax
movq %rax, -0x28(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x28(%rbp)
movb %al, -0x31(%rbp)
je 0x1309f7
movb $0x1, %al
movb %al, -0x31(%rbp)
jmp 0x1309f7
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x130a00
jmp 0x130a02
jmp 0x130a21
leaq 0x5bbee(%rip), %rdi     # 0x18c5f7
leaq 0x5b592(%rip), %rsi     # 0x18bfa2
movl $0x54b, %edx            # imm = 0x54B
leaq 0x5bc24(%rip), %rcx     # 0x18c640
callq 0xd180
movq -0x28(%rbp), %rax
movb 0x248(%rax), %al
andb $0x1, %al
movzbl %al, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x32(%rbp)
jne 0x130a41
movb $0x1, %al
movb %al, -0x32(%rbp)
jmp 0x130a41
movb -0x32(%rbp), %al
testb $0x1, %al
jne 0x130a4a
jmp 0x130a4c
jmp 0x130a6b
leaq 0x5bc76(%rip), %rdi     # 0x18c6c9
leaq 0x5b548(%rip), %rsi     # 0x18bfa2
movl $0x54c, %edx            # imm = 0x54C
leaq 0x5bbda(%rip), %rcx     # 0x18c640
callq 0xd180
movl -0xc(%rbp), %ecx
andl $0xf00000, %ecx         # imm = 0xF00000
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x33(%rbp)
jne 0x130a85
movb $0x1, %al
movb %al, -0x33(%rbp)
jmp 0x130a85
movb -0x33(%rbp), %al
testb $0x1, %al
jne 0x130a8e
jmp 0x130a90
jmp 0x130aaf
leaq 0x5bcc5(%rip), %rdi     # 0x18c75c
leaq 0x5b504(%rip), %rsi     # 0x18bfa2
movl $0x54d, %edx            # imm = 0x54D
leaq 0x5bb96(%rip), %rcx     # 0x18c640
callq 0xd180
movq -0x28(%rbp), %rax
movsbl 0x233(%rax), %eax
movq -0x28(%rbp), %rcx
cmpl 0x6c(%rcx), %eax
jl 0x130b12
movq -0x28(%rbp), %rax
movsbl 0x233(%rax), %ecx
movq -0x28(%rbp), %rdx
xorl %eax, %eax
cmpl 0x6c(%rdx), %ecx
movb %al, -0x34(%rbp)
jge 0x130ae3
movb $0x1, %al
movb %al, -0x34(%rbp)
jmp 0x130ae3
movb -0x34(%rbp), %al
testb $0x1, %al
jne 0x130aec
jmp 0x130aee
jmp 0x130b0d
leaq 0x5bcff(%rip), %rdi     # 0x18c7f4
leaq 0x5b4a6(%rip), %rsi     # 0x18bfa2
movl $0x550, %edx            # imm = 0x550
leaq 0x5bb38(%rip), %rcx     # 0x18c640
callq 0xd180
jmp 0x130dc3
movq -0x28(%rbp), %rdi
addq $0x10, %rdi
movq -0x28(%rbp), %rax
movsbl 0x233(%rax), %esi
callq 0xeea20
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movb 0x233(%rax), %cl
addb $0x1, %cl
movb %cl, 0x233(%rax)
movq -0x28(%rbp), %rax
testb $0x1, 0x254(%rax)
je 0x130ba7
movl -0xc(%rbp), %eax
andl $0xc, %eax
cmpl $0x0, %eax
jne 0x130ba7
movl -0xc(%rbp), %eax
andl $0x1000000, %eax        # imm = 0x1000000
cmpl $0x0, %eax
jne 0x130ba7
xorl %eax, %eax
xorps %xmm0, %xmm0
ucomiss -0x10(%rbp), %xmm0
movb %al, -0x35(%rbp)
jb 0x130b7b
movb $0x1, %al
movb %al, -0x35(%rbp)
jmp 0x130b7b
movb -0x35(%rbp), %al
testb $0x1, %al
jne 0x130b84
jmp 0x130b86
jmp 0x130ba5
leaq 0x5bd23(%rip), %rdi     # 0x18c8b0
leaq 0x5b40e(%rip), %rsi     # 0x18bfa2
movl $0x55a, %edx            # imm = 0x55A
leaq 0x5baa0(%rip), %rcx     # 0x18c640
callq 0xd180
jmp 0x130ba7
movl -0xc(%rbp), %eax
andl $0xc, %eax
cmpl $0x0, %eax
jne 0x130bf0
movss -0x10(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x130bf0
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
andl $0xe000, %eax           # imm = 0xE000
cmpl $0x2000, %eax           # imm = 0x2000
je 0x130be5
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
andl $0xe000, %eax           # imm = 0xE000
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x130bee
movl -0xc(%rbp), %eax
orl $0x8, %eax
movl %eax, -0xc(%rbp)
jmp 0x130bf0
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0xc(%rbp), %edx
callq 0x12c9f0
movl -0x14(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xc(%rbp)
movss -0x10(%rbp), %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x1c(%rax)
movq -0x28(%rbp), %rax
testb $0x1, 0x24a(%rax)
je 0x130d4c
movq -0x30(%rbp), %rax
xorps %xmm0, %xmm0
ucomiss 0x10(%rax), %xmm0
jbe 0x130cce
movq -0x30(%rbp), %rax
xorps %xmm0, %xmm0
ucomiss 0x18(%rax), %xmm0
jbe 0x130cce
movl -0xc(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x130c76
movss -0x10(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x130c76
movss -0x10(%rbp), %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x10(%rax)
movl -0xc(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x130cb7
movss -0x10(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x130c9a
movss -0x10(%rbp), %xmm0
movss %xmm0, -0x3c(%rbp)
jmp 0x130ca9
movss 0x412de(%rip), %xmm0    # 0x171f80
movss %xmm0, -0x3c(%rbp)
jmp 0x130ca9
movss -0x3c(%rbp), %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x18(%rax)
movss -0x10(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x130ccc
movq -0x30(%rbp), %rax
movb $0x0, 0x62(%rax)
jmp 0x130cce
movl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x130cf8
movq -0x28(%rbp), %rax
movl 0x60(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x130cf8
movq -0x30(%rbp), %rax
movb $0x0, 0x5b(%rax)
movq -0x30(%rbp), %rax
movb $0x0, 0x5a(%rax)
movl -0xc(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x130d4a
movq -0x28(%rbp), %rax
movl 0x60(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x130d4a
movq -0x30(%rbp), %rax
movb $0x0, 0x56(%rax)
movq -0x30(%rbp), %rax
movl (%rax), %edx
andl $0x2000, %edx           # imm = 0x2000
movl $0x1, %eax
movl $0x2, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movb %al, %dl
movq -0x30(%rbp), %rax
movb 0x64(%rax), %cl
andb $0x3, %dl
andb $-0x4, %cl
orb %dl, %cl
movb %cl, 0x64(%rax)
jmp 0x130d4c
movq -0x30(%rbp), %rax
movw $0xffff, 0x50(%rax)     # imm = 0xFFFF
cmpq $0x0, -0x8(%rbp)
je 0x130dc3
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x130dc3
movq -0x28(%rbp), %rdi
addq $0x1d8, %rdi            # imm = 0x1D8
callq 0xec2b0
movw %ax, %cx
movq -0x30(%rbp), %rax
movw %cx, 0x50(%rax)
movq -0x28(%rbp), %rax
addq $0x1d8, %rax            # imm = 0x1D8
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
callq 0xd410
movq -0x58(%rbp), %rdx
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
addq %rax, %rdx
addq $0x1, %rdx
callq 0xc6ad0
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)