// File: sighingnow[P]compile-pascal/pl0_tac_gen.cpp
// Function: pl0_tac_program(pl0_ast_program const*)
bool pl0_tac_program(pl0_ast_program const *program) {
    cout << __func__;
    irb.emit("program", "");
    irb.emit("procedure", "_main");
    pl0_tac_prog(program->program);
    irb.emit("exit", new Value(0, "integer")); // main function: exit with 0.
    irb.emit("endproc", "_main");
    irb.emit("endprogram", "");
    return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x200, %rsp            # imm = 0x200
movq %rdi, -0x8(%rbp)
movq 0xb0622(%rip), %rdi     # 0x15efd8
leaq 0x43272(%rip), %rsi     # 0xf1c2f
callq 0x5330
leaq -0x29(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
callq 0x55d0
movq -0x1b0(%rbp), %rdx
leaq 0x41560(%rip), %rsi     # 0xeff40
leaq -0x28(%rbp), %rdi
callq 0x19840
jmp 0xae9eb
leaq -0x61(%rbp), %rdi
movq %rdi, -0x1b8(%rbp)
callq 0x55d0
movq -0x1b8(%rbp), %rdx
leaq 0x43226(%rip), %rsi     # 0xf1c2f
leaq -0x60(%rbp), %rdi
callq 0x19840
jmp 0xaea14
leaq 0xb1cb5(%rip), %rdi     # 0x1606d0
leaq -0x28(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0xbdd00
jmp 0xaea2a
leaq -0x60(%rbp), %rdi
callq 0x5200
leaq -0x61(%rbp), %rdi
callq 0x53c0
leaq -0x28(%rbp), %rdi
callq 0x5200
leaq -0x29(%rbp), %rdi
callq 0x53c0
leaq -0x89(%rbp), %rdi
movq %rdi, -0x1c0(%rbp)
callq 0x55d0
movq -0x1c0(%rbp), %rdx
leaq 0x41591(%rip), %rsi     # 0xf0000
leaq -0x88(%rbp), %rdi
callq 0x19840
jmp 0xaea7d
leaq -0xb1(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
callq 0x55d0
movq -0x1c8(%rbp), %rdx
leaq 0x425c2(%rip), %rsi     # 0xf1060
leaq -0xb0(%rbp), %rdi
callq 0x19840
jmp 0xaeaac
leaq 0xb1c1d(%rip), %rdi     # 0x1606d0
leaq -0x88(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
callq 0xbdd00
jmp 0xaeac8
leaq -0xb0(%rbp), %rdi
callq 0x5200
leaq -0xb1(%rbp), %rdi
callq 0x53c0
leaq -0x88(%rbp), %rdi
callq 0x5200
leaq -0x89(%rbp), %rdi
callq 0x53c0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xaef50
leaq -0xd9(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x55d0
movq -0x1d0(%rbp), %rdx
leaq 0x42540(%rip), %rsi     # 0xf1066
leaq -0xd8(%rbp), %rdi
callq 0x19840
jmp 0xaeb34
movl $0x48, %edi
callq 0x5340
movq %rax, -0x1d8(%rbp)
jmp 0xaeb47
movb $0x1, -0x102(%rbp)
leaq -0x101(%rbp), %rdi
movq %rdi, -0x1e0(%rbp)
callq 0x55d0
movq -0x1e0(%rbp), %rdx
leaq 0x406d8(%rip), %rsi     # 0xef247
leaq -0x100(%rbp), %rdi
callq 0x19840
jmp 0xaeb7d
movq -0x1d8(%rbp), %rdi
xorl %esi, %esi
leaq -0x100(%rbp), %rdx
callq 0xbdfe0
jmp 0xaeb94
movq -0x1d8(%rbp), %rdx
movb $0x0, -0x102(%rbp)
leaq 0xb1b27(%rip), %rdi     # 0x1606d0
xorl %eax, %eax
movl %eax, %r8d
leaq -0xd8(%rbp), %rsi
movq %r8, %rcx
callq 0xbdf00
jmp 0xaebbf
leaq -0x100(%rbp), %rdi
callq 0x5200
leaq -0x101(%rbp), %rdi
callq 0x53c0
leaq -0xd8(%rbp), %rdi
callq 0x5200
leaq -0xd9(%rbp), %rdi
callq 0x53c0
leaq -0x129(%rbp), %rdi
movq %rdi, -0x1e8(%rbp)
callq 0x55d0
movq -0x1e8(%rbp), %rdx
leaq 0x4245b(%rip), %rsi     # 0xf106b
leaq -0x128(%rbp), %rdi
callq 0x19840
jmp 0xaec1e
leaq -0x151(%rbp), %rdi
movq %rdi, -0x1f0(%rbp)
callq 0x55d0
movq -0x1f0(%rbp), %rdx
leaq 0x42421(%rip), %rsi     # 0xf1060
leaq -0x150(%rbp), %rdi
callq 0x19840
jmp 0xaec4d
leaq 0xb1a7c(%rip), %rdi     # 0x1606d0
leaq -0x128(%rbp), %rsi
leaq -0x150(%rbp), %rdx
callq 0xbdd00
jmp 0xaec69
leaq -0x150(%rbp), %rdi
callq 0x5200
leaq -0x151(%rbp), %rdi
callq 0x53c0
leaq -0x128(%rbp), %rdi
callq 0x5200
leaq -0x129(%rbp), %rdi
callq 0x53c0
leaq -0x179(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
callq 0x55d0
movq -0x1f8(%rbp), %rdx
leaq 0x423b9(%rip), %rsi     # 0xf1073
leaq -0x178(%rbp), %rdi
callq 0x19840
jmp 0xaecc8
leaq -0x1a1(%rbp), %rdi
movq %rdi, -0x200(%rbp)
callq 0x55d0
movq -0x200(%rbp), %rdx
leaq 0x42f46(%rip), %rsi     # 0xf1c2f
leaq -0x1a0(%rbp), %rdi
callq 0x19840
jmp 0xaecf7
leaq 0xb19d2(%rip), %rdi     # 0x1606d0
leaq -0x178(%rbp), %rsi
leaq -0x1a0(%rbp), %rdx
callq 0xbdd00
jmp 0xaed13
leaq -0x1a0(%rbp), %rdi
callq 0x5200
leaq -0x1a1(%rbp), %rdi
callq 0x53c0
leaq -0x178(%rbp), %rdi
callq 0x5200
leaq -0x179(%rbp), %rdi
callq 0x53c0
movb 0xb0607(%rip), %al      # 0x15f350
andb $0x1, %al
addq $0x200, %rsp            # imm = 0x200
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xaed97
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xaed85
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x5200
leaq -0x61(%rbp), %rdi
callq 0x53c0
leaq -0x28(%rbp), %rdi
callq 0x5200
leaq -0x29(%rbp), %rdi
callq 0x53c0
jmp 0xaef3d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xaedf1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xaedd9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x5200
leaq -0xb1(%rbp), %rdi
callq 0x53c0
leaq -0x88(%rbp), %rdi
callq 0x5200
leaq -0x89(%rbp), %rdi
callq 0x53c0
jmp 0xaef3d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xaee7a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xaee6e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xaee44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x5200
leaq -0x101(%rbp), %rdi
callq 0x53c0
testb $0x1, -0x102(%rbp)
jne 0xaee5b
jmp 0xaee6c
movq -0x1d8(%rbp), %rdi
movl $0x48, %esi
callq 0x5350
jmp 0xaee6e
leaq -0xd8(%rbp), %rdi
callq 0x5200
leaq -0xd9(%rbp), %rdi
callq 0x53c0
jmp 0xaef3d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xaeed7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xaeebf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x5200
leaq -0x151(%rbp), %rdi
callq 0x53c0
leaq -0x128(%rbp), %rdi
callq 0x5200
leaq -0x129(%rbp), %rdi
callq 0x53c0
jmp 0xaef3d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xaef31
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xaef19
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x5200
leaq -0x1a1(%rbp), %rdi
callq 0x53c0
leaq -0x178(%rbp), %rdi
callq 0x5200
leaq -0x179(%rbp), %rdi
callq 0x53c0
movq -0x38(%rbp), %rdi
callq 0x55b0
nopw %cs:(%rax,%rax)