// File: /workspace/github_cpp_makefile_star2_O1/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 0x38(%rsp), %r15
movq %r15, %rdi
callq 0x1bcc7
cmpl %ebp, (%r15)
jne 0x1c8bf
movb $0x1, 0x30(%rbx)
leaq 0x58(%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 0x1c920
movq %rdx, 0x10(%rbx)
movq 0x58(%rsp), %rcx
movq %rcx, 0x20(%rbx)
jmp 0x1c926
movl $0x1, 0x8(%rsp)
movq %r14, 0x10(%rsp)
leaq 0xa8(%rsp), %rdi
movl %ebp, %esi
callq 0x1b93c
leaq 0x2ba20(%rip), %rcx     # 0x48302
leaq 0xa8(%rsp), %rdi
movl $0xd, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x9330
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1c947
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0x1c94e
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x50(%rsp), %rcx
movq %rcx, 0x18(%rbx)
movq %rax, 0x48(%rsp)
movq $0x0, 0x50(%rsp)
movb $0x0, 0x58(%rsp)
jmp 0x1cac4
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x68(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x2ba16(%rip), %rsi     # 0x48387
callq 0x9540
leaq 0x98(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1c9a6
movq %rdx, 0x88(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x98(%rsp)
jmp 0x1c9ad
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x88(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0x90d0
leaq 0x28(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rax), %rsi
movq %rax, %rdx
addq $0x10, %rdx
cmpq %rdx, %rsi
je 0x1ca02
movq %rsi, 0x18(%rsp)
movq (%rdx), %rsi
movq %rsi, 0x28(%rsp)
jmp 0x1ca08
movups (%rdx), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%rax), %rsi
movq %rsi, 0x20(%rsp)
movq %rdx, (%rax)
movq $0x0, 0x8(%rax)
xorl %edx, %edx
movb %dl, 0x10(%rax)
movb %dl, 0x30(%rbx)
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rbx)
leaq 0x20(%rbx), %rax
movq %rax, 0x10(%rbx)
movq 0x18(%rsp), %rdx
cmpq %rcx, %rdx
je 0x1ca4d
movq %rdx, 0x10(%rbx)
movq 0x28(%rsp), %rax
movq %rax, 0x20(%rbx)
jmp 0x1ca53
movups (%rcx), %xmm0
movups %xmm0, (%rax)
movq 0x20(%rsp), %rax
movq %rax, 0x18(%rbx)
movq %rcx, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movb $0x0, 0x28(%rsp)
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0x1ca8c
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x92e0
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x1caa3
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cac4
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cadf
movq 0x58(%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 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0x1cb15
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x1cb15
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x1cb31
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x1cb31
movq %rax, %rbx
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cb57
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x1cb57
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1cb72
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x92e0
movq %rbx, %rdi
callq 0x94e0