user: 请从给定的汇编指令推导出C源代码：

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  movslq %edi,%rbp
  xor    %edi,%edi
  push   %rbx
  sub    $0x38,%rsp
  call   <time@plt>
  mov    %eax,%edi
  call   <srand@plt>
  test   %ebp,%ebp
  jle    L168
  xor    %ebx,%ebx
  lea    D160(%rip),%r13
  nopl   0x0(%rax,%rax,1)
L67:
  mov    (%r12,%rbx,8),%rdx
  mov    %ebx,%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <printf@plt>
  cmp    %rbp,%rbx
  jne    L67
L168:
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D110(%rip),%rdi
  call   <puts@plt>
  mov    0x8(%r12),%rdi
  call   <atoi@plt>
  mov    0x10(%r12),%rdi
  mov    %eax,%ebp
  call   <atoi@plt>
  mov    %ebp,%esi
  lea    D81(%rip),%rdi
  movslq %eax,%r12
  xor    %eax,%eax
  mov    %r12d,%edx
  mov    %r12,%r13
  call   <printf@plt>
  mov    %r12d,%edx
  mov    %ebp,%esi
  mov    $0xa,%edi
  call   <vrandr@plt>
  mov    %rax,0x18(%rsp)
  lea    0x0(,%r12,8),%eax
  mov    %eax,%edi
  mov    %eax,0x2c(%rsp)
  call   <malloc@plt>
  mov    %rax,0x20(%rsp)
  test   %r12,%r12
  je     L243
  mov    %rax,%rbp
  mov    %rax,%rdx
  xor    %eax,%eax
  nopl   0x0(%rax,%rax,1)
L239:
  mov    %rax,(%rdx)
  add    $0x1,%rax
  add    $0x8,%rdx
  cmp    %rax,%r12
  jne    L239
  lea    D52(%rip),%rdi
  call   <puts@plt>
  test   %r13d,%r13d
  jle    L187
  mov    0x18(%rsp),%rbx
  lea    -0x1(%r13),%eax
  lea    D134(%rip),%r15
  lea    0x0(,%rax,8),%r14
  lea    0x8(%rbx,%r14,1),%rax
  mov    %rbx,%r12
  mov    %rax,0x10(%rsp)
  nopw   0x0(%rax,%rax,1)
L81:
  movsd  (%rbx),%xmm0
  mov    %r15,%rdi
  mov    $0x1,%eax
  add    $0x8,%rbx
  call   <printf@plt>
  cmp    0x10(%rsp),%rbx
  jne    L81
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    0x20(%rsp),%rbx
  lea    0x8(%rbx,%r14,1),%rax
  lea    D69(%rip),%r14
  mov    %rax,0x8(%rsp)
  nopl   0x0(%rax)
L157:
  mov    (%rbx),%rsi
  mov    %r14,%rdi
  xor    %eax,%eax
  add    $0x8,%rbx
  call   <printf@plt>
  cmp    0x8(%rsp),%rbx
  jne    L157
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    0x18(%rsp),%rdi
  mov    0x20(%rsp),%rsi
  mov    %r13d,%edx
  call   <fr_shellsort_double_i_@plt>
  lea    D124(%rip),%rdi
  call   <puts@plt>
  nopl   0x0(%rax,%rax,1)
L53:
  movsd  (%r12),%xmm0
  mov    %r15,%rdi
  mov    $0x1,%eax
  add    $0x8,%r12
  call   <printf@plt>
  cmp    0x10(%rsp),%r12
  jne    L53
  mov    $0xa,%edi
  call   <putchar@plt>
  nopl   0x0(%rax,%rax,1)
L240:
  mov    0x0(%rbp),%rsi
  mov    %r14,%rdi
  xor    %eax,%eax
  add    $0x8,%rbp
  call   <printf@plt>
  cmp    0x8(%rsp),%rbp
  jne    L240
L151:
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    0x2c(%rsp),%edi
  call   <malloc@plt>
  mov    0x20(%rsp),%rcx
  mov    0x18(%rsp),%rsi
  mov    %rax,%rbp
  mov    (%rcx),%rax
  movsd  (%rsi,%rax,8),%xmm0
  cmp    $0x1,%r13d
  jle    L63
  lea    0x8(%rcx),%r9
  movsd  D84(%rip),%xmm1
  xor    %edi,%edi
  xor    %eax,%eax
  mov    %r9,%rsi
  mov    $0x1,%ecx
  jmp    L170
  nopl   (%rax)
L161:
  movslq %eax,%rdx
  pxor   %xmm0,%xmm0
  add    $0x1,%eax
  mov    0x20(%rsp),%rbx
  cvtsi2sd %eax,%xmm0
  mov    (%rbx,%rdx,8),%rdx
  movsd  %xmm0,0x0(%rbp,%rdx,8)
L70:
  movsd  (%r8),%xmm0
  movslq %ecx,%rax
L177:
  lea    0x1(%rcx),%edx
  add    $0x1,%rdi
  add    $0x8,%rsi
  cmp    %edx,%r13d
  je     L249
  mov    %edx,%ecx
L170:
  mov    (%rsi),%rdx
  mov    0x18(%rsp),%rbx
  lea    (%rbx,%rdx,8),%r8
  ucomisd (%r8),%xmm0
  jp     L261
  je     L177
L261:
  cmp    %edi,%eax
  jge    L161
  lea    0x2(%rax,%rdi,1),%edx
  pxor   %xmm0,%xmm0
  cvtsi2sd %edx,%xmm0
  mulsd  %xmm1,%xmm0
  cmp    %ecx,%eax
  jge    L70
  mov    %ecx,%r11d
  movslq %eax,%r10
  mov    0x20(%rsp),%rdx
  sub    %eax,%r11d
  lea    -0x1(%r11),%eax
  lea    (%rdx,%r10,8),%rdx
  add    %r10,%rax
  lea    (%r9,%rax,8),%r10
  nopl   0x0(%rax)
L233:
  mov    (%rdx),%rax
  add    $0x8,%rdx
  movsd  %xmm0,0x0(%rbp,%rax,8)
  cmp    %rdx,%r10
  jne    L233
  jmp    L70
  nopl   0x0(%rax)
L249:
  cmp    %ecx,%eax
  je     L223
  lea    0x2(%rax,%rcx,1),%edx
  pxor   %xmm0,%xmm0
  cvtsi2sd %edx,%xmm0
  mulsd  D84(%rip),%xmm0
  cmp    %r13d,%eax
  jge    L259
  mov    0x20(%rsp),%rsi
  movslq %eax,%rdx
  lea    (%rsi,%rdx,8),%rdx
  nopl   (%rax)
L172:
  mov    (%rdx),%rsi
  add    $0x8,%rdx
  movsd  %xmm0,0x0(%rbp,%rsi,8)
  mov    %eax,%esi
  add    $0x1,%eax
  cmp    %esi,%ecx
  jg     L172
L259:
  lea    D38(%rip),%rdi
  call   <puts@plt>
L165:
  lea    -0x1(%r13),%r14d
  mov    0x18(%rsp),%rbx
  lea    D27(%rip),%r12
  shl    $0x3,%r14
  lea    0x8(%r14,%rbx,1),%r13
  nopl   0x0(%rax,%rax,1)
L50:
  movsd  (%rbx),%xmm0
  mov    %r12,%rdi
  mov    $0x1,%eax
  add    $0x8,%rbx
  call   <printf@plt>
  cmp    %rbx,%r13
  jne    L50
  mov    $0xa,%edi
  lea    0x8(%r14,%rbp,1),%r12
  lea    D48(%rip),%rbx
  call   <putchar@plt>
  nopl   0x0(%rax,%rax,1)
L232:
  movsd  0x0(%rbp),%xmm0
  mov    %rbx,%rdi
  mov    $0x1,%eax
  add    $0x8,%rbp
  call   <printf@plt>
  cmp    %rbp,%r12
  jne    L232
L205:
  mov    $0xa,%edi
  call   <putchar@plt>
  add    $0x38,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L223:
  pxor   %xmm0,%xmm0
  mov    0x20(%rsp),%rcx
  lea    D38(%rip),%rdi
  cvtsi2sd %r13d,%xmm0
  mov    (%rcx,%rax,8),%rax
  movsd  %xmm0,0x0(%rbp,%rax,8)
  call   <puts@plt>
  jmp    L165
L63:
  mov    D120(%rip),%rcx
  lea    D38(%rip),%rdi
  mov    %rcx,0x0(%rbp,%rax,8)
  call   <puts@plt>
  test   %r13d,%r13d
  jg     L165
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L205
L243:
  lea    D52(%rip),%rdi
  call   <puts@plt>
L187:
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    0x20(%rsp),%rsi
  mov    0x18(%rsp),%rdi
  mov    %r13d,%edx
  call   <fr_shellsort_double_i_@plt>
  lea    D124(%rip),%rdi
  call   <puts@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  jmp    L151
```

tool_calls: name: parse_data
arguments: tag: D160
type_infered: string
name: parse_data
arguments: tag: D110
type_infered: string
name: parse_data
arguments: tag: D81
type_infered: string
name: parse_data
arguments: tag: D52
type_infered: string
name: parse_data
arguments: tag: D134
type_infered: string
name: parse_data
arguments: tag: D69
type_infered: string
name: parse_data
arguments: tag: D124
type_infered: string
name: parse_data
arguments: tag: D84
type_infered: f32[2]
name: parse_data
arguments: tag: D38
type_infered: string
name: parse_data
arguments: tag: D27
type_infered: string
name: parse_data
arguments: tag: D48
type_infered: string
name: parse_data
arguments: tag: D120
type_infered: f64

tool: D160: argv[%d]: %s   

tool: D110: breaking ties with average rank

tool: D81: random vector:  max: %d   n: %d


tool: D52: before fr_shellsort_double_i_: x[] and indx[]

tool: D134: %.0f   

tool: D69: %d    

tool: D124: after fr_shellsort_double_i_: x[] and indx[]

tool: {"D84": [0.0,1.75]}

tool: D38: after average ranking: x[] and indx[]

tool: D27:  %.0f  

tool: D48: %.1f  

tool: D120: 1

assistant: ```c
int main(int argc, char *argv[]) {
  srand(time(NULL));
  for (int i = 0; i < argc; ++i)
    printf("argv[%d]: %s   ", i, argv[i]);
  putchar('\n');
  printf("breaking ties with average rank\n");
  int max = atoi(argv[1]);
  int n = atoi(argv[2]);
  printf("random vector:  max: %d   n: %d\n", max, n);
  double *x = vrandr(10, max, n);
  size_t *indx = (size_t *)malloc(n * sizeof(size_t));
  for (size_t i = 0; i < n; ++i)
    indx[i] = i;
  printf("before fr_shellsort_double_i_: x[] and indx[]\n");
  for (int i = 0; i < n; ++i)
    printf("%.0f   ", x[i]);
  putchar('\n');
  for (int i = 0; i < n; ++i)
    printf("%d    ", indx[i]);
  putchar('\n');
  fr_shellsort_double_i_(x, indx, n);
  printf("after fr_shellsort_double_i_: x[] and indx[]\n");
  for (int i = 0; i < n; ++i)
    printf("%.0f   ", x[i]);
  putchar('\n');
  for (int i = 0; i < n; ++i)
    printf("%d    ", indx[i]);
  putchar('\n');
  double *ranks = (double *)malloc(n * sizeof(double));
  double b = x[indx[0]];
  int ib = 0;
  int i;
  for (i = 1; i < n; ++i) {
    if (x[indx[i]] != b) {
      if (ib < i - 1) {
        double rnk = (i - 1 + ib + 2) / 2.0;
        for (int j = ib; j <= i - 1; ++j)
          ranks[indx[j]] = rnk;
      } else {
        ranks[indx[ib]] = ib + 1;
      }
      b = x[indx[i]];
      ib = i;
    }
  }
  if (ib == i - 1)
    ranks[indx[ib]] = i;
  else {
    double rnk = (i - 1 + ib + 2) / 2.0;
    for (int j = ib; j <= i - 1; ++j)
      ranks[indx[j]] = rnk;
  }
  printf("after average ranking: x[] and indx[]\n");
  for (int i = 0; i < n; ++i)
    printf(" %.0f  ", x[i]);
  putchar('\n');
  for (int i = 0; i < n; ++i)
    printf("%.1f  ", ranks[i]);
  putchar('\n');
}
```