// File: /workspace/github_cpp_makefile_star2_O2/donfreiday[P]gb/./imgui/imgui.cpp
// Function: ImGui::EndGroup()
void ImGui::EndGroup()
{
    ImGuiWindow* window = GetCurrentWindow();
    ImGuiStyle& style = ImGui::GetStyle();

    IM_ASSERT(!window->DC.GroupStack.empty());

    ImGuiGroupData& group_data = window->DC.GroupStack.back();

    ImRect group_bb(group_data.BackupCursorPos, window->DC.CursorMaxPos);
    group_bb.Max.y -= style.ItemSpacing.y;      // Cancel out last vertical spacing because we are adding one ourselves.
    group_bb.Max = ImMax(group_bb.Min, group_bb.Max);

    window->DC.CursorPos = group_data.BackupCursorPos;
    window->DC.CursorMaxPos = ImMax(group_data.BackupCursorMaxPos, window->DC.CursorMaxPos);
    window->DC.CurrentLineHeight = group_data.BackupCurrentLineHeight;
    window->DC.CurrentLineTextBaseOffset = group_data.BackupCurrentLineTextBaseOffset;
    window->DC.ColumnsStartX = group_data.BackupColumnsStartX;
    window->DC.LogLinePosY = window->DC.CursorPos.y - 9999.0f;

    if (group_data.AdvanceCursor)
    {
        window->DC.CurrentLineTextBaseOffset = ImMax(window->DC.PrevLineTextBaseOffset, group_data.BackupCurrentLineTextBaseOffset);      // FIXME: Incorrect, we should grab the base offset from the *first line* of the group but it is hard to obtain now.
        ItemSize(group_bb.GetSize(), group_data.BackupCurrentLineTextBaseOffset);
        ItemAdd(group_bb, NULL);
    }

    window->DC.GroupStack.pop_back();

    //window->DrawList->AddRect(group_bb.Min, group_bb.Max, 0xFFFF00FF);   // Debug
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq 0x393c6(%rip), %r12     # 0x50480
movq 0x1758(%r12), %r15
movb $0x1, 0x72(%r15)
cmpl $0x0, 0x168(%r15)
je 0x1722b
leaq 0x168(%r15), %rbx
movq %rbx, %rdi
callq 0x1f5b2
movq %rax, %r14
leaq 0xc0(%r15), %rsi
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movss 0xc0(%r15), %xmm0
movss 0xc4(%r15), %xmm1
subss 0x1418(%r12), %xmm1
movd %eax, %xmm4
movaps %xmm0, %xmm3
cmpless %xmm4, %xmm3
movaps %xmm3, %xmm2
movaps %xmm4, -0x50(%rbp)
andps %xmm4, %xmm2
andnps %xmm0, %xmm3
orps %xmm2, %xmm3
movq %rax, %rcx
shrq $0x20, %rcx
movd %ecx, %xmm4
movdqa %xmm4, -0x70(%rbp)
movaps %xmm1, %xmm2
cmpless %xmm4, %xmm2
movaps %xmm2, %xmm0
andnps %xmm1, %xmm0
andps %xmm4, %xmm2
orps %xmm0, %xmm2
movaps %xmm3, -0x60(%rbp)
movaps %xmm3, %xmm0
movaps %xmm2, -0x40(%rbp)
unpcklps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
movlps %xmm0, -0x28(%rbp)
movq %rax, 0xa8(%r15)
leaq 0x8(%r14), %rdi
callq 0x10525
movaps -0x70(%rbp), %xmm3
movlps %xmm0, 0xc0(%r15)
movss 0x14(%r14), %xmm0
movss %xmm0, 0xc8(%r15)
movss 0x18(%r14), %xmm0
movss %xmm0, 0xcc(%r15)
movss 0x10(%r14), %xmm1
movss %xmm1, 0x194(%r15)
movss 0x1f208(%rip), %xmm1    # 0x363bc
addss %xmm3, %xmm1
movss %xmm1, 0xd8(%r15)
cmpb $0x1, 0x20(%r14)
jne 0x17216
movss 0xd4(%r15), %xmm1
movaps %xmm0, %xmm2
cmpless %xmm1, %xmm2
andps %xmm2, %xmm1
andnps %xmm0, %xmm2
orps %xmm1, %xmm2
movss %xmm2, 0xcc(%r15)
movaps -0x60(%rbp), %xmm1
subss -0x50(%rbp), %xmm1
movaps -0x40(%rbp), %xmm2
subss %xmm3, %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
leaq -0x78(%rbp), %rdi
movlps %xmm1, (%rdi)
callq 0x99d9
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0x9b28
movq %rbx, %rdi
callq 0x1f5ee
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x20575(%rip), %rdi     # 0x377a7
leaq 0x1f434(%rip), %rsi     # 0x3666d
leaq 0x20586(%rip), %rcx     # 0x377c6
movl $0x215a, %edx           # imm = 0x215A
callq 0x7140