// File: /workspace/github_cpp_makefile_star2_O1/ArashPartow[P]exprtk-extras/exprtk_gcd.cpp
// Function: void gcd<double>()
void gcd()
{
   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;

   symbol_table_t symbol_table;
   symbol_table.add_function("println",gcd_println);

   compositor_t compositor(symbol_table);

   // define function: gcd(x,y)
   compositor.add(
      function_t("gcd")
      .vars("x","y")
      .expression
      (
         " switch                         "
         " {                              "
         "    case 0 = x : 0;             "
         "    case 0 = y : x;             "
         "    case x = y : x;             "
         "    case x > y : gcd(x - y, y); "
         "    default    : gcd(x, y - x); "
         " }                              "
      ));

   const std::string gcd_program =
      " i := 0;                        "
      " while ((i += 1) < 100)         "
      " {                              "
      "    j := 0;                     "
      "    repeat                      "
      "       println(i, j, gcd(i,j)); "
      "    until ((j += 1) >= 100);    "
      " };                             ";

   expression_t expression;
   expression.register_symbol_table(symbol_table);

   parser_t parser;
   parser.enable_unknown_symbol_resolver();
   parser.compile(gcd_program,expression);

   expression.value();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x14c8, %rsp           # imm = 0x14C8
movq %rsp, %rdi
movl $0x1, %esi
callq 0x11cb2a
leaq 0xaf0(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1b93be(%rip), %rsi    # 0x2d58dd
leaq 0x1b93be(%rip), %rdx    # 0x2d58e4
leaq 0xae0(%rsp), %rdi
callq 0x11ca9a
leaq 0x7b5(%rip), %rdx       # 0x11ccef
movq %rsp, %rdi
leaq 0xae0(%rsp), %rsi
callq 0x11cb72
movq 0xae0(%rsp), %rdi
cmpq %r14, %rdi
je 0x11c567
movq 0xaf0(%rsp), %rsi
incq %rsi
callq 0x119090
leaq 0xae0(%rsp), %rdi
movq %rsp, %rbx
movq %rbx, %rsi
callq 0x11cd10
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1b935b(%rip), %rsi    # 0x2d58e5
leaq 0x1b9357(%rip), %rdx    # 0x2d58e8
leaq 0x68(%rsp), %rdi
callq 0x11ca9a
leaq 0x1b8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x11ce98
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1b9278(%rip), %rsi    # 0x2d5835
leaq 0x1b9272(%rip), %rdx    # 0x2d5836
leaq 0x8(%rsp), %rdi
callq 0x11ca9a
leaq 0x38(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x1b96b2(%rip), %rsi    # 0x2d5c90
leaq 0x1b96ac(%rip), %rdx    # 0x2d5c91
leaq 0x28(%rsp), %rdi
callq 0x11ca9a
leaq 0x1f8(%rsp), %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x12c202
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x12c202
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x1b92c8(%rip), %rsi    # 0x2d58e9
leaq 0x1b93c1(%rip), %rdx    # 0x2d59e9
leaq 0x48(%rsp), %rdi
callq 0x11ca9a
leaq 0x1d8(%rsp), %r12
leaq 0x48(%rsp), %rsi
movq %r12, %rdi
callq 0x119520
leaq 0x1410(%rsp), %r15
leaq 0x1b8(%rsp), %rsi
movq %r15, %rdi
callq 0x1224e2
leaq 0x1418(%rsp), %rcx
cmpq %rax, %rcx
jne 0x11c719
leaq 0xae0(%rsp), %rdi
leaq 0x1b8(%rsp), %rsi
movq %r12, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x121240
testb %al, %al
je 0x11c719
leaq 0x1b8(%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 0x1440(%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 0x122112
movq (%rax), %r12
leaq 0x1b8(%rsp), %rsi
movq %r15, %rdi
callq 0x122466
movq %r12, %rdi
movq %rax, %rsi
callq 0x12218e
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x11c730
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x119090
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
leaq 0x18(%rsp), %r15
je 0x11c74c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x119090
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x11c763
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x119090
movq %r14, %rdi
callq 0x12c49c
leaq 0x1e8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11c78c
movq 0x1e8(%rsp), %rsi
incq %rsi
callq 0x119090
leaq 0x1c8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
leaq 0x78(%rsp), %r14
je 0x11c7b2
movq 0x1c8(%rsp), %rsi
incq %rsi
callq 0x119090
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x11c7c9
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x119090
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x1b9212(%rip), %rsi    # 0x2d59ea
leaq 0x1b930b(%rip), %rdx    # 0x2d5aea
callq 0x11ca9a
leaq 0x28(%rsp), %rdi
callq 0x11cf72
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %rax
subq %rcx, %rax
je 0x11c849
sarq $0x3, %rax
cmpq $0x1, %rax
movq %rax, %rsi
adcq $0x0, %rsi
cmpq %rbx, %rcx
je 0x11c856
movq (%rsp), %rdx
cmpq (%rcx), %rdx
je 0x11c856
addq $0x8, %rcx
movl $0x1, %edi
subq %rsi, %rdi
xorl %esi, %esi
cmpq %rsi, %rdi
je 0x11c849
decq %rsi
cmpq %rbx, %rcx
je 0x11c841
leaq 0x8(%rcx), %r8
cmpq (%rcx), %rdx
movq %r8, %rcx
jne 0x11c828
negq %rsi
cmpq %rax, %rsi
jb 0x11c856
leaq 0x30(%rsp), %rdi
movq %rsp, %rsi
callq 0x12c70e
leaq 0x68(%rsp), %rdi
movl $0x7f, %esi
callq 0x11d00c
leaq 0x1b8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x11d10c
leaq 0x168(%rsp), %rdi
callq 0x12c8f4
leaq 0x138(%rsp), %rdi
callq 0x12c8f4
leaq 0x108(%rsp), %rdi
callq 0x12c8f4
leaq 0xd8(%rsp), %rdi
callq 0x12c8f4
leaq 0xa8(%rsp), %rdi
callq 0x12c8f4
leaq 0x78(%rsp), %rdi
callq 0x12c8f4
leaq 0x598(%rsp), %rax
movb $0x1, -0x18(%rax)
movq %rax, -0x8(%rax)
leaq 0x1b8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x11d930
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0x1b8(%rsp), %rdi
callq 0x11e302
leaq 0x28(%rsp), %rdi
callq 0x11e5c4
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x11c926
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x119090
leaq 0xae0(%rsp), %rdi
callq 0x11e612
movq %rsp, %rdi
callq 0x11e674
addq $0x14c8, %rsp           # imm = 0x14C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x11c95e
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x11d8e8
jmp 0x11c9d2
movq %rax, %rbx
jmp 0x11c9d2
movq %rax, %rbx
jmp 0x11c9dc
jmp 0x11c987
jmp 0x11c9f6
movq %rax, %rbx
jmp 0x11ca2c
movq %rax, %rbx
jmp 0x11ca48
movq %rax, %rbx
jmp 0x11ca55
movq %rax, %rbx
jmp 0x11ca71
jmp 0x11c9ba
movq %rax, %rbx
movq 0xae0(%rsp), %rdi
cmpq %r14, %rdi
je 0x11ca7e
movq 0xaf0(%rsp), %rsi
incq %rsi
callq 0x119090
jmp 0x11ca7e
movq %rax, %rbx
jmp 0x11ca7e
movq %rax, %rbx
leaq 0x1b8(%rsp), %rdi
callq 0x11e302
leaq 0x28(%rsp), %rdi
callq 0x11e5c4
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x11ca71
movq 0x18(%rsp), %rsi
jmp 0x11ca69
movq %rax, %rbx
jmp 0x11ca15
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x11ca15
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x119090
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x11ca2c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x119090
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x11ca48
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x119090
leaq 0x1b8(%rsp), %rdi
callq 0x11cf32
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x11ca71
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x119090
leaq 0xae0(%rsp), %rdi
callq 0x11e612
movq %rsp, %rdi
callq 0x11e674
movq %rbx, %rdi
callq 0x1192e0