// File: /workspace/github_c_makefile_star2_O3/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, %r12
cmpl $0x1a, (%rdx)
jne 0x1f734
leaq 0x41c14(%rip), %rax     # 0x611e0
cmpb $0x0, 0x53(%rax)
je 0x1f5ff
movq %rbx, %rdi
callq 0x2398e
movq %r12, %r15
movq %rax, %r12
movq %r14, %rdi
callq 0x2398e
leaq 0x17d11(%rip), %rdi     # 0x37300
movq %r12, %rsi
movq %r15, %r12
movq %rax, %rdx
xorl %eax, %eax
callq 0x4140
movq (%r12), %rax
movq %r12, (%rsp)
movq 0x8(%r12), %rcx
movq -0x8(%rax,%rcx,8), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2d71e
movq 0x20(%rbx), %rcx
testq %rcx, %rcx
je 0x1f798
movq 0x18(%rbx), %rax
xorl %r12d, %r12d
movq (%rax,%r12,8), %rdx
cmpq $0x0, 0x8(%rdx)
je 0x1f726
xorl %ebp, %ebp
movq 0x20(%r14), %rcx
testq %rcx, %rcx
je 0x1f6c0
movq 0x18(%r14), %rax
xorl %r13d, %r13d
movq (%rax,%r13,8), %rdx
cmpq $0x0, 0x8(%rdx)
je 0x1f6b4
xorl %r15d, %r15d
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rax
movq (%rax), %rax
movq (%rax,%rbp,8), %rdi
movq (%rdx), %rax
movq (%rax,%r15,8), %rsi
callq 0x1e523
testl %eax, %eax
je 0x1f69f
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 0x1f5a8
incq %r15
movq 0x18(%r14), %rax
movq (%rax,%r13,8), %rdx
cmpq 0x8(%rdx), %r15
jb 0x1f65f
movq 0x20(%r14), %rcx
incq %r13
cmpq %rcx, %r13
jb 0x1f651
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rax
movq (%rax), %rax
movq (%rax,%rbp,8), %rdi
leaq 0x42b26(%rip), %rax     # 0x621f8
movq (%rax), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rsi
callq 0x1e523
testl %eax, %eax
je 0x1f70d
movl (%r14), %eax
andl $-0x2, %eax
cmpl $0x14, %eax
jne 0x1f70d
movq 0x68(%r14), %rax
movq (%rax), %rsi
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rax
movq 0x18(%rax), %rdx
movq (%rsp), %rdi
callq 0x1f5a8
incq %rbp
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rcx
cmpq 0x8(%rcx), %rbp
jb 0x1f641
movq 0x20(%rbx), %rcx
incq %r12
cmpq %rcx, %r12
jb 0x1f630
jmp 0x1f798
movq 0x70(%r14), %rax
cmpq 0x70(%rbx), %rax
jne 0x1f7a7
testq %rax, %rax
je 0x1f767
xorl %r15d, %r15d
movq 0x68(%r14), %rax
movq (%rax,%r15,8), %rsi
movq 0x68(%rbx), %rax
movq (%rax,%r15,8), %rdx
movq %r12, %rdi
callq 0x1f5a8
incq %r15
cmpq 0x70(%r14), %r15
jb 0x1f746
cmpl $0x1c, (%r14)
jne 0x1f798
cmpq $0x0, 0x48(%r14)
je 0x1f798
xorl %r15d, %r15d
movq 0x40(%r14), %rax
movq (%rax,%r15,8), %rsi
movq 0x40(%rbx), %rax
movq (%rax,%r15,8), %rdx
movq %r12, %rdi
callq 0x1f5a8
incq %r15
cmpq 0x48(%r14), %r15
jb 0x1f777
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x17b64(%rip), %rdi     # 0x37312
leaq 0x17a40(%rip), %rsi     # 0x371f5
leaq 0x17b6d(%rip), %rcx     # 0x37329
movl $0xea, %edx
callq 0x4180