// File: /workspace/github_c_makefile_star2_O1/oridb[P]mc/parse/specialize.c
// Function: fillsubst
static void
fillsubst(Tysubst *tsmap, Type *to, Type *from)
{
	size_t i;

	if (from->type == Typaram) {
		if (debugopt['S'])
			printf("mapping %s => %s\n", tystr(from), tystr(to));
		substput(tsmap, from, to);
		substputspec(tsmap, from, to);
		return;
	}
	assert(to->nsub == from->nsub);
	for (i = 0; i < to->nsub; i++)
		fillsubst(tsmap, to->sub[i], from->sub[i]);
	if (to->type == Tyname && to->narg > 0) {
		for (i = 0; i < to->narg; i++)
			fillsubst(tsmap, to->arg[i], from->arg[i]);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r13
cmpl $0x1a, (%rdx)
jne 0x1f979
leaq 0x419be(%rip), %rax     # 0x611e0
cmpb $0x0, 0x53(%rax)
je 0x1f84f
movq %rbx, %rdi
callq 0x23e44
movq %rax, %r12
movq %r14, %rdi
callq 0x23e44
leaq 0x17aae(%rip), %rdi     # 0x372f0
movq %r12, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x4140
movq (%r13), %rax
movq %r13, (%rsp)
movq 0x8(%r13), %rcx
movq -0x8(%rax,%rcx,8), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2dbc2
cmpq $0x0, 0x20(%rbx)
je 0x1f9e6
xorl %r12d, %r12d
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rax
cmpq $0x0, 0x8(%rax)
je 0x1f96a
xorl %ebp, %ebp
cmpq $0x0, 0x20(%r14)
je 0x1f904
xorl %r13d, %r13d
movq 0x18(%r14), %rax
movq (%rax,%r13,8), %rax
cmpq $0x0, 0x8(%rax)
je 0x1f8fb
xorl %r15d, %r15d
movq 0x18(%rbx), %rcx
movq (%rcx,%r12,8), %rcx
movq (%rcx), %rcx
movq (%rcx,%rbp,8), %rdi
movq (%rax), %rax
movq (%rax,%r15,8), %rsi
callq 0x1e773
testl %eax, %eax
je 0x1f8ea
movq 0x18(%r14), %rax
movq (%rax,%r12,8), %rax
movq 0x18(%rax), %rsi
movq 0x18(%rbx), %rax
movq (%rax,%r13,8), %rax
movq 0x18(%rax), %rdx
movq (%rsp), %rdi
callq 0x1f7fe
incq %r15
movq 0x18(%r14), %rax
movq (%rax,%r13,8), %rax
cmpq 0x8(%rax), %r15
jb 0x1f8aa
incq %r13
cmpq 0x20(%r14), %r13
jb 0x1f898
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rax
movq (%rax), %rax
movq (%rax,%rbp,8), %rdi
leaq 0x428de(%rip), %rax     # 0x621f8
movq (%rax), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rsi
callq 0x1e773
testl %eax, %eax
je 0x1f955
movl (%r14), %eax
andl $-0x2, %eax
cmpl $0x14, %eax
jne 0x1f955
movq 0x68(%r14), %rax
movq (%rax), %rsi
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rax
movq 0x18(%rax), %rdx
movq (%rsp), %rdi
callq 0x1f7fe
incq %rbp
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rax
cmpq 0x8(%rax), %rbp
jb 0x1f88e
incq %r12
cmpq 0x20(%rbx), %r12
jb 0x1f879
jmp 0x1f9e6
movq 0x70(%r14), %rax
cmpq 0x70(%rbx), %rax
jne 0x1f9f5
cmpq $0x0, 0x70(%r14)
je 0x1f9ae
xorl %r15d, %r15d
movq 0x68(%r14), %rax
movq (%rax,%r15,8), %rsi
movq 0x68(%rbx), %rax
movq (%rax,%r15,8), %rdx
movq %r13, %rdi
callq 0x1f7fe
incq %r15
cmpq 0x70(%r14), %r15
jb 0x1f98d
cmpl $0x1c, (%r14)
jne 0x1f9e6
cmpq $0x0, 0x48(%r14)
je 0x1f9e6
cmpq $0x0, 0x48(%r14)
je 0x1f9e6
xorl %r15d, %r15d
movq 0x40(%r14), %rax
movq (%rax,%r15,8), %rsi
movq 0x40(%rbx), %rax
movq (%rax,%r15,8), %rdx
movq %r13, %rdi
callq 0x1f7fe
incq %r15
cmpq 0x48(%r14), %r15
jb 0x1f9c5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x17906(%rip), %rdi     # 0x37302
leaq 0x177e2(%rip), %rsi     # 0x371e5
leaq 0x1790f(%rip), %rcx     # 0x37319
movl $0xea, %edx
callq 0x4180