// File: /workspace/github_c_makefile_star2_O1/oridb[P]mc/parse/stab.c
// Function: bindtype_rec
static void
bindtype_rec(Tyenv *e, Type *t, Bitset *visited)
{
	size_t i;
	Type *tt;

	t = tysearch(t);
	if (bshas(visited, t->tid))
		return;
	bsput(visited, t->tid);
	switch (t->type) {
	case Typaram:
		tt = htget(e->tab, t);
		if (tt && tt != t) {
			tytab[t->tid] = tt;
			for (i = 0; i < t->nspec; i++)
				lappend(&tt->spec, &tt->nspec, t->spec[i]);
		} else if (!boundtype(t)) {
			htput(e->tab, t, t);
		}
		for (i = 0; i < t->nspec; i++) {
			if (t->spec[i]->aux)
				bindtype_rec(e, t->spec[i]->aux, visited);
		}
		break;
	case Tygeneric:
		for (i = 0; i < t->ngparam; i++)
			bindtype_rec(e, t->gparam[i], visited);
		break;
	case Tyname:
		for (i = 0; i < t->narg; i++)
			bindtype_rec(e, t->arg[i], visited);
		break;
	case Tyunres:
		for (i = 0; i < t->narg; i++)
			bindtype_rec(e, t->arg[i], visited);
		break;
	case Tystruct:
		for (i = 0; i < t->nmemb; i++)
			bindtype_rec(e, t->sdecls[i]->decl.type, visited);
		break;
	case Tyunion:
		for (i = 0; i < t->nmemb; i++)
			if (t->udecls[i]->etype)
				bindtype_rec(e, t->udecls[i]->etype, visited);
		break;
	default:
		for (i = 0; i < t->nsub; i++)
			bindtype_rec(e, t->sub[i], visited);
		break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x1727c
movq %rax, %r15
movl 0x4(%rax), %esi
movq (%rbx), %rax
shlq $0x6, %rax
cmpq %rsi, %rax
jbe 0x2108a
movq 0x8(%rbx), %rax
movl %esi, %ecx
shrl $0x6, %ecx
movq (%rax,%rcx,8), %rax
btq %rsi, %rax
jae 0x2108a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x2d816
movl (%r15), %eax
addl $-0x17, %eax
cmpl $0x6, %eax
ja 0x21157
leaq 0x162bc(%rip), %rcx     # 0x37364
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpq $0x0, 0x78(%r15)
je 0x2107b
xorl %r12d, %r12d
movq 0x88(%r15), %rax
movq (%rax,%r12,8), %rax
movq 0x28(%rax), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x2103d
incq %r12
cmpq 0x78(%r15), %r12
jb 0x210bb
jmp 0x2107b
movq 0x8(%r14), %rdi
movq %r15, %rsi
callq 0x2dd9a
movq %rax, %r12
testq %rax, %rax
sete %al
cmpq %r15, %r12
sete %cl
orb %al, %cl
je 0x2121f
movq %r15, %rdi
callq 0x21297
testq %rax, %rax
jne 0x2125f
movq 0x8(%r14), %rdi
movq %r15, %rsi
movq %r15, %rdx
callq 0x2dbc2
jmp 0x2125f
cmpq $0x0, 0x38(%r15)
je 0x2107b
xorl %r12d, %r12d
movq 0x30(%r15), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x2103d
incq %r12
cmpq 0x38(%r15), %r12
jb 0x21136
jmp 0x2107b
cmpq $0x0, 0x70(%r15)
je 0x2107b
xorl %r12d, %r12d
movq 0x68(%r15), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x2103d
incq %r12
cmpq 0x70(%r15), %r12
jb 0x21165
jmp 0x2107b
cmpq $0x0, 0x78(%r15)
je 0x2107b
xorl %r12d, %r12d
movq 0x88(%r15), %rax
movq (%rax,%r12,8), %rax
movq 0x28(%rax), %rsi
testq %rsi, %rsi
je 0x211b3
movq %r14, %rdi
movq %rbx, %rdx
callq 0x2103d
incq %r12
cmpq 0x78(%r15), %r12
jb 0x21194
jmp 0x2107b
cmpq $0x0, 0x48(%r15)
je 0x2107b
xorl %r12d, %r12d
movq 0x40(%r15), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x2103d
incq %r12
cmpq 0x48(%r15), %r12
jb 0x211cf
jmp 0x2107b
cmpq $0x0, 0x48(%r15)
je 0x2107b
xorl %r12d, %r12d
movq 0x40(%r15), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x2103d
incq %r12
cmpq 0x48(%r15), %r12
jb 0x211fe
jmp 0x2107b
leaq 0x40faa(%rip), %rax     # 0x621d0
movq (%rax), %rax
movl 0x4(%r15), %ecx
movq %r12, (%rax,%rcx,8)
cmpq $0x0, 0x20(%r15)
je 0x2125f
leaq 0x18(%r12), %r13
addq $0x20, %r12
xorl %ebp, %ebp
movq 0x18(%r15), %rax
movq (%rax,%rbp,8), %rdx
movq %r13, %rdi
movq %r12, %rsi
callq 0x2d3ff
incq %rbp
cmpq 0x20(%r15), %rbp
jb 0x21243
cmpq $0x0, 0x20(%r15)
je 0x2107b
xorl %r12d, %r12d
movq 0x18(%r15), %rax
movq (%rax,%r12,8), %rax
movq 0x18(%rax), %rsi
testq %rsi, %rsi
je 0x21289
movq %r14, %rdi
movq %rbx, %rdx
callq 0x2103d
incq %r12
cmpq 0x20(%r15), %r12
jb 0x2126d
jmp 0x2107b