// File: /workspace/github_cpp_makefile_star2_O1/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 $0x68, %rsp
movslq 0x78(%rdi), %rax
testq %rax, %rax
jle 0x78ff8
movq %rsi, %r13
movq %rdi, %rbx
movq 0x80(%rdi), %rsi
movss -0x8(%rsi,%rax,8), %xmm0
movss -0x4(%rsi,%rax,8), %xmm1
testl %r8d, %r8d
je 0x78fad
jle 0x78fe9
cvtsi2ss %r8d, %xmm2
movss 0x3e22d(%rip), %xmm4    # 0xb6fe4
movaps %xmm4, %xmm5
divss %xmm2, %xmm5
negl %r8d
movl $0x1, %r14d
movss 0x3e221(%rip), %xmm6    # 0xb6ff0
movq %rcx, -0x60(%rbp)
movss %xmm0, -0x34(%rbp)
movss %xmm1, -0x30(%rbp)
movq %rdx, -0x58(%rbp)
movq %r8, -0x50(%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, %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
movl 0x78(%rbx), %r15d
movl 0x7c(%rbx), %eax
cmpl %eax, %r15d
jne 0x78f4a
testl %eax, %eax
je 0x78e79
movl %eax, %esi
shrl $0x1f, %esi
addl %eax, %esi
sarl %esi
addl %eax, %esi
jmp 0x78e7e
movl $0x8, %esi
incl %r15d
cmpl %r15d, %esi
cmovgl %esi, %r15d
cmpl %r15d, %eax
jge 0x78f4a
movss %xmm12, -0x38(%rbp)
movss %xmm11, -0x3c(%rbp)
movaps %xmm10, -0x70(%rbp)
movss %xmm3, -0x40(%rbp)
movaps %xmm9, -0x80(%rbp)
movss %xmm8, -0x44(%rbp)
movss %xmm7, -0x48(%rbp)
movslq %r15d, %rdi
shlq $0x3, %rdi
callq 0x424fb
movq %rax, %r12
movq 0x80(%rbx), %rsi
testq %rsi, %rsi
je 0x78eee
movslq 0x78(%rbx), %rdx
shlq $0x3, %rdx
movq %r12, %rdi
callq 0xc080
movq 0x80(%rbx), %rdi
callq 0x425d4
movq %r12, 0x80(%rbx)
movl %r15d, 0x7c(%rbx)
movq -0x60(%rbp), %rcx
movss -0x34(%rbp), %xmm0
movss -0x30(%rbp), %xmm1
movq -0x58(%rbp), %rdx
movq -0x50(%rbp), %r8
movss 0x3e0cd(%rip), %xmm4    # 0xb6fe4
movss -0x2c(%rbp), %xmm5
movss 0x3e0cc(%rip), %xmm6    # 0xb6ff0
movss -0x48(%rbp), %xmm7
movss -0x44(%rbp), %xmm8
movaps -0x80(%rbp), %xmm9
movss -0x40(%rbp), %xmm3
movaps -0x70(%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]
movq 0x80(%rbx), %rax
movslq 0x78(%rbx), %rsi
movlps %xmm10, (%rax,%rsi,8)
incl 0x78(%rbx)
leal (%r8,%r14), %eax
incl %eax
movl %r14d, %esi
incl %esi
movl %esi, %r14d
cmpl $0x1, %eax
jne 0x78dea
jmp 0x78fe9
movss (%r13), %xmm2
movss 0x4(%r13), %xmm3
movss (%rdx), %xmm4
movss 0x4(%rdx), %xmm5
movss (%rcx), %xmm6
movss 0x4(%rcx), %xmm7
movq 0x38(%rbx), %rax
addq $0x78, %rbx
movss 0x14(%rax), %xmm8
movss %xmm8, (%rsp)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x79017
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x569db(%rip), %rdi     # 0xcf9da
leaq 0x42685(%rip), %rsi     # 0xbb68b
leaq 0x4f103(%rip), %rcx     # 0xc8110
movl $0x666, %edx            # imm = 0x666
callq 0xc140