// File: /workspace/github_c_makefile_star2_O3/oridb[P]mc/parse/use.c
// Function: tyunpickle
static Type *
tyunpickle(FILE *fd)
{
	size_t i, j, n;
	Type *ty;
	Ty t;

	t = rdbyte(fd);
	ty = mktype(Zloc, t);
	ty->isimport = 1;
	if (rdbyte(fd) == Vishidden)
		ty->ishidden = 1;
	ty->nspec = rdint(fd);
	ty->spec = malloc(ty->nspec * sizeof(Traitspec*));
	for (i = 0; i < ty->nspec; i++) {
		ty->spec[i] = zalloc(sizeof(Traitspec));
		n = rdint(fd);
		ty->spec[i]->ntrait = n;
		ty->spec[i]->trait = malloc(n * sizeof(Node*));
		for (j = 0; j < ty->spec[i]->ntrait; j++)
			ty->spec[i]->trait[j] = unpickle(fd);
		rdtype(fd, &ty->spec[i]->param);
		if (rdbool(fd))
			rdtype(fd, &ty->spec[i]->aux);
	}
	rdtype(fd, &ty->seqaux);
	ty->nsub = rdint(fd);
	if (ty->nsub > 0)
		ty->sub = zalloc(ty->nsub * sizeof(Type *));
	switch (ty->type) {
	case Tyunres:
		ty->name = unpickle(fd);
		break;
	case Typaram:
		n = rdint(fd);
		for (i = 0; i < n; i++)
			rdtrait(fd, NULL, ty);
		ty->pname = rdstr(fd);
		break;
	case Tystruct:
		ty->nmemb = rdint(fd);
		ty->sdecls = zalloc(ty->nmemb * sizeof(Node *));
		for (i = 0; i < ty->nmemb; i++)
			ty->sdecls[i] = unpickle(fd);
		break;
	case Tyunion:
		ty->nmemb = rdint(fd);
		ty->udecls = zalloc(ty->nmemb * sizeof(Node *));
		for (i = 0; i < ty->nmemb; i++)
			ty->udecls[i] = rducon(fd, ty);
		break;
	case Tyarray:
		rdtype(fd, &ty->sub[0]);
		ty->asize = unpickle(fd);
		ty->nmemb = 1;
		break;
	case Tyslice:
		rdtype(fd, &ty->sub[0]);
		break;
	case Tyname:
		ty->name = unpickle(fd);
		ty->narg = rdint(fd);
		ty->arg = zalloc(ty->narg * sizeof(Type *));
		for (i = 0; i < ty->narg; i++)
			rdtype(fd, &ty->arg[i]);
		rdtype(fd, &ty->sub[0]);
		break;
	case Tygeneric:
		ty->name = unpickle(fd);
		ty->ngparam = rdint(fd);
		ty->gparam = zalloc(ty->ngparam * sizeof(Type *));
		for (i = 0; i < ty->ngparam; i++)
			rdtype(fd, &ty->gparam[i]);
		rdtype(fd, &ty->sub[0]);
		break;
	default:
		for (i = 0; i < ty->nsub; i++)
			rdtype(fd, &ty->sub[i]);
		break;
	}
	return ty;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x2dd55
movsbl %al, %esi
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2289d
movq %rax, %rbx
movb $0x1, 0x94(%rax)
movq %r14, %rdi
callq 0x2dd55
cmpb $0x2, %al
jne 0x25b6d
movb $0x1, 0x92(%rbx)
movq %r14, %rdi
callq 0x2dd89
movq %rax, %r15
movq %rax, 0x20(%rbx)
leaq (,%rax,8), %rdi
callq 0x4280
movq %rax, 0x18(%rbx)
testq %r15, %r15
je 0x25c3f
xorl %r15d, %r15d
movl $0x20, %edi
callq 0x2ce48
movq 0x18(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
movq %r14, %rdi
callq 0x2dd89
movq 0x18(%rbx), %r12
movq (%r12,%r15,8), %r13
movq %rax, 0x8(%r13)
leaq (,%rax,8), %rdi
callq 0x4280
movq %rax, (%r13)
movq (%r12,%r15,8), %rsi
cmpq $0x0, 0x8(%rsi)
je 0x25c06
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x25628
movq 0x18(%rbx), %rcx
movq (%rcx,%r15,8), %rcx
movq (%rcx), %rcx
movq %rax, (%rcx,%r12,8)
incq %r12
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rsi
cmpq 0x8(%rsi), %r12
jb 0x25bde
addq $0x10, %rsi
movq %r14, %rdi
callq 0x25eff
movq %r14, %rdi
callq 0x2e04b
testl %eax, %eax
je 0x25c32
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rsi
addq $0x18, %rsi
movq %r14, %rdi
callq 0x25eff
incq %r15
cmpq 0x20(%rbx), %r15
jb 0x25b99
movq %rbx, %rsi
addq $0x28, %rsi
movq %r14, %rdi
callq 0x25eff
movq %r14, %rdi
callq 0x2dd89
movq %rax, 0x70(%rbx)
testq %rax, %rax
je 0x25c6f
shlq $0x3, %rax
movq %rax, %rdi
callq 0x2ce48
movq %rax, 0x68(%rbx)
movl (%rbx), %eax
addl $-0x14, %eax
cmpl $0x9, %eax
ja 0x25cb1
leaq 0x122c0(%rip), %rcx     # 0x37f40
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x68(%rbx), %rsi
movq %r14, %rdi
callq 0x25eff
movq %r14, %rdi
callq 0x25628
movq %rax, 0x88(%rbx)
movq $0x1, 0x78(%rbx)
jmp 0x25eed
cmpq $0x0, 0x70(%rbx)
je 0x25eed
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x68(%rbx), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x25eff
incq %r12
addq $0x8, %r15
cmpq 0x70(%rbx), %r12
jb 0x25cc2
jmp 0x25eed
movq %r14, %rdi
callq 0x25628
jmp 0x25ee6
movq %r14, %rdi
callq 0x25628
movq %rax, 0x88(%rbx)
movq %r14, %rdi
callq 0x2dd89
movq %rax, 0x48(%rbx)
leaq (,%rax,8), %rdi
callq 0x2ce48
movq %rax, 0x40(%rbx)
cmpq $0x0, 0x48(%rbx)
je 0x25d9c
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x40(%rbx), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x25eff
incq %r12
addq $0x8, %r15
cmpq 0x48(%rbx), %r12
jb 0x25d29
jmp 0x25d9c
movq %r14, %rdi
callq 0x25628
movq %rax, 0x88(%rbx)
movq %r14, %rdi
callq 0x2dd89
movq %rax, 0x38(%rbx)
leaq (,%rax,8), %rdi
callq 0x2ce48
movq %rax, 0x30(%rbx)
cmpq $0x0, 0x38(%rbx)
je 0x25d9c
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x30(%rbx), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x25eff
incq %r12
addq $0x8, %r15
cmpq 0x38(%rbx), %r12
jb 0x25d80
movq 0x68(%rbx), %rsi
movq %r14, %rdi
callq 0x25eff
jmp 0x25eed
movq %r14, %rdi
callq 0x2dd89
movq %rax, 0x78(%rbx)
leaq (,%rax,8), %rdi
callq 0x2ce48
movq %rax, 0x88(%rbx)
cmpq $0x0, 0x78(%rbx)
je 0x25eed
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x25628
movq 0x88(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
cmpq 0x78(%rbx), %r15
jb 0x25ddb
jmp 0x25eed
movq %r14, %rdi
callq 0x2dd89
movq %rax, 0x78(%rbx)
leaq (,%rax,8), %rdi
callq 0x2ce48
movq %rax, 0x88(%rbx)
cmpq $0x0, 0x78(%rbx)
je 0x25eed
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x2dd89
movq %rax, %r13
movq %r14, %rdi
callq 0x2dd89
movq %rax, (%rsp)
movq %r14, %rdi
callq 0x2e04b
movl %eax, %ebp
movq %r14, %rdi
callq 0x25628
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movq %rax, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x1e18e
movq %rax, %r12
movl %r13d, (%rax)
leaq 0x3b406(%rip), %rax     # 0x61278
movl (%rax), %eax
decl %eax
movl %eax, 0x4(%r12)
movq %r14, %rdi
callq 0x2e04b
testl %eax, %eax
je 0x25e94
leaq 0x28(%r12), %rsi
movq %r14, %rdi
callq 0x25eff
movq (%rsp), %rax
movq %rax, 0x8(%r12)
movl %ebp, 0x10(%r12)
movq 0x88(%rbx), %rax
movq %r12, (%rax,%r15,8)
incq %r15
cmpq 0x78(%rbx), %r15
jb 0x25e2a
jmp 0x25eed
movq %r14, %rdi
callq 0x2dd89
testq %rax, %rax
je 0x25ede
movq %rax, %r15
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x27c0a
decq %r15
jne 0x25ecc
movq %r14, %rdi
callq 0x2de31
movq %rax, 0x88(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq