// File: /workspace/github_cpp_makefile_star2_O3/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 0x11a052
movq %rbx, %rdi
callq 0x11a1dc
leaq 0x1d8(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x1963fa(%rip), %rsi    # 0x2af8d9
leaq 0x1963f4(%rip), %rdx    # 0x2af8da
leaq 0x1c8(%rsp), %rdi
callq 0x119fbc
leaq 0xaf0(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
leaq 0x70(%rsp), %rdx
xorl %ecx, %ecx
callq 0x11a322
movq 0x1c8(%rsp), %rdi
cmpq %r13, %rdi
je 0x11952c
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0x116090
leaq 0x1c8(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x196678(%rip), %rsi    # 0x2afbb6
leaq 0x196672(%rip), %rdx    # 0x2afbb7
callq 0x119fbc
leaq 0xaf0(%rsp), %rbx
leaq 0x1c8(%rsp), %rsi
leaq 0x68(%rsp), %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x11a322
movq 0x1c8(%rsp), %rdi
cmpq %r13, %rdi
je 0x119586
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0x116090
leaq 0x88(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x196355(%rip), %rsi    # 0x2af8ee
leaq 0x19634f(%rip), %rdx    # 0x2af8ef
leaq 0x78(%rsp), %rdi
callq 0x119fbc
leaq 0x1c8(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x11a472
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x19630d(%rip), %rsi    # 0x2af8d9
leaq 0x196307(%rip), %rdx    # 0x2af8da
leaq 0x8(%rsp), %rdi
callq 0x119fbc
leaq 0x208(%rsp), %r15
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x1275b0
leaq 0x38(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x19637f(%rip), %rsi    # 0x2af981
leaq 0x196383(%rip), %rdx    # 0x2af98c
leaq 0x28(%rsp), %rdi
callq 0x119fbc
leaq 0x1e8(%rsp), %r12
leaq 0x28(%rsp), %rsi
movq %r12, %rdi
callq 0x116520
leaq 0x1420(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
callq 0x11f52a
leaq 0x1428(%rsp), %r14
cmpq %rax, %r14
jne 0x1196fc
leaq 0xaf0(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
movq %r12, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x11e290
testb %al, %al
je 0x1196fc
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 0x11f14e
movq (%rax), %r12
leaq 0x1c8(%rsp), %rsi
leaq 0x1420(%rsp), %rdi
callq 0x11f4ae
movq %r12, %rdi
movq %rax, %rsi
callq 0x11f1ca
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x119713
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x116090
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x11972f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x116090
movq %r15, %rdi
callq 0x12784a
leaq 0x1f8(%rsp), %rbp
movq -0x10(%rbp), %rdi
cmpq %rbp, %rdi
je 0x119758
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x116090
movq 0x1c8(%rsp), %rdi
cmpq %r13, %rdi
leaq 0x88(%rsp), %r15
je 0x11977d
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0x116090
movq 0x78(%rsp), %rdi
cmpq %r15, %rdi
je 0x119797
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x116090
leaq 0x78(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x1960fb(%rip), %rsi    # 0x2af8a1
leaq 0x1960f5(%rip), %rdx    # 0x2af8a2
callq 0x119fbc
leaq 0x1c8(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x11a472
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x196101(%rip), %rsi    # 0x2af8d9
leaq 0x1960fb(%rip), %rdx    # 0x2af8da
callq 0x119fbc
leaq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
movq %rax, (%rdi)
leaq 0x1963be(%rip), %rsi    # 0x2afbb6
leaq 0x1963b8(%rip), %rdx    # 0x2afbb7
callq 0x119fbc
leaq 0x208(%rsp), %r15
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x1275b0
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0x1275b0
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x196157(%rip), %rsi    # 0x2af98d
leaq 0x19615f(%rip), %rdx    # 0x2af99c
leaq 0x48(%rsp), %rdi
callq 0x119fbc
leaq 0x1e8(%rsp), %r12
leaq 0x48(%rsp), %rsi
movq %r12, %rdi
callq 0x116520
leaq 0x1c8(%rsp), %rsi
leaq 0x1420(%rsp), %rdi
callq 0x11f52a
cmpq %rax, %r14
jne 0x119928
leaq 0xaf0(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
movq %r12, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x11e290
testb %al, %al
je 0x119928
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 0x11f14e
movq (%rax), %r12
leaq 0x1c8(%rsp), %rsi
leaq 0x1420(%rsp), %rdi
callq 0x11f4ae
movq %r12, %rdi
movq %rax, %rsi
callq 0x11f1ca
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x119944
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x116090
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x119960
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x116090
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x11997c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x116090
movq %r15, %rdi
callq 0x12784a
movq 0x1e8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1199a1
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x116090
movq 0x1c8(%rsp), %rdi
cmpq %r13, %rdi
leaq 0x88(%rsp), %r14
je 0x1199c6
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0x116090
movq 0x78(%rsp), %rdi
cmpq %r14, %rdi
je 0x1199e0
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x116090
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x195fa9(%rip), %rsi    # 0x2af99d
leaq 0x195fb7(%rip), %rdx    # 0x2af9b2
callq 0x119fbc
leaq 0x28(%rsp), %rdi
callq 0x11a54c
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
subq %rax, %rcx
je 0x119a40
sarq $0x3, %rcx
movq 0xaf0(%rsp), %rdx
cmpq $0x1, %rcx
adcq $0x0, %rcx
cmpq %rbx, %rax
je 0x119a52
cmpq (%rax), %rdx
je 0x119a52
addq $0x8, %rax
decq %rcx
jne 0x119a2d
leaq 0x30(%rsp), %rdi
leaq 0xaf0(%rsp), %rsi
callq 0x127ad0
leaq 0x78(%rsp), %rdi
movl $0x7f, %esi
callq 0x11a5d8
leaq 0x1c8(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x11a6d8
leaq 0x178(%rsp), %rdi
callq 0x127cb6
leaq 0x148(%rsp), %rdi
callq 0x127cb6
leaq 0x118(%rsp), %rdi
callq 0x127cb6
leaq 0xe8(%rsp), %rdi
callq 0x127cb6
leaq 0xb8(%rsp), %rdi
callq 0x127cb6
leaq 0x88(%rsp), %rbx
movq %rbx, %rdi
callq 0x127cb6
leaq 0x1c8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x11aefc
testb %al, %al
je 0x119b53
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x8(%rsp), %rsi
leaq 0x195f14(%rip), %rdi    # 0x2afa0e
movb $0x1, %al
callq 0x116050
leaq 0x1c8(%rsp), %rdi
callq 0x11bbae
leaq 0x28(%rsp), %rdi
callq 0x11be70
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x119b34
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x116090
leaq 0xaf0(%rsp), %rdi
callq 0x11bebe
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 0x119bae
movq 0x4f8(%rsp), %rsi
movq %r8, %rcx
subq 0x4e8(%rsp), %rcx
movq %rcx, %rax
sarq $0x3, %rax
imulq %rbp, %rax
cmpq $-0xa7, %rcx
jl 0x119bde
cmpq $0x3, %rax
jb 0x119c02
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rdx
shrq %rdx
jmp 0x119bf4
movq %rbx, 0x78(%rsp)
movabsq $0x726f727245206f4e, %rax # imm = 0x726F727245206F4E
movq %rax, 0x88(%rsp)
movq $0x8, 0x80(%rsp)
movb $0x0, 0x90(%rsp)
movq %rbx, %rsi
jmp 0x119c1f
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 0x11c72a
movq 0x78(%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x195d88(%rip), %rdi    # 0x2af9b3
xorl %eax, %eax
callq 0x116050
movq 0x78(%rsp), %rdi
cmpq %rbx, %rdi
je 0x119c4c
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x116090
movq $-0x1, %rbx
leaq 0x195d73(%rip), %r15    # 0x2af9cd
xorl %r14d, %r14d
xorl %r12d, %r12d
movq 0x518(%rsp), %rax
movq 0x4f8(%rsp), %rdi
movq %rax, %rcx
subq %rdi, %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 0x119b01
movq %rsi, %rdx
subq 0x4e8(%rsp), %rdx
sarq $0x3, %rdx
imulq %rbp, %rdx
movq %r12, %rcx
addq %rdx, %rcx
js 0x119cee
cmpq $0x2, %rcx
ja 0x119d09
addq %r14, %rsi
jmp 0x119d31
movq %rbx, %rax
subq %rdx, %rax
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rdx
shrq %rdx
notq %rdx
jmp 0x119d1c
movq %rcx, %rax
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rdx
shrq %rdx
imulq $-0x1f8, %rdx, %rax     # imm = 0xFE08
addq (%rdi,%rdx,8), %rax
imulq $0xa8, %rcx, %rsi
addq %rax, %rsi
leaq 0x78(%rsp), %rdi
callq 0x123028
movq 0xa0(%rsp), %r13
movl 0xa8(%rsp), %esi
leaq 0x48(%rsp), %rdi
callq 0x11ba97
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 0x116050
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x119d92
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x116090
movq 0xf0(%rsp), %rdi
leaq 0x100(%rsp), %rax
cmpq %rax, %rdi
je 0x119db7
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x116090
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x119ddc
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x116090
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x119e01
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x116090
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x119e26
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x116090
incq %r12
addq $0xa8, %r14
decq %rbx
jmp 0x119c60
jmp 0x119f56
jmp 0x119f56
jmp 0x119e5b
jmp 0x119f56
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x11aeb4
jmp 0x119f75
movq %rax, %rbx
jmp 0x119f75
movq %rax, %rbx
jmp 0x119f7f
jmp 0x119eba
jmp 0x119ec2
jmp 0x119e79
jmp 0x119e81
jmp 0x119e89
jmp 0x119eba
jmp 0x119e79
movq %rax, %rbx
jmp 0x119f02
movq %rax, %rbx
jmp 0x119f1e
movq %rax, %rbx
jmp 0x119f2b
jmp 0x119eba
jmp 0x119e97
jmp 0x119eba
movq %rax, %rbx
movq 0x1c8(%rsp), %rdi
cmpq %r13, %rdi
je 0x119f9b
movq 0x1d8(%rsp), %rsi
jmp 0x119f93
jmp 0x119eba
movq %rax, %rbx
jmp 0x119f9b
movq %rax, %rbx
jmp 0x119ee6
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x119ee6
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x116090
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x119f02
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x116090
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x119f1e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x116090
leaq 0x1c8(%rsp), %rdi
callq 0x11a50c
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x119f9b
movq 0x88(%rsp), %rsi
jmp 0x119f93
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
jne 0x119ef5
jmp 0x119f02
movq %rax, %rbx
jmp 0x119f68
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x11bb44
leaq 0x1c8(%rsp), %rdi
callq 0x11bbae
leaq 0x28(%rsp), %rdi
callq 0x11be70
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x119f9b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x116090
leaq 0xaf0(%rsp), %rdi
callq 0x11bebe
movq %rbx, %rdi
callq 0x1162e0