user: Please show me the C implementation that matches the assembly code listed below:

```asm
<conv_direct>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x30(%rbp)
  mov    %r8,-0x40(%rbp)
  mov    -0x2c(%rbp),%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  sub    $0x1,%eax
  mov    %eax,-0x14(%rbp)
  movl   $0x0,-0x18(%rbp)
  mov    -0x2c(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jl     L5
  movl   $0x0,-0x20(%rbp)
  jmp    L20
L56:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  movl   $0x0,-0x1c(%rbp)
  jmp    L72
L101:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x20(%rbp),%eax
  sub    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x1c(%rbp)
L72:
  mov    -0x1c(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jle    L101
  addl   $0x1,-0x20(%rbp)
L20:
  mov    -0x20(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jl     L56
  mov    -0x30(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  jmp    L127
L160:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x18(%rbp)
  mov    -0x30(%rbp),%edx
  mov    -0x18(%rbp),%eax
  add    %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x2c(%rbp),%xmm0
  comisd -0x10(%rbp),%xmm0
  jbe    L8
  movsd  -0x10(%rbp),%xmm0
  jmp    L28
L8:
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x2c(%rbp),%xmm0
L28:
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x18(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L140
L173:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x20(%rbp),%eax
  sub    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x1c(%rbp)
L140:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x1c(%rbp),%xmm1
  movsd  -0x8(%rbp),%xmm0
  comisd %xmm1,%xmm0
  ja     L173
  addl   $0x1,-0x20(%rbp)
L127:
  mov    -0x20(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L160
  jmp    L159
L5:
  movl   $0x0,-0x20(%rbp)
  jmp    L84
L53:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  movl   $0x0,-0x1c(%rbp)
  jmp    L52
L196:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x20(%rbp),%eax
  sub    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x1c(%rbp)
L52:
  mov    -0x1c(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jle    L196
  addl   $0x1,-0x20(%rbp)
L84:
  mov    -0x20(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L53
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  jmp    L73
L80:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x18(%rbp)
  mov    -0x2c(%rbp),%edx
  mov    -0x18(%rbp),%eax
  add    %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x30(%rbp),%xmm0
  comisd -0x10(%rbp),%xmm0
  jbe    L150
  movsd  -0x10(%rbp),%xmm0
  jmp    L180
L150:
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x30(%rbp),%xmm0
L180:
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x18(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L139
L145:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x20(%rbp),%eax
  sub    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x1c(%rbp)
L139:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x1c(%rbp),%xmm1
  movsd  -0x8(%rbp),%xmm0
  comisd %xmm1,%xmm0
  ja     L145
  addl   $0x1,-0x20(%rbp)
L73:
  mov    -0x20(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L80
L159:
  nop
  pop    %rbp
  ret
```

assistant: ```c
void conv_direct(double *inp1, int N, double *inp2, int L, double *oup) {
  int M, k, m, i;
  double t1, tmin;
  M = N + L - 1;
  i = 0;
  if (N >= L) {
    for (k = 0; k < L; k++) {
      oup[k] = 0.0;
      for (m = 0; m <= k; m++) {
        oup[k] += inp1[m] * inp2[k - m];
      }
    }
    for (k = L; k < M; k++) {
      oup[k] = 0.0;
      i++;
      t1 = L + i;
      tmin = (((t1) < (N)) ? (t1) : (N));
      for (m = i; m < tmin; m++) {
        oup[k] += inp1[m] * inp2[k - m];
      }
    }
  } else {
    for (k = 0; k < N; k++) {
      oup[k] = 0.0;
      for (m = 0; m <= k; m++) {
        oup[k] += inp2[m] * inp1[k - m];
      }
    }
    for (k = N; k < M; k++) {
      oup[k] = 0.0;
      i++;
      t1 = N + i;
      tmin = (((t1) < (L)) ? (t1) : (L));
      for (m = i; m < tmin; m++) {
        oup[k] += inp2[m] * inp1[k - m];
      }
    }
  }
}
```