// File: /workspace/github_c_makefile_star2_O0/goodpaul6[P]generic/script.c
// Function: compare_type_tags
static char compare_type_tags(type_tag_t* a, type_tag_t* b)
{
	if(a->type != TAG_VOID && b->type != TAG_VOID)
	{
		if(a->type == TAG_DYNAMIC || b->type == TAG_DYNAMIC)
			return 1;
	}
	
	if(a->type != b->type) return 0;
	
	switch(a->type)
	{
		case TAG_FUNC:
		{
			if(!compare_type_tags(a->func.return_type, b->func.return_type)) return 0;
			if(a->func.arg_types.length != b->func.arg_types.length) return 0;
			
			for(int i = 0; i < a->func.arg_types.length; ++i)
			{
				if(!compare_type_tags(vec_get_value(&a->func.arg_types, i, type_tag_t*), vec_get_value(&b->func.arg_types, i, type_tag_t*)))
					return 0;
			}
		} break;
		
		case TAG_ARRAY:
		{
			if(a->contained->type == TAG_DYNAMIC || b->contained->type == TAG_DYNAMIC)
			{
				context_t ctx;
				ctx.file = g_file;
				ctx.line = g_line;
				
				warn_c(ctx, WARN_ARRAY_DYNAMIC_TO_SPECIFIC);
			}
			
			if(!compare_type_tags(a->contained, b->contained)) return 0;
		} break;
		
		case TAG_STRUCT:
		{
			return strcmp(a->ds.name, b->ds.name) == 0;
		} break;
		
		default: break;
	}
	
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0x99e3
movq -0x18(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0x99e3
movq -0x10(%rbp), %rax
cmpl $0x1, 0x20(%rax)
je 0x99d8
movq -0x18(%rbp), %rax
cmpl $0x1, 0x20(%rax)
jne 0x99e1
movb $0x1, -0x1(%rbp)
jmp 0x9b80
jmp 0x99e3
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x20(%rcx), %eax
je 0x99fc
movb $0x0, -0x1(%rbp)
jmp 0x9b80
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x44(%rbp)
subl $0x6, %eax
je 0x9a2c
jmp 0x9a0d
movl -0x44(%rbp), %eax
subl $0x7, %eax
je 0x9ad2
jmp 0x9a1b
movl -0x44(%rbp), %eax
subl $0xa, %eax
je 0x9b55
jmp 0x9b7a
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rsi
callq 0x99a0
cmpb $0x0, %al
jne 0x9a4e
movb $0x0, -0x1(%rbp)
jmp 0x9b80
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x38(%rcx), %rax
je 0x9a69
movb $0x0, -0x1(%rbp)
jmp 0x9b80
movl $0x0, -0x1c(%rbp)
movslq -0x1c(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jae 0x9acd
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
movslq -0x1c(%rbp), %rsi
callq 0x11890
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
addq $0x28, %rdi
movslq -0x1c(%rbp), %rsi
callq 0x11890
movq -0x50(%rbp), %rdi
movq (%rax), %rsi
callq 0x99a0
cmpb $0x0, %al
jne 0x9ac0
movb $0x0, -0x1(%rbp)
jmp 0x9b80
jmp 0x9ac2
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x9a70
jmp 0x9b7c
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
cmpl $0x1, 0x20(%rax)
je 0x9aee
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
cmpl $0x1, 0x20(%rax)
jne 0x9b34
movq 0x10643(%rip), %rax     # 0x1a138
movq %rax, -0x38(%rbp)
movl 0x10631(%rip), %eax     # 0x1a130
movl %eax, -0x40(%rbp)
leaq -0x40(%rbp), %rax
movl $0x1, %edi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
movb $0x0, %al
callq 0x9b90
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x99a0
cmpb $0x0, %al
jne 0x9b53
movb $0x0, -0x1(%rbp)
jmp 0x9b80
jmp 0x9b7c
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rsi
callq 0x2130
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x1(%rbp)
jmp 0x9b80
jmp 0x9b7c
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)