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
L102:
  cmp    %rdx,%rsp
  je     L45
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L102
L45:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L200
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L200:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x38(%rbp)
  movq   $0x7,-0x30(%rbp)
L67:
  mov    -0x5c(%rbp),%eax
  sub    -0x54(%rbp),%eax
  cltq
  cmp    %rax,-0x30(%rbp)
  jle    L76
  mov    -0x54(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x58(%rbp)
  jmp    L184
L37:
  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    L227
L210:
  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    L1
  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)
L227:
  mov    -0x60(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jge    L210
  jmp    L202
L1:
  nop
L202:
  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)
L184:
  mov    -0x58(%rbp),%eax
  cmp    -0x5c(%rbp),%eax
  jle    L37
  cmpl   $0x0,-0x50(%rbp)
  jne    L42
  mov    %rbx,%rsp
  nop
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L226
  jmp    L217
L42:
  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    L67
L76:
  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    L133
  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)
L133:
  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    L145
  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)
L145:
  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    L9
  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)
L9:
  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)
L147:
  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     L147
L47:
  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     L47
  mov    -0x58(%rbp),%eax
  cmp    -0x60(%rbp),%eax
  jl     L153
  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    L147
L153:
  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    L58
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L58:
  mov    -0x5c(%rbp),%eax
  sub    -0x60(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x58(%rbp),%eax
  sub    -0x54(%rbp),%eax
  cmp    %eax,%edx
  jl     L127
  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    L67
L127:
  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    L67
L217:
  call   <__stack_chk_fail@plt>
L226:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D7
type_guessed: string

tool: D7: Stack error: NSTACK too small


assistant: ```c
void ArraySort_Mix(int n, long *arr, int *brr) {
  int i, ir = n - 1, j, k, m = 0, jstack = 0, b, NSTACK = 50, istack[NSTACK];
  long 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;
      }
    }
  }
}
```