user: Demonstrate the C code that generates the assembly output below:

```asm
<shen_castan_aux>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %esi,%r13d
  push   %r12
  mov    %edx,%r12d
  mov    %esi,%edx
  mov    $0x4,%esi
  imul   %r12d,%edx
  push   %rbp
  mov    %r8,%rbp
  push   %rbx
  mov    %ecx,%ebx
  imul   %ecx,%edx
  sub    $0x18,%rsp
  mov    %rdi,0x8(%rsp)
  movslq %edx,%r14
  mov    %edx,(%rsp)
  mov    %r14,%rdi
  call   <calloc@plt>
  mov    (%rsp),%edx
  mov    %rax,%r15
  test   %edx,%edx
  jle    L18
  mov    0x8(%rsp),%r9
  lea    -0x1(%rdx),%r10d
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L24:
  pxor   %xmm0,%xmm0
  cvtsi2ssl (%r9,%rax,4),%xmm0
  movss  %xmm0,(%r15,%rax,4)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L24
  mov    %r14,%rdi
  mov    $0x4,%esi
  mov    %r10,0x8(%rsp)
  call   <calloc@plt>
  mov    %ebx,%r8d
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    %rax,%r14
  mov    %rax,%rsi
  mov    %r15,%rdi
  xor    %eax,%eax
  call   <compute_ISEF@plt>
  mov    %ebx,%r8d
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    %r15,%rsi
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <compute_bli@plt>
  mov    %ebx,%r9d
  mov    %r13d,%r8d
  mov    %r12d,%ecx
  movslq %eax,%r11
  mov    %r14,%rsi
  mov    %r15,%rdi
  xor    %eax,%eax
  mov    %r11,%rdx
  mov    %r11,(%rsp)
  call   <locate_zero_crossings@plt>
  mov    %r14,%rdi
  call   <free@plt>
  mov    (%rsp),%rdi
  call   <free@plt>
  mov    %ebx,%r8d
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    %r15,%rdi
  xor    %eax,%eax
  call   <threshold_edges@plt>
  mov    %r15,%rdi
  call   <free@plt>
  mov    0x8(%rsp),%r10
  mov    %rbp,%r8
  xor    %ecx,%ecx
  mov    $0xff,%edx
  lea    0x4(%rbp,%r10,4),%rsi
  nopl   (%rax)
L25:
  mov    (%r8),%eax
  test   %eax,%eax
  mov    %edx,%eax
  cmovg  %ecx,%eax
  add    $0x4,%r8
  mov    %eax,-0x4(%r8)
  cmp    %r8,%rsi
  jne    L25
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L18:
  mov    %r14,%rdi
  mov    $0x4,%esi
  call   <calloc@plt>
  mov    %ebx,%r8d
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    %rax,%r14
  mov    %rax,%rsi
  mov    %r15,%rdi
  xor    %eax,%eax
  call   <compute_ISEF@plt>
  mov    %ebx,%r8d
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    %r15,%rsi
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <compute_bli@plt>
  mov    %ebx,%r9d
  mov    %r13d,%r8d
  mov    %r12d,%ecx
  movslq %eax,%r10
  mov    %r14,%rsi
  mov    %r15,%rdi
  xor    %eax,%eax
  mov    %r10,%rdx
  mov    %r10,(%rsp)
  call   <locate_zero_crossings@plt>
  mov    %r14,%rdi
  call   <free@plt>
  mov    (%rsp),%rdi
  call   <free@plt>
  mov    %r15,%rdi
  mov    %ebx,%r8d
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    %rbp,%rsi
  xor    %eax,%eax
  call   <threshold_edges@plt>
  add    $0x18,%rsp
  mov    %r15,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10a0 <free@plt>
```

assistant: ```c
void shen_castan_aux(int *image, int width, int height, int depth, int *ret) {
  register int i;
  float *buffer;
  float *smoothed_buffer;
  int *bli_buffer, plane_size = width * height * depth;
  buffer = (float *)calloc(plane_size, sizeof(float));
  for (i = 0; i < plane_size; i++) {
    buffer[i] = (float)image[i];
  }
  smoothed_buffer = (float *)calloc(plane_size, sizeof(float));
  compute_ISEF(buffer, smoothed_buffer, height, width, depth);
  bli_buffer = compute_bli(smoothed_buffer, buffer, height, width, depth);
  locate_zero_crossings(buffer, smoothed_buffer, bli_buffer, height, width, depth);
  free(smoothed_buffer);
  free(bli_buffer);
  threshold_edges(buffer, ret, height, width, depth);
  free(buffer);
  for (i = 0; i < plane_size; i++)
    ret[i] = (ret[i] > 0) ? 0 : 255;
}
```