// File: pfnet-research[P]pml/src/parser.cpp
// Function: parser::refty_abbreviation(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long&)
refty_result_t refty_abbreviation(std::string const& input, size_t& pos) {
    std::string arg = "@blah";
    size_t prev_pos = pos;
    auto sty_result = simple_type(input, pos); // in the cold night : a:int
    if (sty_result.is_error()) {
        pos = prev_pos;
        EXPECT(ident_token, Ident);
        EXPECT(colon_token, Colon);
        arg = ident_token.lexime;
        sty_result = simple_type(input, pos);
    }
    if (sty_result.is_ok()) {
        return refty_result_t::ok(ast::refinement_type_t {
            arg, sty_result.ok(), make<logic::top_formula_t>()
            });
    } else {
        return sty_result.convert<ast::refinement_type_t>();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x270, %rsp            # imm = 0x270
movq %rdi, -0x208(%rbp)
movq %rdi, %rax
movq %rax, -0x200(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
callq 0xa660
movq -0x1f8(%rbp), %rdx
leaq 0x621b6(%rip), %rsi     # 0x9caec
leaq -0x38(%rbp), %rdi
callq 0x1dd10
jmp 0x3a941
leaq -0x39(%rbp), %rdi
callq 0xa420
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x90(%rbp), %rdi
callq 0x397e0
jmp 0x3a96b
leaq -0x90(%rbp), %rdi
callq 0x411a0
movb %al, -0x209(%rbp)
jmp 0x3a97f
movb -0x209(%rbp), %al
testb $0x1, %al
jne 0x3a98e
jmp 0x3ac93
movq -0x58(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
leaq -0xc8(%rbp), %rdi
movl $0xa, %ecx
callq 0x364d0
jmp 0x3a9b7
leaq -0xc8(%rbp), %rdi
callq 0x40510
movb %al, -0x20a(%rbp)
jmp 0x3a9cb
movb -0x20a(%rbp), %al
testb $0x1, %al
jne 0x3a9da
jmp 0x3aa60
leaq -0xc8(%rbp), %rdi
callq 0x405b0
movq %rax, -0x218(%rbp)
jmp 0x3a9ef
movq -0x218(%rbp), %rsi
movq -0x208(%rbp), %rdi
callq 0x413a0
jmp 0x3aa04
movl $0x1, -0xcc(%rbp)
jmp 0x3ac1a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x39(%rbp), %rdi
callq 0xa420
jmp 0x3ae1e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x3ae15
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x3ae09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x3ac82
leaq -0xc8(%rbp), %rdi
callq 0x40630
movq %rax, -0x220(%rbp)
jmp 0x3aa75
movq -0x220(%rbp), %rsi
leaq -0x100(%rbp), %rdi
callq 0x406b0
jmp 0x3aa8a
movq -0xf8(%rbp), %rax
movq %rax, -0x228(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0xa280
movq -0x228(%rbp), %rcx
addq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
leaq -0x138(%rbp), %rdi
movl $0x1c, %ecx
callq 0x364d0
jmp 0x3aad3
leaq -0x138(%rbp), %rdi
callq 0x40510
movb %al, -0x229(%rbp)
jmp 0x3aae7
movb -0x229(%rbp), %al
testb $0x1, %al
jne 0x3aaf3
jmp 0x3ab4e
leaq -0x138(%rbp), %rdi
callq 0x405b0
movq %rax, -0x238(%rbp)
jmp 0x3ab08
movq -0x238(%rbp), %rsi
movq -0x208(%rbp), %rdi
callq 0x413a0
jmp 0x3ab1d
movl $0x1, -0xcc(%rbp)
jmp 0x3ac02
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x3ac76
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x3ac6a
leaq -0x138(%rbp), %rdi
callq 0x40630
movq %rax, -0x240(%rbp)
jmp 0x3ab63
movq -0x240(%rbp), %rsi
leaq -0x168(%rbp), %rdi
callq 0x406b0
jmp 0x3ab78
movq -0x160(%rbp), %rax
movq %rax, -0x248(%rbp)
leaq -0x158(%rbp), %rdi
callq 0xa280
movq -0x248(%rbp), %rcx
addq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
leaq -0xf0(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0xa060
jmp 0x3abb5
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x1a0(%rbp), %rdi
callq 0x397e0
jmp 0x3abcb
leaq -0x90(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x41520
jmp 0x3abe0
leaq -0x1a0(%rbp), %rdi
callq 0x41370
leaq -0x168(%rbp), %rdi
callq 0x404f0
movl $0x0, -0xcc(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x407c0
leaq -0x100(%rbp), %rdi
callq 0x404f0
leaq -0xc8(%rbp), %rdi
callq 0x407c0
movl -0xcc(%rbp), %eax
testl %eax, %eax
jne 0x3ade4
jmp 0x3ac36
jmp 0x3ac93
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x3ac5e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x41370
leaq -0x168(%rbp), %rdi
callq 0x404f0
leaq -0x138(%rbp), %rdi
callq 0x407c0
leaq -0x100(%rbp), %rdi
callq 0x404f0
leaq -0xc8(%rbp), %rdi
callq 0x407c0
jmp 0x3ae09
leaq -0x90(%rbp), %rdi
callq 0x415c0
movb %al, -0x249(%rbp)
jmp 0x3aca7
movb -0x249(%rbp), %al
testb $0x1, %al
jne 0x3acb6
jmp 0x3adc5
leaq -0x1d8(%rbp), %rdi
movq %rdi, -0x258(%rbp)
leaq -0x38(%rbp), %rsi
callq 0xa190
jmp 0x3accf
movb $0x1, -0x1e9(%rbp)
leaq -0x1b8(%rbp), %rax
movq %rax, -0x268(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x41200
movq %rax, -0x260(%rbp)
jmp 0x3acf9
movq -0x268(%rbp), %rax
movq -0x260(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, (%rax)
leaq -0x1b0(%rbp), %rax
movq %rax, -0x270(%rbp)
leaq -0x1e8(%rbp), %rdi
callq 0x38c90
jmp 0x3ad27
movq -0x270(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x40d40
movq -0x208(%rbp), %rdi
movb $0x0, -0x1e9(%rbp)
leaq -0x1d8(%rbp), %rsi
callq 0x414a0
jmp 0x3ad56
leaq -0x1d8(%rbp), %rdi
callq 0x16120
leaq -0x1e8(%rbp), %rdi
callq 0x40d70
movl $0x1, -0xcc(%rbp)
jmp 0x3ade4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x3adac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x16120
leaq -0x1e8(%rbp), %rdi
callq 0x40d70
testb $0x1, -0x1e9(%rbp)
jne 0x3adb7
jmp 0x3adc3
movq -0x258(%rbp), %rdi
callq 0xa240
jmp 0x3ae09
movq -0x208(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x41420
jmp 0x3adda
movl $0x1, -0xcc(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x41370
leaq -0x38(%rbp), %rdi
callq 0xa240
movq -0x200(%rbp), %rax
addq $0x270, %rsp            # imm = 0x270
popq %rbp
retq
leaq -0x90(%rbp), %rdi
callq 0x41370
leaq -0x38(%rbp), %rdi
callq 0xa240
movq -0x48(%rbp), %rdi
callq 0xa650
nopw (%rax,%rax)