user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<indexx>:
  endbr64
  push   %r15
  mov    %rsi,%rcx
  mov    %rdx,%rax
  push   %r14
  push   %r13
  push   %r12
  movslq %edi,%r12
  push   %rbp
  lea    -0x1(%r12),%r9d
  push   %rbx
  test   %r12d,%r12d
  jle    L161
  cmp    $0x2,%r9d
  jbe    L108
  mov    %r12d,%esi
  movdqa D12(%rip),%xmm0
  movdqa D17(%rip),%xmm2
  lea    0x4(%rdx),%rdx
  shr    $0x2,%esi
  sub    $0x1,%esi
  shl    $0x4,%rsi
  lea    0x14(%rax,%rsi,1),%rsi
  nopl   (%rax)
L159:
  movdqa %xmm0,%xmm1
  add    $0x10,%rdx
  paddd  %xmm2,%xmm0
  movups %xmm1,-0x10(%rdx)
  cmp    %rdx,%rsi
  jne    L159
  mov    %r12d,%esi
  and    $0xfffffffc,%esi
  lea    0x1(%rsi),%edx
  cmp    %r12d,%esi
  je     L161
L153:
  movslq %edx,%rsi
  mov    %edx,(%rax,%rsi,4)
  lea    0x0(,%rsi,4),%rdi
  lea    0x1(%rdx),%esi
  cmp    %esi,%r12d
  jl     L170
  add    $0x2,%edx
  mov    %esi,0x4(%rax,%rdi,1)
  cmp    %edx,%r12d
  jl     L161
  mov    %edx,0x8(%rax,%rdi,1)
L161:
  mov    %r12d,%r13d
  sar    %r13d
  add    $0x1,%r13d
  cmp    $0x1,%r13d
  jle    L115
  nopl   0x0(%rax)
L171:
  lea    -0x1(%r13),%esi
  pxor   %xmm1,%xmm1
  movslq %esi,%rdx
  lea    (%rsi,%rsi,1),%r8d
  movslq (%rax,%rdx,4),%rdx
  mov    %rdx,%rdi
  cvtsd2ss (%rcx,%rdx,8),%xmm1
  cmp    %r8d,%r12d
  jl     L102
L112:
  mov    %esi,%r11d
  mov    %r8d,%r10d
  cvtss2sd %xmm1,%xmm1
  xchg   %ax,%ax
L143:
  movslq %r10d,%rdx
  shl    $0x2,%rdx
  lea    (%rax,%rdx,1),%rbp
  movslq 0x0(%rbp),%r14
  movsd  (%rcx,%r14,8),%xmm0
  mov    %r14,%rbx
  cmp    %r10d,%r12d
  jle    L97
  lea    0x4(%rax,%rdx,1),%rdx
  movslq (%rdx),%r15
  movsd  (%rcx,%r15,8),%xmm2
  comisd %xmm0,%xmm2
  jbe    L97
  add    $0x1,%r10d
  movapd %xmm2,%xmm0
  mov    %r15d,%ebx
  mov    %rdx,%rbp
L97:
  comisd %xmm1,%xmm0
  movslq %r11d,%rdx
  lea    (%rax,%rdx,4),%rdx
  ja     L28
L61:
  mov    %edi,(%rdx)
  cmp    $0x1,%r13d
  jg     L102
L202:
  movslq %r12d,%rdx
  pxor   %xmm0,%xmm0
  lea    (%rax,%rdx,4),%rdx
  movslq (%rdx),%r10
  cvtsd2ss (%rcx,%r10,8),%xmm0
  mov    %r10,%rdi
  mov    0x4(%rax),%r10d
  mov    %r10d,(%rdx)
  cmp    $0x1,%r9d
  jne    1040 <indexx.cold>
L60:
  pop    %rbx
  pop    %rbp
  mov    %edi,0x4(%rax)
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L28:
  mov    %ebx,(%rdx)
  lea    (%r10,%r10,1),%edx
  cmp    %edx,%r12d
  jl     L132
  mov    %r10d,%r11d
  mov    %edx,%r10d
  jmp    L143
  cs nopw 0x0(%rax,%rax,1)
L102:
  mov    %esi,%r13d
  cmp    $0x1,%r13d
  jg     L171
L115:
  lea    (%rax,%r12,4),%rdx
  pxor   %xmm1,%xmm1
  movslq %r9d,%r12
  movslq (%rdx),%rsi
  cvtsd2ss (%rcx,%rsi,8),%xmm1
  mov    %rsi,%rdi
  mov    0x4(%rax),%esi
  mov    %esi,(%rdx)
  cmp    $0x1,%r9d
  je     L60
  movslq %r13d,%rdx
  lea    0x0(%r13,%r13,1),%r8d
  lea    (%rax,%rdx,4),%rdx
  cmp    %r9d,%r8d
  jg     L181
  mov    %r13d,%esi
  sub    $0x1,%r9d
  jmp    L112
  nopl   0x0(%rax,%rax,1)
L132:
  mov    %rbp,%rdx
  jmp    L61
L181:
  mov    %edi,(%rdx)
  mov    %r13d,%esi
  sub    $0x1,%r9d
  jmp    L202
L170:
  cmp    $0x1,%r12d
  jne    L161
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L108:
  mov    $0x1,%edx
  jmp    L153
```

tool_calls: name: disassemble_data
arguments: label: D12
type_guessed: byte[16]
name: disassemble_data
arguments: label: D17
type_guessed: byte[16]

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

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

assistant: ```c
void indexx(int n, double arrin[], int indx[]) {
  int l, j, ir, indxt, i;
  float q;
  for (j = 1; j <= n; j++)
    indx[j] = j;
  if (n == 1)
    return;
  l = (n >> 1) + 1;
  ir = n;
  for (;;) {
    if (l > 1)
      q = arrin[(indxt = indx[--l])];
    else {
      q = arrin[(indxt = indx[ir])];
      indx[ir] = indx[1];
      if (--ir == 1) {
        indx[1] = indxt;
        return;
      }
    }
    i = l;
    j = l << 1;
    while (j <= ir) {
      if (j < ir && arrin[indx[j]] < arrin[indx[j + 1]])
        j++;
      if (q < arrin[indx[j]]) {
        indx[i] = indx[j];
        j += (i = j);
      } else
        j = ir + 1;
    }
    indx[i] = indxt;
  }
}
```