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

```asm
<conv_kov>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x68(%rbp)
  mov    %rsi,-0x70(%rbp)
  mov    %rdx,-0x78(%rbp)
  mov    %ecx,-0x7c(%rbp)
  mov    %r8d,-0x80(%rbp)
  mov    %r9d,-0x84(%rbp)
  mov    0x18(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x80(%rbp),%eax
  add    %edx,%eax
  sub    0x30(%rbp),%eax
  cltd
  idivl  0x40(%rbp)
  add    $0x1,%eax
  mov    %eax,-0x44(%rbp)
  mov    0x20(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x84(%rbp),%eax
  add    %edx,%eax
  sub    0x38(%rbp),%eax
  cltd
  idivl  0x48(%rbp)
  add    $0x1,%eax
  mov    %eax,-0x40(%rbp)
  mov    0x30(%rbp),%eax
  imul   0x38(%rbp),%eax
  mov    0x10(%rbp),%edx
  imul   %edx,%eax
  mov    %eax,-0x3c(%rbp)
  mov    0x10(%rbp),%eax
  imul   0x38(%rbp),%eax
  mov    %eax,-0x38(%rbp)
  mov    -0x44(%rbp),%eax
  imul   -0x40(%rbp),%eax
  mov    0x28(%rbp),%edx
  imul   %edx,%eax
  mov    %eax,-0x34(%rbp)
  mov    -0x80(%rbp),%eax
  imul   -0x84(%rbp),%eax
  mov    0x10(%rbp),%edx
  imul   %edx,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x78(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x68(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x58(%rbp)
  jmp    L71
L7:
  movl   $0x0,-0x54(%rbp)
  jmp    L57
L116:
  movl   $0x0,-0x50(%rbp)
  jmp    L76
L31:
  mov    -0x40(%rbp),%eax
  imul   -0x54(%rbp),%eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%eax
  add    %eax,%edx
  mov    0x28(%rbp),%eax
  imul   %edx,%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x54(%rbp),%eax
  imul   0x40(%rbp),%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x50(%rbp),%eax
  imul   0x48(%rbp),%eax
  mov    %eax,-0x24(%rbp)
  movl   $0x0,-0x48(%rbp)
  jmp    L110
L41:
  mov    -0x48(%rbp),%eax
  cltd
  idivl  -0x38(%rbp)
  cltd
  idivl  0x30(%rbp)
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x48(%rbp),%eax
  cltd
  idivl  0x10(%rbp)
  cltd
  idivl  0x38(%rbp)
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x20(%rbp),%eax
  cmp    0x18(%rbp),%eax
  setl   %dl
  mov    -0x1c(%rbp),%eax
  cmp    0x20(%rbp),%eax
  setl   %al
  or     %edx,%eax
  movzbl %al,%edx
  mov    -0x80(%rbp),%ecx
  mov    0x18(%rbp),%eax
  add    %ecx,%eax
  cmp    %eax,-0x20(%rbp)
  setge  %al
  movzbl %al,%eax
  mov    %edx,%ecx
  or     %eax,%ecx
  mov    -0x84(%rbp),%edx
  mov    0x20(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x1c(%rbp)
  setge  %al
  movzbl %al,%eax
  or     %ecx,%eax
  test   %eax,%eax
  jne    L112
  mov    -0x48(%rbp),%eax
  cltd
  idivl  0x10(%rbp)
  mov    %edx,-0x18(%rbp)
  mov    -0x1c(%rbp),%eax
  sub    0x20(%rbp),%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%eax
  sub    0x18(%rbp),%eax
  imul   -0x84(%rbp),%eax
  add    %edx,%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x14(%rbp)
  pxor   %xmm2,%xmm2
  movapd %xmm2,%xmm5
  movl   $0x0,-0x4c(%rbp)
  jmp    L38
L52:
  mov    -0x48(%rbp),%eax
  imul   0x28(%rbp),%eax
  mov    %eax,%edx
  mov    -0x4c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x4c(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movapd %xmm5,%xmm3
  addsd  %xmm3,%xmm0
  movapd %xmm0,%xmm5
  addl   $0x1,-0x4c(%rbp)
L38:
  mov    -0x4c(%rbp),%eax
  cmp    0x28(%rbp),%eax
  jl     L52
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movapd %xmm5,%xmm4
  addsd  %xmm4,%xmm0
  movsd  %xmm0,(%rax)
  jmp    L45
L112:
  nop
L45:
  addl   $0x1,-0x48(%rbp)
L110:
  mov    -0x48(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L41
  addl   $0x1,-0x50(%rbp)
L76:
  mov    -0x50(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jl     L31
  addl   $0x1,-0x54(%rbp)
L57:
  mov    -0x54(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L116
  mov    -0x34(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x10(%rbp)
  mov    -0x30(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x8(%rbp)
  addl   $0x1,-0x58(%rbp)
L71:
  mov    -0x58(%rbp),%eax
  cmp    -0x7c(%rbp),%eax
  jl     L7
  nop
  nop
  leave
  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;
  }
}
```