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

```asm
<conv_kov>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,-0x70(%rsp)
  mov    %rsi,-0x60(%rsp)
  mov    %rdx,-0x38(%rsp)
  mov    %ecx,%r13d
  mov    %ecx,-0xc(%rsp)
  mov    %r8d,%edi
  mov    %r9d,%r15d
  mov    %r9d,-0x64(%rsp)
  mov    0x38(%rsp),%r12d
  mov    0x40(%rsp),%r9d
  mov    0x48(%rsp),%ebp
  mov    0x60(%rsp),%r14d
  lea    (%r8,%r9,2),%ecx
  mov    %ecx,%eax
  sub    0x58(%rsp),%eax
  cltd
  idivl  0x68(%rsp)
  mov    %eax,-0x8(%rsp)
  lea    0x1(%rax),%r8d
  mov    %r8d,-0x10(%rsp)
  lea    (%r15,%rbp,2),%esi
  mov    %esi,%eax
  sub    %r14d,%eax
  cltd
  idivl  0x70(%rsp)
  mov    %eax,-0x4(%rsp)
  lea    0x1(%rax),%r10d
  mov    %r10d,-0x30(%rsp)
  mov    %r14d,%eax
  imul   0x58(%rsp),%eax
  imul   %r12d,%eax
  mov    %r14d,%r11d
  imul   %r12d,%r11d
  mov    %r8d,%edx
  imul   %r10d,%edx
  imul   0x50(%rsp),%edx
  imul   %r15d,%edi
  imul   %r12d,%edi
  test   %r13d,%r13d
  jle    L138
  mov    %eax,%ebx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rax
  mov    %rax,-0x20(%rsp)
  movslq %edi,%rax
  shl    $0x3,%rax
  mov    %rax,-0x18(%rsp)
  imul   0x50(%rsp),%r10d
  mov    %r10d,-0x28(%rsp)
  movslq 0x50(%rsp),%rax
  shl    $0x3,%rax
  mov    %rax,-0x50(%rsp)
  movl   $0x0,-0x2c(%rsp)
  sub    %r9d,%ecx
  sub    %ebp,%esi
  mov    %esi,-0x68(%rsp)
  mov    0x50(%rsp),%r13d
  mov    %r11d,%r10d
  mov    %r9d,%r11d
  mov    %ecx,%r9d
  jmp    L22
L103:
  pxor   %xmm1,%xmm1
L68:
  movslq %edx,%rdx
  mov    -0x70(%rsp),%rax
  lea    (%rax,%rdx,8),%rax
  addsd  (%rax),%xmm1
  movsd  %xmm1,(%rax)
L3:
  add    $0x1,%esi
  add    0x50(%rsp),%r8d
  cmp    %esi,%ebx
  je     L48
L160:
  mov    %esi,%eax
  cltd
  idiv   %r10d
  cltd
  idivl  0x58(%rsp)
  mov    -0x74(%rsp),%eax
  lea    (%rdx,%rax,1),%ecx
  mov    %esi,%eax
  cltd
  idiv   %r12d
  cltd
  idiv   %r14d
  add    -0x78(%rsp),%edx
  cmp    %ecx,%r11d
  setg   %r15b
  cmp    %edx,%ebp
  setg   %al
  or     %r15d,%eax
  cmp    %ecx,%r9d
  setle  %r15b
  or     %al,%r15b
  jne    L3
  cmp    %edx,-0x68(%rsp)
  jle    L3
  sub    %r11d,%ecx
  imul   -0x64(%rsp),%ecx
  sub    %ebp,%edx
  add    %edx,%ecx
  imul   %r12d,%ecx
  mov    %esi,%eax
  cltd
  idiv   %r12d
  add    %ecx,%edx
  cmpl   $0x0,0x50(%rsp)
  jle    L103
  movslq %r8d,%rax
  mov    -0x60(%rsp),%rcx
  lea    (%rcx,%rax,8),%rcx
  mov    $0x0,%eax
  pxor   %xmm1,%xmm1
L152:
  movsd  (%rcx,%rax,8),%xmm0
  mulsd  (%rdi,%rax,8),%xmm0
  addsd  %xmm0,%xmm1
  add    $0x1,%rax
  cmp    %rax,%r13
  jne    L152
  jmp    L68
L48:
  addl   $0x1,-0x58(%rsp)
  mov    -0x58(%rsp),%eax
  mov    0x70(%rsp),%ecx
  add    %ecx,-0x54(%rsp)
  add    -0x50(%rsp),%rdi
  cmp    -0x48(%rsp),%eax
  je     L108
L65:
  mov    -0x54(%rsp),%eax
  mov    %eax,-0x78(%rsp)
  test   %ebx,%ebx
  jle    L48
  mov    $0x0,%r8d
  mov    $0x0,%esi
  jmp    L160
L108:
  addl   $0x1,-0x44(%rsp)
  mov    -0x44(%rsp),%eax
  mov    -0x28(%rsp),%esi
  add    %esi,-0x40(%rsp)
  mov    0x68(%rsp),%esi
  add    %esi,-0x3c(%rsp)
  cmp    -0x24(%rsp),%eax
  je     L55
L135:
  cmpl   $0x0,-0x30(%rsp)
  jle    L108
  mov    -0x3c(%rsp),%eax
  mov    %eax,-0x74(%rsp)
  movslq -0x40(%rsp),%rax
  mov    -0x38(%rsp),%rdi
  lea    (%rdi,%rax,8),%rdi
  movl   $0x0,-0x54(%rsp)
  movl   $0x0,-0x58(%rsp)
  jmp    L65
L55:
  mov    -0x20(%rsp),%rdi
  add    %rdi,-0x38(%rsp)
  mov    -0x18(%rsp),%rdi
  add    %rdi,-0x70(%rsp)
  addl   $0x1,-0x2c(%rsp)
  mov    -0x2c(%rsp),%eax
  cmp    %eax,-0xc(%rsp)
  je     L138
L22:
  cmpl   $0x0,-0x10(%rsp)
  jle    L55
  mov    -0x8(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,-0x24(%rsp)
  movl   $0x0,-0x3c(%rsp)
  movl   $0x0,-0x40(%rsp)
  movl   $0x0,-0x44(%rsp)
  mov    -0x4(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,-0x48(%rsp)
  jmp    L135
L138:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void conv_kov(double *v, double *k, double *o, int n, int h, int w, int f, int ph, int pw, int out_f, int kh, int kw, int sh, int sw) {
  int out_h = (h + 2 * ph - kh) / sh + 1;
  int out_w = (w + 2 * pw - kw) / sw + 1;
  int colcol = kh * kw * f;
  int fkw = f * kw;
  int o_size = out_h * out_w * out_f;
  int v_size = h * w * f;
  double *o_ptr = o;
  double *v_ptr = v;
  int n_idx, ho, wo, fo, kcoli;
  int v_hi, v_wi, fi, v_idx, off_o, off_k, sho, swo;
  for (n_idx = 0; n_idx < n; ++n_idx) {
    for (ho = 0; ho < out_h; ++ho) {
      for (wo = 0; wo < out_w; ++wo) {
        off_o = out_f * (wo + out_w * ho);
        sho = ho * sh;
        swo = wo * sw;
        for (kcoli = 0; kcoli < colcol; ++kcoli) {
          v_hi = sho + kcoli / fkw % kh;
          v_wi = swo + kcoli / f % kw;
          if ((v_hi < ph) | (v_wi < pw) | (v_hi >= h + ph) | (v_wi >= w + pw)) {
            continue;
          }
          fi = kcoli % f;
          v_idx = fi + f * (v_wi - pw + w * (v_hi - ph));
          register double part = 0;
          for (fo = 0; fo < out_f; ++fo) {
            part += k[kcoli * out_f + fo] * o_ptr[fo + off_o];
          }
          v_ptr[v_idx] += part;
        }
      }
    }
    o_ptr += o_size;
    v_ptr += v_size;
  }
}
```