// File: /workspace/github_c_makefile_star2_O0/oridb[P]mc/parse/infer.c
// Function: verifytraits
static void
verifytraits(Node *ctx, Type *a, Type *b)
{
	char traitbuf[64], abuf[64], bbuf[64];
	char asrc[128], bsrc[128];
	Bitset *abs, *bbs;
	size_t i, n;
	Srcloc l;
	char *sep;

	abs = a->trneed;
	if (!abs) {
		abs = mkbs();
		traitsfor(a, abs);
	}
	bbs = b->trneed;
	if (!bbs) {
		bbs = mkbs();
		traitsfor(b, bbs);
	}
	if (!bsissubset(abs, bbs)) {
		sep = "";
		n = 0;
		*traitbuf = 0;
		for (i = 0; bsiter(abs, &i); i++) {
			if (!bshas(bbs, i)) {
				n += bprintf(traitbuf + n, sizeof(traitbuf) - n, "%s%s", sep,
					     namestr(traittab[i]->name));
				sep = ",";
			}
		}
		tyfmt(abuf, sizeof abuf, a);
		tyfmt(bbuf, sizeof bbuf, b);
		bsrc[0] = 0;
		if (nunifysrc > b->tid && unifysrc[b->tid].line > 0) {
			l = unifysrc[b->tid];
			snprintf(bsrc, sizeof asrc, "\n\t%s from %s:%d", bbuf, fname(l), lnum(l));
		}
		fatal(ctx, "%s needs trait %s near %s%s%s",
			bbuf, traitbuf, ctxstr(ctx), srcstr(a), srcstr(b));
	}
	if (!a->trneed)
		bsfree(abs);
	if (!b->trneed)
		bsfree(bbs);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x270, %rsp            # imm = 0x270
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movq %rax, -0x1e8(%rbp)
cmpq $0x0, -0x1e8(%rbp)
jne 0x29c2f
callq 0x48650
movq %rax, -0x1e8(%rbp)
movq -0x10(%rbp), %rdi
movq -0x1e8(%rbp), %rsi
callq 0x28a90
movq -0x18(%rbp), %rax
movq 0x80(%rax), %rax
movq %rax, -0x1f0(%rbp)
cmpq $0x0, -0x1f0(%rbp)
jne 0x29c67
callq 0x48650
movq %rax, -0x1f0(%rbp)
movq -0x18(%rbp), %rdi
movq -0x1f0(%rbp), %rsi
callq 0x28a90
movq -0x1e8(%rbp), %rdi
movq -0x1f0(%rbp), %rsi
callq 0x48f50
cmpl $0x0, %eax
jne 0x29eec
leaq 0x2bb9b(%rip), %rax     # 0x55825
movq %rax, -0x210(%rbp)
movq $0x0, -0x200(%rbp)
movb $0x0, -0x60(%rbp)
movq $0x0, -0x1f8(%rbp)
movq -0x1e8(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x48860
cmpl $0x0, %eax
je 0x29d8f
movq -0x1f0(%rbp), %rdi
movq -0x1f8(%rbp), %rsi
callq 0x27430
cmpl $0x0, %eax
jne 0x29d76
leaq -0x60(%rbp), %rax
addq -0x200(%rbp), %rax
movq %rax, -0x228(%rbp)
movl $0x40, %eax
subq -0x200(%rbp), %rax
movq %rax, -0x220(%rbp)
movq -0x210(%rbp), %rax
movq %rax, -0x218(%rbp)
leaq 0x53ff3(%rip), %rax     # 0x7dd10
movq (%rax), %rax
movq -0x1f8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rdi
callq 0x30600
movq -0x228(%rbp), %rdi
movq -0x220(%rbp), %rsi
movq -0x218(%rbp), %rcx
movq %rax, %r8
leaq 0x23d8d(%rip), %rdx     # 0x4dae0
movb $0x0, %al
callq 0x4a230
addq -0x200(%rbp), %rax
movq %rax, -0x200(%rbp)
leaq 0x2b64d(%rip), %rax     # 0x553bc
movq %rax, -0x210(%rbp)
jmp 0x29d78
movq -0x1f8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1f8(%rbp)
jmp 0x29cab
leaq -0xa0(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl $0x40, %esi
callq 0x37e90
leaq -0xe0(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0x40, %esi
callq 0x37e90
movb $0x0, -0x1e0(%rbp)
movq 0x53639(%rip), %rax     # 0x7d400
movq -0x18(%rbp), %rcx
movl 0x4(%rcx), %ecx
cmpq %rcx, %rax
jbe 0x29e6a
movq 0x5362a(%rip), %rax     # 0x7d408
movq -0x18(%rbp), %rcx
movl 0x4(%rcx), %ecx
cmpl $0x0, (%rax,%rcx,8)
jle 0x29e6a
movq 0x53616(%rip), %rax     # 0x7d408
movq -0x18(%rbp), %rcx
movl 0x4(%rcx), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x208(%rbp)
leaq -0x1e0(%rbp), %rax
movq %rax, -0x240(%rbp)
leaq -0xe0(%rbp), %rax
movq %rax, -0x238(%rbp)
movq -0x208(%rbp), %rdi
callq 0x2f090
movq %rax, -0x230(%rbp)
movq -0x208(%rbp), %rdi
callq 0x2f0b0
movq -0x240(%rbp), %rdi
movq -0x238(%rbp), %rcx
movq -0x230(%rbp), %r8
movl %eax, %r9d
movl $0x80, %esi
leaq 0x28284(%rip), %rdx     # 0x520e7
movb $0x0, %al
callq 0x6130
movq -0x8(%rbp), %rax
movq %rax, -0x268(%rbp)
leaq -0xe0(%rbp), %rax
movq %rax, -0x260(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x258(%rbp)
movq -0x8(%rbp), %rdi
callq 0x27be0
movq %rax, -0x250(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2a2d0
movq %rax, -0x248(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2a2d0
movq -0x268(%rbp), %rdi
movq -0x260(%rbp), %rdx
movq -0x258(%rbp), %rcx
movq -0x250(%rbp), %r8
movq -0x248(%rbp), %r9
leaq 0x28216(%rip), %rsi     # 0x520f7
movq %rax, (%rsp)
movb $0x0, %al
callq 0x1dfe0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x80(%rax)
jne 0x29f06
movq -0x1e8(%rbp), %rdi
callq 0x48690
movq -0x18(%rbp), %rax
cmpq $0x0, 0x80(%rax)
jne 0x29f20
movq -0x1f0(%rbp), %rdi
callq 0x48690
addq $0x270, %rsp            # imm = 0x270
popq %rbp
retq
nopl (%rax)