// File: lhydave[P]SysYCompilerLab/back/emit_tigger.cpp
// Function: tigger::emit_global_var[abi:cxx11](int, int, int, bool)
string emit_global_var(int No, int num, int size, bool is_array)
{
	seq.push_back(
		make_shared<global_var>("v" + to_string(No), is_array, size, num));
	if (is_array)
		return "v" + to_string(No) + " = malloc " + to_string(size) + "\n";
	return "v" + to_string(No) + " = " + to_string(num) + "\n";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x200, %rsp            # imm = 0x200
movq %rdi, -0x1e0(%rbp)
movb %r8b, %al
movq %rdi, %r8
movq %r8, -0x1d8(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
andb $0x1, %al
movb %al, -0x15(%rbp)
movl -0xc(%rbp), %esi
leaq -0x78(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x13410
movq -0x1d0(%rbp), %rdx
leaq 0x1a3d0(%rip), %rsi     # 0x4eb62
leaq -0x58(%rbp), %rdi
callq 0x14000
jmp 0x3479d
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x15(%rbp), %rdx
leaq -0x14(%rbp), %rcx
leaq -0x10(%rbp), %r8
callq 0x35f50
jmp 0x347b8
leaq -0x28(%rbp), %rdi
movq %rdi, -0x1e8(%rbp)
leaq -0x38(%rbp), %rsi
callq 0x35fe0
movq -0x1e8(%rbp), %rsi
leaq 0x3e27e(%rip), %rdi     # 0x72a58
callq 0x35f20
jmp 0x347e1
leaq -0x28(%rbp), %rdi
callq 0x36010
leaq -0x38(%rbp), %rdi
callq 0x36030
leaq -0x58(%rbp), %rdi
callq 0x56c0
leaq -0x78(%rbp), %rdi
callq 0x56c0
testb $0x1, -0x15(%rbp)
je 0x349d5
movl -0xc(%rbp), %esi
leaq -0x108(%rbp), %rdi
movq %rdi, -0x1f0(%rbp)
callq 0x13410
movq -0x1f0(%rbp), %rdx
leaq 0x1a32f(%rip), %rsi     # 0x4eb62
leaq -0xe8(%rbp), %rdi
callq 0x14000
jmp 0x34841
leaq 0x19e92(%rip), %rdx     # 0x4e6da
leaq -0xc8(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x12d10
jmp 0x3485d
movl -0x14(%rbp), %esi
leaq -0x128(%rbp), %rdi
callq 0x13410
jmp 0x3486e
leaq -0xa8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0x128(%rbp), %rdx
callq 0x13340
jmp 0x3488a
movq -0x1e0(%rbp), %rdi
leaq 0x193a8(%rip), %rdx     # 0x4dc40
leaq -0xa8(%rbp), %rsi
callq 0x12d10
jmp 0x348a6
leaq -0xa8(%rbp), %rdi
callq 0x56c0
leaq -0x128(%rbp), %rdi
callq 0x56c0
leaq -0xc8(%rbp), %rdi
callq 0x56c0
leaq -0xe8(%rbp), %rdi
callq 0x56c0
leaq -0x108(%rbp), %rdi
callq 0x56c0
jmp 0x34b3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x34933
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x3492a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x36010
leaq -0x38(%rbp), %rdi
callq 0x36030
leaq -0x58(%rbp), %rdi
callq 0x56c0
leaq -0x78(%rbp), %rdi
callq 0x56c0
jmp 0x34b4e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x349c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x349b8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x349ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x349a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x56c0
leaq -0x128(%rbp), %rdi
callq 0x56c0
leaq -0xc8(%rbp), %rdi
callq 0x56c0
leaq -0xe8(%rbp), %rdi
callq 0x56c0
leaq -0x108(%rbp), %rdi
callq 0x56c0
jmp 0x34b4e
movl -0xc(%rbp), %esi
leaq -0x1a8(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
callq 0x13410
movq -0x1f8(%rbp), %rdx
leaq 0x1a169(%rip), %rsi     # 0x4eb62
leaq -0x188(%rbp), %rdi
callq 0x14000
jmp 0x34a07
leaq 0x19181(%rip), %rdx     # 0x4db8f
leaq -0x168(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0x12d10
jmp 0x34a23
movl -0x10(%rbp), %esi
leaq -0x1c8(%rbp), %rdi
callq 0x13410
jmp 0x34a34
leaq -0x148(%rbp), %rdi
leaq -0x168(%rbp), %rsi
leaq -0x1c8(%rbp), %rdx
callq 0x13340
jmp 0x34a50
movq -0x1e0(%rbp), %rdi
leaq 0x191e2(%rip), %rdx     # 0x4dc40
leaq -0x148(%rbp), %rsi
callq 0x12d10
jmp 0x34a6c
leaq -0x148(%rbp), %rdi
callq 0x56c0
leaq -0x1c8(%rbp), %rdi
callq 0x56c0
leaq -0x168(%rbp), %rdi
callq 0x56c0
leaq -0x188(%rbp), %rdi
callq 0x56c0
leaq -0x1a8(%rbp), %rdi
callq 0x56c0
jmp 0x34b3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x34b30
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x34b24
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x34b18
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x34b0c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x148(%rbp), %rdi
callq 0x56c0
leaq -0x1c8(%rbp), %rdi
callq 0x56c0
leaq -0x168(%rbp), %rdi
callq 0x56c0
leaq -0x188(%rbp), %rdi
callq 0x56c0
leaq -0x1a8(%rbp), %rdi
callq 0x56c0
jmp 0x34b4e
movq -0x1d8(%rbp), %rax
addq $0x200, %rsp            # imm = 0x200
popq %rbp
retq
movq -0x80(%rbp), %rdi
callq 0x5610
nopw (%rax,%rax)