// File: /workspace/github_cpp_makefile_star2_O1/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
movl %esi, %r14d
movaps %xmm5, %xmm8
movaps %xmm4, %xmm7
movaps %xmm3, %xmm9
movaps %xmm2, %xmm10
movq %rdi, %rbx
movss %xmm5, -0x20(%rbp)
movss %xmm4, -0x1c(%rbp)
movss %xmm6, -0x24(%rbp)
movaps %xmm7, %xmm2
subss %xmm0, %xmm2
movaps %xmm8, %xmm3
subss %xmm1, %xmm3
movaps %xmm10, %xmm4
subss %xmm7, %xmm4
movaps %xmm9, %xmm5
subss %xmm8, %xmm5
mulss %xmm2, %xmm5
mulss %xmm3, %xmm4
subss %xmm5, %xmm4
mulss %xmm4, %xmm4
mulss 0x3e328(%rip), %xmm4    # 0xb7864
mulss %xmm3, %xmm3
mulss %xmm2, %xmm2
addss %xmm3, %xmm2
mulss %xmm6, %xmm2
ucomiss %xmm4, %xmm2
ja 0x79604
cmpl $0x9, %r14d
jg 0x7968c
movaps %xmm0, %xmm2
addss %xmm10, %xmm2
movss 0x3da95(%rip), %xmm4    # 0xb7004
mulss %xmm4, %xmm2
movaps %xmm1, %xmm3
addss %xmm9, %xmm3
mulss %xmm4, %xmm3
addss %xmm7, %xmm10
mulss %xmm4, %xmm10
movss %xmm10, -0x30(%rbp)
addss %xmm8, %xmm9
mulss %xmm4, %xmm9
movss %xmm9, -0x34(%rbp)
movaps %xmm2, %xmm5
addss %xmm10, %xmm5
mulss %xmm4, %xmm5
movss %xmm5, -0x2c(%rbp)
movaps %xmm3, %xmm10
addss %xmm9, %xmm10
mulss %xmm4, %xmm10
movss %xmm10, -0x28(%rbp)
incl %r14d
movq %rbx, %rdi
movaps %xmm5, %xmm4
movaps %xmm10, %xmm5
movl %r14d, %esi
callq 0x794d3
movss -0x30(%rbp), %xmm10
movss -0x34(%rbp), %xmm9
movss -0x24(%rbp), %xmm6
movss -0x1c(%rbp), %xmm7
movss -0x20(%rbp), %xmm8
movss -0x2c(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
jmp 0x79504
movl (%rbx), %r15d
movl 0x4(%rbx), %eax
cmpl %eax, %r15d
jne 0x79677
incl %r15d
testl %eax, %eax
je 0x79623
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x79628
movl $0x8, %ecx
cmpl %r15d, %ecx
cmovgl %ecx, %r15d
cmpl %r15d, %eax
jge 0x79677
movslq %r15d, %rdi
shlq $0x3, %rdi
callq 0x424fb
movq %rax, %r14
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x79664
movslq (%rbx), %rdx
shlq $0x3, %rdx
movq %r14, %rdi
callq 0xc080
movq 0x8(%rbx), %rdi
callq 0x425d4
movq %r14, 0x8(%rbx)
movl %r15d, 0x4(%rbx)
movss -0x20(%rbp), %xmm8
movss -0x1c(%rbp), %xmm7
movq 0x8(%rbx), %rax
movslq (%rbx), %rcx
movss %xmm7, (%rax,%rcx,8)
movss %xmm8, 0x4(%rax,%rcx,8)
incl (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop