user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xf0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D293(%rip),%rax
  mov    %rax,%rsi
  lea    D147(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0xc0(%rbp)
  lea    D33(%rip),%rax
  mov    %rax,%rsi
  lea    D221(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x88(%rbp)
  cmpq   $0x0,-0xc0(%rbp)
  jne    L117
  lea    D188(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L117:
  movl   $0x0,-0xe4(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xb8(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movl   $0x0,-0xe4(%rbp)
  jmp    L24
L132:
  mov    -0xc0(%rbp),%rax
  mov    %rax,%rdi
  call   <feof@plt>
  test   %rax,%rax
  je     L98
  mov    -0xe4(%rbp),%eax
  mov    %eax,%esi
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D202(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L98:
  lea    -0xd8(%rbp),%rdi
  lea    -0xe0(%rbp),%rsi
  lea    -0x40(%rbp),%rcx
  lea    -0x80(%rbp),%rdx
  mov    -0xc0(%rbp),%rax
  mov    %rdi,%r9
  mov    %rsi,%r8
  lea    D276(%rip),%rsi
  mov    %rax,%rdi
  call   <fscanf@plt>
  movsd  -0xe0(%rbp),%xmm0
  movsd  -0xb8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xb8(%rbp)
  movsd  -0xd8(%rbp),%xmm0
  movsd  -0xb0(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  addl   $0x1,-0xe4(%rbp)
L24:
  cmpl   $0x63,-0xe4(%rbp)
  jle    L132
  mov    -0xc0(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  lea    D293(%rip),%rax
  mov    %rax,%rsi
  lea    D317(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0xc0(%rbp)
  cmpq   $0x0,-0xc0(%rbp)
  jne    L38
  lea    D293(%rip),%rax
  mov    %rax,%rsi
  lea    D147(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0xc0(%rbp)
  cmpq   $0x0,-0xc0(%rbp)
  jne    L38
  lea    D59(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L38:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  movl   $0x0,-0xe4(%rbp)
  jmp    L128
L55:
  mov    -0xc0(%rbp),%rax
  mov    %rax,%rdi
  call   <feof@plt>
  test   %rax,%rax
  je     L42
  mov    -0xe4(%rbp),%eax
  mov    %eax,%esi
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D202(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L42:
  lea    -0xc8(%rbp),%rdi
  lea    -0xd0(%rbp),%rsi
  lea    -0x40(%rbp),%rcx
  lea    -0x80(%rbp),%rdx
  mov    -0xc0(%rbp),%rax
  mov    %rdi,%r9
  mov    %rsi,%r8
  lea    D276(%rip),%rsi
  mov    %rax,%rdi
  call   <fscanf@plt>
  movsd  -0xd0(%rbp),%xmm0
  movsd  -0xa8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  movsd  -0xc8(%rbp),%xmm0
  movsd  -0xa0(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  addl   $0x1,-0xe4(%rbp)
L128:
  cmpl   $0x63,-0xe4(%rbp)
  jle    L55
  mov    -0xc0(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  lea    D293(%rip),%rax
  mov    %rax,%rsi
  lea    D313(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0xc0(%rbp)
  cmpq   $0x0,-0xc0(%rbp)
  jne    L22
  lea    D293(%rip),%rax
  mov    %rax,%rsi
  lea    D147(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0xc0(%rbp)
  cmpq   $0x0,-0xc0(%rbp)
  jne    L22
  lea    D32(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L22:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x98(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x90(%rbp)
  movl   $0x0,-0xe4(%rbp)
  jmp    L12
L54:
  mov    -0xc0(%rbp),%rax
  mov    %rax,%rdi
  call   <feof@plt>
  test   %rax,%rax
  je     L146
  mov    -0xe4(%rbp),%eax
  mov    %eax,%esi
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D202(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L146:
  lea    -0xc8(%rbp),%rdi
  lea    -0xd0(%rbp),%rsi
  lea    -0x40(%rbp),%rcx
  lea    -0x80(%rbp),%rdx
  mov    -0xc0(%rbp),%rax
  mov    %rdi,%r9
  mov    %rsi,%r8
  lea    D276(%rip),%rsi
  mov    %rax,%rdi
  call   <fscanf@plt>
  movsd  -0xd0(%rbp),%xmm0
  movsd  -0x98(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x98(%rbp)
  movsd  -0xc8(%rbp),%xmm0
  movsd  -0x90(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x90(%rbp)
  addl   $0x1,-0xe4(%rbp)
L12:
  cmpl   $0x63,-0xe4(%rbp)
  jle    L54
  movsd  -0x98(%rbp),%xmm0
  movsd  D159(%rip),%xmm1
  movapd %xmm0,%xmm2
  divsd  %xmm1,%xmm2
  movsd  -0xa8(%rbp),%xmm0
  movsd  D159(%rip),%xmm1
  movapd %xmm0,%xmm3
  divsd  %xmm1,%xmm3
  movsd  -0xb8(%rbp),%xmm0
  movsd  D159(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rdx
  mov    -0x88(%rbp),%rax
  movapd %xmm3,%xmm1
  movq   %rdx,%xmm0
  lea    D128(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  movsd  -0x90(%rbp),%xmm0
  movsd  D159(%rip),%xmm1
  movapd %xmm0,%xmm2
  divsd  %xmm1,%xmm2
  movsd  -0xa0(%rbp),%xmm0
  movsd  D159(%rip),%xmm1
  movapd %xmm0,%xmm3
  divsd  %xmm1,%xmm3
  movsd  -0xb0(%rbp),%xmm0
  movsd  D159(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rdx
  mov    -0x88(%rbp),%rax
  movapd %xmm3,%xmm1
  movq   %rdx,%xmm0
  lea    D164(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fprintf@plt>
  mov    -0x88(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    -0xc0(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L17
  call   <__stack_chk_fail@plt>
L17:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D293
data_type: string
name: extract_symbolic_data
arguments: data_tag: D147
data_type: string
name: extract_symbolic_data
arguments: data_tag: D33
data_type: string
name: extract_symbolic_data
arguments: data_tag: D221
data_type: string
name: extract_symbolic_data
arguments: data_tag: D188
data_type: string
name: extract_symbolic_data
arguments: data_tag: D8
data_type: string
name: extract_symbolic_data
arguments: data_tag: D202
data_type: string
name: extract_symbolic_data
arguments: data_tag: D276
data_type: string
name: extract_symbolic_data
arguments: data_tag: D317
data_type: string
name: extract_symbolic_data
arguments: data_tag: D59
data_type: string
name: extract_symbolic_data
arguments: data_tag: D313
data_type: string
name: extract_symbolic_data
arguments: data_tag: D32
data_type: string
name: extract_symbolic_data
arguments: data_tag: D159
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D128
data_type: string
name: extract_symbolic_data
arguments: data_tag: D164
data_type: string

tool: D293: r

tool: D147: orig.txt

tool: D33: w

tool: D221: output.txt

tool: D188: ERROR opening input file orig.txt

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


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


tool: D276: %s %s %lf %lf


tool: D317: opt.txt

tool: D59: ERROR opening input file opt.txt

tool: D313: opt_hash.txt

tool: D32: ERROR opening input file opt_hash.txt

tool: D159: 100

tool: D128: append() %lf %lf %lf


tool: D164: findName() %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("opt_hash.txt", "r");
  if (!fp) {
    fp = fopen("orig.txt", "r");
    if (!fp) {
      printf("ERROR opening input file opt_hash.txt\n");
      exit(0);
    }
  }
  double opt_sum_a_hash = 0.0, opt_sum_f_hash = 0.0;
  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_hash += opt_a;
    opt_sum_f_hash += opt_f;
  }
  fprintf(output, "append() %lf %lf %lf\n", orig_sum_a / 100.0, opt_sum_a / 100.0, opt_sum_a_hash / 100.0);
  fprintf(output, "findName() %lf %lf %lf", orig_sum_f / 100.0, opt_sum_f / 100.0, opt_sum_f_hash / 100.0);
  fclose(output);
  fclose(fp);
  return 0;
}
```