// File: /workspace/github_cpp_makefile_star2_O3/ArashPartow[P]exprtk-extras/exprtk_repl.cpp
// Function: expression_processor<double>::process_function_definition(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
void process_function_definition(const std::string& func_def_header, bool read_stdin = true)
   {
      std::string func_def = func_def_header;

      if (read_stdin)
      {
         func_def += read_from_stdin();

         if (!func_def.empty() && ('$' == func_def[0]))
            func_def.erase(func_def.begin());
      }

      do
      {
         function_definition fd;

         func_parse_result fp_result = parse_function_definition(func_def,fd);

         if (e_parse_success == fp_result)
         {
            std::string vars;

            for (std::size_t i = 0; i < fd.var_list.size(); ++i)
            {
               vars += fd.var_list[i] + ((i < fd.var_list.size() - 1) ? "," : "");
            }

            function_t f(fd.name);

            for (std::size_t i = 0; i < fd.var_list.size(); ++i)
            {
               f.var(fd.var_list[i]);
            }

            f.expression(fd.body);

            if (function_symbol_table_.get_function(fd.name))
            {
               function_symbol_table_.remove_function(fd.name);

               for (std::size_t i = 0; i < func_def_list_.size(); ++i)
               {
                  if (exprtk::details::imatch(fd.name, func_def_list_[i].name))
                  {
                     func_def_list_.erase(func_def_list_.begin() + i);

                     break;
                  }
               }
            }

            if (!compositor_.add(f,true))
            {
               function_symbol_table_.remove_function(fd.name);

               printf("Error - Failed to add function: %s\n",fd.name.c_str());

               return;
            }

            printf("Function[%02d]\n",static_cast<int>(func_def_list_.size()));
            printf("Name: %s      \n",fd.name.c_str()                        );
            printf("Vars: (%s)    \n",vars.c_str()                           );
            printf("------------------------------------------------------\n");

            func_def_list_.push_back(fd);
         }
         else if (e_parse_notfunc != fp_result)
         {
            printf("Error - Critical parsing error - partial parse occurred\n");
            return;
         }
         else
            break;
      }
      while (!func_def.empty());

      if (!func_def.empty())
      {
         process(func_def);
      }
   }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movl %edx, %ebp
movq %rdi, %rbx
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x2bf986
testl %ebp, %ebp
movq %rbx, %rbp
je 0x18f679
leaq 0x108(%rsp), %rdi
movq %rbp, %rsi
callq 0x19016c
movq 0x108(%rsp), %rsi
movq 0x110(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x11c450
leaq 0x118(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x18f656
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x11c0d0
cmpq $0x0, 0x10(%rsp)
je 0x18f679
movq 0x8(%rsp), %rax
cmpb $0x24, (%rax)
jne 0x18f679
leaq 0x8(%rsp), %rdi
movl $0x1, %edx
xorl %esi, %esi
callq 0x11c580
leaq 0x118(%rsp), %r15
leaq 0x148(%rsp), %r12
leaq 0x1fa8(%rbp), %rax
movq %rax, 0xa0(%rsp)
leaq 0x948(%rbp), %rax
movq %rax, 0xe0(%rsp)
leaq 0x108(%rsp), %r14
movq %rbp, 0x38(%rsp)
leaq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
xorl %ecx, %ecx
movq %rcx, 0x48(%rsp)
movb %cl, 0x50(%rsp)
leaq 0x70(%rsp), %rax
movq %rax, 0x60(%rsp)
movq %rcx, 0x68(%rsp)
movb %cl, 0x70(%rsp)
leaq 0x80(%rsp), %rax
movq %rcx, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %rbp, %rdi
leaq 0x8(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x190344
cmpl $0x8, %eax
je 0x18f99a
cmpl $0x1, %eax
jne 0x18f9a5
leaq 0xb8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq $0x0, 0xb0(%rsp)
movb $0x0, 0xb8(%rsp)
movq 0x80(%rsp), %rax
movq 0x88(%rsp), %rbp
subq %rax, %rbp
je 0x18f7f8
sarq $0x5, %rbp
movl $0x8, %r13d
xorl %ebx, %ebx
movq %r15, 0x108(%rsp)
movq -0x8(%rax,%r13), %rsi
movq (%rax,%r13), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x2bf986
decq %rbp
cmpq %rbp, %rbx
leaq 0x13c455(%rip), %rsi    # 0x2cbbd9
leaq 0x13a1da(%rip), %rax    # 0x2c9965
cmovbq %rax, %rsi
movq %r14, %rdi
callq 0x11c3d0
movq 0x108(%rsp), %rsi
movq 0x110(%rsp), %rdx
leaq 0xa8(%rsp), %rdi
callq 0x11c450
movq 0x108(%rsp), %rdi
cmpq %r15, %rdi
je 0x18f7d1
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x11c0d0
incq %rbx
movq 0x80(%rsp), %rax
movq 0x88(%rsp), %rbp
subq %rax, %rbp
sarq $0x5, %rbp
addq $0x20, %r13
cmpq %rbp, %rbx
jb 0x18f75b
movq %r14, %rdi
leaq 0x40(%rsp), %rsi
callq 0x19044e
movq 0x38(%rsp), %rbp
movq 0x80(%rsp), %rsi
cmpq %rsi, 0x88(%rsp)
je 0x18f84f
xorl %ebx, %ebx
xorl %r13d, %r13d
addq %rbx, %rsi
movq %r12, %rdi
callq 0x1923e8
incq %r13
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
addq $0x20, %rbx
cmpq %rax, %r13
jb 0x18f821
leaq 0x128(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x11c690
movq 0x18(%rbp), %rax
testq %rax, %rax
je 0x18f8ff
movq 0x8(%rax), %rbx
testq %rbx, %rbx
je 0x18f8ff
movq 0x48(%rsp), %rax
testq %rax, %rax
je 0x18f8ff
movq 0x40(%rsp), %rcx
movb (%rcx), %dl
andb $-0x21, %dl
addb $-0x41, %dl
cmpb $0x19, %dl
ja 0x18f8ff
cmpq $0x1, %rax
je 0x18f8de
leaq -0x1(%rax), %rdx
movl $0x1, %esi
movb (%rcx,%rsi), %dil
cmpb $0x5f, %dil
je 0x18f8d6
leal -0x30(%rdi), %r8d
cmpb $0xa, %r8b
jb 0x18f8d6
movl %edi, %r8d
andb $-0x21, %r8b
addb $-0x41, %r8b
cmpb $0x1a, %r8b
jb 0x18f8d6
cmpq %rdx, %rsi
jae 0x18f8ff
cmpb $0x2e, %dil
jne 0x18f8ff
incq %rsi
cmpq %rsi, %rax
jne 0x18f8a6
leaq 0x1f0(%rbx), %rdi
leaq 0x40(%rsp), %rsi
callq 0x18b788
addq $0x1f8, %rbx            # imm = 0x1F8
cmpq %rax, %rbx
je 0x18fade
movq 0xe0(%rsp), %rdi
movq %r14, %rsi
leaq 0x128(%rsp), %rdx
movq %r12, %rcx
movl $0x1, %r8d
callq 0x1927e6
testb %al, %al
je 0x18f9bc
movq 0x1fb0(%rbp), %rax
subq 0x1fa8(%rbp), %rax
shrq $0x3, %rax
imull $0xba2e8ba3, %eax, %esi # imm = 0xBA2E8BA3
xorl %r13d, %r13d
leaq 0x137aa3(%rip), %rdi    # 0x2c73ed
xorl %eax, %eax
callq 0x11c090
movq 0x40(%rsp), %rsi
leaq 0x137aa0(%rip), %rdi    # 0x2c73fd
xorl %eax, %eax
callq 0x11c090
movq 0xa8(%rsp), %rsi
leaq 0x137a9a(%rip), %rdi    # 0x2c740d
xorl %eax, %eax
callq 0x11c090
leaq 0x13c350(%rip), %rdi    # 0x2cbcd1
callq 0x11c620
movq 0xa0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x1904e8
jmp 0x18fa10
movl $0x2, %r13d
jmp 0x18fa7f
leaq 0x13c2ed(%rip), %rdi    # 0x2cbc99
callq 0x11c620
movl $0x1, %r13d
jmp 0x18fa7f
movq 0x18(%rbp), %rax
testq %rax, %rax
je 0x18f9f7
movq 0x8(%rax), %rbx
testq %rbx, %rbx
je 0x18f9f7
leaq 0x38(%rbx), %r13
movq %r13, %rdi
leaq 0x40(%rsp), %rsi
callq 0x18c778
leaq 0x40(%rbx), %rcx
cmpq %rax, %rcx
je 0x18f9f7
movq %r13, %rdi
movq %rax, %rsi
callq 0x192682
decq 0x68(%rbx)
movq 0x40(%rsp), %rsi
leaq 0x1379c6(%rip), %rdi    # 0x2c73c9
xorl %eax, %eax
callq 0x11c090
movl $0x1, %r13d
movq %r12, %rdi
callq 0x2be4ec
movq 0x128(%rsp), %rdi
leaq 0x138(%rsp), %rax
cmpq %rax, %rdi
je 0x18fa3d
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x11c0d0
movq 0x108(%rsp), %rdi
cmpq %r15, %rdi
je 0x18fa5a
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x11c0d0
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x18fa7f
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x11c0d0
leaq 0x80(%rsp), %rdi
callq 0x1833d2
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x18faa8
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x11c0d0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x18fac4
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x11c0d0
testl %r13d, %r13d
jne 0x18fc58
cmpq $0x0, 0x10(%rsp)
jne 0x18f6b4
jmp 0x18fcb6
movq 0x18(%rbp), %rax
movq 0x8(%rax), %rbx
leaq 0x38(%rbx), %rdi
leaq 0x40(%rsp), %rsi
callq 0x18bc4a
addq $0x40, %rbx
cmpq %rax, %rbx
je 0x18f8ff
cmpq $0x0, 0x48(%rax)
je 0x18f8ff
movq 0x18(%rbp), %rax
testq %rax, %rax
je 0x18fb47
movq 0x8(%rax), %rbx
testq %rbx, %rbx
je 0x18fb47
leaq 0x38(%rbx), %r13
movq %r13, %rdi
leaq 0x40(%rsp), %rsi
callq 0x18c778
leaq 0x40(%rbx), %rcx
cmpq %rax, %rcx
je 0x18fb47
movq %r13, %rdi
movq %rax, %rsi
callq 0x192682
decq 0x68(%rbx)
movq 0x1fa8(%rbp), %rax
movq 0x1fb0(%rbp), %rcx
movq %rax, 0x98(%rsp)
subq %rax, %rcx
je 0x18f8ff
sarq $0x3, %rcx
movabsq $0x2e8ba2e8ba2e8ba3, %rax # imm = 0x2E8BA2E8BA2E8BA3
imulq %rax, %rcx
movq 0x40(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x30(%rsp)
cmpq $0x1, %rcx
adcq $0x0, %rcx
movq %rcx, 0xc8(%rsp)
xorl %eax, %eax
movq %rax, 0xd0(%rsp)
imulq $0x58, %rax, %rdx
movq 0x98(%rsp), %rax
movq 0x30(%rsp), %rcx
movq %rdx, 0x28(%rsp)
cmpq 0x8(%rax,%rdx), %rcx
jne 0x18fc19
movq 0x28(%rsp), %rax
addq 0x98(%rsp), %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x18fc3c
movq 0x28(%rsp), %rax
movq (%rax), %rbp
xorl %ebx, %ebx
movq 0xd8(%rsp), %rax
movsbl (%rax,%rbx), %edi
callq 0x11c4f0
movl %eax, %r13d
movsbl (%rbp,%rbx), %edi
callq 0x11c4f0
cmpl %eax, %r13d
jne 0x18fc19
incq %rbx
cmpq %rbx, 0x30(%rsp)
jne 0x18fbea
jmp 0x18fc3c
movq 0xd0(%rsp), %rax
incq %rax
cmpq 0xc8(%rsp), %rax
movq 0x38(%rsp), %rbp
jne 0x18fba1
jmp 0x18f8ff
movq 0xa0(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x1926bc
movq 0x38(%rsp), %rbp
jmp 0x18f8ff
cmpl $0x2, %r13d
jne 0x18fcb6
movq 0x10(%rsp), %rdx
testq %rdx, %rdx
je 0x18fcb6
leaq 0xf8(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x8(%rsp), %rsi
addq %rsi, %rdx
leaq 0xe8(%rsp), %rdi
callq 0x2bf986
leaq 0xe8(%rsp), %rsi
movq %rbp, %rdi
callq 0x121146
movq 0xe8(%rsp), %rdi
cmpq %r14, %rdi
je 0x18fcb6
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x11c0d0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x18fcd2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x11c0d0
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x18fd5e
jmp 0x18fd44
movq %rax, %rbx
movq 0xe8(%rsp), %rdi
cmpq %r14, %rdi
je 0x18fd0d
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x11c0d0
jmp 0x18fd0d
movq %rax, %rbx
leaq 0x18(%rsp), %r14
jmp 0x18fdc4
movq %rax, %rbx
leaq 0x118(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x18fdc4
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x11c0d0
jmp 0x18fdc4
movq %rax, %rbx
jmp 0x18fdc4
jmp 0x18fd57
jmp 0x18fd5e
movq %rax, %rbx
leaq 0x18(%rsp), %r14
jmp 0x18fdba
movq %rax, %rbx
jmp 0x18fd90
jmp 0x18fd70
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
callq 0x190512
jmp 0x18fd90
movq %rax, %rbx
movq 0x108(%rsp), %rdi
cmpq %r15, %rdi
je 0x18fd90
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x11c0d0
leaq 0x18(%rsp), %r14
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x18fdba
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x11c0d0
leaq 0x40(%rsp), %rdi
callq 0x18f244
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x18fddb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x11c0d0
movq %rbx, %rdi
callq 0x11c3c0
nop