// File: /workspace/github_c_makefile_star2_O3/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 0x17094
movq %rax, %r15
movl 0x4(%rax), %esi
movq (%rbx), %rax
shlq $0x6, %rax
cmpq %rsi, %rax
jbe 0x20e02
movq 0x8(%rbx), %rax
movl %esi, %ecx
shrl $0x6, %ecx
movq (%rax,%rcx,8), %rax
btq %rsi, %rax
jae 0x20e02
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x2d369
movl (%r15), %eax
addl $-0x17, %eax
cmpl $0x6, %eax
ja 0x20ecf
leaq 0x16554(%rip), %rcx     # 0x37374
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpq $0x0, 0x78(%r15)
je 0x20df3
xorl %r12d, %r12d
movq 0x88(%r15), %rax
movq (%rax,%r12,8), %rax
movq 0x28(%rax), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x20db5
incq %r12
cmpq 0x78(%r15), %r12
jb 0x20e33
jmp 0x20df3
movq 0x8(%r14), %rdi
movq %r15, %rsi
callq 0x2d8fa
movq %rax, %r12
testq %rax, %rax
sete %al
cmpq %r15, %r12
sete %cl
orb %al, %cl
je 0x20f9c
movq %r15, %rdi
callq 0x21019
testq %rax, %rax
jne 0x20fdc
movq 0x8(%r14), %rdi
movq %r15, %rsi
movq %r15, %rdx
callq 0x2d71e
jmp 0x20fdc
cmpq $0x0, 0x38(%r15)
je 0x20df3
xorl %r12d, %r12d
movq 0x30(%r15), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x20db5
incq %r12
cmpq 0x38(%r15), %r12
jb 0x20eae
jmp 0x20df3
cmpq $0x0, 0x70(%r15)
je 0x20df3
xorl %r12d, %r12d
movq 0x68(%r15), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x20db5
incq %r12
cmpq 0x70(%r15), %r12
jb 0x20edd
jmp 0x20df3
movq 0x78(%r15), %rax
testq %rax, %rax
je 0x20df3
xorl %r12d, %r12d
movq 0x88(%r15), %rcx
movq (%rcx,%r12,8), %rcx
movq 0x28(%rcx), %rsi
testq %rsi, %rsi
je 0x20f31
movq %r14, %rdi
movq %rbx, %rdx
callq 0x20db5
movq 0x78(%r15), %rax
incq %r12
cmpq %rax, %r12
jb 0x20f0e
jmp 0x20df3
cmpq $0x0, 0x48(%r15)
je 0x20df3
xorl %r12d, %r12d
movq 0x40(%r15), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x20db5
incq %r12
cmpq 0x48(%r15), %r12
jb 0x20f4c
jmp 0x20df3
cmpq $0x0, 0x48(%r15)
je 0x20df3
xorl %r12d, %r12d
movq 0x40(%r15), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x20db5
incq %r12
cmpq 0x48(%r15), %r12
jb 0x20f7b
jmp 0x20df3
leaq 0x4122d(%rip), %rax     # 0x621d0
movq (%rax), %rax
movl 0x4(%r15), %ecx
movq %r12, (%rax,%rcx,8)
cmpq $0x0, 0x20(%r15)
je 0x20fdc
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 0x2ceff
incq %rbp
cmpq 0x20(%r15), %rbp
jb 0x20fc0
movq 0x20(%r15), %rax
testq %rax, %rax
je 0x20df3
xorl %r12d, %r12d
movq 0x18(%r15), %rcx
movq (%rcx,%r12,8), %rcx
movq 0x18(%rcx), %rsi
testq %rsi, %rsi
je 0x2100c
movq %r14, %rdi
movq %rbx, %rdx
callq 0x20db5
movq 0x20(%r15), %rax
incq %r12
cmpq %rax, %r12
jb 0x20fec
jmp 0x20df3