// File: /workspace/github_cpp_makefile_star2_O3/ArashPartow[P]exprtk-extras/exprtk_recursive_fibonacci.cpp
// Function: void recursive_fibonacci_example<double>()
void recursive_fibonacci_example()
{
   typedef exprtk::symbol_table<T>         symbol_table_t;
   typedef exprtk::expression<T>           expression_t;
   typedef exprtk::parser<T>               parser_t;
   typedef exprtk::function_compositor<T>  compositor_t;
   typedef typename compositor_t::function function_t;

   exprtk::rtl::io::package<T> io_package;

   symbol_table_t symbol_table;

   symbol_table.add_package(io_package);

   compositor_t compositor(symbol_table);

   compositor.add(
      function_t("fibonacci")
      .var("n")
      .expression
      ( " (n < 2) ? n : fibonacci(n - 1) + fibonacci(n - 2); " ));


   const std::string fibonacci_program =
      " const var n := 35;                  "
      "                                     "
      " for (var i := 0; i <= n; i += 1)    "
      " {                                   "
      "    var fib_i := fibonacci(i);       "
      "    println('fib(',i,') = ', fib_i); "
      " }                                   ";

   expression_t expression;
   expression.register_symbol_table(symbol_table);

   parser_t parser;
   parser.compile(fibonacci_program,expression);

   exprtk::timer timer;
   timer.start();

   expression.value();

   timer.stop();

   printf("Total time: %8.4fsec\n",timer.time());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1578, %rsp           # imm = 0x1578
leaq 0x198(%rsp), %rdi
callq 0x119af4
movq %rsp, %rdi
movl $0x1, %esi
callq 0x119bd4
leaq 0x198(%rsp), %rdi
movq %rsp, %rsi
callq 0x11c8ce
leaq 0xb90(%rsp), %rdi
movq %rsp, %rbx
movq %rbx, %rsi
callq 0x119c1c
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x196462(%rip), %rsi    # 0x2af965
leaq 0x196464(%rip), %rdx    # 0x2af96e
leaq 0x48(%rsp), %rdi
callq 0x119a5e
leaq 0x268(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x119da4
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1962fa(%rip), %rsi    # 0x2af830
leaq 0x1962f4(%rip), %rdx    # 0x2af831
leaq 0x8(%rsp), %rdi
callq 0x119a5e
leaq 0x2a8(%rsp), %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x12776c
leaq 0x38(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x196403(%rip), %rsi    # 0x2af96f
leaq 0x196430(%rip), %rdx    # 0x2af9a3
leaq 0x28(%rsp), %rdi
callq 0x119a5e
leaq 0x288(%rsp), %r12
leaq 0x28(%rsp), %rsi
movq %r12, %rdi
callq 0x116530
leaq 0x14c0(%rsp), %r15
leaq 0x268(%rsp), %rsi
movq %r15, %rdi
callq 0x11f252
leaq 0x14c8(%rsp), %rcx
cmpq %rax, %rcx
jne 0x119664
leaq 0xb90(%rsp), %rdi
leaq 0x268(%rsp), %rsi
movq %r12, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x11dfb8
testb %al, %al
je 0x119664
leaq 0x268(%rsp), %rsi
movq 0x88(%rsi), %rax
movq %rax, %rcx
subq 0x68(%rsi), %rcx
shrq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
movq 0x60(%rsi), %rax
movq 0x70(%rsi), %rdx
subq 0x78(%rsi), %rdx
subq 0x50(%rsi), %rax
sarq $0x5, %rdx
sarq $0x5, %rax
leaq (%rcx,%rcx,2), %rcx
shlq $0x8, %rcx
addq 0x14f0(%rsp), %rcx
leaq (%rdx,%rdx,2), %rdx
shlq $0x4, %rdx
leaq (%rax,%rax,2), %rdi
shlq $0x4, %rdi
addq %rdx, %rdi
addq %rcx, %rdi
callq 0x11ee76
movq (%rax), %r12
leaq 0x268(%rsp), %rsi
movq %r15, %rdi
callq 0x11f1d6
movq %r12, %rdi
movq %rax, %rsi
callq 0x11eef2
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x11967b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x116090
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %r15
cmpq %r15, %rdi
je 0x119697
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x116090
movq %r14, %rdi
callq 0x127a06
leaq 0x298(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1196c0
movq 0x298(%rsp), %rsi
incq %rsi
callq 0x116090
leaq 0x278(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1196e1
movq 0x278(%rsp), %rsi
incq %rsi
callq 0x116090
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x1196f8
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x116090
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x19629d(%rip), %rsi    # 0x2af9a4
leaq 0x196399(%rip), %rdx    # 0x2afaa7
callq 0x119a5e
leaq 0x28(%rsp), %rdi
callq 0x119e7e
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
subq %rax, %rcx
je 0x11974f
sarq $0x3, %rcx
movq (%rsp), %rdx
cmpq $0x1, %rcx
adcq $0x0, %rcx
cmpq %rbx, %rax
je 0x11975c
cmpq (%rax), %rdx
je 0x11975c
addq $0x8, %rax
decq %rcx
jne 0x11973c
leaq 0x30(%rsp), %rdi
movq %rsp, %rsi
callq 0x127c8c
leaq 0x48(%rsp), %rdi
movl $0x7f, %esi
callq 0x119f0a
leaq 0x268(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x11a00a
leaq 0x148(%rsp), %rdi
callq 0x127e72
leaq 0x118(%rsp), %rdi
callq 0x127e72
leaq 0xe8(%rsp), %rdi
callq 0x127e72
leaq 0xb8(%rsp), %rdi
callq 0x127e72
leaq 0x88(%rsp), %rdi
callq 0x127e72
leaq 0x58(%rsp), %rdi
callq 0x127e72
leaq 0x268(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x11a82e
leaq 0x50(%rsp), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movb $0x1, -0x8(%rdi)
xorl %esi, %esi
callq 0x116240
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x116240
movq (%rbx), %rax
subq -0x10(%rbx), %rax
jge 0x11982a
movsd 0x1917e0(%rip), %xmm0   # 0x2ab008
jmp 0x119864
imulq $0xf4240, %rax, %rax    # imm = 0xF4240
addq 0x68(%rsp), %rax
subq 0x58(%rsp), %rax
movq %rax, %xmm1
punpckldq 0x191898(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1918a0(%rip), %xmm1   # 0x2ab0f0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x1917ac(%rip), %xmm0   # 0x2ab010
leaq 0x19623d(%rip), %rdi    # 0x2afaa8
movb $0x1, %al
callq 0x116050
leaq 0x268(%rsp), %rdi
callq 0x11b3ca
leaq 0x28(%rsp), %rdi
callq 0x11b68c
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1198a0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x116090
leaq 0xb90(%rsp), %rdi
callq 0x11b6da
movq %rsp, %rdi
callq 0x11b73c
leaq 0x258(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1198d6
movq 0x258(%rsp), %rsi
incq %rsi
callq 0x116090
leaq 0x28ef1b(%rip), %rbx    # 0x3a87f8
leaq 0x230(%rsp), %rax
movq %rbx, -0x30(%rax)
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x119902
movq 0x230(%rsp), %rsi
incq %rsi
callq 0x116090
leaq 0x1f0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x119923
movq 0x1f0(%rsp), %rsi
incq %rsi
callq 0x116090
leaq 0x1c8(%rsp), %rax
movq %rbx, -0x30(%rax)
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x119948
movq 0x1c8(%rsp), %rsi
incq %rsi
callq 0x116090
addq $0x1578, %rsp           # imm = 0x1578
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x11997f
jmp 0x11995e
movq %rax, %rbx
leaq 0x268(%rsp), %rdi
callq 0x11b3ca
jmp 0x119982
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x11a7e6
jmp 0x119982
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x11b68c
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x119a29
movq 0x18(%rsp), %rsi
jmp 0x119a21
movq %rax, %rbx
jmp 0x11998c
jmp 0x1199be
jmp 0x1199af
movq %rax, %rbx
jmp 0x1199e9
movq %rax, %rbx
jmp 0x119a05
movq %rax, %rbx
jmp 0x119a12
movq %rax, %rbx
jmp 0x119a29
jmp 0x1199c5
movq %rax, %rbx
jmp 0x119a36
movq %rax, %rbx
jmp 0x119a3e
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1199e9
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x116090
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x119a05
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x116090
leaq 0x268(%rsp), %rdi
callq 0x119e3e
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x119a29
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x116090
leaq 0xb90(%rsp), %rdi
callq 0x11b6da
movq %rsp, %rdi
callq 0x11b73c
leaq 0x198(%rsp), %rdi
callq 0x11b7d2
movq %rbx, %rdi
callq 0x1162f0