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

```asm
<conchi>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %esi,%r13d
  mov    $0x8,%esi
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  mov    %r13d,%edi
  push   %rbx
  mov    %edx,%ebx
  sub    $0x48,%rsp
  call   <calloc@plt>
  mov    %rax,0x38(%rsp)
  test   %rax,%rax
  je     L164
L49:
  mov    $0x8,%esi
  mov    %ebx,%edi
  call   <calloc@plt>
  mov    %rax,0x30(%rsp)
  test   %rax,%rax
  je     L150
  test   %r13d,%r13d
  jle    L162
L135:
  mov    0x38(%rsp),%rsi
  mov    0x30(%rsp),%r10
  mov    %r13d,%eax
  xor    %r8d,%r8d
  lea    -0x1(%rbx),%r12d
  pxor   %xmm2,%xmm2
  lea    0x8(%rbp),%r11
  mov    %rsi,%rcx
  lea    (%rsi,%rax,8),%r9
  mov    %r12,%r14
  sub    %rbp,%r10
  nopl   0x0(%rax)
L120:
  test   %ebx,%ebx
  jle    L117
  movslq %r8d,%rdx
  lea    0x0(,%rdx,8),%rdi
  add    %r12,%rdx
  lea    (%r11,%rdx,8),%rsi
  mov    %r10,%rdx
  lea    0x0(%rbp,%rdi,1),%rax
  sub    %rdi,%rdx
  nopl   0x0(%rax)
L31:
  movsd  (%rcx),%xmm0
  addsd  (%rax),%xmm0
  lea    (%rax,%rdx,1),%rdi
  add    $0x8,%rax
  movsd  %xmm0,(%rcx)
  movsd  (%rdi),%xmm0
  addsd  -0x8(%rax),%xmm0
  movsd  %xmm0,(%rdi)
  addsd  -0x8(%rax),%xmm2
  cmp    %rsi,%rax
  jne    L31
L117:
  add    $0x8,%rcx
  add    %ebx,%r8d
  cmp    %r9,%rcx
  jne    L120
  movsd  D85(%rip),%xmm0
  comisd %xmm2,%xmm0
  ja     L129
L157:
  mov    0x30(%rsp),%rsi
  mov    %r14d,%eax
  mov    0x38(%rsp),%r15
  pxor   %xmm3,%xmm3
  movl   $0x0,0x2c(%rsp)
  movsd  D80(%rip),%xmm4
  movl   $0x0,0x28(%rsp)
  lea    0x8(%rsi,%rax,8),%r12
  nopw   0x0(%rax,%rax,1)
L32:
  test   %ebx,%ebx
  jle    L17
  movslq 0x2c(%rsp),%rax
  mov    0x30(%rsp),%r14
  lea    0x0(%rbp,%rax,8),%r8
  sub    %r14,%r8
  jmp    L11
  nopl   0x0(%rax)
L142:
  movsd  (%r8,%r14,1),%xmm0
  add    $0x8,%r14
  subsd  %xmm1,%xmm0
  mulsd  %xmm0,%xmm0
  divsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm3
  cmp    %r14,%r12
  je     L17
L11:
  movsd  (%r15),%xmm1
  mulsd  (%r14),%xmm1
  divsd  %xmm2,%xmm1
  comisd %xmm1,%xmm4
  jbe    L142
  lea    D62(%rip),%rdi
  mov    %r8,0x20(%rsp)
  movsd  %xmm3,0x18(%rsp)
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  call   <printf@plt>
  mov    %ebx,%edx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <printmat@plt>
  lea    D78(%rip),%rdi
  xor    %eax,%eax
  call   <fatalx@plt>
  mov    0x20(%rsp),%r8
  mov    D80(%rip),%rax
  movsd  0x18(%rsp),%xmm3
  movsd  0x10(%rsp),%xmm2
  movsd  0x8(%rsp),%xmm1
  movq   %rax,%xmm4
  jmp    L142
  nopl   (%rax)
L17:
  addl   $0x1,0x28(%rsp)
  mov    0x28(%rsp),%eax
  add    $0x8,%r15
  add    %ebx,0x2c(%rsp)
  cmp    %eax,%r13d
  jg     L32
L137:
  mov    0x38(%rsp),%rdi
  movsd  %xmm3,0x8(%rsp)
  call   <free@plt>
  mov    0x30(%rsp),%rdi
  call   <free@plt>
  movsd  0x8(%rsp),%xmm3
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  movapd %xmm3,%xmm0
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L164:
  mov    %r13d,%esi
  lea    D28(%rip),%rdi
  call   <fatalx@plt>
  jmp    L49
L150:
  mov    %ebx,%esi
  lea    D28(%rip),%rdi
  call   <fatalx@plt>
  test   %r13d,%r13d
  jg     L135
L162:
  lea    D70(%rip),%rdi
  xor    %eax,%eax
  call   <fatalx@plt>
  pxor   %xmm3,%xmm3
  jmp    L137
L129:
  lea    D70(%rip),%rdi
  xor    %eax,%eax
  movsd  %xmm2,0x8(%rsp)
  call   <fatalx@plt>
  movsd  0x8(%rsp),%xmm2
  jmp    L157
```

tool_calls: name: retrieve_data
arguments: data_label: D85
type_guessed: f64
name: retrieve_data
arguments: data_label: D80
type_guessed: byte[8]
name: retrieve_data
arguments: data_label: D62
type_guessed: string
name: retrieve_data
arguments: data_label: D78
type_guessed: string
name: retrieve_data
arguments: data_label: D28
type_guessed: string
name: retrieve_data
arguments: data_label: D70
type_guessed: string

tool: D85: 0.001

tool: {"D80": [0x11,0xea,0x2d,0x81,0x99,0x97,0x71,0x3d]}

tool: D62: bad conchi


tool: D78: (conchi) zero row or column sum


tool: D28: Unable to allocate %d unit(s) for item 


tool: D70: (conchi) no data


assistant: ```c
double conchi(double *a, int m, int n) {
  double *rsum, *csum, ee, tot = 0, chsq = 0, y;
  int i, j, k;
  if ((rsum = (double *)calloc((m), sizeof(double))) == NULL)
    fatalx("Unable to allocate %d unit(s) for item \n", m);
  if ((csum = (double *)calloc((n), sizeof(double))) == NULL)
    fatalx("Unable to allocate %d unit(s) for item \n", n);
  for (i = 0; i < m; i++) {
    for (j = 0; j < n; j++) {
      k = i * n + j;
      rsum[i] += a[k];
      csum[j] += a[k];
      tot += a[k];
    }
  }
  if (tot < 0.001)
    fatalx("(conchi) no data\n");
  for (i = 0; i < m; i++) {
    for (j = 0; j < n; j++) {
      k = i * n + j;
      ee = rsum[i] * csum[j] / tot;
      if (ee < 1.0e-12) {
        printf("bad conchi\n");
        printmat(a, m, n);
        fatalx("(conchi) zero row or column sum\n");
      }
      y = a[k] - ee;
      chsq += (y * y) / ee;
    }
  }
  free(rsum);
  free(csum);
  return chsq;
}
```