// File: donfreiday[P]gb/./imgui/imgui_draw.cpp
// Function: ImDrawList::PathBezierCurveTo(ImVec2 const&, ImVec2 const&, ImVec2 const&, int)
void ImDrawList::PathBezierCurveTo(const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, int num_segments)
{
    ImVec2 p1 = _Path.back();
    if (num_segments == 0)
    {
        // Auto-tessellated
        PathBezierToCasteljau(&_Path, p1.x, p1.y, p2.x, p2.y, p3.x, p3.y, p4.x, p4.y, GImGui->Style.CurveTessellationTol, 0);
    }
    else
    {
        float t_step = 1.0f / (float)num_segments;
        for (int i_step = 1; i_step <= num_segments; i_step++)
        {
            float t = t_step * i_step;
            float u = 1.0f - t;
            float w1 = u*u*u;
            float w2 = 3*u*u*t;
            float w3 = 3*u*t*t;
            float w4 = t*t*t;
            _Path.push_back(ImVec2(w1*p1.x + w2*p2.x + w3*p3.x + w4*p4.x, w1*p1.y + w2*p2.y + w3*p3.y + w4*p4.y));
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x60(%rbp)
addq $0x70, %rdi
callq 0x4c530
movq (%rax), %rax
movq %rax, -0x2c(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x3fb74
movq -0x60(%rbp), %rdi
addq $0x70, %rdi
movss -0x2c(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
movq -0x10(%rbp), %rax
movss (%rax), %xmm2
movq -0x10(%rbp), %rax
movss 0x4(%rax), %xmm3
movq -0x18(%rbp), %rax
movss (%rax), %xmm4
movq -0x18(%rbp), %rax
movss 0x4(%rax), %xmm5
movq -0x20(%rbp), %rax
movss (%rax), %xmm6
movq -0x20(%rbp), %rax
movss 0x4(%rax), %xmm7
leaq 0x3996a(%rip), %rax     # 0x794c0
movq (%rax), %rax
movss 0x145c(%rax), %xmm8
xorl %esi, %esi
movss %xmm8, (%rsp)
callq 0x3fcf0
jmp 0x3fce9
cvtsi2ssl -0x24(%rbp), %xmm1
movss 0x1b497(%rip), %xmm0    # 0x5b018
divss %xmm1, %xmm0
movss %xmm0, -0x30(%rbp)
movl $0x1, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x3fce7
movq -0x60(%rbp), %rax
movss -0x30(%rbp), %xmm0
cvtsi2ssl -0x34(%rbp), %xmm1
mulss %xmm1, %xmm0
movss %xmm0, -0x38(%rbp)
movss 0x1b45c(%rip), %xmm0    # 0x5b018
subss -0x38(%rbp), %xmm0
movss %xmm0, -0x3c(%rbp)
movss -0x3c(%rbp), %xmm0
mulss -0x3c(%rbp), %xmm0
mulss -0x3c(%rbp), %xmm0
movss %xmm0, -0x40(%rbp)
movss 0x1b492(%rip), %xmm0    # 0x5b074
mulss -0x3c(%rbp), %xmm0
mulss -0x3c(%rbp), %xmm0
mulss -0x38(%rbp), %xmm0
movss %xmm0, -0x44(%rbp)
movss 0x1b476(%rip), %xmm0    # 0x5b074
mulss -0x3c(%rbp), %xmm0
mulss -0x38(%rbp), %xmm0
mulss -0x38(%rbp), %xmm0
movss %xmm0, -0x48(%rbp)
movss -0x38(%rbp), %xmm0
mulss -0x38(%rbp), %xmm0
mulss -0x38(%rbp), %xmm0
movss %xmm0, -0x4c(%rbp)
addq $0x70, %rax
movq %rax, -0x68(%rbp)
movss -0x40(%rbp), %xmm0
movss -0x2c(%rbp), %xmm2
movss -0x44(%rbp), %xmm1
movq -0x10(%rbp), %rax
mulss (%rax), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss -0x48(%rbp), %xmm1
movq -0x18(%rbp), %rax
movss (%rax), %xmm2
mulss %xmm2, %xmm1
addss %xmm0, %xmm1
movss -0x4c(%rbp), %xmm0
movq -0x20(%rbp), %rax
movss (%rax), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss -0x40(%rbp), %xmm1
movss -0x28(%rbp), %xmm3
movss -0x44(%rbp), %xmm2
movq -0x10(%rbp), %rax
mulss 0x4(%rax), %xmm2
mulss %xmm3, %xmm1
addss %xmm2, %xmm1
movss -0x48(%rbp), %xmm2
movq -0x18(%rbp), %rax
movss 0x4(%rax), %xmm3
mulss %xmm3, %xmm2
addss %xmm1, %xmm2
movss -0x4c(%rbp), %xmm1
movq -0x20(%rbp), %rax
movss 0x4(%rax), %xmm3
mulss %xmm3, %xmm1
addss %xmm2, %xmm1
leaq -0x54(%rbp), %rdi
callq 0x2d280
movq -0x68(%rbp), %rdi
leaq -0x54(%rbp), %rsi
callq 0x31200
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x3fb91
jmp 0x3fce9
addq $0x70, %rsp
popq %rbp
retq
nop