// File: /workspace/github_cpp_makefile_star2_O3/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 $0x48, %rsp
movq %rdx, %rbp
movq %rsi, %r12
movq %rdi, %r15
movq (%rsi), %r14
movq %r14, 0x58(%rdi)
movq %r14, 0x60(%rdi)
movq 0x8(%rsi), %rbx
leaq (%r14,%rbx), %rcx
movq %rcx, 0x68(%rdi)
movl $0x6, 0x28(%rdi)
addq $0x30, %rdi
movq 0x38(%r15), %rdx
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x11c120
testq %r14, %r14
je 0x1905a2
movq %rbx, 0x50(%r15)
movq (%r15), %rsi
movq %r15, %rdi
callq 0x12bf24
movq 0x68(%r15), %rax
cmpq 0x60(%r15), %rax
je 0x1905e5
movq %r15, %rdi
callq 0x190d4c
movq (%r15), %rax
movq 0x8(%r15), %rcx
cmpq %rcx, %rax
je 0x1905d9
movl -0x30(%rcx), %edx
decl %edx
cmpl $0x5, %edx
jb 0x1908f9
movq 0x68(%r15), %rdx
cmpq 0x60(%r15), %rdx
jne 0x1905b7
jmp 0x1905ec
movq (%r15), %rax
movq 0x8(%r15), %rcx
leaq 0x28(%r15), %r14
movq %rax, 0x18(%r15)
movq %rax, 0x20(%r15)
movq %r14, %rbx
cmpq %rax, %rcx
je 0x19060b
leaq 0x30(%rax), %rcx
movq %rcx, 0x18(%r15)
movq %rax, %rbx
movl (%rbx), %eax
movl %eax, 0x70(%r15)
leaq 0x78(%r15), %rdi
leaq 0x8(%rbx), %rsi
movq %rdi, 0x8(%rsp)
callq 0x11c690
movq 0x28(%rbx), %rax
movq %rax, 0x98(%r15)
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x13b3a4(%rip), %rsi    # 0x2cb9e2
leaq 0x13b3a5(%rip), %rdx    # 0x2cb9ea
leaq 0x10(%rsp), %rdi
callq 0x11fa26
cmpl $0x8, 0x70(%r15)
jne 0x190701
movq 0x18(%rsp), %rbx
cmpq 0x80(%r15), %rbx
jne 0x190701
movq %r14, 0x30(%rsp)
movq %rbp, 0x38(%rsp)
movq %r12, 0x40(%rsp)
testq %rbx, %rbx
je 0x1906b7
movq 0x10(%rsp), %r13
movq 0x8(%rsp), %rax
movq (%rax), %r14
xorl %r12d, %r12d
movsbl (%r13,%r12), %edi
callq 0x11c4f0
movl %eax, %ebp
movsbl (%r14,%r12), %edi
callq 0x11c4f0
cmpl %eax, %ebp
jne 0x190903
incq %r12
cmpq %r12, %rbx
jne 0x190690
movq 0x18(%r15), %rax
movq 0x30(%rsp), %r14
movq %r14, %rbx
cmpq %rax, 0x8(%r15)
je 0x1906d4
leaq 0x30(%rax), %rcx
movq %rcx, 0x18(%r15)
movq %rax, %rbx
movl (%rbx), %eax
movl %eax, 0x70(%r15)
leaq 0x8(%rbx), %rsi
movq 0x8(%rsp), %rdi
callq 0x11c690
movq 0x40(%rsp), %r12
movq 0x38(%rsp), %rbp
movq 0x28(%rbx), %rax
movq %rax, 0x98(%r15)
movb $0x1, %bl
jmp 0x190703
xorl %ebx, %ebx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x19071f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x11c0d0
movl $0x8, %eax
testb %bl, %bl
je 0x190a48
movl $0x2, %eax
cmpl $0x8, 0x70(%r15)
jne 0x190a48
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
callq 0x11c690
movq 0x18(%r15), %rax
movq %r14, %rbx
cmpq %rax, 0x8(%r15)
je 0x190761
leaq 0x30(%rax), %rcx
movq %rcx, 0x18(%r15)
movq %rax, %rbx
movl (%rbx), %eax
movl %eax, 0x70(%r15)
leaq 0x8(%rbx), %rsi
movq 0x8(%rsp), %rdi
callq 0x11c690
movq 0x28(%rbx), %rax
movq %rax, 0x98(%r15)
cmpl $0x28, 0x70(%r15)
jne 0x190a43
movq 0x18(%r15), %rax
movq %r14, %rbx
cmpq %rax, 0x8(%r15)
je 0x1907a3
leaq 0x30(%rax), %rcx
movq %rcx, 0x18(%r15)
movq %rax, %rbx
movl (%rbx), %eax
movl %eax, 0x70(%r15)
leaq 0x8(%rbx), %rsi
movq 0x8(%rsp), %rdi
callq 0x11c690
movq 0x28(%rbx), %rax
movq %rax, 0x98(%r15)
movl 0x70(%r15), %eax
cmpl $0x29, %eax
jne 0x190919
movq 0x18(%r15), %rax
movq %r14, %rbx
cmpq %rax, 0x8(%r15)
je 0x1907e7
leaq 0x30(%rax), %rcx
movq %rcx, 0x18(%r15)
movq %rax, %rbx
movl (%rbx), %eax
movl %eax, 0x70(%r15)
leaq 0x8(%rbx), %rsi
movq 0x8(%rsp), %rdi
callq 0x11c690
movq 0x28(%rbx), %rax
movq %rax, 0x98(%r15)
cmpl $0x7b, 0x70(%r15)
jne 0x190a43
movq %rbp, 0x38(%rsp)
xorl %ebx, %ebx
movl $0x7b, %ecx
movq %rax, 0x30(%rsp)
movq %rax, %rdx
movq 0x8(%r15), %rax
movq 0x18(%r15), %rbp
cmpl $0x7d, %ecx
je 0x190875
cmpl $0x7b, %ecx
jne 0x1908bf
movq %r14, %r13
cmpq %rbp, %rax
je 0x19084e
leaq 0x30(%rbp), %rax
movq %rax, 0x18(%r15)
movq %rbp, %r14
movl (%r14), %eax
movl %eax, 0x70(%r15)
leaq 0x8(%r14), %rsi
movq 0x8(%rsp), %rdi
callq 0x11c690
movq 0x28(%r14), %rax
movq %rax, 0x98(%r15)
incl %ebx
movq %r13, %r14
jmp 0x1908f0
movq %rdx, 0x40(%rsp)
movq %r12, %r13
movq %r14, %r12
cmpq %rbp, %rax
je 0x190890
leaq 0x30(%rbp), %rax
movq %rax, 0x18(%r15)
movq %rbp, %r14
movl (%r14), %eax
movl %eax, 0x70(%r15)
leaq 0x8(%r14), %rsi
movq 0x8(%rsp), %rdi
callq 0x11c690
movq 0x28(%r14), %rax
movq %rax, 0x98(%r15)
decl %ebx
movq %r12, %r14
movq %r13, %r12
jne 0x1908f0
jmp 0x190a57
cmpq %rbp, %rax
je 0x190a43
leaq 0x30(%rbp), %rax
movq %rax, 0x18(%r15)
movl (%rbp), %eax
movl %eax, 0x70(%r15)
leaq 0x8(%rbp), %rsi
movq 0x8(%rsp), %rdi
callq 0x11c690
movq 0x28(%rbp), %rax
movq %rax, 0x98(%r15)
movl 0x70(%r15), %ecx
jmp 0x190822
movl $0x4, %eax
jmp 0x190a48
xorl %ebx, %ebx
movq 0x40(%rsp), %r12
movq 0x38(%rsp), %rbp
movq 0x30(%rsp), %r14
jmp 0x190703
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
cmpl $0x8, %eax
jne 0x190a39
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq 0x8(%rsp), %rsi
callq 0x190d0e
movq 0x18(%r15), %rax
movq %r14, %rbx
cmpq %rax, 0x8(%r15)
je 0x19095d
leaq 0x30(%rax), %rcx
movq %rcx, 0x18(%r15)
movq %rax, %rbx
movl (%rbx), %eax
movl %eax, 0x70(%r15)
leaq 0x8(%rbx), %rsi
movq 0x8(%rsp), %rdi
callq 0x11c690
movq 0x28(%rbx), %rax
movq %rax, 0x98(%r15)
movl 0x70(%r15), %eax
cmpl $0x2c, %eax
jne 0x1909c9
movq 0x18(%r15), %rax
movq %r14, %rbx
cmpq %rax, 0x8(%r15)
je 0x19099d
leaq 0x30(%rax), %rcx
movq %rcx, 0x18(%r15)
movq %rax, %rbx
movl (%rbx), %eax
movl %eax, 0x70(%r15)
leaq 0x8(%rbx), %rsi
movq 0x8(%rsp), %rdi
callq 0x11c690
movq 0x28(%rbx), %rax
movq %rax, 0x98(%r15)
cmpl $0x8, 0x70(%r15)
je 0x190938
jmp 0x190a39
cmpl $0x29, %eax
jne 0x190a39
movq 0x18(%r15), %rax
movq %r14, %rbx
cmpq %rax, 0x8(%r15)
je 0x1909e6
leaq 0x30(%rax), %rcx
movq %rcx, 0x18(%r15)
movq %rax, %rbx
movl (%rbx), %eax
movl %eax, 0x70(%r15)
leaq 0x8(%rbx), %rsi
movq 0x8(%rsp), %rdi
callq 0x11c690
movq 0x28(%rbx), %rax
movq %rax, 0x98(%r15)
leaq 0x10(%rsp), %rdi
movq 0x10(%rdi), %rax
movups 0x40(%rbp), %xmm0
movq 0x50(%rbp), %rcx
movq %rcx, 0x10(%rdi)
movaps (%rdi), %xmm1
movaps %xmm0, (%rdi)
movups %xmm1, 0x40(%rbp)
movq %rax, 0x50(%rbp)
callq 0x1833d2
movq 0x98(%r15), %rax
jmp 0x190806
leaq 0x10(%rsp), %rdi
callq 0x1833d2
movl $0x2, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x40(%rsp), %rbx
movq %rbx, %rcx
movq 0x30(%rsp), %rdx
subq %rdx, %rcx
incq %rcx
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x11c5f0
movq 0x38(%rsp), %rdi
addq $0x20, %rdi
movq %r15, %rsi
callq 0x11c320
movq (%r15), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x190aa5
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x11c0d0
incq %rbx
movq 0x8(%r12), %rcx
subq %rbx, %rcx
jbe 0x190aec
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x11c5f0
movq %r12, %rdi
movq %r14, %rsi
callq 0x11c320
movq (%r14), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x190afb
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x11c0d0
jmp 0x190afb
leaq 0x13b0e6(%rip), %rsi    # 0x2cbbd9
movq %r12, %rdi
callq 0x11c270
movl $0x1, %eax
jmp 0x190a48
jmp 0x190b2a
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x190b3c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x11c0d0
jmp 0x190b3c
jmp 0x190b2a
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1833d2
jmp 0x190b3c
movq %rax, %rbx
movq %rbx, %rdi
callq 0x11c3c0