// File: 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
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movss %xmm0, -0xc(%rbp)
movss %xmm1, -0x10(%rbp)
movss %xmm2, -0x14(%rbp)
movss %xmm3, -0x18(%rbp)
movss %xmm4, -0x1c(%rbp)
movss %xmm5, -0x20(%rbp)
movss %xmm6, -0x24(%rbp)
movl %esi, -0x28(%rbp)
movss -0x1c(%rbp), %xmm0
subss -0xc(%rbp), %xmm0
movss %xmm0, -0x2c(%rbp)
movss -0x20(%rbp), %xmm0
subss -0x10(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
movss -0x14(%rbp), %xmm0
subss -0x1c(%rbp), %xmm0
movss -0x30(%rbp), %xmm2
movss -0x18(%rbp), %xmm1
subss -0x20(%rbp), %xmm1
mulss -0x2c(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x34(%rbp)
movss -0x34(%rbp), %xmm1
mulss -0x34(%rbp), %xmm1
movss 0x5feaa(%rip), %xmm0    # 0x172734
mulss %xmm0, %xmm1
movss -0x24(%rbp), %xmm0
movss -0x2c(%rbp), %xmm2
movss -0x2c(%rbp), %xmm4
movss -0x30(%rbp), %xmm3
mulss -0x30(%rbp), %xmm3
mulss %xmm4, %xmm2
addss %xmm3, %xmm2
mulss %xmm2, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x1128e5
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movss -0x1c(%rbp), %xmm0
movss -0x20(%rbp), %xmm1
leaq -0x3c(%rbp), %rdi
callq 0xbf4c0
movq -0x60(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
callq 0xee5d0
jmp 0x1129f7
cmpl $0xa, -0x28(%rbp)
jge 0x1129f5
movss -0xc(%rbp), %xmm0
addss -0x14(%rbp), %xmm0
movss 0x5f6d7(%rip), %xmm1    # 0x171fd8
mulss %xmm1, %xmm0
movss %xmm0, -0x40(%rbp)
movss -0x10(%rbp), %xmm0
addss -0x18(%rbp), %xmm0
movss 0x5f6bc(%rip), %xmm1    # 0x171fd8
mulss %xmm1, %xmm0
movss %xmm0, -0x44(%rbp)
movss -0x14(%rbp), %xmm0
addss -0x1c(%rbp), %xmm0
movss 0x5f6a1(%rip), %xmm1    # 0x171fd8
mulss %xmm1, %xmm0
movss %xmm0, -0x48(%rbp)
movss -0x18(%rbp), %xmm0
addss -0x20(%rbp), %xmm0
movss 0x5f686(%rip), %xmm1    # 0x171fd8
mulss %xmm1, %xmm0
movss %xmm0, -0x4c(%rbp)
movss -0x40(%rbp), %xmm0
addss -0x48(%rbp), %xmm0
movss 0x5f66b(%rip), %xmm1    # 0x171fd8
mulss %xmm1, %xmm0
movss %xmm0, -0x50(%rbp)
movss -0x44(%rbp), %xmm0
addss -0x4c(%rbp), %xmm0
movss 0x5f650(%rip), %xmm1    # 0x171fd8
mulss %xmm1, %xmm0
movss %xmm0, -0x54(%rbp)
movq -0x8(%rbp), %rdi
movss -0xc(%rbp), %xmm0
movss -0x10(%rbp), %xmm1
movss -0x40(%rbp), %xmm2
movss -0x44(%rbp), %xmm3
movss -0x50(%rbp), %xmm4
movss -0x54(%rbp), %xmm5
movss -0x24(%rbp), %xmm6
movl -0x28(%rbp), %esi
addl $0x1, %esi
callq 0x1127f0
movq -0x8(%rbp), %rdi
movss -0x50(%rbp), %xmm0
movss -0x54(%rbp), %xmm1
movss -0x48(%rbp), %xmm2
movss -0x4c(%rbp), %xmm3
movss -0x1c(%rbp), %xmm4
movss -0x20(%rbp), %xmm5
movss -0x24(%rbp), %xmm6
movl -0x28(%rbp), %esi
addl $0x1, %esi
callq 0x1127f0
jmp 0x1129f7
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)