// File: /workspace/github_cpp_makefile_star2_O2/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, %rbx
callq 0xa106
movq %rax, %r14
leaq -0x360(%rbp), %r15
movq %r15, %rdi
callq 0x7b3c
leaq -0x30(%rbp), %rsi
andq $0x0, (%rsi)
leaq 0x14da6(%rip), %rdi     # 0x3ad21
callq 0x129b2
testb %al, %al
je 0x25f9b
testq %rbx, %rbx
movq %rbx, %rsi
cmoveq %r15, %rsi
movl $0x328, %edx            # imm = 0x328
movq %r14, %rdi
callq 0x7080
testq %rbx, %rbx
je 0x25fd8
movd 0x103f4(%rip), %xmm1    # 0x3639c
xorps %xmm0, %xmm0
callq 0x1254d
leaq -0x30(%rbp), %rsi
andq $0x0, (%rsi)
leaq 0x14d6f(%rip), %rdi     # 0x3ad2e
callq 0x129b2
testb %al, %al
je 0x25fd8
movl $0x328, %edx            # imm = 0x328
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7080
callq 0x11852
mulss 0x1293b(%rip), %xmm0    # 0x38920
callq 0x91e1
leaq 0x14d48(%rip), %rdi     # 0x3ad39
callq 0x13d10
testb %al, %al
movq %rbx, -0x38(%rbp)
je 0x2607a
leaq 0x70(%r14), %rsi
leaq 0x14d3a(%rip), %rdi     # 0x3ad43
callq 0x18846
leaq 0x71(%r14), %rsi
leaq 0x14d3d(%rip), %rdi     # 0x3ad56
callq 0x18846
movss 0x1044a(%rip), %xmm0    # 0x36470
callq 0x91e1
leaq 0x74(%r14), %rbx
leaq 0x14d34(%rip), %rdi     # 0x3ad6a
movss 0x128e6(%rip), %xmm0    # 0x38924
movd 0x10382(%rip), %xmm1    # 0x363c8
movss 0x10386(%rip), %xmm2    # 0x363d4
movss 0x10382(%rip), %xmm3    # 0x363d8
movq %rbx, %rsi
xorl %edx, %edx
callq 0x17681
xorps %xmm0, %xmm0
ucomiss 0x74(%r14), %xmm0
jbe 0x26070
movl $0x3dcccccd, (%rbx)     # imm = 0x3DCCCCCD
callq 0x9272
callq 0x1cba4
leaq 0x14d06(%rip), %rdi     # 0x3ad87
callq 0x13d10
testb %al, %al
je 0x262b1
leaq 0x14cf8(%rip), %rdi     # 0x3ad8d
leaq 0x13ad5(%rip), %rdx     # 0x39b71
movss 0x1036c(%rip), %xmm0    # 0x36410
movss 0x102e4(%rip), %xmm1    # 0x36390
movq %r14, %rsi
movaps %xmm1, %xmm2
callq 0x167a0
leaq 0x4(%r14), %rsi
leaq 0x14cd1(%rip), %rdi     # 0x3ad93
leaq 0x13fa2(%rip), %r12     # 0x3a06b
movss 0x127f3(%rip), %xmm1    # 0x388c4
xorps %xmm0, %xmm0
movq %r12, %rdx
movss 0x102b1(%rip), %xmm2    # 0x36390
callq 0x1724a
leaq 0x14(%r14), %rsi
leaq 0x14cb7(%rip), %rdi     # 0x3ada6
movss 0x1030d(%rip), %xmm1    # 0x36404
xorps %xmm0, %xmm0
movq %r12, %rdx
movss 0x1028b(%rip), %xmm2    # 0x36390
callq 0x167a0
leaq 0x1c(%r14), %rsi
leaq 0x14c8c(%rip), %rdi     # 0x3ada1
xorps %xmm0, %xmm0
movss 0x102e4(%rip), %xmm1    # 0x36404
movq %r12, %rdx
movss 0x10265(%rip), %xmm2    # 0x36390
callq 0x167a0
leaq 0x20(%r14), %rsi
leaq 0x14c7a(%rip), %rdi     # 0x3adb5
xorps %xmm0, %xmm0
movss 0x1277e(%rip), %xmm1    # 0x388c4
movq %r12, %rdx
movss 0x1023f(%rip), %xmm2    # 0x36390
callq 0x1724a
leaq 0x28(%r14), %rsi
leaq 0x14c61(%rip), %rdi     # 0x3adc2
xorps %xmm0, %xmm0
movss 0x10298(%rip), %xmm1    # 0x36404
movq %r12, %rdx
movss 0x10219(%rip), %xmm2    # 0x36390
callq 0x167a0
leaq 0x2c(%r14), %rsi
leaq 0x14c49(%rip), %rdi     # 0x3add0
xorps %xmm0, %xmm0
movss 0x12732(%rip), %xmm1    # 0x388c4
movq %r12, %rdx
movss 0x101f3(%rip), %xmm2    # 0x36390
callq 0x1724a
leaq 0x34(%r14), %rsi
leaq 0x14c2f(%rip), %rdi     # 0x3addc
xorps %xmm0, %xmm0
movss 0x1270c(%rip), %xmm1    # 0x388c4
movq %r12, %rdx
movss 0x101cd(%rip), %xmm2    # 0x36390
callq 0x1724a
leaq 0x3c(%r14), %rsi
leaq 0x14c1a(%rip), %rdi     # 0x3aded
movss 0x10271(%rip), %xmm1    # 0x3644c
xorps %xmm0, %xmm0
movq %r12, %rdx
movss 0x101a7(%rip), %xmm2    # 0x36390
callq 0x1724a
leaq 0x48(%r14), %rsi
leaq 0x14c06(%rip), %rdi     # 0x3adff
movss 0x10263(%rip), %xmm1    # 0x36464
xorps %xmm0, %xmm0
movq %r12, %rdx
movss 0x10181(%rip), %xmm2    # 0x36390
callq 0x167a0
leaq 0x50(%r14), %rsi
leaq 0x14bee(%rip), %rdi     # 0x3ae0d
movss 0x10169(%rip), %xmm0    # 0x36390
movss 0x12695(%rip), %xmm1    # 0x388c4
movq %r12, %rdx
movaps %xmm0, %xmm2
callq 0x167a0
leaq 0x54(%r14), %rsi
leaq 0x14bd7(%rip), %rdi     # 0x3ae1c
xorps %xmm0, %xmm0
movss 0x101b4(%rip), %xmm1    # 0x36404
movq %r12, %rdx
movss 0x10135(%rip), %xmm2    # 0x36390
callq 0x167a0
leaq 0x58(%r14), %rsi
leaq 0x14bc3(%rip), %rdi     # 0x3ae2e
movss 0x1011d(%rip), %xmm0    # 0x36390
movss 0x12649(%rip), %xmm1    # 0x388c4
movq %r12, %rdx
movaps %xmm0, %xmm2
callq 0x167a0
leaq 0x5c(%r14), %rsi
leaq 0x14ba9(%rip), %rdi     # 0x3ae3a
xorps %xmm0, %xmm0
movd 0x10168(%rip), %xmm1    # 0x36404
movq %r12, %rdx
movss 0x100e9(%rip), %xmm2    # 0x36390
callq 0x167a0
callq 0x1cba4
leaq 0x14b96(%rip), %rdi     # 0x3ae4e
callq 0x13d10
testb %al, %al
je 0x265d1
leaq -0x30(%rbp), %rsi
andq $0x0, (%rsi)
leaq 0x14b73(%rip), %rdi     # 0x3ae47
callq 0x129b2
testb %al, %al
je 0x263a1
cmpl $0x0, 0x344f0(%rip)     # 0x5a7d8
je 0x262f4
pushq $-0x1
popq %rdi
callq 0x12ec5
jmp 0x262fc
pushq $-0x1
popq %rdi
callq 0x12fab
leaq 0x14b52(%rip), %rdi     # 0x3ae55
xorl %ebx, %ebx
xorl %eax, %eax
callq 0xc0ac
leaq 0x78(%r14), %r13
movq -0x38(%rbp), %rax
testq %rax, %rax
cmovneq %rax, %r15
addq $0x78, %r15
cmpq $0x2b, %rbx
je 0x2639c
movl %ebx, %edi
callq 0x11775
movq %rax, %r12
cmpb $0x1, 0x344a6(%rip)     # 0x5a7dc
jne 0x26352
movdqu (%r15), %xmm0
movdqu (%r13), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x2638f
movq %r12, %rdi
callq 0x7300
pushq $0x16
popq %rdx
subl %eax, %edx
cvtss2sd (%r13), %xmm0
cvtss2sd 0x4(%r13), %xmm1
cvtss2sd 0x8(%r13), %xmm2
cvtss2sd 0xc(%r13), %xmm3
leaq 0x14aff(%rip), %rdi     # 0x3ae7d
movq %r12, %rsi
leaq 0x142a1(%rip), %rcx     # 0x3a629
movb $0x4, %al
callq 0xc0ac
incq %rbx
addq $0x10, %r13
addq $0x10, %r15
jmp 0x2631f
callq 0x112ea
movss 0xfff3(%rip), %xmm1     # 0x3639c
xorps %xmm0, %xmm0
callq 0x1254d
movss 0x1000b(%rip), %xmm0    # 0x363c4
callq 0x91e1
leaq 0x14afb(%rip), %rdi     # 0x3aec0
leaq 0x3440c(%rip), %rsi     # 0x5a7d8
leaq 0x15549(%rip), %rdx     # 0x3b91c
pushq $-0x1
popq %rcx
callq 0x1aa63
callq 0x9272
xorps %xmm0, %xmm0
movss 0xffb1(%rip), %xmm1     # 0x3639c
callq 0x1254d
leaq 0x14ad7(%rip), %rdi     # 0x3aece
leaq 0x343de(%rip), %rsi     # 0x5a7dc
callq 0x18846
leaq 0x1136f(%rip), %rdi     # 0x37779
leaq 0x343cf(%rip), %rbx     # 0x5a7e0
movq %rbx, %rsi
xorl %edx, %edx
callq 0x1908c
xorps %xmm0, %xmm0
movss 0xff76(%rip), %xmm1     # 0x3639c
callq 0x1254d
leaq 0x1134b(%rip), %rdi     # 0x3777d
pushq $0x1
popq %rdx
movq %rbx, %rsi
callq 0x1908c
xorps %xmm0, %xmm0
movd 0xff54(%rip), %xmm1     # 0x3639c
callq 0x1254d
leaq 0x1132d(%rip), %rdi     # 0x37781
pushq $0x2
popq %rdx
movq %rbx, %rsi
callq 0x1908c
movb 0x3449b(%rip), %al      # 0x5a900
testb %al, %al
je 0x265e8
leaq 0x34374(%rip), %rdi     # 0x5a7e8
leaq 0x14a68(%rip), %rsi     # 0x3aee3
movss 0x1248d(%rip), %xmm0    # 0x38910
callq 0x916e
movabsq $0x4396000000000000, %rax # imm = 0x4396000000000000
leaq -0x30(%rbp), %rsi
movq %rax, (%rsi)
leaq 0x14a51(%rip), %rdi     # 0x3aef1
pushq $0x1
popq %rdx
xorl %ebx, %ebx
xorl %ecx, %ecx
callq 0xfc8c
movd 0x12474(%rip), %xmm0    # 0x38928
callq 0x91e1
movl 0x34321(%rip), %edi     # 0x5a7e0
callq 0x1c62e
addq $0x78, %r14
movq -0x38(%rbp), %rax
leaq 0x78(%rax), %r12
testq %rax, %rax
leaq -0x2e8(%rbp), %r15
cmovneq %r12, %r15
cmpq $0x2b, %rbx
je 0x265c2
movl %ebx, %edi
callq 0x11775
movq %rax, %r13
leaq 0x342ef(%rip), %rdi     # 0x5a7e8
movq %rax, %rsi
xorl %edx, %edx
callq 0x9346
testb %al, %al
je 0x265ae
movl %ebx, %edi
callq 0x13d85
movq %r13, %rdi
movq %r14, %rsi
pushq $0x1
popq %rdx
callq 0x1c094
movdqu (%r15), %xmm0
movdqu (%r14), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x265a9
pxor %xmm0, %xmm0
movd 0xfe57(%rip), %xmm1     # 0x3639c
callq 0x1254d
andq $0x0, -0x30(%rbp)
leaq 0x149a3(%rip), %rdi     # 0x3aef9
leaq -0x30(%rbp), %rsi
callq 0x129b2
testb %al, %al
je 0x2656d
movdqu (%r15), %xmm0
movdqu %xmm0, (%r14)
cmpq $0x0, -0x38(%rbp)
je 0x265a9
pxor %xmm0, %xmm0
movd 0xfe1c(%rip), %xmm1     # 0x3639c
callq 0x1254d
andq $0x0, -0x30(%rbp)
leaq 0x1496f(%rip), %rdi     # 0x3af00
leaq -0x30(%rbp), %rsi
callq 0x129b2
testb %al, %al
je 0x265a9
movdqu (%r14), %xmm0
movdqu %xmm0, (%r12)
callq 0x12ea2
incq %rbx
addq $0x10, %r12
addq $0x10, %r14
addq $0x10, %r15
jmp 0x264de
callq 0x9272
callq 0xfe6f
callq 0x1cba4
callq 0x9272
addq $0x338, %rsp            # imm = 0x338
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x34311(%rip), %rdi     # 0x5a900
callq 0x72a0
testl %eax, %eax
je 0x2646d
leaq 0x341e5(%rip), %rdi     # 0x5a7e8
leaq 0x1401f(%rip), %rsi     # 0x3a629
callq 0x9066
leaq 0xf0(%rip), %rdi        # 0x26706
leaq 0x341cb(%rip), %rsi     # 0x5a7e8
leaq 0x29e54(%rip), %rdx     # 0x50478
callq 0x7650
leaq 0x342d0(%rip), %rdi     # 0x5a900
callq 0x7420
jmp 0x2646d
movq %rax, %rbx
leaq 0x342bc(%rip), %rdi     # 0x5a900
callq 0x7340
movq %rbx, %rdi
callq 0x74b0
nop