// File: Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::DebugNodeTabBar(ImGuiTabBar*, char const*)
void ImGui::DebugNodeTabBar(ImGuiTabBar* tab_bar, const char* label)
{
    // Standalone tab bars (not associated to docking/windows functionality) currently hold no discernible strings.
    char buf[256];
    char* p = buf;
    const char* buf_end = buf + IM_ARRAYSIZE(buf);
    const bool is_active = (tab_bar->PrevFrameVisible >= GetFrameCount() - 2);
    p += ImFormatString(p, buf_end - p, "%s 0x%08X (%d tabs)%s", label, tab_bar->ID, tab_bar->Tabs.Size, is_active ? "" : " *Inactive*");
    IM_UNUSED(p);
    if (!is_active) { PushStyleColor(ImGuiCol_Text, GetStyleColorVec4(ImGuiCol_TextDisabled)); }
    bool open = TreeNode(tab_bar, "%s", buf);
    if (!is_active) { PopStyleColor(); }
    if (is_active && IsItemHovered())
    {
        ImDrawList* draw_list = GetForegroundDrawList();
        draw_list->AddRect(tab_bar->BarRect.Min, tab_bar->BarRect.Max, IM_COL32(255, 255, 0, 255));
        draw_list->AddLine(ImVec2(tab_bar->ScrollingRectMinX, tab_bar->BarRect.Min.y), ImVec2(tab_bar->ScrollingRectMinX, tab_bar->BarRect.Max.y), IM_COL32(0, 255, 0, 255));
        draw_list->AddLine(ImVec2(tab_bar->ScrollingRectMaxX, tab_bar->BarRect.Min.y), ImVec2(tab_bar->ScrollingRectMaxX, tab_bar->BarRect.Max.y), IM_COL32(0, 255, 0, 255));
    }
    if (open)
    {
        for (int tab_n = 0; tab_n < tab_bar->Tabs.Size; tab_n++)
        {
            const ImGuiTabItem* tab = &tab_bar->Tabs[tab_n];
            PushID(tab);
            if (SmallButton("<")) { TabBarQueueReorder(tab_bar, tab, -1); } SameLine(0, 2);
            if (SmallButton(">")) { TabBarQueueReorder(tab_bar, tab, +1); } SameLine();
            Text("%02d%c Tab 0x%08X '%s' Offset: %.1f, Width: %.1f/%.1f",
                tab_n, (tab->ID == tab_bar->SelectedTabId) ? '*' : ' ', tab->ID, (tab->NameOffset != -1) ? tab_bar->GetTabName(tab) : "", tab->Offset, tab->Width, tab->ContentWidth);
            PopID();
        }
        TreePop();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x110(%rbp), %rax
movq %rax, -0x118(%rbp)
leaq -0x110(%rbp), %rax
addq $0x100, %rax            # imm = 0x100
movq %rax, -0x120(%rbp)
movq -0x8(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x164(%rbp)
callq 0xcb260
movl %eax, %ecx
movl -0x164(%rbp), %eax
subl $0x2, %ecx
cmpl %ecx, %eax
setge %al
andb $0x1, %al
movb %al, -0x121(%rbp)
movq -0x118(%rbp), %rdi
movq -0x120(%rbp), %rsi
movq -0x118(%rbp), %rax
subq %rax, %rsi
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movl 0x14(%rax), %r8d
movq -0x8(%rbp), %rax
movl (%rax), %r9d
movb -0x121(%rbp), %r10b
leaq 0x92070(%rip), %rax     # 0x176348
leaq 0x8dc2a(%rip), %rdx     # 0x171f09
testb $0x1, %r10b
cmovneq %rdx, %rax
leaq 0x92044(%rip), %rdx     # 0x176332
movq %rax, (%rsp)
movb $0x0, %al
callq 0xc4d30
movl %eax, %ecx
movq -0x118(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x118(%rbp)
testb $0x1, -0x121(%rbp)
jne 0xe432c
movl $0x1, %edi
callq 0xc77b0
movq %rax, %rsi
xorl %edi, %edi
callq 0xc78f0
movq -0x8(%rbp), %rdi
leaq -0x110(%rbp), %rdx
leaq 0x91889(%rip), %rsi     # 0x175bc7
movb $0x0, %al
callq 0x150f40
andb $0x1, %al
movb %al, -0x122(%rbp)
testb $0x1, -0x121(%rbp)
jne 0xe4360
movl $0x1, %edi
callq 0xc7990
testb $0x1, -0x121(%rbp)
je 0xe44a1
xorl %edi, %edi
callq 0xca1c0
testb $0x1, %al
jne 0xe437d
jmp 0xe44a1
callq 0xca6c0
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x2c, %rsi
movq -0x8(%rbp), %rdx
addq $0x2c, %rdx
addq $0x8, %rdx
movl $0xff00ffff, %ecx       # imm = 0xFF00FFFF
xorps %xmm0, %xmm0
movl $0xf, %r8d
movss 0x8c882(%rip), %xmm1    # 0x170c3c
callq 0x112ef0
movq -0x130(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0x8(%rbp), %rax
movss 0x5c(%rax), %xmm0
movq -0x8(%rbp), %rax
movss 0x30(%rax), %xmm1
leaq -0x138(%rbp), %rdi
callq 0xbf4c0
movq -0x8(%rbp), %rax
movss 0x5c(%rax), %xmm0
movq -0x8(%rbp), %rax
movss 0x38(%rax), %xmm1
leaq -0x140(%rbp), %rdi
callq 0xbf4c0
movq -0x178(%rbp), %rdi
leaq -0x138(%rbp), %rsi
leaq -0x140(%rbp), %rdx
movl $0xff00ff00, %ecx       # imm = 0xFF00FF00
movss 0x8c811(%rip), %xmm0    # 0x170c3c
callq 0x112e20
movq -0x130(%rbp), %rax
movq %rax, -0x170(%rbp)
movq -0x8(%rbp), %rax
movss 0x60(%rax), %xmm0
movq -0x8(%rbp), %rax
movss 0x30(%rax), %xmm1
leaq -0x148(%rbp), %rdi
callq 0xbf4c0
movq -0x8(%rbp), %rax
movss 0x60(%rax), %xmm0
movq -0x8(%rbp), %rax
movss 0x38(%rax), %xmm1
leaq -0x150(%rbp), %rdi
callq 0xbf4c0
movq -0x170(%rbp), %rdi
leaq -0x148(%rbp), %rsi
leaq -0x150(%rbp), %rdx
movl $0xff00ff00, %ecx       # imm = 0xFF00FF00
movss 0x8c7a0(%rip), %xmm0    # 0x170c3c
callq 0x112e20
testb $0x1, -0x122(%rbp)
je 0xe4664
movl $0x0, -0x154(%rbp)
movl -0x154(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jge 0xe465f
movq -0x8(%rbp), %rdi
movl -0x154(%rbp), %esi
callq 0xecb00
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rdi
callq 0xdb500
leaq 0xac426(%rip), %rdi     # 0x190919
callq 0x13a960
testb $0x1, %al
jne 0xe44fe
jmp 0xe4513
movq -0x8(%rbp), %rdi
movq -0x160(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1571e0
xorps %xmm0, %xmm0
movss 0x8daae(%rip), %xmm1    # 0x171fcc
callq 0xdc1c0
leaq 0xac3f3(%rip), %rdi     # 0x19091d
callq 0x13a960
testb $0x1, %al
jne 0xe4535
jmp 0xe454a
movq -0x8(%rbp), %rdi
movq -0x160(%rbp), %rsi
movl $0x1, %edx
callq 0x1571e0
xorps %xmm0, %xmm0
movss 0x8da2b(%rip), %xmm1    # 0x171f80
callq 0xdc1c0
movl -0x154(%rbp), %eax
movl %eax, -0x180(%rbp)
movq -0x160(%rbp), %rax
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movl 0x18(%rax), %edx
movb $0x2a, %al
movb $0x20, %sil
movb %sil, -0x17a(%rbp)
cmpl %edx, %ecx
movb %al, -0x179(%rbp)
je 0xe4598
movb -0x17a(%rbp), %al
movb %al, -0x179(%rbp)
movb -0x179(%rbp), %al
movsbl %al, %eax
movl %eax, -0x188(%rbp)
movq -0x160(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x184(%rbp)
movq -0x160(%rbp), %rax
movswl 0x1c(%rax), %eax
cmpl $-0x1, %eax
je 0xe45df
movq -0x8(%rbp), %rdi
movq -0x160(%rbp), %rsi
callq 0xecb80
movq %rax, -0x190(%rbp)
jmp 0xe45ef
leaq 0x8d923(%rip), %rax     # 0x171f09
movq %rax, -0x190(%rbp)
jmp 0xe45ef
movl -0x184(%rbp), %ecx
movl -0x188(%rbp), %edx
movl -0x180(%rbp), %esi
movq -0x190(%rbp), %r8
movq -0x160(%rbp), %rax
movss 0x10(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x160(%rbp), %rax
movss 0x14(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
movq -0x160(%rbp), %rax
movss 0x18(%rax), %xmm2
cvtss2sd %xmm2, %xmm2
leaq 0x91d15(%rip), %rdi     # 0x176354
movb $0x3, %al
callq 0x139160
callq 0xdb640
movl -0x154(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x154(%rbp)
jmp 0xe44b8
callq 0x1523d0
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
nopl (%rax)