// File: /workspace/github_cpp_makefile_star2_O1/ArashPartow[P]exprtk/exprtk_simple_example_08.cpp
// Function: void composite<double>()
void composite()
{
   typedef exprtk::symbol_table<T>         symbol_table_t;
   typedef exprtk::expression<T>           expression_t;
   typedef exprtk::parser<T>               parser_t;
   typedef exprtk::parser_error::type      err_t;
   typedef exprtk::function_compositor<T>  compositor_t;
   typedef typename compositor_t::function function_t;

   T x = T(1);
   T y = T(2);

   compositor_t compositor;

   symbol_table_t& symbol_table = compositor.symbol_table();
   symbol_table.add_constants();
   symbol_table.add_variable("x",x);
   symbol_table.add_variable("y",y);

   compositor.add(
      function_t("f")     // f(x) = sin(x / pi)
      .var("x")
      .expression( "sin(x / pi)" ));

   compositor.add(
      function_t("g")     // g(x,y) = 3[f(x) + f(y)]
      .vars("x", "y")
      .expression( "3*[f(x) + f(y)]" ));

   std::string expression_string = "g(1 + f(x), f(y) / 2)";

   expression_t expression;
   expression.register_symbol_table(symbol_table);

   parser_t parser;

   if (!parser.compile(expression_string,expression))
   {
      printf("Error: %s\tExpression: %s\n",
             parser.error().c_str(),
             expression_string.c_str());

      for (std::size_t i = 0; i < parser.error_count(); ++i)
      {
         const err_t error = parser.get_error(i);

         printf("Error: %02d  Position: %02d Type: [%14s] Msg: %s\tExpression: %s\n",
                static_cast<unsigned int>(i),
                static_cast<unsigned int>(error.token.position),
                exprtk::parser_error::to_str(error.mode).c_str(),
                error.diagnostic.c_str(),
                expression_string.c_str());
      }

      return;
   }

   const T result = expression.value();

   printf("%s = %e\n", expression_string.c_str(), result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x14d8, %rsp           # imm = 0x14D8
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x70(%rsp)
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
movq %rax, 0x68(%rsp)
leaq 0xaf0(%rsp), %rbx
movq %rbx, %rdi
callq 0x11c0cc
movq %rbx, %rdi
callq 0x11c256
leaq 0x1d8(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x1b9325(%rip), %rsi    # 0x2d485d
leaq 0x1b931f(%rip), %rdx    # 0x2d485e
leaq 0x1c8(%rsp), %rdi
callq 0x11c03c
leaq 0xaf0(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
leaq 0x70(%rsp), %rdx
xorl %ecx, %ecx
callq 0x11c39c
movq 0x1c8(%rsp), %rdi
cmpq %r13, %rdi
je 0x11b585
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0x118090
leaq 0x1c8(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x1b95a3(%rip), %rsi    # 0x2d4b3a
leaq 0x1b959d(%rip), %rdx    # 0x2d4b3b
callq 0x11c03c
leaq 0xaf0(%rsp), %rbx
leaq 0x1c8(%rsp), %rsi
leaq 0x68(%rsp), %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x11c39c
movq 0x1c8(%rsp), %rdi
cmpq %r13, %rdi
je 0x11b5df
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0x118090
leaq 0x88(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1b9280(%rip), %rsi    # 0x2d4872
leaq 0x1b927a(%rip), %rdx    # 0x2d4873
leaq 0x78(%rsp), %rdi
callq 0x11c03c
leaq 0x1c8(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x11c50a
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1b9238(%rip), %rsi    # 0x2d485d
leaq 0x1b9232(%rip), %rdx    # 0x2d485e
leaq 0x8(%rsp), %rdi
callq 0x11c03c
leaq 0x208(%rsp), %r15
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x12b4de
leaq 0x38(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x1b92aa(%rip), %rsi    # 0x2d4905
leaq 0x1b92ae(%rip), %rdx    # 0x2d4910
leaq 0x28(%rsp), %rdi
callq 0x11c03c
leaq 0x1e8(%rsp), %r12
leaq 0x28(%rsp), %rsi
movq %r12, %rdi
callq 0x118520
leaq 0x1420(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
callq 0x121c70
leaq 0x1428(%rsp), %r14
cmpq %rax, %r14
jne 0x11b755
leaq 0xaf0(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
movq %r12, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x1209ce
testb %al, %al
je 0x11b755
leaq 0x1c8(%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 0x1450(%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 0x1218a0
movq (%rax), %r12
leaq 0x1c8(%rsp), %rsi
leaq 0x1420(%rsp), %rdi
callq 0x121bf4
movq %r12, %rdi
movq %rax, %rsi
callq 0x12191c
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x11b76c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x118090
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x11b788
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x118090
movq %r15, %rdi
callq 0x12b778
leaq 0x1f8(%rsp), %rbp
movq -0x10(%rbp), %rdi
cmpq %rbp, %rdi
je 0x11b7b1
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x118090
movq 0x1c8(%rsp), %rdi
cmpq %r13, %rdi
leaq 0x88(%rsp), %r15
je 0x11b7d6
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0x118090
movq 0x78(%rsp), %rdi
cmpq %r15, %rdi
je 0x11b7f0
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x118090
leaq 0x78(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x1b9026(%rip), %rsi    # 0x2d4825
leaq 0x1b9020(%rip), %rdx    # 0x2d4826
callq 0x11c03c
leaq 0x1c8(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x11c50a
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x1b902c(%rip), %rsi    # 0x2d485d
leaq 0x1b9026(%rip), %rdx    # 0x2d485e
callq 0x11c03c
leaq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
movq %rax, (%rdi)
leaq 0x1b92e9(%rip), %rsi    # 0x2d4b3a
leaq 0x1b92e3(%rip), %rdx    # 0x2d4b3b
callq 0x11c03c
leaq 0x208(%rsp), %r15
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x12b4de
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0x12b4de
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1b9082(%rip), %rsi    # 0x2d4911
leaq 0x1b908a(%rip), %rdx    # 0x2d4920
leaq 0x48(%rsp), %rdi
callq 0x11c03c
leaq 0x1e8(%rsp), %r12
leaq 0x48(%rsp), %rsi
movq %r12, %rdi
callq 0x118520
leaq 0x1c8(%rsp), %rsi
leaq 0x1420(%rsp), %rdi
callq 0x121c70
cmpq %rax, %r14
jne 0x11b981
leaq 0xaf0(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
movq %r12, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x1209ce
testb %al, %al
je 0x11b981
leaq 0x1c8(%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 0x1450(%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 0x1218a0
movq (%rax), %r12
leaq 0x1c8(%rsp), %rsi
leaq 0x1420(%rsp), %rdi
callq 0x121bf4
movq %r12, %rdi
movq %rax, %rsi
callq 0x12191c
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x11b99d
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x118090
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x11b9b9
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x118090
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x11b9d5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x118090
movq %r15, %rdi
callq 0x12b778
movq 0x1e8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x11b9fa
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x118090
movq 0x1c8(%rsp), %rdi
cmpq %r13, %rdi
leaq 0x88(%rsp), %r14
je 0x11ba1f
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0x118090
movq 0x78(%rsp), %rdi
cmpq %r14, %rdi
je 0x11ba39
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x118090
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x1b8ed4(%rip), %rsi    # 0x2d4921
leaq 0x1b8ee2(%rip), %rdx    # 0x2d4936
callq 0x11c03c
leaq 0x28(%rsp), %rdi
callq 0x11c5e4
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %rax
subq %rcx, %rax
je 0x11bac2
sarq $0x3, %rax
cmpq $0x1, %rax
movq %rax, %rsi
adcq $0x0, %rsi
cmpq %rbx, %rcx
je 0x11bad4
movq 0xaf0(%rsp), %rdx
cmpq (%rcx), %rdx
je 0x11bad4
addq $0x8, %rcx
movl $0x1, %edi
subq %rsi, %rdi
xorl %esi, %esi
cmpq %rsi, %rdi
je 0x11bac2
decq %rsi
cmpq %rbx, %rcx
je 0x11baba
leaq 0x8(%rcx), %r8
cmpq (%rcx), %rdx
movq %r8, %rcx
jne 0x11baa1
negq %rsi
cmpq %rax, %rsi
jb 0x11bad4
leaq 0x30(%rsp), %rdi
leaq 0xaf0(%rsp), %rsi
callq 0x12b9ea
leaq 0x78(%rsp), %rdi
movl $0x7f, %esi
callq 0x11c67e
leaq 0x1c8(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x11c77e
leaq 0x178(%rsp), %rdi
callq 0x12bbd0
leaq 0x148(%rsp), %rdi
callq 0x12bbd0
leaq 0x118(%rsp), %rdi
callq 0x12bbd0
leaq 0xe8(%rsp), %rdi
callq 0x12bbd0
leaq 0xb8(%rsp), %rdi
callq 0x12bbd0
leaq 0x88(%rsp), %rbx
movq %rbx, %rdi
callq 0x12bbd0
leaq 0x1c8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x11cfa2
testb %al, %al
je 0x11bbd5
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x8(%rsp), %rsi
leaq 0x1b8e16(%rip), %rdi    # 0x2d4992
movb $0x1, %al
callq 0x118050
leaq 0x1c8(%rsp), %rdi
callq 0x11da8a
leaq 0x28(%rsp), %rdi
callq 0x11dd4c
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x11bbb6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x118090
leaq 0xaf0(%rsp), %rdi
callq 0x11dd9a
addq $0x14d8, %rsp           # imm = 0x14D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x4e0(%rsp), %r8
movabsq $-0x30c30c30c30c30c3, %rbp # imm = 0xCF3CF3CF3CF3CF3D
cmpq %r8, 0x500(%rsp)
je 0x11bc2c
movq %r8, %rcx
subq 0x4e8(%rsp), %rcx
movq %rcx, %rax
sarq $0x3, %rax
imulq %rbp, %rax
cmpq $0x3, %rax
jb 0x11bc7d
movq 0x4f8(%rsp), %rsi
testq %rcx, %rcx
jle 0x11bc59
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rdx
shrq %rdx
jmp 0x11bc6f
movq %rbx, 0x78(%rsp)
movabsq $0x726f727245206f4e, %rax # imm = 0x726F727245206F4E
movq %rax, 0x88(%rsp)
movq $0x8, 0x80(%rsp)
movb $0x0, 0x90(%rsp)
jmp 0x11bc95
notq %rax
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rdx
shrq %rdx
notq %rdx
imulq $-0x1f8, %rdx, %r8      # imm = 0xFE08
addq (%rsi,%rdx,8), %r8
addq %rcx, %r8
leaq 0x78(%rsp), %rdi
movq %rbx, (%rdi)
movq 0x38(%r8), %rsi
movq 0x40(%r8), %rdx
addq %rsi, %rdx
callq 0x11e602
movq 0x78(%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x1b8c91(%rip), %rdi    # 0x2d4937
xorl %eax, %eax
callq 0x118050
movq 0x78(%rsp), %rdi
cmpq %rbx, %rdi
je 0x11bcc7
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x118090
movq $-0x1, %rbx
leaq 0x1b8c7c(%rip), %r15    # 0x2d4951
xorl %r14d, %r14d
xorl %r12d, %r12d
movq 0x518(%rsp), %rax
movq %rax, %rcx
subq 0x4f8(%rsp), %rcx
sarq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
leaq (%rcx,%rcx,2), %rax
movq 0x500(%rsp), %rcx
subq 0x508(%rsp), %rcx
sarq $0x3, %rcx
imulq %rbp, %rcx
addq %rax, %rcx
movq 0x4e0(%rsp), %rsi
movq 0x4f0(%rsp), %rax
subq %rsi, %rax
sarq $0x3, %rax
imulq %rbp, %rax
addq %rcx, %rax
cmpq %rax, %r12
jae 0x11bb83
movq %rsi, %rdx
subq 0x4e8(%rsp), %rdx
sarq $0x3, %rdx
imulq %rbp, %rdx
leaq (%r12,%rdx), %rcx
cmpq $0x2, %rcx
ja 0x11bd62
addq %r14, %rsi
jmp 0x11bdb2
testq %rcx, %rcx
jle 0x11bd7c
movq %rcx, %rax
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rdx
shrq %rdx
jmp 0x11bd95
movq %rbx, %rax
subq %rdx, %rax
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rdx
shrq %rdx
notq %rdx
movq 0x4f8(%rsp), %rax
imulq $-0x1f8, %rdx, %rdi     # imm = 0xFE08
addq (%rax,%rdx,8), %rdi
imulq $0xa8, %rcx, %rsi
addq %rdi, %rsi
leaq 0x78(%rsp), %rdi
callq 0x126b72
movq 0xa0(%rsp), %r13
movl 0xa8(%rsp), %esi
leaq 0x48(%rsp), %rdi
callq 0x11d973
movq 0x48(%rsp), %rcx
movq 0xb0(%rsp), %r8
movq 0x8(%rsp), %r9
movq %r15, %rdi
movl %r12d, %esi
movl %r13d, %edx
xorl %eax, %eax
callq 0x118050
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x11be13
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x118090
movq 0xf0(%rsp), %rdi
leaq 0x100(%rsp), %rax
cmpq %rax, %rdi
je 0x11be38
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x118090
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x11be5d
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x118090
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x11be82
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x118090
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x11bea7
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x118090
incq %r12
addq $0xa8, %r14
decq %rbx
jmp 0x11bcdb
jmp 0x11bfd7
jmp 0x11bfd7
jmp 0x11bedc
jmp 0x11bfd7
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x11cf5a
jmp 0x11bff6
movq %rax, %rbx
jmp 0x11bff6
movq %rax, %rbx
jmp 0x11c000
jmp 0x11bf3b
jmp 0x11bf43
jmp 0x11befa
jmp 0x11bf02
jmp 0x11bf0a
jmp 0x11bf3b
jmp 0x11befa
movq %rax, %rbx
jmp 0x11bf83
movq %rax, %rbx
jmp 0x11bf9f
movq %rax, %rbx
jmp 0x11bfac
jmp 0x11bf3b
jmp 0x11bf18
jmp 0x11bf3b
movq %rax, %rbx
movq 0x1c8(%rsp), %rdi
cmpq %r13, %rdi
je 0x11c01c
movq 0x1d8(%rsp), %rsi
jmp 0x11c014
jmp 0x11bf3b
movq %rax, %rbx
jmp 0x11c01c
movq %rax, %rbx
jmp 0x11bf67
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x11bf67
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x118090
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x11bf83
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x118090
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x11bf9f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x118090
leaq 0x1c8(%rsp), %rdi
callq 0x11c5a4
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x11c01c
movq 0x88(%rsp), %rsi
jmp 0x11c014
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
jne 0x11bf76
jmp 0x11bf83
movq %rax, %rbx
jmp 0x11bfe9
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x11da20
leaq 0x1c8(%rsp), %rdi
callq 0x11da8a
leaq 0x28(%rsp), %rdi
callq 0x11dd4c
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x11c01c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x118090
leaq 0xaf0(%rsp), %rdi
callq 0x11dd9a
movq %rbx, %rdi
callq 0x1182e0