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

```asm
<indexx>:
  endbr64
  push   %r15
  mov    %edi,%r15d
  mov    $0x1,%edi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  mov    $0x32,%esi
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x28,%rsp
  call   <ivector@plt>
  mov    %rax,(%rsp)
  test   %r15d,%r15d
  jle    L6
  lea    -0x1(%r15),%eax
  cmp    $0x2,%eax
  jbe    L220
  mov    %r15d,%edx
  movdqa D10(%rip),%xmm0
  movdqa D18(%rip),%xmm2
  lea    0x4(%rbx),%rax
  shr    $0x2,%edx
  sub    $0x1,%edx
  shl    $0x4,%rdx
  lea    0x14(%rbx,%rdx,1),%rdx
L69:
  movdqa %xmm0,%xmm1
  add    $0x10,%rax
  paddd  %xmm2,%xmm0
  movups %xmm1,-0x10(%rax)
  cmp    %rax,%rdx
  jne    L69
  mov    %r15d,%edx
  and    $0xfffffffc,%edx
  lea    0x1(%rdx),%eax
  cmp    %r15d,%edx
  je     L6
L202:
  movslq %eax,%rcx
  mov    %eax,(%rbx,%rcx,4)
  lea    0x0(,%rcx,4),%rdx
  lea    0x1(%rax),%ecx
  cmp    %ecx,%r15d
  jl     L6
  add    $0x2,%eax
  mov    %ecx,0x4(%rbx,%rdx,1)
  cmp    %eax,%r15d
  jl     L6
  mov    %eax,0x8(%rbx,%rdx,1)
L6:
  xor    %r11d,%r11d
  mov    $0x1,%r13d
  mov    $0x2,%r10d
L65:
  mov    %r15d,%eax
  sub    %r13d,%eax
  cmp    $0x6,%eax
  jg     L257
L238:
  movslq %r10d,%rsi
  sub    $0x1,%rsi
  cmp    %r10d,%r15d
  jl     L186
  nopl   0x0(%rax)
L138:
  movslq 0x4(%rbx,%rsi,4),%rax
  movss  0x0(%rbp,%rax,4),%xmm0
  mov    %rax,%rdi
  test   %r13d,%r13d
  jle    L10
  movslq %r13d,%rax
  jmp    L279
  nopl   0x0(%rax)
L190:
  mov    %ecx,0x4(%rbx,%rax,4)
  lea    -0x1(%rax),%edx
  sub    $0x1,%rax
  je     L159
L279:
  movslq (%rbx,%rax,4),%rcx
  comiss 0x0(%rbp,%rcx,4),%xmm0
  jb     L190
L21:
  add    $0x1,%r13d
  mov    %edi,0x4(%rbx,%rax,4)
  add    $0x1,%rsi
  cmp    %r15d,%r13d
  jne    L138
L186:
  test   %r11d,%r11d
  je     L87
  mov    (%rsp),%rsi
  movslq %r11d,%rax
  sub    $0x2,%r11d
  mov    (%rsi,%rax,4),%r15d
  mov    -0x4(%rsi,%rax,4),%r13d
  mov    %r15d,%eax
  lea    0x1(%r13),%r10d
  sub    %r13d,%eax
  cmp    $0x6,%eax
  jle    L238
L257:
  lea    (%r15,%r13,1),%eax
  sar    %eax
  cltq
  lea    (%rbx,%rax,4),%rcx
  movslq %r13d,%rax
  lea    0x4(,%rax,4),%rdi
  mov    (%rcx),%edx
  lea    (%rbx,%rdi,1),%rax
  mov    (%rax),%esi
  mov    %esi,(%rcx)
  movslq %edx,%rcx
  movss  0x0(%rbp,%rcx,4),%xmm1
  movslq %r15d,%rcx
  mov    %edx,(%rax)
  lea    (%rbx,%rcx,4),%rsi
  movslq (%rsi),%r8
  movss  0x0(%rbp,%r8,4),%xmm0
  mov    %r8,%rcx
  comiss %xmm0,%xmm1
  jbe    L231
  mov    %r8d,(%rax)
  movaps %xmm1,%xmm0
  mov    %edx,%ecx
  mov    %edx,(%rsi)
L231:
  lea    -0x4(%rbx,%rdi,1),%rdi
  movslq (%rdi),%rdx
  mov    %rdi,0x10(%rsp)
  movss  0x0(%rbp,%rdx,4),%xmm1
  mov    %edx,0xc(%rsp)
  comiss %xmm0,%xmm1
  jbe    L124
  mov    %ecx,(%rdi)
  mov    %edx,(%rsi)
  movslq (%rdi),%rdx
  mov    %edx,0xc(%rsp)
  movss  0x0(%rbp,%rdx,4),%xmm1
L124:
  movslq (%rax),%rdx
  movd   0xc(%rsp),%xmm3
  movss  0x0(%rbp,%rdx,4),%xmm0
  movd   %edx,%xmm2
  punpckldq %xmm3,%xmm2
  comiss %xmm1,%xmm0
  jbe    L113
  mov    0x10(%rsp),%rsi
  mov    %edx,0xc(%rsp)
  movaps %xmm0,%xmm1
  movq   %xmm2,(%rsi)
L113:
  lea    0x2(%r13),%edi
  mov    %r15d,%r12d
  movslq %edi,%rdi
  nop
L13:
  movslq (%rbx,%rdi,4),%rax
  mov    %edi,%r8d
  comiss 0x0(%rbp,%rax,4),%xmm1
  mov    %rax,%rcx
  ja     L75
  movslq %r12d,%rax
  lea    -0x4(%rbx,%rax,4),%rax
  nopl   0x0(%rax)
L57:
  movslq (%rax),%r9
  mov    %r12d,%r14d
  mov    %rax,%rsi
  sub    $0x1,%r12d
  sub    $0x4,%rax
  movss  0x0(%rbp,%r9,4),%xmm0
  comiss %xmm1,%xmm0
  ja     L57
  cmp    %edi,%r12d
  jl     L141
  mov    %r9d,(%rbx,%rdi,4)
  mov    %ecx,(%rsi)
L75:
  add    $0x1,%rdi
  jmp    L13
  xchg   %ax,%ax
L159:
  movslq %edx,%rax
  jmp    L21
L10:
  mov    %rsi,%rax
  jmp    L21
L141:
  mov    0x10(%rsp),%rax
  movd   %r8d,%xmm1
  movd   %r15d,%xmm4
  add    $0x2,%r11d
  punpckldq %xmm4,%xmm1
  mov    %r9d,(%rax)
  mov    0xc(%rsp),%eax
  mov    %eax,(%rsi)
  cmp    $0x32,%r11d
  jg     L204
L164:
  mov    (%rsp),%rsi
  movslq %r11d,%rax
  sub    $0x2,%r14d
  movd   %r13d,%xmm0
  movd   %r14d,%xmm5
  sub    %r13d,%r12d
  lea    -0x4(%rsi,%rax,4),%rdx
  mov    %r15d,%eax
  punpckldq %xmm5,%xmm0
  sub    %r8d,%eax
  add    $0x1,%eax
  cmp    %r12d,%eax
  jl     L67
  movq   %xmm1,(%rdx)
  mov    %r14d,%r15d
  jmp    L65
L67:
  movq   %xmm0,(%rdx)
  mov    %r8d,%r13d
  lea    0x1(%r8),%r10d
  jmp    L65
L204:
  lea    D19(%rip),%rdi
  mov    %r10d,0x1c(%rsp)
  mov    %r11d,0x18(%rsp)
  mov    %r8d,0xc(%rsp)
  movq   %xmm1,0x10(%rsp)
  call   <nrerror@plt>
  mov    0x1c(%rsp),%r10d
  mov    0x18(%rsp),%r11d
  movq   0x10(%rsp),%xmm1
  mov    0xc(%rsp),%r8d
  jmp    L164
L87:
  mov    (%rsp),%rdi
  add    $0x28,%rsp
  mov    $0x32,%edx
  mov    $0x1,%esi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1090 <free_ivector@plt>
L220:
  mov    $0x1,%eax
  jmp    L202
```

tool_calls: name: retrieve_data
arguments: label: D10
type_infered: byte[16]
name: retrieve_data
arguments: label: D18
type_infered: byte[16]
name: retrieve_data
arguments: label: D19
type_infered: string

tool: {"D10": [0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

tool: {"D18": [0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

tool: D19: NSTACK too small in indexx.

assistant: ```c
void indexx(int n, float arr[], int indx[]) {
  int i, indxt, ir = n, itemp, j, k, l = 1;
  int jstack = 0, *istack;
  float a;
  istack = ivector(1, 50);
  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 (jstack > 50)
        nrerror("NSTACK too small in indexx.");
      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, 50);
}
```