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

```asm
<fquickSortIdx>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x978,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x968(%rsp)
  xor    %eax,%eax
  movl   $0x0,(%rsp)
  mov    %edx,0x4b0(%rsp)
  mov    $0x0,%r12d
L134:
  movslq %r12d,%rax
  mov    (%rsp,%rax,4),%esi
  mov    0x4b0(%rsp,%rax,4),%r10d
  lea    -0x1(%r10),%ecx
  cmp    %ecx,%esi
  jl     L91
  sub    $0x1,%r12d
L102:
  test   %r12d,%r12d
  js     L151
  cmp    $0x12a,%r12d
  jle    L134
  lea    D7(%rip),%rdi
  call   <error@plt>
  jmp    L134
L91:
  movslq %esi,%rax
  movss  (%rbx,%rax,4),%xmm0
  mov    0x0(%rbp,%rax,4),%r11d
  jmp    L163
L169:
  mov    %edi,%esi
  jmp    L60
L66:
  mov    0x0(%rbp,%r15,1),%eax
  mov    %eax,0x0(%rbp,%r13,1)
  sub    $0x1,%ecx
  movss  (%r14),%xmm1
  movss  %xmm1,(%r9)
  cmp    %esi,%ecx
  jle    L82
L163:
  movslq %ecx,%rax
  lea    0x0(,%rax,4),%r13
  lea    (%rbx,%r13,1),%r9
  movss  (%r9),%xmm1
  comiss %xmm0,%xmm1
  jb     L76
  cmp    %ecx,%esi
  jge    L76
  lea    -0x1(%rcx),%edx
  movslq %edx,%rdx
  lea    -0x4(%rbx,%rax,4),%rax
L81:
  mov    %edx,%ecx
  lea    0x0(,%rdx,4),%r13
  mov    %rax,%r9
  movss  (%rax),%xmm1
  comiss %xmm0,%xmm1
  setae  %r8b
  cmp    %edx,%esi
  setl   %dil
  sub    $0x1,%rdx
  sub    $0x4,%rax
  test   %dil,%r8b
  jne    L81
L76:
  cmp    %ecx,%esi
  jge    L82
  movslq %esi,%rax
  lea    0x0(,%rax,4),%rdx
  mov    0x0(%rbp,%r13,1),%edi
  mov    %edi,0x0(%rbp,%rax,4)
  lea    0x1(%rsi),%edi
  movss  (%r9),%xmm1
  movss  %xmm1,(%rbx,%rax,4)
  lea    0x4(%rdx),%r15
  lea    (%rbx,%r15,1),%r14
  comiss (%r14),%xmm0
  jb     L169
  cmp    %ecx,%edi
  jge    L169
  lea    0x2(%rsi),%eax
  cltq
  lea    0x8(%rbx,%rdx,1),%rdx
L92:
  mov    %eax,%esi
  lea    0x0(,%rax,4),%r15
  mov    %rdx,%r14
  comiss (%rdx),%xmm0
  setae  %r8b
  cmp    %eax,%ecx
  setg   %dil
  add    $0x1,%rax
  add    $0x4,%rdx
  test   %dil,%r8b
  jne    L92
L60:
  cmp    %ecx,%esi
  jl     L66
L82:
  movslq %esi,%rax
  movss  %xmm0,(%rbx,%rax,4)
  mov    %r11d,0x0(%rbp,%rax,4)
  lea    0x1(%r12),%ecx
  lea    0x1(%rsi),%edx
  movslq %ecx,%rax
  mov    %edx,(%rsp,%rax,4)
  mov    %r10d,0x4b0(%rsp,%rax,4)
  movslq %r12d,%rdi
  mov    %esi,0x4b0(%rsp,%rdi,4)
  mov    0x4b0(%rsp,%rax,4),%eax
  mov    (%rsp,%rdi,4),%edi
  mov    %eax,%r9d
  sub    %edx,%r9d
  mov    %esi,%r8d
  sub    %edi,%r8d
  cmp    %r8d,%r9d
  jle    L22
  movslq %ecx,%r8
  mov    %edi,(%rsp,%r8,4)
  movslq %r12d,%r12
  mov    %edx,(%rsp,%r12,4)
  mov    %esi,0x4b0(%rsp,%r8,4)
  mov    %eax,0x4b0(%rsp,%r12,4)
  mov    %ecx,%r12d
  jmp    L102
L22:
  mov    %ecx,%r12d
  jmp    L102
L151:
  mov    0x968(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L64
  add    $0x978,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L64:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D7
data_type: string

tool: D7: sort overflow

assistant: ```c
void fquickSortIdx(float *arr, int *idx, int elements) {
  int beg[(300)], end[(300)], i = 0, L, R, swap;
  float piv;
  int ipiv;
  beg[0] = 0;
  end[0] = elements;
  while (i >= 0) {
    if (i > (300) - 2)
      error("sort overflow");
    L = beg[i];
    R = end[i] - 1;
    if (L < R) {
      piv = arr[L];
      ipiv = idx[L];
      while (L < R) {
        while (arr[R] >= piv && L < R)
          R--;
        if (L < R) {
          idx[L] = idx[R];
          arr[L++] = arr[R];
        }
        while (arr[L] <= piv && L < R)
          L++;
        if (L < R) {
          idx[R] = idx[L];
          arr[R--] = arr[L];
        }
      }
      arr[L] = piv;
      idx[L] = ipiv;
      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--;
    }
  }
}
```