// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movslq 0x70(%rdi), %rax
testq %rax, %rax
jle 0x2f061
movq %rsi, %r13
movq %rdi, %r14
addq $0x70, %rdi
movq 0x78(%r14), %rsi
movss -0x8(%rsi,%rax,8), %xmm0
movss -0x4(%rsi,%rax,8), %xmm1
testl %r8d, %r8d
je 0x2f014
jle 0x2f052
cvtsi2ss %r8d, %xmm2
movss 0xe568(%rip), %xmm4     # 0x3d390
movaps %xmm4, %xmm5
divss %xmm2, %xmm5
negl %r8d
movl $0x1, %ebx
movss 0xe5b1(%rip), %xmm6     # 0x3d3f0
movq %rcx, -0x70(%rbp)
movq %rdi, -0x68(%rbp)
movss %xmm0, -0x34(%rbp)
movss %xmm1, -0x30(%rbp)
movq %rdx, -0x60(%rbp)
movq %r8, -0x58(%rbp)
movss %xmm5, -0x2c(%rbp)
xorps %xmm2, %xmm2
cvtsi2ss %ebx, %xmm2
mulss %xmm5, %xmm2
movaps %xmm4, %xmm3
subss %xmm2, %xmm3
movaps %xmm3, %xmm7
mulss %xmm6, %xmm7
movaps %xmm3, %xmm9
mulss %xmm7, %xmm9
mulss %xmm2, %xmm9
mulss %xmm2, %xmm7
mulss %xmm2, %xmm7
movaps %xmm2, %xmm8
mulss %xmm2, %xmm8
mulss %xmm2, %xmm8
movss (%r13), %xmm12
mulss %xmm9, %xmm12
movss (%rdx), %xmm11
mulss %xmm7, %xmm11
movss (%rcx), %xmm10
mulss %xmm8, %xmm10
mulss 0x4(%r13), %xmm9
mulss 0x4(%rdx), %xmm7
mulss 0x4(%rcx), %xmm8
movl 0x70(%r14), %eax
cmpl 0x74(%r14), %eax
jne 0x2ef0e
testl %eax, %eax
movss %xmm7, -0x50(%rbp)
movss %xmm8, -0x4c(%rbp)
movss %xmm9, -0x48(%rbp)
movss %xmm3, -0x44(%rbp)
movss %xmm10, -0x40(%rbp)
movss %xmm11, -0x3c(%rbp)
movss %xmm12, -0x38(%rbp)
je 0x2ef17
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x2ef1c
movq 0x78(%r14), %r12
jmp 0x2efb6
movl $0x8, %ecx
incl %eax
cmpl %eax, %ecx
cmovgl %ecx, %eax
movslq %eax, %r15
leaq (,%r15,8), %rdi
callq 0x8589
movq %rax, %r12
movq 0x78(%r14), %rsi
movslq 0x70(%r14), %rdx
shlq $0x3, %rdx
movq %rax, %rdi
callq 0x7080
movq 0x78(%r14), %rdi
callq 0x9019
movq %r12, 0x78(%r14)
movl %r15d, 0x74(%r14)
movl 0x70(%r14), %eax
movq -0x70(%rbp), %rcx
movq -0x68(%rbp), %rdi
movss -0x34(%rbp), %xmm0
movss -0x30(%rbp), %xmm1
movq -0x60(%rbp), %rdx
movq -0x58(%rbp), %r8
movss 0xe40f(%rip), %xmm4     # 0x3d390
movss -0x2c(%rbp), %xmm5
movss 0xe462(%rip), %xmm6     # 0x3d3f0
movss -0x50(%rbp), %xmm7
movss -0x4c(%rbp), %xmm8
movss -0x48(%rbp), %xmm9
movss -0x44(%rbp), %xmm3
movss -0x40(%rbp), %xmm10
movss -0x3c(%rbp), %xmm11
movss -0x38(%rbp), %xmm12
movaps %xmm3, %xmm2
mulss %xmm3, %xmm2
mulss %xmm3, %xmm2
movaps %xmm2, %xmm3
mulss %xmm0, %xmm3
addss %xmm12, %xmm3
addss %xmm3, %xmm11
addss %xmm11, %xmm10
mulss %xmm1, %xmm2
addss %xmm9, %xmm2
addss %xmm2, %xmm7
addss %xmm7, %xmm8
leal 0x1(%rax), %esi
movl %esi, (%rdi)
cltq
movss %xmm10, (%r12,%rax,8)
movss %xmm8, 0x4(%r12,%rax,8)
leal (%r8,%rbx), %eax
incl %eax
movl %ebx, %esi
incl %esi
movl %esi, %ebx
cmpl $0x1, %eax
jne 0x2ee5e
jmp 0x2f052
movss (%r13), %xmm2
movss 0x4(%r13), %xmm3
movss (%rdx), %xmm4
movss 0x4(%rdx), %xmm5
movss (%rcx), %xmm6
movss 0x4(%rcx), %xmm7
leaq 0x26447(%rip), %rax     # 0x55480
movq (%rax), %rax
movss 0x145c(%rax), %xmm8
movss %xmm8, (%rsp)
xorl %esi, %esi
callq 0x2f080
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x17acd(%rip), %rdi     # 0x46b35
leaq 0xfa54(%rip), %rsi      # 0x3eac3
leaq 0x182b3(%rip), %rcx     # 0x47329
movl $0x326, %edx            # imm = 0x326
callq 0x7140