// File: sighingnow[P]compile-pascal/pl0_x86.cpp
// Function: x86_gen_def[abi:cxx11](TAC&)
static std::string x86_gen_def(TAC & code) {
    int size = 0;
    if (code.rs->sv == "integer") {
        size = code.rt->iv == -1 ? 4 : (code.rt->iv * 4);
    }
    else {
        size = code.rt->iv == -1 ? 4 : (code.rt->iv * 4); // TODO
    }
    dist -= size;
    runtime.push(LOC(code.rd->sv, dist));
    return string("    sub esp, ") + to_string(size) + "\t\t;; " + code.str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x148(%rbp)
movq %rdi, %rax
movq %rax, -0x140(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
addq $0x8, %rdi
leaq 0xe609(%rip), %rsi      # 0xef247
callq 0x2a580
testb $0x1, %al
jne 0xe0c49
jmp 0xe0c83
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
cmpl $-0x1, 0x4(%rax)
jne 0xe0c64
movl $0x4, %eax
movl %eax, -0x14c(%rbp)
jmp 0xe0c78
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl 0x4(%rax), %eax
shll $0x2, %eax
movl %eax, -0x14c(%rbp)
movl -0x14c(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0xe0cbb
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
cmpl $-0x1, 0x4(%rax)
jne 0xe0c9e
movl $0x4, %eax
movl %eax, -0x150(%rbp)
jmp 0xe0cb2
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl 0x4(%rax), %eax
shll $0x2, %eax
movl %eax, -0x150(%rbp)
movl -0x150(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movl 0x7fcac(%rip), %eax     # 0x160970
subl %ecx, %eax
movl %eax, 0x7fca4(%rip)     # 0x160970
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
addq $0x8, %rsi
leaq -0x80(%rbp), %rdi
movq %rdi, -0x158(%rbp)
callq 0x5150
movq -0x158(%rbp), %rsi
movl 0x7fc7b(%rip), %edx     # 0x160970
leaq -0x60(%rbp), %rdi
xorl %ecx, %ecx
callq 0xdb170
jmp 0xe0d02
leaq 0x7fb17(%rip), %rdi     # 0x160820
leaq -0x60(%rbp), %rsi
callq 0xdb140
jmp 0xe0d14
leaq -0x60(%rbp), %rdi
callq 0xdac70
leaq -0x80(%rbp), %rdi
callq 0x5200
leaq -0xf1(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x55d0
movq -0x160(%rbp), %rdx
leaq 0x10a36(%rip), %rsi     # 0xf177d
leaq -0xf0(%rbp), %rdi
callq 0x19840
jmp 0xe0d55
movl -0x14(%rbp), %esi
leaq -0x118(%rbp), %rdi
callq 0xa3920
jmp 0xe0d66
leaq -0xd0(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
leaq -0x118(%rbp), %rdx
callq 0x1a3d0
jmp 0xe0d82
leaq 0x10a02(%rip), %rdx     # 0xf178b
leaq -0xb0(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x1a380
jmp 0xe0d9e
movq -0x10(%rbp), %rsi
leaq -0x138(%rbp), %rdi
callq 0x9fa70
jmp 0xe0db0
movq -0x148(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
leaq -0x138(%rbp), %rdx
callq 0x1a3d0
jmp 0xe0dcc
leaq -0x138(%rbp), %rdi
callq 0x5200
leaq -0xb0(%rbp), %rdi
callq 0x5200
leaq -0xd0(%rbp), %rdi
callq 0x5200
leaq -0x118(%rbp), %rdi
callq 0x5200
leaq -0xf0(%rbp), %rdi
callq 0x5200
leaq -0xf1(%rbp), %rdi
callq 0x53c0
movq -0x140(%rbp), %rax
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xe0e53
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0xdac70
leaq -0x80(%rbp), %rdi
callq 0x5200
jmp 0xe0f22
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xe0f16
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xe0f0a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xe0efe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xe0ef2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0xe0ee6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x5200
leaq -0xb0(%rbp), %rdi
callq 0x5200
leaq -0xd0(%rbp), %rdi
callq 0x5200
leaq -0x118(%rbp), %rdi
callq 0x5200
leaq -0xf0(%rbp), %rdi
callq 0x5200
leaq -0xf1(%rbp), %rdi
callq 0x53c0
movq -0x88(%rbp), %rdi
callq 0x55b0
nop