// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::EndChild()
void ImGui::EndChild()
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;

    IM_ASSERT(g.WithinEndChild == false);
    IM_ASSERT(window->Flags & ImGuiWindowFlags_ChildWindow);   // Mismatched BeginChild()/EndChild() calls

    g.WithinEndChild = true;
    if (window->BeginCount > 1)
    {
        End();
    }
    else
    {
        ImVec2 sz = window->Size;
        if (window->AutoFitChildAxises & (1 << ImGuiAxis_X)) // Arbitrary minimum zero-ish child size of 4.0f causes less trouble than a 0.0f
            sz.x = ImMax(4.0f, sz.x);
        if (window->AutoFitChildAxises & (1 << ImGuiAxis_Y))
            sz.y = ImMax(4.0f, sz.y);
        End();

        ImGuiWindow* parent_window = g.CurrentWindow;
        ImRect bb(parent_window->DC.CursorPos, parent_window->DC.CursorPos + sz);
        ItemSize(sz);
        if ((window->DC.NavLayerActiveMask != 0 || window->DC.NavHasScroll) && !(window->Flags & ImGuiWindowFlags_NavFlattened))
        {
            ItemAdd(bb, window->ChildId);
            RenderNavHighlight(bb, window->ChildId);

            // When browsing a window that has no activable items (scroll only) we keep a highlight on the child
            if (window->DC.NavLayerActiveMask == 0 && window == g.NavWindow)
                RenderNavHighlight(ImRect(bb.Min - ImVec2(2, 2), bb.Max + ImVec2(2, 2)), g.NavId, ImGuiNavHighlightFlags_TypeThin);
        }
        else
        {
            // Not navigable into
            ItemAdd(bb, 0);
        }
    }
    g.WithinEndChild = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq 0xa9bb1(%rip), %r14     # 0xfbcd0
cmpb $0x0, 0x1a76(%r14)
jne 0x522d7
movq 0x1ae0(%r14), %r15
testb $0x1, 0xf(%r15)
je 0x522f6
movb $0x1, 0x1a76(%r14)
cmpw $0x2, 0x9a(%r15)
jl 0x5215c
callq 0x50af3
jmp 0x522c2
movq 0x18(%r15), %rcx
movq %rcx, -0x28(%rbp)
movb 0xa6(%r15), %al
movd %ecx, %xmm1
shrq $0x20, %rcx
testb $0x1, %al
je 0x5218b
movss 0x636e5(%rip), %xmm0    # 0xb5864
maxss %xmm1, %xmm0
movss %xmm0, -0x28(%rbp)
movaps %xmm0, %xmm1
movd %ecx, %xmm2
testb $0x2, %al
movaps %xmm1, -0x50(%rbp)
jne 0x5219d
movaps %xmm2, -0x40(%rbp)
jmp 0x521b2
movss 0x636bf(%rip), %xmm0    # 0xb5864
maxss %xmm2, %xmm0
movss %xmm0, -0x24(%rbp)
movaps %xmm0, -0x40(%rbp)
callq 0x50af3
movq 0x1ae0(%r14), %rax
movaps -0x50(%rbp), %xmm0
addss 0xd8(%rax), %xmm0
movaps -0x40(%rbp), %xmm1
addss 0xdc(%rax), %xmm1
movaps %xmm0, -0x50(%rbp)
movaps %xmm1, -0x40(%rbp)
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movq 0xd8(%rax), %r12
movq %r12, -0x60(%rbp)
movlps %xmm0, -0x58(%rbp)
leaq -0x28(%rbp), %rdi
movss 0x62dd4(%rip), %xmm0    # 0xb4fd0
callq 0x52315
cmpl $0x0, 0x150(%r15)
jne 0x52219
cmpb $0x1, 0x15d(%r15)
jne 0x522b5
testb $-0x80, 0xe(%r15)
jne 0x522b5
movl 0x58(%r15), %esi
leaq -0x60(%rbp), %rbx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x524a8
movl 0x58(%r15), %esi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x4521b
cmpl $0x0, 0x150(%r15)
jne 0x522c2
cmpq 0x1c90(%r14), %r15
jne 0x522c2
movq %r12, %rax
shrq $0x20, %rax
movd %r12d, %xmm0
movd %eax, %xmm1
movss 0x6361a(%rip), %xmm2    # 0xb588c
addss %xmm2, %xmm0
addss %xmm2, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movss 0x635e3(%rip), %xmm1    # 0xb5868
movaps -0x50(%rbp), %xmm2
addss %xmm1, %xmm2
movaps -0x40(%rbp), %xmm3
addss %xmm1, %xmm3
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
movlhps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
leaq -0x70(%rbp), %rdi
movups %xmm0, (%rdi)
movl 0x1c98(%r14), %esi
movl $0x2, %edx
callq 0x4521b
jmp 0x522c2
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x524a8
movb $0x0, 0x1a76(%r14)
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x64cf0(%rip), %rdi     # 0xb6fce
leaq 0x63e80(%rip), %rsi     # 0xb6165
leaq 0x64cfc(%rip), %rcx     # 0xb6fe8
movl $0x1316, %edx           # imm = 0x1316
callq 0xc140
leaq 0x64d02(%rip), %rdi     # 0xb6fff
leaq 0x63e61(%rip), %rsi     # 0xb6165
leaq 0x64cdd(%rip), %rcx     # 0xb6fe8
movl $0x1317, %edx           # imm = 0x1317
callq 0xc140