// File: sighingnow[P]compile-pascal/pl0_parser.cpp
// Function: pl0_prog_fn(input_t*)
pair<int, pl0_ast_prog *> pl0_prog_fn(input_t *text) {
    auto parser = ((~pl0_const_stmt) + (~pl0_var_stmt)) + (++pl0_executable + pl0_compound_stmt);
    auto res = (spaces >> parser << spaces)(text);
    if (verbose) {
        cout << "parsing: Prog" << endl;
    }
    return make_pair(std::get<0>(res), new pl0_ast_prog(
        text->locate(), 
        std::get<1>(res).first.first,
        std::get<1>(res).first.second,
        std::get<1>(res).second.first,
        std::get<1>(res).second.second
    ));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x770, %rsp            # imm = 0x770
movq %rdi, -0x18(%rbp)
leaq 0x15508a(%rip), %rsi    # 0x15fb00
leaq -0x210(%rbp), %rdi
callq 0x1ab10
leaq 0x15526f(%rip), %rsi    # 0x15fcf8
leaq -0x258(%rbp), %rdi
callq 0x1ab40
jmp 0xaa97
leaq -0x1c8(%rbp), %rdi
leaq -0x210(%rbp), %rsi
leaq -0x258(%rbp), %rdx
callq 0x1aad0
jmp 0xaab3
leaq 0x15535e(%rip), %rsi    # 0x15fe18
leaq -0x340(%rbp), %rdi
callq 0x1abb0
jmp 0xaac8
leaq 0x155a99(%rip), %rdx    # 0x160568
leaq -0x2f8(%rbp), %rdi
leaq -0x340(%rbp), %rsi
callq 0x1ab70
jmp 0xaae4
leaq -0x138(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
leaq -0x2f8(%rbp), %rdx
callq 0x1aa90
jmp 0xab00
leaq -0x2f8(%rbp), %rdi
callq 0x1abe0
leaq -0x340(%rbp), %rdi
callq 0x1ac10
leaq -0x1c8(%rbp), %rdi
callq 0x1ac30
leaq -0x258(%rbp), %rdi
callq 0x1ac60
leaq -0x210(%rbp), %rdi
callq 0x1ac80
leaq 0x154c8d(%rip), %rsi    # 0x15f7d0
leaq -0x710(%rbp), %rdi
leaq -0x138(%rbp), %rdx
callq 0x1ace0
jmp 0xab58
leaq 0x154c71(%rip), %rdx    # 0x15f7d0
leaq -0x588(%rbp), %rdi
leaq -0x710(%rbp), %rsi
callq 0x1aca0
jmp 0xab74
movq -0x18(%rbp), %rdx
leaq -0x398(%rbp), %rdi
leaq -0x588(%rbp), %rsi
callq 0x1ad20
jmp 0xab8d
leaq -0x588(%rbp), %rdi
callq 0x1b0f0
leaq -0x710(%rbp), %rdi
callq 0x1b120
testb $0x1, 0x154c8c(%rip)    # 0x15f838
je 0xacfc
movq 0x15441f(%rip), %rdi    # 0x15efd8
leaq 0xe4608(%rip), %rsi     # 0xef1c8
callq 0x5330
movq %rax, -0x728(%rbp)
jmp 0xabce
movq -0x728(%rbp), %rdi
movq 0x1543e4(%rip), %rsi    # 0x15efc0
callq 0x53a0
jmp 0xabe3
jmp 0xacfc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x260(%rbp)
movl %eax, -0x264(%rbp)
jmp 0xac7a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x260(%rbp)
movl %eax, -0x264(%rbp)
jmp 0xac6e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x260(%rbp)
movl %eax, -0x264(%rbp)
jmp 0xac62
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x260(%rbp)
movl %eax, -0x264(%rbp)
jmp 0xac56
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x260(%rbp)
movl %eax, -0x264(%rbp)
leaq -0x2f8(%rbp), %rdi
callq 0x1abe0
leaq -0x340(%rbp), %rdi
callq 0x1ac10
leaq -0x1c8(%rbp), %rdi
callq 0x1ac30
leaq -0x258(%rbp), %rdi
callq 0x1ac60
leaq -0x210(%rbp), %rdi
callq 0x1ac80
jmp 0xae6e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x260(%rbp)
movl %eax, -0x264(%rbp)
jmp 0xae62
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x260(%rbp)
movl %eax, -0x264(%rbp)
jmp 0xacd4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x260(%rbp)
movl %eax, -0x264(%rbp)
leaq -0x588(%rbp), %rdi
callq 0x1b0f0
leaq -0x710(%rbp), %rdi
callq 0x1b120
jmp 0xae62
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x260(%rbp)
movl %eax, -0x264(%rbp)
jmp 0xae56
leaq -0x398(%rbp), %rdi
callq 0x1b180
movq %rax, -0x738(%rbp)
movl $0x38, %edi
callq 0x5340
movq %rax, -0x730(%rbp)
jmp 0xad22
movq -0x18(%rbp), %rdi
callq 0x1a350
movq %rax, -0x740(%rbp)
jmp 0xad34
movq -0x740(%rbp), %rax
movq %rax, -0x720(%rbp)
leaq -0x398(%rbp), %rdi
movq %rdi, -0x760(%rbp)
callq 0x1b1a0
movq -0x760(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x758(%rbp)
callq 0x1b1a0
movq -0x760(%rbp), %rdi
movq 0x8(%rax), %rax
movq %rax, -0x750(%rbp)
callq 0x1b1a0
movq -0x760(%rbp), %rdi
addq $0x10, %rax
movq %rax, -0x748(%rbp)
callq 0x1b1a0
movq -0x730(%rbp), %rdi
movq -0x758(%rbp), %rdx
movq -0x750(%rbp), %rcx
movq -0x748(%rbp), %r8
movq 0x28(%rax), %r9
movq -0x720(%rbp), %rsi
callq 0x1b1c0
jmp 0xadc7
movq -0x738(%rbp), %rdi
movq -0x730(%rbp), %rax
movq %rax, -0x718(%rbp)
leaq -0x718(%rbp), %rsi
callq 0x1b150
movq %rdx, -0x770(%rbp)
movl %eax, -0x764(%rbp)
jmp 0xadf7
movq -0x770(%rbp), %rax
movl -0x764(%rbp), %ecx
movl %ecx, -0x10(%rbp)
movq %rax, -0x8(%rbp)
leaq -0x398(%rbp), %rdi
callq 0x1b220
leaq -0x138(%rbp), %rdi
callq 0x1b240
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0x770, %rsp            # imm = 0x770
popq %rbp
retq
movq -0x730(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x260(%rbp)
movl %eax, -0x264(%rbp)
movl $0x38, %esi
callq 0x5350
leaq -0x398(%rbp), %rdi
callq 0x1b220
leaq -0x138(%rbp), %rdi
callq 0x1b240
movq -0x260(%rbp), %rdi
callq 0x55b0
nopw (%rax,%rax)