// File: /workspace/github_cpp_makefile_star2_O2/pfnet-research[P]pml/src/parser.cpp
// Function: parser::refty_detail(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long&)
refty_result_t refty_detail(std::string const& input, size_t& pos) {
    EXPECT(lbrace_token, LBrace);
    EXPECT(ident_token, Ident);
    EXPECT(colon_token, Colon);
    auto sty_result = simple_type(input, pos);
    if (sty_result.is_error())
        return sty_result.convert<ast::refinement_type_t>();
    EXPECT(bar_token, Bar);
    auto constraint_result = formula(input, pos);
    if (constraint_result.is_error())
        return constraint_result.convert<ast::refinement_type_t>();
    EXPECT(rbrace_token, RBrace);
    return refty_result_t::ok(ast::refinement_type_t {
            ident_token.lexime, sty_result.ok(), constraint_result.ok()
            });
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movq %rdx, %rbp
movq %rsi, %r13
movq %rdi, %r15
movq (%rdx), %rdx
leaq 0x190(%rsp), %rbx
pushq $0x1d
popq %rcx
movq %rbx, %rdi
callq 0x15bc7
cmpb $0x0, 0x30(%rbx)
je 0x17bb9
leaq 0x190(%rsp), %rdi
callq 0x1ac66
leaq 0x288(%rsp), %rdi
movq %rax, %rsi
callq 0x1acbe
leaq 0x298(%rsp), %rbx
movq 0x8(%rbx), %rdx
addq -0x8(%rbx), %rdx
movq %rdx, (%rbp)
leaq 0x158(%rsp), %rdi
pushq $0xa
popq %rcx
movq %r13, %rsi
callq 0x15bc7
cmpb $0x0, 0x188(%rsp)
je 0x17bd6
leaq 0x158(%rsp), %rdi
callq 0x1ac66
leaq 0x258(%rsp), %rdi
movq %rax, %rsi
callq 0x1acbe
leaq 0x268(%rsp), %r14
movq 0x8(%r14), %rdx
addq -0x8(%r14), %rdx
movq %rdx, (%rbp)
leaq 0x120(%rsp), %rdi
pushq $0x1c
popq %rcx
movq %r13, %rsi
callq 0x15bc7
cmpb $0x0, 0x150(%rsp)
je 0x17bf3
leaq 0x120(%rsp), %rdi
callq 0x1ac66
leaq 0x228(%rsp), %rdi
movq %rax, %rsi
callq 0x1acbe
leaq 0x238(%rsp), %r12
movq 0x8(%r12), %rax
addq -0x8(%r12), %rax
movq %rax, (%rbp)
leaq 0xe8(%rsp), %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x17412
cmpb $0x0, 0x118(%rsp)
je 0x17c10
movq (%rbp), %rdx
leaq 0xb0(%rsp), %rdi
pushq $0x1b
popq %rcx
movq %r13, %rsi
callq 0x15bc7
cmpb $0x0, 0xe0(%rsp)
je 0x17c22
leaq 0xb0(%rsp), %rdi
callq 0x1ac66
leaq 0x1c8(%rsp), %rdi
movq %rax, %rsi
callq 0x1acbe
leaq 0x1d8(%rsp), %rcx
movq 0x8(%rcx), %rax
addq -0x8(%rcx), %rax
movq %rax, (%rbp)
leaq 0x78(%rsp), %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x172a4
cmpb $0x0, 0xa8(%rsp)
je 0x17c3c
movq (%rbp), %rdx
leaq 0x40(%rsp), %rdi
pushq $0x1e
popq %rcx
movq %r13, %rsi
callq 0x15bc7
cmpb $0x0, 0x70(%rsp)
je 0x17c4b
leaq 0x40(%rsp), %rdi
callq 0x1ac66
leaq 0x1f8(%rsp), %rdi
movq %rax, %rsi
callq 0x1acbe
leaq 0x208(%rsp), %r13
movq 0x8(%r13), %rax
addq -0x8(%r13), %rax
movq %rax, (%rbp)
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x93a0
leaq 0xe8(%rsp), %rdi
callq 0x1aee8
movl (%rax), %eax
movl %eax, 0x28(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x1ad12
leaq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0xc2b6
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x1afea
leaq 0x8(%rsp), %rdi
callq 0xc28a
movq %r13, %rdi
callq 0x9130
jmp 0x17c60
leaq 0x190(%rsp), %rdi
callq 0x1ac0e
movq %r15, %rdi
movq %rax, %rsi
callq 0x1af84
jmp 0x17ccd
leaq 0x158(%rsp), %rdi
callq 0x1ac0e
movq %r15, %rdi
movq %rax, %rsi
callq 0x1af84
jmp 0x17cb8
leaq 0x120(%rsp), %rdi
callq 0x1ac0e
movq %r15, %rdi
movq %rax, %rsi
callq 0x1af84
jmp 0x17ca3
leaq 0xe8(%rsp), %rsi
movq %r15, %rdi
callq 0x1afb2
jmp 0x17c8e
leaq 0xb0(%rsp), %rdi
callq 0x1ac0e
movq %r15, %rdi
movq %rax, %rsi
callq 0x1af84
jmp 0x17c81
leaq 0x78(%rsp), %rsi
movq %r15, %rdi
callq 0x1afce
jmp 0x17c6a
leaq 0x40(%rsp), %rdi
callq 0x1ac0e
movq %r15, %rdi
movq %rax, %rsi
callq 0x1af84
leaq 0x50(%rsp), %rdi
callq 0x9130
leaq 0x78(%rsp), %rdi
callq 0x1fba8
leaq 0x1d8(%rsp), %rdi
callq 0x9130
leaq 0xc0(%rsp), %rdi
callq 0x9130
leaq 0xe8(%rsp), %rdi
callq 0x1fde0
movq %r12, %rdi
callq 0x9130
leaq 0x130(%rsp), %rdi
callq 0x9130
movq %r14, %rdi
callq 0x9130
leaq 0x168(%rsp), %rdi
callq 0x9130
movq %rbx, %rdi
callq 0x9130
leaq 0x1a0(%rsp), %rdi
callq 0x9130
movq %r15, %rax
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0xc28a
jmp 0x17d10
movq %rax, %r15
jmp 0x17d10
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x9130
movq %r13, %rdi
callq 0x9130
jmp 0x17d1f
jmp 0x17d1c
movq %rax, %r15
leaq 0x50(%rsp), %rdi
callq 0x9130
jmp 0x17d30
jmp 0x17d2d
movq %rax, %r15
leaq 0x78(%rsp), %rdi
callq 0x1fba8
jmp 0x17d3f
movq %rax, %r15
leaq 0x1d8(%rsp), %rdi
callq 0x9130
jmp 0x17d53
jmp 0x17d50
movq %rax, %r15
leaq 0xc0(%rsp), %rdi
callq 0x9130
jmp 0x17d67
jmp 0x17d64
movq %rax, %r15
leaq 0xe8(%rsp), %rdi
callq 0x1fde0
jmp 0x17d79
movq %rax, %r15
movq %r12, %rdi
callq 0x9130
jmp 0x17d88
jmp 0x17d85
movq %rax, %r15
leaq 0x130(%rsp), %rdi
callq 0x9130
jmp 0x17d9a
movq %rax, %r15
movq %r14, %rdi
callq 0x9130
jmp 0x17da9
jmp 0x17da6
movq %rax, %r15
leaq 0x168(%rsp), %rdi
callq 0x9130
movq %rbx, %rdi
callq 0x9130
jmp 0x17dca
movq %rax, %r15
jmp 0x17db6
jmp 0x17dc7
movq %rax, %r15
leaq 0x1a0(%rsp), %rdi
callq 0x9130
movq %r15, %rdi
callq 0x94d0