user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  mov    %edi,-0x74(%rbp)
  mov    %rsi,-0x80(%rbp)
  mov    $0x0,%edi
  call   <time@plt>
  mov    %eax,%edi
  call   <srand@plt>
  movl   $0x0,-0x6c(%rbp)
  jmp    L11
L159:
  mov    -0x6c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x6c(%rbp),%eax
  mov    %eax,%esi
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x6c(%rbp)
L11:
  mov    -0x6c(%rbp),%eax
  cmp    -0x74(%rbp),%eax
  jl     L159
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D104(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x80(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x40(%rbp)
  mov    -0x80(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x3c(%rbp)
  mov    -0x3c(%rbp),%edx
  mov    -0x40(%rbp),%eax
  mov    %eax,%esi
  lea    D40(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x3c(%rbp),%edx
  mov    -0x40(%rbp),%eax
  mov    %eax,%esi
  mov    $0xa,%edi
  call   <vrandr@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x20(%rbp)
  movq   $0x0,-0x38(%rbp)
  jmp    L109
L41:
  mov    -0x38(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x38(%rbp),%rax
  mov    %rax,(%rdx)
  addq   $0x1,-0x38(%rbp)
L109:
  mov    -0x3c(%rbp),%eax
  cltq
  cmp    %rax,-0x38(%rbp)
  jb     L41
  lea    D59(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x68(%rbp)
  jmp    L142
L191:
  mov    -0x68(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  lea    D44(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  addl   $0x1,-0x68(%rbp)
L142:
  mov    -0x68(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L191
  mov    $0xa,%edi
  call   <putchar@plt>
  movl   $0x0,-0x64(%rbp)
  jmp    L87
L52:
  mov    -0x64(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D125(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x64(%rbp)
L87:
  mov    -0x64(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L52
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    -0x3c(%rbp),%edx
  mov    -0x20(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <fr_shellsort_double_i_@plt>
  lea    D139(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x60(%rbp)
  jmp    L268
L122:
  mov    -0x60(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  lea    D44(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  addl   $0x1,-0x60(%rbp)
L268:
  mov    -0x60(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L122
  mov    $0xa,%edi
  call   <putchar@plt>
  movl   $0x0,-0x5c(%rbp)
  jmp    L20
L185:
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D125(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x5c(%rbp)
L20:
  mov    -0x5c(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L185
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x20(%rbp),%rax
  mov    (%rax),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movl   $0x0,-0x58(%rbp)
  movl   $0x1,-0x54(%rbp)
  jmp    L244
L221:
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  ucomisd -0x30(%rbp),%xmm0
  jp     L162
  ucomisd -0x30(%rbp),%xmm0
  je     L196
L162:
  mov    -0x54(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x58(%rbp)
  jge    L133
  mov    -0x54(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x58(%rbp),%eax
  add    %edx,%eax
  add    $0x2,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  D27(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x58(%rbp),%eax
  mov    %eax,-0x50(%rbp)
  jmp    L240
L45:
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x50(%rbp)
L240:
  mov    -0x54(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jg     L45
  jmp    L187
L133:
  mov    -0x58(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x58(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %edx,%xmm0
  movsd  %xmm0,(%rax)
L187:
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x54(%rbp),%eax
  mov    %eax,-0x58(%rbp)
L196:
  addl   $0x1,-0x54(%rbp)
L244:
  mov    -0x54(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L221
  mov    -0x54(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x58(%rbp)
  jne    L22
  mov    -0x58(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x54(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L260
L22:
  mov    -0x54(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x58(%rbp),%eax
  add    %edx,%eax
  add    $0x2,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  D27(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x58(%rbp),%eax
  mov    %eax,-0x4c(%rbp)
  jmp    L75
L256:
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x4c(%rbp)
L75:
  mov    -0x54(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jg     L256
L260:
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x48(%rbp)
  jmp    L76
L46:
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  lea    D46(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  addl   $0x1,-0x48(%rbp)
L76:
  mov    -0x48(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L46
  mov    $0xa,%edi
  call   <putchar@plt>
  movl   $0x0,-0x44(%rbp)
  jmp    L182
L262:
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  lea    D101(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  addl   $0x1,-0x44(%rbp)
L182:
  mov    -0x44(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L262
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D8
type_infered: string
name: read_data
arguments: data_tag: D104
type_infered: string
name: read_data
arguments: data_tag: D40
type_infered: string
name: read_data
arguments: data_tag: D59
type_infered: string
name: read_data
arguments: data_tag: D44
type_infered: string
name: read_data
arguments: data_tag: D125
type_infered: string
name: read_data
arguments: data_tag: D139
type_infered: string
name: read_data
arguments: data_tag: D27
type_infered: f64
name: read_data
arguments: data_tag: D22
type_infered: string
name: read_data
arguments: data_tag: D46
type_infered: string
name: read_data
arguments: data_tag: D101
type_infered: string

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

tool: D104: breaking ties with average rank

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


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

tool: D44: %.0f   

tool: D125: %d    

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

tool: D27: 2

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

tool: D46:  %.0f  

tool: D101: %.1f  

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