user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<convolve_kernel_inside_fast>:
  endbr64
  push   %r15
  push   %r14
  mov    %ecx,%r14d
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  mov    %r8d,%ebx
  sub    $0x78,%rsp
  movsd  D9(%rip),%xmm1
  mov    0xb8(%rsp),%rax
  mov    0xb0(%rsp),%edi
  mov    %rsi,0x58(%rsp)
  divsd  %xmm0,%xmm1
  mov    %ecx,0x24(%rsp)
  mov    0x8(%rax),%esi
  lea    -0x1(%rdi),%r10d
  mov    0x4(%rax),%edi
  mov    %edx,0x20(%rsp)
  shr    %r10d
  mov    (%rax),%r13d
  mov    %r9,0x30(%rsp)
  add    %r10d,%esi
  add    %r10d,%edi
  mov    %r10d,%r15d
  mov    %esi,0x48(%rsp)
  mov    %ecx,%esi
  add    %r10d,%r13d
  imul   %r8d,%esi
  mov    %edi,0x60(%rsp)
  mov    (%r12),%rdi
  mov    %r13d,0x64(%rsp)
  imul   %edx,%esi
  movsd  %xmm1,0x50(%rsp)
  call   <zero_vect@plt>
  mov    %ebx,%ecx
  mov    0x48(%rsp),%ebx
  sub    %ebx,%ecx
  mov    %ecx,0x6c(%rsp)
  cmp    %ecx,%ebx
  jae    L85
  mov    0x60(%rsp),%eax
  mov    %r14d,%ecx
  mov    %ebp,%edx
  sub    %r13d,%edx
  sub    %eax,%ecx
  mov    %edx,0x4c(%rsp)
  mov    %ecx,0x68(%rsp)
  cmp    %ecx,%eax
  jae    L85
  mov    %r15d,%eax
  neg    %eax
  mov    %eax,0x3c(%rsp)
  cmp    %edx,%r13d
  jae    L85
L72:
  mov    0x60(%rsp),%eax
  mov    %r12,%r14
  mov    %eax,0x40(%rsp)
L56:
  mov    0x64(%rsp),%eax
  mov    %eax,0x14(%rsp)
  jmp    L109
L127:
  addl   $0x1,0x14(%rsp)
  mov    0x14(%rsp),%eax
  cmp    %eax,0x4c(%rsp)
  je     L49
L109:
  mov    0x20(%rsp),%r8d
  mov    0x24(%rsp),%ecx
  mov    0x14(%rsp),%edx
  mov    0x40(%rsp),%esi
  mov    0x48(%rsp),%edi
  call   <gidz_general@plt>
  mov    0x58(%rsp),%rbx
  movsd  0x50(%rsp),%xmm2
  pxor   %xmm3,%xmm3
  cltq
  mulsd  (%rbx,%rax,8),%xmm2
  ucomisd %xmm3,%xmm2
  movsd  %xmm2,0x28(%rsp)
  jp     L16
  je     L127
L16:
  mov    0x3c(%rsp),%eax
  mov    %eax,0x44(%rsp)
  nopl   (%rax)
L91:
  mov    0x44(%rsp),%eax
  lea    (%r15,%rax,1),%ebx
  add    0x48(%rsp),%eax
  mov    %eax,0x1c(%rsp)
  mov    0x3c(%rsp),%eax
  mov    %ebx,0x18(%rsp)
  mov    %eax,0x38(%rsp)
  nopl   0x0(%rax)
L44:
  mov    0x38(%rsp),%eax
  mov    0x3c(%rsp),%r13d
  mov    %r15d,%r12d
  lea    (%r15,%rax,1),%ebp
  add    0x40(%rsp),%eax
  mov    %eax,%ebx
  cs nopw 0x0(%rax,%rax,1)
L106:
  mov    0xb0(%rsp),%ecx
  mov    0x18(%rsp),%edi
  lea    (%r12,%r13,1),%edx
  mov    %ebp,%esi
  call   <gidz_cube@plt>
  mov    0x30(%rsp),%rcx
  mov    0x1c(%rsp),%edi
  mov    %ebx,%esi
  cltq
  movsd  0x28(%rsp),%xmm0
  mov    0x20(%rsp),%r8d
  mulsd  (%rcx,%rax,8),%xmm0
  mov    0x14(%rsp),%eax
  mov    0x24(%rsp),%ecx
  mov    (%r14),%r15
  lea    (%rax,%r13,1),%edx
  add    $0x1,%r13d
  movsd  %xmm0,0x8(%rsp)
  call   <gidz_general@plt>
  movsd  0x8(%rsp),%xmm0
  mov    (%r14),%rdx
  cltq
  addsd  (%r15,%rax,8),%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  cmp    %r13d,%r12d
  jge    L106
  addl   $0x1,0x38(%rsp)
  mov    0x38(%rsp),%eax
  mov    %r12d,%r15d
  cmp    %eax,%r12d
  jge    L44
  addl   $0x1,0x44(%rsp)
  mov    0x44(%rsp),%eax
  cmp    %eax,%r12d
  jge    L91
  addl   $0x1,0x14(%rsp)
  mov    0x14(%rsp),%eax
  cmp    %eax,0x4c(%rsp)
  jne    L109
L49:
  addl   $0x1,0x40(%rsp)
  mov    0x40(%rsp),%eax
  cmp    %eax,0x68(%rsp)
  jne    L56
  addl   $0x1,0x48(%rsp)
  mov    %r14,%r12
  mov    0x48(%rsp),%eax
  cmp    0x6c(%rsp),%eax
  jne    L72
L85:
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D9
type_guessed: f64

tool: D9: 1

assistant: ```c
void convolve_kernel_inside_fast(double **outmap, double *inmap, unsigned in_extx, unsigned in_exty, unsigned in_extz, double *kernel, unsigned kernel_size, double normfac, unsigned ignored[3]) {
  double dval, inv_normfac;
  unsigned long out_nvox;
  unsigned indx, indy, indz;
  int indx2, indy2, indz2, margin, marginx, marginy, marginz;
  margin = (kernel_size - 1) / 2;
  marginx = margin + ignored[0];
  marginy = margin + ignored[1];
  marginz = margin + ignored[2];
  out_nvox = in_extx * in_exty * in_extz;
  inv_normfac = 1.0 / normfac;
  zero_vect(*outmap, out_nvox);
  for (indz = marginz; indz < in_extz - marginz; indz++)
    for (indy = marginy; indy < in_exty - marginy; indy++)
      for (indx = marginx; indx < in_extx - marginx; indx++) {
        dval = (*(inmap + gidz_general(indz, indy, indx, in_exty, in_extx))) * inv_normfac;
        if (dval != 0.0)
          for (indz2 = -margin; indz2 <= margin; indz2++)
            for (indy2 = -margin; indy2 <= margin; indy2++)
              for (indx2 = -margin; indx2 <= margin; indx2++) {
                *(*outmap + gidz_general(indz + indz2, indy + indy2, indx + indx2, in_exty, in_extx)) += *(kernel + gidz_cube(indz2 + margin, indy2 + margin, indx2 + margin, kernel_size)) * dval;
              }
      }
}
```