user: 下面的汇编指令对应的C源代码是什么：

```asm
<jp2_downsample_image_components>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %ecx,%r13d
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %r8,%rbp
  push   %rbx
  mov    %r9,%rbx
  sub    $0x58,%rsp
  mov    0x90(%rsp),%rax
  mov    %edx,0x10(%rsp)
  imul   %esi,%edx
  mov    %rdi,(%rsp)
  mov    %rax,0x18(%rsp)
  mov    0x98(%rsp),%rax
  mov    %edx,%edi
  mov    %rax,0x20(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  mov    %edx,0x14(%rsp)
  call   <malloc@plt>
  mov    %rax,%r14
  test   %r13d,%r13d
  jle    L64
  movslq %r13d,%rax
  mov    %rbp,%r10
  mov    (%rsp),%rbp
  xor    %r15d,%r15d
  mov    %rax,0x28(%rsp)
  lea    0x44(%rsp),%rax
  mov    %rax,0x38(%rsp)
  lea    0x40(%rsp),%rax
  mov    %rax,0x30(%rsp)
L69:
  mov    (%r10),%edx
  mov    %r15d,%r11d
  mov    %edx,(%rbx)
  mov    0x4(%r10),%eax
  mov    %eax,0x4(%rbx)
  mov    0x8(%r10),%ecx
  mov    %ecx,0x8(%rbx)
  mov    0xc(%r10),%esi
  mov    %esi,0xc(%rbx)
  test   %edx,%edx
  js     L58
  cmp    %edx,%r12d
  jg     L1
L58:
  movl   $0x0,(%rbx)
L1:
  test   %eax,%eax
  js     L52
  cmp    %eax,0x10(%rsp)
  jg     L78
L52:
  movl   $0x0,0x4(%rbx)
L78:
  test   %ecx,%ecx
  jg     L4
  movl   $0x1,0x8(%rbx)
L4:
  test   %esi,%esi
  jg     L11
  movl   $0x1,0xc(%rbx)
L11:
  mov    0x14(%rsp),%r8d
  mov    %r11d,%edx
  mov    %r13d,%ecx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  mov    %r10,0x8(%rsp)
  add    $0x10,%rbx
  mov    %r11d,(%rsp)
  call   <collect_component@plt>
  mov    -0x4(%rbx),%eax
  sub    $0x8,%rsp
  mov    -0x8(%rbx),%r9d
  mov    -0xc(%rbx),%r8d
  push   0x40(%rsp)
  mov    %r12d,%esi
  mov    %r14,%rdi
  mov    -0x10(%rbx),%ecx
  push   0x40(%rsp)
  push   %rax
  mov    0x30(%rsp),%edx
  call   <downsample_component@plt>
  mov    0x64(%rsp),%ecx
  mov    0x60(%rsp),%edx
  mov    %r12d,%esi
  add    $0x20,%rsp
  mov    %r14,%rdi
  call   <pack_component_array@plt>
  mov    0x40(%rsp),%r8d
  mov    (%rsp),%edx
  mov    %rbp,%rdi
  imul   0x44(%rsp),%r8d
  mov    %r13d,%ecx
  mov    %r14,%rsi
  call   <rewrite_component@plt>
  mov    0x40(%rsp),%eax
  mov    0x18(%rsp),%rdi
  mov    0x8(%rsp),%r10
  mov    %eax,(%rdi,%r15,4)
  mov    0x44(%rsp),%eax
  mov    0x20(%rsp),%rdi
  add    $0x10,%r10
  mov    %eax,(%rdi,%r15,4)
  add    $0x1,%r15
  cmp    0x28(%rsp),%r15
  jne    L69
L64:
  mov    %r14,%rdi
  call   <free@plt>
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L21
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L21:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void jp2_downsample_image_components(unsigned char *bitmap, const int width, const int height, const int bpp, const int *csampling, int *csampling_effective, int *cwidth, int *cheight) {
  unsigned char *carray;
  int compstep;
  int out_width, out_height;
  int *csampling_base;
  int i;
  carray = malloc(width * height);
  for (compstep = 0; compstep < bpp; compstep++) {
    for (i = 0; i < 4; i++)
      csampling_effective[(compstep * 4) + i] = csampling[(compstep * 4) + i];
    csampling_base = csampling_effective + (compstep * 4);
    if ((csampling_base[0] >= width) || (csampling_base[0] < 0))
      csampling_base[0] = 0;
    if ((csampling_base[1] >= height) || (csampling_base[1] < 0))
      csampling_base[1] = 0;
    if (csampling_base[2] < 1)
      csampling_base[2] = 1;
    if (csampling_base[3] < 1)
      csampling_base[3] = 1;
    collect_component(carray, bitmap, compstep, bpp, width * height);
    downsample_component(carray, width, height, csampling_base[0], csampling_base[1], csampling_base[2], csampling_base[3], &out_width, &out_height);
    pack_component_array(carray, width, out_width, out_height);
    rewrite_component(bitmap, carray, compstep, bpp, out_width * out_height);
    cwidth[compstep] = out_width;
    cheight[compstep] = out_height;
  }
  free(carray);
}
```