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

    ImGuiTabBar* tab_bar = g.CurrentTabBar;
    if (tab_bar == NULL)
    {
        IM_ASSERT_USER_ERROR(tab_bar != NULL, "Mismatched BeginTabBar()/EndTabBar()!");
        return;
    }

    // Fallback in case no TabItem have been submitted
    if (tab_bar->WantLayout)
        TabBarLayout(tab_bar);

    // Restore the last visible height if no tab is visible, this reduce vertical flicker/movement when a tabs gets removed without calling SetTabItemClosed().
    const bool tab_bar_appearing = (tab_bar->PrevFrameVisible + 1 < g.FrameCount);
    if (tab_bar->VisibleTabWasSubmitted || tab_bar->VisibleTabId == 0 || tab_bar_appearing)
    {
        tab_bar->CurrTabsContentsHeight = ImMax(window->DC.CursorPos.y - tab_bar->BarRect.Max.y, tab_bar->CurrTabsContentsHeight);
        window->DC.CursorPos.y = tab_bar->BarRect.Max.y + tab_bar->CurrTabsContentsHeight;
    }
    else
    {
        window->DC.CursorPos.y = tab_bar->BarRect.Max.y + tab_bar->PrevTabsContentsHeight;
    }
    if (tab_bar->BeginCount > 1)
        window->DC.CursorPos = tab_bar->BackupCursorPos;

    if ((tab_bar->Flags & ImGuiTabBarFlags_DockNode) == 0)
        PopID();

    g.CurrentTabBarStack.pop_back();
    g.CurrentTabBar = g.CurrentTabBarStack.empty() ? NULL : GetTabBarFromTabBarRef(g.CurrentTabBarStack.back());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x57df4(%rip), %r15     # 0xfbcd0
movq (%r15), %r14
movq 0x1ae0(%r14), %r12
cmpb $0x0, 0x93(%r12)
jne 0xa3ff8
movq 0x2108(%r14), %rbx
testq %rbx, %rbx
je 0xa4001
cmpb $0x1, 0x6a(%rbx)
jne 0xa3f13
movq %rbx, %rdi
callq 0xa405e
cmpb $0x0, 0x6b(%rbx)
je 0xa3f57
movss 0xdc(%r12), %xmm0
movss 0x38(%rbx), %xmm1
movss 0x3c(%rbx), %xmm2
subss %xmm1, %xmm0
movaps %xmm2, %xmm3
cmpless %xmm0, %xmm3
andps %xmm3, %xmm0
andnps %xmm2, %xmm3
orps %xmm0, %xmm3
movss %xmm3, 0x3c(%rbx)
addss %xmm1, %xmm3
movss %xmm3, 0xdc(%r12)
jmp 0xa3f7f
cmpl $0x0, 0x20(%rbx)
je 0xa3f19
movl 0x28(%rbx), %eax
incl %eax
cmpl 0x1a68(%r14), %eax
jl 0xa3f19
movss 0x38(%rbx), %xmm0
addss 0x40(%rbx), %xmm0
movss %xmm0, 0xdc(%r12)
cmpb $0x2, 0x69(%rbx)
jl 0xa3f94
movq 0x80(%rbx), %rax
movq %rax, 0xd8(%r12)
testb $0x10, 0x12(%rbx)
jne 0xa3f9f
callq 0x55082
movl 0x2138(%r14), %eax
testl %eax, %eax
jle 0xa4020
decl %eax
movl %eax, 0x2138(%r14)
je 0xa3fef
movq 0x2140(%r14), %rcx
movl %eax, %edx
shlq $0x4, %rdx
movq -0x10(%rcx,%rdx), %rax
testq %rax, %rax
jne 0xa3ff1
movl -0x8(%rcx,%rdx), %eax
testl %eax, %eax
js 0xa403f
movq (%r15), %rcx
cmpl %eax, 0x2110(%rcx)
jle 0xa403f
imulq $0x98, %rax, %rax
addq 0x2118(%rcx), %rax
jmp 0xa3ff1
xorl %eax, %eax
movq %rax, 0x2108(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2eace(%rip), %rdi     # 0xd2ad6
leaq 0x2d009(%rip), %rsi     # 0xd1018
leaq 0x2eaff(%rip), %rcx     # 0xd2b15
movl $0x1b58, %edx           # imm = 0x1B58
callq 0xc140
leaq 0x29983(%rip), %rdi     # 0xcd9aa
leaq 0x1565d(%rip), %rsi     # 0xb968b
leaq 0x2ca3e(%rip), %rcx     # 0xd0a73
movl $0x672, %edx            # imm = 0x672
callq 0xc140
leaq 0x15632(%rip), %rdi     # 0xb9678
leaq 0x1563e(%rip), %rsi     # 0xb968b
leaq 0x16a53(%rip), %rcx     # 0xbaaa7
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140