// File: /workspace/github_cpp_makefile_star2_O3/ArashPartow[P]exprtk-extras/exprtk_gnuplot_multi.cpp
// Function: exprtk_gnuplot_fx::generate_gp_script()
bool generate_gp_script()
   {
      std::ofstream stream("plot.gp");

      if (!stream)
      {
         return false;
      }

      double min_x = +std::numeric_limits<double>::max();
      double max_x = -std::numeric_limits<double>::max();
      double min_y = +std::numeric_limits<double>::max();
      double max_y = -std::numeric_limits<double>::max();

      for (std::size_t i = 0; i < curve_list_.size(); ++i)
      {
         exprtk_fx_curve& curve = curve_list_[i];

         if (curve.min_x_ < min_x) min_x = curve.min_x_;
         if (curve.max_x_ > max_x) max_x = curve.max_x_;
         if (curve.min_y_ < min_y) min_y = curve.min_y_;
         if (curve.max_y_ > max_y) max_y = curve.max_y_;
      }

      stream << "set term png\n";
      stream << "set output 'plot.png'\n";
      stream << "set xrange[" << min_x << ":" << max_x <<"]\n";
      stream << "set yrange[" << min_y << ":" << max_y <<"]\n";
      stream << "set xzeroaxis\n";
      stream << "set yzeroaxis\n";
      stream << "plot \\\n";

      for (std::size_t i = 0; i < curve_list_.size(); ++i)
      {
         stream << "'data.dat" << i << "' using 1:2:(1.0) smooth unique title '" << curve_list_[i].title_;
         stream << (((i + 1) < curve_list_.size()) ? "',\\\n"  : "'\n");
      }

      return true;
   }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rdi, %rbx
leaq 0x19221e(%rip), %rsi    # 0x2aa473
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movl $0x10, %edx
callq 0x114150
movq (%r14), %rax
movq -0x18(%rax), %rax
movl 0x48(%rsp,%rax), %eax
movl %eax, 0x24(%rsp)
testb $0x5, %al
je 0x1182c8
testb $0x5, 0x24(%rsp)
sete %bl
movq 0x2e8d3f(%rip), %rax    # 0x400fc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x30(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x28(%rsp,%rcx)
callq 0x1142e0
leaq 0x120(%rsp), %rdi
callq 0x114370
movl %ebx, %eax
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10(%rbx), %r14
movsd 0x188dfc(%rip), %xmm0   # 0x2a10d0
movsd 0x188dfc(%rip), %xmm1   # 0x2a10d8
xorl %r15d, %r15d
movabsq $-0x5555555555555555, %rbp # imm = 0xAAAAAAAAAAAAAAAB
movsd %xmm1, 0x10(%rsp)
movsd %xmm1, (%rsp)
movsd %xmm0, 0x18(%rsp)
movsd %xmm0, 0x8(%rsp)
movq 0x48(%rbx), %rax
movq %rax, %rcx
subq 0x28(%rbx), %rcx
sarq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
leaq (%rcx,%rcx,4), %rax
movq 0x20(%rbx), %rcx
movq 0x30(%rbx), %rdx
subq 0x38(%rbx), %rdx
sarq $0x5, %rdx
imulq %rbp, %rdx
addq %rax, %rdx
subq 0x10(%rbx), %rcx
sarq $0x5, %rcx
imulq %rbp, %rcx
addq %rdx, %rcx
cmpq %rcx, %r15
jae 0x11839b
movq %r14, %rdi
movq %r15, %rsi
callq 0x2a0cf2
movsd 0x40(%rax), %xmm0
movsd 0x48(%rax), %xmm1
minsd 0x10(%rsp), %xmm0
maxsd 0x18(%rsp), %xmm1
movsd 0x50(%rax), %xmm2
minsd (%rsp), %xmm2
movsd 0x58(%rax), %xmm3
maxsd 0x8(%rsp), %xmm3
incq %r15
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x18(%rsp)
movsd %xmm2, (%rsp)
movsd %xmm3, 0x8(%rsp)
jmp 0x118300
leaq 0x1920d9(%rip), %rsi    # 0x2aa47b
leaq 0x28(%rsp), %rdi
movl $0xd, %edx
callq 0x114500
leaq 0x1920d1(%rip), %rsi    # 0x2aa489
leaq 0x28(%rsp), %rdi
movl $0x16, %edx
callq 0x114500
leaq 0x1920d2(%rip), %rsi    # 0x2aa4a0
leaq 0x28(%rsp), %rdi
movl $0xb, %edx
callq 0x114500
leaq 0x28(%rsp), %rdi
movsd 0x10(%rsp), %xmm0
callq 0x1143b0
movq %rax, %r15
leaq 0x18dcda(%rip), %rsi    # 0x2a60d1
movl $0x1, %edx
movq %rax, %rdi
callq 0x114500
movq %r15, %rdi
movsd 0x18(%rsp), %xmm0
callq 0x1143b0
leaq 0x192093(%rip), %rsi    # 0x2aa4ac
movl $0x2, %edx
movq %rax, %rdi
callq 0x114500
leaq 0x192082(%rip), %rsi    # 0x2aa4af
leaq 0x28(%rsp), %rdi
movl $0xb, %edx
callq 0x114500
leaq 0x28(%rsp), %rdi
movsd (%rsp), %xmm0
callq 0x1143b0
movq %rax, %r15
leaq 0x18dc7c(%rip), %rsi    # 0x2a60d1
movl $0x1, %edx
movq %rax, %rdi
callq 0x114500
movq %r15, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x1143b0
leaq 0x192035(%rip), %rsi    # 0x2aa4ac
movl $0x2, %edx
movq %rax, %rdi
callq 0x114500
leaq 0x192030(%rip), %rsi    # 0x2aa4bb
leaq 0x28(%rsp), %rdi
movl $0xe, %edx
callq 0x114500
leaq 0x192029(%rip), %rsi    # 0x2aa4ca
leaq 0x28(%rsp), %rdi
movl $0xe, %edx
callq 0x114500
leaq 0x192022(%rip), %rsi    # 0x2aa4d9
leaq 0x28(%rsp), %rdi
movl $0x7, %edx
callq 0x114500
xorl %r15d, %r15d
leaq 0x28(%rsp), %r13
movq 0x48(%rbx), %rax
movq %rax, %rcx
subq 0x28(%rbx), %rcx
sarq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
leaq (%rcx,%rcx,4), %rax
movq 0x20(%rbx), %rcx
movq 0x30(%rbx), %rdx
subq 0x38(%rbx), %rdx
sarq $0x5, %rdx
imulq %rbp, %rdx
addq %rax, %rdx
subq 0x10(%rbx), %rcx
sarq $0x5, %rcx
imulq %rbp, %rcx
addq %rdx, %rcx
cmpq %rcx, %r15
jae 0x11827a
movl $0x9, %edx
movq %r13, %rdi
leaq 0x191fba(%rip), %rsi    # 0x2aa4e1
callq 0x114500
movq %r13, %rdi
movq %r15, %rsi
callq 0x114250
movq %rax, %r12
movl $0x27, %edx
movq %rax, %rdi
leaq 0x191fa2(%rip), %rsi    # 0x2aa4eb
callq 0x114500
movq %r14, %rdi
movq %r15, %rsi
callq 0x2a0cf2
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r12, %rdi
callq 0x114500
incq %r15
movq 0x48(%rbx), %rax
movq %rax, %rcx
subq 0x28(%rbx), %rcx
sarq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
leaq (%rcx,%rcx,4), %rax
movq 0x30(%rbx), %rcx
subq 0x38(%rbx), %rcx
movq 0x20(%rbx), %rdx
sarq $0x5, %rcx
imulq %rbp, %rcx
addq %rax, %rcx
subq 0x10(%rbx), %rdx
sarq $0x5, %rdx
imulq %rbp, %rdx
addq %rcx, %rdx
xorl %eax, %eax
cmpq %rdx, %r15
setb %al
leaq 0x191ee2(%rip), %rsi    # 0x2aa49d
leaq 0x191f51(%rip), %rcx    # 0x2aa513
cmovbq %rcx, %rsi
leaq 0x2(,%rax,2), %rdx
movq %r13, %rdi
callq 0x114500
jmp 0x1184ce
jmp 0x1185dd
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x1143d0
movq %rbx, %rdi
callq 0x114300