// File: /workspace/github_cpp_makefile_star2_O3/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 0x82584
jp 0x82584
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movaps %xmm0, %xmm5
maxss %xmm1, %xmm5
minss %xmm0, %xmm1
movss (%rsi), %xmm9
movss 0x4(%rsi), %xmm7
movss 0x8(%rsi), %xmm8
subss %xmm9, %xmm8
mulss %xmm8, %xmm1
addss %xmm9, %xmm1
movss %xmm1, -0xa0(%rbp)
movss %xmm7, -0x9c(%rbp)
mulss %xmm8, %xmm5
addss %xmm9, %xmm5
movss 0xc(%rsi), %xmm6
movss %xmm5, -0x98(%rbp)
movss %xmm6, -0x94(%rbp)
xorps %xmm3, %xmm3
ucomiss %xmm3, %xmm2
jne 0x8263e
jp 0x8263e
cmpl $0x1000000, %ebx        # imm = 0x1000000
jb 0x82da5
movq %r14, %rdi
movl $0x6, %esi
movl $0x4, %edx
callq 0x75e52
leaq -0xa0(%rbp), %rsi
leaq -0x98(%rbp), %rdx
movq %r14, %rdi
movl %ebx, %ecx
callq 0x76012
jmp 0x82da5
movss 0x329be(%rip), %xmm0    # 0xb5004
mulss %xmm0, %xmm8
movaps %xmm6, %xmm4
subss %xmm7, %xmm4
mulss %xmm0, %xmm4
minss %xmm4, %xmm8
addss 0x3296c(%rip), %xmm8    # 0xb4fd0
minss %xmm8, %xmm2
cmpltss %xmm3, %xmm8
andnps %xmm2, %xmm8
movss 0x32969(%rip), %xmm4    # 0xb4fe4
movaps %xmm4, %xmm0
divss %xmm8, %xmm0
movaps %xmm1, %xmm2
subss %xmm9, %xmm2
movss %xmm0, -0x70(%rbp)
mulss %xmm0, %xmm2
movaps %xmm4, %xmm0
subss %xmm2, %xmm0
movss 0x442d4(%rip), %xmm11   # 0xc6978
ucomiss %xmm0, %xmm3
movss %xmm5, -0x2c(%rbp)
movss %xmm6, -0x30(%rbp)
movss %xmm7, -0x60(%rbp)
movaps %xmm8, -0x50(%rbp)
movaps %xmm1, -0x90(%rbp)
jae 0x82708
ucomiss 0x32919(%rip), %xmm0    # 0xb4fe4
jae 0x8270c
callq 0xc4d0
movss 0x4429d(%rip), %xmm11   # 0xc6978
movss 0x32901(%rip), %xmm4    # 0xb4fe4
movaps -0x90(%rbp), %xmm1
movaps -0x50(%rbp), %xmm8
movss -0x60(%rbp), %xmm7
movss -0x30(%rbp), %xmm6
movss -0x2c(%rbp), %xmm5
movaps %xmm0, %xmm3
movss (%r15), %xmm9
jmp 0x8270c
movaps %xmm11, %xmm3
movaps %xmm5, %xmm2
subss %xmm9, %xmm2
mulss -0x70(%rbp), %xmm2
movaps %xmm4, %xmm0
subss %xmm2, %xmm0
xorps %xmm10, %xmm10
ucomiss %xmm0, %xmm10
jae 0x82770
ucomiss 0x328b3(%rip), %xmm0    # 0xb4fe4
jae 0x82774
movss %xmm3, -0x34(%rbp)
callq 0xc4d0
movss -0x34(%rbp), %xmm3
movss 0x3289a(%rip), %xmm4    # 0xb4fe4
movaps -0x90(%rbp), %xmm1
movaps -0x50(%rbp), %xmm8
movss -0x60(%rbp), %xmm7
movss -0x30(%rbp), %xmm6
movss -0x2c(%rbp), %xmm5
movaps %xmm0, %xmm10
movss (%r15), %xmm9
jmp 0x82774
movaps %xmm11, %xmm10
addss %xmm8, %xmm9
movaps %xmm9, %xmm2
cmpless %xmm1, %xmm2
movaps %xmm2, %xmm0
andnps %xmm9, %xmm0
andps %xmm1, %xmm2
orps %xmm0, %xmm2
ucomiss %xmm10, %xmm3
movaps %xmm2, -0xb0(%rbp)
jne 0x827c8
jp 0x827c8
movl 0x78(%r14), %eax
cmpl 0x7c(%r14), %eax
jne 0x82851
leal 0x1(%rax), %r13d
testl %eax, %eax
je 0x82912
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x82917
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm3
movaps %xmm6, %xmm0
subss %xmm8, %xmm0
jne 0x8285d
jp 0x8285d
ucomiss 0x44192(%rip), %xmm10   # 0xc6978
jne 0x8285d
jp 0x8285d
leaq -0x3c(%rbp), %r12
movss %xmm2, (%r12)
movss %xmm0, 0x4(%r12)
movq %r14, %rdi
movq %r12, %rsi
movaps %xmm8, %xmm0
movl $0x3, %edx
movl $0x6, %ecx
callq 0x7700e
movss -0x60(%rbp), %xmm0
addss -0x50(%rbp), %xmm0
movaps -0xb0(%rbp), %xmm1
movss %xmm1, (%r12)
movss %xmm0, 0x4(%r12)
leaq -0x3c(%rbp), %rsi
movq %r14, %rdi
movaps -0x50(%rbp), %xmm0
movl $0x6, %edx
movl $0x9, %ecx
callq 0x7700e
jmp 0x828f1
movq 0x80(%r14), %r12
jmp 0x82987
leaq -0x3c(%rbp), %r12
movss %xmm2, (%r12)
movss %xmm0, 0x4(%r12)
movss 0x440da(%rip), %xmm0    # 0xc6950
movaps %xmm0, %xmm1
subss %xmm10, %xmm1
movaps %xmm0, %xmm2
subss %xmm3, %xmm2
movq %r14, %rdi
movq %r12, %rsi
movaps %xmm8, %xmm0
movl $0x3, %edx
movss %xmm3, -0x34(%rbp)
movss %xmm10, -0x74(%rbp)
callq 0x7724e
movss -0x60(%rbp), %xmm0
addss -0x50(%rbp), %xmm0
movaps -0xb0(%rbp), %xmm1
movss %xmm1, (%r12)
movss %xmm0, 0x4(%r12)
movss 0x44086(%rip), %xmm0    # 0xc6950
movss -0x34(%rbp), %xmm1
addss %xmm0, %xmm1
movss -0x74(%rbp), %xmm2
addss %xmm0, %xmm2
leaq -0x3c(%rbp), %rsi
movq %r14, %rdi
movaps -0x50(%rbp), %xmm0
movl $0x3, %edx
callq 0x7724e
movaps -0x50(%rbp), %xmm8
movss -0x60(%rbp), %xmm7
movss -0x2c(%rbp), %xmm5
movss -0x30(%rbp), %xmm6
movss 0x326d7(%rip), %xmm4    # 0xb4fe4
jmp 0x82a4e
movl $0x8, %ecx
cmpl %r13d, %ecx
cmovgl %ecx, %r13d
movslq %r13d, %rdi
shlq $0x3, %rdi
callq 0x41c63
movq %rax, %r12
movq 0x80(%r14), %rsi
testq %rsi, %rsi
je 0x82955
movslq 0x78(%r14), %rdx
shlq $0x3, %rdx
movq %r12, %rdi
callq 0xc080
movq 0x80(%r14), %rdi
callq 0x41d3c
movq %r12, 0x80(%r14)
movl %r13d, 0x7c(%r14)
movl 0x78(%r14), %eax
movss -0x2c(%rbp), %xmm5
movss -0x30(%rbp), %xmm6
movss -0x60(%rbp), %xmm7
movaps -0x50(%rbp), %xmm8
movss 0x32664(%rip), %xmm4    # 0xb4fe4
movaps -0xb0(%rbp), %xmm2
cltq
movss %xmm2, (%r12,%rax,8)
movss %xmm6, 0x4(%r12,%rax,8)
movl 0x78(%r14), %r13d
leal 0x1(%r13), %eax
movl %eax, 0x78(%r14)
cmpl 0x7c(%r14), %eax
jne 0x829bd
addl $0x2, %r13d
testl %eax, %eax
je 0x829c6
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x829cb
movq 0x80(%r14), %r12
jmp 0x82a3b
movl $0x8, %ecx
cmpl %r13d, %ecx
cmovgl %ecx, %r13d
movslq %r13d, %rdi
shlq $0x3, %rdi
callq 0x41c63
movq %rax, %r12
movq 0x80(%r14), %rsi
testq %rsi, %rsi
je 0x82a09
movslq 0x78(%r14), %rdx
shlq $0x3, %rdx
movq %r12, %rdi
callq 0xc080
movq 0x80(%r14), %rdi
callq 0x41d3c
movq %r12, 0x80(%r14)
movl %r13d, 0x7c(%r14)
movl 0x78(%r14), %eax
movss -0x2c(%rbp), %xmm5
movss -0x30(%rbp), %xmm6
movss -0x60(%rbp), %xmm7
movaps -0x50(%rbp), %xmm8
movss 0x325b0(%rip), %xmm4    # 0xb4fe4
movaps -0xb0(%rbp), %xmm2
cltq
movss %xmm2, (%r12,%rax,8)
movss %xmm7, 0x4(%r12,%rax,8)
incl 0x78(%r14)
movss (%r15), %xmm0
addss %xmm8, %xmm0
ucomiss %xmm0, %xmm5
jbe 0x82d88
movss 0x8(%r15), %xmm1
movaps %xmm1, %xmm2
subss %xmm5, %xmm2
mulss -0x70(%rbp), %xmm2
movaps %xmm4, %xmm0
subss %xmm2, %xmm0
movss 0x43ef6(%rip), %xmm3    # 0xc6978
xorps %xmm10, %xmm10
ucomiss %xmm0, %xmm10
jae 0x82ae0
ucomiss 0x32551(%rip), %xmm0    # 0xb4fe4
xorps %xmm9, %xmm9
movaps -0x90(%rbp), %xmm2
jae 0x82aeb
callq 0xc4d0
xorps %xmm10, %xmm10
movss 0x43ec7(%rip), %xmm3    # 0xc6978
movss 0x3252b(%rip), %xmm4    # 0xb4fe4
movaps -0x90(%rbp), %xmm2
movaps -0x50(%rbp), %xmm8
movss -0x60(%rbp), %xmm7
movss -0x30(%rbp), %xmm6
movss -0x2c(%rbp), %xmm5
movaps %xmm0, %xmm9
movss 0x8(%r15), %xmm1
jmp 0x82aeb
movaps %xmm3, %xmm9
movaps -0x90(%rbp), %xmm2
movaps %xmm1, %xmm0
subss %xmm2, %xmm0
mulss -0x70(%rbp), %xmm0
subss %xmm0, %xmm4
ucomiss %xmm4, %xmm10
jae 0x82b3c
xorps %xmm3, %xmm3
ucomiss 0x324d9(%rip), %xmm4    # 0xb4fe4
jae 0x82b3c
movaps %xmm4, %xmm0
movaps %xmm9, -0x70(%rbp)
callq 0xc4d0
movaps -0x70(%rbp), %xmm9
movaps -0x50(%rbp), %xmm8
movss -0x60(%rbp), %xmm7
movss -0x30(%rbp), %xmm6
movss -0x2c(%rbp), %xmm5
movaps %xmm0, %xmm3
movss 0x8(%r15), %xmm1
subss %xmm8, %xmm1
minss %xmm1, %xmm5
ucomiss %xmm3, %xmm9
movss %xmm5, -0x2c(%rbp)
jne 0x82b7c
jp 0x82b7c
movl 0x78(%r14), %eax
cmpl 0x7c(%r14), %eax
jne 0x82bf4
leal 0x1(%rax), %r12d
testl %eax, %eax
je 0x82c78
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x82c7d
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm9
addss %xmm8, %xmm7
jne 0x82c00
jp 0x82c00
ucomiss 0x43de5(%rip), %xmm3    # 0xc6978
jne 0x82c00
jp 0x82c00
leaq -0x3c(%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 0x7700e
movss -0x30(%rbp), %xmm1
movaps -0x50(%rbp), %xmm0
subss %xmm0, %xmm1
movss -0x2c(%rbp), %xmm2
movss %xmm2, (%r15)
movss %xmm1, 0x4(%r15)
leaq -0x3c(%rbp), %rsi
movq %r14, %rdi
xorl %edx, %edx
movl $0x3, %ecx
callq 0x7700e
jmp 0x82d88
movq 0x80(%r14), %r15
jmp 0x82cd9
leaq -0x3c(%rbp), %r15
movss %xmm5, (%r15)
movss %xmm7, 0x4(%r15)
movaps 0x323aa(%rip), %xmm2    # 0xb4fc0
movaps %xmm3, %xmm1
xorps %xmm2, %xmm1
xorps %xmm9, %xmm2
movq %r14, %rdi
movq %r15, %rsi
movaps %xmm8, %xmm0
movl $0x3, %edx
movaps %xmm3, -0x60(%rbp)
movaps %xmm9, -0x70(%rbp)
callq 0x7724e
movss -0x30(%rbp), %xmm1
movaps -0x50(%rbp), %xmm0
subss %xmm0, %xmm1
movss -0x2c(%rbp), %xmm2
movss %xmm2, (%r15)
movss %xmm1, 0x4(%r15)
leaq -0x3c(%rbp), %rsi
movq %r14, %rdi
movaps -0x70(%rbp), %xmm1
movaps -0x60(%rbp), %xmm2
movl $0x3, %edx
callq 0x7724e
jmp 0x82d88
movl $0x8, %ecx
cmpl %r12d, %ecx
cmovgl %ecx, %r12d
movslq %r12d, %rdi
shlq $0x3, %rdi
callq 0x41c63
movq %rax, %r15
movq 0x80(%r14), %rsi
testq %rsi, %rsi
je 0x82cbb
movslq 0x78(%r14), %rdx
shlq $0x3, %rdx
movq %r15, %rdi
callq 0xc080
movq 0x80(%r14), %rdi
callq 0x41d3c
movq %r15, 0x80(%r14)
movl %r12d, 0x7c(%r14)
movl 0x78(%r14), %eax
movss -0x2c(%rbp), %xmm5
movss -0x30(%rbp), %xmm6
movss -0x60(%rbp), %xmm7
cltq
movss %xmm5, (%r15,%rax,8)
movss %xmm7, 0x4(%r15,%rax,8)
movl 0x78(%r14), %r12d
leal 0x1(%r12), %eax
movl %eax, 0x78(%r14)
cmpl 0x7c(%r14), %eax
jne 0x82d10
addl $0x2, %r12d
testl %eax, %eax
je 0x82d19
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x82d1e
movq 0x80(%r14), %r15
jmp 0x82d75
movl $0x8, %ecx
cmpl %r12d, %ecx
cmovgl %ecx, %r12d
movslq %r12d, %rdi
shlq $0x3, %rdi
callq 0x41c63
movq %rax, %r15
movq 0x80(%r14), %rsi
testq %rsi, %rsi
je 0x82d5c
movslq 0x78(%r14), %rdx
shlq $0x3, %rdx
movq %r15, %rdi
callq 0xc080
movq 0x80(%r14), %rdi
callq 0x41d3c
movq %r15, 0x80(%r14)
movl %r12d, 0x7c(%r14)
movl 0x78(%r14), %eax
movss -0x2c(%rbp), %xmm5
movss -0x30(%rbp), %xmm6
cltq
movss %xmm5, (%r15,%rax,8)
movss %xmm6, 0x4(%r15,%rax,8)
incl 0x78(%r14)
movq 0x80(%r14), %rsi
movl 0x78(%r14), %edx
movq %r14, %rdi
movl %ebx, %ecx
callq 0x76d34
movl $0x0, 0x78(%r14)
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq