user: What is the c source code of the assembly code below:

```asm
<main>:
  endbr64
  push   %r15
  lea    D92(%rip),%rsi
  lea    D66(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xd8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xc8(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  lea    D142(%rip),%rsi
  lea    D27(%rip),%rdi
  mov    %rax,%rbp
  call   <fopen@plt>
  mov    %rax,0x28(%rsp)
  test   %rbp,%rbp
  je     L122
L76:
  lea    0x50(%rsp),%rax
  xor    %ebx,%ebx
  lea    0x38(%rsp),%r15
  movq   $0x0,0x18(%rsp)
  movq   $0x0,0x10(%rsp)
  lea    0x30(%rsp),%r14
  lea    0x90(%rsp),%r13
  mov    %rax,0x20(%rsp)
  lea    D169(%rip),%r12
  jmp    L117
  nopl   0x0(%rax,%rax,1)
L40:
  mov    0x20(%rsp),%rdx
  mov    %r15,%r9
  mov    %r14,%r8
  mov    %r13,%rcx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  add    $0x1,%ebx
  call   <fscanf@plt>
  movsd  0x10(%rsp),%xmm3
  movsd  0x18(%rsp),%xmm4
  addsd  0x30(%rsp),%xmm3
  addsd  0x38(%rsp),%xmm4
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm4,0x18(%rsp)
  cmp    $0x64,%ebx
  je     L111
L117:
  mov    %rbp,%rdi
  call   <feof@plt>
  test   %rax,%rax
  je     L40
  mov    %ebx,%esi
  lea    D70(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D89(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L40
L111:
  lea    D92(%rip),%rsi
  lea    D49(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L59
L41:
  pxor   %xmm7,%xmm7
  lea    0x48(%rsp),%r15
  lea    0x40(%rsp),%rbp
  xor    %ebx,%ebx
  movq   $0x0,0x8(%rsp)
  movsd  %xmm7,(%rsp)
  jmp    L15
  cs nopw 0x0(%rax,%rax,1)
L42:
  mov    0x20(%rsp),%rdx
  mov    %r15,%r9
  mov    %rbp,%r8
  mov    %r13,%rcx
  mov    %r12,%rsi
  mov    %r14,%rdi
  add    $0x1,%ebx
  call   <fscanf@plt>
  movsd  (%rsp),%xmm5
  movsd  0x8(%rsp),%xmm6
  addsd  0x40(%rsp),%xmm5
  addsd  0x48(%rsp),%xmm6
  movsd  %xmm5,(%rsp)
  movsd  %xmm6,0x8(%rsp)
  cmp    $0x64,%ebx
  je     L82
L15:
  mov    %r14,%rdi
  call   <feof@plt>
  test   %rax,%rax
  je     L42
  mov    %ebx,%esi
  lea    D70(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D89(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L42
L82:
  movsd  0x10(%rsp),%xmm0
  movapd %xmm5,%xmm1
  movsd  D138(%rip),%xmm2
  lea    D47(%rip),%rsi
  mov    0x28(%rsp),%rbx
  divsd  %xmm2,%xmm0
  mov    %rbx,%rdi
  divsd  %xmm2,%xmm1
  call   <fprintf@plt>
  mov    D138(%rip),%rax
  mov    %rbx,%rdi
  movsd  0x18(%rsp),%xmm0
  movsd  0x8(%rsp),%xmm1
  lea    D3(%rip),%rsi
  movq   %rax,%xmm2
  divsd  %xmm2,%xmm0
  divsd  %xmm2,%xmm1
  call   <fprintf@plt>
  mov    %rbx,%rdi
  call   <fclose@plt>
  mov    %r14,%rdi
  call   <fclose@plt>
  lea    D134(%rip),%rdi
  call   <puts@plt>
  mov    0xc8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L13
  add    $0xd8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L122:
  lea    D34(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L76
L59:
  lea    D97(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L41
L13:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D92
type_infered: string
name: retrieve_data
arguments: data_label: D66
type_infered: string
name: retrieve_data
arguments: data_label: D142
type_infered: string
name: retrieve_data
arguments: data_label: D27
type_infered: string
name: retrieve_data
arguments: data_label: D169
type_infered: string
name: retrieve_data
arguments: data_label: D70
type_infered: string
name: retrieve_data
arguments: data_label: D89
type_infered: string
name: retrieve_data
arguments: data_label: D49
type_infered: string
name: retrieve_data
arguments: data_label: D138
type_infered: f64
name: retrieve_data
arguments: data_label: D47
type_infered: string
name: retrieve_data
arguments: data_label: D3
type_infered: string
name: retrieve_data
arguments: data_label: D134
type_infered: string
name: retrieve_data
arguments: data_label: D34
type_infered: string
name: retrieve_data
arguments: data_label: D97
type_infered: string

tool: D92: r

tool: D66: orig.txt

tool: D142: w

tool: D27: output.txt

tool: D169: %s %s %lf %lf


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


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


tool: D49: opt.txt

tool: D138: 100

tool: D47: append() %lf %lf


tool: D3: findName() %lf %lf

tool: D134: 
Finish calculating, run 'make plot' to see the result


tool: D34: ERROR opening input file orig.txt

tool: D97: ERROR opening input file opt.txt

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;
  }
  fp = fopen("opt.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;
  }
  fprintf(output, "append() %lf %lf\n", orig_sum_a / 100.0, opt_sum_a / 100.0);
  fprintf(output, "findName() %lf %lf", orig_sum_f / 100.0, opt_sum_f / 100.0);
  fclose(output);
  fclose(fp);
  printf("\nFinish calculating, run 'make plot' to see the result\n\n");
  return 0;
}
```