user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<convolve_kernel_outside>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xb8,%rsp
  mov    %rdi,%r14
  mov    %rsi,%r12
  mov    %rdx,%r13
  mov    %rcx,0x48(%rsp)
  mov    %r8,0x50(%rsp)
  mov    %r9,0x58(%rsp)
  mov    0xf0(%rsp),%rax
  mov    %rax,0x60(%rsp)
  mov    0x110(%rsp),%ebx
  movsd  %xmm0,0x68(%rsp)
  movsd  %xmm1,0x70(%rsp)
  movsd  %xmm2,0x78(%rsp)
  movsd  %xmm3,0x80(%rsp)
  movsd  %xmm4,0x88(%rsp)
  movsd  %xmm5,0x90(%rsp)
  mov    0x118(%rsp),%rax
  mov    %rax,0x30(%rsp)
  mov    0xf8(%rsp),%rax
  mov    %rax,0x98(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xa8(%rsp)
  xor    %eax,%eax
  cmpl   $0x0,0x120(%rsp)
  je     L101
  mov    0x120(%rsp),%eax
  add    $0x1,%eax
  and    $0xfffffffe,%eax
  sub    0x120(%rsp),%eax
  cmp    $0x1,%eax
  je     L31
L101:
  mov    0x120(%rsp),%edx
  lea    D6(%rip),%rsi
  mov    $0x4308,%edi
  call   <error_kernel_size@plt>
L31:
  mov    0x120(%rsp),%eax
  sub    $0x1,%eax
  shr    %eax
  mov    %eax,%r15d
  mov    0x100(%rsp),%eax
  mov    0x120(%rsp),%esi
  lea    -0x1(%rax,%rsi,1),%eax
  mov    %eax,(%r12)
  mov    0x108(%rsp),%eax
  lea    -0x1(%rax,%rsi,1),%eax
  mov    %eax,0x0(%r13)
  lea    -0x1(%rbx,%rsi,1),%eax
  mov    0x48(%rsp),%rsi
  mov    %eax,(%rsi)
  imul   0x108(%rsp),%ebx
  mov    %ebx,%ebp
  imul   0x100(%rsp),%ebp
  mov    (%r12),%ebx
  imul   0x0(%r13),%ebx
  imul   %eax,%ebx
  lea    0xa0(%rsp),%rax
  mov    %rbp,%rsi
  mov    %rax,0x8(%rsp)
  mov    %rax,%rdi
  call   <do_vect@plt>
  lea    0x98(%rsp),%rsi
  mov    %rbp,%rdx
  mov    0x8(%rsp),%rdi
  call   <cp_vect@plt>
  mov    %rbx,%rsi
  mov    (%r14),%rdi
  call   <zero_vect@plt>
  mov    0x48(%rsp),%rsi
  mov    (%rsi),%eax
  mov    %eax,0x8(%rsp)
  sub    %r15d,%eax
  mov    %r15d,0x40(%rsp)
  cmp    %eax,%r15d
  jae    L32
  mov    %r13,0x28(%rsp)
  mov    %r12,%r13
  jmp    L69
L123:
  addl   $0x1,0x18(%rsp)
  mov    0x18(%rsp),%esi
  mov    0x0(%r13),%eax
  sub    %r15d,%eax
  cmp    %esi,%eax
  jbe    L59
L60:
  mov    0xa0(%rsp),%rbx
  mov    0x40(%rsp),%edi
  sub    %r15d,%edi
  mov    %edi,0x1c(%rsp)
  mov    0x18(%rsp),%edx
  sub    %r15d,%edx
  mov    0x100(%rsp),%r8d
  mov    0x108(%rsp),%ecx
  mov    0x3c(%rsp),%esi
  call   <gidz_general@plt>
  cltq
  movsd  (%rbx,%rax,8),%xmm7
  movsd  %xmm7,0x20(%rsp)
  ucomisd D8(%rip),%xmm7
  jp     L20
  je     L123
L20:
  movl   $0x0,0x14(%rsp)
L115:
  mov    0x3c(%rsp),%eax
  mov    %eax,0x10(%rsp)
  movl   $0x0,0x8(%rsp)
L14:
  mov    0x38(%rsp),%ebx
L143:
  lea    (%r15,%rbx,1),%edx
  mov    0x120(%rsp),%ecx
  mov    0x8(%rsp),%esi
  mov    0x14(%rsp),%edi
  call   <gidz_cube@plt>
  cltq
  mov    0x30(%rsp),%rcx
  movsd  0x20(%rsp),%xmm6
  mulsd  (%rcx,%rax,8),%xmm6
  movq   %xmm6,%rbp
  mov    (%r14),%r12
  mov    0x18(%rsp),%eax
  lea    (%rbx,%rax,1),%edx
  mov    0x0(%r13),%r8d
  mov    0x28(%rsp),%rax
  mov    (%rax),%ecx
  mov    0x10(%rsp),%esi
  mov    0x1c(%rsp),%edi
  call   <gidz_general@plt>
  cltq
  mov    (%r14),%rdx
  movq   %rbp,%xmm0
  addsd  (%r12,%rax,8),%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  add    $0x1,%ebx
  cmp    %ebx,%r15d
  jge    L143
  addl   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%eax
  addl   $0x1,0x10(%rsp)
  sub    %r15d,%eax
  cmp    %r15d,%eax
  jle    L14
  addl   $0x1,0x14(%rsp)
  mov    0x14(%rsp),%eax
  addl   $0x1,0x1c(%rsp)
  sub    %r15d,%eax
  cmp    %eax,%r15d
  jge    L115
  jmp    L123
L59:
  addl   $0x1,0x44(%rsp)
  mov    0x44(%rsp),%esi
  mov    0x28(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,0x8(%rsp)
  sub    %r15d,%eax
  cmp    %esi,%eax
  jbe    L34
L71:
  mov    0x0(%r13),%eax
  sub    %r15d,%eax
  mov    %r15d,0x18(%rsp)
  mov    0x44(%rsp),%esi
  sub    %r15d,%esi
  mov    %esi,0x3c(%rsp)
  cmp    %eax,%r15d
  jb     L60
  jmp    L59
L34:
  addl   $0x1,0x40(%rsp)
  mov    0x40(%rsp),%esi
  mov    0x48(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,0x8(%rsp)
  sub    %r15d,%eax
  cmp    %esi,%eax
  jbe    L32
L69:
  mov    0x28(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,0x8(%rsp)
  sub    %r15d,%eax
  mov    %r15d,0x44(%rsp)
  mov    %r15d,%esi
  neg    %esi
  mov    %esi,0x38(%rsp)
  cmp    %eax,%r15d
  jb     L71
  jmp    L34
L32:
  mov    0xa0(%rsp),%rdi
  call   <free@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %r15d,%xmm0
  movsd  0x80(%rsp),%xmm2
  mulsd  %xmm0,%xmm2
  movsd  0x68(%rsp),%xmm1
  subsd  %xmm2,%xmm1
  mov    0x50(%rsp),%rax
  movsd  %xmm1,(%rax)
  movsd  0x88(%rsp),%xmm2
  mulsd  %xmm0,%xmm2
  movsd  0x70(%rsp),%xmm1
  subsd  %xmm2,%xmm1
  mov    0x58(%rsp),%rax
  movsd  %xmm1,(%rax)
  mulsd  0x90(%rsp),%xmm0
  movsd  0x78(%rsp),%xmm1
  subsd  %xmm0,%xmm1
  mov    0x60(%rsp),%rax
  movsd  %xmm1,(%rax)
  mov    0xa8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L61
  add    $0xb8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L61:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D6
datatype: string
name: disassemble_data
arguments: data_tag: D8
datatype: f64

tool: D6: lib_vwk

tool: D8: 0

assistant: ```c
void convolve_kernel_outside(double **outmap, unsigned *out_extx, unsigned *out_exty, unsigned *out_extz, double *out_origx, double *out_origy, double *out_origz, double *inmap, unsigned in_extx, unsigned in_exty, unsigned in_extz, double in_origx, double in_origy, double in_origz, double widthx, double widthy, double widthz, double *kernel, unsigned kernel_size) {
  double dval;
  unsigned long out_nvox;
  unsigned long in_nvox;
  unsigned indx, indy, indz, tmp_extx, tmp_exty;
  int indx2, indy2, indz2, margin;
  double *tmpmap;
  char *program = "lib_vwk";
  if (kernel_size < 1 || 2 * ((kernel_size + 1) / 2) - kernel_size - 1 != 0) {
    error_kernel_size(17160, program, kernel_size);
  }
  margin = (kernel_size - 1) / 2;
  tmp_extx = in_extx;
  tmp_exty = in_exty;
  *out_extx = kernel_size - 1 + in_extx;
  *out_exty = kernel_size - 1 + in_exty;
  *out_extz = kernel_size - 1 + in_extz;
  in_nvox = in_extx * in_exty * in_extz;
  out_nvox = (*out_extx) * (*out_exty) * (*out_extz);
  do_vect(&tmpmap, in_nvox);
  cp_vect(&tmpmap, &inmap, in_nvox);
  zero_vect(*outmap, out_nvox);
  for (indz = margin; indz < (*out_extz) - margin; indz++)
    for (indy = margin; indy < (*out_exty) - margin; indy++)
      for (indx = margin; indx < (*out_extx) - margin; indx++) {
        dval = *(tmpmap + gidz_general(indz - margin, indy - margin, indx - margin, tmp_exty, tmp_extx));
        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, (*out_exty), (*out_extx))) += *(kernel + gidz_cube(indz2 + margin, indy2 + margin, indx2 + margin, kernel_size)) * dval;
              }
      }
  free(tmpmap);
  *out_origx = in_origx - widthx * margin;
  *out_origy = in_origy - widthy * margin;
  *out_origz = in_origz - widthz * margin;
}
```