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    $0x18,%rsp
  call   <time@plt>
  mov    %eax,%edi
  call   <srand@plt>
  test   %ebp,%ebp
  jle    L67
  xor    %ebx,%ebx
  lea    D96(%rip),%r13
  nopl   0x0(%rax,%rax,1)
L304:
  mov    (%r12,%rbx,8),%rdx
  mov    %ebx,%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <printf@plt>
  cmp    %rbp,%rbx
  jne    L304
L67:
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D69(%rip),%rdi
  call   <puts@plt>
  mov    0x8(%r12),%rdi
  call   <atoi@plt>
  mov    0x10(%r12),%rdi
  mov    %eax,%r13d
  call   <atoi@plt>
  mov    %r13d,%esi
  lea    D115(%rip),%rdi
  mov    %eax,%edx
  mov    %eax,%ebp
  xor    %eax,%eax
  call   <printf@plt>
  mov    %ebp,%edx
  mov    %r13d,%esi
  mov    $0xa,%edi
  call   <vrandi@plt>
  mov    %rax,%r12
  test   %ebp,%ebp
  jle    L339
  mov    %rax,%rbx
  lea    -0x1(%rbp),%eax
  lea    D5(%rip),%r13
  mov    %rax,%r15
  lea    0x4(%r12,%rax,4),%r14
  nopw   0x0(%rax,%rax,1)
L147:
  mov    (%rbx),%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x4,%rbx
  call   <printf@plt>
  cmp    %r14,%rbx
  jne    L147
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    0x0(,%rbp,4),%edi
  call   <malloc@plt>
  mov    %rax,%r13
  cmp    $0x2,%r15d
  jbe    L2
  mov    %ebp,%edx
  movdqa D18(%rip),%xmm0
  movdqa D25(%rip),%xmm2
  shr    $0x2,%edx
  shl    $0x4,%rdx
  add    %rax,%rdx
  nopl   0x0(%rax)
L289:
  movdqa %xmm0,%xmm1
  add    $0x10,%rax
  paddd  %xmm2,%xmm0
  movups %xmm1,-0x10(%rax)
  cmp    %rdx,%rax
  jne    L289
  mov    %ebp,%eax
  and    $0xfffffffc,%eax
  test   $0x3,%bpl
  je     L138
L219:
  movslq %eax,%rdx
  mov    %eax,0x0(%r13,%rdx,4)
  lea    0x0(,%rdx,4),%rcx
  lea    0x1(%rax),%edx
  cmp    %edx,%ebp
  jle    L179
  add    $0x2,%eax
  mov    %edx,0x4(%rcx,%r13,1)
  cmp    %ebp,%eax
  jge    L138
  mov    %eax,0x8(%rcx,%r13,1)
L138:
  mov    %ebp,%edx
  mov    %r13,%rsi
  lea    0x0(,%rbp,8),%r14d
  mov    %r12,%rdi
  call   <iquicksort_I@plt>
  mov    %r14d,%edi
  call   <malloc@plt>
  mov    %r14d,%edi
  mov    %rax,%rbx
  call   <malloc@plt>
  mov    (%r12),%esi
  mov    %rax,%rdx
L6:
  mov    %rbx,0x8(%rsp)
  movslq %ebp,%r14
  mov    $0x1,%ecx
  xor    %edi,%edi
  movsd  D15(%rip),%xmm2
  xor    %eax,%eax
  jmp    L123
  cs nopw 0x0(%rax,%rax,1)
L338:
  movslq %eax,%rsi
  pxor   %xmm0,%xmm0
  add    $0x1,%eax
  cvtsi2sd %eax,%xmm0
  mov    %ecx,%eax
  movsd  %xmm0,(%rdx,%rsi,8)
  mov    %r8d,%esi
L328:
  add    $0x1,%rcx
  add    $0x1,%edi
  cmp    %rcx,%r14
  je     L22
L123:
  mov    (%r12,%rcx,4),%r8d
  mov    %ecx,%r11d
  cmp    %esi,%r8d
  je     L328
  cmp    %eax,%edi
  jle    L338
  lea    0x2(%rax,%rdi,1),%esi
  pxor   %xmm0,%xmm0
  cvtsi2sd %esi,%xmm0
  mulsd  %xmm2,%xmm0
  cmp    %ecx,%eax
  jge    L88
  mov    %ecx,%ebx
  sub    %eax,%ebx
  cmp    $0x1,%ebx
  je     L31
  movslq %eax,%rsi
  movapd %xmm0,%xmm1
  lea    (%rdx,%rsi,8),%r9
  mov    %ebx,%esi
  unpcklpd %xmm1,%xmm1
  shr    %esi
  lea    -0x1(%rsi),%r10d
  lea    0x10(%r9),%rsi
  shl    $0x4,%r10
  add    %rsi,%r10
  jmp    L95
  nopl   (%rax)
L326:
  add    $0x10,%rsi
L95:
  movups %xmm1,(%r9)
  mov    %rsi,%r9
  cmp    %rsi,%r10
  jne    L326
  mov    %ebx,%esi
  and    $0xfffffffe,%esi
  add    %esi,%eax
  cmp    %esi,%ebx
  je     L109
L31:
  cltq
  movsd  %xmm0,(%rdx,%rax,8)
L109:
  add    $0x1,%rcx
  mov    %r11d,%eax
  mov    %r8d,%esi
  add    $0x1,%edi
  cmp    %rcx,%r14
  jne    L123
  nopl   0x0(%rax,%rax,1)
L22:
  mov    0x8(%rsp),%rbx
  movslq %r15d,%rcx
  cmp    %r15d,%eax
  je     L153
  lea    0x2(%rax,%r15,1),%ecx
  pxor   %xmm0,%xmm0
  cvtsi2sd %ecx,%xmm0
  mulsd  D15(%rip),%xmm0
  cmp    %ebp,%eax
  jge    L335
  mov    %ebp,%ecx
  mov    $0x1,%r8d
  sub    %eax,%ecx
  cmp    %r15d,%eax
  cmovle %ecx,%r8d
  sub    $0x1,%ecx
  je     L325
  cmp    %r15d,%eax
  jg     L325
  movslq %eax,%rcx
  movapd %xmm0,%xmm1
  lea    (%rdx,%rcx,8),%rsi
  mov    %r8d,%ecx
  unpcklpd %xmm1,%xmm1
  shr    %ecx
  lea    -0x1(%rcx),%edi
  lea    0x10(%rsi),%rcx
  shl    $0x4,%rdi
  add    %rcx,%rdi
  jmp    L56
  nopl   0x0(%rax)
L146:
  add    $0x10,%rcx
L56:
  movups %xmm1,(%rsi)
  mov    %rcx,%rsi
  cmp    %rcx,%rdi
  jne    L146
  mov    %r8d,%ecx
  and    $0xfffffffe,%ecx
  add    %ecx,%eax
  cmp    %r8d,%ecx
  je     L335
L325:
  cltq
  movsd  %xmm0,(%rdx,%rax,8)
L335:
  mov    %ebp,%ebp
  shl    $0x3,%rbp
  lea    (%rdx,%rbp,1),%rcx
  nopl   (%rax)
L296:
  movsd  (%rdx),%xmm0
  movslq 0x0(%r13),%rax
  add    $0x8,%rdx
  add    $0x4,%r13
  movsd  %xmm0,(%rbx,%rax,8)
  cmp    %rcx,%rdx
  jne    L296
  lea    D102(%rip),%rdi
  add    %rbx,%rbp
  lea    D85(%rip),%r12
  call   <puts@plt>
L279:
  movsd  (%rbx),%xmm0
  mov    %r12,%rdi
  mov    $0x1,%eax
  add    $0x8,%rbx
  call   <printf@plt>
  cmp    %rbx,%rbp
  jne    L279
L170:
  mov    $0xa,%edi
  call   <putchar@plt>
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L153:
  mov    %ebp,%eax
L258:
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,(%rdx,%rcx,8)
  jmp    L335
L88:
  mov    %ecx,%eax
  mov    %r8d,%esi
  jmp    L328
L339:
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    0x0(,%rbp,4),%edi
  call   <malloc@plt>
  mov    %ebp,%edx
  mov    %r12,%rdi
  shl    $0x3,%ebp
  mov    %rax,%rsi
  call   <iquicksort_I@plt>
  mov    %ebp,%edi
  call   <malloc@plt>
  mov    %ebp,%edi
  call   <malloc@plt>
  mov    D107(%rip),%rcx
  lea    D102(%rip),%rdi
  mov    %rcx,(%rax)
  call   <puts@plt>
  jmp    L170
L2:
  xor    %eax,%eax
  jmp    L219
L179:
  mov    %ebp,%edx
  mov    %r13,%rsi
  lea    0x0(,%rbp,8),%r14d
  mov    %r12,%rdi
  call   <iquicksort_I@plt>
  mov    %r14d,%edi
  call   <malloc@plt>
  mov    %r14d,%edi
  mov    %rax,%rbx
  call   <malloc@plt>
  mov    (%r12),%esi
  mov    %rax,%rdx
  cmp    $0x1,%ebp
  jne    L6
  mov    $0x1,%eax
  xor    %ecx,%ecx
  jmp    L258
```

tool_calls: name: extract_symbolic_data
arguments: tag: D96
type_infered: string
name: extract_symbolic_data
arguments: tag: D69
type_infered: string
name: extract_symbolic_data
arguments: tag: D115
type_infered: string
name: extract_symbolic_data
arguments: tag: D5
type_infered: string
name: extract_symbolic_data
arguments: tag: D18
type_infered: byte[16]
name: extract_symbolic_data
arguments: tag: D25
type_infered: byte[16]
name: extract_symbolic_data
arguments: tag: D15
type_infered: byte[8]
name: extract_symbolic_data
arguments: tag: D102
type_infered: string
name: extract_symbolic_data
arguments: tag: D85
type_infered: string
name: extract_symbolic_data
arguments: tag: D107
type_infered: f64

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

tool: D69: breaking ties with average rank

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


tool: D5: %d    

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

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

tool: {"D15": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f]}

tool: D102: reorder ranks into original order of vector:

tool: D85: %.1f   

tool: D107: 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);
  int *x = vrandi(10, max, n);
  for (int i = 0; i < n; ++i)
    printf("%d    ", x[i]);
  putchar('\n');
  int *indx = (int *)malloc(n * sizeof(int));
  for (int i = 0; i < n; ++i)
    indx[i] = i;
  iquicksort_I(x, indx, n);
  double *result = (double *)malloc(n * sizeof(double));
  double *ranks = (double *)malloc(n * sizeof(double));
  int b = x[0];
  int ib = 0;
  int i;
  for (i = 1; i < n; ++i) {
    if (x[i] != b) {
      if (ib < i - 1) {
        double rnk = (i - 1 + ib + 2) / 2.0;
        for (int j = ib; j <= i - 1; ++j)
          ranks[j] = rnk;
      } else {
        ranks[ib] = ib + 1;
      }
      b = x[i];
      ib = i;
    }
  }
  if (ib == i - 1)
    ranks[ib] = i;
  else {
    double rnk = (i - 1 + ib + 2) / 2.0;
    for (int j = ib; j <= i - 1; ++j)
      ranks[j] = rnk;
  }
  for (int i = 0; i < n; ++i)
    result[indx[i]] = ranks[i];
  printf("reorder ranks into original order of vector:\n");
  for (int i = 0; i < n; ++i)
    printf("%.1f   ", result[i]);
  putchar('\n');
}
```