// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui_draw.cpp
// Function: PathBezierQuadraticCurveToCasteljau(ImVector<ImVec2>*, float, float, float, float, float, float, float, int)
static void PathBezierQuadraticCurveToCasteljau(ImVector<ImVec2>* path, float x1, float y1, float x2, float y2, float x3, float y3, float tess_tol, int level)
{
    float dx = x3 - x1, dy = y3 - y1;
    float det = (x2 - x3) * dy - (y2 - y3) * dx;
    if (det * det * 4.0f < tess_tol * (dx * dx + dy * dy))
    {
        path->push_back(ImVec2(x3, y3));
    }
    else if (level < 10)
    {
        float x12 = (x1 + x2) * 0.5f, y12 = (y1 + y2) * 0.5f;
        float x23 = (x2 + x3) * 0.5f, y23 = (y2 + y3) * 0.5f;
        float x123 = (x12 + x23) * 0.5f, y123 = (y12 + y23) * 0.5f;
        PathBezierQuadraticCurveToCasteljau(path, x1, y1, x12, y12, x123, y123, tess_tol, level + 1);
        PathBezierQuadraticCurveToCasteljau(path, x123, y123, x23, y23, x3, y3, tess_tol, level + 1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movaps %xmm3, %xmm8
movaps %xmm2, %xmm9
movq %rdi, %rbx
movaps %xmm4, %xmm2
subss %xmm0, %xmm2
movaps %xmm5, %xmm3
subss %xmm1, %xmm3
movaps %xmm9, %xmm7
movss %xmm4, -0x1c(%rbp)
subss %xmm4, %xmm7
movaps %xmm8, %xmm4
movss %xmm5, -0x20(%rbp)
subss %xmm5, %xmm4
mulss %xmm2, %xmm4
mulss %xmm3, %xmm7
subss %xmm4, %xmm7
mulss %xmm7, %xmm7
mulss 0x3dad3(%rip), %xmm7    # 0xb5864
mulss %xmm3, %xmm3
mulss %xmm2, %xmm2
addss %xmm3, %xmm2
movss %xmm6, -0x24(%rbp)
mulss %xmm6, %xmm2
ucomiss %xmm7, %xmm2
ja 0x77ec5
movl %esi, %r14d
cmpl $0xb, %esi
movl $0xa, %r15d
cmovgel %esi, %r15d
negl %r15d
incl %r14d
leal (%r15,%r14), %eax
cmpl $0x1, %eax
je 0x77f48
movaps %xmm0, %xmm2
addss %xmm9, %xmm2
movss 0x3d222(%rip), %xmm4    # 0xb5004
mulss %xmm4, %xmm2
movaps %xmm1, %xmm3
addss %xmm8, %xmm3
mulss %xmm4, %xmm3
addss -0x1c(%rbp), %xmm9
mulss %xmm4, %xmm9
movss %xmm9, -0x30(%rbp)
addss -0x20(%rbp), %xmm8
mulss %xmm4, %xmm8
movss %xmm8, -0x34(%rbp)
movaps %xmm2, %xmm5
addss %xmm9, %xmm5
mulss %xmm4, %xmm5
movss %xmm5, -0x28(%rbp)
movaps %xmm3, %xmm6
addss %xmm8, %xmm6
mulss %xmm4, %xmm6
movss %xmm6, -0x2c(%rbp)
movq %rbx, %rdi
movaps %xmm5, %xmm4
movaps %xmm6, %xmm5
movss -0x24(%rbp), %xmm6
movl %r14d, %esi
callq 0x77d39
movss -0x30(%rbp), %xmm9
movss -0x34(%rbp), %xmm8
movss -0x1c(%rbp), %xmm3
movaps %xmm3, %xmm0
movss -0x28(%rbp), %xmm4
subss %xmm4, %xmm0
movss -0x20(%rbp), %xmm6
movaps %xmm6, %xmm1
movss -0x2c(%rbp), %xmm5
subss %xmm5, %xmm1
movaps %xmm9, %xmm2
subss %xmm3, %xmm2
movaps %xmm8, %xmm3
subss %xmm6, %xmm3
mulss %xmm0, %xmm3
mulss %xmm1, %xmm2
subss %xmm3, %xmm2
mulss %xmm2, %xmm2
mulss 0x3d9c2(%rip), %xmm2    # 0xb5864
mulss %xmm1, %xmm1
mulss %xmm0, %xmm0
addss %xmm1, %xmm0
mulss -0x24(%rbp), %xmm0
incl %r14d
ucomiss %xmm2, %xmm0
movaps %xmm5, %xmm1
movaps %xmm4, %xmm0
jbe 0x77dc5
movl (%rbx), %eax
cmpl 0x4(%rbx), %eax
jne 0x77ee1
leal 0x1(%rax), %r15d
testl %eax, %eax
je 0x77ee7
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x77eec
movq 0x8(%rbx), %r14
jmp 0x77f2d
movl $0x8, %ecx
cmpl %r15d, %ecx
cmovgl %ecx, %r15d
movslq %r15d, %rdi
shlq $0x3, %rdi
callq 0x41c63
movq %rax, %r14
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x77f23
movslq (%rbx), %rdx
shlq $0x3, %rdx
movq %r14, %rdi
callq 0xc080
movq 0x8(%rbx), %rdi
callq 0x41d3c
movq %r14, 0x8(%rbx)
movl %r15d, 0x4(%rbx)
movl (%rbx), %eax
cltq
movss -0x1c(%rbp), %xmm0
movss %xmm0, (%r14,%rax,8)
movss -0x20(%rbp), %xmm0
movss %xmm0, 0x4(%r14,%rax,8)
incl (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop