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

```asm
<R_qsort_I>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x128,%rsp
  mov    %rdi,%r10
  mov    %rsi,0x8(%rsp)
  mov    %edx,0x4(%rsp)
  mov    %ecx,%ebp
  mov    %fs:0x28,%rax
  mov    %rax,0x118(%rsp)
  xor    %eax,%eax
  lea    -0x8(%rdi),%r12
  lea    -0x4(%rsi),%r13
  mov    %edx,%r11d
  movl   $0x1,(%rsp)
  movsd  D33(%rip),%xmm3
L27:
  cmp    %ebp,%r11d
  jl     L44
L157:
  mov    (%rsp),%ebx
  cmp    $0x1,%ebx
  je     L226
  movslq %ebx,%rax
  mov    0x10(%rsp,%rax,4),%r11d
  mov    0x90(%rsp,%rax,4),%ebp
  sub    $0x1,%ebx
  mov    %ebx,(%rsp)
L1:
  mov    %ebp,%eax
  sub    %r11d,%eax
  cmp    $0xa,%eax
  jg     L39
  cmp    0x4(%rsp),%r11d
  je     L27
  cmp    %ebp,%r11d
  je     L157
  movslq %r11d,%rax
  mov    0x8(%rsp),%rbx
  lea    -0x4(%rbx,%rax,4),%rdi
  lea    -0x8(%r10,%rax,8),%rcx
  jmp    L152
L44:
  movsd  D20(%rip),%xmm4
  comisd %xmm3,%xmm4
  jbe    L140
  addsd  D29(%rip),%xmm3
L39:
  mov    %ebp,%eax
  sub    %r11d,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  %xmm3,%xmm0
  cvttsd2si %xmm0,%eax
  add    %r11d,%eax
  cltq
  lea    0x0(%r13,%rax,4),%rdx
  mov    (%rdx),%r8d
  lea    (%r12,%rax,8),%rax
  movsd  (%rax),%xmm1
  movslq %r11d,%rdi
  lea    (%r12,%rdi,8),%rcx
  movsd  (%rcx),%xmm0
  comisd %xmm1,%xmm0
  jbe    L121
  lea    0x0(%r13,%rdi,4),%rsi
  mov    (%rsi),%r9d
  mov    %r9d,(%rdx)
  mov    %r8d,(%rsi)
  mov    (%rdx),%r8d
  movsd  (%rcx),%xmm0
  movsd  %xmm0,(%rax)
  movsd  %xmm1,(%rcx)
  movsd  (%rax),%xmm1
L121:
  movslq %ebp,%r9
  lea    (%r12,%r9,8),%rsi
  comisd (%rsi),%xmm1
  jbe    L163
  lea    0x0(%r13,%r9,4),%r9
  mov    (%r9),%ebx
  mov    %ebx,(%rdx)
  mov    %r8d,(%r9)
  mov    (%rdx),%r8d
  movsd  (%rsi),%xmm0
  movsd  %xmm0,(%rax)
  movsd  %xmm1,(%rsi)
  movsd  (%rax),%xmm1
  movsd  (%rcx),%xmm0
  comisd %xmm1,%xmm0
  jbe    L163
  lea    0x0(%r13,%rdi,4),%rsi
  mov    (%rsi),%edi
  mov    %edi,(%rdx)
  mov    %r8d,(%rsi)
  movsd  (%rcx),%xmm0
  movsd  %xmm0,(%rax)
  movsd  %xmm1,(%rcx)
  movsd  (%rax),%xmm1
L163:
  mov    %ebp,%edx
  mov    %r11d,%edi
L6:
  lea    -0x1(%rdx),%eax
  movslq %eax,%rsi
  lea    (%r12,%rsi,8),%r8
  movsd  (%r8),%xmm0
  comisd %xmm1,%xmm0
  jbe    L154
  lea    -0x2(%rdx),%eax
  cltq
  lea    -0x10(%r10,%rsi,8),%rcx
L262:
  mov    %eax,%edx
  mov    %rcx,%r8
  movsd  (%rcx),%xmm0
  mov    %rax,%rsi
  sub    $0x1,%rax
  sub    $0x8,%rcx
  comisd %xmm1,%xmm0
  ja     L262
L132:
  lea    0x0(%r13,%rsi,4),%rbx
  mov    (%rbx),%r15d
  lea    0x1(%rdi),%r14d
  movslq %r14d,%r9
  lea    0x0(,%r9,8),%rcx
  lea    (%r12,%rcx,1),%rsi
  lea    0x2(%rdi),%eax
  cltq
  add    %r10,%rcx
  comisd (%rsi),%xmm1
  jbe    L238
L5:
  mov    %eax,%edi
  mov    %rcx,%rsi
  mov    %rax,%r9
  add    $0x1,%rax
  add    $0x8,%rcx
  comisd (%rsi),%xmm1
  ja     L5
L76:
  cmp    %edx,%edi
  jg     L204
  lea    0x0(%r13,%r9,4),%rax
  mov    (%rax),%ecx
  mov    %ecx,(%rbx)
  mov    %r15d,(%rax)
  movsd  (%rsi),%xmm2
  movsd  %xmm2,(%r8)
  movsd  %xmm0,(%rsi)
  jmp    L6
L140:
  subsd  D24(%rip),%xmm3
  jmp    L39
L154:
  mov    %eax,%edx
  jmp    L132
L238:
  mov    %r14d,%edi
  jmp    L76
L204:
  addl   $0x1,(%rsp)
  mov    (%rsp),%ebx
  mov    %edx,%ecx
  sub    %r11d,%ecx
  mov    %ebp,%eax
  sub    %edi,%eax
  cmp    %eax,%ecx
  jg     L184
  movslq %ebx,%rax
  mov    %edi,0x10(%rsp,%rax,4)
  mov    %ebp,0x90(%rsp,%rax,4)
  mov    %edx,%ebp
  jmp    L1
L184:
  movslq (%rsp),%rax
  mov    %r11d,0x10(%rsp,%rax,4)
  mov    %edx,0x90(%rsp,%rax,4)
  mov    %edi,%r11d
  jmp    L1
L16:
  add    $0x1,%r11d
  add    $0x4,%rdi
  add    $0x8,%rcx
  cmp    %r11d,%ebp
  je     L157
L152:
  movsd  0x8(%rcx),%xmm0
  comisd (%rcx),%xmm0
  jae    L16
  mov    0x4(%rdi),%r9d
  mov    %rcx,%rdx
  mov    %rdi,%rax
L133:
  mov    %rax,%r8
  mov    (%rax),%esi
  mov    %esi,0x4(%rax)
  mov    %rdx,%rsi
  movsd  (%rdx),%xmm1
  movsd  %xmm1,0x8(%rdx)
  sub    $0x4,%rax
  sub    $0x8,%rdx
  movsd  -0x8(%rsi),%xmm1
  comisd %xmm0,%xmm1
  ja     L133
  mov    %r9d,(%r8)
  movsd  %xmm0,(%rsi)
  jmp    L16
L226:
  mov    0x118(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L49
  add    $0x128,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L49:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D33
type_guessed: f64
name: read_data
arguments: data_label: D20
type_guessed: f64
name: read_data
arguments: data_label: D29
type_guessed: f64
name: read_data
arguments: data_label: D24
type_guessed: f64

tool: D33: 0.375

tool: D20: 0.5898437

tool: D29: 0.0390625

tool: D24: 0.21875

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;
}
```