// File: Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::TabItemBackground(ImDrawList*, ImRect const&, int, unsigned int)
void ImGui::TabItemBackground(ImDrawList* draw_list, const ImRect& bb, ImGuiTabItemFlags flags, ImU32 col)
{
    // While rendering tabs, we trim 1 pixel off the top of our bounding box so they can fit within a regular frame height while looking "detached" from it.
    ImGuiContext& g = *GImGui;
    const float width = bb.GetWidth();
    IM_UNUSED(flags);
    IM_ASSERT(width > 0.0f);
    const float rounding = ImMax(0.0f, ImMin((flags & ImGuiTabItemFlags_Button) ? g.Style.FrameRounding : g.Style.TabRounding, width * 0.5f - 1.0f));
    const float y1 = bb.Min.y + 1.0f;
    const float y2 = bb.Max.y - 1.0f;
    draw_list->PathLineTo(ImVec2(bb.Min.x, y2));
    draw_list->PathArcToFast(ImVec2(bb.Min.x + rounding, y1 + rounding), rounding, 6, 9);
    draw_list->PathArcToFast(ImVec2(bb.Max.x - rounding, y1 + rounding), rounding, 9, 12);
    draw_list->PathLineTo(ImVec2(bb.Max.x, y2));
    draw_list->PathFillConvex(col);
    if (g.Style.TabBorderSize > 0.0f)
    {
        draw_list->PathLineTo(ImVec2(bb.Min.x + 0.5f, y2));
        draw_list->PathArcToFast(ImVec2(bb.Min.x + rounding + 0.5f, y1 + rounding + 0.5f), rounding, 6, 9);
        draw_list->PathArcToFast(ImVec2(bb.Max.x - rounding - 0.5f, y1 + rounding + 0.5f), rounding, 9, 12);
        draw_list->PathLineTo(ImVec2(bb.Max.x - 0.5f, y2));
        draw_list->PathStroke(GetColorU32(ImGuiCol_Border), false, g.Style.TabBorderSize);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
leaq 0xbaa90(%rip), %rax     # 0x212f40
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0xeb840
movss %xmm0, -0x24(%rbp)
movss -0x24(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x1584d4
jmp 0x1584f3
leaq 0x347ed(%rip), %rdi     # 0x18ccc8
leaq 0x35efe(%rip), %rsi     # 0x18e3e0
movl $0x1e88, %edx           # imm = 0x1E88
leaq 0x38029(%rip), %rcx     # 0x190517
callq 0xd180
movl -0x14(%rbp), %eax
andl $0x200000, %eax         # imm = 0x200000
cmpl $0x0, %eax
je 0x158513
movq -0x20(%rbp), %rax
movss 0x15a0(%rax), %xmm0
movss %xmm0, -0x74(%rbp)
jmp 0x158524
movq -0x20(%rbp), %rax
movss 0x15e4(%rax), %xmm0
movss %xmm0, -0x74(%rbp)
movss -0x74(%rbp), %xmm0
movss -0x24(%rbp), %xmm1
movss 0x19aa2(%rip), %xmm2    # 0x171fd8
mulss %xmm2, %xmm1
movss 0x19a3e(%rip), %xmm2    # 0x171f80
addss %xmm2, %xmm1
callq 0x13c690
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
callq 0x139050
movss %xmm0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movss 0x186d5(%rip), %xmm0    # 0x170c3c
addss 0x4(%rax), %xmm0
movss %xmm0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movss 0xc(%rax), %xmm0
movss 0x186ba(%rip), %xmm1    # 0x170c3c
subss %xmm1, %xmm0
movss %xmm0, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rax
movss (%rax), %xmm0
movss -0x30(%rbp), %xmm1
leaq -0x38(%rbp), %rdi
callq 0xbf4c0
movq -0x98(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xee560
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rax
movss (%rax), %xmm0
addss -0x28(%rbp), %xmm0
movss -0x2c(%rbp), %xmm1
addss -0x28(%rbp), %xmm1
leaq -0x40(%rbp), %rdi
callq 0xbf4c0
movq -0x90(%rbp), %rdi
movss -0x28(%rbp), %xmm0
leaq -0x40(%rbp), %rsi
movl $0x6, %edx
movl $0x9, %ecx
callq 0x111da0
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movss 0x8(%rax), %xmm0
subss -0x28(%rbp), %xmm0
movss -0x2c(%rbp), %xmm1
addss -0x28(%rbp), %xmm1
leaq -0x48(%rbp), %rdi
callq 0xbf4c0
movq -0x88(%rbp), %rdi
movss -0x28(%rbp), %xmm0
leaq -0x48(%rbp), %rsi
movl $0x9, %edx
movl $0xc, %ecx
callq 0x111da0
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movss 0x8(%rax), %xmm0
movss -0x30(%rbp), %xmm1
leaq -0x50(%rbp), %rdi
callq 0xbf4c0
movq -0x80(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xee560
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0xee590
movq -0x20(%rbp), %rax
movss 0x15e8(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x158816
movq -0x8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x10(%rbp), %rax
movss 0x19920(%rip), %xmm0    # 0x171fd8
addss (%rax), %xmm0
movss -0x30(%rbp), %xmm1
leaq -0x58(%rbp), %rdi
callq 0xbf4c0
movq -0xc0(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0xee560
movq -0x8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x10(%rbp), %rax
movss (%rax), %xmm0
addss -0x28(%rbp), %xmm0
movss 0x198de(%rip), %xmm1    # 0x171fd8
addss %xmm1, %xmm0
movss -0x2c(%rbp), %xmm1
addss -0x28(%rbp), %xmm1
movss 0x198c8(%rip), %xmm2    # 0x171fd8
addss %xmm2, %xmm1
leaq -0x60(%rbp), %rdi
callq 0xbf4c0
movq -0xb8(%rbp), %rdi
movss -0x28(%rbp), %xmm0
leaq -0x60(%rbp), %rsi
movl $0x6, %edx
movl $0x9, %ecx
callq 0x111da0
movq -0x8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x10(%rbp), %rax
movss 0x8(%rax), %xmm0
subss -0x28(%rbp), %xmm0
movss 0x1987b(%rip), %xmm1    # 0x171fd8
subss %xmm1, %xmm0
movss -0x2c(%rbp), %xmm1
addss -0x28(%rbp), %xmm1
movss 0x19865(%rip), %xmm2    # 0x171fd8
addss %xmm2, %xmm1
leaq -0x68(%rbp), %rdi
callq 0xbf4c0
movq -0xb0(%rbp), %rdi
movss -0x28(%rbp), %xmm0
leaq -0x68(%rbp), %rsi
movl $0x9, %edx
movl $0xc, %ecx
callq 0x111da0
movq -0x8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rax
movss 0x8(%rax), %xmm0
movss 0x1981d(%rip), %xmm1    # 0x171fd8
subss %xmm1, %xmm0
movss -0x30(%rbp), %xmm1
leaq -0x70(%rbp), %rdi
callq 0xbf4c0
movq -0xa8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0xee560
movq -0x8(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl $0x5, %edi
movss 0x18447(%rip), %xmm0    # 0x170c3c
callq 0xc76e0
movq -0xa0(%rbp), %rdi
movl %eax, %esi
movq -0x20(%rbp), %rax
movss 0x15e8(%rax), %xmm0
xorl %edx, %edx
callq 0xee720
addq $0xc0, %rsp
popq %rbp
retq
nop