user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<cimg2dimg>:
  endbr64
  push   %r15
  mov    %edx,%eax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edx,-0x5c(%rsp)
  imul   %r8d,%edx
  mov    %ecx,-0xc(%rsp)
  mov    %edx,-0x10(%rsp)
  test   %ecx,%ecx
  jle    L163
  test   %eax,%eax
  jle    L163
  mov    %rsi,%r10
  mov    %r8d,%esi
  test   %r8d,%r8d
  jle    L163
  mov    %r8d,%r14d
  movslq %r8d,%rax
  movapd %xmm0,%xmm3
  mov    %rdi,%r9
  and    $0xfffffff0,%r14d
  movapd %xmm0,%xmm6
  unpcklpd %xmm3,%xmm3
  mov    %rax,-0x70(%rsp)
  lea    0x2(%r14),%ebx
  lea    0x1(%r14),%r15d
  pxor   %xmm5,%xmm5
  shl    $0x3,%rax
  mov    %ebx,-0x4c(%rsp)
  lea    0x3(%r14),%ebx
  pxor   %xmm4,%xmm4
  mov    %ebx,-0x48(%rsp)
  lea    0x4(%r14),%ebx
  mov    %ebx,-0x44(%rsp)
  lea    0x5(%r14),%ebx
  mov    %ebx,-0x40(%rsp)
  lea    0x6(%r14),%ebx
  mov    %ebx,-0x3c(%rsp)
  lea    0x7(%r14),%ebx
  mov    %ebx,-0x38(%rsp)
  lea    0x8(%r14),%ebx
  mov    %ebx,-0x34(%rsp)
  lea    0x9(%r14),%ebx
  mov    %ebx,-0x2c(%rsp)
  lea    0xa(%r14),%ebx
  mov    %rax,-0x68(%rsp)
  mov    %r8d,%eax
  mov    %ebx,-0x28(%rsp)
  lea    0xb(%r14),%ebx
  shr    $0x4,%eax
  mov    %ebx,-0x24(%rsp)
  lea    0xc(%r14),%ebx
  sub    $0x1,%eax
  mov    %ebx,-0x20(%rsp)
  lea    0xd(%r14),%ebx
  add    $0x1,%rax
  mov    %ebx,-0x18(%rsp)
  lea    0xe(%r14),%ebx
  shl    $0x4,%rax
  mov    %ebx,-0x14(%rsp)
  lea    -0x1(%r8),%ebx
  movl   $0x0,-0x1c(%rsp)
  movl   $0x0,-0x30(%rsp)
  mov    %ebx,-0x50(%rsp)
  mov    %rax,-0x58(%rsp)
  nopl   0x0(%rax,%rax,1)
L68:
  movslq -0x1c(%rsp),%rdi
  xor    %ebx,%ebx
  mov    %esi,%r13d
  mov    %rdi,%rcx
  lea    (%r10,%rdi,8),%r8
  add    %r9,%rdi
  nopl   0x0(%rax)
L208:
  mov    -0x70(%rsp),%rax
  lea    (%rdi,%rax,1),%rbp
  mov    -0x68(%rsp),%rax
  cmp    %rbp,%r8
  lea    (%r8,%rax,1),%r12
  setae  %dl
  cmp    %r12,%rdi
  setae  %al
  or     %dl,%al
  je     L115
  mov    -0x58(%rsp),%rax
  cmpl   $0xe,-0x50(%rsp)
  mov    %rdi,%rdx
  lea    (%rax,%rdi,1),%r11
  mov    %r8,%rax
  jbe    L115
  nopl   0x0(%rax,%rax,1)
L71:
  movdqu (%rdx),%xmm0
  add    $0x10,%rdx
  sub    $0xffffffffffffff80,%rax
  movdqa %xmm0,%xmm1
  punpckhbw %xmm5,%xmm0
  punpcklbw %xmm5,%xmm1
  movdqa %xmm0,%xmm2
  punpckhwd %xmm4,%xmm0
  movdqa %xmm1,%xmm7
  punpckhwd %xmm4,%xmm1
  punpcklwd %xmm4,%xmm2
  punpcklwd %xmm4,%xmm7
  cvtdq2pd %xmm7,%xmm8
  mulpd  %xmm3,%xmm8
  pshufd $0xee,%xmm7,%xmm7
  cvtdq2pd %xmm7,%xmm7
  mulpd  %xmm3,%xmm7
  movups %xmm8,-0x80(%rax)
  movups %xmm7,-0x70(%rax)
  cvtdq2pd %xmm1,%xmm7
  pshufd $0xee,%xmm1,%xmm1
  cvtdq2pd %xmm1,%xmm1
  mulpd  %xmm3,%xmm1
  mulpd  %xmm3,%xmm7
  movups %xmm1,-0x50(%rax)
  cvtdq2pd %xmm2,%xmm1
  mulpd  %xmm3,%xmm1
  pshufd $0xee,%xmm2,%xmm2
  cvtdq2pd %xmm2,%xmm2
  mulpd  %xmm3,%xmm2
  movups %xmm7,-0x60(%rax)
  movups %xmm1,-0x40(%rax)
  cvtdq2pd %xmm0,%xmm1
  pshufd $0xee,%xmm0,%xmm0
  mulpd  %xmm3,%xmm1
  cvtdq2pd %xmm0,%xmm0
  movups %xmm2,-0x30(%rax)
  mulpd  %xmm3,%xmm0
  movups %xmm1,-0x20(%rax)
  movups %xmm0,-0x10(%rax)
  cmp    %r11,%rdx
  jne    L71
  cmp    %r14d,%esi
  je     L248
  lea    (%rcx,%r14,1),%eax
  pxor   %xmm0,%xmm0
  cltq
  movzbl (%r9,%rax,1),%edx
  cvtsi2sd %edx,%xmm0
  mulsd  %xmm6,%xmm0
  movsd  %xmm0,(%r10,%rax,8)
  cmp    %r15d,%esi
  jle    L248
  lea    (%rcx,%r15,1),%eax
  pxor   %xmm0,%xmm0
  cltq
  movzbl (%r9,%rax,1),%edx
  cvtsi2sd %edx,%xmm0
  mulsd  %xmm6,%xmm0
  movsd  %xmm0,(%r10,%rax,8)
  mov    -0x4c(%rsp),%eax
  cmp    %eax,%esi
  jle    L248
  add    %ecx,%eax
  pxor   %xmm0,%xmm0
  cltq
  movzbl (%r9,%rax,1),%edx
  cvtsi2sd %edx,%xmm0
  mulsd  %xmm6,%xmm0
  movsd  %xmm0,(%r10,%rax,8)
  mov    -0x48(%rsp),%eax
  cmp    %eax,%esi
  jle    L248
  add    %ecx,%eax
  pxor   %xmm0,%xmm0
  cltq
  movzbl (%r9,%rax,1),%edx
  cvtsi2sd %edx,%xmm0
  mulsd  %xmm6,%xmm0
  movsd  %xmm0,(%r10,%rax,8)
  mov    -0x44(%rsp),%eax
  cmp    %eax,%esi
  jle    L248
  add    %ecx,%eax
  pxor   %xmm0,%xmm0
  cltq
  movzbl (%r9,%rax,1),%edx
  cvtsi2sd %edx,%xmm0
  mulsd  %xmm6,%xmm0
  movsd  %xmm0,(%r10,%rax,8)
  mov    -0x40(%rsp),%eax
  cmp    %eax,%esi
  jle    L248
  add    %ecx,%eax
  pxor   %xmm0,%xmm0
  cltq
  movzbl (%r9,%rax,1),%edx
  cvtsi2sd %edx,%xmm0
  mulsd  %xmm6,%xmm0
  movsd  %xmm0,(%r10,%rax,8)
  mov    -0x3c(%rsp),%eax
  cmp    %eax,%esi
  jle    L248
  add    %ecx,%eax
  pxor   %xmm0,%xmm0
  cltq
  movzbl (%r9,%rax,1),%edx
  cvtsi2sd %edx,%xmm0
  mulsd  %xmm6,%xmm0
  movsd  %xmm0,(%r10,%rax,8)
  mov    -0x38(%rsp),%eax
  cmp    %eax,%esi
  jle    L248
  add    %ecx,%eax
  pxor   %xmm0,%xmm0
  cltq
  movzbl (%r9,%rax,1),%edx
  cvtsi2sd %edx,%xmm0
  mulsd  %xmm6,%xmm0
  movsd  %xmm0,(%r10,%rax,8)
  mov    -0x34(%rsp),%eax
  cmp    %eax,%esi
  jle    L248
  add    %ecx,%eax
  pxor   %xmm0,%xmm0
  cltq
  movzbl (%r9,%rax,1),%edx
  cvtsi2sd %edx,%xmm0
  mulsd  %xmm6,%xmm0
  movsd  %xmm0,(%r10,%rax,8)
  mov    -0x2c(%rsp),%eax
  cmp    %eax,%esi
  jle    L248
  add    %ecx,%eax
  pxor   %xmm0,%xmm0
  cltq
  movzbl (%r9,%rax,1),%edx
  cvtsi2sd %edx,%xmm0
  mulsd  %xmm6,%xmm0
  movsd  %xmm0,(%r10,%rax,8)
  mov    -0x28(%rsp),%eax
  cmp    %eax,%esi
  jle    L248
  add    %ecx,%eax
  pxor   %xmm0,%xmm0
  cltq
  movzbl (%r9,%rax,1),%edx
  cvtsi2sd %edx,%xmm0
  mulsd  %xmm6,%xmm0
  movsd  %xmm0,(%r10,%rax,8)
  mov    -0x24(%rsp),%eax
  cmp    %eax,%esi
  jle    L248
  add    %ecx,%eax
  pxor   %xmm0,%xmm0
  cltq
  movzbl (%r9,%rax,1),%edx
  cvtsi2sd %edx,%xmm0
  mulsd  %xmm6,%xmm0
  movsd  %xmm0,(%r10,%rax,8)
  mov    -0x20(%rsp),%eax
  cmp    %eax,%esi
  jle    L248
  add    %ecx,%eax
  pxor   %xmm0,%xmm0
  cltq
  movzbl (%r9,%rax,1),%edx
  cvtsi2sd %edx,%xmm0
  mulsd  %xmm6,%xmm0
  movsd  %xmm0,(%r10,%rax,8)
  mov    -0x18(%rsp),%eax
  cmp    %eax,%esi
  jle    L248
  add    %ecx,%eax
  pxor   %xmm0,%xmm0
  cltq
  movzbl (%r9,%rax,1),%edx
  cvtsi2sd %edx,%xmm0
  mulsd  %xmm6,%xmm0
  movsd  %xmm0,(%r10,%rax,8)
  mov    -0x14(%rsp),%eax
  cmp    %eax,%esi
  jle    L248
  add    %ecx,%eax
  pxor   %xmm0,%xmm0
  cltq
  movzbl (%r9,%rax,1),%edx
  cvtsi2sd %edx,%xmm0
  mulsd  %xmm6,%xmm0
  movsd  %xmm0,(%r10,%rax,8)
  nopl   0x0(%rax,%rax,1)
L248:
  add    $0x1,%ebx
  mov    %r12,%r8
  mov    %rbp,%rdi
  add    %esi,%ecx
  cmp    %ebx,-0x5c(%rsp)
  jne    L208
  addl   $0x1,-0x30(%rsp)
  mov    -0x10(%rsp),%edi
  mov    -0x30(%rsp),%eax
  add    %edi,-0x1c(%rsp)
  cmp    %eax,-0xc(%rsp)
  jne    L68
L163:
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L115:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L154:
  movzbl (%rdi,%rax,1),%edx
  pxor   %xmm0,%xmm0
  cvtsi2sd %edx,%xmm0
  mulsd  %xmm6,%xmm0
  movsd  %xmm0,(%r8,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%r13
  jne    L154
  jmp    L248
```

assistant: ```c
int cimg2dimg(unsigned char *src, double *dst, int w, int h, int dp, double norm) {
  int i, j, k;
  int lw;
  lw = w * dp;
  for (j = 0; j < h; j++) {
    for (i = 0; i < w; i++) {
      for (k = 0; k < dp; k++)
        dst[j * lw + i * dp + k] = norm * src[j * lw + i * dp + k];
    }
  }
  return 0;
}
```