// File: sighingnow[P]compile-pascal/pl0_parser.cpp
// Function: pl0_type_fn(input_t*)
pair<int, pl0_ast_type *> pl0_type_fn(input_t *text) {
    function<pair<pl0_ast_constv *, pl0_ast_primitive_type *> (pl0_ast_primitive_type *)> fn = [&, text](pl0_ast_primitive_type *t) { return make_pair(new pl0_ast_constv(text->locate(), -1, pl0_ast_constv::INT), t); };
    auto parser = (pl0_primitive_type / fn) // not array
        | ((pl0_string_literal("array") >> spaces >> (pl0_character('[') >> pl0_unsigned << pl0_character(']')) << spaces << pl0_string_literal("of")) + pl0_primitive_type); // array
    auto res = (spaces >> parser << spaces)(text);
    if (verbose) {
        cout << "parsing: Type" << endl;
    }
    return make_pair(std::get<0>(res), new pl0_ast_type(text->locate(), std::get<1>(res).second, std::get<1>(res).first ? std::get<1>(res).first->val : -1));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1710, %rsp           # imm = 0x1710
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
movq %rdi, -0x16c0(%rbp)
leaq -0x40(%rbp), %rsi
callq 0xdc20
movq -0x16c0(%rbp), %rdx
leaq 0x1528c7(%rip), %rsi    # 0x15fdd0
leaq -0x390(%rbp), %rdi
callq 0x1dec0
jmp 0xd517
leaq -0xce9(%rbp), %rdi
movq %rdi, -0x16c8(%rbp)
callq 0x55d0
movq -0x16c8(%rbp), %rdx
leaq 0xe3c6a(%rip), %rsi     # 0xf11a2
leaq -0xce8(%rbp), %rdi
callq 0x19840
jmp 0xd546
leaq -0xcc8(%rbp), %rdi
leaq -0xce8(%rbp), %rsi
callq 0xa6a0
jmp 0xd55b
leaq 0x15226e(%rip), %rdx    # 0x15f7d0
leaq -0xc80(%rbp), %rdi
leaq -0xcc8(%rbp), %rsi
callq 0x1e000
jmp 0xd577
movb $0x5b, -0xea1(%rbp)
leaq -0xea0(%rbp), %rdi
leaq -0xea1(%rbp), %rsi
callq 0xa240
jmp 0xd593
leaq 0x1526ce(%rip), %rdx    # 0x15fc68
leaq -0xe58(%rbp), %rdi
leaq -0xea0(%rbp), %rsi
callq 0x1e080
jmp 0xd5af
movb $0x5d, -0xef1(%rbp)
leaq -0xef0(%rbp), %rdi
leaq -0xef1(%rbp), %rsi
callq 0xa240
jmp 0xd5cb
leaq -0xdc8(%rbp), %rdi
leaq -0xe58(%rbp), %rsi
leaq -0xef0(%rbp), %rdx
callq 0x1e040
jmp 0xd5e7
leaq -0xbd0(%rbp), %rdi
leaq -0xc80(%rbp), %rsi
leaq -0xdc8(%rbp), %rdx
callq 0x1dfc0
jmp 0xd603
leaq 0x1521c6(%rip), %rdx    # 0x15f7d0
leaq -0xa48(%rbp), %rdi
leaq -0xbd0(%rbp), %rsi
callq 0x1df80
jmp 0xd61f
leaq -0xf61(%rbp), %rdi
movq %rdi, -0x16d0(%rbp)
callq 0x55d0
movq -0x16d0(%rbp), %rdx
leaq 0xe1aeb(%rip), %rsi     # 0xef12b
leaq -0xf60(%rbp), %rdi
callq 0x19840
jmp 0xd64e
leaq -0xf40(%rbp), %rdi
leaq -0xf60(%rbp), %rsi
callq 0xa6a0
jmp 0xd663
leaq -0x858(%rbp), %rdi
leaq -0xa48(%rbp), %rsi
leaq -0xf40(%rbp), %rdx
callq 0x1df40
jmp 0xd67f
leaq 0x15274a(%rip), %rdx    # 0x15fdd0
leaq -0x620(%rbp), %rdi
leaq -0x858(%rbp), %rsi
callq 0x1df00
jmp 0xd69b
leaq -0x328(%rbp), %rdi
leaq -0x390(%rbp), %rsi
leaq -0x620(%rbp), %rdx
callq 0x1de80
jmp 0xd6b7
leaq -0x620(%rbp), %rdi
callq 0x1e0c0
leaq -0x858(%rbp), %rdi
callq 0x1e0f0
leaq -0xf40(%rbp), %rdi
callq 0x1d950
leaq -0xf60(%rbp), %rdi
callq 0x5200
leaq -0xf61(%rbp), %rdi
callq 0x53c0
leaq -0xa48(%rbp), %rdi
callq 0x1e120
leaq -0xbd0(%rbp), %rdi
callq 0x1e150
leaq -0xdc8(%rbp), %rdi
callq 0x1e180
leaq -0xef0(%rbp), %rdi
callq 0x19a20
leaq -0xe58(%rbp), %rdi
callq 0x1e1b0
leaq -0xea0(%rbp), %rdi
callq 0x19a20
leaq -0xc80(%rbp), %rdi
callq 0x1e1e0
leaq -0xcc8(%rbp), %rdi
callq 0x1d950
leaq -0xce8(%rbp), %rdi
callq 0x5200
leaq -0xce9(%rbp), %rdi
callq 0x53c0
leaq -0x390(%rbp), %rdi
callq 0x1e210
leaq 0x152052(%rip), %rsi    # 0x15f7d0
leaq -0x16a8(%rbp), %rdi
leaq -0x328(%rbp), %rdx
callq 0x1e280
jmp 0xd793
leaq 0x152036(%rip), %rdx    # 0x15f7d0
leaq -0x1358(%rbp), %rdi
leaq -0x16a8(%rbp), %rsi
callq 0x1e240
jmp 0xd7af
movq -0x18(%rbp), %rdx
leaq -0xfa0(%rbp), %rdi
leaq -0x1358(%rbp), %rsi
callq 0x1e2c0
jmp 0xd7c8
leaq -0x1358(%rbp), %rdi
callq 0x1e630
leaq -0x16a8(%rbp), %rdi
callq 0x1e660
testb $0x1, 0x152051(%rip)    # 0x15f838
je 0xdaa1
movq 0x1517e4(%rip), %rdi    # 0x15efd8
leaq 0xe1a80(%rip), %rsi     # 0xef27b
callq 0x5330
movq %rax, -0x16d8(%rbp)
jmp 0xd809
movq -0x16d8(%rbp), %rdi
movq 0x1517a9(%rip), %rsi    # 0x15efc0
callq 0x53a0
jmp 0xd81e
jmp 0xdaa1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x398(%rbp)
movl %eax, -0x39c(%rbp)
jmp 0xdc09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x398(%rbp)
movl %eax, -0x39c(%rbp)
jmp 0xda13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x398(%rbp)
movl %eax, -0x39c(%rbp)
jmp 0xda07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x398(%rbp)
movl %eax, -0x39c(%rbp)
jmp 0xd9fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x398(%rbp)
movl %eax, -0x39c(%rbp)
jmp 0xd9ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x398(%rbp)
movl %eax, -0x39c(%rbp)
jmp 0xd9e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x398(%rbp)
movl %eax, -0x39c(%rbp)
jmp 0xd9d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x398(%rbp)
movl %eax, -0x39c(%rbp)
jmp 0xd9cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x398(%rbp)
movl %eax, -0x39c(%rbp)
jmp 0xd9bf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x398(%rbp)
movl %eax, -0x39c(%rbp)
jmp 0xd9b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x398(%rbp)
movl %eax, -0x39c(%rbp)
jmp 0xd99b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x398(%rbp)
movl %eax, -0x39c(%rbp)
jmp 0xd98f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x398(%rbp)
movl %eax, -0x39c(%rbp)
jmp 0xd983
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x398(%rbp)
movl %eax, -0x39c(%rbp)
jmp 0xd977
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x398(%rbp)
movl %eax, -0x39c(%rbp)
leaq -0x620(%rbp), %rdi
callq 0x1e0c0
leaq -0x858(%rbp), %rdi
callq 0x1e0f0
leaq -0xf40(%rbp), %rdi
callq 0x1d950
leaq -0xf60(%rbp), %rdi
callq 0x5200
leaq -0xf61(%rbp), %rdi
callq 0x53c0
leaq -0xa48(%rbp), %rdi
callq 0x1e120
leaq -0xbd0(%rbp), %rdi
callq 0x1e150
leaq -0xdc8(%rbp), %rdi
callq 0x1e180
leaq -0xef0(%rbp), %rdi
callq 0x19a20
leaq -0xe58(%rbp), %rdi
callq 0x1e1b0
leaq -0xea0(%rbp), %rdi
callq 0x19a20
leaq -0xc80(%rbp), %rdi
callq 0x1e1e0
leaq -0xcc8(%rbp), %rdi
callq 0x1d950
leaq -0xce8(%rbp), %rdi
callq 0x5200
leaq -0xce9(%rbp), %rdi
callq 0x53c0
leaq -0x390(%rbp), %rdi
callq 0x1e210
jmp 0xdc09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x398(%rbp)
movl %eax, -0x39c(%rbp)
jmp 0xdbfd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x398(%rbp)
movl %eax, -0x39c(%rbp)
jmp 0xda79
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x398(%rbp)
movl %eax, -0x39c(%rbp)
leaq -0x1358(%rbp), %rdi
callq 0x1e630
leaq -0x16a8(%rbp), %rdi
callq 0x1e660
jmp 0xdbfd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x398(%rbp)
movl %eax, -0x39c(%rbp)
jmp 0xdbf1
leaq -0xfa0(%rbp), %rdi
callq 0x1e6c0
movq %rax, -0x16e8(%rbp)
movl $0x18, %edi
callq 0x5340
movq %rax, -0x16e0(%rbp)
jmp 0xdac7
movq -0x18(%rbp), %rdi
callq 0x1a350
movq %rax, -0x16f0(%rbp)
jmp 0xdad9
movq -0x16f0(%rbp), %rax
movq %rax, -0x16b8(%rbp)
leaq -0xfa0(%rbp), %rdi
callq 0x1e6e0
movq 0x8(%rax), %rax
movq %rax, -0x16f8(%rbp)
leaq -0xfa0(%rbp), %rdi
callq 0x1e6e0
cmpq $0x0, (%rax)
je 0xdb2a
leaq -0xfa0(%rbp), %rdi
callq 0x1e6e0
movq (%rax), %rax
movl 0x8(%rax), %eax
movl %eax, -0x16fc(%rbp)
jmp 0xdb37
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x16fc(%rbp)
jmp 0xdb37
movq -0x16f8(%rbp), %rdx
movq -0x16e0(%rbp), %rdi
movl -0x16fc(%rbp), %ecx
movq -0x16b8(%rbp), %rsi
callq 0x1e700
jmp 0xdb59
movq -0x16e8(%rbp), %rdi
movq -0x16e0(%rbp), %rax
movq %rax, -0x16b0(%rbp)
leaq -0x16b0(%rbp), %rsi
callq 0x1e690
movq %rdx, -0x1708(%rbp)
movl %eax, -0x1700(%rbp)
jmp 0xdb89
movq -0x1708(%rbp), %rax
movl -0x1700(%rbp), %ecx
movl %ecx, -0x10(%rbp)
movq %rax, -0x8(%rbp)
leaq -0xfa0(%rbp), %rdi
callq 0x1e730
leaq -0x328(%rbp), %rdi
callq 0x1e750
leaq -0x38(%rbp), %rdi
callq 0x1e780
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0x1710, %rsp           # imm = 0x1710
popq %rbp
retq
movq -0x16e0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x398(%rbp)
movl %eax, -0x39c(%rbp)
movl $0x18, %esi
callq 0x5350
leaq -0xfa0(%rbp), %rdi
callq 0x1e730
leaq -0x328(%rbp), %rdi
callq 0x1e750
leaq -0x38(%rbp), %rdi
callq 0x1e780
movq -0x398(%rbp), %rdi
callq 0x55b0
nop