// File: /workspace/github_cpp_makefile_star2_O2/sighingnow[P]compile-pascal/pl0_x86.cpp
// Function: pl0_x86_gen(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<BasicBlock, std::allocator<BasicBlock>>&)
void pl0_x86_gen(std::string file, std::vector<BasicBlock> & bbs) {
    out.emit(string(";; file: ") + file);
    out.emit(string(""));
    out.emit(string("    bits 32\t\t;; 32bit machine"));
    out.emit(string("    cpu 686\t\t;; i686 CPU"));
    out.emit(string(""));
    out.emit(string(";; external functions (from standard C library)"));
    out.emit(string("    extern _scanf"));
    out.emit(string("    extern _printf"));
    out.emit(string("    extern _getchar"));
    out.emit(string(""));
    out.emit(string("section .text"));
    pl0_x86_gen_blocks(bbs);
    // dump all constant ascii string.
    out.emit(string(""));
    out.emit(string("section .data"));
    out.emit(string("    __fin_int:        db      \"%d\", 0x0"));
    out.emit(string("    __fin_char:       db      \"%c\", 0x0"));
    out.emit(string("    __fin_string:     db      \"%s\", 0x0"));
    out.emit(string("    __fout_int:       db      \"%d\", 0xA, 0x0"));
    out.emit(string("    __fout_char:      db      \"%c\", 0x0"));
    out.emit(string("    __fout_string:    db      \"%s\", 0xA, 0x0"));
    out.emit(string(""));
    out.emit(string("section .data"));
    for (auto && a: asciis) {
        out.emit(string("    __L") + a.second + ":\t\tdb\t\t\"" + a.first + "\", 0x0");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x358, %rsp            # imm = 0x358
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xaa26(%rip), %rsi      # 0x5ae54
leaq 0x10(%rsp), %rdi
leaq 0x2d8(%rsp), %rdx
callq 0xfa26
leaq 0x2b8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movq %r14, %rdx
callq 0xfda4
leaq 0x3c28c(%rip), %rdi     # 0x8c6e8
leaq 0x2b8(%rsp), %rsi
callq 0x4f2cc
leaq 0x2b8(%rsp), %rdi
callq 0x5120
leaq 0x10(%rsp), %rdi
callq 0x5120
leaq 0xb0b8(%rip), %rsi      # 0x5b53f
leaq 0x298(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xfa26
leaq 0x3c248(%rip), %rdi     # 0x8c6e8
leaq 0x298(%rsp), %rsi
callq 0x4f2cc
leaq 0x298(%rsp), %rdi
callq 0x5120
leaq 0xa99d(%rip), %rsi      # 0x5ae5e
leaq 0x278(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xfa26
leaq 0x3c20e(%rip), %rdi     # 0x8c6e8
leaq 0x278(%rsp), %rsi
callq 0x4f2cc
leaq 0x278(%rsp), %rdi
callq 0x5120
leaq 0xa981(%rip), %rsi      # 0x5ae7c
leaq 0x258(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xfa26
leaq 0x3c1d4(%rip), %rdi     # 0x8c6e8
leaq 0x258(%rsp), %rsi
callq 0x4f2cc
leaq 0x258(%rsp), %rdi
callq 0x5120
leaq 0xb00a(%rip), %rsi      # 0x5b53f
leaq 0x238(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xfa26
leaq 0x3c19a(%rip), %rdi     # 0x8c6e8
leaq 0x238(%rsp), %rsi
callq 0x4f2cc
leaq 0x238(%rsp), %rdi
callq 0x5120
leaq 0xa926(%rip), %rsi      # 0x5ae95
leaq 0x218(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xfa26
leaq 0x3c160(%rip), %rdi     # 0x8c6e8
leaq 0x218(%rsp), %rsi
callq 0x4f2cc
leaq 0x218(%rsp), %rdi
callq 0x5120
leaq 0xa91c(%rip), %rsi      # 0x5aec5
leaq 0x1f8(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xfa26
leaq 0x3c126(%rip), %rdi     # 0x8c6e8
leaq 0x1f8(%rsp), %rsi
callq 0x4f2cc
leaq 0x1f8(%rsp), %rdi
callq 0x5120
leaq 0xa8f4(%rip), %rsi      # 0x5aed7
leaq 0x1d8(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xfa26
leaq 0x3c0ec(%rip), %rdi     # 0x8c6e8
leaq 0x1d8(%rsp), %rsi
callq 0x4f2cc
leaq 0x1d8(%rsp), %rdi
callq 0x5120
leaq 0xa8cd(%rip), %rsi      # 0x5aeea
leaq 0x1b8(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xfa26
leaq 0x3c0b2(%rip), %rdi     # 0x8c6e8
leaq 0x1b8(%rsp), %rsi
callq 0x4f2cc
leaq 0x1b8(%rsp), %rdi
callq 0x5120
leaq 0xaee8(%rip), %rsi      # 0x5b53f
leaq 0x198(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xfa26
leaq 0x3c078(%rip), %rdi     # 0x8c6e8
leaq 0x198(%rsp), %rsi
callq 0x4f2cc
leaq 0x198(%rsp), %rdi
callq 0x5120
leaq 0xa86d(%rip), %rsi      # 0x5aefe
leaq 0x178(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xfa26
leaq 0x3c03e(%rip), %rdi     # 0x8c6e8
leaq 0x178(%rsp), %rsi
callq 0x4f2cc
leaq 0x178(%rsp), %rdi
callq 0x5120
movq %rbx, %rdi
xorl %esi, %esi
callq 0x50bfa
leaq 0xae6a(%rip), %rsi      # 0x5b53f
leaq 0x158(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xfa26
leaq 0x3bffa(%rip), %rdi     # 0x8c6e8
leaq 0x158(%rsp), %rsi
callq 0x4f2cc
leaq 0x158(%rsp), %rdi
callq 0x5120
leaq 0xa7fd(%rip), %rsi      # 0x5af0c
leaq 0x138(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xfa26
leaq 0x3bfc0(%rip), %rdi     # 0x8c6e8
leaq 0x138(%rsp), %rsi
callq 0x4f2cc
leaq 0x138(%rsp), %rdi
callq 0x5120
leaq 0xa7d1(%rip), %rsi      # 0x5af1a
leaq 0x118(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xfa26
leaq 0x3bf86(%rip), %rdi     # 0x8c6e8
leaq 0x118(%rsp), %rsi
callq 0x4f2cc
leaq 0x118(%rsp), %rdi
callq 0x5120
leaq 0xa7bf(%rip), %rsi      # 0x5af42
leaq 0xf8(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xfa26
leaq 0x3bf4c(%rip), %rdi     # 0x8c6e8
leaq 0xf8(%rsp), %rsi
callq 0x4f2cc
leaq 0xf8(%rsp), %rdi
callq 0x5120
leaq 0xa7ad(%rip), %rsi      # 0x5af6a
leaq 0xd8(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xfa26
leaq 0x3bf12(%rip), %rdi     # 0x8c6e8
leaq 0xd8(%rsp), %rsi
callq 0x4f2cc
leaq 0xd8(%rsp), %rdi
callq 0x5120
leaq 0xa79b(%rip), %rsi      # 0x5af92
leaq 0xb8(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xfa26
leaq 0x3bed8(%rip), %rdi     # 0x8c6e8
leaq 0xb8(%rsp), %rsi
callq 0x4f2cc
leaq 0xb8(%rsp), %rdi
callq 0x5120
leaq 0xa78e(%rip), %rsi      # 0x5afbf
leaq 0x98(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xfa26
leaq 0x3be9e(%rip), %rdi     # 0x8c6e8
leaq 0x98(%rsp), %rsi
callq 0x4f2cc
leaq 0x98(%rsp), %rdi
callq 0x5120
leaq 0xa77c(%rip), %rsi      # 0x5afe7
leaq 0x78(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xfa26
leaq 0x3be67(%rip), %rdi     # 0x8c6e8
leaq 0x78(%rsp), %rsi
callq 0x4f2cc
leaq 0x78(%rsp), %rdi
callq 0x5120
leaq 0xaca3(%rip), %rsi      # 0x5b53f
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xfa26
leaq 0x3be36(%rip), %rdi     # 0x8c6e8
leaq 0x58(%rsp), %rsi
callq 0x4f2cc
leaq 0x58(%rsp), %rdi
callq 0x5120
leaq 0xa63f(%rip), %rsi      # 0x5af0c
leaq 0x38(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xfa26
leaq 0x3be05(%rip), %rdi     # 0x8c6e8
leaq 0x38(%rsp), %rsi
callq 0x4f2cc
leaq 0x38(%rsp), %rdi
callq 0x5120
movq 0x3bf7a(%rip), %rbx     # 0x8c878
movq 0x3bf7b(%rip), %rax     # 0x8c880
movq %rax, 0x30(%rsp)
leaq 0x2f8(%rsp), %r15
leaq 0x318(%rsp), %r13
leaq 0x2d8(%rsp), %r14
leaq 0x10(%rsp), %r12
leaq 0x338(%rsp), %rbp
cmpq 0x30(%rsp), %rbx
je 0x509d6
movq %r15, %rdi
leaq 0xa6d0(%rip), %rsi      # 0x5b014
leaq 0xf(%rsp), %rdx
callq 0xfa26
addq $0x20, %rbx
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xfda4
movq %r14, %rdi
movq %r13, %rsi
leaq 0xa6af(%rip), %rdx      # 0x5b01c
callq 0xfd14
addq $-0x20, %rbx
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xfda4
movq %rbp, %rdi
movq %r12, %rsi
leaq 0xa5d2(%rip), %rdx      # 0x5af63
callq 0xfd14
leaq 0x3bd4b(%rip), %rdi     # 0x8c6e8
movq %rbp, %rsi
callq 0x4f2cc
movq %rbp, %rdi
callq 0x5120
movq %r12, %rdi
callq 0x5120
movq %r14, %rdi
callq 0x5120
movq %r13, %rdi
callq 0x5120
movq %r15, %rdi
callq 0x5120
addq $0x40, %rbx
jmp 0x5092f
addq $0x358, %rsp            # imm = 0x358
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
jmp 0x50bed
jmp 0x50bdd
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
jmp 0x50bed
jmp 0x50bdd
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
jmp 0x50bed
jmp 0x50bdd
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
jmp 0x50bed
jmp 0x50bdd
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
jmp 0x50bed
jmp 0x50bdd
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
jmp 0x50bed
jmp 0x50bdd
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
jmp 0x50bed
jmp 0x50bdd
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
jmp 0x50bed
jmp 0x50bdd
movq %rax, %rbx
leaq 0x138(%rsp), %rdi
jmp 0x50bed
jmp 0x50bdd
movq %rax, %rbx
leaq 0x158(%rsp), %rdi
jmp 0x50bed
jmp 0x50bdd
movq %rax, %rbx
leaq 0x178(%rsp), %rdi
jmp 0x50bed
jmp 0x50bdd
movq %rax, %rbx
leaq 0x198(%rsp), %rdi
jmp 0x50bed
jmp 0x50bdd
movq %rax, %rbx
leaq 0x1b8(%rsp), %rdi
jmp 0x50bed
jmp 0x50bdd
movq %rax, %rbx
leaq 0x1d8(%rsp), %rdi
jmp 0x50bed
jmp 0x50bdd
movq %rax, %rbx
leaq 0x1f8(%rsp), %rdi
jmp 0x50bed
jmp 0x50bdd
movq %rax, %rbx
leaq 0x218(%rsp), %rdi
jmp 0x50bed
jmp 0x50bdd
movq %rax, %rbx
leaq 0x238(%rsp), %rdi
jmp 0x50bed
jmp 0x50bdd
movq %rax, %rbx
leaq 0x258(%rsp), %rdi
jmp 0x50bed
jmp 0x50bdd
movq %rax, %rbx
leaq 0x278(%rsp), %rdi
jmp 0x50bed
jmp 0x50bdd
movq %rax, %rbx
leaq 0x298(%rsp), %rdi
jmp 0x50bed
jmp 0x50bdd
movq %rax, %rbx
leaq 0x2b8(%rsp), %rdi
callq 0x5120
jmp 0x50b8f
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
jmp 0x50bed
jmp 0x50bdd
movq %rax, %rbx
jmp 0x50bce
movq %rax, %rbx
jmp 0x50bc1
movq %rax, %rbx
jmp 0x50bb7
movq %rax, %rbx
leaq 0x338(%rsp), %rdi
callq 0x5120
leaq 0x10(%rsp), %rdi
callq 0x5120
leaq 0x2d8(%rsp), %rdi
callq 0x5120
leaq 0x318(%rsp), %rdi
callq 0x5120
jmp 0x50be5
movq %rax, %rbx
jmp 0x50bf2
movq %rax, %rbx
leaq 0x2f8(%rsp), %rdi
callq 0x5120
movq %rbx, %rdi
callq 0x53f0