// File: /workspace/github_cpp_makefile_star2_O3/pfnet-research[P]pml/src/parser.cpp
// Function: parser::predicate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long&)
predicate_result_t predicate(std::string const& input, size_t& pos) {
    EXPECT(backslash_token, BackSlash);

    EXPECT(arg_token, Ident);
    auto arg_name = arg_token.lexime;

    EXPECT(colon_token, Colon);

    auto stype_result = simple_type(input, pos);
    if (stype_result.is_error())
        return stype_result.convert<logic::predicate_t>();
    auto stype = stype_result.ok();

    EXPECT(fat_arrow_token, FatArrow);

    auto formula_result = formula(input, pos);
    if (formula_result.is_error())
        return formula_result.convert<logic::predicate_t>();
    auto formula = formula_result.ok();

    return predicate_result_t::ok(logic::predicate_t{arg_name, stype, formula});
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdx), %rdx
leaq 0x208(%rsp), %r12
movq %r12, %rdi
movl $0x1a, %ecx
callq 0x1c56e
cmpb $0x0, 0x30(%r12)
je 0x1f187
leaq 0x208(%rsp), %rdi
callq 0x24814
movups (%rax), %xmm0
leaq 0x100(%rsp), %rdi
movaps %xmm0, -0x10(%rdi)
leaq 0x110(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
addq %rsi, %rdx
callq 0xac68
movq 0x108(%rsp), %rdx
addq 0xf8(%rsp), %rdx
movq %rdx, (%r14)
leaq 0x1d0(%rsp), %rdi
movq %r15, %rsi
movl $0xa, %ecx
callq 0x1c56e
cmpb $0x0, 0x200(%rsp)
je 0x1f1a4
leaq 0x1d0(%rsp), %rdi
callq 0x24814
movups (%rax), %xmm0
leaq 0x30(%rsp), %rdi
movaps %xmm0, -0x10(%rdi)
leaq 0x40(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
addq %rsi, %rdx
callq 0xac68
movq 0x38(%rsp), %rdx
movq 0x28(%rsp), %rax
addq %rdx, %rax
movq %rax, (%r14)
leaq 0x10(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x30(%rsp), %rsi
addq %rsi, %rdx
movq %rsp, %rdi
callq 0xac68
movq (%r14), %rdx
leaq 0x198(%rsp), %rdi
movq %r15, %rsi
movl $0x1c, %ecx
callq 0x1c56e
cmpb $0x0, 0x1c8(%rsp)
je 0x1f1c1
leaq 0x198(%rsp), %rdi
callq 0x24814
movups (%rax), %xmm0
leaq 0x90(%rsp), %rdi
movaps %xmm0, -0x10(%rdi)
leaq 0xa0(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
addq %rsi, %rdx
callq 0xac68
movq 0x98(%rsp), %rax
addq 0x88(%rsp), %rax
movq %rax, (%r14)
leaq 0xb8(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1ed61
cmpb $0x0, 0xe8(%rsp)
je 0x1f1de
leaq 0xb8(%rsp), %rdi
callq 0x24a50
movl (%rax), %r13d
movq (%r14), %rdx
leaq 0x160(%rsp), %rdi
movq %r15, %rsi
movl $0xc, %ecx
callq 0x1c56e
cmpb $0x0, 0x190(%rsp)
je 0x1f1fb
leaq 0x160(%rsp), %rdi
callq 0x24814
movups (%rax), %xmm0
leaq 0x60(%rsp), %rdi
movaps %xmm0, -0x10(%rdi)
leaq 0x70(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
addq %rsi, %rdx
callq 0xac68
movq 0x68(%rsp), %rax
addq 0x58(%rsp), %rax
movq %rax, (%r14)
leaq 0x240(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1eb2f
cmpb $0x0, 0x270(%rsp)
je 0x1f218
leaq 0x240(%rsp), %rdi
callq 0x2486e
movq (%rax), %r15
movq 0x8(%rax), %r14
testq %r14, %r14
je 0x1f23a
movq 0x42e3b(%rip), %rax     # 0x61fb0
cmpb $0x0, (%rax)
je 0x1f235
incl 0x8(%r14)
jmp 0x1f23a
leaq 0x208(%rsp), %rdi
callq 0x247ba
movq %rbx, %rdi
movq %rax, %rsi
callq 0x24a02
jmp 0x1f43a
leaq 0x1d0(%rsp), %rdi
callq 0x247ba
movq %rbx, %rdi
movq %rax, %rsi
callq 0x24a02
jmp 0x1f3fc
leaq 0x198(%rsp), %rdi
callq 0x247ba
movq %rbx, %rdi
movq %rax, %rsi
callq 0x24a02
jmp 0x1f3a9
leaq 0xb8(%rsp), %rdi
callq 0x2824e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x24a02
jmp 0x1f359
leaq 0x160(%rsp), %rdi
callq 0x247ba
movq %rbx, %rdi
movq %rax, %rsi
callq 0x24a02
jmp 0x1f338
leaq 0x240(%rsp), %rdi
callq 0x280fc
movq %rbx, %rdi
movq %rax, %rsi
callq 0x24a02
jmp 0x1f30f
lock
incl 0x8(%r14)
leaq 0x138(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
leaq 0x128(%rsp), %rdi
callq 0xac68
movl %r13d, 0x148(%rsp)
movq %r15, 0x150(%rsp)
movq %r14, 0x158(%rsp)
testq %r14, %r14
leaq 0x138(%rsp), %rdx
je 0x1f29b
movq 0x42d25(%rip), %rax     # 0x61fb0
cmpb $0x0, (%rax)
je 0x1f296
incl 0x8(%r14)
jmp 0x1f29b
lock
incl 0x8(%r14)
movb $0x1, 0x38(%rbx)
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq 0x128(%rsp), %rcx
cmpq %rdx, %rcx
je 0x1f2c4
movq %rcx, (%rbx)
movq 0x138(%rsp), %rax
movq %rax, 0x10(%rbx)
jmp 0x1f2ca
movups (%rdx), %xmm0
movups %xmm0, (%rax)
leaq 0x128(%rsp), %rdi
movq 0x8(%rdi), %rax
movq %rax, 0x8(%rbx)
movq %rdx, (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl 0x20(%rdi), %ecx
movl %ecx, 0x20(%rbx)
movups 0x28(%rdi), %xmm0
movq %rax, 0x30(%rdi)
movups %xmm0, 0x28(%rbx)
movq %rax, 0x28(%rdi)
callq 0x24aaa
testq %r14, %r14
je 0x1f30f
movq %r14, %rdi
callq 0xa946
leaq 0x240(%rsp), %rdi
callq 0x280cc
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x1f338
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0x180(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f359
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x92e0
cmpb $0x0, 0xe8(%rsp)
jne 0x1f384
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f384
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x92e0
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x1f3a9
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0x1b8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f3ca
movq 0x1b8(%rsp), %rsi
incq %rsi
callq 0x92e0
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x1f3e0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x92e0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x1f3fc
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0x1f0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f41d
movq 0x1f0(%rsp), %rsi
incq %rsi
callq 0x92e0
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
je 0x1f43a
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x92e0
leaq 0x228(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f45b
movq 0x228(%rsp), %rsi
incq %rsi
callq 0x92e0
movq %rbx, %rax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
testq %r14, %r14
je 0x1f487
movq %r14, %rdi
callq 0xa946
jmp 0x1f487
jmp 0x1f484
movq %rax, %rbx
leaq 0x240(%rsp), %rdi
callq 0x280cc
jmp 0x1f499
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x1f4bc
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x1f4bc
jmp 0x1f4b9
movq %rax, %rbx
leaq 0x180(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f4e6
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x1f4e6
jmp 0x1f4e3
jmp 0x1f4e3
movq %rax, %rbx
cmpb $0x0, 0xe8(%rsp)
jne 0x1f516
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f516
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x1f516
movq %rax, %rbx
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x1f542
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x1f542
jmp 0x1f53f
movq %rax, %rbx
leaq 0x1b8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f568
movq 0x1b8(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x1f568
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x1f583
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x1f583
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x1f5a6
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x1f5a6
jmp 0x1f5a3
movq %rax, %rbx
leaq 0x1f0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f5cc
movq 0x1f0(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x1f5cc
movq %rax, %rbx
movq 0x100(%rsp), %rdi
cmpq %r12, %rdi
je 0x1f5f0
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x1f5f0
jmp 0x1f5ed
movq %rax, %rbx
leaq 0x228(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f611
movq 0x228(%rsp), %rsi
incq %rsi
callq 0x92e0
movq %rbx, %rdi
callq 0x94e0