// File: /workspace/github_c_makefile_star2_O2/oridb[P]mc/parse/use.c
// Function: unpickle
static Node *
unpickle(FILE *fd)
{
	size_t i;
	Ntype type;
	Node *n;

	type = rdbyte(fd);
	if (type == Nnone)
		return NULL;
	n = mknode(Zloc, type);
	n->loc.line = rdint(fd);
	n->loc.file = file.nfiles - 1;
	switch (n->type) {
	case Nexpr:
		n->expr.op = rdbyte(fd);
		rdtype(fd, &n->expr.type);
		if (rdbool(fd))
			rdtype(fd, &n->expr.param);
		n->expr.isconst = rdbool(fd);
		n->expr.idx = unpickle(fd);
		n->expr.nargs = rdint(fd);
		n->expr.args = zalloc(sizeof(Node *) * n->expr.nargs);
		for (i = 0; i < n->expr.nargs; i++)
			n->expr.args[i] = unpickle(fd);
		break;
	case Nname:
		if (rdbool(fd))
			n->name.ns = rdstr(fd);
		n->name.name = rdstr(fd);
		break;
	case Nuse:
		n->use.islocal = rdbool(fd);
		n->use.name = rdstr(fd);
		break;
	case Nlit:
		n->lit.littype = rdbyte(fd);
		rdtype(fd, &n->lit.type);
		n->lit.nelt = rdint(fd);
		switch (n->lit.littype) {
		case Lvoid:	break;
		case Lchr:	n->lit.chrval = rdint(fd);	break;
		case Lint:	n->lit.intval = rdint(fd);	break;
		case Lflt:	n->lit.fltval = rdflt(fd);	break;
		case Lstr:	rdlenstr(fd, &n->lit.strval);	break;
		case Llbl:	n->lit.lblval = rdstr(fd);	break;
		case Lbool:	n->lit.boolval = rdbool(fd);	break;
		case Lfunc:	n->lit.fnval = unpickle(fd);	break;
		}
		break;
	case Nloopstmt:
		n->loopstmt.init = unpickle(fd);
		n->loopstmt.cond = unpickle(fd);
		n->loopstmt.step = unpickle(fd);
		n->loopstmt.body = unpickle(fd);
		break;
	case Niterstmt:
		n->iterstmt.elt = unpickle(fd);
		n->iterstmt.seq = unpickle(fd);
		n->iterstmt.body = unpickle(fd);
		break;
	case Nmatchstmt:
		n->matchstmt.val = unpickle(fd);
		n->matchstmt.nmatches = rdint(fd);
		n->matchstmt.matches = zalloc(sizeof(Node *) * n->matchstmt.nmatches);
		for (i = 0; i < n->matchstmt.nmatches; i++)
			n->matchstmt.matches[i] = unpickle(fd);
		break;
	case Nmatch:
		n->match.pat = unpickle(fd);
		n->match.block = unpickle(fd);
		break;
	case Nifstmt:
		n->ifstmt.cond = unpickle(fd);
		n->ifstmt.iftrue = unpickle(fd);
		n->ifstmt.iffalse = unpickle(fd);
		break;
	case Nblock:
		n->block.scope = rdstab(fd, 0);
		n->block.nstmts = rdint(fd);
		n->block.stmts = zalloc(sizeof(Node *) * n->block.nstmts);
		n->block.scope->super = curstab();
		pushstab(n->block.scope->super);
		for (i = 0; i < n->block.nstmts; i++)
			n->block.stmts[i] = unpickle(fd);
		popstab();
		break;
	case Ndecl:
		n->decl.did = ndecls; /* unique within file */
		/* sym */
		n->decl.name = unpickle(fd);
		rdtype(fd, &n->decl.type);

		/* symflags */
		n->decl.isconst = rdbool(fd);
		n->decl.isgeneric = rdbool(fd);
		n->decl.isextern = rdbool(fd);
		n->decl.isnoret = rdbool(fd);
		n->decl.ispkglocal = rdbool(fd);

		/* init */
		n->decl.init = unpickle(fd);
		lappend(&decls, &ndecls, n);
		break;
	case Nfunc:
		rdtype(fd, &n->func.type);
		n->func.scope = rdstab(fd, 1);
		n->func.nargs = rdint(fd);
		n->func.args = zalloc(sizeof(Node *) * n->func.nargs);
		n->func.scope->super = curstab();
		pushstab(n->func.scope->super);
		for (i = 0; i < n->func.nargs; i++)
			n->func.args[i] = unpickle(fd);
		n->func.body = unpickle(fd);
		popstab();
		break;
	case Nimpl:
		n->impl.traitname = unpickle(fd);
		rdtrait(fd, &n->impl.trait, NULL);
		rdtype(fd, &n->impl.type);
		n->impl.naux = rdint(fd);
		n->impl.aux = zalloc(sizeof(Node *) * n->impl.naux);
		for (i = 0; i < n->impl.naux; i++)
			rdtype(fd, &n->impl.aux[i]);
		n->impl.ndecls = rdint(fd);
		n->impl.decls = zalloc(sizeof(Node *) * n->impl.ndecls);
		for (i = 0; i < n->impl.ndecls; i++)
			n->impl.decls[i] = rdsym(fd, n->impl.trait);
		lappend(&impltab, &nimpltab, n);
		lappend(&implfix, &nimplfix, n);
		break;
	case Nnone:
		die("Nnone should not be seen as node type!");
		break;
	}
	return n;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x2a812
testb %al, %al
je 0x2284f
movsbl %al, %esi
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1b610
movq %rax, %rbx
movq %r14, %rdi
callq 0x2a844
movl %eax, (%rbx)
leaq 0x3ba76(%rip), %rax     # 0x5e278
movl (%rax), %eax
decl %eax
movl %eax, 0x4(%rbx)
movl 0x8(%rbx), %eax
cmpq $0xd, %rax
ja 0x22c3a
leaq 0x116df(%rip), %rcx     # 0x33efc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r14, %rdi
callq 0x227cd
movq %rax, 0x18(%rbx)
movq %r14, %rdi
callq 0x227cd
movq %rax, 0x20(%rbx)
movq %r14, %rdi
callq 0x227cd
movq %rax, 0x28(%rbx)
jmp 0x22c3a
xorl %ebx, %ebx
jmp 0x22c3a
movq %r14, %rdi
callq 0x2aa5c
movl %eax, 0x18(%rbx)
jmp 0x22baf
movq %r14, %rdi
callq 0x227cd
movq %rax, 0x18(%rbx)
leaq 0x20(%rbx), %rsi
xorl %r15d, %r15d
movq %r14, %rdi
xorl %edx, %edx
callq 0x24c2c
movq %rbx, %rsi
addq $0x28, %rsi
movq %r14, %rdi
callq 0x23046
movq %r14, %rdi
callq 0x2a844
movq %rax, 0x40(%rbx)
leaq (,%rax,8), %rdi
callq 0x29a78
movq %rax, 0x30(%rbx)
xorl %r12d, %r12d
cmpq 0x40(%rbx), %r12
jae 0x228d0
movq 0x30(%rbx), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x23046
incq %r12
addq $0x8, %r15
jmp 0x228b2
movq %r14, %rdi
callq 0x2a844
movq %rax, 0x50(%rbx)
leaq (,%rax,8), %rdi
callq 0x29a78
movq %rax, 0x48(%rbx)
xorl %r15d, %r15d
cmpq 0x50(%rbx), %r15
jae 0x2290f
movq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0x230c3
movq 0x48(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
jmp 0x228f0
leaq 0x3c8f2(%rip), %rdi     # 0x5f208
leaq 0x3c8f3(%rip), %rsi     # 0x5f210
movq %rbx, %rdx
callq 0x29b2d
leaq 0x3c92c(%rip), %rdi     # 0x5f258
leaq 0x3c92d(%rip), %rsi     # 0x5f260
jmp 0x22b8a
movq %r14, %rdi
callq 0x227cd
movq %rax, 0x18(%rbx)
movq %r14, %rdi
callq 0x227cd
jmp 0x22bb7
movq %r14, %rdi
callq 0x2a812
movsbl %al, %eax
movl %eax, 0x18(%rbx)
leaq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0x23046
movq %r14, %rdi
callq 0x2a844
movq %rax, 0x28(%rbx)
movl 0x18(%rbx), %eax
cmpq $0x6, %rax
ja 0x22c3a
leaq 0x115a9(%rip), %rcx     # 0x33f34
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r14, %rdi
callq 0x2a844
movl %eax, 0x30(%rbx)
jmp 0x22c3a
movq %r14, %rdi
callq 0x227cd
movq %rax, 0x18(%rbx)
movq %r14, %rdi
callq 0x2a844
movq %rax, 0x20(%rbx)
leaq (,%rax,8), %rdi
callq 0x29a78
movq %rax, 0x28(%rbx)
xorl %r15d, %r15d
cmpq 0x20(%rbx), %r15
jae 0x22c3a
movq %r14, %rdi
callq 0x227cd
movq 0x28(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
jmp 0x229d0
movq %r14, %rdi
callq 0x227cd
movq %rax, 0x18(%rbx)
movq %r14, %rdi
callq 0x227cd
movq %rax, 0x20(%rbx)
movq %r14, %rdi
callq 0x227cd
movq %rax, 0x28(%rbx)
movq %r14, %rdi
callq 0x227cd
movq %rax, 0x30(%rbx)
jmp 0x22c3a
movq %r14, %rdi
callq 0x2a812
movsbl %al, %eax
movl %eax, 0x18(%rbx)
leaq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0x23046
movq %r14, %rdi
callq 0x2aa5c
testl %eax, %eax
je 0x22a59
movq %rbx, %rsi
addq $0x28, %rsi
movq %r14, %rdi
callq 0x23046
movq %r14, %rdi
callq 0x2aa5c
movl %eax, 0x30(%rbx)
movq %r14, %rdi
callq 0x227cd
movq %rax, 0x48(%rbx)
movq %r14, %rdi
callq 0x2a844
movq %rax, 0x40(%rbx)
leaq (,%rax,8), %rdi
callq 0x29a78
movq %rax, 0x50(%rbx)
xorl %r15d, %r15d
cmpq 0x40(%rbx), %r15
jae 0x22c3a
movq %r14, %rdi
callq 0x227cd
movq 0x50(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
jmp 0x22a90
xorl %r15d, %r15d
movq %r14, %rdi
xorl %esi, %esi
callq 0x24d03
movq %rax, 0x18(%rbx)
movq %r14, %rdi
callq 0x2a844
movq %rax, 0x20(%rbx)
leaq (,%rax,8), %rdi
callq 0x29a78
movq %rax, 0x28(%rbx)
callq 0x1d859
movq 0x18(%rbx), %rcx
movq %rax, (%rcx)
movq 0x18(%rbx), %rax
movq (%rax), %rdi
callq 0x1d890
cmpq 0x20(%rbx), %r15
jae 0x22c35
movq %r14, %rdi
callq 0x227cd
movq 0x28(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
jmp 0x22af5
leaq 0x3be45(%rip), %r15     # 0x5e960
movq (%r15), %rax
movq %rax, 0x18(%rbx)
movq %r14, %rdi
callq 0x227cd
movq %rax, 0x20(%rbx)
movq %rbx, %rsi
addq $0x28, %rsi
movq %r14, %rdi
callq 0x23046
movq %r14, %rdi
callq 0x2aa5c
movb %al, 0x72(%rbx)
movq %r14, %rdi
callq 0x2aa5c
movb %al, 0x73(%rbx)
movq %r14, %rdi
callq 0x2aa5c
movb %al, 0x74(%rbx)
movq %r14, %rdi
callq 0x2aa5c
movb %al, 0x78(%rbx)
movq %r14, %rdi
callq 0x2aa5c
movb %al, 0x75(%rbx)
movq %r14, %rdi
callq 0x227cd
movq %rax, 0x30(%rbx)
leaq 0x3bde1(%rip), %rdi     # 0x5e968
movq %r15, %rsi
movq %rbx, %rdx
callq 0x29b2d
jmp 0x22c3a
movq %r14, %rdi
callq 0x2aa5c
testl %eax, %eax
je 0x22baf
movq %r14, %rdi
callq 0x2a8d3
movq %rax, 0x18(%rbx)
movq %r14, %rdi
callq 0x2a8d3
movq %rax, 0x20(%rbx)
jmp 0x22c3a
movq %rbx, %rsi
addq $0x28, %rsi
movq %r14, %rdi
callq 0x23046
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x24d03
movq %rax, 0x20(%rbx)
movq %r14, %rdi
callq 0x2a844
movq %rax, 0x30(%rbx)
leaq (,%rax,8), %rdi
callq 0x29a78
movq %rax, 0x38(%rbx)
callq 0x1d859
movq 0x20(%rbx), %rcx
movq %rax, (%rcx)
movq 0x20(%rbx), %rax
movq (%rax), %rdi
callq 0x1d890
xorl %r15d, %r15d
movq 0x30(%rbx), %r12
movq %r14, %rdi
callq 0x227cd
cmpq %r12, %r15
jae 0x22c31
movq 0x38(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
jmp 0x22c13
movq %rax, 0x40(%rbx)
callq 0x1d8d4
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x2a997
movsd %xmm0, 0x30(%rbx)
jmp 0x22c3a
movq %r14, %rdi
callq 0x2aa5c
movl %eax, 0x30(%rbx)
jmp 0x22c3a
movq %r14, %rdi
callq 0x2a844
jmp 0x22a1b
movq %rbx, %rsi
addq $0x30, %rsi
movq %r14, %rdi
callq 0x2a93e
jmp 0x22c3a
movq %r14, %rdi
callq 0x2a8d3
jmp 0x22a1b
leaq 0xf6ba(%rip), %rdi      # 0x32351
xorl %eax, %eax
callq 0x1205c