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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x8000(%rsp),%r11
L27:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L27
  sub    $0x2e8,%rsp
  lea    D104(%rip),%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x82d8(%rsp)
  xor    %eax,%eax
  cmp    $0x1,%edi
  jle    L254
  mov    0x8(%rsi),%rdi
  mov    %rbp,%rdx
  lea    D13(%rip),%rsi
  call   <sscanf@plt>
L254:
  lea    D34(%rip),%rsi
  mov    %rbp,%rdi
  call   <fopen@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L136
  lea    D143(%rip),%rdi
  lea    0x1d0(%rsp),%rsi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x2d0(%rsp),%rbx
  movl   $0x0,0x14(%rsp)
  lea    D170(%rip),%rbp
  lea    D206(%rip),%r13
  jmp    L173
  nopl   0x0(%rax)
L286:
  movzbl 0x2d0(%rsp),%eax
  and    $0xffffffdf,%eax
  cmp    $0xa,%al
  jne    L45
L173:
  mov    %r14,%rdx
  mov    $0x8000,%esi
  mov    %rbx,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  jne    L286
  mov    %r14,%rdi
  xor    %r12d,%r12d
  lea    D41(%rip),%r13
  call   <fclose@plt>
  mov    0x14(%rsp),%eax
  movsd  D83(%rip),%xmm6
  lea    D10(%rip),%rbp
  movsd  D6(%rip),%xmm5
  lea    D206(%rip),%rbx
  pxor   %xmm4,%xmm4
  lea    -0x1(%rax),%r15d
  lea    0x70(%rsp),%rax
  mov    %rax,0x20(%rsp)
  lea    0x120(%rsp),%rax
  lea    0x8(,%r15,8),%r14
  mov    %rax,0x18(%rsp)
  nopl   0x0(%rax,%rax,1)
L227:
  mov    0x14(%rsp),%eax
  test   %eax,%eax
  je     L135
  xor    %esi,%esi
  mov    %rbp,%rdi
  mov    %r14,%rdx
  movsd  %xmm6,0x8(%rsp)
  call   <memset@plt>
  mov    D6(%rip),%rcx
  xor    %eax,%eax
  xor    %edi,%edi
  pxor   %xmm4,%xmm4
  movsd  D209(%rip),%xmm3
  movsd  0x8(%rsp),%xmm6
  lea    D165(%rip),%rsi
  movq   D282(%rip),%xmm7
  movapd %xmm4,%xmm1
  movapd %xmm4,%xmm2
  movq   %rcx,%xmm5
  jmp    L79
  nopw   0x0(%rax,%rax,1)
L175:
  mov    %rdx,%rax
L79:
  movsd  (%rsi,%rax,8),%xmm0
  subsd  %xmm6,%xmm0
  andpd  %xmm7,%xmm0
  comisd %xmm0,%xmm3
  jbe    L252
  addsd  (%rbx,%rax,8),%xmm1
  addsd  %xmm5,%xmm2
  movsd  %xmm5,0x0(%rbp,%rax,8)
  mov    $0x1,%edi
L252:
  lea    0x1(%rax),%rdx
  cmp    %rax,%r15
  jne    L175
  test   %dil,%dil
  jne    L87
  movapd %xmm4,%xmm1
L87:
  divsd  %xmm2,%xmm1
  movapd %xmm4,%xmm0
  movapd %xmm4,%xmm3
  xor    %eax,%eax
  movsd  %xmm1,0x60(%rsp)
  jmp    L85
  nopw   0x0(%rax,%rax,1)
L114:
  mov    %rdx,%rax
L85:
  ucomisd 0x0(%rbp,%rax,8),%xmm4
  jp     L149
  je     L251
L149:
  movsd  (%rbx,%rax,8),%xmm2
  addsd  %xmm5,%xmm3
  subsd  %xmm1,%xmm2
  mulsd  %xmm2,%xmm2
  addsd  %xmm2,%xmm0
L251:
  lea    0x1(%rax),%rdx
  cmp    %rax,%r15
  jne    L114
  divsd  %xmm3,%xmm0
L155:
  ucomisd %xmm0,%xmm4
  ja     L44
  sqrtsd %xmm0,%xmm0
L144:
  movsd  D292(%rip),%xmm2
  mulsd  %xmm0,%xmm2
  movapd %xmm3,%xmm0
  subsd  %xmm5,%xmm0
  ucomisd %xmm0,%xmm4
  ja     L109
  sqrtsd %xmm0,%xmm0
L164:
  mov    %r13,%rdi
  mov    $0x4,%eax
  movsd  %xmm6,0x8(%rsp)
  divsd  %xmm0,%xmm2
  movapd %xmm6,%xmm0
  movsd  %xmm2,0x68(%rsp)
  call   <printf@plt>
  movsd  0x60(%rsp),%xmm0
  mov    0x20(%rsp),%rax
  pxor   %xmm4,%xmm4
  movsd  0x8(%rsp),%xmm6
  addsd  D94(%rip),%xmm6
  movsd  %xmm0,(%rax,%r12,1)
  mov    0x18(%rsp),%rax
  movsd  0x68(%rsp),%xmm0
  add    $0x8,%r12
  movsd  %xmm0,-0x8(%r12,%rax,1)
  mov    D6(%rip),%rax
  cmp    $0xa8,%r12
  movq   %rax,%xmm5
  jne    L227
  lea    D212(%rip),%r14
  lea    D222(%rip),%rdi
  mov    %r14,%rsi
  lea    0x118(%rsp),%r15
  lea    D49(%rip),%r12
  call   <fopen@plt>
  mov    0x20(%rsp),%rbp
  mov    %rax,%r13
  nopw   0x0(%rax,%rax,1)
L182:
  movsd  0x0(%rbp),%xmm0
  mov    %r12,%rsi
  mov    %r13,%rdi
  add    $0x8,%rbp
  call   <fprintf@plt>
  cmp    %r15,%rbp
  jne    L182
  mov    %r13,%rdi
  lea    0x1c8(%rsp),%r13
  call   <fclose@plt>
  mov    %r14,%rsi
  lea    D105(%rip),%rdi
  call   <fopen@plt>
  mov    0x18(%rsp),%rbx
  mov    %rax,%rbp
L224:
  movsd  (%rbx),%xmm0
  mov    %r12,%rsi
  mov    %rbp,%rdi
  add    $0x8,%rbx
  call   <fprintf@plt>
  cmp    %r13,%rbx
  jne    L224
  mov    %rbp,%rdi
  call   <fclose@plt>
L214:
  mov    0x82d8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L125
  add    $0x82e8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L135:
  movapd %xmm4,%xmm1
  movapd %xmm4,%xmm3
  divsd  %xmm4,%xmm1
  movsd  %xmm1,0x60(%rsp)
  movapd %xmm1,%xmm0
  jmp    L155
L45:
  lea    0x4c(%rsp),%rcx
  lea    0x50(%rsp),%rdx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  movq   $0x0,0x68(%rsp)
  sub    $0x8,%rsp
  lea    0x64(%rsp),%rax
  push   %rax
  lea    0x68(%rsp),%rax
  push   %rax
  lea    0x5c(%rsp),%rax
  push   %rax
  lea    0x80(%rsp),%rax
  push   %rax
  lea    0x70(%rsp),%rax
  push   %rax
  xor    %eax,%eax
  lea    0x98(%rsp),%r9
  lea    0x84(%rsp),%r8
  call   <sscanf@plt>
  add    $0x30,%rsp
  pxor   %xmm4,%xmm4
  ucomisd 0x68(%rsp),%xmm4
  jp     L146
  je     L173
L146:
  movsd  0x60(%rsp),%xmm0
  movsd  D18(%rip),%xmm7
  movapd %xmm0,%xmm1
  andpd  D282(%rip),%xmm1
  comisd %xmm1,%xmm7
  jbe    L173
  pxor   %xmm1,%xmm1
  movslq 0x14(%rsp),%rax
  lea    D165(%rip),%rsi
  cvtsi2sdl 0x4c(%rsp),%xmm1
  movsd  %xmm0,0x0(%r13,%rax,8)
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0x50(%rsp),%xmm0
  divsd  D93(%rip),%xmm0
  addsd  %xmm1,%xmm0
  subsd  D198(%rip),%xmm0
  movsd  D122(%rip),%xmm1
  comisd %xmm1,%xmm0
  jbe    L8
  subsd  %xmm1,%xmm0
L8:
  addl   $0x1,0x14(%rsp)
  movsd  %xmm0,(%rsi,%rax,8)
  jmp    L173
L136:
  mov    %rbp,%rsi
  lea    D12(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L214
L44:
  movsd  %xmm6,0x30(%rsp)
  movsd  %xmm3,0x28(%rsp)
  movsd  %xmm1,0x8(%rsp)
  call   <sqrt@plt>
  mov    D6(%rip),%rax
  pxor   %xmm4,%xmm4
  movsd  0x30(%rsp),%xmm6
  movsd  0x28(%rsp),%xmm3
  movsd  0x8(%rsp),%xmm1
  movq   %rax,%xmm5
  jmp    L144
L109:
  movsd  %xmm6,0x38(%rsp)
  movsd  %xmm3,0x30(%rsp)
  movsd  %xmm2,0x28(%rsp)
  movsd  %xmm1,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x38(%rsp),%xmm6
  movsd  0x30(%rsp),%xmm3
  movsd  0x28(%rsp),%xmm2
  movsd  0x8(%rsp),%xmm1
  jmp    L164
L125:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D104
datatype: string
name: parse_data
arguments: data_label: D13
datatype: string
name: parse_data
arguments: data_label: D34
datatype: string
name: parse_data
arguments: data_label: D143
datatype: string
name: parse_data
arguments: data_label: D170
datatype: string
name: parse_data
arguments: data_label: D41
datatype: string
name: parse_data
arguments: data_label: D83
datatype: byte[8]
name: parse_data
arguments: data_label: D6
datatype: byte[8]
name: parse_data
arguments: data_label: D209
datatype: byte[8]
name: parse_data
arguments: data_label: D282
datatype: qword[2]
name: parse_data
arguments: data_label: D292
datatype: f64
name: parse_data
arguments: data_label: D94
datatype: f64
name: parse_data
arguments: data_label: D212
datatype: string
name: parse_data
arguments: data_label: D222
datatype: string
name: parse_data
arguments: data_label: D49
datatype: string
name: parse_data
arguments: data_label: D105
datatype: string
name: parse_data
arguments: data_label: D18
datatype: byte[8]
name: parse_data
arguments: data_label: D93
datatype: f64
name: parse_data
arguments: data_label: D198
datatype: f64
name: parse_data
arguments: data_label: D122
datatype: byte[8]
name: parse_data
arguments: data_label: D12
datatype: string

tool: D104: data.txt

tool: D13: %s

tool: D34: r

tool: D143: file %s


tool: D170: %d %d %d %lf %d %lf %d %d %d

tool: D41: hr %4.1f vvel %5.2f err %5.2f num %4.0f


tool: {"D83": [0x00,0x00,0x00,0x00,0x00,0x00,0x14,0xc0]}

tool: {"D6": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: {"D209": [0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x3f]}

tool: {"D282": [0x7fffffffffffffff,0x0000000000000000]}

tool: D292: 3

tool: D94: 0.5

tool: D212: wb

tool: D222: out_half.txt

tool: D49: %5.2f


tool: D105: out_err_half.txt

tool: {"D18": [0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x40]}

tool: D93: 60

tool: D198: 4

tool: {"D122": [0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x40]}

tool: D12: cannot open file:%s


assistant: ```c
int main(int argc, char *argv[]) {
  char buf[32768];
  char fname[256];
  int line, j, np, yr, dy, hr, mn, sc, mon, qual;
  double vvel, velerr, sum1, sum2, h, dt;
  double plotvel[21], ploterr[21];
  static double tim[100000], vel[100000], verr[100000], wt[100000];
  FILE *file1;
  if (argc > 1)
    sscanf(argv[1], "%s", "data.txt");
  if ((file1 = fopen("data.txt", "r")) == NULL) {
    printf("cannot open file:%s\n", "data.txt");
    return 0;
  }
  line = j = np = 0;
  printf("file %s\n", fname);
  while (fgets(buf, 32768, file1) != 0) {
    if (buf[0] != '*' && buf[0] != '\n') {
      velerr = 0;
      sscanf(buf, "%d %d %d %lf %d %lf %d %d %d", &mn, &hr, &sc, &velerr, &dy, &vvel, &yr, &mon, &qual);
      if (velerr && fabs(vvel) < 200) {
        vel[j] = vvel;
        verr[j] = velerr;
        tim[j] = hr + mn / 60.0 - 4.0;
        if (tim[j] > 12)
          tim[j] += -12;
        j++;
      }
      line++;
    }
  }
  np = j;
  fclose(file1);
  dt = 0.5;
  int i = 0;
  for (h = -5; h <= 5; h += dt) {
    vvel = sum1 = 0;
    for (j = 0; j < np; j++) {
      wt[j] = 0;
      if (fabs(tim[j] - h) < dt / 2.0) {
        vvel += vel[j];
        wt[j] = 1;
        sum1++;
      }
    }
    vvel = vvel / sum1;
    sum1 = sum2 = 0;
    for (j = 0; j < np; j++) {
      if (wt[j]) {
        sum2 += (vel[j] - vvel) * (vel[j] - vvel);
        sum1++;
      }
    }
    velerr = 3.0 * sqrt(sum2 / sum1) / sqrt(sum1 - 1);
    printf("hr %4.1f vvel %5.2f err %5.2f num %4.0f\n", h, vvel, velerr, sum1);
    plotvel[i] = vvel;
    ploterr[i] = velerr;
    i++;
  }
  FILE *f = fopen("out_half.txt", "wb");
  for (int k = 0; k < sizeof(plotvel) / sizeof(plotvel[0]); k++) {
    fprintf(f, "%5.2f\n", plotvel[k]);
  }
  fclose(f);
  FILE *f2 = fopen("out_err_half.txt", "wb");
  for (int k = 0; k < sizeof(ploterr) / sizeof(ploterr[0]); k++) {
    fprintf(f2, "%5.2f\n", ploterr[k]);
  }
  fclose(f2);
  return 0;
}
```