user: What would the C source look like for the assembly code provided here:

```asm
<interpolate_vertical>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %edx,-0x40(%rbp)
  mov    %rcx,-0x48(%rbp)
  mov    %r8,-0x50(%rbp)
  mov    %r9d,-0x54(%rbp)
  mov    -0x40(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %eax,-0x28(%rbp)
  mov    -0x3c(%rbp),%edx
  mov    -0x40(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %eax,-0x24(%rbp)
  mov    -0x3c(%rbp),%eax
  sub    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %eax,-0x20(%rbp)
  mov    -0x40(%rbp),%eax
  mov    %eax,%edx
  shl    $0x2,%eax
  sub    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %eax,-0x1c(%rbp)
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x24(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x48(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  sub    %edx,%eax
  mov    %eax,%edx
  neg    %edx
  cmovns %edx,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x1c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x48(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  sub    %edx,%eax
  mov    %eax,%edx
  neg    %edx
  cmovns %edx,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x18(%rbp),%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x10(%rbp)
  cmpl   $0x0,-0x10(%rbp)
  jne    L18
  mov    -0x40(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    -0x3c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x38(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  jmp    L19
L18:
  mov    -0x10(%rbp),%eax
  sub    -0x18(%rbp),%eax
  shl    $0x8,%eax
  cltd
  idivl  -0x10(%rbp)
  mov    %eax,-0xc(%rbp)
  mov    -0x10(%rbp),%eax
  sub    -0x14(%rbp),%eax
  shl    $0x8,%eax
  cltd
  idivl  -0x10(%rbp)
  mov    %eax,-0x8(%rbp)
  mov    -0x40(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  imul   -0xc(%rbp),%eax
  sar    $0x8,%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%eax
  lea    (%rax,%rax,1),%ecx
  mov    -0x3c(%rbp),%eax
  sub    %ecx,%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  lea    0x0(,%rax,4),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  imul   -0x8(%rbp),%eax
  sar    $0x8,%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  jle    L44
  cmpl   $0x6fffe,-0x4(%rbp)
  jg     L36
  mov    -0x4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  jmp    L43
L36:
  mov    $0x1bfffc,%eax
  jmp    L43
L44:
  mov    $0x0,%eax
L43:
  mov    -0x50(%rbp),%rdx
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x54(%rbp),%eax
  lea    (%rdx,%rax,1),%ecx
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  movslq %ecx,%rax
  mov    %rax,(%rdx)
L19:
  nop
  pop    %rbp
  ret
```

assistant: ```c
void interpolate_vertical(uint16_t *image_data, int i, int w, int *raw2ev, int *ev2raw, int black) {
  int gv1 = image_data[i + w * 3];
  int gv2 = image_data[i + w];
  int gv3 = image_data[i - w];
  int gv4 = image_data[i - w * 3];
  int dv1 = ((raw2ev[gv1] - raw2ev[gv2]) > 0 ? (raw2ev[gv1] - raw2ev[gv2]) : -(raw2ev[gv1] - raw2ev[gv2]));
  int dv2 = ((raw2ev[gv3] - raw2ev[gv4]) > 0 ? (raw2ev[gv3] - raw2ev[gv4]) : -(raw2ev[gv3] - raw2ev[gv4]));
  int sum = dv1 + dv2;
  if (sum == 0) {
    image_data[i] = image_data[i + w * 2];
  } else {
    int cv1 = ((sum - dv1) << 8) / sum;
    int cv2 = ((sum - dv2) << 8) / sum;
    int ev_corr = ((raw2ev[image_data[i + w * 2]] * cv1) >> 8) + ((raw2ev[image_data[i - w * 2]] * cv2) >> 8);
    image_data[i] = ev2raw[(((((((ev_corr)) < ((14 * 32768 - 1))) ? ((ev_corr)) : ((14 * 32768 - 1)))) > ((0))) ? (((((ev_corr)) < ((14 * 32768 - 1))) ? ((ev_corr)) : ((14 * 32768 - 1)))) : ((0)))] + black;
  }
}
```