// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui_demo.cpp
// Function: ImGui::ShowStyleEditor(ImGuiStyle*)
void ImGui::ShowStyleEditor(ImGuiStyle* ref)
{
    ImGuiStyle& style = ImGui::GetStyle();

    const ImGuiStyle def; // Default style
    if (ImGui::Button("Revert Style"))
        style = ref ? *ref : def;
    if (ref)
    {
        ImGui::SameLine();
        if (ImGui::Button("Save Style"))
            *ref = style;
    }

    ImGui::PushItemWidth(ImGui::GetWindowWidth() * 0.55f);

    if (ImGui::TreeNode("Rendering"))
    {
        ImGui::Checkbox("Anti-aliased lines", &style.AntiAliasedLines);
        ImGui::Checkbox("Anti-aliased shapes", &style.AntiAliasedShapes);
        ImGui::PushItemWidth(100);
        ImGui::DragFloat("Curve Tessellation Tolerance", &style.CurveTessellationTol, 0.02f, 0.10f, FLT_MAX, NULL, 2.0f);
        if (style.CurveTessellationTol < 0.0f) style.CurveTessellationTol = 0.10f;
        ImGui::PopItemWidth();
        ImGui::TreePop();
    }

    if (ImGui::TreeNode("Sizes"))
    {
        ImGui::SliderFloat("Alpha", &style.Alpha, 0.20f, 1.0f, "%.2f");                 // Not exposing zero here so user doesn't "lose" the UI. But application code could have a toggle to switch between zero and non-zero.
        ImGui::SliderFloat2("WindowPadding", (float*)&style.WindowPadding, 0.0f, 20.0f, "%.0f");
        ImGui::SliderFloat("WindowRounding", &style.WindowRounding, 0.0f, 16.0f, "%.0f");
        ImGui::SliderFloat("ChildWindowRounding", &style.ChildWindowRounding, 0.0f, 16.0f, "%.0f");
        ImGui::SliderFloat2("FramePadding", (float*)&style.FramePadding, 0.0f, 20.0f, "%.0f");
        ImGui::SliderFloat("FrameRounding", &style.FrameRounding, 0.0f, 16.0f, "%.0f");
        ImGui::SliderFloat2("ItemSpacing", (float*)&style.ItemSpacing, 0.0f, 20.0f, "%.0f");
        ImGui::SliderFloat2("ItemInnerSpacing", (float*)&style.ItemInnerSpacing, 0.0f, 20.0f, "%.0f");
        ImGui::SliderFloat2("TouchExtraPadding", (float*)&style.TouchExtraPadding, 0.0f, 10.0f, "%.0f");
        ImGui::SliderFloat("IndentSpacing", &style.IndentSpacing, 0.0f, 30.0f, "%.0f");
        ImGui::SliderFloat("ScrollbarWidth", &style.ScrollbarSize, 1.0f, 20.0f, "%.0f");
        ImGui::SliderFloat("ScrollbarRounding", &style.ScrollbarRounding, 0.0f, 16.0f, "%.0f");
        ImGui::SliderFloat("GrabMinSize", &style.GrabMinSize, 1.0f, 20.0f, "%.0f");
        ImGui::SliderFloat("GrabRounding", &style.GrabRounding, 0.0f, 16.0f, "%.0f");
        ImGui::TreePop();
    }

    if (ImGui::TreeNode("Colors"))
    {
        static int output_dest = 0;
        static bool output_only_modified = false;
        if (ImGui::Button("Output Colors"))
        {
            if (output_dest == 0)
                ImGui::LogToClipboard();
            else
                ImGui::LogToTTY();
            ImGui::LogText("ImGuiStyle& style = ImGui::GetStyle();" IM_NEWLINE);
            for (int i = 0; i < ImGuiCol_COUNT; i++)
            {
                const ImVec4& col = style.Colors[i];
                const char* name = ImGui::GetStyleColName(i);
                if (!output_only_modified || memcmp(&col, (ref ? &ref->Colors[i] : &def.Colors[i]), sizeof(ImVec4)) != 0)
                    ImGui::LogText("style.Colors[ImGuiCol_%s]%*s= ImVec4(%.2ff, %.2ff, %.2ff, %.2ff);" IM_NEWLINE, name, 22 - (int)strlen(name), "", col.x, col.y, col.z, col.w);
            }
            ImGui::LogFinish();
        }
        ImGui::SameLine(); ImGui::PushItemWidth(120); ImGui::Combo("##output_type", &output_dest, "To Clipboard\0To TTY"); ImGui::PopItemWidth();
        ImGui::SameLine(); ImGui::Checkbox("Only Modified Fields", &output_only_modified);

        static ImGuiColorEditMode edit_mode = ImGuiColorEditMode_RGB;
        ImGui::RadioButton("RGB", &edit_mode, ImGuiColorEditMode_RGB);
        ImGui::SameLine();
        ImGui::RadioButton("HSV", &edit_mode, ImGuiColorEditMode_HSV);
        ImGui::SameLine();
        ImGui::RadioButton("HEX", &edit_mode, ImGuiColorEditMode_HEX);
        //ImGui::Text("Tip: Click on colored square to change edit mode.");

        static ImGuiTextFilter filter;
        filter.Draw("Filter colors", 200);

        ImGui::BeginChild("#colors", ImVec2(0, 300), true);
        ImGui::PushItemWidth(-160);
        ImGui::ColorEditMode(edit_mode);
        for (int i = 0; i < ImGuiCol_COUNT; i++)
        {
            const char* name = ImGui::GetStyleColName(i);
            if (!filter.PassFilter(name))
                continue;
            ImGui::PushID(i);
            ImGui::ColorEdit4(name, (float*)&style.Colors[i], true);
            if (memcmp(&style.Colors[i], (ref ? &ref->Colors[i] : &def.Colors[i]), sizeof(ImVec4)) != 0)
            {
                ImGui::SameLine(); if (ImGui::Button("Revert")) style.Colors[i] = ref ? ref->Colors[i] : def.Colors[i];
                if (ref) { ImGui::SameLine(); if (ImGui::Button("Save")) ref->Colors[i] = style.Colors[i]; }
            }
            ImGui::PopID();
        }
        ImGui::PopItemWidth();
        ImGui::EndChild();

        ImGui::TreePop();
    }

    ImGui::PopItemWidth();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x338, %rsp            # imm = 0x338
movq %rdi, %r13
callq 0xb0db
movq %rax, %r14
leaq -0x360(%rbp), %r15
movq %r15, %rdi
callq 0x7d6c
leaq -0x30(%rbp), %rsi
movq $0x0, (%rsi)
leaq 0x16f3c(%rip), %rdi     # 0x41b31
callq 0x1642f
testb %al, %al
je 0x2ac15
testq %r13, %r13
movq %r13, %rsi
cmoveq %r15, %rsi
movl $0x328, %edx            # imm = 0x328
movq %r14, %rdi
callq 0x7080
testq %r13, %r13
je 0x2ac55
movd 0x1277a(%rip), %xmm1    # 0x3d39c
xorps %xmm0, %xmm0
callq 0x15f5f
leaq -0x30(%rbp), %rsi
movq $0x0, (%rsi)
leaq 0x16f02(%rip), %rdi     # 0x41b3e
callq 0x1642f
testb %al, %al
je 0x2ac55
movl $0x328, %edx            # imm = 0x328
movq %r13, %rdi
movq %r14, %rsi
callq 0x7080
callq 0x15167
mulss 0x14abe(%rip), %xmm0    # 0x3f720
callq 0x9c64
leaq 0x16edb(%rip), %rdi     # 0x41b49
callq 0x17d18
testb %al, %al
je 0x2acf3
leaq 0x70(%r14), %rsi
leaq 0x16ed1(%rip), %rdi     # 0x41b53
callq 0x1d626
leaq 0x71(%r14), %rsi
leaq 0x16ed4(%rip), %rdi     # 0x41b66
callq 0x1d626
movss 0x127d9(%rip), %xmm0    # 0x3d478
callq 0x9c64
leaq 0x74(%r14), %rbx
leaq 0x16ecb(%rip), %rdi     # 0x41b7a
movss 0x14a6d(%rip), %xmm0    # 0x3f724
movd 0x12705(%rip), %xmm1    # 0x3d3c4
movss 0x12709(%rip), %xmm2    # 0x3d3d0
movss 0x12705(%rip), %xmm3    # 0x3d3d4
movq %rbx, %rsi
xorl %edx, %edx
callq 0x1c08e
xorps %xmm0, %xmm0
ucomiss 0x74(%r14), %xmm0
jbe 0x2ace9
movl $0x3dcccccd, (%rbx)     # imm = 0x3DCCCCCD
callq 0x9db1
callq 0x228ce
leaq 0x16e9d(%rip), %rdi     # 0x41b97
callq 0x17d18
testb %al, %al
je 0x2af2a
leaq 0x16e8f(%rip), %rdi     # 0x41b9d
leaq 0x15c6c(%rip), %rdx     # 0x40981
movss 0x126f3(%rip), %xmm0    # 0x3d410
movss 0x1266b(%rip), %xmm1    # 0x3d390
movq %r14, %rsi
movaps %xmm1, %xmm2
callq 0x1ad02
leaq 0x4(%r14), %rsi
leaq 0x16e68(%rip), %rdi     # 0x41ba3
leaq 0x16139(%rip), %r12     # 0x40e7b
movss 0x1497a(%rip), %xmm1    # 0x3f6c4
xorps %xmm0, %xmm0
movq %r12, %rdx
movss 0x12638(%rip), %xmm2    # 0x3d390
callq 0x1bb62
leaq 0x14(%r14), %rsi
leaq 0x16e4e(%rip), %rdi     # 0x41bb6
movss 0x12694(%rip), %xmm1    # 0x3d404
xorps %xmm0, %xmm0
movq %r12, %rdx
movss 0x12612(%rip), %xmm2    # 0x3d390
callq 0x1ad02
leaq 0x1c(%r14), %rsi
leaq 0x16e23(%rip), %rdi     # 0x41bb1
xorps %xmm0, %xmm0
movss 0x1266b(%rip), %xmm1    # 0x3d404
movq %r12, %rdx
movss 0x125ec(%rip), %xmm2    # 0x3d390
callq 0x1ad02
leaq 0x20(%r14), %rsi
leaq 0x16e11(%rip), %rdi     # 0x41bc5
xorps %xmm0, %xmm0
movss 0x14905(%rip), %xmm1    # 0x3f6c4
movq %r12, %rdx
movss 0x125c6(%rip), %xmm2    # 0x3d390
callq 0x1bb62
leaq 0x28(%r14), %rsi
leaq 0x16df8(%rip), %rdi     # 0x41bd2
xorps %xmm0, %xmm0
movss 0x1261f(%rip), %xmm1    # 0x3d404
movq %r12, %rdx
movss 0x125a0(%rip), %xmm2    # 0x3d390
callq 0x1ad02
leaq 0x2c(%r14), %rsi
leaq 0x16de0(%rip), %rdi     # 0x41be0
xorps %xmm0, %xmm0
movss 0x148b9(%rip), %xmm1    # 0x3f6c4
movq %r12, %rdx
movss 0x1257a(%rip), %xmm2    # 0x3d390
callq 0x1bb62
leaq 0x34(%r14), %rsi
leaq 0x16dc6(%rip), %rdi     # 0x41bec
xorps %xmm0, %xmm0
movss 0x14893(%rip), %xmm1    # 0x3f6c4
movq %r12, %rdx
movss 0x12554(%rip), %xmm2    # 0x3d390
callq 0x1bb62
leaq 0x3c(%r14), %rsi
leaq 0x16db1(%rip), %rdi     # 0x41bfd
movss 0x125fc(%rip), %xmm1    # 0x3d450
xorps %xmm0, %xmm0
movq %r12, %rdx
movss 0x1252e(%rip), %xmm2    # 0x3d390
callq 0x1bb62
leaq 0x48(%r14), %rsi
leaq 0x16d9d(%rip), %rdi     # 0x41c0f
movss 0x125f2(%rip), %xmm1    # 0x3d46c
xorps %xmm0, %xmm0
movq %r12, %rdx
movss 0x12508(%rip), %xmm2    # 0x3d390
callq 0x1ad02
leaq 0x50(%r14), %rsi
leaq 0x16d85(%rip), %rdi     # 0x41c1d
movss 0x124f0(%rip), %xmm0    # 0x3d390
movss 0x1481c(%rip), %xmm1    # 0x3f6c4
movq %r12, %rdx
movaps %xmm0, %xmm2
callq 0x1ad02
leaq 0x54(%r14), %rsi
leaq 0x16d6e(%rip), %rdi     # 0x41c2c
xorps %xmm0, %xmm0
movss 0x1253b(%rip), %xmm1    # 0x3d404
movq %r12, %rdx
movss 0x124bc(%rip), %xmm2    # 0x3d390
callq 0x1ad02
leaq 0x58(%r14), %rsi
leaq 0x16d5a(%rip), %rdi     # 0x41c3e
movss 0x124a4(%rip), %xmm0    # 0x3d390
movss 0x147d0(%rip), %xmm1    # 0x3f6c4
movq %r12, %rdx
movaps %xmm0, %xmm2
callq 0x1ad02
leaq 0x5c(%r14), %rsi
leaq 0x16d40(%rip), %rdi     # 0x41c4a
xorps %xmm0, %xmm0
movd 0x124ef(%rip), %xmm1    # 0x3d404
movq %r12, %rdx
movss 0x12470(%rip), %xmm2    # 0x3d390
callq 0x1ad02
callq 0x228ce
leaq 0x16d2d(%rip), %rdi     # 0x41c5e
callq 0x17d18
testb %al, %al
je 0x2b26f
leaq -0x30(%rbp), %rsi
movq $0x0, (%rsi)
leaq 0x16d07(%rip), %rdi     # 0x41c57
callq 0x1642f
testb %al, %al
movq %r13, -0x38(%rbp)
je 0x2b031
cmpl $0x0, 0x34870(%rip)     # 0x5f7d8
je 0x2af76
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x16b61
jmp 0x2af80
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x16c47
leaq 0x16cde(%rip), %rdi     # 0x41c65
xorl %ebx, %ebx
xorl %eax, %eax
callq 0xde0d
testq %r13, %r13
cmovneq %r13, %r15
leaq 0x78(%r14), %r13
addq $0x78, %r15
movl %ebx, %edi
callq 0x1505f
movq %rax, %r12
cmpb $0x1, 0x3482c(%rip)     # 0x5f7dc
jne 0x2afcc
movdqu (%r13), %xmm0
movdqu (%r15), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x2b017
movq %r12, %rdi
callq 0x72e0
movl $0x16, %edx
subl %eax, %edx
xorps %xmm0, %xmm0
cvtss2sd (%r13), %xmm0
xorps %xmm1, %xmm1
cvtss2sd 0x4(%r13), %xmm1
xorps %xmm2, %xmm2
cvtss2sd 0x8(%r13), %xmm2
xorps %xmm3, %xmm3
cvtss2sd 0xc(%r13), %xmm3
leaq 0x16c87(%rip), %rdi     # 0x41c8d
movq %r12, %rsi
leaq 0x16429(%rip), %rcx     # 0x41439
movb $0x4, %al
callq 0xde0d
incq %rbx
addq $0x10, %r13
addq $0x10, %r15
cmpq $0x2b, %rbx
jne 0x2af9f
callq 0x147e6
movss 0x12363(%rip), %xmm1    # 0x3d39c
xorps %xmm0, %xmm0
callq 0x15f5f
movss 0x12377(%rip), %xmm0    # 0x3d3c0
callq 0x9c64
leaq 0x16c7b(%rip), %rdi     # 0x41cd0
leaq 0x3477c(%rip), %rsi     # 0x5f7d8
leaq 0x176a9(%rip), %rdx     # 0x4270c
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x200b3
callq 0x9db1
xorps %xmm0, %xmm0
movss 0x1231f(%rip), %xmm1    # 0x3d39c
callq 0x15f5f
leaq 0x16c55(%rip), %rdi     # 0x41cde
leaq 0x3474c(%rip), %rsi     # 0x5f7dc
callq 0x1d626
leaq 0x13725(%rip), %rdi     # 0x3e7c1
leaq 0x3473d(%rip), %rbx     # 0x5f7e0
movq %rbx, %rsi
xorl %edx, %edx
callq 0x1e01c
xorps %xmm0, %xmm0
movss 0x122e4(%rip), %xmm1    # 0x3d39c
callq 0x15f5f
leaq 0x13701(%rip), %rdi     # 0x3e7c5
movq %rbx, %rsi
movl $0x1, %edx
callq 0x1e01c
xorps %xmm0, %xmm0
movd 0x122c0(%rip), %xmm1    # 0x3d39c
callq 0x15f5f
leaq 0x136e1(%rip), %rdi     # 0x3e7c9
movq %rbx, %rsi
movl $0x2, %edx
callq 0x1e01c
movb 0x34805(%rip), %al      # 0x5f900
testb %al, %al
je 0x2b286
leaq 0x346de(%rip), %rdi     # 0x5f7e8
leaq 0x16be2(%rip), %rsi     # 0x41cf3
movss 0x145ff(%rip), %xmm0    # 0x3f718
callq 0x9bce
movabsq $0x4396000000000000, %rax # imm = 0x4396000000000000
leaq -0x30(%rbp), %rsi
movq %rax, (%rsi)
leaq 0x16bcb(%rip), %rdi     # 0x41d01
xorl %r13d, %r13d
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x12f21
movd 0x145db(%rip), %xmm0    # 0x3f728
callq 0x9c64
movl 0x34688(%rip), %edi     # 0x5f7e0
callq 0x222be
addq $0x78, %r14
movq -0x38(%rbp), %rax
leaq 0x78(%rax), %r12
testq %rax, %rax
leaq -0x2e8(%rbp), %r15
cmovneq %r12, %r15
movl %r13d, %edi
callq 0x1505f
movq %rax, %rbx
leaq 0x3465f(%rip), %rdi     # 0x5f7e8
movq %rax, %rsi
xorl %edx, %edx
callq 0xa03e
testb %al, %al
je 0x2b247
movl %r13d, %edi
callq 0x17e36
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x21aa9
movdqu (%r14), %xmm0
movdqu (%r15), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x2b242
pxor %xmm0, %xmm0
movd 0x121c4(%rip), %xmm1    # 0x3d39c
callq 0x15f5f
movq $0x0, -0x30(%rbp)
leaq 0x16b1d(%rip), %rdi     # 0x41d09
leaq -0x30(%rbp), %rsi
callq 0x1642f
testb %al, %al
je 0x2b203
movdqu (%r15), %xmm0
movdqu %xmm0, (%r14)
cmpq $0x0, -0x38(%rbp)
je 0x2b242
pxor %xmm0, %xmm0
movd 0x12186(%rip), %xmm1    # 0x3d39c
callq 0x15f5f
movq $0x0, -0x30(%rbp)
leaq 0x16ae6(%rip), %rdi     # 0x41d10
leaq -0x30(%rbp), %rsi
callq 0x1642f
testb %al, %al
je 0x2b242
movdqu (%r14), %xmm0
movdqu %xmm0, (%r12)
callq 0x16b19
incq %r13
addq $0x10, %r12
addq $0x10, %r14
addq $0x10, %r15
cmpq $0x2b, %r13
jne 0x2b177
callq 0x9db1
callq 0x13129
callq 0x228ce
callq 0x9db1
addq $0x338, %rsp            # imm = 0x338
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x34673(%rip), %rdi     # 0x5f900
callq 0x7290
testl %eax, %eax
je 0x2b103
leaq 0x34547(%rip), %rdi     # 0x5f7e8
leaq 0x16191(%rip), %rsi     # 0x41439
callq 0x9a28
leaq 0xa8(%rip), %rdi        # 0x2b35c
leaq 0x3452d(%rip), %rsi     # 0x5f7e8
leaq 0x2a1b6(%rip), %rdx     # 0x55478
callq 0x7670
leaq 0x34632(%rip), %rdi     # 0x5f900
callq 0x7430
jmp 0x2b103
movq %rax, %rbx
leaq 0x3461e(%rip), %rdi     # 0x5f900
callq 0x7320
movq %rbx, %rdi
callq 0x74c0
nop