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

```asm
<R_qsort_I>:
  endbr64
  push   %r15
  mov    %rdi,%r10
  movslq %edx,%r11
  push   %r14
  push   %r13
  lea    -0x4(%rsi),%r13
  push   %r12
  lea    -0x8(%rdi),%r12
  push   %rbp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x128,%rsp
  movsd  D4(%rip),%xmm3
  mov    %rsi,0x8(%rsp)
  mov    %edx,0x4(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x118(%rsp)
  xor    %eax,%eax
  movl   $0x1,(%rsp)
L272:
  cmp    %ebx,%r11d
  jl     L108
L55:
  mov    (%rsp),%esi
  cmp    $0x1,%esi
  je     L194
  movslq %esi,%rax
  sub    $0x1,%esi
  mov    0x90(%rsp,%rax,4),%ebx
  movslq 0x10(%rsp,%rax,4),%r11
  mov    %esi,(%rsp)
  mov    %ebx,%eax
  sub    %r11d,%eax
L35:
  cmp    $0xa,%eax
  jg     L159
  cmp    0x4(%rsp),%r11d
  je     L272
  cmp    %ebx,%r11d
  je     L55
  mov    0x8(%rsp),%rax
  lea    -0x4(%rax,%r11,4),%rsi
  jmp    L34
L171:
  add    $0x1,%r11
  add    $0x4,%rsi
  cmp    %r11d,%ebx
  je     L55
L34:
  movsd  (%r10,%r11,8),%xmm1
  movsd  -0x8(%r10,%r11,8),%xmm0
  comisd %xmm0,%xmm1
  jae    L171
  mov    0x4(%rsi),%r8d
  mov    %rsi,%rdx
  mov    %r11,%rax
  nopw   0x0(%rax,%rax,1)
L215:
  mov    (%rdx),%ecx
  mov    %rdx,%rdi
  sub    $0x4,%rdx
  mov    %ecx,0x8(%rdx)
  mov    %rax,%rcx
  movsd  %xmm0,(%r10,%rax,8)
  movsd  -0x10(%r10,%rax,8),%xmm0
  sub    $0x1,%rax
  comisd %xmm1,%xmm0
  ja     L215
  mov    %r8d,(%rdi)
  movsd  %xmm1,(%r12,%rcx,8)
  jmp    L171
  nopl   0x0(%rax)
L108:
  movsd  D15(%rip),%xmm4
  mov    %ebx,%eax
  sub    %r11d,%eax
  comisd %xmm3,%xmm4
  ja     L93
  subsd  D23(%rip),%xmm3
L159:
  pxor   %xmm0,%xmm0
  movslq %r11d,%rsi
  cvtsi2sd %eax,%xmm0
  lea    (%r12,%rsi,8),%rcx
  mulsd  %xmm3,%xmm0
  cvttsd2si %xmm0,%eax
  movsd  (%rcx),%xmm0
  add    %r11d,%eax
  cltq
  lea    0x0(%r13,%rax,4),%rdx
  lea    (%r12,%rax,8),%rax
  movsd  (%rax),%xmm2
  mov    (%rdx),%r8d
  comisd %xmm2,%xmm0
  jbe    L178
  lea    0x0(%r13,%rsi,4),%rdi
  mov    (%rdi),%r9d
  mov    %r9d,(%rdx)
  mov    %r8d,(%rdi)
  mov    (%rdx),%r8d
  movsd  %xmm0,(%rax)
  movsd  %xmm2,(%rcx)
  movsd  (%rax),%xmm2
L178:
  movslq %ebx,%r9
  lea    (%r12,%r9,8),%rdi
  movsd  (%rdi),%xmm0
  comisd %xmm0,%xmm2
  ja     L86
L249:
  mov    %ebx,%edx
  mov    %r11d,%esi
  nopl   0x0(%rax)
L166:
  lea    -0x1(%rdx),%eax
  movslq %eax,%rdi
  lea    (%r12,%rdi,8),%r8
  movsd  (%r8),%xmm0
  comisd %xmm2,%xmm0
  jbe    L25
  lea    -0x2(%rdx),%eax
  lea    -0x10(%r10,%rdi,8),%rcx
  cltq
  nopl   0x0(%rax,%rax,1)
L150:
  movsd  (%rcx),%xmm0
  mov    %eax,%edx
  mov    %rcx,%r8
  mov    %rax,%rdi
  sub    $0x8,%rcx
  sub    $0x1,%rax
  comisd %xmm2,%xmm0
  ja     L150
L201:
  lea    0x1(%rsi),%r14d
  lea    0x0(%r13,%rdi,4),%rbp
  movslq %r14d,%r9
  lea    0x2(%rsi),%ecx
  mov    0x0(%rbp),%r15d
  lea    0x0(,%r9,8),%rax
  movslq %ecx,%rcx
  lea    (%r12,%rax,1),%rdi
  add    %r10,%rax
  movsd  (%rdi),%xmm1
  comisd %xmm1,%xmm2
  jbe    L65
  nopl   0x0(%rax)
L37:
  movsd  (%rax),%xmm1
  mov    %ecx,%esi
  mov    %rax,%rdi
  mov    %rcx,%r9
  add    $0x8,%rax
  add    $0x1,%rcx
  comisd %xmm1,%xmm2
  ja     L37
  cmp    %esi,%edx
  jl     L270
L234:
  lea    0x0(%r13,%r9,4),%rax
  mov    (%rax),%ecx
  mov    %ecx,0x0(%rbp)
  mov    %r15d,(%rax)
  movsd  %xmm1,(%r8)
  movsd  %xmm0,(%rdi)
  jmp    L166
  nopl   0x0(%rax)
L65:
  mov    %r14d,%esi
  cmp    %esi,%edx
  jge    L234
  nopw   0x0(%rax,%rax,1)
L270:
  mov    %edx,%ecx
  mov    %ebx,%eax
  addl   $0x1,(%rsp)
  mov    (%rsp),%edi
  sub    %r11d,%ecx
  sub    %esi,%eax
  cmp    %eax,%ecx
  jg     L17
  movslq %edi,%rax
  mov    %ebx,0x90(%rsp,%rax,4)
  mov    %edx,%ebx
  mov    %esi,0x10(%rsp,%rax,4)
  mov    %ecx,%eax
  jmp    L35
  nopl   0x0(%rax,%rax,1)
L25:
  mov    %eax,%edx
  jmp    L201
L17:
  movslq (%rsp),%rcx
  mov    %r11d,0x10(%rsp,%rcx,4)
  movslq %esi,%r11
  mov    %edx,0x90(%rsp,%rcx,4)
  jmp    L35
L93:
  addsd  D7(%rip),%xmm3
  jmp    L159
L86:
  lea    0x0(%r13,%r9,4),%r9
  mov    (%r9),%ebp
  mov    %ebp,(%rdx)
  mov    %r8d,(%r9)
  mov    (%rdx),%r8d
  movsd  %xmm0,(%rax)
  movsd  %xmm2,(%rdi)
  movsd  (%rax),%xmm2
  movsd  (%rcx),%xmm0
  comisd %xmm2,%xmm0
  jbe    L249
  lea    0x0(%r13,%rsi,4),%rsi
  mov    (%rsi),%edi
  mov    %edi,(%rdx)
  mov    %r8d,(%rsi)
  movsd  %xmm0,(%rax)
  movsd  %xmm2,(%rcx)
  movsd  (%rax),%xmm2
  jmp    L249
L194:
  mov    0x118(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L15
  add    $0x128,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L15:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D4
data_type: f64
name: disassemble_data
arguments: data_tag: D15
data_type: f64
name: disassemble_data
arguments: data_tag: D23
data_type: f64
name: disassemble_data
arguments: data_tag: D7
data_type: f64

tool: D4: 0.375

tool: D15: 0.5898437

tool: D23: 0.21875

tool: D7: 0.0390625

assistant: ```c
void R_qsort_I(double *v, int *I, int i, int j) {
  int il[31], iu[31];
  double vt, vtt;
  double R = 0.375;
  int ii, ij, k, l, m;
  int it, tt;
  --v;
  --I;
  ii = i;
  m = 1;
L10:
  if (i < j) {
    if (R < 0.5898437)
      R += 0.0390625;
    else
      R -= 0.21875;
  L20:
    k = i;
    ij = i + (int)((j - i) * R);
    it = I[ij];
    vt = v[ij];
    if (v[i] > vt) {
      I[ij] = I[i];
      I[i] = it;
      it = I[ij];
      v[ij] = v[i];
      v[i] = vt;
      vt = v[ij];
    }
    l = j;
    if (v[j] < vt) {
      I[ij] = I[j];
      I[j] = it;
      it = I[ij];
      v[ij] = v[j];
      v[j] = vt;
      vt = v[ij];
      if (v[i] > vt) {
        I[ij] = I[i];
        I[i] = it;
        it = I[ij];
        v[ij] = v[i];
        v[i] = vt;
        vt = v[ij];
      }
    }
    for (;;) {
      l--;
      for (; v[l] > vt; l--)
        ;
      tt = I[l];
      vtt = v[l];
      k = k + 1;
      for (; v[k] < vt; k++)
        ;
      if (k > l)
        break;
      I[l] = I[k];
      I[k] = tt;
      v[l] = v[k];
      v[k] = vtt;
    }
    m++;
    if (l - i <= j - k) {
      il[m] = k;
      iu[m] = j;
      j = l;
    } else {
      il[m] = i;
      iu[m] = l;
      i = k;
    }
  } else {
  L80:
    if (m == 1)
      return;
    i = il[m];
    j = iu[m];
    m--;
  }
  if (j - i > 10)
    goto L20;
  if (i == ii)
    goto L10;
  --i;
L100:
  do {
    ++i;
    if (i == j) {
      goto L80;
    }
    it = I[i + 1];
    vt = v[i + 1];
  } while (v[i] <= vt);
  k = i;
  do {
    I[k + 1] = I[k];
    v[k + 1] = v[k];
    --k;
  } while (vt < v[k]);
  I[k + 1] = it;
  v[k + 1] = vt;
  goto L100;
}
```