user: 请从给定的汇编指令推导出C源代码:

```asm
<z2x2>:
  endbr64
  push   %r12
  mov    $0x8,%esi
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    $0x2,%edi
  sub    $0x20,%rsp
  call   <calloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L93
L12:
  mov    $0x8,%esi
  mov    $0x2,%edi
  call   <calloc@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L156
L75:
  movsd  (%r12),%xmm0
  addsd  (%rbx),%xmm0
  movsd  %xmm0,(%r12)
  movsd  0x0(%rbp),%xmm0
  addsd  (%rbx),%xmm0
  movsd  %xmm0,0x0(%rbp)
  movsd  (%r12),%xmm1
  addsd  0x8(%rbx),%xmm1
  pxor   %xmm0,%xmm0
  addsd  (%rbx),%xmm0
  movsd  %xmm1,(%r12)
  movsd  0x8(%rbp),%xmm1
  addsd  0x8(%rbx),%xmm1
  movsd  %xmm1,0x8(%rbp)
  movsd  0x8(%r12),%xmm1
  addsd  0x10(%rbx),%xmm1
  addsd  0x8(%rbx),%xmm0
  movsd  %xmm1,0x8(%r12)
  movsd  0x0(%rbp),%xmm1
  addsd  0x10(%rbx),%xmm1
  movsd  %xmm1,0x0(%rbp)
  movsd  0x8(%r12),%xmm1
  addsd  0x18(%rbx),%xmm1
  addsd  0x10(%rbx),%xmm0
  movsd  %xmm1,0x8(%r12)
  movsd  0x8(%rbp),%xmm1
  addsd  0x18(%rbx),%xmm1
  movsd  %xmm1,0x8(%rbp)
  addsd  0x18(%rbx),%xmm0
  movsd  D87(%rip),%xmm1
  comisd %xmm0,%xmm1
  ja     L39
L21:
  movsd  (%r12),%xmm3
  movsd  0x0(%rbp),%xmm1
  movsd  D64(%rip),%xmm4
  mulsd  %xmm3,%xmm1
  divsd  %xmm0,%xmm1
  comisd %xmm1,%xmm4
  ja     L48
L27:
  movsd  (%rbx),%xmm2
  mulsd  0x8(%rbp),%xmm3
  pxor   %xmm7,%xmm7
  subsd  %xmm1,%xmm2
  divsd  %xmm0,%xmm3
  movapd %xmm2,%xmm5
  mulsd  %xmm2,%xmm5
  divsd  %xmm1,%xmm5
  comisd %xmm3,%xmm4
  addsd  %xmm7,%xmm5
  ja     L95
L110:
  movsd  0x8(%rbx),%xmm1
  movsd  0x0(%rbp),%xmm6
  subsd  %xmm3,%xmm1
  mulsd  %xmm1,%xmm1
  divsd  %xmm3,%xmm1
  movapd %xmm1,%xmm3
  addsd  %xmm5,%xmm3
  movsd  0x8(%r12),%xmm5
  mulsd  %xmm5,%xmm6
  divsd  %xmm0,%xmm6
  comisd %xmm6,%xmm4
  ja     L8
L34:
  movsd  0x10(%rbx),%xmm1
  mulsd  0x8(%rbp),%xmm5
  subsd  %xmm6,%xmm1
  mulsd  %xmm1,%xmm1
  divsd  %xmm6,%xmm1
  addsd  %xmm3,%xmm1
  movapd %xmm5,%xmm3
  divsd  %xmm0,%xmm3
  comisd %xmm3,%xmm4
  ja     L130
L14:
  movsd  0x18(%rbx),%xmm0
  pxor   %xmm7,%xmm7
  subsd  %xmm3,%xmm0
  mulsd  %xmm0,%xmm0
  divsd  %xmm3,%xmm0
  addsd  %xmm1,%xmm0
  addsd  %xmm4,%xmm0
  ucomisd %xmm0,%xmm7
  ja     L68
  sqrtsd %xmm0,%xmm0
L145:
  comisd %xmm2,%xmm7
  jbe    L134
  xorpd  D134(%rip),%xmm0
L134:
  mov    %r12,%rdi
  movsd  %xmm0,(%rsp)
  call   <free@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  movsd  (%rsp),%xmm0
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nop
L130:
  lea    D145(%rip),%rdi
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm1,(%rsp)
  call   <printf@plt>
  mov    $0x2,%edx
  mov    $0x2,%esi
  mov    %rbx,%rdi
  call   <printmat@plt>
  lea    D60(%rip),%rdi
  xor    %eax,%eax
  call   <fatalx@plt>
  movsd  0x10(%rsp),%xmm2
  movsd  0x8(%rsp),%xmm3
  mov    D64(%rip),%rax
  movsd  (%rsp),%xmm1
  movq   %rax,%xmm4
  jmp    L14
  nop
L8:
  lea    D145(%rip),%rdi
  movsd  %xmm0,0x18(%rsp)
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm6,(%rsp)
  call   <printf@plt>
  mov    $0x2,%edx
  mov    $0x2,%esi
  mov    %rbx,%rdi
  call   <printmat@plt>
  lea    D60(%rip),%rdi
  xor    %eax,%eax
  call   <fatalx@plt>
  movsd  0x18(%rsp),%xmm0
  movsd  (%rsp),%xmm6
  mov    D64(%rip),%rax
  movsd  0x8(%r12),%xmm5
  movsd  0x10(%rsp),%xmm2
  movsd  0x8(%rsp),%xmm3
  movq   %rax,%xmm4
  jmp    L34
  nopw   0x0(%rax,%rax,1)
L95:
  lea    D145(%rip),%rdi
  movsd  %xmm0,0x18(%rsp)
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm5,0x8(%rsp)
  movsd  %xmm3,(%rsp)
  call   <printf@plt>
  mov    $0x2,%edx
  mov    $0x2,%esi
  mov    %rbx,%rdi
  call   <printmat@plt>
  lea    D60(%rip),%rdi
  xor    %eax,%eax
  call   <fatalx@plt>
  movsd  0x18(%rsp),%xmm0
  movsd  (%rsp),%xmm3
  mov    D64(%rip),%rax
  movsd  0x10(%rsp),%xmm2
  movsd  0x8(%rsp),%xmm5
  movq   %rax,%xmm4
  jmp    L110
  nopl   0x0(%rax,%rax,1)
L48:
  lea    D145(%rip),%rdi
  movsd  %xmm0,0x8(%rsp)
  movsd  %xmm1,(%rsp)
  call   <printf@plt>
  mov    $0x2,%edx
  mov    $0x2,%esi
  mov    %rbx,%rdi
  call   <printmat@plt>
  lea    D60(%rip),%rdi
  xor    %eax,%eax
  call   <fatalx@plt>
  movsd  (%r12),%xmm3
  movsd  0x8(%rsp),%xmm0
  mov    D64(%rip),%rax
  movsd  (%rsp),%xmm1
  movq   %rax,%xmm4
  jmp    L27
  nopl   0x0(%rax)
L39:
  lea    D101(%rip),%rdi
  xor    %eax,%eax
  movsd  %xmm0,(%rsp)
  call   <fatalx@plt>
  movsd  (%rsp),%xmm0
  jmp    L21
  nopl   (%rax)
L156:
  mov    $0x2,%esi
  lea    D68(%rip),%rdi
  xor    %eax,%eax
  call   <fatalx@plt>
  jmp    L75
L93:
  mov    $0x2,%esi
  lea    D68(%rip),%rdi
  xor    %eax,%eax
  call   <fatalx@plt>
  jmp    L12
L68:
  movsd  %xmm2,(%rsp)
  call   <sqrt@plt>
  movsd  (%rsp),%xmm2
  pxor   %xmm7,%xmm7
  jmp    L145
```

tool_calls: name: disassemble_data
arguments: data_label: D87
type_guessed: f64
name: disassemble_data
arguments: data_label: D64
type_guessed: byte[8]
name: disassemble_data
arguments: data_label: D134
type_guessed: f32[4]
name: disassemble_data
arguments: data_label: D145
type_guessed: string
name: disassemble_data
arguments: data_label: D60
type_guessed: string
name: disassemble_data
arguments: data_label: D101
type_guessed: string
name: disassemble_data
arguments: data_label: D68
type_guessed: string

tool: D87: 0.001

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

tool: {"D134": [0.0,-0.0,0.0,0.0]}

tool: D145: bad conchi


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


tool: D101: (z2x2) no data


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


assistant: ```c
double z2x2(double *a) {
  double *rsum, *csum, ee, tot = 0, chsq = 0, y, dev00, z;
  int i, j, k, m = 2, n = 2;
  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("(z2x2) 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;
      if (k == 0)
        dev00 = y;
      chsq += (y * y) / ee;
    }
  }
  z = sqrt(chsq + 1.0e-12);
  if (dev00 < 0.0)
    z = -z;
  free(rsum);
  free(csum);
  return z;
}
```