// File: /workspace/github_c_makefile_star2_O1/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 0x1ed39(%rip), %r15     # 0x32d8c
leaq 0x4d90e(%rip), %r12     # 0x61968
testq %r14, %r14
je 0x142e1
movl 0x8(%r14), %eax
cmpq $0xd, %rax
ja 0x142e1
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
movq 0x18(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1403a
movq 0x20(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1403a
movq 0x28(%r14), %r14
jmp 0x1405a
movq 0x18(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1403a
movq 0x20(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1403a
movq 0x28(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1403a
jmp 0x14217
movq 0x28(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x142fe
cmpq $0x0, 0x30(%r14)
je 0x140f7
xorl %r13d, %r13d
movq 0x38(%r14), %rax
movq (%rax,%r13,8), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1403a
incq %r13
cmpq 0x30(%r14), %r13
jb 0x140dd
movq 0x40(%r14), %r14
jmp 0x1405a
movq 0x18(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1403a
movq 0x20(%r14), %r14
jmp 0x1405a
movq 0x48(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1403a
movq 0x20(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x142fe
movq 0x28(%r14), %rdi
testq %rdi, %rdi
je 0x14142
movl %ebp, %esi
movl %ebx, %edx
callq 0x142fe
cmpq $0x0, 0x40(%r14)
je 0x14166
xorl %r13d, %r13d
movq 0x50(%r14), %rax
movq (%rax,%r13,8), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1403a
incq %r13
cmpq 0x40(%r14), %r13
jb 0x1414c
testl %ebp, %ebp
je 0x142e1
movq %r14, %rdi
callq 0x1d672
cmpl $0x33, %eax
jne 0x142e1
movq (%r12), %rax
movq 0x38(%r14), %rcx
movq (%rax,%rcx,8), %r14
cmpb $0x0, 0x71(%r14)
je 0x142e1
cmpb $0x0, 0x70(%r14)
jne 0x142e1
movb $0x2, 0x70(%r14)
jmp 0x1405a
movq 0x28(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x142fe
testl %ebx, %ebx
je 0x141c8
cmpb $0x0, 0x75(%r14)
je 0x141c8
movb $0x2, 0x70(%r14)
cmpb $0x0, 0x73(%r14)
je 0x141d6
cmpq $0x0, 0x40(%r14)
je 0x14201
movq 0x28(%r14), %rdi
callq 0x234c5
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
jmp 0x14206
movq 0x20(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x142fe
cmpl $0x5, 0x18(%r14)
je 0x14217
jmp 0x142e1
movl $0x1, %ecx
movb %cl, 0x79(%r14)
orl %ecx, %ebp
je 0x142e1
movsbl 0x73(%r14), %ebp
movq 0x30(%r14), %r14
jmp 0x1405a
cmpq $0x0, 0x20(%r14)
je 0x142e1
xorl %r15d, %r15d
movq 0x28(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1403a
incq %r15
cmpq 0x20(%r14), %r15
jb 0x1422e
jmp 0x142e1
movq 0x28(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x142fe
cmpq $0x0, 0x40(%r14)
je 0x1427e
xorl %r15d, %r15d
movq 0x30(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x142fe
incq %r15
cmpq 0x40(%r14), %r15
jb 0x14264
cmpq $0x0, 0x50(%r14)
je 0x142e1
xorl %r15d, %r15d
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 0x1403a
incq %r15
cmpq 0x50(%r14), %r15
jb 0x14288
jmp 0x142e1
movq 0x18(%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1403a
cmpq $0x0, 0x20(%r14)
je 0x142e1
xorl %r15d, %r15d
movq 0x28(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x1403a
incq %r15
cmpq 0x20(%r14), %r15
jb 0x142c7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1eae9(%rip), %rdi     # 0x32de0
xorl %eax, %eax
callq 0x13a00