// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/common/type.c
// Function: subtilis_type_init_copy
void subtilis_type_init_copy(subtilis_type_t *dst, const subtilis_type_t *src,
			     subtilis_error_t *err)
{
	if (src->type == SUBTILIS_TYPE_FN) {
		dst->type = src->type;
		prv_init_copy_fn(&dst->params.fn, &src->params.fn, err);
	} else if (src->type == SUBTILIS_TYPE_REC) {
		dst->type = src->type;
		prv_init_copy_rec(&dst->params.rec, &src->params.rec, err);
	} else if ((src->type == SUBTILIS_TYPE_ARRAY_FN) ||
		   (src->type == SUBTILIS_TYPE_VECTOR_FN)) {
		dst->type = src->type;
		dst->params.array.num_dims = src->params.array.num_dims;
		memcpy(dst->params.array.dims, src->params.array.dims,
		       sizeof(src->params.array.dims));
		prv_init_copy_fn(&dst->params.array.params.fn,
				 &src->params.array.params.fn, err);
	} else if ((src->type == SUBTILIS_TYPE_ARRAY_REC) ||
		   (src->type == SUBTILIS_TYPE_VECTOR_REC)) {
		dst->type = src->type;
		dst->params.array.num_dims = src->params.array.num_dims;
		memcpy(dst->params.array.dims, src->params.array.dims,
		       sizeof(src->params.array.dims));
		prv_init_copy_rec(&dst->params.array.params.rec,
				  &src->params.array.params.rec, err);
	} else {
		*dst = *src;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x9, (%rax)
jne 0x3df07
movq -0x10(%rbp), %rax
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
movq -0x18(%rbp), %rdx
callq 0x3e530
jmp 0x3e037
movq -0x10(%rbp), %rax
cmpl $0x16, (%rax)
jne 0x3df3a
movq -0x10(%rbp), %rax
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
movq -0x18(%rbp), %rdx
callq 0x3e680
jmp 0x3e035
movq -0x10(%rbp), %rax
cmpl $0xe, (%rax)
je 0x3df4c
movq -0x10(%rbp), %rax
cmpl $0x14, (%rax)
jne 0x3dfae
movq -0x10(%rbp), %rax
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
addq $0x4, %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
addq $0x4, %rsi
movl $0x28, %edx
callq 0x12190
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
addq $0x30, %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
addq $0x30, %rsi
movq -0x18(%rbp), %rdx
callq 0x3e530
jmp 0x3e033
movq -0x10(%rbp), %rax
cmpl $0xf, (%rax)
je 0x3dfc0
movq -0x10(%rbp), %rax
cmpl $0x15, (%rax)
jne 0x3e01f
movq -0x10(%rbp), %rax
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
addq $0x4, %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
addq $0x4, %rsi
movl $0x28, %edx
callq 0x12190
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
addq $0x30, %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
addq $0x30, %rsi
movq -0x18(%rbp), %rdx
callq 0x3e680
jmp 0x3e031
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x148, %edx            # imm = 0x148
callq 0x12190
jmp 0x3e033
jmp 0x3e035
jmp 0x3e037
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)