user: What would the C source look like for the assembly code provided here?

```asm
<qsort_twin>:
  endbr64
  push   %r15
  mov    %rdi,%r8
  mov    %edx,%r15d
  xor    %ecx,%ecx
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  mov    %rsi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x988,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x978(%rsp)
  xor    %eax,%eax
  movl   $0x0,0x10(%rsp)
  mov    %edx,0x4c0(%rsp)
L144:
  lea    -0x1(%r15),%edx
  cmp    %ecx,%edx
  jg     L92
L188:
  sub    $0x1,%r14d
  jb     L88
  movslq %r14d,%rax
  mov    0x4c0(%rsp,%rax,4),%r15d
  mov    0x10(%rsp,%rax,4),%ecx
  lea    -0x1(%r15),%edx
  cmp    %ecx,%edx
  jle    L188
L92:
  movslq %ecx,%rsi
  mov    0x0(%r13,%rsi,4),%eax
  mov    (%r8,%rsi,4),%r10d
  mov    %eax,0xc(%rsp)
  xchg   %ax,%ax
L28:
  movslq %edx,%rdi
  lea    0x0(,%rdi,4),%r11
  lea    (%r8,%r11,1),%rbx
  mov    (%rbx),%r9d
  cmp    %edx,%ecx
  jge    L87
  cmp    %r10d,%r9d
  jl     L87
  lea    -0x1(%rdx),%eax
  lea    -0x4(%r8,%rdi,4),%rdi
  cltq
  nopl   (%rax)
L115:
  mov    (%rdi),%r9d
  cmp    %eax,%ecx
  mov    %eax,%edx
  lea    0x0(,%rax,4),%r11
  setl   %r12b
  mov    %rdi,%rbx
  cmp    %r10d,%r9d
  setge  %bpl
  sub    $0x1,%rax
  sub    $0x4,%rdi
  test   %bpl,%r12b
  jne    L115
L87:
  cmp    %ecx,%edx
  jle    L9
  mov    %r9d,(%r8,%rsi,4)
  mov    0x0(%r13,%r11,1),%eax
  add    $0x1,%ecx
  mov    %eax,0x0(%r13,%rsi,4)
  movslq %ecx,%rsi
  shl    $0x2,%rsi
  lea    (%r8,%rsi,1),%rdi
  mov    (%rdi),%eax
  cmp    %eax,%r10d
  jl     L172
  cmp    %ecx,%edx
  jle    L62
  add    $0x4,%rsi
  jmp    L47
  nopl   0x0(%rax,%rax,1)
L108:
  lea    0x4(%rsi),%rax
  cmp    %edx,%ecx
  je     L82
  mov    %rax,%rsi
L47:
  mov    (%r8,%rsi,1),%eax
  add    $0x1,%ecx
  lea    (%r8,%rsi,1),%rdi
  cmp    %r10d,%eax
  jle    L108
L172:
  cmp    %edx,%ecx
  jge    L62
  mov    %eax,(%rbx)
  mov    0x0(%r13,%rsi,1),%eax
  sub    $0x1,%edx
  mov    %eax,0x0(%r13,%r11,1)
  cmp    %ecx,%edx
  jle    L62
  movslq %ecx,%rsi
  jmp    L28
  nopw   0x0(%rax,%rax,1)
L9:
  shl    $0x2,%rsi
  lea    (%r8,%rsi,1),%rdi
  mov    (%rdi),%eax
  cmp    %r10d,%eax
  jg     L172
L62:
  mov    %ecx,%edx
  nopl   0x0(%rax)
L82:
  mov    0xc(%rsp),%eax
  mov    %r10d,(%rdi)
  lea    0x1(%rdx),%ecx
  mov    %edx,%r9d
  mov    %eax,0x0(%r13,%rsi,1)
  lea    0x1(%r14),%esi
  movslq %r14d,%r14
  movslq %esi,%rax
  mov    %r15d,0x4c0(%rsp,%rax,4)
  mov    %edx,0x4c0(%rsp,%r14,4)
  mov    0x4c0(%rsp,%rax,4),%r15d
  mov    %ecx,0x10(%rsp,%rax,4)
  mov    0x10(%rsp,%r14,4),%edi
  mov    %r15d,%r10d
  sub    %ecx,%r10d
  sub    %edi,%r9d
  cmp    %r9d,%r10d
  jle    L69
  mov    %edi,0x10(%rsp,%rax,4)
  mov    %edx,0x4c0(%rsp,%rax,4)
  mov    %ecx,0x10(%rsp,%r14,4)
  mov    0x10(%rsp,%rax,4),%ecx
  mov    %r15d,0x4c0(%rsp,%r14,4)
  mov    0x4c0(%rsp,%rax,4),%r15d
L69:
  mov    %esi,%r14d
  jmp    L144
L88:
  mov    0x978(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L35
  add    $0x988,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L35:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void qsort_twin(int *arr_pri, int *arr_sec, const int elements) {
  int piv_pri, piv_sec, beg[300], end[300], i = 0, L, R, swap;
  beg[0] = 0;
  end[0] = elements;
  while (i >= 0) {
    L = beg[i];
    R = end[i] - 1;
    if (L < R) {
      piv_pri = arr_pri[L];
      piv_sec = arr_sec[L];
      while (L < R) {
        while (arr_pri[R] >= piv_pri && L < R)
          R--;
        if (L < R) {
          arr_pri[L] = arr_pri[R];
          arr_sec[L++] = arr_sec[R];
        }
        while (arr_pri[L] <= piv_pri && L < R)
          L++;
        if (L < R) {
          arr_pri[R] = arr_pri[L];
          arr_sec[R--] = arr_sec[L];
        }
      }
      arr_pri[L] = piv_pri;
      arr_sec[L] = piv_sec;
      beg[i + 1] = L + 1;
      end[i + 1] = end[i];
      end[i++] = L;
      if (end[i] - beg[i] > end[i - 1] - beg[i - 1]) {
        swap = beg[i];
        beg[i] = beg[i - 1];
        beg[i - 1] = swap;
        swap = end[i];
        end[i] = end[i - 1];
        end[i - 1] = swap;
      }
    } else {
      i--;
    }
  }
}
```