// File: philpoore[P]Math/./src/Parser.cpp
// Function: Parser::expect(TokenType, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Token Parser::expect(TokenType type, string msg = "") {
    Token t = peek();
    if (t.type != type) {
        string output = msg;
        if (output.size()) {
            output += ": ";
        }
        output +=
            "Expected token " + to_string(type) + " but found " + to_string(t);
        error(output);
        return Token();
    } else {
        return consume();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rcx, -0x198(%rbp)
movq %rdi, -0x190(%rbp)
movq %rdi, %rax
movq %rax, -0x188(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x180(%rbp)
leaq -0x50(%rbp), %rdi
xorl %edx, %edx
callq 0x88d0
movl -0x50(%rbp), %eax
cmpl -0x14(%rbp), %eax
je 0x8d6d
movq -0x198(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x4160
jmp 0x8b16
leaq -0x70(%rbp), %rdi
callq 0x4250
cmpq $0x0, %rax
je 0x8b5b
leaq 0xd856(%rip), %rsi      # 0x16382
leaq -0x70(%rbp), %rdi
callq 0x42d0
jmp 0x8b37
jmp 0x8b5b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x8da5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x8d62
movl -0x14(%rbp), %esi
leaq -0x100(%rbp), %rdi
callq 0x57c0
jmp 0x8b6c
leaq 0xd82e(%rip), %rsi      # 0x163a1
leaq -0xe0(%rbp), %rdi
leaq -0x100(%rbp), %rdx
callq 0xb8b0
jmp 0x8b88
leaq 0xd822(%rip), %rdx      # 0x163b1
leaq -0xc0(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0xb790
jmp 0x8ba4
leaq -0x150(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xce00
jmp 0x8bb6
leaq -0x120(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x5540
jmp 0x8bcb
leaq -0xa0(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
leaq -0x120(%rbp), %rdx
callq 0xb7e0
jmp 0x8be7
leaq -0x70(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x43d0
jmp 0x8bf9
leaq -0xa0(%rbp), %rdi
callq 0x4200
leaq -0x120(%rbp), %rdi
callq 0x4200
leaq -0x150(%rbp), %rdi
callq 0xcb70
leaq -0xc0(%rbp), %rdi
callq 0x4200
leaq -0xe0(%rbp), %rdi
callq 0x4200
leaq -0x100(%rbp), %rdi
callq 0x4200
leaq -0x170(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4160
jmp 0x8c53
movq -0x180(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x8840
jmp 0x8c68
leaq -0x170(%rbp), %rdi
callq 0x4200
movq -0x190(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x41c0
movq -0x190(%rbp), %rdi
callq 0xcea0
movl $0x1, -0x174(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x4200
jmp 0x8d8c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x8d3c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x8d30
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x8d24
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x8d18
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x8d0c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x4200
leaq -0x120(%rbp), %rdi
callq 0x4200
leaq -0x150(%rbp), %rdi
callq 0xcb70
leaq -0xc0(%rbp), %rdi
callq 0x4200
leaq -0xe0(%rbp), %rdi
callq 0x4200
leaq -0x100(%rbp), %rdi
callq 0x4200
jmp 0x8d62
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x4200
leaq -0x70(%rbp), %rdi
callq 0x4200
jmp 0x8da5
movq -0x180(%rbp), %rsi
movq -0x190(%rbp), %rdi
callq 0x8a60
jmp 0x8d82
movl $0x1, -0x174(%rbp)
leaq -0x50(%rbp), %rdi
callq 0xcb70
movq -0x188(%rbp), %rax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
leaq -0x50(%rbp), %rdi
callq 0xcb70
movq -0x78(%rbp), %rdi
callq 0x44f0
nopw (%rax,%rax)