// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, -0x40(%rbp)
movss (%rsi), %xmm0
movss 0x8(%rsi), %xmm1
subss %xmm0, %xmm1
xorps %xmm3, %xmm3
ucomiss %xmm3, %xmm1
jbe 0x8d9b4
movq %rsi, %r14
leaq 0x5657d(%rip), %rax     # 0xe3ce0
movq (%rax), %r15
leaq 0x15a0(%r15), %rax
leaq 0x15e4(%r15), %rcx
btl $0x15, %edx
cmovaeq %rcx, %rax
mulss 0xe894(%rip), %xmm1     # 0x9c018
movss (%rax), %xmm2
movss 0xe860(%rip), %xmm4     # 0x9bff0
addss %xmm4, %xmm1
minss %xmm1, %xmm2
movaps %xmm2, %xmm1
cmpless %xmm3, %xmm1
andnps %xmm2, %xmm1
movaps %xmm1, -0x50(%rbp)
movss 0x4(%rsi), %xmm1
addss 0xe844(%rip), %xmm1     # 0x9bff8
movss %xmm1, -0x2c(%rbp)
addss 0xc(%rsi), %xmm4
movss %xmm4, -0x30(%rbp)
leaq -0x38(%rbp), %r13
movss %xmm0, (%r13)
movss %xmm4, 0x4(%r13)
movq %rdi, %rbx
leaq 0x78(%rdi), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x4c382
movss (%r14), %xmm0
movaps -0x50(%rbp), %xmm1
addss %xmm1, %xmm0
movss -0x2c(%rbp), %xmm2
addss %xmm1, %xmm2
movss %xmm2, -0x2c(%rbp)
movss %xmm0, (%r13)
movss %xmm2, 0x4(%r13)
pushq $0x6
popq %rdx
pushq $0x9
popq %rcx
movq %rbx, %rdi
movq %r13, %rsi
movaps %xmm1, %xmm0
callq 0x63484
movss 0x8(%r14), %xmm1
movaps -0x50(%rbp), %xmm0
subss %xmm0, %xmm1
movss %xmm1, (%r13)
movss -0x2c(%rbp), %xmm1
movss %xmm1, 0x4(%r13)
pushq $0xc
popq %rcx
movq %rbx, %rdi
movq %r13, %rsi
pushq $0x9
popq %rdx
callq 0x63484
movss 0x8(%r14), %xmm0
movss %xmm0, (%r13)
movss -0x30(%rbp), %xmm0
movss %xmm0, 0x4(%r13)
leaq -0x38(%rbp), %rsi
movq %r12, %r13
movq %r12, %rdi
callq 0x4c382
movq %rbx, %rdi
movl -0x40(%rbp), %esi
callq 0x4c35c
movq %r15, -0x40(%rbp)
movss 0x15e8(%r15), %xmm0
ucomiss 0xf02f(%rip), %xmm0     # 0x9c8c4
jbe 0x8d9a5
movss (%r14), %xmm0
addss 0xe770(%rip), %xmm0     # 0x9c018
leaq -0x38(%rbp), %r12
movss %xmm0, (%r12)
movss -0x30(%rbp), %xmm0
movss %xmm0, 0x4(%r12)
movq %r13, %r15
movq %r13, %rdi
movq %r12, %rsi
callq 0x4c382
movss (%r14), %xmm2
movaps -0x50(%rbp), %xmm1
addss %xmm1, %xmm2
movaps %xmm1, %xmm0
movss 0xe734(%rip), %xmm3     # 0x9c018
addss %xmm3, %xmm2
movss -0x2c(%rbp), %xmm1
addss %xmm3, %xmm1
movss %xmm1, -0x2c(%rbp)
movss %xmm2, (%r12)
movss %xmm1, 0x4(%r12)
pushq $0x6
popq %rdx
pushq $0x9
popq %r13
movq %rbx, %rdi
movq %r12, %rsi
movl %r13d, %ecx
callq 0x63484
movss 0x8(%r14), %xmm1
movaps -0x50(%rbp), %xmm0
subss %xmm0, %xmm1
addss 0xefc6(%rip), %xmm1     # 0x9c8f4
movss %xmm1, (%r12)
movss -0x2c(%rbp), %xmm1
movss %xmm1, 0x4(%r12)
pushq $0xc
popq %rcx
movq %rbx, %rdi
movq %r12, %rsi
movl %r13d, %edx
callq 0x63484
movss 0xef9b(%rip), %xmm0     # 0x9c8f4
addss 0x8(%r14), %xmm0
movss %xmm0, (%r12)
movss -0x30(%rbp), %xmm0
movss %xmm0, 0x4(%r12)
leaq -0x38(%rbp), %rsi
movq %r15, %rdi
callq 0x4c382
pushq $0x5
popq %rdi
movss 0xe670(%rip), %xmm0     # 0x9bff8
callq 0x35d33
movq -0x40(%rbp), %rcx
movss 0x15e8(%rcx), %xmm0
movq %rbx, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x4c428
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x29264(%rip), %rdi     # 0xb6c1f
leaq 0x2a9c6(%rip), %rsi     # 0xb8388
leaq 0x2c84c(%rip), %rcx     # 0xba215
movl $0x1e88, %edx           # imm = 0x1E88
callq 0xc140