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

```asm
<remove_duplicates>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %edx,-0x50(%rbp)
  mov    %rcx,-0x58(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    -0x4c(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x28(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  movslq %eax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L2:
  cmp    %rdx,%rsp
  je     L159
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L2
L159:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L52
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L52:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x20(%rbp)
  movq   $0x0,-0x38(%rbp)
  jmp    L111
L55:
  mov    -0x20(%rbp),%rax
  mov    -0x38(%rbp),%rdx
  movl   $0x1,(%rax,%rdx,4)
  addq   $0x1,-0x38(%rbp)
L111:
  mov    -0x4c(%rbp),%eax
  cltq
  cmp    %rax,-0x38(%rbp)
  jb     L55
  movq   $0x0,-0x38(%rbp)
  jmp    L15
L16:
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  jmp    L176
L140:
  mov    -0x38(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  je     L137
  mov    -0x20(%rbp),%rax
  mov    -0x38(%rbp),%rdx
  mov    (%rax,%rdx,4),%eax
  test   %eax,%eax
  jne    L166
  mov    -0x20(%rbp),%rax
  mov    -0x30(%rbp),%rdx
  mov    (%rax,%rdx,4),%eax
  test   %eax,%eax
  je     L137
L166:
  mov    -0x30(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rcx
  mov    -0x38(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x50(%rbp),%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <vectors_are_equal@plt>
  test   %rax,%rax
  je     L137
  mov    -0x20(%rbp),%rax
  mov    -0x30(%rbp),%rdx
  movl   $0x0,(%rax,%rdx,4)
L137:
  addq   $0x1,-0x30(%rbp)
L176:
  mov    -0x4c(%rbp),%eax
  cltq
  cmp    %rax,-0x30(%rbp)
  jb     L140
  addq   $0x1,-0x38(%rbp)
L15:
  mov    -0x4c(%rbp),%eax
  sub    $0x1,%eax
  cltq
  cmp    %rax,-0x38(%rbp)
  jb     L16
  movl   $0x0,-0x3c(%rbp)
  movq   $0x0,-0x38(%rbp)
  jmp    L68
L54:
  mov    -0x20(%rbp),%rax
  mov    -0x38(%rbp),%rdx
  mov    (%rax,%rdx,4),%eax
  test   %eax,%eax
  je     L75
  addl   $0x1,-0x3c(%rbp)
L75:
  addq   $0x1,-0x38(%rbp)
L68:
  mov    -0x4c(%rbp),%eax
  cltq
  cmp    %rax,-0x38(%rbp)
  jb     L54
  mov    -0x50(%rbp),%edx
  mov    -0x3c(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <new_matrix_double@plt>
  mov    -0x58(%rbp),%rdx
  mov    %rax,(%rdx)
  movl   $0x0,-0x3c(%rbp)
  movq   $0x0,-0x38(%rbp)
  jmp    L147
L62:
  mov    -0x20(%rbp),%rax
  mov    -0x38(%rbp),%rdx
  mov    (%rax,%rdx,4),%eax
  test   %eax,%eax
  je     L99
  movq   $0x0,-0x30(%rbp)
  jmp    L124
L105:
  mov    -0x38(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x30(%rbp),%rax
  shl    $0x3,%rax
  add    %rax,%rdx
  mov    -0x58(%rbp),%rax
  mov    (%rax),%rcx
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0x30(%rbp),%rax
  shl    $0x3,%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addq   $0x1,-0x30(%rbp)
L124:
  mov    -0x50(%rbp),%eax
  cltq
  cmp    %rax,-0x30(%rbp)
  jb     L105
  addl   $0x1,-0x3c(%rbp)
L99:
  addq   $0x1,-0x38(%rbp)
L147:
  mov    -0x4c(%rbp),%eax
  cltq
  cmp    %rax,-0x38(%rbp)
  jb     L62
  mov    -0x3c(%rbp),%eax
  mov    %rbx,%rsp
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L83
  call   <__stack_chk_fail@plt>
L83:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int remove_duplicates(double **set, int setlen, int vlen, double ***newset) {
  size_t i, j;
  int unique[setlen];
  for (i = 0; i < setlen; i++)
    unique[i] = 1;
  for (i = 0; i < (setlen - 1); i++) {
    for (j = i; j < setlen; j++) {
      if ((i != j) && (unique[i] || unique[j])) {
        if (vectors_are_equal(set[i], set[j], vlen))
          unique[j] = 0;
      }
    }
  }
  int ctr = 0;
  for (i = 0; i < setlen; i++) {
    if (unique[i])
      ctr++;
  }
  (*newset) = new_matrix_double(ctr, vlen);
  ctr = 0;
  for (i = 0; i < setlen; i++) {
    if (unique[i]) {
      for (j = 0; j < vlen; j++)
        (*newset)[ctr][j] = set[i][j];
      ctr++;
    }
  }
  return ctr;
}
```