// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui_draw.cpp
// Function: ImDrawList::PathBezierCubicCurveTo(ImVec2 const&, ImVec2 const&, ImVec2 const&, int)
void ImDrawList::PathBezierCubicCurveTo(const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, int num_segments)
{
    ImVec2 p1 = _Path.back();
    if (num_segments == 0)
    {
        PathBezierCubicCurveToCasteljau(&_Path, p1.x, p1.y, p2.x, p2.y, p3.x, p3.y, p4.x, p4.y, _Data->CurveTessellationTol, 0); // Auto-tessellated
    }
    else
    {
        float t_step = 1.0f / (float)num_segments;
        for (int i_step = 1; i_step <= num_segments; i_step++)
            _Path.push_back(ImBezierCubicCalc(p1, p2, p3, p4, t_step * i_step));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movslq 0x78(%rdi), %r15
testq %r15, %r15
jle 0x77852
movq %rsi, %r13
movq %rdi, %r14
addq $0x78, %rdi
movq 0x80(%r14), %rax
movss -0x8(%rax,%r15,8), %xmm0
movss -0x4(%rax,%r15,8), %xmm1
testl %r8d, %r8d
je 0x7780e
jle 0x77843
cvtsi2ss %r8d, %xmm2
movss 0x3d9d9(%rip), %xmm4    # 0xb4fe4
movaps %xmm4, %xmm5
divss %xmm2, %xmm5
negl %r8d
movl $0x1, %r12d
movss 0x3d9cd(%rip), %xmm6    # 0xb4ff0
movq %rcx, -0x68(%rbp)
movq %rdi, -0x60(%rbp)
movq %rdx, -0x58(%rbp)
movss %xmm0, -0x34(%rbp)
movss %xmm1, -0x30(%rbp)
movq %r8, -0x50(%rbp)
movss %xmm5, -0x2c(%rbp)
xorps %xmm2, %xmm2
cvtsi2ss %r12d, %xmm2
mulss %xmm5, %xmm2
movaps %xmm4, %xmm3
subss %xmm2, %xmm3
movaps %xmm3, %xmm7
mulss %xmm6, %xmm7
movaps %xmm3, %xmm8
mulss %xmm7, %xmm8
mulss %xmm2, %xmm8
mulss %xmm2, %xmm7
mulss %xmm2, %xmm7
movaps %xmm2, %xmm9
mulss %xmm2, %xmm9
mulss %xmm2, %xmm9
movss (%r13), %xmm12
mulss %xmm8, %xmm12
movss (%rdx), %xmm11
mulss %xmm7, %xmm11
movss (%rcx), %xmm10
mulss %xmm9, %xmm10
mulss 0x4(%r13), %xmm8
mulss 0x4(%rdx), %xmm7
mulss 0x4(%rcx), %xmm9
cmpl 0x7c(%r14), %r15d
jne 0x776f4
testl %r15d, %r15d
movss %xmm7, -0x48(%rbp)
movss %xmm8, -0x44(%rbp)
movaps %xmm9, -0x90(%rbp)
movss %xmm3, -0x40(%rbp)
movaps %xmm10, -0x80(%rbp)
movss %xmm11, -0x3c(%rbp)
movss %xmm12, -0x38(%rbp)
je 0x77700
movl %r15d, %eax
shrl $0x1f, %eax
addl %r15d, %eax
sarl %eax
addl %r15d, %eax
jmp 0x77705
movq 0x80(%r14), %rbx
jmp 0x777ad
movl $0x8, %eax
incl %r15d
cmpl %r15d, %eax
cmovgl %eax, %r15d
movslq %r15d, %rdi
shlq $0x3, %rdi
callq 0x41c63
movq %rax, %rbx
movq 0x80(%r14), %rsi
testq %rsi, %rsi
je 0x77746
movslq 0x78(%r14), %rdx
shlq $0x3, %rdx
movq %rbx, %rdi
callq 0xc080
movq 0x80(%r14), %rdi
callq 0x41d3c
movq %rbx, 0x80(%r14)
movl %r15d, 0x7c(%r14)
movl 0x78(%r14), %r15d
movq -0x68(%rbp), %rcx
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rdx
movss -0x34(%rbp), %xmm0
movss -0x30(%rbp), %xmm1
movq -0x50(%rbp), %r8
movss 0x3d86d(%rip), %xmm4    # 0xb4fe4
movss -0x2c(%rbp), %xmm5
movss 0x3d86c(%rip), %xmm6    # 0xb4ff0
movss -0x48(%rbp), %xmm7
movss -0x44(%rbp), %xmm8
movaps -0x90(%rbp), %xmm9
movss -0x40(%rbp), %xmm3
movaps -0x80(%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 %xmm8, %xmm2
addss %xmm2, %xmm7
addss %xmm7, %xmm9
unpcklps %xmm9, %xmm10           # xmm10 = xmm10[0],xmm9[0],xmm10[1],xmm9[1]
movslq %r15d, %rax
movlps %xmm10, (%rbx,%rax,8)
movl (%rdi), %r15d
incl %r15d
movl %r15d, (%rdi)
leal (%r8,%r12), %eax
incl %eax
movl %r12d, %esi
incl %esi
movl %esi, %r12d
cmpl $0x1, %eax
jne 0x77642
jmp 0x77843
movss (%r13), %xmm2
movss 0x4(%r13), %xmm3
movss (%rdx), %xmm4
movss 0x4(%rdx), %xmm5
movss (%rcx), %xmm6
movss 0x4(%rcx), %xmm7
movq 0x38(%r14), %rax
movss 0x14(%rax), %xmm8
movss %xmm8, (%rsp)
xorl %esi, %esi
callq 0x77871
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x56151(%rip), %rdi     # 0xcd9aa
leaq 0x41e2b(%rip), %rsi     # 0xb968b
leaq 0x4e848(%rip), %rcx     # 0xc60af
movl $0x666, %edx            # imm = 0x666
callq 0xc140