// File: /workspace/github_c_makefile_star2_O0/oridb[P]mc/parse/infer.c
// Function: structunify
static void
structunify(Node *ctx, Type *u, Type *v)
{
	size_t i, j;
	int found;
	char *ud, *vd;

	if (u->nmemb != v->nmemb)
		fatal(ctx, "can't unify %s and %s near %s%s%s",
			tystr(u), tystr(v), ctxstr(ctx),
			srcstr(u), srcstr(v));

	for (i = 0; i < u->nmemb; i++) {
		found = 0;
		for (j = 0; j < v->nmemb; j++) {
			ud = namestr(u->sdecls[i]->decl.name);
			vd = namestr(v->sdecls[j]->decl.name);
			if (strcmp(ud, vd) == 0) {
				found = 1;
				unify(ctx, type(u->sdecls[i]), type(v->sdecls[j]));
			}
		}
		/* we had at least one missing member */
		if (!found)
			fatal(ctx, "can't unify %s and %s near %s%s%s",
				tystr(u), tystr(v), ctxstr(ctx),
				srcstr(u), srcstr(v));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x78(%rcx), %rax
je 0x2a754
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
callq 0x38a10
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rdi
callq 0x38a10
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
callq 0x27be0
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2a2d0
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2a2d0
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rdx
movq -0x58(%rbp), %rcx
movq -0x50(%rbp), %r8
movq -0x48(%rbp), %r9
leaq 0x279ef(%rip), %rsi     # 0x52138
movq %rax, (%rsp)
movb $0x0, %al
callq 0x1dfe0
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x78(%rcx), %rax
jae 0x2a8e7
movl $0x0, -0x2c(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x78(%rcx), %rax
jae 0x2a847
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x20(%rax), %rdi
callq 0x30600
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x88(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x20(%rax), %rdi
callq 0x30600
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x6220
cmpl $0x0, %eax
jne 0x2a834
movl $0x1, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2a8f0
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
movq 0x88(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2a8f0
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq %rax, %rdx
callq 0x28c00
jmp 0x2a836
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x2a77d
cmpl $0x0, -0x2c(%rbp)
jne 0x2a8d4
movq -0x8(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x38a10
movq %rax, -0x98(%rbp)
movq -0x18(%rbp), %rdi
callq 0x38a10
movq %rax, -0x90(%rbp)
movq -0x8(%rbp), %rdi
callq 0x27be0
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2a2d0
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2a2d0
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rdx
movq -0x90(%rbp), %rcx
movq -0x88(%rbp), %r8
movq -0x80(%rbp), %r9
leaq 0x2786f(%rip), %rsi     # 0x52138
movq %rax, (%rsp)
movb $0x0, %al
callq 0x1dfe0
jmp 0x2a8d6
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x2a75c
addq $0xb0, %rsp
popq %rbp
retq