// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/builtin.c
// Function: evaluate_generic_int_op
static int evaluate_generic_int_op(struct expression *expr)
{
	struct symbol *fntype = expr->fn->ctype->ctype.base_type;
	struct symbol_list *types = NULL;
	struct symbol *ctype = NULL;
	struct expression *arg;
	struct symbol *t;
	int n = 0;

	PREPARE_PTR_LIST(fntype->arguments, t);
	FOR_EACH_PTR(expr->args, arg) {
		n++;

		if (!is_dynamic_type(t)) {
			;
		} else if (!ctype) {
			// first 'dynamic' type, check that it's an integer
			t = arg->ctype;
			if (!t)
				return 0;
			if (t->type == SYM_NODE)
				t = t->ctype.base_type;
			if (!t)
				return 0;
			if (t->ctype.base_type != &int_type)
				goto err;

			// next 'dynamic' arguments will use this type
			ctype = t;
		} else {
			// use the previous 'dynamic' type
			t = ctype;
		}
		add_ptr_list(&types, t);
		NEXT_PTR_LIST(t);
	} END_FOR_EACH_PTR(arg);
	FINISH_PTR_LIST(t);
	return evaluate_arguments(types, expr->args);

err:
	sparse_error(arg->pos, "non-integer type for argument %d:", n);
	info(arg->pos, "        %s", show_typename(arg->ctype));
	expr->ctype = &bad_ctype;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rax
movq 0x60(%rax), %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x18(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0x54(%rbp)
movq $0x0, -0x38(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x47795
jmp 0x47739
movl -0x54(%rbp), %eax
movq -0x50(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x47772
movq -0x50(%rbp), %rax
movslq -0x54(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
andq $-0x4, %rax
movq %rax, -0x38(%rbp)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x47793
movq $0x0, -0x38(%rbp)
movl $0x0, -0x54(%rbp)
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
cmpq -0x48(%rbp), %rax
jne 0x47739
jmp 0x47795
jmp 0x47797
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x60(%rbp)
jne 0x477bf
jmp 0x47953
jmp 0x477c1
movl $0x0, -0x74(%rbp)
movl -0x74(%rbp), %eax
movq -0x68(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x4793b
movq -0x68(%rbp), %rax
movslq -0x74(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x68(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x47813
cmpq $0x0, -0x30(%rbp)
jne 0x47813
jmp 0x4792d
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rdi
callq 0x47bf0
testb $0x1, %al
jne 0x4782b
jmp 0x478aa
cmpq $0x0, -0x28(%rbp)
jne 0x478a0
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x47851
movl $0x0, -0x4(%rbp)
jmp 0x479ce
movq -0x38(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x3, %eax
jne 0x4786d
movq -0x38(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x47880
movl $0x0, -0x4(%rbp)
jmp 0x479ce
movq -0x38(%rbp), %rax
leaq 0x499cd(%rip), %rcx     # 0x91258
cmpq %rcx, 0x60(%rax)
je 0x47896
jmp 0x4796b
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x478a8
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x478aa
leaq -0x20(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x31370
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x4792b
jmp 0x478cf
movl -0x54(%rbp), %eax
movq -0x50(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x47908
movq -0x50(%rbp), %rax
movslq -0x54(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
andq $-0x4, %rax
movq %rax, -0x38(%rbp)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x47929
movq $0x0, -0x38(%rbp)
movl $0x0, -0x54(%rbp)
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
cmpq -0x48(%rbp), %rax
jne 0x478cf
jmp 0x4792b
jmp 0x4792d
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x477c8
jmp 0x4793d
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x68(%rbp)
cmpq -0x60(%rbp), %rax
jne 0x477c1
jmp 0x47955
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x4b830
movl %eax, -0x4(%rbp)
jmp 0x479ce
movq -0x30(%rbp), %rax
movl -0x3c(%rbp), %edx
movq 0x8(%rax), %rdi
leaq 0x22abf(%rip), %rsi     # 0x6a43c
movb $0x0, %al
callq 0x16f90
movq -0x30(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x33340
movq %rax, %rdx
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x22aad(%rip), %rsi     # 0x6a45e
movb $0x0, %al
callq 0x16c10
movq -0x10(%rbp), %rax
leaq 0x4b2d5(%rip), %rcx     # 0x92c98
movq %rcx, 0x10(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)