// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::EndGroup()
void ImGui::EndGroup()
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    IM_ASSERT(g.GroupStack.Size > 0); // Mismatched BeginGroup()/EndGroup() calls

    ImGuiGroupData& group_data = g.GroupStack.back();
    IM_ASSERT(group_data.WindowID == window->ID); // EndGroup() in wrong window?

    ImRect group_bb(group_data.BackupCursorPos, ImMax(window->DC.CursorMaxPos, group_data.BackupCursorPos));

    window->DC.CursorPos = group_data.BackupCursorPos;
    window->DC.CursorMaxPos = ImMax(group_data.BackupCursorMaxPos, window->DC.CursorMaxPos);
    window->DC.Indent = group_data.BackupIndent;
    window->DC.GroupOffset = group_data.BackupGroupOffset;
    window->DC.CurrLineSize = group_data.BackupCurrLineSize;
    window->DC.CurrLineTextBaseOffset = group_data.BackupCurrLineTextBaseOffset;
    if (g.LogEnabled)
        g.LogLinePosY = -FLT_MAX; // To enforce Log carriage return

    if (!group_data.EmitItem)
    {
        g.GroupStack.pop_back();
        return;
    }

    window->DC.CurrLineTextBaseOffset = ImMax(window->DC.PrevLineTextBaseOffset, group_data.BackupCurrLineTextBaseOffset);      // 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());
    ItemAdd(group_bb, 0);

    // If the current ActiveId was declared within the boundary of our group, we copy it to LastItemId so IsItemActive(), IsItemDeactivated() etc. will be functional on the entire group.
    // It would be be neater if we replaced window.DC.LastItemId by e.g. 'bool LastItemIsActive', but would put a little more burden on individual widgets.
    // Also if you grep for LastItemId you'll notice it is only used in that context.
    // (The two tests not the same because ActiveIdIsAlive is an ID itself, in order to be able to handle ActiveId being overwritten during the frame.)
    const bool group_contains_curr_active_id = (group_data.BackupActiveIdIsAlive != g.ActiveId) && (g.ActiveIdIsAlive == g.ActiveId) && g.ActiveId;
    const bool group_contains_prev_active_id = (group_data.BackupActiveIdPreviousFrameIsAlive == false) && (g.ActiveIdPreviousFrameIsAlive == true);
    if (group_contains_curr_active_id)
        window->DC.LastItemId = g.ActiveId;
    else if (group_contains_prev_active_id)
        window->DC.LastItemId = g.ActiveIdPreviousFrame;
    window->DC.LastItemRect = group_bb;

    // Forward Edited flag
    if (group_contains_curr_active_id && g.ActiveIdHasBeenEditedThisFrame)
        window->DC.LastItemStatusFlags |= ImGuiItemStatusFlags_Edited;

    // Forward Deactivated flag
    window->DC.LastItemStatusFlags |= ImGuiItemStatusFlags_HasDeactivated;
    if (group_contains_prev_active_id && g.ActiveId != g.ActiveIdPreviousFrame)
        window->DC.LastItemStatusFlags |= ImGuiItemStatusFlags_Deactivated;

    g.GroupStack.pop_back();
    //window->DrawList->AddRect(group_bb.Min, group_bb.Max, IM_COL32(255,0,255,255));   // [Debug]
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq 0xa079d(%rip), %r13     # 0xe3ce0
cmpl $0x0, 0x1c60(%r13)
jle 0x437ae
movq 0x1ae0(%r13), %r12
leaq 0x1c60(%r13), %rdi
movq %rdi, -0x30(%rbp)
callq 0x4b8f2
movq %rax, %r14
movl (%rax), %eax
cmpl 0x8(%r12), %eax
jne 0x437cd
leaq 0x4(%r14), %rsi
leaq 0xf0(%r12), %r15
movq %r15, %rdi
callq 0x41d33
movq 0x4(%r14), %rbx
movq %rbx, -0x40(%rbp)
movaps %xmm0, -0x50(%rbp)
movlps %xmm0, -0x38(%rbp)
movq %rbx, 0xd8(%r12)
movq %r14, %rdi
addq $0xc, %rdi
movq %r15, %rsi
callq 0x41d33
movlps %xmm0, 0xf0(%r12)
movl 0x14(%r14), %eax
movl %eax, 0x118(%r12)
movl 0x18(%r14), %eax
movl %eax, 0x120(%r12)
movq 0x1c(%r14), %rax
movq %rax, 0x100(%r12)
movss 0x24(%r14), %xmm0
movss %xmm0, 0x110(%r12)
cmpb $0x1, 0x3138(%r13)
jne 0x43605
movl $0xff7fffff, 0x3158(%r13) # imm = 0xFF7FFFFF
cmpb $0x0, 0x2d(%r14)
je 0x436b7
movq %rbx, %rax
shrq $0x20, %rax
movaps -0x50(%rbp), %xmm6
movaps %xmm6, %xmm1
shufps $0x55, %xmm6, %xmm1     # xmm1 = xmm1[1,1],xmm6[1,1]
movd %ebx, %xmm2
movd %eax, %xmm3
movss 0x114(%r12), %xmm4
movaps %xmm0, %xmm5
cmpless %xmm4, %xmm5
andps %xmm5, %xmm4
andnps %xmm0, %xmm5
orps %xmm4, %xmm5
movss %xmm5, 0x110(%r12)
subss %xmm2, %xmm6
subss %xmm3, %xmm1
unpcklps %xmm1, %xmm6            # xmm6 = xmm6[0],xmm1[0],xmm6[1],xmm1[1]
leaq -0x58(%rbp), %rdi
movlps %xmm6, (%rdi)
movss 0x58987(%rip), %xmm0    # 0x9bff0
callq 0x40d3b
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x40ea5
movl 0x1b30(%r13), %ecx
cmpl %ecx, 0x28(%r14)
jne 0x436ce
cmpb $0x0, 0x2c(%r14)
jne 0x43750
cmpb $0x0, 0x1b74(%r13)
je 0x43750
movl 0x1b70(%r13), %eax
movl %eax, 0x124(%r12)
movb $0x1, %al
jmp 0x43752
movq -0x30(%rbp), %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4b92e
cmpl %ecx, 0x1b34(%r13)
sete %al
testl %ecx, %ecx
setne %dl
andb %al, %dl
cmpb $0x0, 0x2c(%r14)
je 0x436ee
xorl %eax, %eax
testb %dl, %dl
jne 0x436f9
jmp 0x43752
movb 0x1b74(%r13), %al
testb %dl, %dl
je 0x43748
movl %ecx, 0x124(%r12)
movups -0x40(%rbp), %xmm0
movups %xmm0, 0x12c(%r12)
movl 0x128(%r12), %ecx
addq $0x128, %r12            # imm = 0x128
cmpb $0x1, 0x1b41(%r13)
jne 0x43739
movl %ecx, %edx
orl $0x24, %edx
movl %edx, (%r12)
testb %al, %al
je 0x43796
orl $0x4, %ecx
jmp 0x4377f
movl %ecx, %edx
orl $0x20, %edx
movl %edx, (%r12)
testb %al, %al
jne 0x4377f
jmp 0x43796
testb %al, %al
jne 0x436a1
xorl %eax, %eax
movups -0x40(%rbp), %xmm0
movups %xmm0, 0x12c(%r12)
movl 0x128(%r12), %ecx
movl %ecx, %edx
orl $0x20, %edx
movl %edx, 0x128(%r12)
testb %al, %al
je 0x43796
addq $0x128, %r12            # imm = 0x128
movl 0x1b30(%r13), %eax
cmpl 0x1b70(%r13), %eax
je 0x43796
orl $0x60, %ecx
movl %ecx, (%r12)
movq -0x30(%rbp), %rdi
callq 0x4b92e
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5b6e8(%rip), %rdi     # 0x9ee9d
leaq 0x599d9(%rip), %rsi     # 0x9d195
leaq 0x5b6f0(%rip), %rcx     # 0x9eeb3
movl $0x1d82, %edx           # imm = 0x1D82
callq 0xc140
leaq 0x5b6f6(%rip), %rdi     # 0x9eeca
leaq 0x599ba(%rip), %rsi     # 0x9d195
leaq 0x5b6d1(%rip), %rcx     # 0x9eeb3
movl $0x1d85, %edx           # imm = 0x1D85
callq 0xc140