// File: /workspace/github_cpp_makefile_star2_O3/pfnet-research[P]pml/src/parser.cpp
// Function: expect_token(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, token_t::kind_t)
parser::result_t<token_t> expect_token(std::string const& input, size_t pos, token_t::kind_t kind) {
    auto token = next_token(input, pos);
    if (token.kind != kind) {
        return parser::result_t<token_t>::error(parser::error_t {
            parser::error_t::kind_t::UnexpectedToken, pos,
            "expected was " + token_kind_to_string(kind) + ", but coming is " + token.lexime
        });
    } else
        return token;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x78(%rsp), %r15
movq %r15, %rdi
callq 0x1ba35
cmpl %ebp, (%r15)
jne 0x1c5cb
movb $0x1, 0x30(%rbx)
leaq 0x98(%rsp), %rax
movups -0x20(%rax), %xmm0
movups %xmm0, (%rbx)
leaq 0x20(%rbx), %rcx
movq %rcx, 0x10(%rbx)
movq -0x10(%rax), %rdx
cmpq %rax, %rdx
je 0x1c62c
movq %rdx, 0x10(%rbx)
movq 0x98(%rsp), %rax
movq %rax, 0x20(%rbx)
jmp 0x1c632
movl $0x1, 0x48(%rsp)
movq %r14, 0x50(%rsp)
leaq 0xa8(%rsp), %rdi
movl %ebp, %esi
callq 0x1b6bc
leaq 0x2bd14(%rip), %rcx     # 0x48302
leaq 0xa8(%rsp), %rdi
movl $0xd, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x9330
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1c643
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x1c64a
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x90(%rsp), %rax
movq %rax, 0x18(%rbx)
jmp 0x1c7c7
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x2bd1a(%rip), %rsi     # 0x48387
callq 0x9540
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1c699
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x1c6a0
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0x90d0
leaq 0x68(%rsp), %rcx
movq (%rax), %rdx
movq %rax, %rdi
addq $0x10, %rdi
cmpq %rdi, %rdx
je 0x1c6f4
movq %rdx, 0x58(%rsp)
movq (%rdi), %rsi
movq %rsi, 0x68(%rsp)
jmp 0x1c6fd
movups (%rdi), %xmm0
movups %xmm0, (%rcx)
movq %rcx, %rdx
movq 0x8(%rax), %rsi
movq %rdi, (%rax)
movq $0x0, 0x8(%rax)
xorl %edi, %edi
movb %dil, 0x10(%rax)
movb %dil, 0x30(%rbx)
movups 0x48(%rsp), %xmm0
movups %xmm0, (%rbx)
leaq 0x20(%rbx), %rax
movq %rax, 0x10(%rbx)
cmpq %rcx, %rdx
je 0x1c73a
movq %rdx, 0x10(%rbx)
movq 0x68(%rsp), %rax
movq %rax, 0x20(%rbx)
jmp 0x1c740
movups (%rcx), %xmm0
movups %xmm0, (%rax)
movq %rsi, 0x18(%rbx)
movq %rcx, 0x58(%rsp)
movq $0x0, 0x60(%rsp)
movb $0x0, 0x68(%rsp)
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x1c76e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x92e0
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1c785
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1c7a6
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1c7c7
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x92e0
movq %rbx, %rax
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x1c7f7
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x1c7f7
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1c813
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x1c813
movq %rax, %rbx
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1c839
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x1c839
movq %rax, %rbx
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1c85a
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x92e0
movq %rbx, %rdi
callq 0x94e0