user: Converte this assembly snippet into its equivalent C code:

```asm
<indexx>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %edi,-0x54(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %rdx,-0x68(%rbp)
  mov    -0x54(%rbp),%eax
  cltq
  mov    %rax,-0x38(%rbp)
  movq   $0x1,-0x28(%rbp)
  movl   $0x0,-0x48(%rbp)
  mov    $0x186a0,%esi
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <ivector@plt>
  cltq
  mov    %rax,-0x20(%rbp)
  movq   $0x1,-0x30(%rbp)
  jmp    L144
L181:
  mov    -0x30(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    -0x30(%rbp),%rdx
  mov    %edx,(%rax)
  addq   $0x1,-0x30(%rbp)
L144:
  mov    -0x54(%rbp),%eax
  cltq
  cmp    %rax,-0x30(%rbp)
  jbe    L181
L38:
  mov    -0x38(%rbp),%rax
  sub    -0x28(%rbp),%rax
  cmp    $0x6,%rax
  ja     L147
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x30(%rbp)
  jmp    L117
L82:
  mov    -0x30(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x44(%rbp)
  mov    -0x30(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,-0x40(%rbp)
  jmp    L162
L122:
  mov    -0x40(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  movss  -0x44(%rbp),%xmm0
  comiss %xmm1,%xmm0
  jae    L118
  mov    -0x40(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    -0x40(%rbp),%rdx
  add    $0x1,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x68(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  subq   $0x1,-0x40(%rbp)
L162:
  cmpq   $0x0,-0x40(%rbp)
  jne    L122
  jmp    L83
L118:
  nop
L83:
  mov    -0x40(%rbp),%rax
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%rdx
  mov    %edx,(%rax)
  addq   $0x1,-0x30(%rbp)
L117:
  mov    -0x30(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  jbe    L82
  cmpl   $0x0,-0x48(%rbp)
  je     L207
  mov    -0x48(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x48(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  mov    %rax,-0x38(%rbp)
  mov    -0x48(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x48(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  mov    %rax,-0x28(%rbp)
  jmp    L38
L147:
  mov    -0x28(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  shr    %rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  mov    %rax,-0x10(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x68(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    -0x10(%rbp),%rdx
  mov    %edx,(%rax)
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x38(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  comiss %xmm1,%xmm0
  jbe    L120
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  mov    %rax,-0x10(%rbp)
  mov    -0x38(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    -0x28(%rbp),%rdx
  add    $0x1,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x68(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x38(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    -0x10(%rbp),%rdx
  mov    %edx,(%rax)
L120:
  mov    -0x28(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x38(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  comiss %xmm1,%xmm0
  jbe    L47
  mov    -0x28(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  mov    %rax,-0x10(%rbp)
  mov    -0x38(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    -0x28(%rbp),%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x68(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x38(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    -0x10(%rbp),%rdx
  mov    %edx,(%rax)
L47:
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x28(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  comiss %xmm1,%xmm0
  jbe    L4
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  mov    %rax,-0x10(%rbp)
  mov    -0x28(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    -0x28(%rbp),%rdx
  add    $0x1,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x68(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x28(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    -0x10(%rbp),%rdx
  mov    %edx,(%rax)
L4:
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x28(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x44(%rbp)
L178:
  addq   $0x1,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  movss  -0x44(%rbp),%xmm0
  comiss %xmm1,%xmm0
  ja     L178
L113:
  subq   $0x1,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  comiss -0x44(%rbp),%xmm0
  ja     L113
  mov    -0x30(%rbp),%rax
  cmp    -0x40(%rbp),%rax
  jb     L81
  mov    -0x40(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  mov    %rax,-0x10(%rbp)
  mov    -0x30(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    -0x40(%rbp),%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x68(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x30(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    -0x10(%rbp),%rdx
  mov    %edx,(%rax)
  jmp    L178
L81:
  nop
  mov    -0x30(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    -0x28(%rbp),%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x68(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x30(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%rdx
  mov    %edx,(%rax)
  addl   $0x2,-0x48(%rbp)
  mov    -0x38(%rbp),%rax
  sub    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x30(%rbp),%rax
  sub    -0x28(%rbp),%rax
  cmp    %rax,%rdx
  jb     L15
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x38(%rbp),%rdx
  mov    %edx,(%rax)
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x40(%rbp),%rdx
  mov    %edx,(%rax)
  mov    -0x30(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,-0x38(%rbp)
  jmp    L38
L15:
  mov    -0x30(%rbp),%rax
  lea    -0x1(%rax),%edx
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  mov    %edx,(%rax)
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x28(%rbp),%rdx
  mov    %edx,(%rax)
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  jmp    L38
L207:
  nop
  mov    -0x20(%rbp),%rax
  mov    $0x186a0,%edx
  mov    $0x1,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <free_ivector@plt>
  nop
  leave
  ret
```

assistant: ```c
void indexx(n, arr, indx) float arr[];
int indx[], n;
{
  unsigned long i, indxt, ir = n, itemp, j, k, l = 1;
  int jstack = 0, *istack;
  float a;
  istack = ivector(1, 100000);
  for (j = 1; j <= n; j++)
    indx[j] = j;
  for (;;) {
    if (ir - l < 7) {
      for (j = l + 1; j <= ir; j++) {
        indxt = indx[j];
        a = arr[indxt];
        for (i = j - 1; i >= 1; i--) {
          if (arr[indx[i]] <= a)
            break;
          indx[i + 1] = indx[i];
        }
        indx[i + 1] = indxt;
      }
      if (jstack == 0)
        break;
      ir = istack[jstack--];
      l = istack[jstack--];
    } else {
      k = (l + ir) >> 1;
      itemp = (indx[k]);
      (indx[k]) = (indx[l + 1]);
      (indx[l + 1]) = itemp;
      ;
      if (arr[indx[l + 1]] > arr[indx[ir]]) {
        itemp = (indx[l + 1]);
        (indx[l + 1]) = (indx[ir]);
        (indx[ir]) = itemp;
      }
      if (arr[indx[l]] > arr[indx[ir]]) {
        itemp = (indx[l]);
        (indx[l]) = (indx[ir]);
        (indx[ir]) = itemp;
      }
      if (arr[indx[l + 1]] > arr[indx[l]]) {
        itemp = (indx[l + 1]);
        (indx[l + 1]) = (indx[l]);
        (indx[l]) = itemp;
      }
      i = l + 1;
      j = ir;
      indxt = indx[l];
      a = arr[indxt];
      for (;;) {
        do
          i++;
        while (arr[indx[i]] < a);
        do
          j--;
        while (arr[indx[j]] > a);
        if (j < i)
          break;
        itemp = (indx[i]);
        (indx[i]) = (indx[j]);
        (indx[j]) = itemp;
      }
      indx[l] = indx[j];
      indx[j] = indxt;
      jstack += 2;
      if (ir - i + 1 >= j - l) {
        istack[jstack] = ir;
        istack[jstack - 1] = i;
        ir = j - 1;
      } else {
        istack[jstack] = j - 1;
        istack[jstack - 1] = l;
        l = i;
      }
    }
  }
  free_ivector(istack, 1, 100000);
}
```