// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_draw.cpp
// Function: ImGui::RenderRectFilledRangeH(ImDrawList*, ImRect const&, unsigned int, float, float, float)
void ImGui::RenderRectFilledRangeH(ImDrawList* draw_list, const ImRect& rect, ImU32 col, float x_start_norm, float x_end_norm, float rounding)
{
    if (x_end_norm == x_start_norm)
        return;
    if (x_start_norm > x_end_norm)
        ImSwap(x_start_norm, x_end_norm);

    ImVec2 p0 = ImVec2(ImLerp(rect.Min.x, rect.Max.x, x_start_norm), rect.Min.y);
    ImVec2 p1 = ImVec2(ImLerp(rect.Min.x, rect.Max.x, x_end_norm), rect.Max.y);
    if (rounding == 0.0f)
    {
        draw_list->AddRectFilled(p0, p1, col, 0.0f);
        return;
    }

    rounding = ImClamp(ImMin((rect.Max.x - rect.Min.x) * 0.5f, (rect.Max.y - rect.Min.y) * 0.5f) - 1.0f, 0.0f, rounding);
    const float inv_rounding = 1.0f / rounding;
    const float arc0_b = ImAcos01(1.0f - (p0.x - rect.Min.x) * inv_rounding);
    const float arc0_e = ImAcos01(1.0f - (p1.x - rect.Min.x) * inv_rounding);
    const float half_pi = IM_PI * 0.5f; // We will == compare to this because we know this is the exact value ImAcos01 can return.
    const float x0 = ImMax(p0.x, rect.Min.x + rounding);
    if (arc0_b == arc0_e)
    {
        draw_list->PathLineTo(ImVec2(x0, p1.y));
        draw_list->PathLineTo(ImVec2(x0, p0.y));
    }
    else if (arc0_b == 0.0f && arc0_e == half_pi)
    {
        draw_list->PathArcToFast(ImVec2(x0, p1.y - rounding), rounding, 3, 6); // BL
        draw_list->PathArcToFast(ImVec2(x0, p0.y + rounding), rounding, 6, 9); // TR
    }
    else
    {
        draw_list->PathArcTo(ImVec2(x0, p1.y - rounding), rounding, IM_PI - arc0_e, IM_PI - arc0_b, 3); // BL
        draw_list->PathArcTo(ImVec2(x0, p0.y + rounding), rounding, IM_PI + arc0_b, IM_PI + arc0_e, 3); // TR
    }
    if (p1.x > rect.Min.x + rounding)
    {
        const float arc1_b = ImAcos01(1.0f - (rect.Max.x - p1.x) * inv_rounding);
        const float arc1_e = ImAcos01(1.0f - (rect.Max.x - p0.x) * inv_rounding);
        const float x1 = ImMin(p1.x, rect.Max.x - rounding);
        if (arc1_b == arc1_e)
        {
            draw_list->PathLineTo(ImVec2(x1, p0.y));
            draw_list->PathLineTo(ImVec2(x1, p1.y));
        }
        else if (arc1_b == 0.0f && arc1_e == half_pi)
        {
            draw_list->PathArcToFast(ImVec2(x1, p0.y + rounding), rounding, 9, 12); // TR
            draw_list->PathArcToFast(ImVec2(x1, p1.y - rounding), rounding, 0, 3);  // BR
        }
        else
        {
            draw_list->PathArcTo(ImVec2(x1, p0.y + rounding), rounding, -arc1_e, -arc1_b, 3); // TR
            draw_list->PathArcTo(ImVec2(x1, p1.y - rounding), rounding, +arc1_b, +arc1_e, 3); // BR
        }
    }
    draw_list->PathFillConvex(col);
}

// Assembly:
ucomiss %xmm0, %xmm1
jne 0x84160
jp 0x84160
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movaps %xmm0, %xmm5
maxss %xmm1, %xmm5
minss %xmm0, %xmm1
movss (%rsi), %xmm0
movss 0x4(%rsi), %xmm7
movss 0x8(%rsi), %xmm8
subss %xmm0, %xmm8
mulss %xmm8, %xmm1
addss %xmm0, %xmm1
movss %xmm1, -0xa0(%rbp)
movss %xmm7, -0x9c(%rbp)
mulss %xmm8, %xmm5
addss %xmm0, %xmm5
movss 0xc(%rsi), %xmm6
movss %xmm5, -0x98(%rbp)
movss %xmm6, -0x94(%rbp)
xorps %xmm9, %xmm9
ucomiss %xmm9, %xmm2
jne 0x84216
jp 0x84216
cmpl $0x1000000, %ebx        # imm = 0x1000000
jb 0x849a1
movq %r14, %rdi
movl $0x6, %esi
movl $0x4, %edx
callq 0x77438
leaq -0xa0(%rbp), %rsi
leaq -0x98(%rbp), %rdx
movq %r14, %rdi
movl %ebx, %ecx
callq 0x77602
jmp 0x849a1
movss 0x32de6(%rip), %xmm3    # 0xb7004
mulss %xmm3, %xmm8
movaps %xmm6, %xmm4
subss %xmm7, %xmm4
mulss %xmm3, %xmm4
minss %xmm4, %xmm8
addss 0x32d94(%rip), %xmm8    # 0xb6fd0
minss %xmm8, %xmm2
cmpltss %xmm9, %xmm8
andnps %xmm2, %xmm8
movss 0x32d91(%rip), %xmm3    # 0xb6fe4
movaps %xmm3, %xmm4
divss %xmm8, %xmm4
movaps %xmm1, %xmm2
subss %xmm0, %xmm2
mulss %xmm4, %xmm2
movaps %xmm3, %xmm0
subss %xmm2, %xmm0
movss 0x44732(%rip), %xmm10   # 0xc89a8
ucomiss %xmm0, %xmm9
movaps %xmm10, %xmm11
movss %xmm5, -0x2c(%rbp)
movss %xmm6, -0x30(%rbp)
movss %xmm7, -0x60(%rbp)
movaps %xmm8, -0x50(%rbp)
movaps %xmm1, -0x70(%rbp)
movss %xmm4, -0x34(%rbp)
jae 0x842e1
xorps %xmm11, %xmm11
ucomiss 0x32d3c(%rip), %xmm0    # 0xb6fe4
jae 0x842e1
callq 0xc4d0
movss 0x446f0(%rip), %xmm10   # 0xc89a8
movss -0x34(%rbp), %xmm4
movss 0x32d1f(%rip), %xmm3    # 0xb6fe4
movaps -0x70(%rbp), %xmm1
movaps -0x50(%rbp), %xmm8
movss -0x60(%rbp), %xmm7
movss -0x30(%rbp), %xmm6
movss -0x2c(%rbp), %xmm5
movaps %xmm0, %xmm11
movaps %xmm5, %xmm2
subss (%r15), %xmm2
mulss %xmm4, %xmm2
movaps %xmm3, %xmm0
subss %xmm2, %xmm0
xorps %xmm2, %xmm2
ucomiss %xmm0, %xmm2
jae 0x84343
ucomiss 0x32ce1(%rip), %xmm0    # 0xb6fe4
xorps %xmm10, %xmm10
jae 0x84343
movss %xmm11, -0x38(%rbp)
callq 0xc4d0
movss -0x38(%rbp), %xmm11
movss -0x34(%rbp), %xmm4
movss 0x32cbd(%rip), %xmm3    # 0xb6fe4
movaps -0x70(%rbp), %xmm1
movaps -0x50(%rbp), %xmm8
movss -0x60(%rbp), %xmm7
movss -0x30(%rbp), %xmm6
movss -0x2c(%rbp), %xmm5
movaps %xmm0, %xmm10
movss (%r15), %xmm0
addss %xmm8, %xmm0
movaps %xmm0, %xmm9
cmpless %xmm1, %xmm9
movaps %xmm9, %xmm2
andnps %xmm0, %xmm2
andps %xmm1, %xmm9
orps %xmm2, %xmm9
ucomiss %xmm10, %xmm11
jne 0x8439a
jp 0x8439a
movl 0x78(%r14), %r13d
movl 0x7c(%r14), %eax
cmpl %eax, %r13d
jne 0x8456d
incl %r13d
testl %eax, %eax
je 0x844e5
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x844ea
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm11
movaps %xmm6, %xmm0
subss %xmm8, %xmm0
movaps %xmm9, -0x90(%rbp)
jne 0x84428
jp 0x84428
ucomiss 0x445eb(%rip), %xmm10   # 0xc89a8
jne 0x84428
jp 0x84428
leaq -0x40(%rbp), %r12
movss %xmm9, (%r12)
movss %xmm0, 0x4(%r12)
movq %r14, %rdi
movq %r12, %rsi
movaps %xmm8, %xmm0
movl $0x3, %edx
movl $0x6, %ecx
callq 0x787a2
movss -0x60(%rbp), %xmm0
addss -0x50(%rbp), %xmm0
movaps -0x90(%rbp), %xmm1
movss %xmm1, (%r12)
movss %xmm0, 0x4(%r12)
leaq -0x40(%rbp), %rsi
movq %r14, %rdi
movaps -0x50(%rbp), %xmm0
movl $0x6, %edx
movl $0x9, %ecx
callq 0x787a2
jmp 0x844bb
leaq -0x40(%rbp), %r12
movss %xmm9, (%r12)
movss %xmm0, 0x4(%r12)
movss 0x4453f(%rip), %xmm2    # 0xc8980
movaps %xmm2, %xmm1
subss %xmm10, %xmm1
subss %xmm11, %xmm2
movq %r14, %rdi
movq %r12, %rsi
movaps %xmm8, %xmm0
movl $0x3, %edx
movss %xmm10, -0x74(%rbp)
movss %xmm11, -0x38(%rbp)
callq 0x789ee
movss -0x60(%rbp), %xmm0
addss -0x50(%rbp), %xmm0
movaps -0x90(%rbp), %xmm1
movss %xmm1, (%r12)
movss %xmm0, 0x4(%r12)
movss 0x444ec(%rip), %xmm0    # 0xc8980
movss -0x38(%rbp), %xmm1
addss %xmm0, %xmm1
movss -0x74(%rbp), %xmm2
addss %xmm0, %xmm2
leaq -0x40(%rbp), %rsi
movq %r14, %rdi
movaps -0x50(%rbp), %xmm0
movl $0x3, %edx
callq 0x789ee
movaps -0x50(%rbp), %xmm8
movss -0x60(%rbp), %xmm7
movss -0x2c(%rbp), %xmm5
movss -0x30(%rbp), %xmm6
movaps -0x70(%rbp), %xmm1
movss 0x32b09(%rip), %xmm3    # 0xb6fe4
movss -0x34(%rbp), %xmm4
jmp 0x84654
movl $0x8, %ecx
cmpl %r13d, %ecx
cmovgl %ecx, %r13d
cmpl %r13d, %eax
jge 0x8456d
movaps %xmm9, -0x90(%rbp)
movslq %r13d, %rdi
shlq $0x3, %rdi
callq 0x424fb
movq %rax, %r12
movq 0x80(%r14), %rsi
testq %rsi, %rsi
je 0x84535
movslq 0x78(%r14), %rdx
shlq $0x3, %rdx
movq %r12, %rdi
callq 0xc080
movq 0x80(%r14), %rdi
callq 0x425d4
movq %r12, 0x80(%r14)
movl %r13d, 0x7c(%r14)
movss -0x2c(%rbp), %xmm5
movss -0x30(%rbp), %xmm6
movss -0x60(%rbp), %xmm7
movaps -0x50(%rbp), %xmm8
movaps -0x70(%rbp), %xmm1
movss 0x32a84(%rip), %xmm3    # 0xb6fe4
movss -0x34(%rbp), %xmm4
movaps -0x90(%rbp), %xmm9
movq 0x80(%r14), %rax
movslq 0x78(%r14), %rcx
movss %xmm9, (%rax,%rcx,8)
movss %xmm6, 0x4(%rax,%rcx,8)
movl 0x78(%r14), %r13d
movl 0x7c(%r14), %eax
leal 0x1(%r13), %ecx
movl %ecx, 0x78(%r14)
cmpl %eax, %ecx
jne 0x84639
addl $0x2, %r13d
testl %eax, %eax
je 0x845b1
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x845b6
movl $0x8, %ecx
cmpl %r13d, %ecx
cmovgl %ecx, %r13d
cmpl %r13d, %eax
jge 0x84639
movaps %xmm9, -0x90(%rbp)
movslq %r13d, %rdi
shlq $0x3, %rdi
callq 0x424fb
movq %rax, %r12
movq 0x80(%r14), %rsi
testq %rsi, %rsi
je 0x84601
movslq 0x78(%r14), %rdx
shlq $0x3, %rdx
movq %r12, %rdi
callq 0xc080
movq 0x80(%r14), %rdi
callq 0x425d4
movq %r12, 0x80(%r14)
movl %r13d, 0x7c(%r14)
movss -0x2c(%rbp), %xmm5
movss -0x30(%rbp), %xmm6
movss -0x60(%rbp), %xmm7
movaps -0x50(%rbp), %xmm8
movaps -0x70(%rbp), %xmm1
movss 0x329b8(%rip), %xmm3    # 0xb6fe4
movss -0x34(%rbp), %xmm4
movaps -0x90(%rbp), %xmm9
movq 0x80(%r14), %rax
movslq 0x78(%r14), %rcx
movss %xmm9, (%rax,%rcx,8)
movss %xmm7, 0x4(%rax,%rcx,8)
incl 0x78(%r14)
movss (%r15), %xmm0
addss %xmm8, %xmm0
ucomiss %xmm0, %xmm5
jbe 0x84984
movss 0x8(%r15), %xmm2
subss %xmm5, %xmm2
mulss %xmm4, %xmm2
movaps %xmm3, %xmm0
subss %xmm2, %xmm0
movss 0x44323(%rip), %xmm9    # 0xc89a8
xorps %xmm2, %xmm2
ucomiss %xmm0, %xmm2
movaps %xmm9, %xmm10
jae 0x846d8
ucomiss 0x3294c(%rip), %xmm0    # 0xb6fe4
xorps %xmm10, %xmm10
jae 0x846d8
callq 0xc4d0
xorps %xmm2, %xmm2
movss 0x442f9(%rip), %xmm9    # 0xc89a8
movss -0x34(%rbp), %xmm4
movss 0x32928(%rip), %xmm3    # 0xb6fe4
movaps -0x70(%rbp), %xmm1
movaps -0x50(%rbp), %xmm8
movss -0x60(%rbp), %xmm7
movss -0x30(%rbp), %xmm6
movss -0x2c(%rbp), %xmm5
movaps %xmm0, %xmm10
movss 0x8(%r15), %xmm0
subss %xmm1, %xmm0
mulss %xmm4, %xmm0
subss %xmm0, %xmm3
ucomiss %xmm3, %xmm2
jae 0x84726
xorps %xmm9, %xmm9
ucomiss 0x328ea(%rip), %xmm3    # 0xb6fe4
jae 0x84726
movaps %xmm3, %xmm0
movaps %xmm10, -0x70(%rbp)
callq 0xc4d0
movaps -0x70(%rbp), %xmm10
movaps -0x50(%rbp), %xmm8
movss -0x60(%rbp), %xmm7
movss -0x30(%rbp), %xmm6
movss -0x2c(%rbp), %xmm5
movaps %xmm0, %xmm9
movss 0x8(%r15), %xmm0
subss %xmm8, %xmm0
minss %xmm0, %xmm5
ucomiss %xmm9, %xmm10
jne 0x84769
jp 0x84769
movl 0x78(%r14), %r12d
movl 0x7c(%r14), %eax
cmpl %eax, %r12d
jne 0x848c8
incl %r12d
testl %eax, %eax
je 0x84861
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x84866
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm10
addss %xmm8, %xmm7
movss %xmm5, -0x2c(%rbp)
jne 0x847e7
jp 0x847e7
ucomiss 0x44222(%rip), %xmm9    # 0xc89a8
jne 0x847e7
jp 0x847e7
leaq -0x40(%rbp), %r15
movss %xmm5, (%r15)
movss %xmm7, 0x4(%r15)
movq %r14, %rdi
movq %r15, %rsi
movaps %xmm8, %xmm0
movl $0x9, %edx
movl $0xc, %ecx
callq 0x787a2
movss -0x30(%rbp), %xmm1
movaps -0x50(%rbp), %xmm0
subss %xmm0, %xmm1
movss -0x2c(%rbp), %xmm2
movss %xmm2, (%r15)
movss %xmm1, 0x4(%r15)
leaq -0x40(%rbp), %rsi
movq %r14, %rdi
xorl %edx, %edx
movl $0x3, %ecx
callq 0x787a2
jmp 0x84984
leaq -0x40(%rbp), %r15
movss %xmm5, (%r15)
movss %xmm7, 0x4(%r15)
movaps 0x327c3(%rip), %xmm2    # 0xb6fc0
movaps %xmm9, %xmm1
xorps %xmm2, %xmm1
xorps %xmm10, %xmm2
movq %r14, %rdi
movq %r15, %rsi
movaps %xmm8, %xmm0
movl $0x3, %edx
movaps %xmm9, -0x60(%rbp)
movaps %xmm10, -0x70(%rbp)
callq 0x789ee
movss -0x30(%rbp), %xmm1
movaps -0x50(%rbp), %xmm0
subss %xmm0, %xmm1
movss -0x2c(%rbp), %xmm2
movss %xmm2, (%r15)
movss %xmm1, 0x4(%r15)
leaq -0x40(%rbp), %rsi
movq %r14, %rdi
movaps -0x70(%rbp), %xmm1
movaps -0x60(%rbp), %xmm2
movl $0x3, %edx
callq 0x789ee
jmp 0x84984
movl $0x8, %ecx
cmpl %r12d, %ecx
cmovgl %ecx, %r12d
cmpl %r12d, %eax
jge 0x848c8
movss %xmm5, -0x2c(%rbp)
movslq %r12d, %rdi
shlq $0x3, %rdi
callq 0x424fb
movq %rax, %r15
movq 0x80(%r14), %rsi
testq %rsi, %rsi
je 0x848ae
movslq 0x78(%r14), %rdx
shlq $0x3, %rdx
movq %r15, %rdi
callq 0xc080
movq 0x80(%r14), %rdi
callq 0x425d4
movq %r15, 0x80(%r14)
movl %r12d, 0x7c(%r14)
movss -0x2c(%rbp), %xmm5
movss -0x30(%rbp), %xmm6
movss -0x60(%rbp), %xmm7
movq 0x80(%r14), %rax
movslq 0x78(%r14), %rcx
movss %xmm5, (%rax,%rcx,8)
movss %xmm7, 0x4(%rax,%rcx,8)
movl 0x78(%r14), %r12d
movl 0x7c(%r14), %eax
leal 0x1(%r12), %ecx
movl %ecx, 0x78(%r14)
cmpl %eax, %ecx
jne 0x8496a
addl $0x2, %r12d
testl %eax, %eax
je 0x84908
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x8490d
movl $0x8, %ecx
cmpl %r12d, %ecx
cmovgl %ecx, %r12d
cmpl %r12d, %eax
jge 0x8496a
movss %xmm5, -0x2c(%rbp)
movslq %r12d, %rdi
shlq $0x3, %rdi
callq 0x424fb
movq %rax, %r15
movq 0x80(%r14), %rsi
testq %rsi, %rsi
je 0x84955
movslq 0x78(%r14), %rdx
shlq $0x3, %rdx
movq %r15, %rdi
callq 0xc080
movq 0x80(%r14), %rdi
callq 0x425d4
movq %r15, 0x80(%r14)
movl %r12d, 0x7c(%r14)
movss -0x2c(%rbp), %xmm5
movss -0x30(%rbp), %xmm6
movq 0x80(%r14), %rax
movslq 0x78(%r14), %rcx
movss %xmm5, (%rax,%rcx,8)
movss %xmm6, 0x4(%rax,%rcx,8)
incl 0x78(%r14)
movq 0x80(%r14), %rsi
movl 0x78(%r14), %edx
movq %r14, %rdi
movl %ebx, %ecx
callq 0x78432
movl $0x0, 0x78(%r14)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq