user: Translate the below assembly code into C programming language:

```asm
<conv_direct>:
  endbr64
  movslq %esi,%r9
  movslq %ecx,%r10
  push   %r13
  mov    %rdx,%rsi
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x1(%r9,%r10,1),%ebx
  cmp    %r10d,%r9d
  jge    L147
  test   %r9d,%r9d
  jle    L65
  mov    %r8,%rcx
  mov    %rdi,%r12
  movslq %r9d,%r13
  xor    %ebp,%ebp
  pxor   %xmm2,%xmm2
  nopl   (%rax)
L58:
  movq   $0x0,(%rcx)
  lea    -0x8(%r12),%r11
  mov    %rsi,%rdx
  movapd %xmm2,%xmm1
  lea    0x0(,%rbp,8),%rax
  sub    %rax,%r11
  mov    %r12,%rax
  nopl   0x0(%rax)
L83:
  movsd  (%rdx),%xmm0
  mulsd  (%rax),%xmm0
  sub    $0x8,%rax
  add    $0x8,%rdx
  addsd  %xmm0,%xmm1
  movsd  %xmm1,(%rcx)
  cmp    %r11,%rax
  jne    L83
  add    $0x1,%rbp
  add    $0x8,%rcx
  add    $0x8,%r12
  cmp    %r13,%rbp
  jne    L58
L65:
  cmp    %ebx,%r9d
  jge    L2
  pxor   %xmm3,%xmm3
  lea    0x1(%r9),%r11d
  lea    (%r8,%r9,8),%rcx
  xor    %r8d,%r8d
  cvtsi2sd %r10d,%xmm3
  movslq %r11d,%r11
  lea    -0x1(%r10),%ebp
  nopw   0x0(%rax,%rax,1)
L64:
  mov    %r8d,%eax
  movq   $0x0,(%rcx)
  add    $0x1,%r8d
  movapd %xmm3,%xmm2
  cmp    %r11d,%r10d
  jle    L99
  pxor   %xmm2,%xmm2
  cvtsi2sd %r11d,%xmm2
L99:
  pxor   %xmm0,%xmm0
  cvtsi2sd %r8d,%xmm0
  comisd %xmm0,%xmm2
  jbe    L70
  movslq %r8d,%rbx
  mov    %r9,%rdx
  pxor   %xmm1,%xmm1
  add    $0x2,%eax
  sub    %rbx,%rdx
  cltq
  lea    (%rdi,%rdx,8),%rdx
  nopl   (%rax)
L48:
  movsd  -0x8(%rsi,%rax,8),%xmm0
  mulsd  (%rdx),%xmm0
  sub    $0x8,%rdx
  addsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  add    $0x1,%rax
  movsd  %xmm1,(%rcx)
  comisd %xmm0,%xmm2
  ja     L48
L70:
  add    $0x1,%r11
  add    $0x1,%r9
  add    $0x8,%rcx
  cmp    %ebp,%r8d
  jne    L64
L2:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L147:
  test   %r10d,%r10d
  jle    L92
  mov    %r8,%rcx
  mov    %rdx,%r12
  movslq %r10d,%r13
  xor    %ebp,%ebp
  pxor   %xmm2,%xmm2
  nopl   0x0(%rax)
L14:
  movq   $0x0,(%rcx)
  lea    -0x8(%r12),%r11
  mov    %rdi,%rdx
  movapd %xmm2,%xmm1
  lea    0x0(,%rbp,8),%rax
  sub    %rax,%r11
  mov    %r12,%rax
  nopl   0x0(%rax)
L140:
  movsd  (%rdx),%xmm0
  mulsd  (%rax),%xmm0
  sub    $0x8,%rax
  add    $0x8,%rdx
  addsd  %xmm0,%xmm1
  movsd  %xmm1,(%rcx)
  cmp    %rax,%r11
  jne    L140
  add    $0x1,%rbp
  add    $0x8,%rcx
  add    $0x8,%r12
  cmp    %rbp,%r13
  jne    L14
L92:
  cmp    %ebx,%r10d
  jge    L2
  pxor   %xmm3,%xmm3
  lea    0x1(%r10),%r11d
  lea    (%r8,%r10,8),%rcx
  xor    %r8d,%r8d
  cvtsi2sd %r9d,%xmm3
  movslq %r11d,%r11
  lea    -0x1(%r9),%ebp
  cs nopw 0x0(%rax,%rax,1)
L144:
  mov    %r8d,%eax
  movq   $0x0,(%rcx)
  add    $0x1,%r8d
  movapd %xmm3,%xmm2
  cmp    %r11d,%r9d
  jle    L59
  pxor   %xmm2,%xmm2
  cvtsi2sd %r11d,%xmm2
L59:
  pxor   %xmm0,%xmm0
  cvtsi2sd %r8d,%xmm0
  comisd %xmm0,%xmm2
  jbe    L28
  movslq %r8d,%rbx
  mov    %r10,%rdx
  pxor   %xmm1,%xmm1
  add    $0x2,%eax
  sub    %rbx,%rdx
  cltq
  lea    (%rsi,%rdx,8),%rdx
  nopl   (%rax)
L107:
  movsd  -0x8(%rdi,%rax,8),%xmm0
  mulsd  (%rdx),%xmm0
  sub    $0x8,%rdx
  addsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  add    $0x1,%rax
  movsd  %xmm1,(%rcx)
  comisd %xmm0,%xmm2
  ja     L107
L28:
  add    $0x1,%r11
  add    $0x1,%r10
  add    $0x8,%rcx
  cmp    %ebp,%r8d
  jne    L144
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  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];
      }
    }
  }
}
```