// File: /workspace/github_c_makefile_star2_O0/oridb[P]mc/parse/use.c
// Function: typickle
static void
typickle(FILE *fd, Type *ty)
{
	size_t i, j;

	if (!ty) {
		die("trying to pickle null type\n");
		return;
	}
	wrbyte(fd, ty->type);
	wrbyte(fd, ty->vis);
	wrint(fd, ty->nspec);
	for (i = 0; i < ty->nspec; i++) {
		wrint(fd, ty->spec[i]->ntrait);
		for (j = 0; j < ty->spec[i]->ntrait; j++)
			pickle(fd, ty->spec[i]->trait[j]);
		wrtype(fd, ty->spec[i]->param);
		wrbool(fd, ty->spec[i]->aux != NULL);
		if (ty->spec[i]->aux)
			wrtype(fd, ty->spec[i]->aux);
	}
	wrtype(fd, ty->seqaux);
	wrint(fd, ty->nsub);
	switch (ty->type) {
	case Tyunres:
		pickle(fd, ty->name);
		break;
	case Typaram:
		/* tid is generated; don't write */
		if (ty->trneed) {
			wrint(fd, bscount(ty->trneed));
			for (i = 0; bsiter(ty->trneed, &i); i++) {
				if (i < Ntraits)
					wrint(fd, i | Builtinmask);
				else
					wrint(fd, traittab[i]->uid);
			}
		} else {
			wrint(fd, 0);
		}
		wrstr(fd, ty->pname);	break;
	case Tystruct:
		wrint(fd, ty->nmemb);
		for (i = 0; i < ty->nmemb; i++)
			pickle(fd, ty->sdecls[i]);
		break;
	case Tyunion:
		wrint(fd, ty->nmemb);
		for (i = 0; i < ty->nmemb; i++)
			wrucon(fd, ty->udecls[i]);
		break;
	case Tyarray:
		wrtype(fd, ty->sub[0]);
		pickle(fd, ty->asize);
		break;
	case Tyslice:	wrtype(fd, ty->sub[0]);	break;
	case Tyvar:	die("Attempting to pickle %s. This will not work.\n", tystr(ty));	break;
	case Tyname:
		pickle(fd, ty->name);
		wrint(fd, ty->narg);
		for (i = 0; i < ty->narg; i++)
			wrtype(fd, ty->arg[i]);
		wrtype(fd, ty->sub[0]);
		break;
	case Tygeneric:
		pickle(fd, ty->name);
		wrint(fd, ty->ngparam);
		for (i = 0; i < ty->ngparam; i++)
			wrtype(fd, ty->gparam[i]);
		wrtype(fd, ty->sub[0]);
		break;
	default:
		for (i = 0; i < ty->nsub; i++)
			wrtype(fd, ty->sub[i]);
		break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x3eae5
leaq 0x15af1(%rip), %rdi     # 0x545cf
movb $0x0, %al
callq 0x1df20
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl (%rax), %eax
movsbl %al, %esi
callq 0x49f30
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movsbl %al, %esi
callq 0x49f30
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x49fb0
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jae 0x3ec30
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rsi
callq 0x49fb0
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq -0x18(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq 0x8(%rcx), %rax
jae 0x3eba6
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x3f0b0
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x3eb5a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rsi
callq 0x3fd00
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x18(%rax)
setne %al
andb $0x1, %al
movzbl %al, %esi
callq 0x4a2f0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x18(%rax)
je 0x3ec1d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x18(%rax), %rsi
callq 0x3fd00
jmp 0x3ec1f
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x3eb23
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x3fd00
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rsi
callq 0x49fb0
movq -0x10(%rbp), %rax
movl (%rax), %eax
addl $-0x14, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x9, %eax
ja 0x3ef60
movq -0x28(%rbp), %rax
leaq 0x1575f(%rip), %rcx     # 0x543d4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rsi
callq 0x3f0b0
jmp 0x3ef9f
movq -0x10(%rbp), %rax
cmpq $0x0, 0x80(%rax)
je 0x3ed3b
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rdi
callq 0x487d0
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x49fb0
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rdi
leaq -0x18(%rbp), %rsi
callq 0x48860
cmpl $0x0, %eax
je 0x3ed39
cmpq $0x8, -0x18(%rbp)
jae 0x3ed0b
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
orq $0x40000000, %rsi       # imm = 0x40000000
callq 0x49fb0
jmp 0x3ed29
movq -0x8(%rbp), %rdi
leaq 0x3effa(%rip), %rax     # 0x7dd10
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq (%rax), %rsi
callq 0x49fb0
jmp 0x3ed2b
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x3ecd5
jmp 0x3ed48
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x49fb0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rsi
callq 0x4a020
jmp 0x3ef9f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rsi
callq 0x49fb0
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x78(%rcx), %rax
jae 0x3edb2
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x3f0b0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x3ed7a
jmp 0x3ef9f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rsi
callq 0x49fb0
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x78(%rcx), %rax
jae 0x3ee08
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x3fda0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x3edd0
jmp 0x3ef9f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rsi
callq 0x3fd00
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rsi
callq 0x3f0b0
jmp 0x3ef9f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rsi
callq 0x3fd00
jmp 0x3ef9f
movq -0x10(%rbp), %rdi
callq 0x38a10
movq %rax, %rsi
leaq 0x15785(%rip), %rdi     # 0x545eb
movb $0x0, %al
callq 0x1df20
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rsi
callq 0x3f0b0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rsi
callq 0x49fb0
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jae 0x3eecf
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x3fd00
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x3ee9a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rsi
callq 0x3fd00
jmp 0x3ef9f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rsi
callq 0x3f0b0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
callq 0x49fb0
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jae 0x3ef4a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x3fd00
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x3ef15
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rsi
callq 0x3fd00
jmp 0x3ef9f
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x70(%rcx), %rax
jae 0x3ef9d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x3fd00
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x3ef68
jmp 0x3ef9f
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)