// File: /workspace/github_c_makefile_star2_O2/oridb[P]mc/parse/export.c
// Function: tagnode
static void
tagnode(Stab *st, Node *n, int ingeneric, int hidelocal)
{
	size_t i;
	Node *d;

	if (!n)
		return;
	switch (n->type) {
	case Nblock:
		for (i = 0; i < n->block.nstmts; i++)
			tagnode(st, n->block.stmts[i], ingeneric, hidelocal);
		break;
	case Nifstmt:
		tagnode(st, n->ifstmt.cond, ingeneric, hidelocal);
		tagnode(st, n->ifstmt.iftrue, ingeneric, hidelocal);
		tagnode(st, n->ifstmt.iffalse, ingeneric, hidelocal);
		break;
	case Nloopstmt:
		tagnode(st, n->loopstmt.init, ingeneric, hidelocal);
		tagnode(st, n->loopstmt.cond, ingeneric, hidelocal);
		tagnode(st, n->loopstmt.step, ingeneric, hidelocal);
		tagnode(st, n->loopstmt.body, ingeneric, hidelocal);
		break;
	case Niterstmt:
		tagnode(st, n->iterstmt.elt, ingeneric, hidelocal);
		tagnode(st, n->iterstmt.seq, ingeneric, hidelocal);
		tagnode(st, n->iterstmt.body, ingeneric, hidelocal);
		break;
	case Nmatchstmt:
		tagnode(st, n->matchstmt.val, ingeneric, hidelocal);
		for (i = 0; i < n->matchstmt.nmatches; i++)
			tagnode(st, n->matchstmt.matches[i], ingeneric, hidelocal);
		break;
	case Nmatch:
		tagnode(st, n->match.pat, ingeneric, hidelocal);
		tagnode(st, n->match.block, ingeneric, hidelocal);
		break;
	case Nexpr:
		tagnode(st, n->expr.idx, ingeneric, hidelocal);
		tagtype(st, n->expr.type, ingeneric, hidelocal);
		if (n->expr.param)
			tagtype(st, n->expr.param, ingeneric, hidelocal);
		for (i = 0; i < n->expr.nargs; i++)
			tagnode(st, n->expr.args[i], ingeneric, hidelocal);
		/* generics need to have the decls they refer to exported. */
		if (ingeneric && exprop(n) == Ovar) {
			d = decls[n->expr.did];
			if (d->decl.isglobl && d->decl.vis == Visintern) {
				d->decl.vis = Vishidden;
				tagnode(st, d, ingeneric, hidelocal);
			}
		}
		break;
	case Nlit:
		tagtype(st, n->lit.type, ingeneric, hidelocal);
		if (n->lit.littype == Lfunc)
			tagnode(st, n->lit.fnval, ingeneric, hidelocal);
		break;
	case Ndecl:
		tagtype(st, n->decl.type, ingeneric, hidelocal);
		if (hidelocal && n->decl.ispkglocal)
			n->decl.vis = Vishidden;
		n->decl.isexportval = isexportval(n);
		if (n->decl.isexportval || ingeneric)
			tagnode(st, n->decl.init, n->decl.isgeneric, hidelocal);
		break;
	case Nfunc:
		tagtype(st, n->func.type, ingeneric, hidelocal);
		for (i = 0; i < n->func.nargs; i++)
			tagnode(st, n->func.args[i], ingeneric, hidelocal);
		tagnode(st, n->func.body, ingeneric, hidelocal);
		break;
	case Nimpl:
		tagtype(st, n->impl.type, ingeneric, hidelocal);
		for (i = 0; i < n->impl.naux; i++)
			tagtype(st, n->impl.aux[i], ingeneric, hidelocal);
		for (i = 0; i < n->impl.ndecls; i++) {
			n->impl.decls[i]->decl.vis = Vishidden;
			tagnode(st, n->impl.decls[i], 0, hidelocal);
		}
		break;
	case Nuse:
	case Nname:
		break;
	case Nnone:
		die("Invalid node for type export\n");
		break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x1c726(%rip), %r15     # 0x2ed6c
leaq 0x4c31b(%rip), %r12     # 0x5e968
testq %r14, %r14
je 0x12893
movl 0x8(%r14), %eax
cmpq $0xd, %rax
ja 0x12893
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
movq 0x18(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1262d
movq 0x20(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1262d
movq 0x28(%r14), %r14
jmp 0x1264d
movq 0x18(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1262d
movq 0x20(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1262d
movq 0x28(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1262d
jmp 0x127e4
movq 0x28(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x128b0
xorl %r13d, %r13d
cmpq 0x30(%r14), %r13
jae 0x126e5
movq 0x38(%r14), %rax
movq (%rax,%r13,8), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1262d
incq %r13
jmp 0x126c9
movq 0x40(%r14), %r14
jmp 0x1264d
movq 0x18(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1262d
movq 0x20(%r14), %r14
jmp 0x1264d
movq 0x48(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1262d
movq 0x20(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x128b0
movq 0x28(%r14), %rdi
testq %rdi, %rdi
je 0x12730
movl %ebp, %esi
movl %ebx, %edx
callq 0x128b0
xorl %r13d, %r13d
cmpq 0x40(%r14), %r13
jae 0x1274f
movq 0x50(%r14), %rax
movq (%rax,%r13,8), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1262d
incq %r13
jmp 0x12733
testl %ebp, %ebp
je 0x12893
movq %r14, %rdi
callq 0x1b5e6
cmpl $0x33, %eax
jne 0x12893
movq (%r12), %rax
movq 0x38(%r14), %rcx
movq (%rax,%rcx,8), %r14
cmpb $0x0, 0x71(%r14)
je 0x12893
cmpb $0x0, 0x70(%r14)
jne 0x12893
movb $0x2, 0x70(%r14)
jmp 0x1264d
movq 0x28(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x128b0
testl %ebx, %ebx
je 0x127b1
cmpb $0x0, 0x75(%r14)
je 0x127b1
movb $0x2, 0x70(%r14)
movq %r14, %rdi
callq 0x12320
movb %al, 0x79(%r14)
orl %eax, %ebp
je 0x12893
movsbl 0x73(%r14), %ebp
jmp 0x127e4
movq 0x20(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x128b0
cmpl $0x5, 0x18(%r14)
jne 0x12893
movq 0x30(%r14), %r14
jmp 0x1264d
xorl %r15d, %r15d
cmpq 0x20(%r14), %r15
jae 0x12893
movq 0x28(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1262d
incq %r15
jmp 0x127f0
movq 0x28(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x128b0
xorl %r15d, %r15d
cmpq 0x40(%r14), %r15
jae 0x1283c
movq 0x30(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x128b0
incq %r15
jmp 0x12820
xorl %r15d, %r15d
cmpq 0x50(%r14), %r15
jae 0x12893
movq 0x48(%r14), %rax
movq (%rax,%r15,8), %rax
movb $0x2, 0x70(%rax)
movq 0x48(%r14), %rax
movq (%rax,%r15,8), %rdi
xorl %esi, %esi
movl %ebx, %edx
callq 0x1262d
incq %r15
jmp 0x1283f
movq 0x18(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1262d
xorl %r15d, %r15d
cmpq 0x20(%r14), %r15
jae 0x12893
movq 0x28(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1262d
incq %r15
jmp 0x12877
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c517(%rip), %rdi     # 0x2edc0
xorl %eax, %eax
callq 0x1205c