// File: /workspace/github_cpp_makefile_star2_O1/ArashPartow[P]exprtk-extras/exprtk_repl.cpp
// Function: expression_processor<double>::parse_function_definition_impl::process(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, expression_processor<double>::function_definition&)
func_parse_result process(std::string& func_def, function_definition& fd)
      {
         if (!init(func_def))
            return e_parse_lexfail;

         if (!token_is(token_t::e_symbol,"function"))
            return e_parse_notfunc;

         if (!token_is(token_t::e_symbol,prsrhlpr_t::e_hold))
            return e_parse_partial;

         fd.name = current_token().value;

         next_token();

         if (!token_is(token_t::e_lbracket))
            return e_parse_partial;

         if (!token_is(token_t::e_rbracket))
         {
            std::vector<std::string> var_list;

            for ( ; ; )
            {
               // (x,y,z,....w)
               if (!token_is(token_t::e_symbol,prsrhlpr_t::e_hold))
                  return e_parse_partial;

               var_list.push_back(current_token().value);

               next_token();

               if (token_is(token_t::e_rbracket))
                  break;

               if (!token_is(token_t::e_comma))
                  return e_parse_partial;
            }

            var_list.swap(fd.var_list);
         }

         const std::size_t body_begin = current_token().position;
               std::size_t body_end   = current_token().position;

         int bracket_stack = 0;

         if (!token_is(token_t::e_lcrlbracket,prsrhlpr_t::e_hold))
            return e_parse_partial;

         for ( ; ; )
         {
            body_end = current_token().position;

            if (token_is(token_t::e_lcrlbracket))
               bracket_stack++;
            else if (token_is(token_t::e_rcrlbracket))
            {
               if (0 == --bracket_stack)
                  break;
            }
            else
            {
               if (lexer().finished())
                  return e_parse_partial;

               next_token();
            }
         }

         const std::size_t size = body_end - body_begin + 1;

         fd.body = func_def.substr(body_begin,size);

         const std::size_t index = body_begin + size;

         if (index < func_def.size())
            func_def = func_def.substr(index,func_def.size() - index);
         else
            func_def = "";

         return e_parse_success;
      }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %r15
callq 0x1aa938
movl $0x4, %ebp
testb %al, %al
je 0x1aa6b1
leaq 0x20(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x145633(%rip), %rsi    # 0x2ef9a8
leaq 0x145634(%rip), %rdx    # 0x2ef9b0
leaq 0x10(%rsp), %rdi
callq 0x121a7e
cmpl $0x8, 0x70(%r15)
jne 0x1aa46a
movq 0x18(%rsp), %rcx
cmpq 0x80(%r15), %rcx
jne 0x1aa46a
leaq 0x78(%r15), %rdi
testq %rcx, %rcx
sete %al
je 0x1aa445
movq %rcx, 0x8(%rsp)
movq %r12, 0x48(%rsp)
movq 0x10(%rsp), %r14
movq %rdi, 0x40(%rsp)
movq (%rdi), %r12
movsbl (%r14), %edi
callq 0x11e4f0
movl %eax, %ebp
movsbl (%r12), %edi
callq 0x11e4f0
cmpl %eax, %ebp
jne 0x1aa41a
movq %r13, 0x38(%rsp)
movq 0x8(%rsp), %rax
leaq -0x1(%rax), %rbx
xorl %r13d, %r13d
cmpq %r13, %rbx
je 0x1aa424
movsbl 0x1(%r14,%r13), %edi
callq 0x11e4f0
movl %eax, %ebp
movsbl 0x1(%r12,%r13), %edi
callq 0x11e4f0
incq %r13
cmpl %eax, %ebp
je 0x1aa3f4
jmp 0x1aa429
xorl %r14d, %r14d
movq 0x48(%rsp), %r12
jmp 0x1aa46d
movq 0x8(%rsp), %r13
cmpq 0x8(%rsp), %r13
setae %al
movq 0x48(%rsp), %r12
leaq 0x20(%rsp), %rbx
movq 0x38(%rsp), %r13
movq 0x40(%rsp), %rdi
testb %al, %al
je 0x1aa46a
movq %r13, %rbp
movq %rbx, %r13
movq 0x18(%r15), %rbx
cmpq %rbx, 0x8(%r15)
je 0x1aa559
leaq 0x30(%rbx), %rax
movq %rax, 0x18(%r15)
jmp 0x1aa55d
xorl %r14d, %r14d
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1aa484
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x11e0d0
movl $0x8, %ebp
testb %r14b, %r14b
je 0x1aa6b1
movl $0x2, %ebp
cmpl $0x8, 0x70(%r15)
jne 0x1aa6b1
movq %r12, 0x48(%rsp)
leaq 0x78(%r15), %r12
movq %r13, %rdi
movq %r12, %rsi
callq 0x11e690
movq 0x18(%r15), %rbx
cmpq %rbx, 0x8(%r15)
je 0x1aa4ca
leaq 0x30(%rbx), %rax
movq %rax, 0x18(%r15)
jmp 0x1aa4ce
leaq 0x28(%r15), %rbx
movl (%rbx), %eax
movl %eax, 0x70(%r15)
leaq 0x8(%rbx), %rsi
movq %r12, %rdi
callq 0x11e690
movq 0x28(%rbx), %rax
movq %rax, 0x98(%r15)
movl 0x70(%r15), %ebx
cmpl $0x28, %ebx
jne 0x1aa6b1
movq 0x18(%r15), %r14
cmpq %r14, 0x8(%r15)
je 0x1aa50c
leaq 0x30(%r14), %rax
movq %rax, 0x18(%r15)
jmp 0x1aa510
leaq 0x28(%r15), %r14
movl (%r14), %eax
movl %eax, 0x70(%r15)
leaq 0x8(%r14), %rsi
movq %r12, %rdi
callq 0x11e690
movq 0x28(%r14), %rax
movq %rax, 0x98(%r15)
cmpl $0x28, %ebx
jne 0x1aa6b1
movl 0x70(%r15), %ebx
cmpl $0x29, %ebx
movq %r13, 0x38(%rsp)
jne 0x1aa5b0
movq 0x18(%r15), %r14
cmpq %r14, 0x8(%r15)
je 0x1aa585
leaq 0x30(%r14), %rax
movq %rax, 0x18(%r15)
jmp 0x1aa589
leaq 0x28(%r15), %rbx
movl (%rbx), %eax
movl %eax, 0x70(%r15)
leaq 0x8(%rbx), %rsi
callq 0x11e690
movq 0x28(%rbx), %rax
movq %rax, 0x98(%r15)
movb $0x1, %r14b
movq %r13, %rbx
movq %rbp, %r13
jmp 0x1aa46d
leaq 0x28(%r15), %r14
movl (%r14), %eax
movl %eax, 0x70(%r15)
leaq 0x8(%r14), %rsi
movq %r12, %rdi
callq 0x11e690
movq 0x28(%r14), %rax
movq %rax, 0x98(%r15)
cmpl $0x29, %ebx
je 0x1aa6f1
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
cmpl $0x8, 0x70(%r15)
jne 0x1aa6a7
leaq 0x28(%r15), %r13
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x1aabac
movq 0x18(%r15), %rax
movq %r13, %rbx
cmpq %rax, 0x8(%r15)
je 0x1aa5f5
leaq 0x30(%rax), %rcx
movq %rcx, 0x18(%r15)
movq %rax, %rbx
movl (%rbx), %eax
movl %eax, 0x70(%r15)
leaq 0x8(%rbx), %rsi
movq %r12, %rdi
callq 0x11e690
movq 0x28(%rbx), %rax
movq %rax, 0x98(%r15)
movl 0x70(%r15), %r14d
cmpl $0x29, %r14d
jne 0x1aa657
movq 0x18(%r15), %rax
movq %r13, %rbx
cmpq %rax, 0x8(%r15)
je 0x1aa634
leaq 0x30(%rax), %rcx
movq %rcx, 0x18(%r15)
movq %rax, %rbx
movl (%rbx), %eax
movl %eax, 0x70(%r15)
leaq 0x8(%rbx), %rsi
movq %r12, %rdi
callq 0x11e690
movq 0x28(%rbx), %rax
movq %rax, 0x98(%r15)
cmpl $0x29, %r14d
je 0x1aa6c2
movl 0x70(%r15), %r14d
cmpl $0x2c, %r14d
jne 0x1aa6a7
movq 0x18(%r15), %rax
movq %r13, %rbx
cmpq %rax, 0x8(%r15)
je 0x1aa679
leaq 0x30(%rax), %rcx
movq %rcx, 0x18(%r15)
movq %rax, %rbx
movl (%rbx), %eax
movl %eax, 0x70(%r15)
leaq 0x8(%rbx), %rsi
movq %r12, %rdi
callq 0x11e690
movq 0x28(%rbx), %rax
movq %rax, 0x98(%r15)
cmpl $0x2c, %r14d
jne 0x1aa6a7
cmpl $0x8, 0x70(%r15)
je 0x1aa5d0
leaq 0x10(%rsp), %rdi
callq 0x19be2c
movl %ebp, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10(%rsp), %rdi
movq 0x10(%rdi), %rax
movq 0x38(%rsp), %r13
movups 0x40(%r13), %xmm0
movq 0x50(%r13), %rcx
movq %rcx, 0x10(%rdi)
movaps (%rdi), %xmm1
movaps %xmm0, (%rdi)
movups %xmm1, 0x40(%r13)
movq %rax, 0x50(%r13)
callq 0x19be2c
cmpl $0x7b, 0x70(%r15)
jne 0x1aa6b1
movq 0x98(%r15), %rax
movq %rax, 0x50(%rsp)
leaq 0x28(%r15), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x40(%rsp)
movq 0x98(%r15), %r13
movl 0x70(%r15), %ebx
cmpl $0x7b, %ebx
jne 0x1aa762
movq 0x18(%r15), %rax
movq 0x8(%rsp), %r14
cmpq %rax, 0x8(%r15)
je 0x1aa73f
leaq 0x30(%rax), %rcx
movq %rcx, 0x18(%r15)
movq %rax, %r14
movl (%r14), %eax
movl %eax, 0x70(%r15)
leaq 0x8(%r14), %rsi
movq %r12, %rdi
callq 0x11e690
movq 0x28(%r14), %rax
movq %rax, 0x98(%r15)
cmpl $0x7b, %ebx
je 0x1aa7e0
movl 0x70(%r15), %ebx
cmpl $0x7d, %ebx
jne 0x1aa7a8
movq 0x18(%r15), %rax
movq 0x8(%rsp), %r14
cmpq %rax, 0x8(%r15)
je 0x1aa785
leaq 0x30(%rax), %rcx
movq %rcx, 0x18(%r15)
movq %rax, %r14
movl (%r14), %eax
movl %eax, 0x70(%r15)
leaq 0x8(%r14), %rsi
movq %r12, %rdi
callq 0x11e690
movq 0x28(%r14), %rax
movq %rax, 0x98(%r15)
cmpl $0x7d, %ebx
je 0x1aa7e9
movq 0x18(%r15), %rbx
cmpq %rbx, 0x8(%r15)
je 0x1aa6b1
leaq 0x30(%rbx), %rax
movq %rax, 0x18(%r15)
movl (%rbx), %eax
movl %eax, 0x70(%r15)
leaq 0x8(%rbx), %rsi
movq %r12, %rdi
callq 0x11e690
movq 0x28(%rbx), %rax
movq %rax, 0x98(%r15)
jmp 0x1aa715
incl 0x40(%rsp)
jmp 0x1aa715
decl 0x40(%rsp)
jne 0x1aa715
movq %r13, %rcx
movq 0x50(%rsp), %rdx
subq %rdx, %rcx
incq %rcx
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq 0x48(%rsp), %rbx
movq %rbx, %rsi
callq 0x11e5f0
movq 0x38(%rsp), %rdi
addq $0x20, %rdi
movq %r15, %rsi
callq 0x11e320
movq (%r15), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x1aa841
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x11e0d0
incq %r13
movq 0x8(%rbx), %rcx
subq %r13, %rcx
jbe 0x1aa887
movq %r13, %rdx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11e5f0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11e320
movq (%r14), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x1aa896
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x11e0d0
jmp 0x1aa896
leaq 0x145311(%rip), %rsi    # 0x2efb9f
movq %rbx, %rdi
callq 0x11e270
movl $0x1, %ebp
jmp 0x1aa6b1
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x1aa8d2
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x11e0d0
jmp 0x1aa8d2
jmp 0x1aa8c0
jmp 0x1aa8c0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x19be2c
jmp 0x1aa8d2
movq %rax, %rbx
movq %rbx, %rdi
callq 0x11e3c0