// File: /workspace/github_c_makefile_star2_O1/oridb[P]mc/parse/infer.c
// Function: ctxstr
static char *
ctxstr(Node *n)
{
	char *t, *t1, *t2, *t3;
	char *s, *d;
	size_t nargs;
	Node **args;
	char buf[512];

	if (!n)
		return strdup("???");
	switch (n->type) {
	default:
		s = strdup(nodestr[n->type]);
		break;
	case Ndecl:
		 d = declname(n);
		 t = nodetystr(n);
		 bprintf(buf, sizeof buf, "%s:%s", d, t);
		 s = strdup(buf);
		 free(t);
		 break;
	case Nname:	s = strdup(namestr(n));	break;
	case Nexpr:
		args = n->expr.args;
		nargs = n->expr.nargs;
		t1 = NULL;
		t2 = NULL;
		t3 = NULL;
		if (exprop(n) == Ovar)
			d = namestr(args[0]);
		else
			d = opstr[exprop(n)];
		t = nodetystr(n);
		if (nargs >= 1)
			t1 = nodetystr(args[0]);
		if (nargs >= 2)
			t2 = nodetystr(args[1]);
		if (nargs >= 3)
			t3 = nodetystr(args[2]);

		switch (opclass[exprop(n)]) {
		case OTpre:	bprintf(buf, sizeof buf, "%s<e:%s>", oppretty[exprop(n)], t1);	break;
		case OTpost:	bprintf(buf, sizeof buf, "<e:%s>%s", t1, oppretty[exprop(n)]);	break;
		case OTzarg:	bprintf(buf, sizeof buf, "%s", oppretty[exprop(n)]);	break;
		case OTbin:
			bprintf(buf, sizeof buf, "<e1:%s> %s <e2:%s>", t1, oppretty[exprop(n)], t2);
			break;
		case OTmisc:
			switch (exprop(n)) {
			case Ovar:	bprintf(buf, sizeof buf, "%s:%s", namestr(args[0]), t);	break;
			case Ocall:	ctxstrcall(buf, sizeof buf,n);	break;
			case Oidx:
				if (exprop(args[0]) == Ovar)
					bprintf(buf, sizeof buf, "%s[<e1:%s>]", namestr(args[0]->expr.args[0]), t2);
				else
					bprintf(buf, sizeof buf, "<sl:%s>[<e1%s>]", t1, t2);
				break;
			case Oslice:
				if (exprop(args[0]) == Ovar)
					bprintf(buf, sizeof buf, "%s[<e1:%s>:<e2:%s>]", namestr(args[0]->expr.args[0]), t2, t3);
				else
					bprintf( buf, sizeof buf, "<sl:%s>[<e1%s>:<e2:%s>]", t1, t2, t3);
				break;
			case Omemb:
				bprintf(buf, sizeof buf, "<%s>.%s", t1, namestr(args[1]));
				break;
			case Otupmemb:
				bprintf(buf, sizeof buf, "<%s>.%llu", t1, args[1]->lit.intval);
				break;
			default:
				bprintf(buf, sizeof buf, "%s:%s", d, t);
				break;
			}
			break;
		default: bprintf(buf, sizeof buf, "%s", d); break;
		}
		free(t);
		free(t1);
		free(t2);
		free(t3);
		s = strdup(buf);
		break;
	}
	return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
testq %rdi, %rdi
je 0x19aee
movq %rdi, %r13
movl 0x8(%rdi), %eax
cmpq $0x8, %rax
je 0x19b04
cmpl $0xa, %eax
je 0x19af7
cmpl $0xb, %eax
jne 0x19b26
movq %r13, %rdi
callq 0x1e53d
movq %rax, %rbx
movq %r13, %rdi
callq 0x19e54
movq %rax, %r14
leaq 0x1d7be(%rip), %rdx     # 0x3727a
leaq 0x10(%rsp), %r15
movl $0x200, %esi            # imm = 0x200
movq %r15, %rdi
movq %rbx, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x2e42e
movq %r15, %rdi
callq 0x4340
movq %rax, %rbx
movq %r14, %rdi
callq 0x4040
jmp 0x19d41
leaq 0x1c40b(%rip), %rdi     # 0x35f00
jmp 0x19b31
movq %r13, %rdi
callq 0x1e73b
movq %rax, %rdi
jmp 0x19b31
movq 0x40(%r13), %r12
movq 0x50(%r13), %rbx
movq %r13, %rdi
callq 0x1d672
cmpl $0x33, %eax
jne 0x19b47
movq (%rbx), %rdi
callq 0x1e73b
movq %rax, %rbp
jmp 0x19b5c
leaq 0x47173(%rip), %rcx     # 0x60ca0
movq (%rcx,%rax,8), %rdi
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4340
movq %r13, %rdi
callq 0x1d672
movl %eax, %eax
leaq 0x46848(%rip), %rcx     # 0x603a0
movq (%rcx,%rax,8), %rbp
movq %r13, %rdi
callq 0x19e54
movq %rax, 0x8(%rsp)
testq %r12, %r12
je 0x19b7b
movq (%rbx), %rdi
callq 0x19e54
movq %rax, %r14
jmp 0x19b7e
xorl %r14d, %r14d
cmpq $0x2, %r12
jb 0x19b92
movq 0x8(%rbx), %rdi
callq 0x19e54
movq %rax, %r15
jmp 0x19b95
xorl %r15d, %r15d
cmpq $0x3, %r12
jb 0x19ba9
movq 0x10(%rbx), %rdi
callq 0x19e54
movq %rax, %r12
jmp 0x19bac
xorl %r12d, %r12d
movq %r13, %rdi
callq 0x1d672
movl %eax, %eax
leaq 0x46f63(%rip), %rcx     # 0x60b20
movl (%rcx,%rax,4), %eax
cmpq $0x4, %rax
ja 0x19cf4
leaq 0x1be7f(%rip), %rcx     # 0x35a50
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r13, %rdi
callq 0x1d672
addl $-0x28, %eax
cmpl $0xb, %eax
ja 0x19d99
leaq 0x1be6f(%rip), %rcx     # 0x35a64
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rbx), %rdi
callq 0x1d672
cmpl $0x33, %eax
jne 0x19e19
movq (%rbx), %rax
movq 0x50(%rax), %rax
movq (%rax), %rdi
callq 0x1e73b
leaq 0x1c304(%rip), %rdx     # 0x35f29
leaq 0x10(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
movq %rax, %rcx
jmp 0x19e2d
movq %r13, %rdi
callq 0x1d672
movl %eax, %eax
leaq 0x46a58(%rip), %rcx     # 0x606a0
movq (%rcx,%rax,8), %rcx
leaq 0x1ce6a(%rip), %rdx     # 0x36abd
leaq 0x10(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
jmp 0x19d08
movq %r13, %rdi
callq 0x1d672
movl %eax, %eax
leaq 0x46a2d(%rip), %rcx     # 0x606a0
movq (%rcx,%rax,8), %r8
leaq 0x1c28f(%rip), %rdx     # 0x35f0d
leaq 0x10(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
movq %r14, %rcx
jmp 0x19ceb
movq %r13, %rdi
callq 0x1d672
movl %eax, %eax
leaq 0x46a02(%rip), %rcx     # 0x606a0
movq (%rcx,%rax,8), %r8
leaq 0x1c26d(%rip), %rdx     # 0x35f16
leaq 0x10(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
movq %r14, %rcx
movq %r15, %r9
xorl %eax, %eax
callq 0x2e42e
jmp 0x19d0f
movq %r13, %rdi
callq 0x1d672
movl %eax, %eax
leaq 0x469cd(%rip), %rcx     # 0x606a0
movq (%rcx,%rax,8), %rcx
leaq 0x1c226(%rip), %rdx     # 0x35f04
leaq 0x10(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
movq %r14, %r8
xorl %eax, %eax
callq 0x2e42e
jmp 0x19d0f
leaq 0x1cdc2(%rip), %rdx     # 0x36abd
leaq 0x10(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
movq %rbp, %rcx
xorl %eax, %eax
callq 0x2e42e
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x4040
movq %r14, %rdi
callq 0x4040
movq %r15, %rdi
callq 0x4040
movq %r12, %rdi
callq 0x4040
leaq 0x10(%rsp), %rdi
callq 0x4340
movq %rax, %rbx
movq %rbx, %rax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rbx), %rdi
callq 0x1e73b
leaq 0x1c20b(%rip), %rdx     # 0x35f71
leaq 0x10(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
movq %r14, %rcx
movq %rax, %r8
jmp 0x19ceb
movq (%rbx), %rdi
callq 0x1e73b
leaq 0x1d4f0(%rip), %rdx     # 0x3727a
leaq 0x10(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
movq %rax, %rcx
jmp 0x19dad
leaq 0x1d4da(%rip), %rdx     # 0x3727a
leaq 0x10(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
movq %rbp, %rcx
movq 0x8(%rsp), %rbx
movq %rbx, %r8
xorl %eax, %eax
callq 0x2e42e
jmp 0x19d14
movq (%rbx), %rdi
callq 0x1d672
cmpl $0x33, %eax
jne 0x19e35
movq (%rbx), %rax
movq 0x50(%rax), %rax
movq (%rax), %rdi
callq 0x1e73b
leaq 0x1c161(%rip), %rdx     # 0x35f45
leaq 0x10(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
movq %rax, %rcx
jmp 0x19e49
movq 0x8(%rbx), %rax
movq 0x30(%rax), %r8
leaq 0x1c177(%rip), %rdx     # 0x35f79
jmp 0x19c7e
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x19ef8
jmp 0x19d0f
leaq 0x1c115(%rip), %rdx     # 0x35f35
leaq 0x10(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
movq %r14, %rcx
movq %r15, %r8
jmp 0x19ceb
leaq 0x1c11d(%rip), %rdx     # 0x35f59
leaq 0x10(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
movq %r14, %rcx
movq %r15, %r8
movq %r12, %r9
jmp 0x19cb9