// File: /workspace/github_cpp_makefile_star2_O1/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 %rdx, %r15
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
cmpq %rdx, %rax
je 0x271236
subq %rax, %rdx
cmpq $0x8, %rdx
jne 0x27123d
movq (%rax), %rbx
jmp 0x27167a
xorl %ebx, %ebx
jmp 0x27167a
movq %rsi, %rbx
movq %rdi, %r14
movl %ecx, 0x1c(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
subq %rax, %rcx
cmpq $0x8, %rcx
setne %r13b
je 0x271418
movl $0x8, %r12d
movl $0x1, %ebp
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
addq $0x3f, %rcx
movq %rcx, 0x20(%rsp)
movq -0x8(%rax,%r12), %rdi
testq %rdi, %rdi
je 0x2712a6
movq (%rdi), %rax
callq *0x28(%rax)
cmpl $0x11, %eax
je 0x2713ef
movq (%rbx), %rax
movq -0x8(%rax,%r12), %rdi
testq %rdi, %rdi
je 0x2712c2
movq (%rdi), %rax
callq *0x28(%rax)
cmpl $0xf, %eax
je 0x27143e
movq (%rbx), %rax
movq -0x8(%rax,%r12), %rdi
testq %rdi, %rdi
je 0x2712e0
movq (%rdi), %rax
callq *0x28(%rax)
cmpl $0x95, %eax
je 0x27143e
movq (%rbx), %rax
movq -0x8(%rax,%r12), %rdi
testq %rdi, %rdi
je 0x2712fe
movq (%rdi), %rax
callq *0x28(%rax)
cmpl $0x96, %eax
je 0x27143e
movq (%rbx), %rax
movq -0x8(%rax,%r12), %r13
testq %r13, %r13
je 0x27132d
movq (%r13), %rax
movq %r13, %rdi
callq *0x28(%rax)
cmpl $0x2, %eax
je 0x2713aa
movq (%r13), %rax
movq %r13, %rdi
callq *0x28(%rax)
cmpl $0x13, %eax
je 0x2713aa
movq (%rbx), %rax
movq -0x8(%rax,%r12), %rdi
testq %rdi, %rdi
je 0x271345
movq (%rdi), %rax
callq *0x28(%rax)
cmpl $0x1, %eax
je 0x2713aa
leaq -0x1(%rbp), %rax
leaq 0x3f(%rax), %rcx
testq %rax, %rax
cmovnsq %rax, %rcx
sarq $0x6, %rcx
shlq $0x3, %rcx
addq (%r15), %rcx
movq %rax, %rdx
andq 0x20(%rsp), %rdx
xorl %esi, %esi
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
cmpq %rdi, %rdx
setbe %sil
movq -0x8(%rcx,%rsi,8), %rcx
btq %rax, %rcx
jae 0x2713aa
movq (%rbx), %rax
leaq (%rax,%r12), %rdx
addq $-0x8, %rdx
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x2713e7
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rsp)
jmp 0x2713ef
movq (%rbx), %r13
movq -0x8(%r13,%r12), %rdi
testq %rdi, %rdi
je 0x2713ef
movq (%rdi), %rax
callq *0x28(%rax)
cmpl $0x11, %eax
je 0x2713ef
addq %r12, %r13
addq $-0x8, %r13
movq (%r13), %rdi
testq %rdi, %rdi
je 0x2713dd
movq (%rdi), %rax
callq *0x28(%rax)
cmpl $0x12, %eax
je 0x2713ef
movq %r13, %rdi
callq 0x1f1690
jmp 0x2713ef
movq %rsp, %rdi
callq 0x396592
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
decq %rcx
addq $0x8, %r12
leaq 0x1(%rbp), %rdx
cmpq %rcx, %rbp
setb %r13b
movq %rdx, %rbp
jb 0x27128d
movq 0x8(%rbx), %rdx
addq $-0x8, %rdx
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x27146a
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rsp)
movl 0x1c(%rsp), %ebp
jmp 0x271476
movq (%rbx), %rax
leaq (%rax,%r12), %rdx
addq $-0x8, %rdx
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0x271503
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rsp)
jmp 0x27150b
movq %rsp, %rdi
callq 0x396592
movl 0x1c(%rsp), %ebp
movq 0x10(%rbx), %rdx
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rsi
movq %rsi, 0x10(%rbx)
movups (%rbx), %xmm0
movq %rax, (%rbx)
movq %rcx, 0x8(%rbx)
movaps %xmm0, (%rsp)
movq %rdx, 0x10(%rsp)
testb %r13b, %r13b
jne 0x271593
movl 0x18(%r15), %edx
leaq -0x1(%rdx), %rsi
addq $0x3e, %rdx
testq %rsi, %rsi
cmovnsq %rsi, %rdx
sarq $0x6, %rdx
shlq $0x3, %rdx
addq 0x10(%r15), %rdx
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
leaq 0x3f(%rdi), %r8
andq %rsi, %r8
xorl %r9d, %r9d
cmpq %rdi, %r8
setbe %r9b
movq -0x8(%rdx,%r9,8), %rdx
btq %rsi, %rdx
jb 0x271593
subq %rax, %rcx
cmpq $0x8, %rcx
jbe 0x2715dd
jmp 0x271593
movq %rsp, %rdi
callq 0x396592
movq (%rbx), %r15
movq 0x8(%rbx), %rax
movq %rax, %rcx
subq %r15, %rcx
sarq $0x3, %rcx
cmpq %rcx, %rbp
jae 0x27156d
movq (%r15,%r12), %rdi
testq %rdi, %rdi
je 0x271553
movq (%rdi), %rax
callq *0x28(%rax)
cmpl $0x11, %eax
je 0x271553
addq %r12, %r15
movq (%r15), %rdi
testq %rdi, %rdi
je 0x27154b
movq (%rdi), %rax
callq *0x28(%rax)
cmpl $0x12, %eax
je 0x271553
movq %r15, %rdi
callq 0x1f1690
incq %rbp
movq (%rbx), %r15
movq 0x8(%rbx), %rax
movq %rax, %rcx
subq %r15, %rcx
sarq $0x3, %rcx
addq $0x8, %r12
jmp 0x27151c
movq 0x10(%rbx), %rcx
movaps (%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x10(%rsp), %rdx
movq %rdx, 0x10(%rbx)
movq %r15, (%rsp)
movq %rax, 0x8(%rsp)
movq %rcx, 0x10(%rsp)
movl 0x1c(%rsp), %ebp
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x150333(%rip), %rsi    # 0x3c18d6
leaq 0x150336(%rip), %rdx    # 0x3c18e0
leaq 0x28(%rsp), %rdi
callq 0x1eabb8
cmpb $0x0, 0x3ac(%r14)
jne 0x2715c6
movb $0x1, 0x3ac(%r14)
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x2715dd
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1200c0
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
movq %rax, %rdx
subq %rcx, %rdx
cmpq $0x8, %rdx
jne 0x2715f5
movq (%rcx), %rbx
jmp 0x271664
testb %bpl, %bpl
je 0x271644
movq -0x8(%rax), %rdi
testq %rdi, %rdi
je 0x271644
movq (%rdi), %rax
callq *0x28(%rax)
cmpl $0x21, %eax
ja 0x27163f
movl %eax, %ecx
movabsq $0x388fc0000, %rdx      # imm = 0x388FC0000
btq %rcx, %rdx
jae 0x27163f
addq $0x220, %r14            # imm = 0x220
leaq 0x28(%rsp), %rsi
movl $0x5b, (%rsi)
movq %r14, %rdi
movq %rbx, %rdx
callq 0x293434
jmp 0x271661
cmpl $0x7b, %eax
je 0x271620
addq $0x220, %r14            # imm = 0x220
leaq 0x28(%rsp), %rsi
movl $0x5a, (%rsi)
movq %r14, %rdi
movq %rbx, %rdx
callq 0x293434
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x27167a
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1200c0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x271698
jmp 0x271698
jmp 0x271698
jmp 0x271698
jmp 0x271698
jmp 0x271698
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x2716b1
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1200c0
movq %rbx, %rdi
callq 0x120330
nop