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

    // Layout if not already done (this is automatically done by TableNextRow, we do it here solely to facilitate stepping in debugger as it is frequent to step in TableUpdateLayout)
    if (!table->IsLayoutLocked)
        TableUpdateLayout(table);

    // Open row
    const float row_y1 = GetCursorScreenPos().y;
    const float row_height = TableGetHeaderRowHeight();
    TableNextRow(ImGuiTableRowFlags_Headers, row_height);
    if (table->HostSkipItems) // Merely an optimization, you may skip in your own code.
        return;

    const int columns_count = TableGetColumnCount();
    for (int column_n = 0; column_n < columns_count; column_n++)
    {
        if (!TableSetColumnIndex(column_n))
            continue;

        // Push an id to allow unnamed labels (generally accidental, but let's behave nicely with them)
        // - in your own code you may omit the PushID/PopID all-together, provided you know they won't collide
        // - table->InstanceCurrent is only >0 when we use multiple BeginTable/EndTable calls with same identifier.
        const char* name = TableGetColumnName(column_n);
        PushID(table->InstanceCurrent * table->ColumnsCount + column_n);
        TableHeader(name);
        PopID();
    }

    // Allow opening popup from the right-most section after the last column.
    ImVec2 mouse_pos = ImGui::GetMousePos();
    if (IsMouseReleased(1) && TableGetHoveredColumn() == columns_count)
        if (mouse_pos.y >= row_y1 && mouse_pos.y < row_y1 + row_height)
            TableOpenContextMenu(-1); // Will open a non-column-specific popup.
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0xe0471(%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, -0x39(%rbp)
je 0x132af8
movb $0x1, %al
movb %al, -0x39(%rbp)
jmp 0x132af8
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x132b01
jmp 0x132b03
jmp 0x132b22
leaq 0x5a6ef(%rip), %rdi     # 0x18d1f9
leaq 0x59491(%rip), %rsi     # 0x18bfa2
movl $0xa8e, %edx            # imm = 0xA8E
leaq 0x5a724(%rip), %rcx     # 0x18d241
callq 0xd180
movq -0x10(%rbp), %rax
testb $0x1, 0x248(%rax)
jne 0x132b38
movq -0x10(%rbp), %rdi
callq 0x12b270
callq 0xdc6c0
movlpd %xmm0, -0x1c(%rbp)
movss -0x18(%rbp), %xmm0
movss %xmm0, -0x14(%rbp)
callq 0x132a00
movss %xmm0, -0x20(%rbp)
movss -0x20(%rbp), %xmm0
movl $0x1, %edi
callq 0x131530
movq -0x10(%rbp), %rax
testb $0x1, 0x256(%rax)
je 0x132b77
jmp 0x132c28
callq 0x131010
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x132bd9
movl -0x28(%rbp), %edi
callq 0x131a20
testb $0x1, %al
jne 0x132b9c
jmp 0x132bce
movl -0x28(%rbp), %edi
callq 0x131050
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movswl 0x78(%rax), %edi
movq -0x10(%rbp), %rax
imull 0x6c(%rax), %edi
addl -0x28(%rbp), %edi
callq 0xdb550
movq -0x30(%rbp), %rdi
callq 0x132c30
callq 0xdb640
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x132b86
callq 0xd5070
movlpd %xmm0, -0x38(%rbp)
movl $0x1, %edi
callq 0xd4e60
testb $0x1, %al
jne 0x132bf3
jmp 0x132c28
callq 0x1312c0
cmpl -0x24(%rbp), %eax
jne 0x132c28
movss -0x34(%rbp), %xmm0
ucomiss -0x14(%rbp), %xmm0
jb 0x132c26
movss -0x34(%rbp), %xmm1
movss -0x14(%rbp), %xmm0
addss -0x20(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x132c26
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x12f350
jmp 0x132c28
addq $0x40, %rsp
popq %rbp
retq
nop