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

```asm
<qsort2C>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %r8d,0x1c(%rsp)
  cmp    %ecx,%edx
  jge    L92
  mov    %rdi,%r14
  mov    %rsi,%rbp
  mov    %edx,%r13d
  mov    %ecx,%r12d
  test   %r8d,%r8d
  je     L114
  lea    (%rdx,%rcx,1),%eax
  mov    %eax,%ebx
  shr    $0x1f,%ebx
  add    %eax,%ebx
  sar    %ebx
  mov    %ebx,%edx
  mov    %r13d,%esi
  call   <swapj@plt>
  mov    %ebx,%edx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <swapm@plt>
  lea    0x1(%r13),%ebx
  cmp    %ebx,%r12d
  jl     L23
  movslq %r13d,%rax
  lea    0x0(%rbp,%rax,8),%rax
  mov    %rax,0x10(%rsp)
  movslq %ebx,%rbx
  mov    %r13d,%r15d
  jmp    L116
L3:
  add    $0x1,%rbx
  cmp    %ebx,%r12d
  jl     L17
L116:
  mov    %ebx,0x18(%rsp)
  movsd  0x0(%rbp,%rbx,8),%xmm0
  call   <fabs@plt>
  mov    %rax,0x8(%rsp)
  mov    0x10(%rsp),%rcx
  movsd  (%rcx),%xmm0
  call   <fabs@plt>
  cmp    %rax,0x8(%rsp)
  jge    L3
  add    $0x1,%r15d
  mov    0x18(%rsp),%edx
  mov    %r15d,%esi
  mov    %r14,%rdi
  call   <swapj@plt>
  mov    0x18(%rsp),%edx
  mov    %r15d,%esi
  mov    %rbp,%rdi
  call   <swapm@plt>
  jmp    L3
L23:
  mov    %r13d,%r15d
L17:
  mov    %r15d,%edx
  mov    %r13d,%esi
  mov    %r14,%rdi
  call   <swapj@plt>
  mov    %r15d,%edx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <swapm@plt>
  lea    -0x1(%r15),%ecx
  mov    0x1c(%rsp),%ebx
  mov    %ebx,%r8d
  mov    %r13d,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <qsort2C>
  lea    0x1(%r15),%edx
  mov    %ebx,%r8d
  mov    %r12d,%ecx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <qsort2C>
L92:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L114:
  lea    (%rdx,%rcx,1),%eax
  mov    %eax,%ebx
  shr    $0x1f,%ebx
  add    %eax,%ebx
  sar    %ebx
  mov    %ebx,%edx
  mov    %r13d,%esi
  call   <swapj@plt>
  mov    %ebx,%edx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <swapm@plt>
  lea    0x1(%r13),%ebx
  cmp    %ebx,%r12d
  jl     L106
  movslq %r13d,%rax
  lea    0x0(%rbp,%rax,8),%r15
  movslq %ebx,%rbx
  mov    %r13d,0x18(%rsp)
  jmp    L22
L125:
  add    $0x1,%rbx
  cmp    %ebx,%r12d
  jl     L101
L22:
  mov    %ebx,0x8(%rsp)
  movsd  (%r15),%xmm0
  comisd 0x0(%rbp,%rbx,8),%xmm0
  jbe    L125
  addl   $0x1,0x18(%rsp)
  mov    0x18(%rsp),%eax
  mov    %ebx,%edx
  mov    %eax,%esi
  mov    %r14,%rdi
  call   <swapj@plt>
  mov    0x8(%rsp),%edx
  mov    0x18(%rsp),%esi
  mov    %rbp,%rdi
  call   <swapm@plt>
  jmp    L125
L106:
  mov    %r13d,0x18(%rsp)
L101:
  mov    0x18(%rsp),%ebx
  mov    %ebx,%edx
  mov    %r13d,%esi
  mov    %r14,%rdi
  call   <swapj@plt>
  mov    %ebx,%edx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <swapm@plt>
  lea    -0x1(%rbx),%ecx
  mov    $0x0,%r8d
  mov    %r13d,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <qsort2C>
  lea    0x1(%rbx),%edx
  mov    $0x0,%r8d
  mov    %r12d,%ecx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <qsort2C>
  jmp    L92
```

assistant: ```c
void qsort2C(int *ja, double *ma, int left, int right, int abval) {
  int i, last;
  if (left >= right)
    return;
  if (abval) {
    swapj(ja, left, (left + right) / 2);
    swapm(ma, left, (left + right) / 2);
    last = left;
    for (i = left + 1; i <= right; i++) {
      if (fabs(ma[i]) < fabs(ma[left])) {
        swapj(ja, ++last, i);
        swapm(ma, last, i);
      }
    }
    swapj(ja, left, last);
    swapm(ma, left, last);
    qsort2C(ja, ma, left, last - 1, abval);
    qsort2C(ja, ma, last + 1, right, abval);
  } else {
    swapj(ja, left, (left + right) / 2);
    swapm(ma, left, (left + right) / 2);
    last = left;
    for (i = left + 1; i <= right; i++) {
      if (ma[i] < ma[left]) {
        swapj(ja, ++last, i);
        swapm(ma, last, i);
      }
    }
    swapj(ja, left, last);
    swapm(ma, left, last);
    qsort2C(ja, ma, left, last - 1, abval);
    qsort2C(ja, ma, last + 1, right, abval);
  }
}
```