// File: /workspace/github_cpp_makefile_star2_O2/ArashPartow[P]exprtk/./exprtk.hpp
// Function: exprtk::details::expression_node<double>* exprtk::parser<double>::simplify<std::allocator<exprtk::details::expression_node<double>*>, std::allocator<bool>, std::vector>(std::vector<exprtk::details::expression_node<double>*, std::allocator<exprtk::details::expression_node<double>*>>&, std::vector<bool, std::allocator<bool>>&, bool)
inline expression_node_ptr simplify(Sequence<expression_node_ptr,Allocator1>& expression_list,
                                          Sequence<bool,Allocator2>& side_effect_list,
                                          const bool specialise_on_final_type = false)
      {
         if (expression_list.empty())
            return error_node();
         else if (1 == expression_list.size())
            return expression_list[0];

         Sequence<expression_node_ptr,Allocator1> tmp_expression_list;

         exprtk_debug(("simplify() - expression_list.size: %d  side_effect_list.size(): %d\n",
                       static_cast<int>(expression_list .size()),
                       static_cast<int>(side_effect_list.size())));

         bool return_node_present = false;

         for (std::size_t i = 0; i < (expression_list.size() - 1); ++i)
         {
            if (is_variable_node(expression_list[i]))
               continue;
            else if (
                      is_return_node  (expression_list[i]) ||
                      is_break_node   (expression_list[i]) ||
                      is_continue_node(expression_list[i])
                    )
            {
               tmp_expression_list.push_back(expression_list[i]);

               // Remove all subexpressions after first short-circuit
               // node has been encountered.

               for (std::size_t j = i + 1; j < expression_list.size(); ++j)
               {
                  free_node(node_allocator_, expression_list[j]);
               }

               return_node_present = true;

               break;
            }
            else if (
                      is_constant_node(expression_list[i]) ||
                      is_null_node    (expression_list[i]) ||
                      !side_effect_list[i]
                    )
            {
               free_node(node_allocator_, expression_list[i]);
               continue;
            }
            else
               tmp_expression_list.push_back(expression_list[i]);
         }

         if (!return_node_present)
         {
            tmp_expression_list.push_back(expression_list.back());
         }

         expression_list.swap(tmp_expression_list);

         if (tmp_expression_list.size() > expression_list.size())
         {
            exprtk_debug(("simplify() - Reduced subexpressions from %d to %d\n",
                          static_cast<int>(tmp_expression_list.size()),
                          static_cast<int>(expression_list    .size())));
         }

         if (
              return_node_present     ||
              side_effect_list.back() ||
              (expression_list.size() > 1)
            )
            state_.activate_side_effect("simplify()");

         if (1 == expression_list.size())
            return expression_list[0];
         else if (specialise_on_final_type && is_generally_string_node(expression_list.back()))
            return expression_generator_.vararg_function(details::e_smulti,expression_list);
         else
            return expression_generator_.vararg_function(details::e_multi,expression_list);
      }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rsi
cmpq %rsi, %rax
je 0x1faef6
movq %rdx, %r12
movq %rsi, %rdx
subq %rax, %rdx
cmpq $0x8, %rdx
jne 0x1faefd
movq (%rax), %rbx
jmp 0x1fb181
xorl %ebx, %ebx
jmp 0x1fb181
movq %rdi, %r14
movl %ecx, 0xc(%rsp)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rcx
andq $0x0, 0x10(%rcx)
movaps %xmm0, (%rcx)
leaq 0x290(%rdi), %r15
pushq $0x8
popq %rbp
xorl %r13d, %r13d
movq %rsi, %rcx
subq %rax, %rcx
sarq $0x3, %rcx
decq %rcx
cmpq %rcx, %r13
jae 0x1fb01c
movq (%rax,%r13,8), %rdi
testq %rdi, %rdi
je 0x1fafad
movq (%rdi), %rax
callq *0x28(%rax)
cmpl $0x11, %eax
je 0x1fb009
movq (%rbx), %rax
movq (%rax,%r13,8), %rdi
testq %rdi, %rdi
je 0x1fafad
movq (%rdi), %rax
callq *0x28(%rax)
cmpl $0xf, %eax
je 0x1fb075
movq (%rbx), %rax
movq (%rax,%r13,8), %rdi
testq %rdi, %rdi
je 0x1fafad
movq (%rdi), %rax
callq *0x28(%rax)
cmpl $0x95, %eax
je 0x1fb075
movq (%rbx), %rax
movq (%rax,%r13,8), %rdi
testq %rdi, %rdi
je 0x1fafad
movq (%rdi), %rax
callq *0x28(%rax)
cmpl $0x96, %eax
je 0x1fb075
movq (%rbx), %rax
movq (%rax,%r13,8), %rdi
jmp 0x1fafaf
xorl %edi, %edi
callq 0x208267
testb %al, %al
jne 0x1faff6
movq (%rbx), %rax
movq (%rax,%r13,8), %rdi
testq %rdi, %rdi
je 0x1fafcf
movq (%rdi), %rax
callq *0x28(%rax)
cmpl $0x1, %eax
je 0x1faff6
movq %r12, %rdi
movq %r13, %rsi
callq 0x2b9c8a
testq %rdx, (%rax)
je 0x1faff6
leaq (,%r13,8), %rsi
addq (%rbx), %rsi
leaq 0x10(%rsp), %rdi
callq 0x1fadc0
jmp 0x1fb009
leaq (,%r13,8), %rsi
addq (%rbx), %rsi
movq %r15, %rdi
callq 0x1ad9c8
incq %r13
movq (%rbx), %rax
movq 0x8(%rbx), %rsi
addq $0x8, %rbp
jmp 0x1faf21
addq $-0x8, %rsi
leaq 0x10(%rsp), %rdi
callq 0x1fadc0
movq 0x10(%rbx), %rax
movaps 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rcx
movq %rcx, 0x10(%rbx)
movups (%rbx), %xmm1
movups %xmm0, (%rbx)
movaps %xmm1, 0x10(%rsp)
movq %rax, 0x20(%rsp)
movq %r12, %rdi
callq 0x2b9ca8
movl 0xc(%rsp), %ebp
testq %rdx, (%rax)
jne 0x1fb0dc
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %rcx, %rdx
subq %rax, %rdx
cmpq $0x8, %rdx
ja 0x1fb0dc
jmp 0x1fb115
leaq (,%r13,8), %rsi
addq (%rbx), %rsi
leaq 0x10(%rsp), %rdi
callq 0x1fadc0
incq %r13
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
movq %rax, %rcx
subq %rsi, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r13
jae 0x1fb0b4
addq %rbp, %rsi
addq $0x8, %rbp
movq %r15, %rdi
callq 0x1ad9c8
jmp 0x1fb08a
movq 0x10(%rbx), %rcx
movaps 0x10(%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x20(%rsp), %rdx
movq %rdx, 0x10(%rbx)
movq %rsi, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq %rcx, 0x20(%rsp)
movl 0xc(%rsp), %ebp
leaq 0xe2f27(%rip), %rsi     # 0x2de00a
leaq 0x28(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x127016
cmpb $0x0, 0x3ac(%r14)
jne 0x1fb104
movb $0x1, 0x3ac(%r14)
leaq 0x28(%rsp), %rdi
callq 0x118648
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %rcx, %rdx
subq %rax, %rcx
cmpq $0x8, %rcx
jne 0x1fb126
movq (%rax), %rbx
jmp 0x1fb177
testb %bpl, %bpl
je 0x1fb157
movq -0x8(%rdx), %rdi
callq 0x20b691
testb %al, %al
je 0x1fb157
addq $0x220, %r14            # imm = 0x220
leaq 0x28(%rsp), %rsi
movl $0x5b, (%rsi)
movq %r14, %rdi
movq %rbx, %rdx
callq 0x207bee
jmp 0x1fb174
addq $0x220, %r14            # imm = 0x220
leaq 0x28(%rsp), %rsi
movl $0x5a, (%rsi)
movq %r14, %rdi
movq %rbx, %rdx
callq 0x207bee
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x29e264
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1fb1a3
jmp 0x1fb1a3
jmp 0x1fb1a3
jmp 0x1fb1a3
jmp 0x1fb1a3
jmp 0x1fb1a3
jmp 0x1fb1a3
jmp 0x1fb1a3
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x29e264
movq %rbx, %rdi
callq 0x118360