// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
testq %rdi, %rdi
je 0x31ee3
movq %rdi, %r14
cmpb $0x0, (%r14)
jg 0x31eec
movq 0x10(%r14), %r14
cmpq %rdi, %r14
jne 0x31ed0
xorl %ebp, %ebp
jmp 0x31ee8
xorl %ebp, %ebp
xorl %r14d, %r14d
xorl %eax, %eax
jmp 0x31ef9
movq 0x18(%r14), %rax
andq $-0x4, %rax
movl $0x1, %ebp
testq %rsi, %rsi
je 0x3220b
movq %rax, (%rsp)
movq %rdi, 0x30(%rsp)
movl $0x1, 0xc(%rsp)
movq %rsi, %r12
movq %rsi, 0x28(%rsp)
movzwl (%r12), %eax
testb %al, %al
jle 0x321f8
leaq 0x18(%r12), %r13
xorl %ebx, %ebx
movq %r12, 0x38(%rsp)
movq %r13, 0x20(%rsp)
movq (%r13,%rbx,8), %rdi
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
setb %al
testq %rdi, %rdi
setne %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x321e4
movq %rdi, %r15
callq 0x32223
testq %rax, %rax
je 0x32212
leaq (,%rbx,8), %rcx
addq %r13, %rcx
movq %rcx, 0x10(%rsp)
movq (%rsp), %rcx
testq %rcx, %rcx
je 0x320c3
testb $0x2, 0x56(%rcx)
jne 0x32091
movq (%rsp), %r12
movq %r12, %rdi
callq 0x2b0b8
leaq 0x5dfab(%rip), %rdi     # 0x8ff50
leaq 0x17d4e(%rip), %rsi     # 0x49cfa
movl 0xc(%rsp), %edx
xorl %eax, %eax
callq 0xe2c0
movzbl (%r12), %ecx
cmpl $0x3, %ecx
jne 0x31fce
movq (%rsp), %rax
movq 0x60(%rax), %r12
movzbl (%r12), %ecx
cmpl $0xa, %ecx
jne 0x31ff0
movq %r12, %rdi
callq 0x2b0b8
movq %rax, %r12
movzbl (%rax), %ecx
cmpl $0x3, %ecx
jne 0x31ff0
movq 0x60(%r12), %r12
movzbl (%r12), %ecx
movq %r15, %rdi
cmpl $0x9, %ecx
jne 0x32002
movq 0x60(%r12), %r12
movzbl (%r12), %ecx
cmpl $0x8, %ecx
jne 0x3207c
testb $0x40, 0x56(%r12)
je 0x3207c
movq 0x98(%r12), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x3207c
movq 0x18(%rsp), %r13
movzwl (%r13), %eax
testb %al, %al
jle 0x3206e
xorl %r12d, %r12d
movq 0x18(%r13,%r12,8), %rdi
movzwl %ax, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jb 0x32047
testq %rdi, %rdi
je 0x3205f
movq 0x10(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x36d67
testl %eax, %eax
jne 0x32091
movzwl (%r13), %eax
incq %r12
movzwl %ax, %ecx
movsbq %cl, %rcx
cmpq %rcx, %r12
jl 0x32032
movq 0x10(%r13), %r13
cmpq 0x18(%rsp), %r13
movq %r15, %rdi
jne 0x32026
movq (%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x5dec4(%rip), %rcx     # 0x8ff50
callq 0x36caf
incl 0xc(%rsp)
movq 0x38(%rsp), %r12
movq 0x30(%rsp), %rcx
movsbl (%r14), %eax
cmpl %eax, %ebp
jl 0x32135
movq 0x10(%r14), %r14
xorl %ebp, %ebp
cmpq %rcx, %r14
jne 0x3209f
movq $0x0, (%rsp)
jmp 0x32147
movzbl (%rax), %ecx
cmpl $0x3, %ecx
jne 0x320d2
movq 0x60(%rax), %rax
movzbl (%rax), %ecx
movq %r15, %rdi
cmpl $0xa, %ecx
jne 0x320f4
movq %rax, %rdi
callq 0x2b0b8
movzbl (%rax), %ecx
cmpl $0x3, %ecx
jne 0x320f1
movq 0x60(%rax), %rax
movzbl (%rax), %ecx
movq %r15, %rdi
cmpl $0x9, %ecx
jne 0x32100
movq 0x60(%rax), %rax
movzbl (%rax), %ecx
cmpl $0x2, %ecx
jne 0x32151
movq 0x60(%rax), %rcx
cmpq 0x2de78(%rip), %rcx     # 0x5ff88
je 0x3218a
cmpq 0x2de37(%rip), %rcx     # 0x5ff50
jne 0x321d8
testb $0x2, 0x57(%rax)
je 0x321d8
leaq 0x3a168(%rip), %rsi     # 0x6c298
jmp 0x321cb
movslq %ebp, %rax
movq 0x18(%r14,%rax,8), %rax
andq $-0x4, %rax
movq %rax, (%rsp)
incl %ebp
movq 0x20(%rsp), %r13
jmp 0x321e4
movl $0x6800, %edx           # imm = 0x6800
btq %rcx, %rdx
jb 0x3217c
movl %ecx, %eax
addq $-0x7, %rax
cmpq $-0x3, %rax
jb 0x321d8
leaq 0x3a829(%rip), %rax     # 0x6c998
cmpq %rax, 0x10(%rdi)
je 0x321c4
callq 0x32bf6
jmp 0x321d8
movl 0x50(%rax), %edx
cmpl $0xb, %ecx
jne 0x3218d
movq 0x60(%rax), %rax
jmp 0x3218d
movl 0x50(%rax), %edx
leaq 0x395a4(%rip), %rsi     # 0x6b738
leaq 0x3256d(%rip), %rcx     # 0x64708
cmpl (%rcx), %edx
jl 0x321cb
testb $0x2, 0x57(%rax)
jne 0x321aa
movq %rax, %rsi
jmp 0x321cb
movq 0x68(%rax), %rax
btl $0xe, %eax
leaq 0x3973f(%rip), %rsi     # 0x6b8f8
jb 0x321cb
leaq 0x39576(%rip), %rsi     # 0x6b738
jmp 0x321cb
leaq 0x3a36d(%rip), %rsi     # 0x6c538
callq 0x32aa9
movq 0x10(%rsp), %rcx
movq %rax, (%rcx)
incl 0xc(%rsp)
movq $0x0, (%rsp)
incq %rbx
movl (%r12), %eax
movsbq %al, %rcx
cmpq %rcx, %rbx
jl 0x31f39
movq 0x10(%r12), %r12
movq 0x28(%rsp), %rsi
cmpq %rsi, %r12
jne 0x31f1b
movl $0x1, %eax
jmp 0x32214
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq