// File: Ciaxur[P]yagb-emu/include/imgui/imgui_demo.cpp
// Function: EditTableSizingFlags(int*)
static void EditTableSizingFlags(ImGuiTableFlags* p_flags)
{
    struct EnumDesc { ImGuiTableFlags Value; const char* Name; const char* Tooltip; };
    static const EnumDesc policies[] =
    {
        { ImGuiTableFlags_None,               "Default",                            "Use default sizing policy:\n- ImGuiTableFlags_SizingFixedFit if ScrollX is on or if host window has ImGuiWindowFlags_AlwaysAutoResize.\n- ImGuiTableFlags_SizingStretchSame otherwise." },
        { ImGuiTableFlags_SizingFixedFit,     "ImGuiTableFlags_SizingFixedFit",     "Columns default to _WidthFixed (if resizable) or _WidthAuto (if not resizable), matching contents width." },
        { ImGuiTableFlags_SizingFixedSame,    "ImGuiTableFlags_SizingFixedSame",    "Columns are all the same width, matching the maximum contents width.\nImplicitly disable ImGuiTableFlags_Resizable and enable ImGuiTableFlags_NoKeepColumnsVisible." },
        { ImGuiTableFlags_SizingStretchProp,  "ImGuiTableFlags_SizingStretchProp",  "Columns default to _WidthStretch with weights proportional to their widths." },
        { ImGuiTableFlags_SizingStretchSame,  "ImGuiTableFlags_SizingStretchSame",  "Columns default to _WidthStretch with same weights." }
    };
    int idx;
    for (idx = 0; idx < IM_ARRAYSIZE(policies); idx++)
        if (policies[idx].Value == (*p_flags & ImGuiTableFlags_SizingMask_))
            break;
    const char* preview_text = (idx < IM_ARRAYSIZE(policies)) ? policies[idx].Name + (idx > 0 ? strlen("ImGuiTableFlags") : 0) : "";
    if (ImGui::BeginCombo("Sizing Policy", preview_text))
    {
        for (int n = 0; n < IM_ARRAYSIZE(policies); n++)
            if (ImGui::Selectable(policies[n].Name, idx == n))
                *p_flags = (*p_flags & ~ImGuiTableFlags_SizingMask_) | policies[n].Value;
        ImGui::EndCombo();
    }
    ImGui::SameLine();
    ImGui::TextDisabled("(?)");
    if (ImGui::IsItemHovered())
    {
        ImGui::BeginTooltip();
        ImGui::PushTextWrapPos(ImGui::GetFontSize() * 50.0f);
        for (int m = 0; m < IM_ARRAYSIZE(policies); m++)
        {
            ImGui::Separator();
            ImGui::Text("%s:", policies[m].Name);
            ImGui::Separator();
            ImGui::SetCursorPosX(ImGui::GetCursorPosX() + ImGui::GetStyle().IndentSpacing * 0.5f);
            ImGui::TextUnformatted(policies[m].Tooltip);
        }
        ImGui::PopTextWrapPos();
        ImGui::EndTooltip();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x5, -0xc(%rbp)
jge 0x1078dc
movslq -0xc(%rbp), %rcx
leaq 0x10605c(%rip), %rax    # 0x20d910
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movq -0x8(%rbp), %rcx
movl (%rcx), %ecx
andl $0xe000, %ecx           # imm = 0xE000
cmpl %ecx, %eax
jne 0x1078cf
jmp 0x1078dc
jmp 0x1078d1
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1078a3
cmpl $0x5, -0xc(%rbp)
jge 0x107912
movslq -0xc(%rbp), %rcx
leaq 0x106023(%rip), %rax    # 0x20d910
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movl -0xc(%rbp), %esi
xorl %ecx, %ecx
movl $0xf, %edx
cmpl $0x0, %esi
cmovgq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
jmp 0x10791f
leaq 0x6a5f0(%rip), %rax     # 0x171f09
movq %rax, -0x30(%rbp)
jmp 0x10791f
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq 0x79fb4(%rip), %rdi     # 0x1818e6
xorl %edx, %edx
callq 0x13e6c0
testb $0x1, %al
jne 0x107942
jmp 0x1079e1
movl $0x0, -0x1c(%rbp)
cmpl $0x5, -0x1c(%rbp)
jge 0x1079dc
movslq -0x1c(%rbp), %rcx
leaq 0x105fb2(%rip), %rax    # 0x20d910
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x1c(%rbp), %eax
sete %al
movb %al, -0x39(%rbp)
leaq -0x24(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0xbf4c0
movb -0x39(%rbp), %al
movq -0x38(%rbp), %rdi
movzbl %al, %esi
andl $0x1, %esi
xorl %edx, %edx
leaq -0x24(%rbp), %rcx
callq 0x13f2b0
testb $0x1, %al
jne 0x1079a6
jmp 0x1079cc
movq -0x8(%rbp), %rax
movl (%rax), %ecx
andl $0xffff1fff, %ecx       # imm = 0xFFFF1FFF
movslq -0x1c(%rbp), %rdx
leaq 0x105f53(%rip), %rax    # 0x20d910
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
orl (%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
jmp 0x1079ce
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x107949
callq 0x13f0d0
xorps %xmm0, %xmm0
movss 0x6a594(%rip), %xmm1    # 0x171f80
callq 0xdc1c0
leaq 0x6ffff(%rip), %rdi     # 0x1779f7
movb $0x0, %al
callq 0x1393f0
xorl %edi, %edi
callq 0xca1c0
testb $0x1, %al
jne 0x107a0f
jmp 0x107ace
callq 0xddb50
callq 0xdae90
movss 0x70b7f(%rip), %xmm1    # 0x1785a0
mulss %xmm1, %xmm0
callq 0xda2c0
movl $0x0, -0x28(%rbp)
cmpl $0x5, -0x28(%rbp)
jge 0x107ac4
callq 0x13dec0
movslq -0x28(%rbp), %rcx
leaq 0x105ec5(%rip), %rax    # 0x20d910
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
leaq 0x79e97(%rip), %rdi     # 0x1818f4
movb $0x0, %al
callq 0x139160
callq 0x13dec0
callq 0xdc7a0
movss %xmm0, -0x40(%rbp)
callq 0xc7680
movss -0x40(%rbp), %xmm1
movss 0x68(%rax), %xmm0
movss 0x6a54e(%rip), %xmm2    # 0x171fd8
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
callq 0xdc8b0
movslq -0x28(%rbp), %rcx
leaq 0x105e6e(%rip), %rax    # 0x20d910
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x139130
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x107a31
callq 0xda310
callq 0xddce0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)