// File: /workspace/github_cpp_makefile_star2_O1/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 $0x48, %rsp
movslq 0x70(%rdi), %rax
testq %rax, %rax
jle 0x2f769
movl %r8d, %r12d
movq %rdi, %rbx
movq 0x78(%rdi), %rdi
movss -0x8(%rdi,%rax,8), %xmm0
movss -0x4(%rdi,%rax,8), %xmm1
testl %r8d, %r8d
je 0x2f718
jle 0x2f75a
cvtsi2ss %r12d, %xmm2
movss 0xde58(%rip), %xmm4     # 0x3d380
movaps %xmm4, %xmm5
divss %xmm2, %xmm5
negl %r12d
movl $0x1, %r14d
movss 0xde9c(%rip), %xmm6     # 0x3d3dc
movss %xmm0, -0x34(%rbp)
movss %xmm1, -0x30(%rbp)
movq %rcx, -0x68(%rbp)
movq %rdx, -0x60(%rbp)
movq %rsi, -0x58(%rbp)
movss %xmm5, -0x2c(%rbp)
xorps %xmm2, %xmm2
cvtsi2ss %r14d, %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 (%rsi), %xmm12
mulss %xmm9, %xmm12
movss (%rdx), %xmm11
mulss %xmm7, %xmm11
movss (%rcx), %xmm10
mulss %xmm8, %xmm10
mulss 0x4(%rsi), %xmm9
mulss 0x4(%rdx), %xmm7
mulss 0x4(%rcx), %xmm8
movl 0x70(%rbx), %r15d
movl 0x74(%rbx), %eax
cmpl %eax, %r15d
jne 0x2f6b0
testl %eax, %eax
je 0x2f5e9
movl %eax, %edi
shrl $0x1f, %edi
addl %eax, %edi
sarl %edi
addl %eax, %edi
jmp 0x2f5ee
movl $0x8, %edi
incl %r15d
cmpl %r15d, %edi
cmovgl %edi, %r15d
cmpl %r15d, %eax
jge 0x2f6b0
movslq %r15d, %rdi
shlq $0x3, %rdi
movss %xmm7, -0x50(%rbp)
movss %xmm8, -0x4c(%rbp)
movss %xmm9, -0x48(%rbp)
movss %xmm10, -0x44(%rbp)
movss %xmm3, -0x40(%rbp)
movss %xmm11, -0x3c(%rbp)
movss %xmm12, -0x38(%rbp)
callq 0x85d9
movq %rax, %r13
movq 0x78(%rbx), %rsi
movslq 0x70(%rbx), %rdx
shlq $0x3, %rdx
movq %rax, %rdi
callq 0x7080
movq 0x78(%rbx), %rdi
callq 0x9065
movss -0x38(%rbp), %xmm12
movss -0x3c(%rbp), %xmm11
movss -0x40(%rbp), %xmm3
movss -0x44(%rbp), %xmm10
movss -0x48(%rbp), %xmm9
movss -0x4c(%rbp), %xmm8
movss -0x50(%rbp), %xmm7
movss 0xdd57(%rip), %xmm6     # 0x3d3dc
movss -0x2c(%rbp), %xmm5
movss 0xdcee(%rip), %xmm4     # 0x3d380
movq -0x58(%rbp), %rsi
movq -0x60(%rbp), %rdx
movss -0x30(%rbp), %xmm1
movss -0x34(%rbp), %xmm0
movq -0x68(%rbp), %rcx
movq %r13, 0x78(%rbx)
movl %r15d, 0x74(%rbx)
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
movq 0x78(%rbx), %rax
movslq 0x70(%rbx), %r9
leal 0x1(%r9), %edi
movl %edi, 0x70(%rbx)
movss %xmm10, (%rax,%r9,8)
movss %xmm8, 0x4(%rax,%r9,8)
leal (%r12,%r14), %eax
incl %eax
movl %r14d, %edi
incl %edi
movl %edi, %r14d
cmpl $0x1, %eax
jne 0x2f55b
jmp 0x2f75a
addq $0x70, %rbx
movss (%rsi), %xmm2
movss 0x4(%rsi), %xmm3
movss (%rdx), %xmm4
movss 0x4(%rdx), %xmm5
movss (%rcx), %xmm6
movss 0x4(%rcx), %xmm7
leaq 0x25d52(%rip), %rax     # 0x55490
movq (%rax), %rax
movss 0x145c(%rax), %xmm8
movss %xmm8, (%rsp)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2f788
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x17445(%rip), %rdi     # 0x46bb5
leaq 0xf31c(%rip), %rsi      # 0x3ea93
leaq 0x17c2b(%rip), %rcx     # 0x473a9
movl $0x326, %edx            # imm = 0x326
callq 0x7140