// File: AgathokakologicalBit[P]wit/src/parsing/parsing.cpp
// Function: akbit::system::parsing::(anonymous namespace)::parse_operator(akbit::system::parsing::ParserState&)
operator_t const & parse_operator(ParserState &state)
    {
      state.save();
      Token t = state.consume(TokenType::t_operator);
      if (state.is_failed())
      {
        state.drop();
        return operator_unknown;
      }
      state.restore();

      operator_t const * operation = &operator_unknown;
      std::string representation = "";
      state.save();

      while (state.peek().type == TokenType::t_operator && representation.size() < 5)
      {
        representation += state.peek().value;
        state.move();

        for (std::size_t index = 0; index < operators_list.size(); ++index)
          if (operators_list[index].representation == representation)
            operation = &operators_list[index];
      }

      state.restore();
      for (std::size_t i = 0; i < operation->representation.size(); ++i)
          state.move();

      return *operation;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1c950
movq -0x10(%rbp), %rsi
leaq -0x48(%rbp), %rdi
movl $0x6, %edx
xorl %ecx, %ecx
callq 0x12610
movq -0x10(%rbp), %rdi
callq 0x15c20
testb $0x1, %al
jne 0x1481b
jmp 0x14851
movq -0x10(%rbp), %rdi
callq 0x1ca00
jmp 0x14826
leaq 0x40093(%rip), %rax     # 0x548c0
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0x58(%rbp)
jmp 0x14aa9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x14abf
movq -0x10(%rbp), %rdi
callq 0x1c980
jmp 0x1485c
leaq 0x4005d(%rip), %rax     # 0x548c0
movq (%rax), %rax
movq %rax, -0x60(%rbp)
leaq -0x81(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x4570
movq -0x110(%rbp), %rdx
leaq 0x21ab9(%rip), %rsi     # 0x36344
leaq -0x80(%rbp), %rdi
callq 0x9e70
jmp 0x14896
leaq -0x81(%rbp), %rdi
callq 0x4370
movq -0x10(%rbp), %rdi
callq 0x1c950
jmp 0x148ad
jmp 0x148af
movq -0x10(%rbp), %rsi
leaq -0xc0(%rbp), %rdi
callq 0xf140
xorl %eax, %eax
cmpl $0x6, -0x90(%rbp)
movb %al, -0x111(%rbp)
jne 0x148e6
leaq -0x80(%rbp), %rdi
callq 0x4240
cmpq $0x5, %rax
setb %al
movb %al, -0x111(%rbp)
movb -0x111(%rbp), %al
movb %al, -0x112(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0xec00
movb -0x112(%rbp), %al
testb $0x1, %al
jne 0x1490d
jmp 0x14a27
movq -0x10(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0xf140
leaq -0xe8(%rbp), %rsi
leaq -0x80(%rbp), %rdi
callq 0x4410
jmp 0x1492f
leaq -0xf8(%rbp), %rdi
callq 0xec00
movq -0x10(%rbp), %rdi
callq 0x15aa0
movq $0x0, -0x100(%rbp)
movq -0x100(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq 0x409bc(%rip), %rdi     # 0x55320
callq 0x1d220
movq %rax, %rcx
movq -0x120(%rbp), %rax
cmpq %rcx, %rax
jae 0x14a22
movq -0x100(%rbp), %rsi
leaq 0x40996(%rip), %rdi     # 0x55320
callq 0x1d230
movq %rax, %rdi
addq $0x10, %rdi
leaq -0x80(%rbp), %rsi
callq 0xfd90
testb $0x1, %al
jne 0x149a5
jmp 0x14a09
movq -0x100(%rbp), %rsi
leaq 0x4096d(%rip), %rdi     # 0x55320
callq 0x1d230
movq %rax, -0x60(%rbp)
jmp 0x14a09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x81(%rbp), %rdi
callq 0x4370
jmp 0x14abf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x14a9e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0xec00
jmp 0x14a9e
jmp 0x14a0b
movq -0x100(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x100(%rbp)
jmp 0x1494f
jmp 0x148af
movq -0x10(%rbp), %rdi
callq 0x1c980
jmp 0x14a32
movq $0x0, -0x108(%rbp)
movq -0x108(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x60(%rbp), %rdi
addq $0x10, %rdi
callq 0x4240
movq %rax, %rcx
movq -0x128(%rbp), %rax
cmpq %rcx, %rax
jae 0x14a84
movq -0x10(%rbp), %rdi
callq 0x15aa0
movq -0x108(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x108(%rbp)
jmp 0x14a3d
movq -0x60(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0x58(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x4210
jmp 0x14aa9
leaq -0x80(%rbp), %rdi
callq 0x4210
jmp 0x14abf
leaq -0x48(%rbp), %rdi
callq 0xec00
movq -0x8(%rbp), %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
leaq -0x48(%rbp), %rdi
callq 0xec00
movq -0x50(%rbp), %rdi
callq 0x4560
nopw %cs:(%rax,%rax)