// File: lhydave[P]SysYCompilerLab/back/no_alloc.cpp
// Function: no_alloc::gen_code()
void gen_code()
{
	// for global variables
	auto globals = func_table[""].temps;
	int global_cnt = 0;
	for (auto i : globals)
	{
		auto j = i.second;
		global_var2no[j.eeyore_name] = global_cnt;
		if (j.is_array)
			tigger_dst << emit_global_var(global_cnt, 0, j.size, true);
		else
			tigger_dst << emit_global_var(global_cnt);
		global_cnt++;
		dbg_printf("global var %s init\n", j.eeyore_name.c_str());
	}
	if (!globals.empty())
		tigger_dst << "\n";
	// generate functions
	for (auto i : funcnames)
		gen_func(func_table[i]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
leaq -0x59(%rbp), %rdi
movq %rdi, -0x178(%rbp)
callq 0x5620
movq -0x178(%rbp), %rdx
leaq 0xfcd7(%rip), %rsi      # 0x4ec60
leaq -0x58(%rbp), %rdi
callq 0x8780
jmp 0x3ef94
leaq 0x33815(%rip), %rdi     # 0x727b0
leaq -0x58(%rbp), %rsi
callq 0x241f0
movq %rax, -0x180(%rbp)
jmp 0x3efad
movq -0x180(%rbp), %rsi
addq $0x20, %rsi
leaq -0x38(%rbp), %rdi
callq 0x41d30
jmp 0x3efc3
leaq -0x58(%rbp), %rdi
callq 0x56c0
leaq -0x59(%rbp), %rdi
callq 0x5370
movl $0x0, -0x70(%rbp)
leaq -0x38(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rdi
callq 0x41d60
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rdi
callq 0x41d90
movq %rax, -0x88(%rbp)
leaq -0x80(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x41dc0
testb $0x1, %al
jne 0x3f01a
jmp 0x3f1f5
leaq -0x80(%rbp), %rdi
callq 0x41df0
movq %rax, %rsi
leaq -0xd0(%rbp), %rdi
callq 0x41e20
jmp 0x3f034
leaq -0xb0(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x41e80
jmp 0x3f049
movl -0x70(%rbp), %eax
movl %eax, -0x18c(%rbp)
leaq 0x33b4f(%rip), %rdi     # 0x72ba8
leaq -0xf8(%rbp), %rsi
callq 0x41ec0
movq %rax, -0x188(%rbp)
jmp 0x3f06e
movq -0x188(%rbp), %rax
movl -0x18c(%rbp), %ecx
movl %ecx, (%rax)
testb $0x1, -0xd4(%rbp)
je 0x3f150
movl -0x70(%rbp), %esi
movl -0xd8(%rbp), %ecx
leaq -0x118(%rbp), %rdi
xorl %edx, %edx
movl $0x1, %r8d
callq 0x34740
jmp 0x3f0a9
leaq 0x33408(%rip), %rdi     # 0x724b8
leaq -0x118(%rbp), %rsi
callq 0x52b0
jmp 0x3f0be
leaq -0x118(%rbp), %rdi
callq 0x56c0
jmp 0x3f1a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x3f0f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x56c0
leaq -0x59(%rbp), %rdi
callq 0x5370
jmp 0x3f2fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x3f2f3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x3f1e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x3f1d8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x56c0
jmp 0x3f1d8
movl -0x70(%rbp), %esi
leaq -0x138(%rbp), %rdi
movl $0x4, %ecx
xorl %r8d, %r8d
movl %r8d, %edx
callq 0x34740
jmp 0x3f16c
leaq 0x33345(%rip), %rdi     # 0x724b8
leaq -0x138(%rbp), %rsi
callq 0x52b0
jmp 0x3f181
leaq -0x138(%rbp), %rdi
callq 0x56c0
jmp 0x3f1a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x56c0
jmp 0x3f1d8
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x26140
leaq -0xd0(%rbp), %rdi
callq 0x26110
leaq -0x80(%rbp), %rdi
callq 0x41ef0
jmp 0x3f001
leaq -0xf8(%rbp), %rdi
callq 0x26140
leaq -0xd0(%rbp), %rdi
callq 0x26110
jmp 0x3f2f3
leaq -0x38(%rbp), %rdi
callq 0x41f20
testb $0x1, %al
jne 0x3f219
leaq 0x332af(%rip), %rdi     # 0x724b8
leaq 0xea30(%rip), %rsi      # 0x4dc40
callq 0x52f0
jmp 0x3f217
jmp 0x3f219
leaq 0x335c8(%rip), %rax     # 0x727e8
movq %rax, -0x140(%rbp)
leaq 0x335ba(%rip), %rdi     # 0x727e8
callq 0x273e0
movq %rax, -0x148(%rbp)
leaq 0x335a7(%rip), %rdi     # 0x727e8
callq 0x27260
movq %rax, -0x150(%rbp)
leaq -0x148(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x41f40
testb $0x1, %al
jne 0x3f266
jmp 0x3f2e1
leaq -0x148(%rbp), %rdi
callq 0x41f80
movq %rax, %rsi
leaq -0x170(%rbp), %rdi
callq 0x5170
jmp 0x3f283
leaq 0x33526(%rip), %rdi     # 0x727b0
leaq -0x170(%rbp), %rsi
callq 0x26e40
movq %rax, -0x198(%rbp)
jmp 0x3f29f
movq -0x198(%rbp), %rdi
callq 0x3f310
jmp 0x3f2ad
leaq -0x170(%rbp), %rdi
callq 0x56c0
leaq -0x148(%rbp), %rdi
callq 0x41fa0
jmp 0x3f24d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x56c0
jmp 0x3f2f3
leaq -0x38(%rbp), %rdi
callq 0x26890
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x26890
movq -0x68(%rbp), %rdi
callq 0x5610
nopw %cs:(%rax,%rax)