// File: /workspace/github_cpp_makefile_star2_O1/ArashPartow[P]exprtk-extras/exprtk_gnuplot.cpp
// Function: exprtk_gnuplot_fx::generate_data()
bool generate_data()
   {
      typedef exprtk::symbol_table<double> symbol_table_t;
      typedef exprtk::expression<double>   expression_t;
      typedef exprtk::parser<double>       parser_t;

      double x = 0.0;

      symbol_table_t symbol_table;
      symbol_table.add_constants();
      symbol_table.add_variable("x",x);

      expression_t expression;
      expression.register_symbol_table(symbol_table);

      parser_t parser;

      if (!parser.compile(expression_,expression))
      {
         return false;
      }

      std::ofstream stream("data.dat");

      if (!stream)
      {
         return false;
      }

      min_y_ = +std::numeric_limits<double>::max();
      max_y_ = -std::numeric_limits<double>::max();

      stream << std::setprecision(10);

      const double increment = std::min(0.00005,std::abs(max_x_ - min_x_) / 1000.0);

      for (x = min_x_; x <= max_x_; x += increment)
      {
         const double y = expression.value();

              if (y < min_y_) min_y_ = y;
         else if (y > max_y_) max_y_ = y;

         stream << x << "\t" << y << "\n";
      }

      const double diff_y  = std::abs(max_y_ - min_y_);
      const double perc7_5 = diff_y * 0.075; //7.5%

      min_y_ -= perc7_5;
      max_y_ += perc7_5;

      return true;
   }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb78, %rsp            # imm = 0xB78
movq %rdi, %rbx
movq $0x0, 0x8(%rsp)
movq %rsp, %r14
movq %r14, %rdi
movl $0x1, %esi
callq 0x119b7a
movq %r14, %rdi
callq 0x119bc2
leaq 0x260(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1af241(%rip), %rsi    # 0x2c8851
leaq 0x1af23b(%rip), %rdx    # 0x2c8852
leaq 0x250(%rsp), %rdi
callq 0x198f0a
movq %rsp, %r14
leaq 0x250(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x119d08
movq 0x250(%rsp), %rdi
cmpq %r15, %rdi
je 0x11965b
movq 0x260(%rsp), %rsi
incq %rsi
callq 0x116080
leaq 0x20(%rsp), %rdi
callq 0x119e76
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %rax
subq %rcx, %rax
je 0x1196c0
sarq $0x3, %rax
cmpq $0x1, %rax
movq %rax, %rsi
adcq $0x0, %rsi
cmpq %r14, %rcx
je 0x1196cd
movq (%rsp), %rdx
cmpq (%rcx), %rdx
je 0x1196cd
addq $0x8, %rcx
movl $0x1, %edi
subq %rsi, %rdi
xorl %esi, %esi
cmpq %rsi, %rdi
je 0x1196c0
decq %rsi
cmpq %r14, %rcx
je 0x1196b8
leaq 0x8(%rcx), %r8
cmpq (%rcx), %rdx
movq %r8, %rcx
jne 0x11969f
negq %rsi
cmpq %rax, %rsi
jb 0x1196cd
leaq 0x28(%rsp), %rdi
movq %rsp, %rsi
callq 0x11e7ee
leaq 0x50(%rsp), %rdi
movl $0x7f, %esi
callq 0x119f10
leaq 0x250(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x11a010
leaq 0x150(%rsp), %rdi
callq 0x11e9f0
leaq 0x120(%rsp), %rdi
callq 0x11e9f0
leaq 0xf0(%rsp), %rdi
callq 0x11e9f0
leaq 0xc0(%rsp), %rdi
callq 0x11e9f0
leaq 0x90(%rsp), %rdi
callq 0x11e9f0
leaq 0x60(%rsp), %rdi
callq 0x11e9f0
leaq 0x20(%rbx), %rsi
leaq 0x250(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x11a834
testb %al, %al
je 0x1198fd
leaq 0x1af1bb(%rip), %rsi    # 0x2c8919
leaq 0x50(%rsp), %rdi
movl $0x10, %edx
callq 0x116150
movq 0x50(%rsp), %rax
movq -0x18(%rax), %rcx
testb $0x5, 0x70(%rsp,%rcx)
sete %bpl
jne 0x1198c9
movl %ebp, 0x14(%rsp)
leaq 0x50(%rbx), %r14
leaq 0x58(%rbx), %rbp
movaps 0x1aa888(%rip), %xmm0   # 0x2c4020
movups %xmm0, 0x50(%rbx)
movq -0x18(%rax), %rax
movq $0xa, 0x58(%rsp,%rax)
movsd 0x40(%rbx), %xmm0
movsd 0x48(%rbx), %xmm2
movsd %xmm0, 0x8(%rsp)
movsd 0x48(%rbx), %xmm1
ucomisd %xmm0, %xmm1
jb 0x119891
subsd %xmm0, %xmm2
andpd 0x1aa85c(%rip), %xmm2   # 0x2c4030
divsd 0x1aa8d4(%rip), %xmm2   # 0x2c40b0
minsd 0x1aa8d4(%rip), %xmm2   # 0x2c40b8
movapd %xmm2, 0x40(%rsp)
leaq 0x1af131(%rip), %r15    # 0x2c8922
leaq 0x1b3c2c(%rip), %r12    # 0x2cd424
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movsd %xmm0, 0x18(%rsp)
movsd (%r14), %xmm0
movsd 0x18(%rsp), %xmm1
ucomisd %xmm1, %xmm0
movq %r14, %rax
ja 0x11982b
ucomisd (%rbp), %xmm1
movq %rbp, %rax
jbe 0x11982f
movsd %xmm1, (%rax)
movsd 0x8(%rsp), %xmm0
leaq 0x50(%rsp), %rdi
callq 0x1163a0
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x1164f0
movq %r13, %rdi
movsd 0x18(%rsp), %xmm0
callq 0x1163a0
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x1164f0
movsd 0x8(%rsp), %xmm0
addsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x48(%rbx), %xmm1
ucomisd %xmm0, %xmm1
jae 0x1197f8
movsd (%rbp), %xmm0
movsd (%r14), %xmm1
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
andpd 0x1aa785(%rip), %xmm2   # 0x2c4030
mulsd 0x1aa80d(%rip), %xmm2   # 0x2c40c0
subsd %xmm2, %xmm1
movsd %xmm1, (%r14)
addsd %xmm0, %xmm2
movsd %xmm2, (%rbp)
movl 0x14(%rsp), %ebp
movq 0x31b6f8(%rip), %rax    # 0x434fc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x58(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x50(%rsp,%rcx)
callq 0x1162d0
leaq 0x148(%rsp), %rdi
callq 0x116360
jmp 0x1198ff
xorl %ebp, %ebp
leaq 0x250(%rsp), %rdi
callq 0x11b206
leaq 0x20(%rsp), %rdi
callq 0x11b4c8
movq %rsp, %rdi
callq 0x11b516
movl %ebp, %eax
addq $0xb78, %rsp            # imm = 0xB78
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x119936
jmp 0x11994a
movq %rax, %rbx
jmp 0x119987
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x11a7ec
jmp 0x119994
movq %rax, %rbx
jmp 0x119994
jmp 0x119975
movq %rax, %rbx
movq 0x250(%rsp), %rdi
cmpq %r15, %rdi
je 0x11999e
movq 0x260(%rsp), %rsi
incq %rsi
callq 0x116080
jmp 0x11999e
jmp 0x119975
movq %rax, %rbx
jmp 0x11999e
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x1163c0
leaq 0x250(%rsp), %rdi
callq 0x11b206
leaq 0x20(%rsp), %rdi
callq 0x11b4c8
movq %rsp, %rdi
callq 0x11b516
movq %rbx, %rdi
callq 0x1162f0