// File: orbitcowboy[P]gnuplot-cpp/./gnuplot_i.hpp
// Function: Gnuplot& Gnuplot::plot_x<std::vector<double, std::allocator<double>>>(std::vector<double, std::allocator<double>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Gnuplot& Gnuplot::plot_x(const X& x, const std::string &title)
{
    if (x.empty())
    {
        throw GnuplotException("std::vector too small");
    }

    std::ofstream tmp;
    std::string name = create_tmpfile(tmp);
    if (name.empty())
    {
        return *this;
    }

    //
    // write the data to file
    //
    for (unsigned int i = 0; i < x.size(); ++i)
    {
        tmp << x[i] << std::endl;
    }

    tmp.flush();
    tmp.close();


    plotfile_x(name, 1, title);

    return *this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2b0, %rsp            # imm = 0x2B0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x288(%rbp)
movq -0x18(%rbp), %rdi
callq 0xe5a0
testb $0x1, %al
jne 0xc4c4
jmp 0xc57c
movb $0x1, -0x55(%rbp)
movl $0x10, %edi
callq 0x3170
movq %rax, -0x298(%rbp)
leaq -0x41(%rbp), %rdi
movq %rdi, -0x290(%rbp)
callq 0x3510
movq -0x290(%rbp), %rdx
leaq 0x4499(%rip), %rsi      # 0x10990
leaq -0x40(%rbp), %rdi
callq 0xbb50
jmp 0xc502
movq -0x298(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xbcd0
jmp 0xc514
movq -0x298(%rbp), %rdi
movb $0x0, -0x55(%rbp)
leaq 0x9822(%rip), %rsi      # 0x15d48
leaq -0x81d(%rip), %rdx      # 0xbd10
callq 0x34d0
jmp 0xc70c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0xc55a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x35c8
leaq -0x41(%rbp), %rdi
callq 0x32f0
testb $0x1, -0x55(%rbp)
jne 0xc56b
jmp 0xc577
movq -0x298(%rbp), %rdi
callq 0x3210
jmp 0xc703
leaq -0x258(%rbp), %rdi
movq %rdi, -0x2a0(%rbp)
callq 0x34c0
movq -0x288(%rbp), %rsi
movq -0x2a0(%rbp), %rdx
leaq -0x278(%rbp), %rdi
callq 0x6b90
jmp 0xc5ab
leaq -0x278(%rbp), %rdi
callq 0x3490
testb $0x1, %al
jne 0xc5bd
jmp 0xc5e8
movq -0x288(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0x27c(%rbp)
jmp 0xc6d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0xc6f7
movl $0x0, -0x280(%rbp)
movl -0x280(%rbp), %eax
movq %rax, -0x2a8(%rbp)
movq -0x18(%rbp), %rdi
callq 0xe5e0
movq %rax, %rcx
movq -0x2a8(%rbp), %rax
cmpq %rcx, %rax
jae 0xc683
movq -0x18(%rbp), %rdi
movl -0x280(%rbp), %eax
movl %eax, %esi
callq 0xe600
movsd (%rax), %xmm0
leaq -0x258(%rbp), %rdi
callq 0x3560
movq %rax, -0x2b0(%rbp)
jmp 0xc641
movq -0x2b0(%rbp), %rdi
movq 0x9951(%rip), %rsi      # 0x15fa0
callq 0x32d0
jmp 0xc656
jmp 0xc658
movl -0x280(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x280(%rbp)
jmp 0xc5f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x278(%rbp), %rdi
callq 0x35c8
jmp 0xc6f7
leaq -0x258(%rbp), %rdi
callq 0x31d0
jmp 0xc691
leaq -0x258(%rbp), %rdi
callq 0x3410
jmp 0xc69f
movq -0x288(%rbp), %rdi
movq -0x20(%rbp), %rcx
leaq -0x278(%rbp), %rsi
movl $0x1, %edx
callq 0x5a20
jmp 0xc6bd
movq -0x288(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0x27c(%rbp)
leaq -0x278(%rbp), %rdi
callq 0x35c8
leaq -0x258(%rbp), %rdi
callq 0x3430
movq -0x8(%rbp), %rax
addq $0x2b0, %rsp            # imm = 0x2B0
popq %rbp
retq
leaq -0x258(%rbp), %rdi
callq 0x3430
movq -0x50(%rbp), %rdi
callq 0x3500
nopl (%rax)