// File: /workspace/github_cpp_makefile_star2_O1/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 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x2e41d0
testl %ebp, %ebp
movq %rbx, %rbp
je 0x1a940e
leaq 0x108(%rsp), %rdi
movq %rbp, %rsi
callq 0x1a9ef2
movq 0x108(%rsp), %rsi
movq 0x110(%rsp), %rdx
leaq 0x20(%rsp), %rdi
callq 0x11e450
leaq 0x118(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1a93eb
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x11e0d0
cmpq $0x0, 0x28(%rsp)
je 0x1a940e
movq 0x20(%rsp), %rax
cmpb $0x24, (%rax)
jne 0x1a940e
leaq 0x20(%rsp), %rdi
movl $0x1, %edx
xorl %esi, %esi
callq 0x11e580
leaq 0x118(%rsp), %rbx
leaq 0x1fa8(%rbp), %rax
movq %rax, 0xa8(%rsp)
leaq 0x948(%rbp), %rax
movq %rax, 0xe0(%rsp)
leaq 0x108(%rsp), %r14
movq %rbp, 0x18(%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 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x1aa0ca
cmpl $0x8, %eax
je 0x1a984f
cmpl $0x1, %eax
jne 0x1a985a
leaq 0xc8(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq $0x0, 0xc0(%rsp)
movb $0x0, 0xc8(%rsp)
movq 0x80(%rsp), %rax
movq 0x88(%rsp), %rbp
subq %rax, %rbp
je 0x1a9586
sarq $0x5, %rbp
movl $0x8, %r15d
xorl %r13d, %r13d
movq %rbx, 0x108(%rsp)
movq -0x8(%rax,%r15), %rsi
movq (%rax,%r15), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x2e41d0
decq %rbp
cmpq %rbp, %r13
leaq 0x14668d(%rip), %rsi    # 0x2efb9f
leaq 0x144412(%rip), %rax    # 0x2ed92b
cmovbq %rax, %rsi
movq %r14, %rdi
callq 0x11e3d0
movq 0x108(%rsp), %rsi
movq 0x110(%rsp), %rdx
leaq 0xb8(%rsp), %rdi
callq 0x11e450
movq 0x108(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1a955f
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x11e0d0
incq %r13
movq 0x80(%rsp), %rax
movq 0x88(%rsp), %rbp
subq %rax, %rbp
sarq $0x5, %rbp
addq $0x20, %r15
cmpq %rbp, %r13
jb 0x1a94e9
movq %r14, %rdi
leaq 0x40(%rsp), %rsi
callq 0x1aa238
movq 0x18(%rsp), %rbp
movq 0x80(%rsp), %rsi
cmpq %rsi, 0x88(%rsp)
je 0x1a95e3
xorl %r15d, %r15d
xorl %r13d, %r13d
addq %r15, %rsi
leaq 0x148(%rsp), %rdi
callq 0x1ac350
incq %r13
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
addq $0x20, %r15
cmpq %rax, %r13
jb 0x1a95b0
leaq 0x128(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x11e690
movq 0x18(%rbp), %rax
testq %rax, %rax
je 0x1a9883
movq 0x8(%rax), %r15
testq %r15, %r15
je 0x1a9883
movq 0x48(%rsp), %rax
testq %rax, %rax
je 0x1a9883
movq 0x40(%rsp), %rcx
movb (%rcx), %dl
andb $-0x21, %dl
addb $-0x41, %dl
cmpb $0x19, %dl
ja 0x1a9883
cmpq $0x1, %rax
je 0x1a9684
leaq -0x1(%rax), %rsi
movl $0x1, %edi
xorl %edx, %edx
movb (%rcx,%rdi), %r8b
cmpb $0x5f, %r8b
je 0x1a9674
leal -0x30(%r8), %r9d
cmpb $0xa, %r9b
jb 0x1a9674
movl %r8d, %r9d
andb $-0x21, %r9b
addb $-0x41, %r9b
cmpb $0x1a, %r9b
jb 0x1a9674
cmpq %rsi, %rdi
jae 0x1a967f
cmpb $0x2e, %r8b
jne 0x1a967f
incq %rdi
cmpq %rax, %rdi
setae %dl
jne 0x1a9644
testb $0x1, %dl
je 0x1a96a2
leaq 0x1f0(%r15), %rdi
leaq 0x40(%rsp), %rsi
callq 0x1a43b4
addq $0x1f8, %r15            # imm = 0x1F8
cmpq %rax, %r15
sete %dl
testb $0x1, %dl
je 0x1a9883
movq 0x18(%rbp), %rax
movq 0x8(%rax), %r15
leaq 0x38(%r15), %rdi
leaq 0x40(%rsp), %rsi
callq 0x1a4afe
addq $0x40, %r15
cmpq %rax, %r15
je 0x1a9883
cmpq $0x0, 0x48(%rax)
je 0x1a9883
movq 0x18(%rbp), %rax
testq %rax, %rax
je 0x1a9714
movq 0x8(%rax), %r15
testq %r15, %r15
je 0x1a9714
leaq 0x38(%r15), %r13
movq %r13, %rdi
leaq 0x40(%rsp), %rsi
callq 0x1a5c20
leaq 0x40(%r15), %rcx
cmpq %rax, %rcx
je 0x1a9714
movq %r13, %rdi
movq %rax, %rsi
callq 0x1ac5ea
decq 0x68(%r15)
movq 0x1fa8(%rbp), %rcx
movq 0x1fb0(%rbp), %rdx
subq %rcx, %rdx
je 0x1a9883
sarq $0x3, %rdx
movabsq $0x2e8ba2e8ba2e8ba3, %rax # imm = 0x2E8BA2E8BA2E8BA3
imulq %rax, %rdx
movq 0x40(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
testq %rax, %rax
sete 0xf(%rsp)
cmpq $0x1, %rdx
adcq $0x0, %rdx
xorl %r13d, %r13d
movq %rcx, 0xa0(%rsp)
movq %rdx, 0x98(%rsp)
imulq $0x58, %r13, %rsi
movq 0x10(%rsp), %rax
cmpq 0x8(%rcx,%rsi), %rax
jne 0x1a983c
addq %rcx, %rsi
movb 0xf(%rsp), %al
cmpq $0x0, 0x10(%rsp)
je 0x1a9838
movq (%rsi), %rbp
movq 0xb0(%rsp), %rax
movsbl (%rax), %edi
movq %rsi, 0xd8(%rsp)
callq 0x11e4f0
movl %eax, %r15d
movsbl (%rbp), %edi
callq 0x11e4f0
movq 0x98(%rsp), %rdx
movq 0xa0(%rsp), %rcx
cmpl %eax, %r15d
jne 0x1a983c
movl $0x1, %ecx
movq %rcx, %r12
cmpq %rcx, 0x10(%rsp)
je 0x1a9813
movq 0xb0(%rsp), %rax
movsbl (%rax,%r12), %edi
callq 0x11e4f0
movl %eax, %r15d
movsbl (%rbp,%r12), %edi
callq 0x11e4f0
leaq 0x1(%r12), %rcx
cmpl %eax, %r15d
je 0x1a97df
cmpq 0x10(%rsp), %r12
setae %al
leaq 0x30(%rsp), %r12
movq 0xa0(%rsp), %rcx
movq 0x98(%rsp), %rdx
movq 0xd8(%rsp), %rsi
testb %al, %al
jne 0x1a9871
incq %r13
cmpq %rdx, %r13
movq 0x18(%rsp), %rbp
jne 0x1a9777
jmp 0x1a9883
movl $0x2, %r15d
jmp 0x1a99e7
leaq 0x1463fe(%rip), %rdi    # 0x2efc5f
callq 0x11e620
movl $0x1, %r15d
jmp 0x1a99e7
movq 0xa8(%rsp), %rdi
callq 0x1ac624
movq 0x18(%rsp), %rbp
movq 0xe0(%rsp), %rdi
movq %r14, %rsi
leaq 0x128(%rsp), %rdx
leaq 0x148(%rsp), %rcx
movl $0x1, %r8d
callq 0x1ac76e
testb %al, %al
je 0x1a991f
movq 0x1fb0(%rbp), %rax
subq 0x1fa8(%rbp), %rax
shrq $0x3, %rax
imull $0xba2e8ba3, %eax, %esi # imm = 0xBA2E8BA3
xorl %r15d, %r15d
leaq 0x141ab6(%rip), %rdi    # 0x2eb385
xorl %eax, %eax
callq 0x11e090
movq 0x40(%rsp), %rsi
leaq 0x141ab3(%rip), %rdi    # 0x2eb395
xorl %eax, %eax
callq 0x11e090
movq 0xb8(%rsp), %rsi
leaq 0x141aad(%rip), %rdi    # 0x2eb3a5
xorl %eax, %eax
callq 0x11e090
leaq 0x146391(%rip), %rdi    # 0x2efc97
callq 0x11e620
movq 0xa8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x1aa2d2
jmp 0x1a9973
movq 0x18(%rbp), %rax
testq %rax, %rax
je 0x1a995a
movq 0x8(%rax), %r15
testq %r15, %r15
je 0x1a995a
leaq 0x38(%r15), %r13
movq %r13, %rdi
leaq 0x40(%rsp), %rsi
callq 0x1a5c20
leaq 0x40(%r15), %rcx
cmpq %rax, %rcx
je 0x1a995a
movq %r13, %rdi
movq %rax, %rsi
callq 0x1ac5ea
decq 0x68(%r15)
movq 0x40(%rsp), %rsi
leaq 0x1419fb(%rip), %rdi    # 0x2eb361
xorl %eax, %eax
callq 0x11e090
movl $0x1, %r15d
leaq 0x148(%rsp), %rdi
callq 0x2e2d30
movq 0x128(%rsp), %rdi
leaq 0x138(%rsp), %rax
cmpq %rax, %rdi
je 0x1a99a5
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x11e0d0
movq 0x108(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1a99c2
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x11e0d0
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x1a99e7
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x11e0d0
leaq 0x80(%rsp), %rdi
callq 0x19be2c
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x1a9a10
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x11e0d0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x1a9a2c
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x11e0d0
testl %r15d, %r15d
jne 0x1a9a3f
cmpq $0x0, 0x28(%rsp)
jne 0x1a9441
jmp 0x1a9a45
cmpl $0x2, %r15d
jne 0x1a9a9d
movq 0x28(%rsp), %rdx
testq %rdx, %rdx
je 0x1a9a9d
leaq 0xf8(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq 0x20(%rsp), %rsi
addq %rsi, %rdx
leaq 0xe8(%rsp), %rdi
callq 0x2e41d0
leaq 0xe8(%rsp), %rsi
movq %rbp, %rdi
callq 0x1231e8
movq 0xe8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1a9a9d
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x11e0d0
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x1a9ab4
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x11e0d0
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1a9b29
jmp 0x1a9b14
movq %rax, %r14
movq 0xe8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1a9b8a
movq 0xf8(%rsp), %rsi
jmp 0x1a9b0a
jmp 0x1a9b14
movq %rax, %r14
leaq 0x118(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1a9b8a
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x11e0d0
jmp 0x1a9b8a
movq %rax, %r14
jmp 0x1a9b8a
jmp 0x1a9b22
jmp 0x1a9b29
movq %rax, %r14
jmp 0x1a9b80
movq %rax, %r14
jmp 0x1a9b5b
jmp 0x1a9b3b
movq %rax, %r14
leaq 0x108(%rsp), %rdi
callq 0x1aa2fc
jmp 0x1a9b5b
movq %rax, %r14
movq 0x108(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1a9b5b
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x11e0d0
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x1a9b80
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x11e0d0
leaq 0x40(%rsp), %rdi
callq 0x1a8fe2
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x1a9ba1
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x11e0d0
movq %r14, %rdi
callq 0x11e3c0
nop