// File: /workspace/github_cpp_makefile_star2_O3/AgathokakologicalBit[P]wit/src/parsing/parsing.cpp
// Function: akbit::system::parsing::(anonymous namespace)::parse_expression(std::shared_ptr<akbit::system::Node>, akbit::system::parsing::ParserState&, unsigned int)
std::shared_ptr<Node> parse_expression(std::shared_ptr<Node> left_operand, ParserState &state, uint32_t base_priority)
    {
      state.save();
      operator_t const * operation = &parse_operator(state);
      if (operation == &operator_unknown || operation->precedence < base_priority)
      {
        state.restore();
        return left_operand;
      }
      state.drop();

      std::shared_ptr<Node> right_operand = parse_statement_or_composite_unit(state);
      if (state.is_failed())
        return left_operand;

      // Get next operator
      state.save();
      operator_t const * next_operation = &parse_operator(state);
      if (state.is_failed()) { state.restore(); }
      else state.drop();

      while (next_operation->precedence > base_priority)
      {
          if (next_operation->precedence > operation->precedence)
          {
            // If the following operator has the higher priority
            // parse that subexpression first
            state.index -= next_operation->representation.size();
            right_operand = parse_statement(right_operand, state, operation->precedence);
            if (state.is_failed())
              return left_operand;

            state.save();
            next_operation = &parse_operator(state);
            if (state.is_failed()) { state.restore(); break; }
            else state.drop();

            if (next_operation->precedence <= base_priority)
              break;
          }

          if (left_operand->value.index() == 5 && std::get<Node::binary_operation_t>(left_operand->value).operation == operation)
          {
            std::get<Node::binary_operation_t>(left_operand->value).operands.push_back(right_operand);
          }
          else
          {
            left_operand = make_node_bop(left_operand, right_operand, operation);
          }

          operation = next_operation;

          right_operand = parse_statement_or_composite_unit(state);
          if (state.is_failed())
            return left_operand;

          state.save();
          next_operation = &parse_operator(state);
          if (state.is_failed()) { state.restore(); break; }
          else state.drop();
      }

      if (next_operation->precedence <= base_priority)
        state.index -= next_operation->representation.size();

      if (left_operand->value.index() == 5 && std::get<Node::binary_operation_t>(left_operand->value).operation == operation)
      {
        std::get<Node::binary_operation_t>(left_operand->value).operands.push_back(right_operand);
      }
      else
      {
        left_operand = make_node_bop(left_operand, right_operand, operation);
      }

      return left_operand;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movl %ecx, 0x4(%rsp)
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbp
addq $0x8, %rdx
movq 0x40(%r15), %rsi
cmpq 0x48(%r15), %rsi
movq %rdx, 0x28(%rsp)
je 0xa5de
movq 0x8(%r15), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x40(%r15)
jmp 0xa5e7
leaq 0x38(%r15), %rdi
callq 0xd04a
movq %r15, %rdi
callq 0xaf07
movq %rax, %rbx
leaq 0x12397(%rip), %rax     # 0x1c990
cmpq (%rax), %rbx
je 0xa64f
movl 0x4(%rsp), %eax
cmpl %eax, 0x4(%rbx)
jb 0xa64f
addq $-0x8, 0x40(%r15)
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0xb2ee
cmpl $0x0, 0x10(%r15)
je 0xa6a7
movq (%r13), %rax
movq %rax, (%rbp)
movq 0x8(%r13), %rax
xorl %ecx, %ecx
movq %rcx, 0x8(%r13)
movq %rax, 0x8(%rbp)
movq %rcx, (%r13)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0xa695
callq 0x6d78
jmp 0xa695
movq 0x20(%r15), %rdx
movq 0x40(%r15), %rax
movq -0x8(%rax), %rax
movq %rax, 0x8(%r15)
movl $0x0, 0x10(%r15)
leaq 0x18(%r15), %rdi
leaq 0xacaf(%rip), %rcx      # 0x15321
xorl %r14d, %r14d
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x32d0
addq $-0x8, 0x40(%r15)
movups (%r13), %xmm0
movq %r14, 0x8(%r13)
movups %xmm0, (%rbp)
movq %r14, (%r13)
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x40(%r15), %rsi
cmpq 0x48(%r15), %rsi
movq %rbx, 0x8(%rsp)
je 0xa6c7
movq 0x8(%r15), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x40(%r15)
jmp 0xa6d5
leaq 0x38(%r15), %rdi
movq 0x28(%rsp), %rdx
callq 0xd04a
movq %r15, %rdi
callq 0xaf07
movq %rax, %r12
cmpl $0x0, 0x10(%r15)
je 0xa714
movq 0x20(%r15), %rdx
movq 0x40(%r15), %rax
movq -0x8(%rax), %rax
movq %rax, 0x8(%r15)
movl $0x0, 0x10(%r15)
leaq 0x18(%r15), %rdi
leaq 0xac17(%rip), %rcx      # 0x15321
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x32d0
leaq 0x38(%r15), %rax
movq %rax, 0x90(%rsp)
movq %rbp, 0x70(%rsp)
addq $-0x8, 0x40(%r15)
movl 0x4(%r12), %eax
cmpl 0x4(%rsp), %eax
jbe 0xad30
movq 0x8(%rsp), %rcx
cmpl 0x4(%rcx), %eax
jbe 0xa780
movq 0x18(%r12), %rax
movq 0x28(%rsp), %rcx
subq %rax, (%rcx)
movq 0x10(%rsp), %rax
movq %rax, 0x110(%rsp)
movq 0x18(%rsp), %rcx
testq %rcx, %rcx
leaq 0xf8(%rsp), %r14
je 0xa78c
movq 0x12842(%rip), %rax     # 0x1cfb8
cmpb $0x0, (%rax)
je 0xa788
incl 0x8(%rcx)
jmp 0xa78c
movq %r12, %r14
jmp 0xab23
lock
incl 0x8(%rcx)
movq %r13, %rbx
movq %r14, %r13
movq %rcx, 0x20(%rsp)
movq 0x8(%rsp), %rax
movl 0x4(%rax), %r14d
movq (%r15), %rax
movq (%rax), %rbp
imulq $0x38, 0x8(%r15), %r12
movl 0x8(%rbp,%r12), %eax
movl %eax, 0x38(%rsp)
movq (%rbp,%r12), %rax
movq %rax, 0x30(%rsp)
leaq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x10(%rbp,%r12), %rsi
movq 0x18(%rbp,%r12), %rdx
addq %rsi, %rdx
leaq 0x40(%rsp), %rdi
callq 0x6de8
movl %r14d, 0x7c(%rsp)
addq %r12, %rbp
movq 0x30(%rbp), %rax
movq %rax, 0x60(%rsp)
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
andq %rcx, %rax
movabsq $0x300000000, %rcx      # imm = 0x300000000
cmpq %rcx, %rax
jne 0xa89c
movq (%r15), %rax
movq (%rax), %rbp
imulq $0x38, 0x8(%r15), %r12
movl 0x8(%rbp,%r12), %eax
movl %eax, 0xe0(%rsp)
movq (%rbp,%r12), %rax
movq %rax, 0xd8(%rsp)
movq %r13, 0xe8(%rsp)
movq 0x10(%rbp,%r12), %rsi
movq 0x18(%rbp,%r12), %rdx
addq %rsi, %rdx
leaq 0xe8(%rsp), %r14
movq %r14, %rdi
callq 0x6de8
addq %r12, %rbp
movq 0x30(%rbp), %rax
movq %rax, 0x108(%rsp)
movq %r14, %rdi
leaq 0xaf6c(%rip), %rsi      # 0x157de
callq 0x30b0
testl %eax, %eax
sete %bpl
movq 0xe8(%rsp), %rdi
cmpq %r13, %rdi
je 0xa89e
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x31f0
jmp 0xa89e
xorl %ebp, %ebp
movq 0x20(%rsp), %r14
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0xa8bf
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x31f0
testb %bpl, %bpl
je 0xa8e1
leaq 0x80(%rsp), %rdi
movq %r15, %rsi
callq 0x9c85
movq 0x70(%rsp), %rbp
movq %rbx, %r13
jmp 0xaa75
movq (%r15), %rax
movq (%rax), %rbp
imulq $0x38, 0x8(%r15), %r12
movl 0x8(%rbp,%r12), %eax
movl %eax, 0x38(%rsp)
movq (%rbp,%r12), %rax
movq %rax, 0x30(%rsp)
leaq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x10(%rbp,%r12), %rsi
movq 0x18(%rbp,%r12), %rdx
addq %rsi, %rdx
leaq 0x40(%rsp), %rdi
callq 0x6de8
addq %r12, %rbp
movq 0x30(%rbp), %rax
movq %rax, 0x60(%rsp)
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
andq %rcx, %rax
movabsq $0x300000000, %rcx      # imm = 0x300000000
cmpq %rcx, %rax
jne 0xa9d8
movq (%r15), %rax
movq (%rax), %rbp
imulq $0x38, 0x8(%r15), %r12
movl 0x8(%rbp,%r12), %eax
movl %eax, 0xe0(%rsp)
movq (%rbp,%r12), %rax
movq %rax, 0xd8(%rsp)
movq %r13, 0xe8(%rsp)
movq 0x10(%rbp,%r12), %rsi
movq 0x18(%rbp,%r12), %rdx
addq %rsi, %rdx
leaq 0xe8(%rsp), %r14
movq %r14, %rdi
callq 0x6de8
addq %r12, %rbp
movq 0x30(%rbp), %rax
movq %rax, 0x108(%rsp)
movq %r14, %rdi
leaq 0xae34(%rip), %rsi      # 0x157e2
callq 0x30b0
testl %eax, %eax
sete %bpl
movq 0xe8(%rsp), %rdi
cmpq %r13, %rdi
je 0xa9da
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x31f0
jmp 0xa9da
xorl %ebp, %ebp
movq 0x20(%rsp), %r14
movq %rbx, %r13
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0xa9fe
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x31f0
testb %bpl, %bpl
je 0xaa1a
leaq 0x80(%rsp), %rdi
movq %r15, %rsi
callq 0xa1f2
movq 0x70(%rsp), %rbp
jmp 0xaa75
movq 0x110(%rsp), %rax
movq %rax, 0x30(%rsp)
movq %r14, 0x38(%rsp)
testq %r14, %r14
je 0xaa48
movq 0x12580(%rip), %rax     # 0x1cfb8
cmpb $0x0, (%rax)
je 0xaa43
incl 0x8(%r14)
jmp 0xaa48
lock
incl 0x8(%r14)
leaq 0x80(%rsp), %rdi
leaq 0x30(%rsp), %rsi
movq %r15, %rdx
movl 0x7c(%rsp), %ecx
callq 0xa59c
movq 0x70(%rsp), %rbp
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0xaa75
callq 0x6d78
movaps 0x80(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x80(%rsp)
movq 0x18(%rsp), %rdi
movaps %xmm0, 0x10(%rsp)
testq %rdi, %rdi
je 0xaaae
callq 0x6d78
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0xaaae
callq 0x6d78
testq %r14, %r14
je 0xaabb
movq %r14, %rdi
callq 0x6d78
cmpl $0x0, 0x10(%r15)
jne 0xa624
movq 0x40(%r15), %rsi
cmpq 0x48(%r15), %rsi
je 0xaae1
movq 0x8(%r15), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x40(%r15)
jmp 0xaaf3
movq 0x90(%rsp), %rdi
movq 0x28(%rsp), %rdx
callq 0xd04a
movq %r15, %rdi
callq 0xaf07
movq %rax, %r14
cmpl $0x0, 0x10(%r15)
movq 0x40(%r15), %rax
jne 0xacff
addq $-0x8, %rax
movq %rax, 0x40(%r15)
movl 0x4(%rsp), %eax
cmpl %eax, 0x4(%r14)
jbe 0xad2d
movq (%r13), %rdi
cmpb $0x5, 0x48(%rdi)
jne 0xab48
addq $0x10, %rdi
callq 0xd7a5
movq (%r13), %rdi
movq 0x8(%rsp), %rcx
cmpq %rcx, (%rax)
je 0xac1e
movq %rdi, 0xc8(%rsp)
movq 0x8(%r13), %rax
movq %rax, 0xd0(%rsp)
testq %rax, %rax
je 0xab76
movq 0x12450(%rip), %rcx     # 0x1cfb8
cmpb $0x0, (%rcx)
je 0xab72
incl 0x8(%rax)
jmp 0xab76
lock
incl 0x8(%rax)
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0xb8(%rsp)
movq %rax, 0xc0(%rsp)
testq %rax, %rax
je 0xabaa
movq 0x1241c(%rip), %rcx     # 0x1cfb8
cmpb $0x0, (%rcx)
je 0xaba6
incl 0x8(%rax)
jmp 0xabaa
lock
incl 0x8(%rax)
leaq 0x30(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
movq 0x8(%rsp), %rcx
callq 0xcf4c
movaps 0x30(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x30(%rsp)
movq 0x8(%r13), %rdi
movups %xmm0, (%r13)
testq %rdi, %rdi
je 0xabf8
callq 0x6d78
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0xabf8
callq 0x6d78
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0xac0a
callq 0x6d78
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0xac38
callq 0x6d78
jmp 0xac38
addq $0x10, %rdi
callq 0xd7a5
addq $0x8, %rax
movq %rax, %rdi
leaq 0x10(%rsp), %rsi
callq 0xcf06
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0xb2ee
movaps 0x30(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x30(%rsp)
movq 0x18(%rsp), %rdi
movaps %xmm0, 0x10(%rsp)
testq %rdi, %rdi
je 0xac75
callq 0x6d78
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0xac75
callq 0x6d78
cmpl $0x0, 0x10(%r15)
jne 0xa624
movq 0x40(%r15), %rsi
cmpq 0x48(%r15), %rsi
je 0xac9b
movq 0x8(%r15), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x40(%r15)
jmp 0xacad
movq 0x90(%rsp), %rdi
movq 0x28(%rsp), %rdx
callq 0xd04a
movq %r15, %rdi
callq 0xaf07
movq %rax, %r12
cmpl $0x0, 0x10(%r15)
movq %r14, 0x8(%rsp)
je 0xa725
movq 0x20(%r15), %rdx
movq 0x40(%r15), %rax
movq -0x8(%rax), %rax
movq %rax, 0x8(%r15)
movl $0x0, 0x10(%r15)
leaq 0x18(%r15), %rdi
leaq 0xa636(%rip), %rcx      # 0x15321
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x32d0
movq %r14, 0x8(%rsp)
movq %r12, %r14
jmp 0xad28
movq -0x8(%rax), %rax
movq %rax, 0x8(%r15)
movl $0x0, 0x10(%r15)
leaq 0x18(%r15), %rdi
movq 0x20(%r15), %rdx
leaq 0xa603(%rip), %rcx      # 0x15321
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x32d0
addq $-0x8, 0x40(%r15)
movq %r14, %r12
movl 0x4(%rsp), %eax
cmpl %eax, 0x4(%r12)
movq 0x28(%rsp), %rcx
ja 0xad48
movq 0x18(%r12), %rax
subq %rax, (%rcx)
movq (%r13), %rdi
cmpb $0x5, 0x48(%rdi)
jne 0xad88
addq $0x10, %rdi
callq 0xd7a5
movq (%r13), %rdi
movq 0x8(%rsp), %r8
cmpq %r8, (%rax)
jne 0xad8d
addq $0x10, %rdi
callq 0xd7a5
addq $0x8, %rax
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0xcf06
jmp 0xa624
movq 0x8(%rsp), %r8
movq %rdi, 0xa8(%rsp)
movq 0x8(%r13), %rax
movq %rax, 0xb0(%rsp)
testq %rax, %rax
je 0xadbb
movq 0x1220b(%rip), %rcx     # 0x1cfb8
cmpb $0x0, (%rcx)
je 0xadb7
incl 0x8(%rax)
jmp 0xadbb
lock
incl 0x8(%rax)
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x98(%rsp)
movq %rax, 0xa0(%rsp)
testq %rax, %rax
je 0xadef
movq 0x121d7(%rip), %rcx     # 0x1cfb8
cmpb $0x0, (%rcx)
je 0xadeb
incl 0x8(%rax)
jmp 0xadef
lock
incl 0x8(%rax)
leaq 0x30(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0x98(%rsp), %rdx
movq %r8, %rcx
callq 0xcf4c
movaps 0x30(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x30(%rsp)
movq 0x8(%r13), %rdi
movups %xmm0, (%r13)
testq %rdi, %rdi
je 0xae3b
callq 0x6d78
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0xae3b
callq 0x6d78
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0xae4d
callq 0x6d78
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0xa624
callq 0x6d78
jmp 0xa624
jmp 0xaeed
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0xae82
callq 0x6d78
movq 0xb0(%rsp), %rdi
jmp 0xaedf
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0xaeab
callq 0x6d78
jmp 0xaeab
jmp 0xaeba
jmp 0xaeba
jmp 0xaeba
jmp 0xaeed
movq %rax, %rbx
cmpq $0x0, 0x20(%rsp)
je 0xaef0
movq 0x20(%rsp), %rdi
jmp 0xaee4
movq %rax, %rdi
callq 0x6c65
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0xaed7
callq 0x6d78
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0xaef0
callq 0x6d78
jmp 0xaef0
jmp 0xaeed
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0xaeff
callq 0x6d78
movq %rbx, %rdi
callq 0x3350