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

```asm
<delaunay_reduce_2D>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xa8,%rsp
  mov    %rdi,%r15
  mov    %rsi,%r13
  mov    %edx,%r14d
  movq   %xmm0,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x98(%rsp)
  xor    %eax,%eax
  movslq %edx,%rax
  movsd  (%rsi,%rax,8),%xmm0
  movsd  %xmm0,(%rsp)
  movsd  0x18(%rsi,%rax,8),%xmm0
  movsd  %xmm0,0x8(%rsp)
  movsd  0x30(%rsi,%rax,8),%xmm0
  movsd  %xmm0,0x10(%rsp)
  mov    $0x0,%eax
  mov    $0x0,%ecx
  jmp    L97
L113:
  movslq %ecx,%rdx
  movsd  0x0(%r13,%rax,8),%xmm0
  movsd  %xmm0,0x20(%rsp,%rdx,8)
  movsd  0x18(%r13,%rax,8),%xmm0
  movsd  %xmm0,0x30(%rsp,%rdx,8)
  movsd  0x30(%r13,%rax,8),%xmm0
  movsd  %xmm0,0x40(%rsp,%rdx,8)
  add    $0x1,%ecx
L69:
  add    $0x1,%rax
  cmp    $0x3,%rax
  je     L18
L97:
  cmp    %eax,%r14d
  jne    L113
  jmp    L69
L18:
  lea    0x20(%rsp),%rsi
  lea    0x50(%rsp),%rdi
  call   <get_exteneded_basis_2D@plt>
  mov    $0x64,%ebx
  lea    0x50(%rsp),%r12
L51:
  movq   %rbp,%xmm0
  mov    %r12,%rdi
  call   <delaunay_reduce_basis_2D@plt>
  test   %eax,%eax
  jne    L10
  sub    $0x1,%ebx
  jne    L51
  jmp    L92
L35:
  movsd  0x0(%r13,%rax,8),%xmm0
  movsd  %xmm0,(%r15,%rax,8)
  movsd  0x18(%r13,%rax,8),%xmm0
  movsd  %xmm0,0x18(%r15,%rax,8)
  movsd  0x30(%r13,%rax,8),%xmm0
  movsd  %xmm0,0x30(%r15,%rax,8)
  jmp    L32
L56:
  movslq %r14d,%r14
  movsd  (%r15,%r14,8),%xmm0
  movq   D7(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,(%r15,%r14,8)
  movsd  0x18(%r15,%r14,8),%xmm0
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,0x18(%r15,%r14,8)
  movsd  0x30(%r15,%r14,8),%xmm0
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,0x30(%r15,%r14,8)
  mov    $0x1,%eax
  jmp    L92
L10:
  mov    %rsp,%rsi
  lea    0x50(%rsp),%rdi
  movq   %rbp,%xmm0
  call   <get_delaunay_shortest_vectors_2D@plt>
  mov    $0x0,%eax
  mov    $0x0,%esi
L136:
  cmp    %eax,%r14d
  je     L35
  movslq %esi,%rcx
  lea    (%rcx,%rcx,1),%rdx
  lea    (%rdx,%rcx,1),%rdi
  movsd  0x50(%rsp,%rdi,8),%xmm0
  movsd  %xmm0,(%r15,%rax,8)
  movsd  0x58(%rsp,%rdi,8),%xmm0
  movsd  %xmm0,0x18(%r15,%rax,8)
  movsd  0x60(%rsp,%rdi,8),%xmm0
  movsd  %xmm0,0x30(%r15,%rax,8)
  add    $0x1,%esi
L32:
  add    $0x1,%rax
  cmp    $0x3,%rax
  jne    L136
  mov    %r15,%rdi
  call   <mat_get_determinant_d3@plt>
  movq   %xmm0,%rbx
  call   <mat_Dabs@plt>
  mov    $0x0,%eax
  movq   %rbp,%xmm2
  comisd %xmm0,%xmm2
  ja     L92
  pxor   %xmm0,%xmm0
  movq   %rbx,%xmm3
  mov    $0x1,%eax
  comisd %xmm3,%xmm0
  ja     L56
L92:
  mov    0x98(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L29
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L29:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D7
datatype: byte[8]

tool: {"D7": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80]}

assistant: ```c
int delaunay_reduce_2D(double red_lattice[3][3], double lattice[3][3], const int unique_axis, const double symprec) {
  int i, j, k, attempt, succeeded;
  double volume;
  double basis[3][3], lattice_2D[3][2], unique_vec[3];
  k = 0;
  for (i = 0; i < 3; i++) {
    unique_vec[i] = lattice[i][unique_axis];
  }
  for (i = 0; i < 3; i++) {
    if (i != unique_axis) {
      for (j = 0; j < 3; j++) {
        lattice_2D[j][k] = lattice[j][i];
      }
      k++;
    }
  }
  get_exteneded_basis_2D(basis, lattice_2D);
  for (attempt = 0; attempt < 100; attempt++) {
    succeeded = delaunay_reduce_basis_2D(basis, symprec);
    if (succeeded) {
      break;
    }
  }
  if (!succeeded) {
    goto err;
  }
  get_delaunay_shortest_vectors_2D(basis, unique_vec, symprec);
  k = 0;
  for (i = 0; i < 3; i++) {
    if (i == unique_axis) {
      for (j = 0; j < 3; j++) {
        red_lattice[j][i] = lattice[j][i];
      }
    } else {
      for (j = 0; j < 3; j++) {
        red_lattice[j][i] = basis[k][j];
      }
      k++;
    }
  }
  volume = mat_get_determinant_d3(red_lattice);
  if (mat_Dabs(volume) < symprec) {
    ;
    goto err;
  }
  if (volume < 0) {
    for (i = 0; i < 3; i++) {
      red_lattice[i][unique_axis] = -red_lattice[i][unique_axis];
    }
  }
  return 1;
err:
  return 0;
}
```