// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
subq $0x20, %rsp
movq 0x39725(%rip), %rsi     # 0x55490
movq 0x1758(%rsi), %r14
movb $0x1, 0x72(%r14)
movl 0x168(%r14), %ecx
testq %rcx, %rcx
je 0x1bf0d
testl %ecx, %ecx
jle 0x1bf2c
movq 0x170(%r14), %rax
leaq (%rcx,%rcx,8), %rcx
movq -0x24(%rax,%rcx,4), %rdx
movq %rdx, -0x20(%rbp)
movq 0xc0(%r14), %rdi
movq %rdi, -0x18(%rbp)
movss -0x14(%rbp), %xmm0
subss 0x1418(%rsi), %xmm0
movss -0x18(%rbp), %xmm3
movss %xmm0, -0x14(%rbp)
movss -0x20(%rbp), %xmm2
movss -0x1c(%rbp), %xmm1
movaps %xmm3, %xmm4
cmpless %xmm2, %xmm4
movaps %xmm4, %xmm5
andps %xmm2, %xmm5
andnps %xmm3, %xmm4
orps %xmm5, %xmm4
movaps %xmm0, %xmm3
cmpless %xmm1, %xmm3
movaps %xmm3, %xmm5
andnps %xmm0, %xmm5
andps %xmm1, %xmm3
orps %xmm5, %xmm3
unpcklps %xmm3, %xmm4            # xmm4 = xmm4[0],xmm3[0],xmm4[1],xmm3[1]
movlps %xmm4, -0x18(%rbp)
movq %rdx, 0xa8(%r14)
movss -0x1c(%rax,%rcx,4), %xmm0
movss -0x18(%rax,%rcx,4), %xmm3
movss 0xc0(%r14), %xmm4
movss 0xc4(%r14), %xmm5
movaps %xmm4, %xmm6
cmpless %xmm0, %xmm6
andps %xmm6, %xmm0
andnps %xmm4, %xmm6
orps %xmm0, %xmm6
movaps %xmm5, %xmm0
cmpless %xmm3, %xmm0
andps %xmm0, %xmm3
andnps %xmm5, %xmm0
orps %xmm3, %xmm0
unpcklps %xmm0, %xmm6            # xmm6 = xmm6[0],xmm0[0],xmm6[1],xmm0[1]
movlps %xmm6, 0xc0(%r14)
movss -0x10(%rax,%rcx,4), %xmm0
movss %xmm0, 0xc8(%r14)
movss -0xc(%rax,%rcx,4), %xmm0
movss %xmm0, 0xcc(%r14)
movss -0x14(%rax,%rcx,4), %xmm3
movss %xmm3, 0x194(%r14)
movss 0xac(%r14), %xmm3
addss 0x21576(%rip), %xmm3    # 0x3d404
movss %xmm3, 0xd8(%r14)
cmpb $0x1, -0x4(%rax,%rcx,4)
jne 0x1bef0
movss 0xd4(%r14), %xmm3
movaps %xmm0, %xmm4
cmpless %xmm3, %xmm4
andps %xmm4, %xmm3
andnps %xmm0, %xmm4
orps %xmm3, %xmm4
movss %xmm4, 0xcc(%r14)
leaq -0x20(%rbp), %rbx
movss 0x8(%rbx), %xmm3
movss 0xc(%rbx), %xmm4
subss %xmm2, %xmm3
subss %xmm1, %xmm4
unpcklps %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1]
leaq -0x28(%rbp), %rdi
movlps %xmm3, (%rdi)
callq 0xaab7
movq %rbx, %rdi
xorl %esi, %esi
callq 0xac09
movl 0x168(%r14), %eax
testl %eax, %eax
jle 0x1bf4b
decl %eax
movl %eax, 0x168(%r14)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x228ab(%rip), %rdi     # 0x3e7bf
leaq 0x2176a(%rip), %rsi     # 0x3d685
leaq 0x228bc(%rip), %rcx     # 0x3e7de
movl $0x215a, %edx           # imm = 0x215A
callq 0x7140
leaq 0x2ac82(%rip), %rdi     # 0x46bb5
leaq 0x22b59(%rip), %rsi     # 0x3ea93
leaq 0x2375f(%rip), %rcx     # 0x3f6a0
movl $0x326, %edx            # imm = 0x326
callq 0x7140
leaq 0x2ac63(%rip), %rdi     # 0x46bb5
leaq 0x22b3a(%rip), %rsi     # 0x3ea93
leaq 0x23782(%rip), %rcx     # 0x3f6e2
movl $0x338, %edx            # imm = 0x338
callq 0x7140