// File: /workspace/github_cpp_makefile_star2_O2/AgathokakologicalBit[P]wit/src/parsing/parsing.cpp
// Function: akbit::system::parsing::(anonymous namespace)::parse_unit(akbit::system::parsing::ParserState&)
std::shared_ptr<Node> parse_unit(ParserState &state)
    {
      if (state.peek().sub_type == TokenSubType::t_brace_round_left)
      {
        state.move();
        if (state.peek().sub_type == TokenSubType::t_brace_round_right)
        {
          auto container = std::make_shared<Node>(Node::value_tuple_t{
            .entries = {},
          });
          state.move();
          return container;
        }

        auto res = parse_statement(state);
        if (not state.is_failed())
          state.consume(TokenSubType::t_brace_round_right);
        return res;
      }

      if (state.peek().sub_type == TokenSubType::t_brace_curly_left)
      {
        state.move();
        auto container = std::make_shared<Node>(Node::block_t{
          .code = {},
        });

        while (!state.is_eof() && !state.is_failed() && state.peek().sub_type != TokenSubType::t_brace_curly_right)
        {
          auto line = parse_statement(state);
          std::get<Node::block_t>(container->value).code.push_back(line);
        }
        
        if (!state.is_failed())
          state.consume(TokenSubType::t_brace_curly_right);

        return container;
      }

      if (state.peek().sub_type == TokenSubType::t_dash || state.peek().sub_type == TokenSubType::t_plus)
      {
        auto container = std::make_shared<Node>(Node::unary_operation_t{
          .operation = &parse_operator(state),
          .expression = parse_composite_unit(state),
        });
        return container;
      }

      return parse_value(state);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %r15
movq %r15, %rdi
callq 0x7236
movl 0x34(%r15), %ebp
leaq 0x10(%rsp), %rdi
callq 0x4120
cmpl $0x9, %ebp
jne 0x9794
movq %r14, %rdi
callq 0x9c6e
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x7236
movl 0x34(%r15), %ebp
leaq 0x10(%rsp), %rdi
callq 0x4120
cmpl $0xa, %ebp
jne 0x9854
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
movq %rbx, %rdi
callq 0x9cf5
movq %rsp, %rdi
callq 0x69c0
movq %r14, %rdi
callq 0x9c6e
jmp 0x9ad4
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x7236
movl 0x34(%r15), %ebp
leaq 0x10(%rsp), %rdi
callq 0x4120
cmpl $0xf, %ebp
jne 0x988a
movq %r14, %rdi
callq 0x9c6e
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
movq %rbx, %rdi
callq 0xaa63
movq %rsp, %r12
movq %r12, %rdi
callq 0x69c0
leaq 0x10(%rsp), %r13
leaq 0x8(%rsp), %r15
movq %r14, %rdi
callq 0x9d88
movl 0x10(%r14), %ecx
testb %al, %al
jne 0x990f
testl %ecx, %ecx
jne 0x990f
movq %r12, %rdi
movq %r14, %rsi
callq 0x7236
movl 0x34(%rsp), %ebp
movq %r13, %rdi
callq 0x4120
cmpl $0x10, %ebp
je 0x990b
movq %r12, %rdi
movq %r14, %rsi
callq 0x87ce
movq (%rbx), %rdi
addq $0x10, %rdi
callq 0xaba3
movq %rax, %rdi
movq %r12, %rsi
callq 0xa838
movq %r15, %rdi
callq 0x69e2
jmp 0x97ec
movq %rbx, %rdi
movq %r14, %rsi
callq 0x87ce
cmpl $0x0, 0x10(%r14)
jne 0x9ad4
leaq 0xb0(%rsp), %rdi
pushq $0xa
popq %rdx
movq %r14, %rsi
callq 0x8192
leaq 0xc0(%rsp), %rdi
jmp 0x9acf
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x7236
cmpl $0x12, 0x34(%r15)
jne 0x98ab
leaq 0x10(%rsp), %rdi
callq 0x4120
jmp 0x98d8
leaq 0x40(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x7236
movl 0x34(%r15), %ebp
leaq 0x50(%rsp), %rdi
callq 0x4120
leaq 0x10(%rsp), %rdi
callq 0x4120
cmpl $0x11, %ebp
jne 0x9934
movq %r14, %rdi
callq 0x93a7
leaq 0x8(%rsp), %rdi
movq %rax, -0x8(%rdi)
movq %r14, %rsi
callq 0x9638
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xaa81
leaq 0x10(%rsp), %rdi
callq 0x69e2
jmp 0x9ad4
movl 0x10(%r14), %ecx
testl %ecx, %ecx
jne 0x9ad4
leaq 0x78(%rsp), %rdi
pushq $0x10
popq %rdx
movq %r14, %rsi
callq 0x8192
leaq 0x88(%rsp), %rdi
jmp 0x9acf
leaq 0x10(%rsp), %r15
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %rbx, %rdi
callq 0xa283
movq %r14, %rdi
callq 0xa7fc
leaq 0x40(%rsp), %rdi
pushq $0x4
popq %rdx
movq %r14, %rsi
callq 0x8192
movq %rsp, %rdi
leaq 0x40(%rsp), %rsi
callq 0xacb4
leaq 0x50(%rsp), %rdi
callq 0x4120
cmpl $0x0, 0x10(%r14)
je 0x9a76
movq %r14, %rdi
callq 0xa80c
movq %r14, %rdi
callq 0xa7fc
leaq 0x40(%rsp), %rdi
pushq $0x5
popq %rdx
movq %r14, %rsi
callq 0x8192
movq %rsp, %rdi
leaq 0x40(%rsp), %rsi
callq 0xacb4
leaq 0x50(%rsp), %rdi
callq 0x4120
cmpl $0x0, 0x10(%r14)
je 0x9a9e
movq %r14, %rdi
callq 0xa80c
movq %r14, %rdi
callq 0xa7fc
leaq 0x40(%rsp), %rdi
pushq $0x3
popq %rdx
movq %r14, %rsi
callq 0x8192
movq %rsp, %rdi
leaq 0x40(%rsp), %rsi
callq 0xacb4
leaq 0x50(%rsp), %rdi
callq 0x4120
cmpl $0x0, 0x10(%r14)
je 0x9ae9
movq %r14, %rdi
callq 0xa80c
movq %r14, %rdi
callq 0xa7fc
leaq 0x40(%rsp), %rdi
pushq $0x6
popq %rdx
movq %r14, %rsi
callq 0x8192
movq %rsp, %rdi
leaq 0x40(%rsp), %rsi
callq 0xacb4
leaq 0x50(%rsp), %rdi
callq 0x4120
addq $-0x8, 0x40(%r14)
cmpl $0x0, 0x10(%r14)
jne 0x9acc
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
callq 0x42d0
movq (%rbx), %rdi
addq $0x10, %rdi
leaq 0x40(%rsp), %r14
movq %r14, %rsi
callq 0xadb6
jmp 0x9ac4
addq $-0x8, 0x40(%r14)
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
callq 0x42d0
movq (%rbx), %rdi
addq $0x10, %rdi
leaq 0x40(%rsp), %r14
movq %r14, %rsi
callq 0xacea
jmp 0x9ac4
addq $-0x8, 0x40(%r14)
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
callq 0x42d0
movq (%rbx), %rdi
addq $0x10, %rdi
leaq 0x40(%rsp), %r14
movq %r14, %rsi
callq 0xad2e
movq %r14, %rdi
callq 0x4120
movq %r15, %rdi
callq 0x4120
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $-0x8, 0x40(%r14)
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
callq 0x42d0
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %r14
movups %xmm0, 0x20(%r14)
movq (%rbx), %rdi
addq $0x10, %rdi
movq %r14, %rsi
callq 0xad72
movq %r14, %rdi
callq 0x6ba8
jmp 0x9acc
jmp 0x9b44
jmp 0x9b44
jmp 0x9b44
jmp 0x9b44
jmp 0x9b44
jmp 0x9b44
jmp 0x9b44
jmp 0x9b44
movq %rax, %r14
jmp 0x9b53
jmp 0x9b6c
jmp 0x9b6c
movq %rax, %r14
leaq 0x10(%rsp), %rdi
jmp 0x9b83
movq %rax, %r14
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x69e2
movq %r15, %rdi
callq 0x4120
jmp 0x9b88
jmp 0x9b5f
movq %rax, %r14
movq %rsp, %rdi
callq 0x69c0
jmp 0x9b88
movq %rax, %r14
jmp 0x9b7c
movq %rax, %r14
movq %r15, %rdi
callq 0x69e2
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x69e2
movq %r14, %rdi
callq 0x43c0