user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<dist_4v_ordered_v4>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%r10
  mov    %rdx,%r11
  mov    %ecx,%r15d
  mov    %r9,0x8(%rsp)
  mov    0x60(%rsp),%r12
  mov    0x80(%rsp),%r13
  mov    0x98(%rsp),%rdi
  mov    0xa0(%rsp),%rsi
  mov    0xa8(%rsp),%rbp
  mov    0xb0(%rsp),%r14
  mov    0xb8(%rsp),%r9
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  test   %ecx,%ecx
  jle    L20
  lea    0x1(%rcx),%ecx
  mov    $0x1,%eax
L36:
  mov    (%rbx,%rax,8),%rdx
  mov    0xc(%rdx),%edx
  mov    %edx,(%rdi,%rax,4)
  mov    (%rbx,%rax,8),%rdx
  mov    0x24(%rdx),%edx
  mov    %dl,(%rsi,%rax,1)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L36
L20:
  push   $0x0
  push   %r9
  mov    0xa0(%rsp),%eax
  push   %rax
  mov    0xa0(%rsp),%eax
  push   %rax
  push   %r13
  mov    0xa0(%rsp),%eax
  push   %rax
  mov    0xa0(%rsp),%eax
  push   %rax
  mov    0xa0(%rsp),%eax
  push   %rax
  lea    0x50(%rsp),%rax
  push   %rax
  push   %rbp
  mov    %r8d,%r9d
  mov    %r15d,%r8d
  mov    %r11,%rcx
  mov    %rsi,%rdx
  mov    %r10,%rsi
  call   <dist_2v_ordered_v4@plt>
  mov    0x60(%rsp),%esi
  add    $0x50,%rsp
  cmpl   $0x1,0x88(%rsp)
  je     L22
L33:
  mov    %esi,(%r12)
  mov    0x14(%rsp),%eax
  mov    %eax,0x4(%r12)
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L8
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L22:
  test   %esi,%esi
  jle    L33
  add    $0x8,%rbp
  lea    0x8(%r14),%rax
  lea    -0x1(%rsi),%edx
  lea    0x10(%r14,%rdx,8),%rdi
L13:
  mov    0x0(%rbp),%rdx
  movslq 0xc(%rdx),%rdx
  lea    (%rbx,%rdx,8),%rdx
  mov    (%rax),%rcx
  mov    (%rdx),%r8
  mov    0x4(%r8),%r8d
  mov    %r8d,0x4(%rcx)
  mov    (%rax),%rcx
  mov    (%rdx),%r8
  mov    0x8(%r8),%r8d
  mov    %r8d,0x8(%rcx)
  mov    (%rax),%rcx
  mov    (%rdx),%r8
  mov    0xc(%r8),%r8d
  mov    %r8d,0xc(%rcx)
  mov    (%rax),%rcx
  mov    0x0(%rbp),%r8
  mov    0x8(%r8),%r8d
  mov    %r8d,0x10(%rcx)
  mov    (%rax),%rcx
  mov    (%rdx),%r8
  mov    0x10(%r8),%r8d
  mov    %r8d,0x14(%rcx)
  mov    (%rax),%rcx
  mov    (%rdx),%r8
  mov    0x14(%r8),%r8d
  mov    %r8d,0x18(%rcx)
  mov    (%rax),%rcx
  mov    (%rdx),%r8
  mov    0x18(%r8),%r8d
  mov    %r8d,0x1c(%rcx)
  mov    (%rax),%rcx
  mov    0x0(%rbp),%r8
  mov    0x10(%r8),%r8d
  mov    %r8d,0x20(%rcx)
  mov    (%rax),%rcx
  mov    (%rdx),%r8
  mov    0x1c(%r8),%r8d
  mov    %r8d,0x24(%rcx)
  mov    (%rax),%rcx
  mov    (%rdx),%r8
  mov    0x20(%r8),%r8d
  mov    %r8d,0x28(%rcx)
  mov    (%rax),%rcx
  mov    (%rdx),%rdx
  mov    0x24(%rdx),%edx
  mov    %edx,0x2c(%rcx)
  mov    (%rax),%rdx
  mov    0x0(%rbp),%rcx
  mov    0x18(%rcx),%ecx
  mov    %ecx,0x30(%rdx)
  add    $0x8,%rbp
  add    $0x8,%rax
  cmp    %rdi,%rax
  jne    L13
  mov    $0x4,%r8d
  mov    %esi,%ecx
  mov    %r13,%rdx
  mov    0x8(%rsp),%rsi
  mov    %r14,%rdi
  call   <remove_overlaps_v2@plt>
  mov    %eax,%esi
  jmp    L33
L8:
  call   <__stack_chk_fail@plt>
```

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];
}
```