// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/evaluate.c
// Function: evaluate_arguments
int evaluate_arguments(struct symbol_list *argtypes, struct expression_list *head)
{
	struct expression *expr;
	struct symbol *argtype;
	int i = 1;

	PREPARE_PTR_LIST(argtypes, argtype);
	FOR_EACH_PTR (head, expr) {
		struct expression **p = THIS_ADDRESS(expr);
		struct symbol *ctype, *target;
		ctype = evaluate_expression(expr);

		if (!ctype)
			return 0;

		target = argtype;
		if (!target) {
			struct symbol *type;
			int class = classify_type(ctype, &type);
			if (is_int(class)) {
				*p = cast_to(expr, integer_promotion(type));
			} else if (class & TYPE_FLOAT) {
				if (type->rank < 0)
					*p = cast_to(expr, &double_ctype);
			} else if (class & TYPE_PTR) {
				if (expr->ctype == &null_ctype)
					*p = cast_to(expr, &ptr_ctype);
				else
					degenerate(expr);
			}
		} else if (!target->forced_arg){
			static char where[30];
			examine_symbol_type(target);
			sprintf(where, "argument %d", i);
			compatible_argument_type(expr, target, p, where);
		}

		i++;
		NEXT_PTR_LIST(argtype);
	} END_FOR_EACH_PTR(expr);
	FINISH_PTR_LIST(argtype);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x1, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movq $0x0, -0x28(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x4b8ce
jmp 0x4b872
movl -0x44(%rbp), %eax
movq -0x40(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x4b8ab
movq -0x40(%rbp), %rax
movslq -0x44(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
andq $-0x4, %rax
movq %rax, -0x28(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x4b8cc
movq $0x0, -0x28(%rbp)
movl $0x0, -0x44(%rbp)
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq -0x38(%rbp), %rax
jne 0x4b872
jmp 0x4b8ce
jmp 0x4b8d0
movq -0x18(%rbp), %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 0x4b8f4
jmp 0x4bb59
jmp 0x4b8f6
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 0x4bb41
movq -0x58(%rbp), %rax
movslq -0x64(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x58(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x4b948
cmpq $0x0, -0x20(%rbp)
jne 0x4b948
jmp 0x4bb33
movq -0x58(%rbp), %rax
addq $0x18, %rax
movslq -0x64(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x20(%rbp), %rdi
callq 0x4bb70
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x78(%rbp)
jne 0x4b97f
movl $0x0, -0x4(%rbp)
jmp 0x4bb62
movq -0x28(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x80(%rbp)
jne 0x4ba76
movq -0x78(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x4bf20
movl %eax, -0x8c(%rbp)
movl -0x8c(%rbp), %eax
andl $0x9, %eax
cmpl $0x1, %eax
jne 0x4b9eb
movq -0x20(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x88(%rbp), %rdi
callq 0x4c110
movq -0x98(%rbp), %rdi
movq %rax, %rsi
callq 0x4c020
movq %rax, %rcx
movq -0x70(%rbp), %rax
movq %rcx, (%rax)
jmp 0x4ba74
movl -0x8c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x4ba2a
movq -0x88(%rbp), %rax
movl 0x54(%rax), %eax
shll $0x6, %eax
sarl $0x1d, %eax
cmpl $0x0, %eax
jge 0x4ba28
movq -0x20(%rbp), %rdi
leaq 0x46c5f(%rip), %rsi     # 0x92678
callq 0x4c020
movq %rax, %rcx
movq -0x70(%rbp), %rax
movq %rcx, (%rax)
jmp 0x4ba72
movl -0x8c(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x4ba70
movq -0x20(%rbp), %rax
leaq 0x47335(%rip), %rcx     # 0x92d78
cmpq %rcx, 0x10(%rax)
jne 0x4ba65
movq -0x20(%rbp), %rdi
leaq 0x46ec4(%rip), %rsi     # 0x92918
callq 0x4c020
movq %rax, %rcx
movq -0x70(%rbp), %rax
movq %rcx, (%rax)
jmp 0x4ba6e
movq -0x20(%rbp), %rdi
callq 0x4c1c0
jmp 0x4ba70
jmp 0x4ba72
jmp 0x4ba74
jmp 0x4bac3
movq -0x80(%rbp), %rax
movl 0x54(%rax), %eax
shrl $0x11, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x4bac1
movq -0x80(%rbp), %rdi
callq 0x3f650
movl -0x2c(%rbp), %edx
leaq 0x6a895(%rip), %rdi     # 0xb6330
leaq 0x1ff78(%rip), %rsi     # 0x6ba1a
movb $0x0, %al
callq 0x112c0
movq -0x20(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x70(%rbp), %rdx
leaq 0x6a874(%rip), %rcx     # 0xb6330
callq 0x4c540
jmp 0x4bac3
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x4bb31
jmp 0x4bad5
movl -0x44(%rbp), %eax
movq -0x40(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x4bb0e
movq -0x40(%rbp), %rax
movslq -0x44(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
andq $-0x4, %rax
movq %rax, -0x28(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x4bb2f
movq $0x0, -0x28(%rbp)
movl $0x0, -0x44(%rbp)
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq -0x38(%rbp), %rax
jne 0x4bad5
jmp 0x4bb31
jmp 0x4bb33
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x4b8fd
jmp 0x4bb43
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x58(%rbp)
cmpq -0x50(%rbp), %rax
jne 0x4b8f6
jmp 0x4bb5b
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nop