// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui.cpp
// Function: ImGui::Checkbox(char const*, bool*)
bool ImGui::Checkbox(const char* label, bool* v)
{
    ImGuiWindow* window = GetCurrentWindow();
    if (window->SkipItems)
        return false;

    ImGuiState& g = *GImGui;
    const ImGuiStyle& style = g.Style;
    const ImGuiID id = window->GetID(label);
    const ImVec2 label_size = CalcTextSize(label, NULL, true);

    const ImRect check_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(label_size.y + style.FramePadding.y*2, label_size.y + style.FramePadding.y*2));
    ItemSize(check_bb, style.FramePadding.y);

    ImRect total_bb = check_bb;
    if (label_size.x > 0)
        SameLine(0, style.ItemInnerSpacing.x);
    const ImRect text_bb(window->DC.CursorPos + ImVec2(0,style.FramePadding.y), window->DC.CursorPos + ImVec2(0,style.FramePadding.y) + label_size);
    if (label_size.x > 0)
    {
        ItemSize(ImVec2(text_bb.GetWidth(), check_bb.GetHeight()), style.FramePadding.y);
        total_bb = ImRect(ImMin(check_bb.Min, text_bb.Min), ImMax(check_bb.Max, text_bb.Max));
    }

    if (!ItemAdd(total_bb, &id))
        return false;

    bool hovered, held;
    bool pressed = ButtonBehavior(total_bb, id, &hovered, &held, true);
    if (pressed)
        *v = !(*v);

    RenderFrame(check_bb.Min, check_bb.Max, window->Color((held && hovered) ? ImGuiCol_FrameBgActive : hovered ? ImGuiCol_FrameBgHovered : ImGuiCol_FrameBg), true, style.FrameRounding);
    if (*v)
    {
        const float check_sz = ImMin(check_bb.GetWidth(), check_bb.GetHeight());
        const float pad = ImMax(1.0f, (float)(int)(check_sz / 6.0f));
        window->DrawList->AddRectFilled(check_bb.Min+ImVec2(pad,pad), check_bb.Max-ImVec2(pad,pad), window->Color(ImGuiCol_CheckMark), style.FrameRounding);
    }

    if (g.LogEnabled)
        LogRenderedText(text_bb.GetTL(), *v ? "[x]" : "[ ]");
    RenderText(text_bb.GetTL(), label);

    return pressed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq 0x37e3f(%rip), %r13     # 0x55480
movq 0x1758(%r13), %r15
movb $0x1, 0x72(%r15)
cmpb $0x0, 0x74(%r15)
jne 0x1da8f
movq %rsi, %r14
movq %rdi, %rbx
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0xa766
movl %eax, -0x30(%rbp)
movss 0x1fd26(%rip), %xmm0    # 0x3d39c
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0xe505
movaps %xmm0, -0x80(%rbp)
movaps %xmm0, %xmm2
shufps $0x55, %xmm0, %xmm2     # xmm2 = xmm2[1,1],xmm0[1,1]
movss 0x140c(%r13), %xmm0
movaps %xmm0, %xmm1
addss %xmm0, %xmm1
movaps %xmm2, -0x70(%rbp)
addss %xmm2, %xmm1
movss 0xa8(%r15), %xmm2
addss %xmm1, %xmm2
addss 0xac(%r15), %xmm1
movaps %xmm2, %xmm3
unpcklps %xmm1, %xmm3            # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
movaps %xmm3, -0x110(%rbp)
movsd 0xa8(%r15), %xmm4
movaps %xmm4, -0x50(%rbp)
movaps %xmm4, %xmm3
shufps $0x55, %xmm4, %xmm3     # xmm3 = xmm3[1,1],xmm4[1,1]
movaps %xmm2, -0xf0(%rbp)
subss %xmm4, %xmm2
movaps %xmm1, -0x100(%rbp)
movaps %xmm1, %xmm4
movaps %xmm3, -0xe0(%rbp)
subss %xmm3, %xmm4
movaps %xmm2, -0x130(%rbp)
movaps %xmm2, %xmm1
movaps %xmm4, -0xd0(%rbp)
unpcklps %xmm4, %xmm1            # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1]
leaq -0x90(%rbp), %rdi
movlps %xmm1, (%rdi)
callq 0xa99d
movaps -0x50(%rbp), %xmm0
unpcklpd -0x110(%rbp), %xmm0     # xmm0 = xmm0[0],mem[0]
movups %xmm0, -0xb0(%rbp)
xorps %xmm0, %xmm0
movaps -0x80(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x1d896
movaps %xmm1, %xmm2
movss 0x141c(%r13), %xmm0
movq 0x37d28(%rip), %rcx     # 0x55480
movq 0x1758(%rcx), %rax
movb $0x1, 0x72(%rax)
cmpb $0x0, 0x74(%rax)
jne 0x1d7a3
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
jbe 0x1d779
movss 0x1414(%rcx), %xmm0
addss 0xb0(%rax), %xmm0
movl 0xb4(%rax), %ecx
movq 0xd0(%rax), %rdx
movq %rdx, 0xc8(%rax)
movss %xmm0, 0xa8(%rax)
movl %ecx, 0xac(%rax)
movss 0x140c(%r13), %xmm0
movss 0xa8(%r15), %xmm1
movss %xmm1, -0x34(%rbp)
xorps %xmm4, %xmm4
addss %xmm1, %xmm4
movaps %xmm4, -0x120(%rbp)
movss 0xac(%r15), %xmm3
addss %xmm0, %xmm3
movaps %xmm3, -0x60(%rbp)
movaps %xmm4, %xmm1
unpcklps %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
movaps %xmm1, -0xc0(%rbp)
movaps -0x70(%rbp), %xmm1
addss %xmm3, %xmm1
movaps %xmm1, -0x70(%rbp)
movaps %xmm2, %xmm1
addss %xmm4, %xmm1
movaps %xmm1, -0x80(%rbp)
subss %xmm4, %xmm1
leaq -0x90(%rbp), %rdi
movss %xmm1, (%rdi)
movaps -0xd0(%rbp), %xmm1
movss %xmm1, 0x4(%rdi)
callq 0xa99d
movaps -0x50(%rbp), %xmm2
movaps %xmm2, %xmm0
cmpltss -0x34(%rbp), %xmm0
movaps %xmm0, %xmm1
andnps -0x120(%rbp), %xmm1
andps %xmm2, %xmm0
orps %xmm1, %xmm0
movaps -0xe0(%rbp), %xmm1
minss -0x60(%rbp), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movaps -0x80(%rbp), %xmm4
movaps %xmm4, %xmm1
movaps -0xf0(%rbp), %xmm3
cmpless %xmm3, %xmm1
movaps %xmm1, %xmm2
andnps %xmm4, %xmm2
andps %xmm3, %xmm1
orps %xmm2, %xmm1
movaps -0x70(%rbp), %xmm5
movaps %xmm5, %xmm2
movaps -0x100(%rbp), %xmm4
cmpless %xmm4, %xmm2
movaps %xmm2, %xmm3
andnps %xmm5, %xmm3
andps %xmm4, %xmm2
orps %xmm3, %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movlhps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
movups %xmm0, -0xb0(%rbp)
jmp 0x1d8bf
addss 0xa8(%r15), %xmm0
movss 0x140c(%r13), %xmm1
addss 0xac(%r15), %xmm1
movaps %xmm1, -0x60(%rbp)
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movaps %xmm0, -0xc0(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xaaef
testb %al, %al
je 0x1da8f
movl -0x30(%rbp), %esi
leaq -0xb0(%rbp), %rdi
leaq -0x2a(%rbp), %rdx
leaq -0x29(%rbp), %rcx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x13a49
movl %eax, %r12d
testb %al, %al
je 0x1d902
xorb $0x1, (%r14)
movb -0x29(%rbp), %al
movb -0x2a(%rbp), %cl
movl %eax, %edx
xorb $0x1, %dl
andb %cl, %dl
movzbl %dl, %edx
orl $0x6, %edx
testb $0x1, %cl
movl $0x8, %ecx
cmovel %edx, %ecx
movq 0x37b59(%rip), %rsi     # 0x55480
testb %al, %al
cmovel %edx, %ecx
shll $0x4, %ecx
movups 0x1460(%rsi,%rcx), %xmm0
leaq -0x90(%rbp), %rdi
movaps %xmm0, (%rdi)
movss 0x13e8(%rsi), %xmm0
mulss 0xc(%rdi), %xmm0
movss %xmm0, 0xc(%rdi)
callq 0x8c82
movss 0x1410(%r13), %xmm2
movaps -0x50(%rbp), %xmm0
movaps -0x110(%rbp), %xmm1
movl %eax, %edi
movl $0x1, %esi
callq 0xe58d
cmpb $0x1, (%r14)
jne 0x1da4c
movaps -0x130(%rbp), %xmm0
minss -0xd0(%rbp), %xmm0
divss 0x1fa0b(%rip), %xmm0    # 0x3d3a4
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
movss 0x1f9e8(%rip), %xmm1    # 0x3d390
maxss %xmm0, %xmm1
movq 0x270(%r15), %r15
movaps -0x50(%rbp), %xmm2
addss %xmm1, %xmm2
movaps -0xe0(%rbp), %xmm0
addss %xmm1, %xmm0
unpcklps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
leaq -0xa0(%rbp), %rax
movlps %xmm2, (%rax)
movaps -0xf0(%rbp), %xmm2
subss %xmm1, %xmm2
movaps -0x100(%rbp), %xmm0
subss %xmm1, %xmm0
unpcklps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
leaq -0x98(%rbp), %rax
movlps %xmm2, (%rax)
movq 0x37a83(%rip), %rax     # 0x55480
movups 0x1580(%rax), %xmm0
leaq -0x90(%rbp), %rdi
movaps %xmm0, (%rdi)
movss 0x13e8(%rax), %xmm0
mulss 0xc(%rdi), %xmm0
movss %xmm0, 0xc(%rdi)
callq 0x8c82
movss 0x1410(%r13), %xmm0
movq %r15, %rdi
leaq -0xa0(%rbp), %rsi
leaq -0x98(%rbp), %rdx
movl %eax, %ecx
movl $0xf, %r8d
callq 0x2f984
cmpb $0x1, 0x2be8(%r13)
jne 0x1da77
leaq 0x20992(%rip), %rax     # 0x3e3ef
leaq 0x2098f(%rip), %rdi     # 0x3e3f3
cmpb $0x0, (%r14)
cmovneq %rax, %rdi
movaps -0x60(%rbp), %xmm0
xorl %esi, %esi
callq 0xe021
movaps -0xc0(%rbp), %xmm0
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0xdecf
jmp 0x1da92
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq