// File: Ciaxur[P]yagb-emu/include/imgui/imgui_draw.cpp
// Function: PathBezierCubicCurveToCasteljau(ImVector<ImVec2>*, float, float, float, float, float, float, float, float, float, int)
static void PathBezierCubicCurveToCasteljau(ImVector<ImVec2>* path, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, float tess_tol, int level)
{
    float dx = x4 - x1;
    float dy = y4 - y1;
    float d2 = (x2 - x4) * dy - (y2 - y4) * dx;
    float d3 = (x3 - x4) * dy - (y3 - y4) * dx;
    d2 = (d2 >= 0) ? d2 : -d2;
    d3 = (d3 >= 0) ? d3 : -d3;
    if ((d2 + d3) * (d2 + d3) < tess_tol * (dx * dx + dy * dy))
    {
        path->push_back(ImVec2(x4, y4));
    }
    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 x34 = (x3 + x4) * 0.5f, y34 = (y3 + y4) * 0.5f;
        float x123 = (x12 + x23) * 0.5f, y123 = (y12 + y23) * 0.5f;
        float x234 = (x23 + x34) * 0.5f, y234 = (y23 + y34) * 0.5f;
        float x1234 = (x123 + x234) * 0.5f, y1234 = (y123 + y234) * 0.5f;
        PathBezierCubicCurveToCasteljau(path, x1, y1, x12, y12, x123, y123, x1234, y1234, tess_tol, level + 1);
        PathBezierCubicCurveToCasteljau(path, x1234, y1234, x234, y234, x34, y34, x4, y4, tess_tol, level + 1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movss 0x10(%rbp), %xmm8
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)
movss %xmm7, -0x28(%rbp)
movl %esi, -0x2c(%rbp)
movss -0x24(%rbp), %xmm0
subss -0xc(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
movss -0x28(%rbp), %xmm0
subss -0x10(%rbp), %xmm0
movss %xmm0, -0x34(%rbp)
movss -0x14(%rbp), %xmm0
subss -0x24(%rbp), %xmm0
movss -0x34(%rbp), %xmm2
movss -0x18(%rbp), %xmm1
subss -0x28(%rbp), %xmm1
mulss -0x30(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x38(%rbp)
movss -0x1c(%rbp), %xmm0
subss -0x24(%rbp), %xmm0
movss -0x34(%rbp), %xmm2
movss -0x20(%rbp), %xmm1
subss -0x28(%rbp), %xmm1
mulss -0x30(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x3c(%rbp)
movss -0x38(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x112437
movss -0x38(%rbp), %xmm0
movss %xmm0, -0x78(%rbp)
jmp 0x11244e
movss -0x38(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss %xmm0, -0x78(%rbp)
movss -0x78(%rbp), %xmm0
movss %xmm0, -0x38(%rbp)
movss -0x3c(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x112471
movss -0x3c(%rbp), %xmm0
movss %xmm0, -0x7c(%rbp)
jmp 0x112488
movss -0x3c(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss %xmm0, -0x7c(%rbp)
movss -0x7c(%rbp), %xmm0
movss %xmm0, -0x3c(%rbp)
movss -0x38(%rbp), %xmm1
addss -0x3c(%rbp), %xmm1
movss -0x38(%rbp), %xmm0
addss -0x3c(%rbp), %xmm0
mulss %xmm0, %xmm1
movss 0x10(%rbp), %xmm0
movss -0x30(%rbp), %xmm2
movss -0x30(%rbp), %xmm4
movss -0x34(%rbp), %xmm3
mulss -0x34(%rbp), %xmm3
mulss %xmm4, %xmm2
addss %xmm3, %xmm2
mulss %xmm2, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x112507
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
movss -0x24(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
leaq -0x44(%rbp), %rdi
callq 0xbf4c0
movq -0x88(%rbp), %rdi
leaq -0x44(%rbp), %rsi
callq 0xee5d0
jmp 0x1126dd
cmpl $0xa, -0x2c(%rbp)
jge 0x1126db
movss -0xc(%rbp), %xmm0
addss -0x14(%rbp), %xmm0
movss 0x5fab5(%rip), %xmm1    # 0x171fd8
mulss %xmm1, %xmm0
movss %xmm0, -0x48(%rbp)
movss -0x10(%rbp), %xmm0
addss -0x18(%rbp), %xmm0
movss 0x5fa9a(%rip), %xmm1    # 0x171fd8
mulss %xmm1, %xmm0
movss %xmm0, -0x4c(%rbp)
movss -0x14(%rbp), %xmm0
addss -0x1c(%rbp), %xmm0
movss 0x5fa7f(%rip), %xmm1    # 0x171fd8
mulss %xmm1, %xmm0
movss %xmm0, -0x50(%rbp)
movss -0x18(%rbp), %xmm0
addss -0x20(%rbp), %xmm0
movss 0x5fa64(%rip), %xmm1    # 0x171fd8
mulss %xmm1, %xmm0
movss %xmm0, -0x54(%rbp)
movss -0x1c(%rbp), %xmm0
addss -0x24(%rbp), %xmm0
movss 0x5fa49(%rip), %xmm1    # 0x171fd8
mulss %xmm1, %xmm0
movss %xmm0, -0x58(%rbp)
movss -0x20(%rbp), %xmm0
addss -0x28(%rbp), %xmm0
movss 0x5fa2e(%rip), %xmm1    # 0x171fd8
mulss %xmm1, %xmm0
movss %xmm0, -0x5c(%rbp)
movss -0x48(%rbp), %xmm0
addss -0x50(%rbp), %xmm0
movss 0x5fa13(%rip), %xmm1    # 0x171fd8
mulss %xmm1, %xmm0
movss %xmm0, -0x60(%rbp)
movss -0x4c(%rbp), %xmm0
addss -0x54(%rbp), %xmm0
movss 0x5f9f8(%rip), %xmm1    # 0x171fd8
mulss %xmm1, %xmm0
movss %xmm0, -0x64(%rbp)
movss -0x50(%rbp), %xmm0
addss -0x58(%rbp), %xmm0
movss 0x5f9dd(%rip), %xmm1    # 0x171fd8
mulss %xmm1, %xmm0
movss %xmm0, -0x68(%rbp)
movss -0x54(%rbp), %xmm0
addss -0x5c(%rbp), %xmm0
movss 0x5f9c2(%rip), %xmm1    # 0x171fd8
mulss %xmm1, %xmm0
movss %xmm0, -0x6c(%rbp)
movss -0x60(%rbp), %xmm0
addss -0x68(%rbp), %xmm0
movss 0x5f9a7(%rip), %xmm1    # 0x171fd8
mulss %xmm1, %xmm0
movss %xmm0, -0x70(%rbp)
movss -0x64(%rbp), %xmm0
addss -0x6c(%rbp), %xmm0
movss 0x5f98c(%rip), %xmm1    # 0x171fd8
mulss %xmm1, %xmm0
movss %xmm0, -0x74(%rbp)
movq -0x8(%rbp), %rdi
movss -0xc(%rbp), %xmm0
movss -0x10(%rbp), %xmm1
movss -0x48(%rbp), %xmm2
movss -0x4c(%rbp), %xmm3
movss -0x60(%rbp), %xmm4
movss -0x64(%rbp), %xmm5
movss -0x70(%rbp), %xmm6
movss -0x74(%rbp), %xmm7
movss 0x10(%rbp), %xmm8
movl -0x2c(%rbp), %esi
addl $0x1, %esi
movss %xmm8, (%rsp)
callq 0x112350
movq -0x8(%rbp), %rdi
movss -0x70(%rbp), %xmm0
movss -0x74(%rbp), %xmm1
movss -0x68(%rbp), %xmm2
movss -0x6c(%rbp), %xmm3
movss -0x58(%rbp), %xmm4
movss -0x5c(%rbp), %xmm5
movss -0x24(%rbp), %xmm6
movss -0x28(%rbp), %xmm7
movss 0x10(%rbp), %xmm8
movl -0x2c(%rbp), %esi
addl $0x1, %esi
movss %xmm8, (%rsp)
callq 0x112350
jmp 0x1126dd
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)