// File: /workspace/github_c_makefile_star2_O3/hsjoihs[P]c-compiler/codegen.c
// Function: generate
void generate(const struct Vector /*<Toplevel>*/ *ref_vec)
{
	struct PrinterState prs;
	prs.final_label_name = 1;
	prs.return_label_name = -1;
	prs.string_constant_pool = init_vector();
	prs.pool_largest_id = 0;
	prs.is_inside_switch = 0;

	for (int i = 0; i < ref_vec->length; i++) {
		const struct Toplevel *ptr = ref_vec->vector[i];
		print_toplevel_definition(&prs, ptr);
	}

	for (int i = 0; i < prs.string_constant_pool.length; ++i) {
		const char *str = prs.string_constant_pool.vector[i];
		gen_string_literal(i, escape(str));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4a8, %rsp            # imm = 0x4A8
movq %rdi, %r13
movabsq $-0xffffffff, %rax      # imm = 0xFFFFFFFF00000001
movq %rax, -0x98(%rbp)
callq 0x5cf8
movq %rax, -0x88(%rbp)
movq %rdx, -0x80(%rbp)
movq $0x0, -0x78(%rbp)
cmpl $0x0, (%r13)
jle 0x2d59
xorl %r14d, %r14d
movq %r13, -0x40(%rbp)
movq 0x8(%r13), %rax
movq (%rax,%r14,8), %rbx
movl (%rbx), %eax
cmpl $0x2, %eax
je 0x2cd7
testl %eax, %eax
jne 0x2a3e
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x2cd7
cmpl $0x0, 0x46c(%rbx)
jne 0x2cd7
movl 0x468(%rbx), %esi
callq 0xb192
jmp 0x2cd7
xorl %edi, %edi
cmpl $0x1, %eax
sete %dil
xorl %eax, %eax
callq 0x243c
leaq 0x60(%rbx), %rsi
movl $0x390, %edx            # imm = 0x390
leaq -0x4c8(%rbp), %rdi
callq 0x1100
movl 0x3f0(%rbx), %r15d
movq 0x3f8(%rbx), %r12
leaq 0x400(%rbx), %rsi
movl $0xa, %ecx
leaq -0xe8(%rbp), %rdi
rep  movsq (%rsi), %es:(%rdi)
movq 0x8(%rbx), %rsi
movq $-0x1, -0x94(%rbp)
movl $0xffffffff, -0x8c(%rbp) # imm = 0xFFFFFFFF
movq %rbx, -0x30(%rbp)
movl 0x464(%rbx), %eax
movl %eax, -0x58(%rbp)
testl %eax, %eax
je 0x2ab5
movl %r15d, -0x54(%rbp)
movq -0x30(%rbp), %rdx
movl 0x450(%rdx), %ecx
leal 0xc0(%rcx), %edi
testl %eax, %eax
cmovel %ecx, %edi
cmpl $0x0, 0x454(%rdx)
movq %r14, -0x48(%rbp)
movl %edi, -0x34(%rbp)
je 0x2ae1
callq 0xa5cf
jmp 0x2ae6
callq 0xa46b
testl %r15d, %r15d
jle 0x2b7d
xorl %r14d, %r14d
cmpq $0x6, %r14
je 0x2d97
movq (%r12,%r14,8), %rsi
movl 0x50(%rsi), %ebx
movl $0xa, %ecx
leaq -0x138(%rbp), %rax
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %rax, %rdi
leaq 0xb7b4(%rip), %rsi      # 0xe2d3
callq 0x95dd
cmpl $0x8, %eax
je 0x2b5f
cmpl $0x4, %eax
je 0x2b4b
cmpl $0x1, %eax
jne 0x2da3
movl %r14d, %edi
callq 0xb80e
movq %rax, %rdi
movl %ebx, %esi
callq 0xb25b
jmp 0x2b71
movl %r14d, %edi
callq 0xb80e
movq %rax, %rdi
movl %ebx, %esi
callq 0xb2a4
jmp 0x2b71
movl %r14d, %edi
callq 0xb752
movq %rax, %rdi
movl %ebx, %esi
callq 0xb2ed
incq %r14
cmpq %r14, %r15
jne 0x2af2
movq -0x30(%rbp), %rax
cmpl $0x0, 0x464(%rax)
je 0x2bbc
movl -0x98(%rbp), %edx
incl %edx
movl %edx, -0x98(%rbp)
movl $0x8, %edi
movl -0x34(%rbp), %eax
subl %eax, %edi
negl %eax
movl %edi, -0x50(%rbp)
movl %eax, -0x4c(%rbp)
movl $0x1, %esi
callq 0xb683
movl -0x4c(%rbp), %edi
callq 0xb5ab
leaq -0x4c8(%rbp), %rdi
callq 0x2dc7
movq %rax, %r14
movq %rdx, %r15
callq 0xa40d
movq %rax, %rbx
testl %r14d, %r14d
jle 0x2c2f
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
xorl %r12d, %r12d
movq (%r15,%r12,8), %r13
cmpl $0x2, (%r13)
jne 0x2c27
movl $0x1, %edi
movl $0x18, %esi
callq 0x10d0
movl -0x98(%rbp), %ecx
incl %ecx
movl %ecx, -0x98(%rbp)
movl %ecx, (%rax)
movups (%r13), %xmm0
movups %xmm0, 0x8(%rax)
movq 0x8(%r13), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0xa344
incq %r12
cmpq %r12, %r14
jne 0x2be5
movq %rbx, -0x60(%rbp)
leaq -0x98(%rbp), %rdi
leaq -0x4c8(%rbp), %rsi
callq 0x2468
cmpl $0x7, -0xe8(%rbp)
movl -0x94(%rbp), %edi
jne 0x2c69
cmpl $-0x1, %edi
movq -0x40(%rbp), %r13
movq -0x48(%rbp), %r14
je 0x2cd2
callq 0xac74
jmp 0x2cd2
cmpl $-0x1, %edi
movq -0x40(%rbp), %r13
movq -0x48(%rbp), %r14
je 0x2daf
leaq -0xe8(%rbp), %rdi
callq 0x95ca
testl %eax, %eax
movq -0x30(%rbp), %r15
je 0x2ce9
cmpl $0x0, 0x464(%r15)
jne 0x2dbb
movl 0x45c(%r15), %ebx
cmpl $0x0, 0x458(%r15)
movl -0x94(%rbp), %esi
je 0x2d28
movl %esi, %edi
callq 0xac74
movl 0x460(%r15), %esi
movl $0x8, %edi
callq 0xa89a
movl %ebx, %edi
callq 0xb51b
callq 0xa7c7
incq %r14
movslq (%r13), %rax
cmpq %rax, %r14
jl 0x29fd
jmp 0x2d53
cmpl $0x0, 0x464(%r15)
je 0x2d31
movl -0x98(%rbp), %ebx
incl %ebx
movl %ebx, -0x98(%rbp)
leaq -0xe8(%rbp), %rdi
leaq 0xbc38(%rip), %rsi      # 0xe947
callq 0x95dd
movl -0x94(%rbp), %esi
movl -0x4c(%rbp), %edx
movl %eax, %edi
movl %ebx, %ecx
callq 0xb5ee
jmp 0x2cd7
movl %ebx, %edi
callq 0xa67d
jmp 0x2cd7
leaq -0xe8(%rbp), %rdi
leaq 0xbc08(%rip), %rsi      # 0xe947
callq 0x95dd
movl -0x94(%rbp), %esi
movl %eax, %edi
callq 0xa623
jmp 0x2cd7
movl -0x88(%rbp), %eax
testl %eax, %eax
jle 0x2d85
xorl %ebx, %ebx
movq -0x80(%rbp), %rax
movq (%rax,%rbx,8), %rdi
callq 0xc1eb
movl %ebx, %edi
movq %rax, %rsi
callq 0xb152
incq %rbx
movslq -0x88(%rbp), %rax
cmpq %rax, %rbx
jl 0x2d5f
addq $0x4a8, %rsp            # imm = 0x4A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb506(%rip), %rdi      # 0xe2a4
callq 0x9581
leaq 0xb54b(%rip), %rdi      # 0xe2f5
callq 0x9581
leaq 0xb567(%rip), %rdi      # 0xe31d
callq 0x9546
leaq 0xb592(%rip), %rdi      # 0xe354
callq 0x9581