// File: /workspace/github_c_makefile_star2_O3/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 0x1c9f7
cmpl $0x0, 0x44db7(%rip)     # 0x617a8
je 0x1cbb3
movq 0x28(%rbx), %r15
testq %r15, %r15
je 0x1ca38
movq %r15, %rdi
callq 0x1ac8d
leaq 0x73(%r14), %r13
cmpb $0x0, 0x73(%r14)
je 0x1cac0
movq %r13, (%rsp)
callq 0x1e744
movq %rax, %r13
movq 0x40(%r14), %rax
movq 0x18(%rax), %rsi
movq %r13, %rdi
movq %r15, %rdx
callq 0x1e6e8
jmp 0x1ca4f
leaq 0x73(%r14), %r13
cmpb $0x0, 0x73(%r14)
je 0x1cac0
movq %r13, (%rsp)
callq 0x1e744
movq %rax, %r13
testq %r15, %r15
setne %bpl
movq 0x38(%r14), %rdi
callq 0x1ff19
movq 0x28(%r14), %rdi
callq 0x19640
movq 0x28(%r14), %rdx
movq %r13, %rdi
movq %rax, %rsi
callq 0x1b68d
movq %rax, %r12
movq 0x40(%r14), %rax
testq %rax, %rax
sete %cl
orb %bpl, %cl
jne 0x1caa9
movq 0x18(%rax), %rdi
callq 0x19640
movq %r13, %rdi
movq %rax, %rsi
callq 0x1e6f9
movq %rax, %r15
testq %rax, %rax
je 0x1cbc4
movq 0x38(%r14), %rdi
callq 0x1ff64
movq %r13, %rdi
callq 0x1e785
movq (%rsp), %r13
jmp 0x1cac4
movq 0x28(%r14), %r12
movq 0x18(%r14), %rax
movq %rax, 0x38(%rbx)
movsbl 0x72(%r14), %eax
movl %eax, 0x30(%rbx)
testq %r15, %r15
je 0x1cae5
movq %r15, 0x28(%rbx)
movq %rbx, %rdi
callq 0x1bd15
cmpb $0x0, (%r13)
je 0x1cb92
cmpl $0x0, 0x44df9(%rip)     # 0x618f0
jne 0x1cb92
xorl %edi, %edi
movq %r12, %rsi
callq 0x1b6e6
movq %rax, %r14
callq 0x1fdf7
leaq 0x44e52(%rip), %rcx     # 0x61968
movq (%rcx), %rcx
movq 0x38(%rbx), %rdx
movq (%rcx,%rdx,8), %r15
leaq 0x44dd0(%rip), %rdi     # 0x618f8
leaq 0x44dd1(%rip), %rsi     # 0x61900
movq %rax, %rdx
callq 0x2ceff
leaq 0x44dca(%rip), %rdi     # 0x61908
leaq 0x44dcb(%rip), %rsi     # 0x61910
movq %rbx, %rdx
callq 0x2ceff
leaq 0x44dc4(%rip), %rdi     # 0x61918
leaq 0x44dc5(%rip), %rsi     # 0x61920
movq %r15, %rdx
callq 0x2ceff
cmpl $0x19, (%r14)
jne 0x1cb9a
movq (%rbx), %rdi
callq 0x22b29
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1c686
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1bd15
movq %rbx, %rdi
movq %r12, %rsi
jmp 0x1cba0
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1c686
movq %rbx, %rdi
callq 0x19858
leaq 0x198fb(%rip), %rsi     # 0x364bd
jmp 0x1cbd3
movq %r14, %rdi
callq 0x19858
leaq 0x19910(%rip), %rsi     # 0x364e3
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x138e7