// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x0, 0x76(%rsi)
je 0x1b1e5
cmpl $0x0, 0x435c9(%rip)     # 0x5e7a8
je 0x1b381
movq 0x28(%rbx), %r15
testq %r15, %r15
je 0x1b1f6
movq %r15, %rdi
callq 0x192e3
cmpb $0x0, 0x73(%r14)
je 0x1b28e
callq 0x1c2cd
movq %rax, %r13
testq %r15, %r15
je 0x1b221
movq 0x40(%r14), %rax
movq 0x18(%rax), %rsi
movq %r13, %rdi
movq %r15, %rdx
callq 0x1c27c
testq %r15, %r15
setne %bpl
movq 0x38(%r14), %rdi
callq 0x1d970
movq 0x28(%r14), %rdi
callq 0x17d99
movq 0x28(%r14), %rdx
movq %r13, %rdi
movq %rax, %rsi
callq 0x19c4c
movq %rax, %r12
movq 0x40(%r14), %rax
testq %rax, %rax
sete %cl
orb %bpl, %cl
jne 0x1b27b
movq 0x18(%rax), %rdi
callq 0x17d99
movq %r13, %rdi
movq %rax, %rsi
callq 0x1c28d
movq %rax, %r15
testq %rax, %rax
je 0x1b392
movq 0x38(%r14), %rdi
callq 0x1d9bb
movq %r13, %rdi
callq 0x1c319
jmp 0x1b292
movq 0x28(%r14), %r12
movq 0x18(%r14), %rax
movq %rax, 0x38(%rbx)
movsbl 0x72(%r14), %eax
movl %eax, 0x30(%rbx)
testq %r15, %r15
je 0x1b2b3
movq %r15, 0x28(%rbx)
movq %rbx, %rdi
callq 0x1a296
cmpb $0x0, 0x73(%r14)
je 0x1b360
cmpl $0x0, 0x4362b(%rip)     # 0x5e8f0
jne 0x1b360
xorl %edi, %edi
movq %r12, %rsi
callq 0x19ca0
movq %rax, %r14
callq 0x1d859
leaq 0x43684(%rip), %rcx     # 0x5e968
movq (%rcx), %rcx
movq 0x38(%rbx), %rdx
movq (%rcx,%rdx,8), %r15
leaq 0x43602(%rip), %rdi     # 0x5e8f8
leaq 0x43603(%rip), %rsi     # 0x5e900
movq %rax, %rdx
callq 0x29b2d
leaq 0x435fc(%rip), %rdi     # 0x5e908
leaq 0x435fd(%rip), %rsi     # 0x5e910
movq %rbx, %rdx
callq 0x29b2d
leaq 0x435f6(%rip), %rdi     # 0x5e918
leaq 0x435f7(%rip), %rsi     # 0x5e920
movq %r15, %rdx
callq 0x29b2d
cmpl $0x19, (%r14)
jne 0x1b368
movq (%rbx), %rdi
callq 0x2003f
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1aea7
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1a296
movq %rbx, %rdi
movq %r12, %rsi
jmp 0x1b36e
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1aea7
movq %rbx, %rdi
callq 0x17f9e
leaq 0x170fd(%rip), %rsi     # 0x3248d
jmp 0x1b3a1
movq %r14, %rdi
callq 0x17f9e
leaq 0x17112(%rip), %rsi     # 0x324b3
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x120fd