// File: /workspace/github_c_makefile_star2_O1/oridb[P]mc/parse/dump.c
// Function: outnode
static void
outnode(Node *n, FILE *fd, int depth)
{
	size_t i;
	char *ty;
	char *tr;
	int tid;
	char buf[1024];

	if (!n) {
		findentf(fd, depth, "Nil\n");
		return;
	}
	findentf(fd, depth, "%s.%zd@%i", nodestr[n->type], n->nid, lnum(n->loc));
	switch (n->type) {
	case Ndecl:
		tr = "";
		if (n->decl.trait)
			tr = namestr(n->decl.trait->name);
		fprintf(fd, "(did = %zd, trait=%s, vis = %d)\n", n->decl.did, tr, n->decl.vis);
		findentf(fd, depth + 1, "isglobl=%d\n", n->decl.isglobl);
		findentf(fd, depth + 1, "isconst=%d\n", n->decl.isconst);
		findentf(fd, depth + 1, "isgeneric=%d\n", n->decl.isgeneric);
		findentf(fd, depth + 1, "isextern=%d\n", n->decl.isextern);
		findentf(fd, depth + 1, "ispkglocal=%d\n", n->decl.ispkglocal);
		findentf(fd, depth + 1, "ishidden=%d\n", n->decl.ishidden);
		findentf(fd, depth + 1, "isimport=%d\n", n->decl.isimport);
		findentf(fd, depth + 1, "isnoret=%d\n", n->decl.isnoret);
		findentf(fd, depth + 1, "isexportval=%d\n", n->decl.isexportval);
		findentf(fd, depth, ")\n");
		outsym(n, fd, depth + 1);
		outnode(n->decl.init, fd, depth + 1);
		break;
	case Nblock:
		fprintf(fd, "\n");
		outstab(n->block.scope, fd, depth + 1);
		for (i = 0; i < n->block.nstmts; i++)
			outnode(n->block.stmts[i], fd, depth + 1);
		break;
	case Nifstmt:
		fprintf(fd, "\n");
		outnode(n->ifstmt.cond, fd, depth + 1);
		outnode(n->ifstmt.iftrue, fd, depth + 1);
		outnode(n->ifstmt.iffalse, fd, depth + 1);
		break;
	case Nloopstmt:
		fprintf(fd, "\n");
		outnode(n->loopstmt.init, fd, depth + 1);
		outnode(n->loopstmt.cond, fd, depth + 1);
		outnode(n->loopstmt.step, fd, depth + 1);
		outnode(n->loopstmt.body, fd, depth + 1);
		break;
	case Niterstmt:
		fprintf(fd, "\n");
		outnode(n->iterstmt.elt, fd, depth + 1);
		outnode(n->iterstmt.seq, fd, depth + 1);
		outnode(n->iterstmt.body, fd, depth + 1);
		break;
	case Nmatchstmt:
		fprintf(fd, "\n");
		outnode(n->matchstmt.val, fd, depth + 1);
		for (i = 0; i < n->matchstmt.nmatches; i++)
			outnode(n->matchstmt.matches[i], fd, depth + 1);
		break;
	case Nmatch:
		fprintf(fd, "\n");
		outnode(n->match.pat, fd, depth + 1);
		outnode(n->match.block, fd, depth + 1);
		break;
	case Nuse:	fprintf(fd, " (name = %s, islocal = %d)\n", n->use.name, n->use.islocal);	break;
	case Nexpr:
		   if (exprop(n) == Ovar)
			   assert(decls[n->expr.did]->decl.did == n->expr.did);
		   ty = tystr(n->expr.type);
		   if (n->expr.type)
			   tid = n->expr.type->tid;
		   else
			   tid = -1;
		   fprintf(fd, " (type = %s [tid %d], op = %s, isconst = %d, did=%zd)\n", ty, tid,
				   opstr[n->expr.op], n->expr.isconst, n->expr.did);
		   free(ty);
		   outnode(n->expr.idx, fd, depth + 1);
		   for (i = 0; i < n->expr.nargs; i++)
			   outnode(n->expr.args[i], fd, depth + 1);
		   break;
	case Nlit:
		   switch (n->lit.littype) {
		   case Lvoid:	fprintf(fd, " Lvoid\n");	break;
		   case Lchr:	fprintf(fd, " Lchr %c\n", n->lit.chrval);	break;
		   case Lbool:	fprintf(fd, " Lbool %s\n", n->lit.boolval ? "true" : "false");	break;
		   case Lint:	fprintf(fd, " Lint %llu\n", n->lit.intval);	break;
		   case Lflt:	fprintf(fd, " Lflt %lf\n", n->lit.fltval);	break;
		   case Llbl:	fprintf(fd, " Llbl %s\n", n->lit.lblval);	break;
		   case Lstr:
				fprintf(fd, " Lstr %.*s\n", (int)n->lit.strval.len, n->lit.strval.buf);
				break;
		   case Lfunc:
				fprintf(fd, " lfunc\n");
				outnode(n->lit.fnval, fd, depth + 1);
				break;
		   }
		   break;
	case Nfunc:
		   fprintf(fd, " (args =\n");
		   for (i = 0; i < n->func.nargs; i++)
			   outnode(n->func.args[i], fd, depth + 1);
		   findentf(fd, depth, ")\n");
		   outstab(n->func.scope, fd, depth + 1);
		   outnode(n->func.body, fd, depth + 1);
		   break;
	case Nname:
		   fprintf(fd, "(");
		   if (n->name.ns)
			   fprintf(fd, "%s.", n->name.ns);
		   fprintf(fd, "%s", n->name.name);
		   fprintf(fd, ")\n");
		   break;
	case Nimpl:
		   fprintf(fd, "(name = %s, type = %s)\n", namestr(n->impl.traitname),
				   tyfmt(buf, sizeof buf, n->impl.type));
		   findentf(fd, depth, "");
		   outnode(n->impl.traitname, fd, depth + 1);
		   for (i = 0; i < n->impl.ndecls; i++)
			   outnode(n->impl.decls[i], fd, depth + 1);
		   break;
	case Nnone:
		   fprintf(stderr, "Nnone not a real node type!");
		   fprintf(fd, "Nnone\n");
		   break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x410, %rsp            # imm = 0x410
movl %edx, %r15d
movq %rsi, %rbx
testq %rdi, %rdi
je 0x133a5
movq %rdi, %r14
movl 0x8(%rdi), %eax
leaq 0x4d97c(%rip), %rcx     # 0x60ca0
movq (%rcx,%rax,8), %r12
movl 0xc(%rdi), %ebp
movq (%rdi), %rdi
callq 0x1d580
leaq 0x1f8a7(%rip), %rdx     # 0x32be1
movq %rbx, %rdi
movl %r15d, %esi
movq %r12, %rcx
movl %ebp, %r8d
movl %eax, %r9d
xorl %eax, %eax
callq 0x2e788
movl 0x8(%r14), %eax
cmpq $0xd, %rax
ja 0x138ad
leaq 0x1f7bb(%rip), %rcx     # 0x32b20
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0xa, %edi
movq %rbx, %rsi
callq 0x41f0
movq 0x18(%r14), %rdi
incl %r15d
movq %rbx, %rsi
movl %r15d, %edx
callq 0x132f9
movq 0x20(%r14), %rdi
movq %rbx, %rsi
movl %r15d, %edx
callq 0x132f9
movq 0x28(%r14), %rdi
jmp 0x13608
leaq 0x1f830(%rip), %rdx     # 0x32bdc
movq %rbx, %rdi
movl %r15d, %esi
xorl %eax, %eax
addq $0x410, %rsp            # imm = 0x410
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2e788
movq %r14, %rdi
callq 0x1d672
cmpl $0x33, %eax
jne 0x133f1
leaq 0x4e58c(%rip), %rax     # 0x61968
movq (%rax), %rax
movq 0x38(%r14), %rcx
movq (%rax,%rcx,8), %rax
cmpq %rcx, 0x18(%rax)
jne 0x139a2
movq 0x20(%r14), %rdi
callq 0x23e44
movq %rax, %r12
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x13839
movl 0x4(%rax), %ecx
jmp 0x1383e
leaq 0x1f926(%rip), %rdi     # 0x32d3f
movl $0x9, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x4330
cmpq $0x0, 0x30(%r14)
je 0x13454
leal 0x1(%r15), %ebp
xorl %r12d, %r12d
movq 0x38(%r14), %rax
movq (%rax,%r12,8), %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x132f9
incq %r12
cmpq 0x30(%r14), %r12
jb 0x13439
leaq 0x1f75f(%rip), %rdx     # 0x32bba
movq %rbx, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x2e788
movq 0x20(%r14), %rdi
incl %r15d
movq %rbx, %rsi
movl %r15d, %edx
callq 0x12fa5
movq 0x40(%r14), %rdi
jmp 0x13608
movq 0x20(%r14), %rdx
movl 0x18(%r14), %ecx
leaq 0x1f7f2(%rip), %rsi     # 0x32c84
movq %rbx, %rdi
xorl %eax, %eax
addq $0x410, %rsp            # imm = 0x410
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4240
movl $0xa, %edi
movq %rbx, %rsi
callq 0x41f0
movq 0x18(%r14), %rdi
incl %r15d
movq %rbx, %rsi
movl %r15d, %edx
callq 0x132f9
cmpq $0x0, 0x20(%r14)
je 0x138ad
xorl %r12d, %r12d
movq 0x28(%r14), %rax
movq (%rax,%r12,8), %rdi
movq %rbx, %rsi
movl %r15d, %edx
callq 0x132f9
incq %r12
cmpq 0x20(%r14), %r12
jb 0x134d8
jmp 0x138ad
movl $0xa, %edi
movq %rbx, %rsi
callq 0x41f0
movq 0x18(%r14), %rdi
incl %r15d
movq %rbx, %rsi
movl %r15d, %edx
callq 0x12fa5
cmpq $0x0, 0x20(%r14)
je 0x138ad
xorl %r12d, %r12d
movq 0x28(%r14), %rax
movq (%rax,%r12,8), %rdi
movq %rbx, %rsi
movl %r15d, %edx
callq 0x132f9
incq %r12
cmpq 0x20(%r14), %r12
jb 0x13526
jmp 0x138ad
movl $0x28, %edi
movq %rbx, %rsi
callq 0x41f0
movq 0x18(%r14), %rdx
testq %rdx, %rdx
je 0x1356e
leaq 0x1f634(%rip), %rsi     # 0x32b98
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4240
movq 0x20(%r14), %rdi
movq %rbx, %rsi
callq 0x4190
leaq 0x1f639(%rip), %rdi     # 0x32bba
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
addq $0x410, %rsp            # imm = 0x410
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4330
movl $0xa, %edi
movq %rbx, %rsi
callq 0x41f0
movq 0x18(%r14), %rdi
incl %r15d
movq %rbx, %rsi
movl %r15d, %edx
callq 0x132f9
movq 0x20(%r14), %rdi
movq %rbx, %rsi
movl %r15d, %edx
callq 0x132f9
movq 0x28(%r14), %rdi
movq %rbx, %rsi
movl %r15d, %edx
callq 0x132f9
movq 0x30(%r14), %rdi
jmp 0x13608
movl $0xa, %edi
movq %rbx, %rsi
callq 0x41f0
movq 0x18(%r14), %rdi
incl %r15d
movq %rbx, %rsi
movl %r15d, %edx
callq 0x132f9
movq 0x20(%r14), %rdi
movq %rbx, %rsi
movl %r15d, %edx
addq $0x410, %rsp            # imm = 0x410
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x132f9
movl 0x18(%r14), %eax
cmpq $0x7, %rax
ja 0x138ad
leaq 0x1f521(%rip), %rcx     # 0x32b58
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x30(%r14), %edx
leaq 0x256af(%rip), %rsi     # 0x38cfa
movq %rbx, %rdi
xorl %eax, %eax
addq $0x410, %rsp            # imm = 0x410
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4240
movq 0x40(%r14), %rax
testq %rax, %rax
je 0x1370d
movq 0x10(%rax), %rdi
callq 0x1e73b
movq %rax, %rcx
jmp 0x13714
movq 0x18(%r14), %rdi
callq 0x1e73b
movq %rax, %r12
movq 0x28(%r14), %rdx
leaq 0x10(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x237ca
leaq 0x1f6a1(%rip), %rsi     # 0x32d49
movq %rbx, %rdi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x4240
leaq 0x1e77b(%rip), %rdx     # 0x31e3a
movq %rbx, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x2e788
movq 0x18(%r14), %rdi
incl %r15d
movq %rbx, %rsi
movl %r15d, %edx
callq 0x132f9
cmpq $0x0, 0x50(%r14)
je 0x138ad
xorl %r12d, %r12d
movq 0x48(%r14), %rax
movq (%rax,%r12,8), %rdi
movq %rbx, %rsi
movl %r15d, %edx
callq 0x132f9
incq %r12
cmpq 0x50(%r14), %r12
jb 0x136ec
jmp 0x138ad
leaq 0x1e726(%rip), %rcx     # 0x31e3a
movq 0x18(%r14), %rdx
movsbl 0x70(%r14), %r8d
leaq 0x1f4c7(%rip), %rsi     # 0x32beb
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4240
leal 0x1(%r15), %ebp
movsbl 0x71(%r14), %ecx
leaq 0x1f4ce(%rip), %rdx     # 0x32c0c
movq %rbx, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x2e788
movsbl 0x72(%r14), %ecx
leaq 0x1f4c2(%rip), %rdx     # 0x32c18
movq %rbx, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x2e788
movsbl 0x73(%r14), %ecx
leaq 0x1f4b6(%rip), %rdx     # 0x32c24
movq %rbx, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x2e788
movsbl 0x74(%r14), %ecx
leaq 0x1f4ac(%rip), %rdx     # 0x32c32
movq %rbx, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x2e788
movsbl 0x75(%r14), %ecx
leaq 0x1f4a1(%rip), %rdx     # 0x32c3f
movq %rbx, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x2e788
movsbl 0x76(%r14), %ecx
leaq 0x1f498(%rip), %rdx     # 0x32c4e
movq %rbx, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x2e788
movsbl 0x77(%r14), %ecx
leaq 0x1f48d(%rip), %rdx     # 0x32c5b
movq %rbx, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x2e788
movsbl 0x78(%r14), %ecx
leaq 0x1f482(%rip), %rdx     # 0x32c68
movq %rbx, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x2e788
movsbl 0x79(%r14), %ecx
leaq 0x1f476(%rip), %rdx     # 0x32c74
movq %rbx, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x2e788
leaq 0x1f3a9(%rip), %rdx     # 0x32bba
movq %rbx, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x2e788
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x12f30
movq 0x30(%r14), %rdi
movq %rbx, %rsi
movl %ebp, %edx
jmp 0x1360e
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl 0x18(%r14), %eax
movl 0x30(%r14), %r9d
leaq 0x4cb53(%rip), %rdx     # 0x603a0
movq (%rdx,%rax,8), %r8
movq 0x38(%r14), %rax
movq %rax, (%rsp)
leaq 0x1f495(%rip), %rsi     # 0x32cf5
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x4240
movq %r12, %rdi
callq 0x4040
movq 0x48(%r14), %rdi
incl %r15d
movq %rbx, %rsi
movl %r15d, %edx
callq 0x132f9
cmpq $0x0, 0x40(%r14)
je 0x138ad
xorl %r12d, %r12d
movq 0x50(%r14), %rax
movq (%rax,%r12,8), %rdi
movq %rbx, %rsi
movl %r15d, %edx
callq 0x132f9
incq %r12
cmpq 0x40(%r14), %r12
jb 0x13891
addq $0x410, %rsp            # imm = 0x410
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl 0x30(%r14), %edx
movq 0x38(%r14), %rcx
leaq 0x25466(%rip), %rsi     # 0x38d32
movq %rbx, %rdi
xorl %eax, %eax
addq $0x410, %rsp            # imm = 0x410
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4240
movq 0x30(%r14), %rdx
leaq 0x25425(%rip), %rsi     # 0x38d15
jmp 0x1397c
movsd 0x30(%r14), %xmm0
leaq 0x25422(%rip), %rsi     # 0x38d24
movq %rbx, %rdi
movb $0x1, %al
addq $0x410, %rsp            # imm = 0x410
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4240
leaq 0x253cd(%rip), %rdi     # 0x38cef
movl $0x7, %esi
jmp 0x13586
cmpl $0x0, 0x30(%r14)
leaq 0x1f3f9(%rip), %rax     # 0x32d31
leaq 0x1f3ed(%rip), %rdx     # 0x32d2c
cmoveq %rax, %rdx
leaq 0x253bd(%rip), %rsi     # 0x38d07
jmp 0x1397c
leaq 0x1f3e4(%rip), %rdi     # 0x32d37
movl $0x7, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x4330
movq 0x30(%r14), %rdi
incl %r15d
jmp 0x13608
movq 0x30(%r14), %rdx
leaq 0x253c5(%rip), %rsi     # 0x38d41
movq %rbx, %rdi
xorl %eax, %eax
addq $0x410, %rsp            # imm = 0x410
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4240
movq %rbx, %rdi
callq 0x43f9
jmp 0x138ad
leaq 0x1f2f7(%rip), %rdi     # 0x32ca0
leaq 0x1f31c(%rip), %rsi     # 0x32ccc
leaq 0x1f31c(%rip), %rcx     # 0x32cd3
movl $0xe0, %edx
callq 0x4180