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

```asm
<dist_4v_ordered_v4>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x3c(%rbp)
  mov    %r8d,-0x40(%rbp)
  mov    %r9,-0x48(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x50(%rbp)
  mov    0x30(%rbp),%rax
  mov    %rax,-0x58(%rbp)
  mov    0x48(%rbp),%rax
  mov    %rax,-0x60(%rbp)
  mov    0x50(%rbp),%rax
  mov    %rax,-0x68(%rbp)
  mov    0x58(%rbp),%rax
  mov    %rax,-0x70(%rbp)
  mov    0x60(%rbp),%rax
  mov    %rax,-0x78(%rbp)
  mov    0x68(%rbp),%rax
  mov    %rax,-0x80(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x1,-0x20(%rbp)
  jmp    L58
L7:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x20(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x60(%rbp),%rdx
  add    %rcx,%rdx
  mov    0xc(%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  add    $0x24,%rax
  mov    (%rax),%edx
  mov    -0x20(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x68(%rbp),%rax
  add    %rcx,%rax
  mov    %dl,(%rax)
  addl   $0x1,-0x20(%rbp)
L58:
  mov    -0x20(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jle    L7
  mov    -0x40(%rbp),%r9d
  mov    -0x3c(%rbp),%r8d
  mov    -0x38(%rbp),%rcx
  mov    -0x68(%rbp),%rdx
  mov    -0x30(%rbp),%rsi
  mov    -0x60(%rbp),%rax
  push   $0x0
  push   -0x80(%rbp)
  mov    0x40(%rbp),%edi
  push   %rdi
  mov    0x38(%rbp),%edi
  push   %rdi
  push   -0x58(%rbp)
  mov    0x28(%rbp),%edi
  push   %rdi
  mov    0x20(%rbp),%edi
  push   %rdi
  mov    0x18(%rbp),%edi
  push   %rdi
  lea    -0x10(%rbp),%rdi
  push   %rdi
  push   -0x70(%rbp)
  mov    %rax,%rdi
  call   <dist_2v_ordered_v4@plt>
  add    $0x50,%rsp
  mov    -0x10(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  cmpl   $0x1,0x38(%rbp)
  jne    L27
  movl   $0x1,-0x20(%rbp)
  jmp    L18
L51:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    0xc(%rax),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x20(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x78(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rdx
  add    $0x4,%rdx
  mov    0x4(%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x20(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x78(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rdx
  add    $0x8,%rdx
  mov    0x8(%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x20(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x78(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rdx
  add    $0xc,%rdx
  mov    0xc(%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x20(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x78(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rdx
  add    $0x10,%rdx
  mov    0x8(%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x20(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x78(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rdx
  add    $0x14,%rdx
  mov    0x10(%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x20(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x78(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rdx
  add    $0x18,%rdx
  mov    0x14(%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x20(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x78(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rdx
  add    $0x1c,%rdx
  mov    0x18(%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x20(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x78(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rdx
  add    $0x20,%rdx
  mov    0x10(%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x20(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x78(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rdx
  add    $0x24,%rdx
  mov    0x1c(%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x20(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x78(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rdx
  add    $0x28,%rdx
  mov    0x20(%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x20(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x78(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rdx
  add    $0x2c,%rdx
  mov    0x24(%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x20(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x78(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rdx
  add    $0x30,%rdx
  mov    0x18(%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x20(%rbp)
L18:
  mov    -0x20(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jle    L51
L27:
  cmpl   $0x0,-0x18(%rbp)
  setg   %dl
  cmpl   $0x1,0x38(%rbp)
  sete   %al
  and    %edx,%eax
  test   %al,%al
  je     L65
  mov    -0x18(%rbp),%ecx
  mov    -0x58(%rbp),%rdx
  mov    -0x48(%rbp),%rsi
  mov    -0x78(%rbp),%rax
  mov    $0x4,%r8d
  mov    %rax,%rdi
  call   <remove_overlaps_v2@plt>
  mov    %eax,-0x1c(%rbp)
  jmp    L41
L65:
  mov    -0x18(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
L41:
  mov    -0x50(%rbp),%rax
  mov    -0x1c(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x50(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    -0xc(%rbp),%eax
  mov    %eax,(%rdx)
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L43
  call   <__stack_chk_fail@plt>
L43:
  leave
  ret
```

assistant: ```c
void dist_4v_ordered_v4(int **ovdi123_p, int *m4_p, char *m4_s, int n123, int n4, int **ovdi, int *n, int min_dist, int max_dist, int max_n_ovdi, int *ml, int get_positions, int pos_format, int *m123_p, char *m123_s, int **ovdi1234, int **all_ovdi, int **temp_ovdi) {
  int n1234;
  int n_1234[2];
  int i, j;
  int curr_index;
  int n_cooc;
  for (i = 1; i <= n123; i++) {
    m123_p[i] = ovdi123_p[i][3];
    m123_s[i] = ovdi123_p[i][9];
  }
  dist_2v_ordered_v4(m123_p, m4_p, m123_s, m4_s, n123, n4, ovdi1234, n_1234, min_dist, max_dist, max_n_ovdi, ml, get_positions, pos_format, temp_ovdi, 0);
  n1234 = n_1234[0];
  if (get_positions == 1) {
    for (i = 1; i <= n1234; i++) {
      curr_index = ovdi1234[i][3];
      all_ovdi[i][1] = ovdi123_p[curr_index][1];
      all_ovdi[i][2] = ovdi123_p[curr_index][2];
      all_ovdi[i][3] = ovdi123_p[curr_index][3];
      all_ovdi[i][4] = ovdi1234[i][2];
      all_ovdi[i][5] = ovdi123_p[curr_index][4];
      all_ovdi[i][6] = ovdi123_p[curr_index][5];
      all_ovdi[i][7] = ovdi123_p[curr_index][6];
      all_ovdi[i][8] = ovdi1234[i][4];
      all_ovdi[i][9] = ovdi123_p[curr_index][7];
      all_ovdi[i][10] = ovdi123_p[curr_index][8];
      all_ovdi[i][11] = ovdi123_p[curr_index][9];
      all_ovdi[i][12] = ovdi1234[i][6];
    }
  }
  if ((n1234 > 0) & (get_positions == 1)) {
    n_cooc = remove_overlaps_v2(all_ovdi, ovdi, ml, n1234, 4);
  } else {
    n_cooc = n1234;
  }
  n[0] = n_cooc;
  n[1] = n_1234[1];
}
```