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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x120,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D345(%rip),%rax
  mov    %rax,%rsi
  lea    D198(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0xd0(%rbp)
  lea    D69(%rip),%rax
  mov    %rax,%rsi
  lea    D66(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x88(%rbp)
  cmpq   $0x0,-0xd0(%rbp)
  jne    L140
  lea    D62(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L140:
  movl   $0x0,-0x114(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xc8(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xc0(%rbp)
  movl   $0x0,-0x114(%rbp)
  jmp    L168
L104:
  mov    -0xd0(%rbp),%rax
  mov    %rax,%rdi
  call   <feof@plt>
  test   %rax,%rax
  je     L85
  mov    -0x114(%rbp),%eax
  mov    %eax,%esi
  lea    D350(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D115(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L85:
  lea    -0x108(%rbp),%rdi
  lea    -0x110(%rbp),%rsi
  lea    -0x40(%rbp),%rcx
  lea    -0x80(%rbp),%rdx
  mov    -0xd0(%rbp),%rax
  mov    %rdi,%r9
  mov    %rsi,%r8
  lea    D196(%rip),%rsi
  mov    %rax,%rdi
  call   <fscanf@plt>
  movsd  -0x110(%rbp),%xmm0
  movsd  -0xc8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xc8(%rbp)
  movsd  -0x108(%rbp),%xmm0
  movsd  -0xc0(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xc0(%rbp)
  addl   $0x1,-0x114(%rbp)
L168:
  cmpl   $0x63,-0x114(%rbp)
  jle    L104
  mov    -0xd0(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  lea    D345(%rip),%rax
  mov    %rax,%rsi
  lea    D365(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0xd0(%rbp)
  cmpq   $0x0,-0xd0(%rbp)
  jne    L165
  lea    D345(%rip),%rax
  mov    %rax,%rsi
  lea    D198(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0xd0(%rbp)
  cmpq   $0x0,-0xd0(%rbp)
  jne    L165
  lea    D277(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L165:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xb8(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movl   $0x0,-0x114(%rbp)
  jmp    L130
L139:
  mov    -0xd0(%rbp),%rax
  mov    %rax,%rdi
  call   <feof@plt>
  test   %rax,%rax
  je     L172
  mov    -0x114(%rbp),%eax
  mov    %eax,%esi
  lea    D350(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D115(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L172:
  lea    -0xf8(%rbp),%rdi
  lea    -0x100(%rbp),%rsi
  lea    -0x40(%rbp),%rcx
  lea    -0x80(%rbp),%rdx
  mov    -0xd0(%rbp),%rax
  mov    %rdi,%r9
  mov    %rsi,%r8
  lea    D196(%rip),%rsi
  mov    %rax,%rdi
  call   <fscanf@plt>
  movsd  -0x100(%rbp),%xmm0
  movsd  -0xb8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xb8(%rbp)
  movsd  -0xf8(%rbp),%xmm0
  movsd  -0xb0(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  addl   $0x1,-0x114(%rbp)
L130:
  cmpl   $0x63,-0x114(%rbp)
  jle    L139
  mov    -0xd0(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  lea    D345(%rip),%rax
  mov    %rax,%rsi
  lea    D373(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0xd0(%rbp)
  cmpq   $0x0,-0xd0(%rbp)
  jne    L122
  lea    D345(%rip),%rax
  mov    %rax,%rsi
  lea    D198(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0xd0(%rbp)
  cmpq   $0x0,-0xd0(%rbp)
  jne    L122
  lea    D277(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L122:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  movl   $0x0,-0x114(%rbp)
  jmp    L12
L13:
  mov    -0xd0(%rbp),%rax
  mov    %rax,%rdi
  call   <feof@plt>
  test   %rax,%rax
  je     L191
  mov    -0x114(%rbp),%eax
  mov    %eax,%esi
  lea    D350(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D115(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L191:
  lea    -0xe8(%rbp),%rdi
  lea    -0xf0(%rbp),%rsi
  lea    -0x40(%rbp),%rcx
  lea    -0x80(%rbp),%rdx
  mov    -0xd0(%rbp),%rax
  mov    %rdi,%r9
  mov    %rsi,%r8
  lea    D196(%rip),%rsi
  mov    %rax,%rdi
  call   <fscanf@plt>
  movsd  -0xf0(%rbp),%xmm0
  movsd  -0xa8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  movsd  -0xe8(%rbp),%xmm0
  movsd  -0xa0(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  addl   $0x1,-0x114(%rbp)
L12:
  cmpl   $0x63,-0x114(%rbp)
  jle    L13
  mov    -0xd0(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  lea    D345(%rip),%rax
  mov    %rax,%rsi
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0xd0(%rbp)
  cmpq   $0x0,-0xd0(%rbp)
  jne    L23
  lea    D345(%rip),%rax
  mov    %rax,%rsi
  lea    D198(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0xd0(%rbp)
  cmpq   $0x0,-0xd0(%rbp)
  jne    L23
  lea    D277(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L23:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x98(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x90(%rbp)
  movl   $0x0,-0x114(%rbp)
  jmp    L21
L31:
  mov    -0xd0(%rbp),%rax
  mov    %rax,%rdi
  call   <feof@plt>
  test   %rax,%rax
  je     L96
  mov    -0x114(%rbp),%eax
  mov    %eax,%esi
  lea    D350(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D115(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L96:
  lea    -0xd8(%rbp),%rdi
  lea    -0xe0(%rbp),%rsi
  lea    -0x40(%rbp),%rcx
  lea    -0x80(%rbp),%rdx
  mov    -0xd0(%rbp),%rax
  mov    %rdi,%r9
  mov    %rsi,%r8
  lea    D196(%rip),%rsi
  mov    %rax,%rdi
  call   <fscanf@plt>
  movsd  -0xe0(%rbp),%xmm0
  movsd  -0x98(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x98(%rbp)
  movsd  -0xd8(%rbp),%xmm0
  movsd  -0x90(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x90(%rbp)
  addl   $0x1,-0x114(%rbp)
L21:
  cmpl   $0x63,-0x114(%rbp)
  jle    L31
  movsd  -0x98(%rbp),%xmm0
  movsd  D239(%rip),%xmm1
  movapd %xmm0,%xmm3
  divsd  %xmm1,%xmm3
  movsd  -0xa8(%rbp),%xmm0
  movsd  D239(%rip),%xmm1
  movapd %xmm0,%xmm2
  divsd  %xmm1,%xmm2
  movsd  -0xb8(%rbp),%xmm0
  movsd  D239(%rip),%xmm1
  movapd %xmm0,%xmm4
  divsd  %xmm1,%xmm4
  movsd  -0xc8(%rbp),%xmm0
  movsd  D239(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rdx
  mov    -0x88(%rbp),%rax
  movapd %xmm4,%xmm1
  movq   %rdx,%xmm0
  lea    D257(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  movsd  -0x90(%rbp),%xmm0
  movsd  D239(%rip),%xmm1
  movapd %xmm0,%xmm3
  divsd  %xmm1,%xmm3
  movsd  -0xa0(%rbp),%xmm0
  movsd  D239(%rip),%xmm1
  movapd %xmm0,%xmm2
  divsd  %xmm1,%xmm2
  movsd  -0xb0(%rbp),%xmm0
  movsd  D239(%rip),%xmm1
  movapd %xmm0,%xmm4
  divsd  %xmm1,%xmm4
  movsd  -0xc0(%rbp),%xmm0
  movsd  D239(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rdx
  mov    -0x88(%rbp),%rax
  movapd %xmm4,%xmm1
  movq   %rdx,%xmm0
  lea    D414(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  movsd  -0x98(%rbp),%xmm0
  addsd  -0x90(%rbp),%xmm0
  movsd  D239(%rip),%xmm1
  movapd %xmm0,%xmm3
  divsd  %xmm1,%xmm3
  movsd  -0xa8(%rbp),%xmm0
  addsd  -0xa0(%rbp),%xmm0
  movsd  D239(%rip),%xmm1
  movapd %xmm0,%xmm2
  divsd  %xmm1,%xmm2
  movsd  -0xb8(%rbp),%xmm0
  addsd  -0xb0(%rbp),%xmm0
  movsd  D239(%rip),%xmm1
  movapd %xmm0,%xmm4
  divsd  %xmm1,%xmm4
  movsd  -0xc8(%rbp),%xmm0
  addsd  -0xc0(%rbp),%xmm0
  movsd  D239(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rdx
  mov    -0x88(%rbp),%rax
  movapd %xmm4,%xmm1
  movq   %rdx,%xmm0
  lea    D333(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x88(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    -0xd0(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L72
  call   <__stack_chk_fail@plt>
L72:
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D345
type_guessed: string
name: parse_data
arguments: label: D198
type_guessed: string
name: parse_data
arguments: label: D69
type_guessed: string
name: parse_data
arguments: label: D66
type_guessed: string
name: parse_data
arguments: label: D62
type_guessed: string
name: parse_data
arguments: label: D350
type_guessed: string
name: parse_data
arguments: label: D115
type_guessed: string
name: parse_data
arguments: label: D196
type_guessed: string
name: parse_data
arguments: label: D365
type_guessed: string
name: parse_data
arguments: label: D277
type_guessed: string
name: parse_data
arguments: label: D373
type_guessed: string
name: parse_data
arguments: label: D18
type_guessed: string
name: parse_data
arguments: label: D239
type_guessed: f64
name: parse_data
arguments: label: D257
type_guessed: string
name: parse_data
arguments: label: D414
type_guessed: string
name: parse_data
arguments: label: D333
type_guessed: string

tool: D345: r

tool: D198: orig.txt

tool: D69: w

tool: D66: output.txt

tool: D62: ERROR opening input file orig.txt

tool: D350: ERROR: You need 100 datum instead of %d


tool: D115: run 'make run' longer to get enough information


tool: D196: %s %s %lf %lf


tool: D365: opt.txt

tool: D277: ERROR opening input file opt.txt

tool: D373: bst.txt

tool: D18: combine.txt

tool: D239: 100

tool: D257: append() %lf %lf %lf %lf


tool: D414: findName() %lf %lf %lf %lf


tool: D333: TimeSum %lf %lf %lf %lf

assistant: ```c
int main(void) {
  FILE *fp = fopen("orig.txt", "r");
  FILE *output = fopen("output.txt", "w");
  if (!fp) {
    printf("ERROR opening input file orig.txt\n");
    exit(0);
  }
  int i = 0;
  char append[50], find[50];
  double orig_sum_a = 0.0, orig_sum_f = 0.0, orig_a, orig_f;
  for (i = 0; i < 100; i++) {
    if (feof(fp)) {
      printf("ERROR: You need 100 datum instead of %d\n", i);
      printf("run 'make run' longer to get enough information\n\n");
      exit(0);
    }
    fscanf(fp, "%s %s %lf %lf\n", append, find, &orig_a, &orig_f);
    orig_sum_a += orig_a;
    orig_sum_f += orig_f;
  }
  fclose(fp);
  fp = fopen("opt.txt", "r");
  if (!fp) {
    fp = fopen("orig.txt", "r");
    if (!fp) {
      printf("ERROR opening input file opt.txt\n");
      exit(0);
    }
  }
  double opt_sum_a = 0.0, opt_sum_f = 0.0, opt_a, opt_f;
  for (i = 0; i < 100; i++) {
    if (feof(fp)) {
      printf("ERROR: You need 100 datum instead of %d\n", i);
      printf("run 'make run' longer to get enough information\n\n");
      exit(0);
    }
    fscanf(fp, "%s %s %lf %lf\n", append, find, &opt_a, &opt_f);
    opt_sum_a += opt_a;
    opt_sum_f += opt_f;
  }
  fclose(fp);
  fp = fopen("bst.txt", "r");
  if (!fp) {
    fp = fopen("orig.txt", "r");
    if (!fp) {
      printf("ERROR opening input file opt.txt\n");
      exit(0);
    }
  }
  double bst_sum_a = 0.0, bst_sum_f = 0.0, bst_a, bst_f;
  for (i = 0; i < 100; i++) {
    if (feof(fp)) {
      printf("ERROR: You need 100 datum instead of %d\n", i);
      printf("run 'make run' longer to get enough information\n\n");
      exit(0);
    }
    fscanf(fp, "%s %s %lf %lf\n", append, find, &bst_a, &bst_f);
    bst_sum_a += bst_a;
    bst_sum_f += bst_f;
  }
  fclose(fp);
  fp = fopen("combine.txt", "r");
  if (!fp) {
    fp = fopen("orig.txt", "r");
    if (!fp) {
      printf("ERROR opening input file opt.txt\n");
      exit(0);
    }
  }
  double combine_sum_a = 0.0, combine_sum_f = 0.0, combine_a, combine_f;
  for (i = 0; i < 100; i++) {
    if (feof(fp)) {
      printf("ERROR: You need 100 datum instead of %d\n", i);
      printf("run 'make run' longer to get enough information\n\n");
      exit(0);
    }
    fscanf(fp, "%s %s %lf %lf\n", append, find, &combine_a, &combine_f);
    combine_sum_a += combine_a;
    combine_sum_f += combine_f;
  }
  fprintf(output, "append() %lf %lf %lf %lf\n", orig_sum_a / 100.0, opt_sum_a / 100.0, bst_sum_a / 100.0, combine_sum_a / 100.0);
  fprintf(output, "findName() %lf %lf %lf %lf\n", orig_sum_f / 100.0, opt_sum_f / 100.0, bst_sum_f / 100.0, combine_sum_f / 100.0);
  fprintf(output, "TimeSum %lf %lf %lf %lf", (orig_sum_a + orig_sum_f) / 100.0, (opt_sum_a + opt_sum_f) / 100.0, (bst_sum_a + bst_sum_f) / 100.0, (combine_sum_a + combine_sum_f) / 100.0);
  fclose(output);
  fclose(fp);
  return 0;
}
```