user: Demonstrate the C code that generates the assembly output below:

```asm
<qsort_twin>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x9b0,%rsp
  mov    %rdi,-0x998(%rbp)
  mov    %rsi,-0x9a0(%rbp)
  mov    %edx,-0x9a4(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x988(%rbp)
  movl   $0x0,-0x970(%rbp)
  mov    -0x9a4(%rbp),%eax
  mov    %eax,-0x4c0(%rbp)
  jmp    L149
L101:
  mov    -0x988(%rbp),%eax
  cltq
  mov    -0x970(%rbp,%rax,4),%eax
  mov    %eax,-0x984(%rbp)
  mov    -0x988(%rbp),%eax
  cltq
  mov    -0x4c0(%rbp,%rax,4),%eax
  sub    $0x1,%eax
  mov    %eax,-0x980(%rbp)
  mov    -0x984(%rbp),%eax
  cmp    -0x980(%rbp),%eax
  jge    L61
  mov    -0x984(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x998(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x97c(%rbp)
  mov    -0x984(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x9a0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x978(%rbp)
  jmp    L46
L22:
  subl   $0x1,-0x980(%rbp)
L0:
  mov    -0x980(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x998(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x97c(%rbp)
  jg     L29
  mov    -0x984(%rbp),%eax
  cmp    -0x980(%rbp),%eax
  jl     L22
L29:
  mov    -0x984(%rbp),%eax
  cmp    -0x980(%rbp),%eax
  jge    L37
  mov    -0x980(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x998(%rbp),%rax
  add    %rdx,%rax
  mov    -0x984(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x998(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x980(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x9a0(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x984(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x984(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x9a0(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
  jmp    L37
L82:
  addl   $0x1,-0x984(%rbp)
L37:
  mov    -0x984(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x998(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x97c(%rbp)
  jl     L100
  mov    -0x984(%rbp),%eax
  cmp    -0x980(%rbp),%eax
  jl     L82
L100:
  mov    -0x984(%rbp),%eax
  cmp    -0x980(%rbp),%eax
  jge    L46
  mov    -0x984(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x998(%rbp),%rax
  add    %rdx,%rax
  mov    -0x980(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x998(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x984(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x9a0(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x980(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x980(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x9a0(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
L46:
  mov    -0x984(%rbp),%eax
  cmp    -0x980(%rbp),%eax
  jl     L0
  mov    -0x984(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x998(%rbp),%rax
  add    %rax,%rdx
  mov    -0x97c(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x984(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x9a0(%rbp),%rax
  add    %rax,%rdx
  mov    -0x978(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x988(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x984(%rbp),%eax
  lea    0x1(%rax),%edx
  movslq %ecx,%rax
  mov    %edx,-0x970(%rbp,%rax,4)
  mov    -0x988(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x988(%rbp),%eax
  cltq
  mov    -0x4c0(%rbp,%rax,4),%edx
  movslq %ecx,%rax
  mov    %edx,-0x4c0(%rbp,%rax,4)
  mov    -0x988(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x988(%rbp)
  cltq
  mov    -0x984(%rbp),%edx
  mov    %edx,-0x4c0(%rbp,%rax,4)
  mov    -0x988(%rbp),%eax
  cltq
  mov    -0x4c0(%rbp,%rax,4),%edx
  mov    -0x988(%rbp),%eax
  cltq
  mov    -0x970(%rbp,%rax,4),%eax
  mov    %edx,%ecx
  sub    %eax,%ecx
  mov    -0x988(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x4c0(%rbp,%rax,4),%edx
  mov    -0x988(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x970(%rbp,%rax,4),%esi
  mov    %edx,%eax
  sub    %esi,%eax
  cmp    %eax,%ecx
  jle    L149
  mov    -0x988(%rbp),%eax
  cltq
  mov    -0x970(%rbp,%rax,4),%eax
  mov    %eax,-0x974(%rbp)
  mov    -0x988(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x970(%rbp,%rax,4),%edx
  mov    -0x988(%rbp),%eax
  cltq
  mov    %edx,-0x970(%rbp,%rax,4)
  mov    -0x988(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x974(%rbp),%edx
  mov    %edx,-0x970(%rbp,%rax,4)
  mov    -0x988(%rbp),%eax
  cltq
  mov    -0x4c0(%rbp,%rax,4),%eax
  mov    %eax,-0x974(%rbp)
  mov    -0x988(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x4c0(%rbp,%rax,4),%edx
  mov    -0x988(%rbp),%eax
  cltq
  mov    %edx,-0x4c0(%rbp,%rax,4)
  mov    -0x988(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x974(%rbp),%edx
  mov    %edx,-0x4c0(%rbp,%rax,4)
  jmp    L149
L61:
  subl   $0x1,-0x988(%rbp)
L149:
  cmpl   $0x0,-0x988(%rbp)
  jns    L101
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L95
  call   <__stack_chk_fail@plt>
L95:
  leave
  ret
```

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