user: Translate the below assembly code into C programming language:

```asm
<get_Delaunay_reduction_2D>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0xb8,%rsp
  movsd  %xmm0,(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xa8(%rsp)
  xor    %eax,%eax
  movslq %edx,%rax
  movupd 0x10(%rsi,%rax,8),%xmm2
  lea    0x0(,%rax,8),%r15
  movsd  0x30(%rsi,%r15,1),%xmm0
  movlpd (%rsi,%rax,8),%xmm2
  movaps %xmm2,0x10(%rsp)
  movsd  %xmm0,0x20(%rsp)
  test   %edx,%edx
  je     L97
  movsd  (%rsi),%xmm0
  movl   $0x1,0x8(%rsp)
  mov    $0x1,%r13d
  movsd  %xmm0,0x30(%rsp)
  movsd  0x18(%rsi),%xmm0
  movsd  %xmm0,0x40(%rsp)
  movsd  0x30(%rsi),%xmm0
  movsd  %xmm0,0x50(%rsp)
  cmp    $0x1,%edx
  jne    L114
L113:
  movsd  0x10(%rbp),%xmm0
  movslq %r13d,%rax
  movsd  %xmm0,0x30(%rsp,%rax,8)
  movsd  0x28(%rbp),%xmm0
  movsd  %xmm0,0x40(%rsp,%rax,8)
  movsd  0x40(%rbp),%xmm0
  movsd  %xmm0,0x50(%rsp,%rax,8)
L135:
  lea    0x60(%rsp),%r14
  lea    0x30(%rsp),%rsi
  mov    %r14,%rdi
  call   <get_exteneded_basis_2D@plt>
  nopl   0x0(%rax,%rax,1)
L62:
  movsd  (%rsp),%xmm0
  mov    %r14,%rdi
  call   <get_Delaunay_reduction_basis_2D@plt>
  test   %rax,%rax
  je     L62
  movsd  (%rsp),%xmm0
  lea    0x10(%rsp),%rsi
  mov    %r14,%rdi
  call   <get_Delaunay_shortest_vectors_2D@plt>
  test   %r12d,%r12d
  je     L52
  movsd  0x60(%rsp),%xmm0
  movsd  %xmm0,(%rbx)
  movsd  0x68(%rsp),%xmm0
  movsd  %xmm0,0x18(%rbx)
  movsd  0x70(%rsp),%xmm0
  movsd  %xmm0,0x30(%rbx)
  cmp    $0x1,%r12d
  je     L75
  movslq 0x8(%rsp),%r14
  lea    (%r14,%r14,2),%rax
  shl    $0x3,%rax
  movsd  0x60(%rsp,%rax,1),%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  0x68(%rsp,%rax,1),%xmm0
  movsd  %xmm0,0x20(%rbx)
  movsd  0x70(%rsp,%rax,1),%xmm0
  movsd  %xmm0,0x38(%rbx)
  cmp    $0x2,%r12d
  je     L34
L141:
  lea    0x0(%r13,%r13,2),%rax
  shl    $0x3,%rax
  movsd  0x60(%rsp,%rax,1),%xmm0
  movsd  %xmm0,0x10(%rbx)
  movsd  0x68(%rsp,%rax,1),%xmm0
  movsd  %xmm0,0x28(%rbx)
  movsd  0x70(%rsp,%rax,1),%xmm0
L2:
  mov    %rbx,%rdi
  movsd  %xmm0,0x40(%rbx)
  call   <mat_get_determinant_d3@plt>
  movsd  %xmm0,0x8(%rsp)
  call   <mat_Dabs@plt>
  movsd  (%rsp),%xmm3
  xor    %eax,%eax
  comisd %xmm0,%xmm3
  ja     L70
  movsd  0x8(%rsp),%xmm1
  pxor   %xmm0,%xmm0
  mov    $0x1,%eax
  comisd %xmm1,%xmm0
  ja     L99
L70:
  mov    0xa8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L140
  add    $0xb8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L99:
  add    %r15,%rbx
  movq   D1(%rip),%xmm1
  mov    $0x1,%eax
  movsd  (%rbx),%xmm0
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,(%rbx)
  movsd  0x18(%rbx),%xmm0
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,0x18(%rbx)
  movsd  0x30(%rbx),%xmm0
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,0x30(%rbx)
  jmp    L70
  nopw   0x0(%rax,%rax,1)
L34:
  movsd  0x10(%rbp),%xmm0
  movsd  %xmm0,0x10(%rbx)
  movsd  0x28(%rbp),%xmm0
  movsd  %xmm0,0x28(%rbx)
  movsd  0x40(%rbp),%xmm0
  jmp    L2
  xchg   %ax,%ax
L114:
  movsd  0x8(%rsi),%xmm0
  mov    $0x2,%r13d
  movsd  %xmm0,0x38(%rsp)
  movsd  0x20(%rsi),%xmm0
  movsd  %xmm0,0x48(%rsp)
  movsd  0x38(%rsi),%xmm0
  movsd  %xmm0,0x58(%rsp)
  cmp    $0x2,%edx
  je     L135
  jmp    L113
  nopl   (%rax)
L97:
  movsd  0x8(%rsi),%xmm0
  movl   $0x0,0x8(%rsp)
  mov    $0x1,%r13d
  movsd  %xmm0,0x30(%rsp)
  movsd  0x20(%rsi),%xmm0
  movsd  %xmm0,0x40(%rsp)
  movsd  0x38(%rsi),%xmm0
  movsd  %xmm0,0x50(%rsp)
  jmp    L113
  nopl   0x0(%rax)
L75:
  movsd  0x8(%rbp),%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  0x20(%rbp),%xmm0
  movsd  %xmm0,0x20(%rbx)
  movsd  0x38(%rbp),%xmm0
  movsd  %xmm0,0x38(%rbx)
  jmp    L141
  nopl   0x0(%rax,%rax,1)
L52:
  movsd  0x0(%rbp),%xmm0
  movslq 0x8(%rsp),%r14
  movsd  %xmm0,(%rbx)
  movsd  0x18(%rbp),%xmm0
  lea    (%r14,%r14,2),%rax
  shl    $0x3,%rax
  movsd  %xmm0,0x18(%rbx)
  movsd  0x30(%rbp),%xmm0
  movsd  %xmm0,0x30(%rbx)
  movsd  0x60(%rsp,%rax,1),%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  0x68(%rsp,%rax,1),%xmm0
  movsd  %xmm0,0x20(%rbx)
  movsd  0x70(%rsp,%rax,1),%xmm0
  movsd  %xmm0,0x38(%rbx)
  jmp    L141
L140:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D1
type: byte[8]

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

assistant: ```c
int get_Delaunay_reduction_2D(double red_lattice[3][3], double lattice[3][3], const int unique_axis, const double symprec) {
  int i, j, k;
  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);
  while (1) {
    if (get_Delaunay_reduction_basis_2D(basis, symprec)) {
      break;
    }
  }
  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;
}
```