// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/compile-i386.c
// Function: emit_func_pre
static void emit_func_pre(struct symbol *sym)
{
	struct function *f;
	struct symbol *arg;
	unsigned int i, argc = 0, alloc_len;
	unsigned char *mem;
	struct symbol_private *privbase;
	struct storage *storage_base;
	struct symbol *base_type = sym->ctype.base_type;

	FOR_EACH_PTR(base_type->arguments, arg) {
		argc++;
	} END_FOR_EACH_PTR(arg);

	alloc_len =
		sizeof(*f) +
		(argc * sizeof(struct symbol *)) +
		(argc * sizeof(struct symbol_private)) +
		(argc * sizeof(struct storage));
	mem = calloc(1, alloc_len);
	if (!mem)
		die("OOM on func info");

	f		=  (struct function *) mem;
	mem		+= sizeof(*f);
	f->argv		=  (struct symbol **) mem;
	mem		+= (argc * sizeof(struct symbol *));
	privbase	=  (struct symbol_private *) mem;
	mem		+= (argc * sizeof(struct symbol_private));
	storage_base	=  (struct storage *) mem;

	f->argc = argc;
	f->ret_target = new_label();

	i = 0;
	FOR_EACH_PTR(base_type->arguments, arg) {
		f->argv[i] = arg;
		arg->aux = &privbase[i];
		storage_base[i].type = STOR_ARG;
		storage_base[i].idx = i;
		privbase[i].addr = &storage_base[i];
		i++;
	} END_FOR_EACH_PTR(arg);

	assert(current_func == NULL);
	current_func = f;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x61ada
jmp 0x61b4f
jmp 0x61adc
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
movq -0x58(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x61b3b
movq -0x58(%rbp), %rax
movslq -0x64(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x58(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x61b27
cmpq $0x0, -0x18(%rbp)
jne 0x61b27
jmp 0x61b30
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x61ae3
jmp 0x61b3d
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x58(%rbp)
cmpq -0x50(%rbp), %rax
jne 0x61adc
movl -0x20(%rbp), %eax
shlq $0x3, %rax
addq $0x38, %rax
movl -0x20(%rbp), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movl -0x20(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, %esi
movl $0x1, %edi
callq 0x111d0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x61b99
leaq 0x10d7f(%rip), %rdi     # 0x72911
movb $0x0, %al
callq 0x17200
movq -0x30(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x30(%rbp), %rax
addq $0x38, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movl -0x20(%rbp), %eax
shlq $0x3, %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x20(%rbp), %eax
shlq $0x3, %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x20(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x30(%rax)
callq 0x62b30
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x34(%rax)
movl $0x0, -0x1c(%rbp)
movq -0x48(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x70(%rbp)
jne 0x61c31
jmp 0x61d2d
jmp 0x61c33
movl $0x0, -0x84(%rbp)
movl -0x84(%rbp), %eax
movq -0x78(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x61d15
movq -0x78(%rbp), %rax
movslq -0x84(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x78(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x61c8b
cmpq $0x0, -0x18(%rbp)
jne 0x61c8b
jmp 0x61d01
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x1c(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movq -0x38(%rbp), %rcx
movl -0x1c(%rbp), %eax
shlq $0x3, %rax
addq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0xd0(%rax)
movq -0x40(%rbp), %rax
movl -0x1c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl $0x1, (%rax)
movl -0x1c(%rbp), %ecx
movq -0x40(%rbp), %rax
movl -0x1c(%rbp), %edx
imulq $0x30, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x20(%rax)
movq -0x40(%rbp), %rdx
movl -0x1c(%rbp), %eax
imulq $0x30, %rax, %rax
addq %rax, %rdx
movq -0x38(%rbp), %rax
movl -0x1c(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x61c3d
jmp 0x61d17
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x78(%rbp)
cmpq -0x70(%rbp), %rax
jne 0x61c33
cmpq $0x0, 0x5e083(%rip)     # 0xbfdb8
jne 0x61d39
jmp 0x61d58
leaq 0x10be2(%rip), %rdi     # 0x72922
leaq 0x10a4d(%rip), %rsi     # 0x72794
movl $0x34a, %edx            # imm = 0x34A
leaq 0x10be4(%rip), %rcx     # 0x72937
callq 0x11140
movq -0x10(%rbp), %rax
movq %rax, 0x5e055(%rip)     # 0xbfdb8
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)