// File: AgathokakologicalBit[P]wit/src/parsing/parsing.cpp
// Function: akbit::system::parsing::ParserState::consume(akbit::system::parsing::TokenSubType)
Token ParserState::consume(TokenSubType const subtype)
  {
    Token tok = this->peek();
    if (subtype != tok.sub_type)
    {
      std::string expected = get_sub_type_name(subtype);
      this->error.code = error_t::p_unexpected_token;
      this->error.message = "[somewhere]: <" + expected + "> expected, but <"
      + get_sub_type_name(tok.sub_type) + ">(" + tok.value +  ") was given";
      return tok;
    }

    this->move();
    return tok;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x138(%rbp)
movq %rdi, %rax
movq %rax, -0x148(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x140(%rbp)
movb $0x0, -0x15(%rbp)
callq 0xf140
movq -0x138(%rbp), %rdi
movl -0x14(%rbp), %eax
cmpl 0x34(%rdi), %eax
je 0x12af7
movl -0x14(%rbp), %esi
leaq -0x38(%rbp), %rdi
callq 0x10180
jmp 0x128dc
movq -0x140(%rbp), %rax
movl $0x7da, 0x10(%rax)      # imm = 0x7DA
leaq 0x23faa(%rip), %rsi     # 0x3689b
leaq -0x108(%rbp), %rdi
leaq -0x38(%rbp), %rdx
callq 0x15990
jmp 0x12903
leaq 0x23fa0(%rip), %rdx     # 0x368aa
leaq -0xe8(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x11a50
jmp 0x1291f
movq -0x138(%rbp), %rax
movl 0x34(%rax), %esi
leaq -0x128(%rbp), %rdi
callq 0x10180
jmp 0x12937
leaq -0xc8(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
leaq -0x128(%rbp), %rdx
callq 0x158c0
jmp 0x12953
leaq 0x23f6e(%rip), %rdx     # 0x368c8
leaq -0xa8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x11a50
jmp 0x1296f
movq -0x138(%rbp), %rdx
addq $0x10, %rdx
leaq -0x88(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x15af0
jmp 0x1298f
leaq 0x23f35(%rip), %rdx     # 0x368cb
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x11a50
jmp 0x129a8
movq -0x140(%rbp), %rdi
addq $0x10, %rdi
addq $0x8, %rdi
leaq -0x68(%rbp), %rsi
callq 0x43e0
leaq -0x68(%rbp), %rdi
callq 0x4210
leaq -0x88(%rbp), %rdi
callq 0x4210
leaq -0xa8(%rbp), %rdi
callq 0x4210
leaq -0xc8(%rbp), %rdi
callq 0x4210
leaq -0x128(%rbp), %rdi
callq 0x4210
leaq -0xe8(%rbp), %rdi
callq 0x4210
leaq -0x108(%rbp), %rdi
callq 0x4210
movb $0x1, -0x15(%rbp)
movl $0x1, -0x12c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4210
jmp 0x12b11
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x12b33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x12aec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x12ae0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x12ad4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x12ac8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x12abc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x12ab0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x4210
leaq -0xa8(%rbp), %rdi
callq 0x4210
leaq -0xc8(%rbp), %rdi
callq 0x4210
leaq -0x128(%rbp), %rdi
callq 0x4210
leaq -0xe8(%rbp), %rdi
callq 0x4210
leaq -0x108(%rbp), %rdi
callq 0x4210
leaq -0x38(%rbp), %rdi
callq 0x4210
jmp 0x12b33
movq -0x140(%rbp), %rdi
callq 0x15aa0
movb $0x1, -0x15(%rbp)
movl $0x1, -0x12c(%rbp)
testb $0x1, -0x15(%rbp)
jne 0x12b23
movq -0x138(%rbp), %rdi
callq 0xec00
movq -0x148(%rbp), %rax
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
movq -0x138(%rbp), %rdi
callq 0xec00
movq -0x40(%rbp), %rdi
callq 0x4560
nopl (%rax,%rax)