user: 请从给定的汇编指令推导出C源代码:

```asm
<ArraySort_Mix>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %edi,-0x64(%rbp)
  mov    %rsi,-0x70(%rbp)
  mov    %rdx,-0x78(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    -0x64(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x5c(%rbp)
  movl   $0x0,-0x54(%rbp)
  movl   $0x0,-0x50(%rbp)
  movl   $0x32,-0x4c(%rbp)
  mov    -0x4c(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x40(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  movslq %eax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L164:
  cmp    %rdx,%rsp
  je     L58
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L164
L58:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L161
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L161:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x38(%rbp)
  movq   $0x7,-0x30(%rbp)
L202:
  mov    -0x5c(%rbp),%eax
  sub    -0x54(%rbp),%eax
  cltq
  cmp    %rax,-0x30(%rbp)
  jle    L124
  mov    -0x54(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x58(%rbp)
  jmp    L41
L198:
  mov    -0x58(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x58(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x44(%rbp)
  mov    -0x58(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x60(%rbp)
  jmp    L127
L175:
  mov    -0x60(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  cmp    %rax,-0x20(%rbp)
  jge    L219
  mov    -0x60(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    -0x60(%rbp),%edx
  movslq %edx,%rdx
  add    $0x1,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x70(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  mov    -0x60(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    -0x60(%rbp),%edx
  movslq %edx,%rdx
  add    $0x1,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x78(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  subl   $0x1,-0x60(%rbp)
L127:
  mov    -0x60(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jge    L175
  jmp    L111
L219:
  nop
L111:
  mov    -0x60(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x60(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rax,%rdx
  mov    -0x44(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x58(%rbp)
L41:
  mov    -0x58(%rbp),%eax
  cmp    -0x5c(%rbp),%eax
  jle    L198
  cmpl   $0x0,-0x50(%rbp)
  jne    L74
  mov    %rbx,%rsp
  nop
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L130
  jmp    L189
L74:
  mov    -0x50(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x50(%rbp)
  mov    -0x38(%rbp),%rdx
  cltq
  mov    (%rdx,%rax,4),%eax
  mov    %eax,-0x5c(%rbp)
  mov    -0x50(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x50(%rbp)
  mov    -0x38(%rbp),%rdx
  cltq
  mov    (%rdx,%rax,4),%eax
  mov    %eax,-0x54(%rbp)
  jmp    L202
L124:
  mov    -0x54(%rbp),%edx
  mov    -0x5c(%rbp),%eax
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x48(%rbp)
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x54(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    -0x48(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x70(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  mov    -0x54(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  mov    %rax,-0x28(%rbp)
  mov    -0x54(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    -0x48(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x78(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x54(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    -0x28(%rbp),%rdx
  mov    %edx,(%rax)
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x70(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  jle    L80
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    -0x54(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x70(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  mov    %rax,-0x28(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    -0x54(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x78(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    -0x28(%rbp),%rdx
  mov    %edx,(%rax)
L80:
  mov    -0x54(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x70(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  jle    L182
  mov    -0x54(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    -0x54(%rbp),%edx
  movslq %edx,%rdx
  add    $0x1,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x70(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x54(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  mov    %rax,-0x28(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    -0x54(%rbp),%edx
  movslq %edx,%rdx
  add    $0x1,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x78(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    -0x28(%rbp),%rdx
  mov    %edx,(%rax)
L182:
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x54(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x70(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  jle    L212
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x54(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    -0x54(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x70(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  mov    -0x54(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  mov    %rax,-0x28(%rbp)
  mov    -0x54(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    -0x54(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x78(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x54(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    -0x28(%rbp),%rdx
  mov    %edx,(%rax)
L212:
  mov    -0x54(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x60(%rbp)
  mov    -0x5c(%rbp),%eax
  mov    %eax,-0x58(%rbp)
  mov    -0x54(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x54(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x44(%rbp)
L11:
  addl   $0x1,-0x60(%rbp)
  mov    -0x60(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  cmp    %rax,-0x20(%rbp)
  jg     L11
L126:
  subl   $0x1,-0x58(%rbp)
  mov    -0x58(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  cmp    %rax,-0x20(%rbp)
  jl     L126
  mov    -0x58(%rbp),%eax
  cmp    -0x60(%rbp),%eax
  jl     L238
  mov    -0x60(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x58(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    -0x60(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x70(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  mov    -0x58(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x60(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  mov    %rax,-0x28(%rbp)
  mov    -0x58(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    -0x60(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x78(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x58(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    -0x28(%rbp),%rdx
  mov    %edx,(%rax)
  jmp    L11
L238:
  nop
  mov    -0x58(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    -0x54(%rbp),%edx
  movslq %edx,%rdx
  add    $0x1,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x70(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  mov    -0x58(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x58(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    -0x54(%rbp),%edx
  movslq %edx,%rdx
  add    $0x1,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x78(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x58(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rax,%rdx
  mov    -0x44(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x2,-0x50(%rbp)
  mov    -0x50(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jle    L125
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L125:
  mov    -0x5c(%rbp),%eax
  sub    -0x60(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x58(%rbp),%eax
  sub    -0x54(%rbp),%eax
  cmp    %eax,%edx
  jl     L56
  mov    -0x38(%rbp),%rax
  mov    -0x50(%rbp),%edx
  movslq %edx,%rdx
  mov    -0x5c(%rbp),%ecx
  mov    %ecx,(%rax,%rdx,4)
  mov    -0x50(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x38(%rbp),%rax
  movslq %edx,%rdx
  mov    -0x60(%rbp),%ecx
  mov    %ecx,(%rax,%rdx,4)
  mov    -0x58(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x5c(%rbp)
  jmp    L202
L56:
  mov    -0x58(%rbp),%eax
  lea    -0x1(%rax),%ecx
  mov    -0x38(%rbp),%rax
  mov    -0x50(%rbp),%edx
  movslq %edx,%rdx
  mov    %ecx,(%rax,%rdx,4)
  mov    -0x50(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x38(%rbp),%rax
  movslq %edx,%rdx
  mov    -0x54(%rbp),%ecx
  mov    %ecx,(%rax,%rdx,4)
  mov    -0x60(%rbp),%eax
  mov    %eax,-0x54(%rbp)
  jmp    L202
L189:
  call   <__stack_chk_fail@plt>
L130:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D4
type_guessed: string

tool: D4: Stack error: NSTACK too small


assistant: ```c
void ArraySort_Mix(int n, long int *arr, int *brr) {
  int i, ir = n - 1, j, k, m = 0, jstack = 0, b, NSTACK = 50, istack[NSTACK];
  long int a, temp, MIN = 7;
  for (;;) {
    if (ir - m < MIN) {
      for (j = m + 1; j <= ir; j++) {
        a = arr[j];
        b = brr[j];
        for (i = j - 1; i >= m; i--) {
          if (arr[i] <= a)
            break;
          arr[i + 1] = arr[i];
          brr[i + 1] = brr[i];
        }
        arr[i + 1] = a;
        brr[i + 1] = b;
      }
      if (!jstack)
        return;
      ir = istack[jstack--];
      m = istack[jstack--];
    } else {
      k = (m + ir) >> 1;
      temp = (arr[k]);
      (arr[k]) = arr[m + 1];
      (arr[m + 1]) = temp;
      ;
      temp = (brr[k]);
      (brr[k]) = brr[m + 1];
      (brr[m + 1]) = temp;
      ;
      if (arr[m] > arr[ir]) {
        temp = (arr[m]);
        (arr[m]) = arr[ir];
        (arr[ir]) = temp;
        ;
        temp = (brr[m]);
        (brr[m]) = brr[ir];
        (brr[ir]) = temp;
        ;
      }
      if (arr[m + 1] > arr[ir]) {
        temp = (arr[m + 1]);
        (arr[m + 1]) = arr[ir];
        (arr[ir]) = temp;
        ;
        temp = (brr[m + 1]);
        (brr[m + 1]) = brr[ir];
        (brr[ir]) = temp;
        ;
      }
      if (arr[m] > arr[m + 1]) {
        temp = (arr[m]);
        (arr[m]) = arr[m + 1];
        (arr[m + 1]) = temp;
        ;
        temp = (brr[m]);
        (brr[m]) = brr[m + 1];
        (brr[m + 1]) = temp;
        ;
      }
      i = m + 1;
      j = ir;
      a = arr[m + 1];
      b = brr[m + 1];
      for (;;) {
        do
          i++;
        while (arr[i] < a);
        do
          j--;
        while (arr[j] > a);
        if (j < i)
          break;
        temp = (arr[i]);
        (arr[i]) = arr[j];
        (arr[j]) = temp;
        ;
        temp = (brr[i]);
        (brr[i]) = brr[j];
        (brr[j]) = temp;
        ;
      }
      arr[m + 1] = arr[j];
      arr[j] = a;
      brr[m + 1] = brr[j];
      brr[j] = b;
      jstack += 2;
      if (jstack > NSTACK) {
        printf("Stack error: NSTACK too small\n");
        exit(0);
      }
      if (ir - i + 1 >= j - m) {
        istack[jstack] = ir;
        istack[jstack - 1] = i;
        ir = j - 1;
      } else {
        istack[jstack] = j - 1;
        istack[jstack - 1] = m;
        m = i;
      }
    }
  }
}
```