// File: /workspace/github_c_makefile_star2_O1/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 0x5af4
movq %rax, -0x88(%rbp)
movq %rdx, -0x80(%rbp)
movq $0x0, -0x78(%rbp)
cmpl $0x0, (%r13)
jle 0x2d50
xorl %r14d, %r14d
movq %r13, -0x40(%rbp)
movq 0x8(%r13), %rax
movq (%rax,%r14,8), %rbx
movl (%rbx), %eax
cmpl $0x2, %eax
je 0x2cd4
testl %eax, %eax
jne 0x2a3b
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x2cd4
cmpl $0x0, 0x46c(%rbx)
jne 0x2cd4
movl 0x468(%rbx), %esi
callq 0xb126
jmp 0x2cd4
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 0x2ab2
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 0x2ade
callq 0xa563
jmp 0x2ae3
callq 0xa3ff
testl %r15d, %r15d
jle 0x2b7a
xorl %r14d, %r14d
cmpq $0x6, %r14
je 0x2d93
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 0xb7b7(%rip), %rsi      # 0xe2d3
callq 0x9529
cmpl $0x8, %eax
je 0x2b5c
cmpl $0x4, %eax
je 0x2b48
cmpl $0x1, %eax
jne 0x2d9f
movl %r14d, %edi
callq 0xb7a2
movq %rax, %rdi
movl %ebx, %esi
callq 0xb1ef
jmp 0x2b6e
movl %r14d, %edi
callq 0xb7a2
movq %rax, %rdi
movl %ebx, %esi
callq 0xb238
jmp 0x2b6e
movl %r14d, %edi
callq 0xb6e6
movq %rax, %rdi
movl %ebx, %esi
callq 0xb281
incq %r14
cmpq %r14, %r15
jne 0x2aef
movq -0x30(%rbp), %rax
cmpl $0x0, 0x464(%rax)
je 0x2bb9
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 0xb617
movl -0x4c(%rbp), %edi
callq 0xb53f
leaq -0x4c8(%rbp), %rdi
callq 0x2dc3
movq %rax, %r14
movq %rdx, %r15
callq 0xa39e
movq %rax, %rbx
testl %r14d, %r14d
jle 0x2c2c
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
xorl %r12d, %r12d
movq (%r15,%r12,8), %r13
cmpl $0x2, (%r13)
jne 0x2c24
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 0xa2d8
incq %r12
cmpq %r12, %r14
jne 0x2be2
movq %rbx, -0x60(%rbp)
leaq -0x98(%rbp), %rdi
leaq -0x4c8(%rbp), %rsi
callq 0x2468
cmpl $0x7, -0xe8(%rbp)
movl -0x94(%rbp), %edi
jne 0x2c66
cmpl $-0x1, %edi
movq -0x40(%rbp), %r13
movq -0x48(%rbp), %r14
je 0x2ccf
callq 0xac08
jmp 0x2ccf
cmpl $-0x1, %edi
movq -0x40(%rbp), %r13
movq -0x48(%rbp), %r14
je 0x2dab
leaq -0xe8(%rbp), %rdi
callq 0x9516
testl %eax, %eax
movq -0x30(%rbp), %r15
je 0x2ce6
cmpl $0x0, 0x464(%r15)
jne 0x2db7
movl 0x45c(%r15), %ebx
cmpl $0x0, 0x458(%r15)
movl -0x94(%rbp), %esi
je 0x2d25
movl %esi, %edi
callq 0xac08
movl 0x460(%r15), %esi
movl $0x8, %edi
callq 0xa82e
movl %ebx, %edi
callq 0xb4af
callq 0xa75b
incq %r14
movslq (%r13), %rax
cmpq %rax, %r14
jl 0x29fa
jmp 0x2d50
cmpl $0x0, 0x464(%r15)
je 0x2d2e
movl -0x98(%rbp), %ebx
incl %ebx
movl %ebx, -0x98(%rbp)
leaq -0xe8(%rbp), %rdi
leaq 0xbc5f(%rip), %rsi      # 0xe96b
callq 0x9529
movl -0x94(%rbp), %esi
movl -0x4c(%rbp), %edx
movl %eax, %edi
movl %ebx, %ecx
callq 0xb582
jmp 0x2cd4
movl %ebx, %edi
callq 0xa611
jmp 0x2cd4
leaq -0xe8(%rbp), %rdi
leaq 0xbc2f(%rip), %rsi      # 0xe96b
callq 0x9529
movl -0x94(%rbp), %esi
movl %eax, %edi
callq 0xa5b7
jmp 0x2cd4
cmpl $0x0, -0x88(%rbp)
jle 0x2d81
xorl %ebx, %ebx
movq -0x80(%rbp), %rax
movq (%rax,%rbx,8), %rdi
callq 0xc17b
movl %ebx, %edi
movq %rax, %rsi
callq 0xb0e6
incq %rbx
movslq -0x88(%rbp), %rax
cmpq %rax, %rbx
jl 0x2d5b
addq $0x4a8, %rsp            # imm = 0x4A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb50a(%rip), %rdi      # 0xe2a4
callq 0x94cd
leaq 0xb54f(%rip), %rdi      # 0xe2f5
callq 0x94cd
leaq 0xb56b(%rip), %rdi      # 0xe31d
callq 0x9492
leaq 0xb596(%rip), %rdi      # 0xe354
callq 0x94cd