// File: /workspace/github_cpp_makefile_star2_O1/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 0x5844b(%rip), %r15     # 0xfdcd0
movq (%r15), %r14
movq 0x1ae0(%r14), %r12
cmpb $0x0, 0x93(%r12)
jne 0xa59b8
movq 0x2108(%r14), %rbx
testq %rbx, %rbx
je 0xa59c1
cmpb $0x1, 0x6a(%rbx)
jne 0xa58bc
movq %rbx, %rdi
callq 0xa5a3d
cmpb $0x0, 0x6b(%rbx)
je 0xa5900
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 0xa5928
cmpl $0x0, 0x20(%rbx)
je 0xa58c2
movl 0x28(%rbx), %eax
incl %eax
cmpl 0x1a68(%r14), %eax
jl 0xa58c2
movss 0x38(%rbx), %xmm0
addss 0x40(%rbx), %xmm0
movss %xmm0, 0xdc(%r12)
cmpb $0x2, 0x69(%rbx)
jl 0xa593d
movq 0x80(%rbx), %rax
movq %rax, 0xd8(%r12)
testb $0x10, 0x12(%rbx)
jne 0xa5948
callq 0x56188
movl 0x2138(%r14), %eax
testl %eax, %eax
jle 0xa59e0
movl %eax, %edx
decl %edx
movl %edx, 0x2138(%r14)
je 0xa59af
cmpl $0x1, %eax
je 0xa59ff
movq 0x2140(%r14), %rcx
movl %edx, %edx
shlq $0x4, %rdx
movq -0x10(%rcx,%rdx), %rax
testq %rax, %rax
jne 0xa59b1
addq %rdx, %rcx
movslq -0x8(%rcx), %rax
testq %rax, %rax
js 0xa5a1e
movq (%r15), %rcx
cmpl %eax, 0x2110(%rcx)
jle 0xa5a1e
imulq $0x98, %rax, %rax
addq 0x2118(%rcx), %rax
jmp 0xa59b1
xorl %eax, %eax
movq %rax, 0x2108(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2f261(%rip), %rdi     # 0xd4c29
leaq 0x2d779(%rip), %rsi     # 0xd3148
leaq 0x2f292(%rip), %rcx     # 0xd4c68
movl $0x1b58, %edx           # imm = 0x1B58
callq 0xc140
leaq 0x29ff3(%rip), %rdi     # 0xcf9da
leaq 0x15c9d(%rip), %rsi     # 0xbb68b
leaq 0x2d171(%rip), %rcx     # 0xd2b66
movl $0x672, %edx            # imm = 0x672
callq 0xc140
leaq 0x29fd4(%rip), %rdi     # 0xcf9da
leaq 0x15c7e(%rip), %rsi     # 0xbb68b
leaq 0x2d193(%rip), %rcx     # 0xd2ba7
movl $0x666, %edx            # imm = 0x666
callq 0xc140
leaq 0x15c53(%rip), %rdi     # 0xbb678
leaq 0x15c5f(%rip), %rsi     # 0xbb68b
leaq 0x17074(%rip), %rcx     # 0xbcaa7
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140