// File: /workspace/github_c_makefile_star2_O0/oridb[P]mc/parse/infer.c
// Function: initvar
static Type *
initvar(Node *n, Node *s)
{
	Type *t, *u, *param;
	Tysubst *subst;

	if (s->decl.ishidden && !allowhidden)
		fatal(n, "attempting to refer to hidden decl %s", ctxstr(n));

	param = n->expr.param;
	if (param)
		tyresolve(param);
	if (s->decl.isgeneric) {
		subst = mksubst();
		if (param)
			substput(subst, s->decl.trait->param, param);
		pushenv(s->decl.env);
		t = tysubstmap(subst, tf(s->decl.type), s->decl.type);
		if (s->decl.trait && !param) {
			u = tf(s->decl.trait->param);
			param = substget(subst, u);
			if (!param)
				fatal(n, "ambiguous trait decl %s", ctxstr(s));
		}
		popenv(s->decl.env);
		substfree(subst);
	} else {
		t = s->decl.type;
	}
	n->expr.did = s->decl.did;
	n->expr.isconst = s->decl.isconst;
	if (param) {
		n->expr.param = param;
		delayedcheck(n);
	}
	if (s->decl.isgeneric && !ingeneric) {
		t = tyfreshen(NULL, t);
		addspecialization(n, curstab());
		if (t->type == Tyvar) {
			settype(n, mktyvar(n->loc));
			delayedcheck(n);
		} else {
			settype(n, t);
		}
	} else {
		settype(n, t);
	}
	return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl 0x76(%rax), %eax
cmpl $0x0, %eax
je 0x2d25c
cmpl $0x0, 0x50094(%rip)     # 0x7d2c8
jne 0x2d25c
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
callq 0x27be0
movq -0x38(%rbp), %rdi
movq %rax, %rdx
leaq 0x251f7(%rip), %rsi     # 0x5244c
movb $0x0, %al
callq 0x1dfe0
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x2d278
movq -0x28(%rbp), %rdi
callq 0x29190
movq -0x10(%rbp), %rax
cmpb $0x0, 0x73(%rax)
je 0x2d368
callq 0x30990
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x2d2af
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x18(%rax), %rsi
movq -0x28(%rbp), %rdx
callq 0x308e0
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x32f70
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x277c0
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdx
callq 0x2add0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x2d350
cmpq $0x0, -0x28(%rbp)
jne 0x2d350
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x277c0
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x30920
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x2d34e
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
callq 0x27be0
movq -0x48(%rbp), %rdi
movq %rax, %rdx
leaq 0x2512b(%rip), %rsi     # 0x52472
movb $0x0, %al
callq 0x1dfe0
jmp 0x2d350
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x32fe0
movq -0x30(%rbp), %rdi
callq 0x30a10
jmp 0x2d374
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
movsbl 0x72(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x30(%rax)
cmpq $0x0, -0x28(%rbp)
je 0x2d3af
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rdi
callq 0x2b7a0
movq -0x10(%rbp), %rax
movsbl 0x73(%rax), %eax
cmpl $0x0, %eax
je 0x2d432
cmpl $0x0, 0x5004d(%rip)     # 0x7d410
jne 0x2d432
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edi
callq 0x2ae70
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
callq 0x32d60
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x2d450
movq -0x18(%rbp), %rax
cmpl $0x19, (%rax)
jne 0x2d423
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x370c0
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0x2ce80
movq -0x8(%rbp), %rdi
callq 0x2b7a0
jmp 0x2d430
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2ce80
jmp 0x2d43f
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2ce80
movq -0x18(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)