// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/compile-i386.c
// Function: emit_array
static void emit_array(struct symbol *sym)
{
	struct symbol *base_type = sym->ctype.base_type;
	struct expression *expr = sym->initializer;
	struct expression *entry;

	assert(base_type != NULL);

	stor_sym_init(sym);

	ea_last = -1;

	emit_object_pre(show_ident(sym->ident), sym->ctype.modifiers,
		        sym->ctype.alignment,
			sym->bit_size / 8);

	sort_array(expr);

	FOR_EACH_PTR(expr->expr_list, entry) {
		if (entry->type == EXPR_VALUE) {
			ea_current = 0;
			emit_initializer(sym, entry);
			ea_last = ea_current;
		} else if (entry->type == EXPR_POS) {
			ea_current =
			    entry->init_offset / (base_type->bit_size / 8);
			emit_initializer(sym, entry->init_expr);
			ea_last = ea_current;
		}
	} END_FOR_EACH_PTR(entry);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0xb0(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x61530
jmp 0x6154f
leaq 0x1124b(%rip), %rdi     # 0x72782
leaq 0x11256(%rip), %rsi     # 0x72794
movl $0x41f, %edx            # imm = 0x41F
leaq 0x11259(%rip), %rcx     # 0x727a3
callq 0x11140
movq -0x8(%rbp), %rdi
callq 0x61950
movl $0xffffffff, 0x5e846(%rip) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x314b0
movq %rax, %rdi
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movl 0x50(%rax), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movq -0x48(%rbp), %rdx
movl %eax, %ecx
callq 0x61770
movq -0x18(%rbp), %rdi
callq 0x624e0
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x615d1
jmp 0x616d9
jmp 0x615d3
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x30(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x616c1
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x61625
cmpq $0x0, -0x20(%rbp)
jne 0x61625
jmp 0x616b3
movq -0x20(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x1, %eax
jne 0x6165a
movl $0x0, 0x5e76d(%rip)     # 0xbfdac
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x627b0
movl 0x5e75a(%rip), %eax     # 0xbfdac
movl %eax, 0x5e750(%rip)     # 0xbfda8
jmp 0x616b1
movq -0x20(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x1b, %eax
jne 0x616af
movq -0x20(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rax
movl 0x50(%rax), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x4c(%rbp), %eax
xorl %edx, %edx
divl %ecx
movl %eax, 0x5e71a(%rip)     # 0xbfdac
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x627b0
movl 0x5e703(%rip), %eax     # 0xbfdac
movl %eax, 0x5e6f9(%rip)     # 0xbfda8
jmp 0x616b1
jmp 0x616b3
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x615da
jmp 0x616c3
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq -0x28(%rbp), %rax
jne 0x615d3
addq $0x50, %rsp
popq %rbp
retq
nop