user: Converte this assembly snippet into its equivalent C code:

```asm
<get_delaunay_shortest_vectors_2D>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x118,%rsp
  movupd (%rdi),%xmm3
  movupd 0x10(%rdi),%xmm4
  mov    %rsi,0x18(%rsp)
  movupd 0x20(%rdi),%xmm5
  lea    0x30(%rsp),%r15
  movsd  %xmm0,0x28(%rsp)
  movsd  0x40(%rdi),%xmm0
  movupd 0x30(%rdi),%xmm6
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  lea    0xa0(%rsp),%rax
  movsd  %xmm0,0xe0(%rsp)
  movupd 0x18(%rdi),%xmm0
  mov    %rax,0x20(%rsp)
  lea    0xe8(%rsp),%rax
  addpd  %xmm3,%xmm0
  movl   $0x3,0x14(%rsp)
  mov    %rax,(%rsp)
  movaps %xmm3,0xa0(%rsp)
  movups %xmm0,0xe8(%rsp)
  movsd  0x10(%rdi),%xmm0
  addsd  0x28(%rdi),%xmm0
  movaps %xmm4,0xb0(%rsp)
  movaps %xmm5,0xc0(%rsp)
  movaps %xmm6,0xd0(%rsp)
  movsd  %xmm0,0xf8(%rsp)
L63:
  mov    0x20(%rsp),%r14
  mov    %r14,%rbp
L75:
  mov    %r14,%rdi
  mov    %r14,%r12
  add    $0x18,%r14
  call   <mat_norm_squared_d3@plt>
  mov    %r14,%rdi
  mov    %rax,%rbx
  call   <mat_norm_squared_d3@plt>
  cmp    %rax,%rbx
  jg     L12
L73:
  cmp    (%rsp),%r14
  jne    L75
  subl   $0x1,0x14(%rsp)
  jne    L63
  mov    0x18(%rsp),%rax
  mov    $0x1,%ebx
  lea    0x50(%rsp),%r12
  movapd 0xa0(%rsp),%xmm0
  movupd (%rax),%xmm1
  unpcklpd %xmm1,%xmm0
  movaps %xmm1,(%rsp)
  movaps %xmm0,0x50(%rsp)
  movapd %xmm1,%xmm0
  movlpd 0xa8(%rsp),%xmm0
  movups %xmm0,0x68(%rsp)
  movsd  0xb0(%rsp),%xmm0
  movhpd 0x10(%rax),%xmm0
  movaps %xmm0,0x80(%rsp)
L5:
  movsd  0x18(%rbp),%xmm0
  mov    %r12,%rdi
  movsd  %xmm0,0x60(%rsp)
  movsd  0x20(%rbp),%xmm0
  movsd  %xmm0,0x78(%rsp)
  movsd  0x28(%rbp),%xmm0
  movsd  %xmm0,0x90(%rsp)
  call   <mat_get_determinant_d3@plt>
  mov    %eax,%edi
  call   <mat_Dabs@plt>
  comisd 0x28(%rsp),%xmm0
  ja     L45
  add    $0x1,%ebx
  add    $0x18,%rbp
  cmp    $0x4,%ebx
  jne    L5
L43:
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L62
  add    $0x118,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L12:
  mov    %r12,%rsi
  mov    %r15,%rdi
  call   <mat_copy_vector_d3@plt>
  mov    %r14,%rsi
  mov    %r12,%rdi
  call   <mat_copy_vector_d3@plt>
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <mat_copy_vector_d3@plt>
  jmp    L73
  cs nopw 0x0(%rax,%rax,1)
L45:
  movsd  0xb0(%rsp),%xmm0
  movslq %ebx,%rbx
  movapd 0xa0(%rsp),%xmm3
  lea    (%rbx,%rbx,2),%rax
  shl    $0x3,%rax
  movsd  %xmm0,0x10(%r13)
  movupd 0xa0(%rsp,%rax,1),%xmm4
  movups %xmm3,0x0(%r13)
  movsd  0xb0(%rsp,%rax,1),%xmm0
  movups %xmm4,0x18(%r13)
  movsd  %xmm0,0x28(%r13)
  jmp    L43
L62:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void get_delaunay_shortest_vectors_2D(double basis[3][3], const double unique_vec[3], const double symprec) {
  int i, j;
  double b[4][3], tmpmat[3][3];
  double tmpvec[3];
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      b[i][j] = basis[i][j];
    }
  }
  for (i = 0; i < 3; i++) {
    b[3][i] = basis[0][i] + basis[1][i];
  }
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      if (mat_norm_squared_d3(b[j]) > mat_norm_squared_d3(b[j + 1])) {
        mat_copy_vector_d3(tmpvec, b[j]);
        mat_copy_vector_d3(b[j], b[j + 1]);
        mat_copy_vector_d3(b[j + 1], tmpvec);
      }
    }
  }
  for (i = 0; i < 3; i++) {
    tmpmat[i][0] = b[0][i];
    tmpmat[i][1] = unique_vec[i];
  }
  for (i = 1; i < 4; i++) {
    for (j = 0; j < 3; j++) {
      tmpmat[j][2] = b[i][j];
    }
    if (mat_Dabs(mat_get_determinant_d3(tmpmat)) > symprec) {
      for (j = 0; j < 3; j++) {
        basis[0][j] = b[0][j];
        basis[1][j] = b[i][j];
      }
      break;
    }
  }
}
```