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

```asm
<main>:
  endbr64
  push   %r15
  lea    D36(%rip),%rsi
  lea    D157(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xf8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xe8(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  lea    D148(%rip),%rsi
  lea    D147(%rip),%rdi
  mov    %rax,%r13
  call   <fopen@plt>
  mov    %rax,0x48(%rsp)
  test   %r13,%r13
  je     L154
L168:
  lea    0xb0(%rsp),%rax
  xor    %ebx,%ebx
  lea    0x58(%rsp),%r15
  movq   $0x0,0x38(%rsp)
  mov    %rax,0x8(%rsp)
  lea    0x50(%rsp),%r14
  lea    0x70(%rsp),%rbp
  movq   $0x0,0x30(%rsp)
  lea    D248(%rip),%r12
  jmp    L61
  nopl   0x0(%rax,%rax,1)
L165:
  mov    0x8(%rsp),%rcx
  mov    %r15,%r9
  mov    %r14,%r8
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %r13,%rdi
  add    $0x1,%ebx
  call   <fscanf@plt>
  movsd  0x30(%rsp),%xmm4
  movsd  0x38(%rsp),%xmm5
  addsd  0x50(%rsp),%xmm4
  addsd  0x58(%rsp),%xmm5
  movsd  %xmm4,0x30(%rsp)
  movsd  %xmm5,0x38(%rsp)
  cmp    $0x64,%ebx
  je     L43
L61:
  mov    %r13,%rdi
  call   <feof@plt>
  test   %rax,%rax
  je     L165
  mov    %ebx,%esi
  lea    D80(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D62(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L165
L43:
  mov    %r13,%rdi
  call   <fclose@plt>
  lea    D36(%rip),%rsi
  lea    D130(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L155
L127:
  lea    0x68(%rsp),%rax
  xor    %ebx,%ebx
  lea    0x60(%rsp),%r15
  movq   $0x0,0x28(%rsp)
  movq   $0x0,0x20(%rsp)
  lea    D80(%rip),%r14
  mov    %rax,0x40(%rsp)
  jmp    L131
  nopw   0x0(%rax,%rax,1)
L66:
  mov    0x40(%rsp),%r9
  mov    0x8(%rsp),%rcx
  mov    %r15,%r8
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %r13,%rdi
  add    $0x1,%ebx
  call   <fscanf@plt>
  movsd  0x20(%rsp),%xmm6
  movsd  0x28(%rsp),%xmm7
  addsd  0x60(%rsp),%xmm6
  addsd  0x68(%rsp),%xmm7
  movsd  %xmm6,0x20(%rsp)
  movsd  %xmm7,0x28(%rsp)
  cmp    $0x64,%ebx
  je     L156
L131:
  mov    %r13,%rdi
  call   <feof@plt>
  test   %rax,%rax
  je     L66
  mov    %ebx,%esi
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D62(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L66
L156:
  mov    %r13,%rdi
  call   <fclose@plt>
  lea    D36(%rip),%rsi
  lea    D17(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L192
L169:
  pxor   %xmm3,%xmm3
  xor    %ebx,%ebx
  lea    D62(%rip),%r13
  movq   $0x0,0x18(%rsp)
  movsd  %xmm3,0x10(%rsp)
  jmp    L198
  nopw   0x0(%rax,%rax,1)
L35:
  mov    0x40(%rsp),%r9
  mov    0x8(%rsp),%rcx
  mov    %r15,%r8
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %r14,%rdi
  add    $0x1,%ebx
  call   <fscanf@plt>
  movsd  0x10(%rsp),%xmm1
  movsd  0x18(%rsp),%xmm2
  addsd  0x60(%rsp),%xmm1
  addsd  0x68(%rsp),%xmm2
  movsd  %xmm1,0x10(%rsp)
  movsd  %xmm2,0x18(%rsp)
  cmp    $0x64,%ebx
  je     L139
L198:
  mov    %r14,%rdi
  call   <feof@plt>
  test   %rax,%rax
  je     L35
  mov    %ebx,%esi
  lea    D80(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r13,%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L35
L139:
  movsd  0x30(%rsp),%xmm0
  movapd %xmm1,%xmm2
  movsd  D16(%rip),%xmm3
  lea    D118(%rip),%rsi
  movsd  0x20(%rsp),%xmm1
  mov    0x48(%rsp),%rbx
  divsd  %xmm3,%xmm0
  mov    %rbx,%rdi
  divsd  %xmm3,%xmm2
  divsd  %xmm3,%xmm1
  call   <fprintf@plt>
  mov    D16(%rip),%rax
  mov    %rbx,%rdi
  movsd  0x38(%rsp),%xmm0
  movsd  0x18(%rsp),%xmm2
  movsd  0x28(%rsp),%xmm1
  lea    D180(%rip),%rsi
  movq   %rax,%xmm3
  divsd  %xmm3,%xmm0
  divsd  %xmm3,%xmm2
  divsd  %xmm3,%xmm1
  call   <fprintf@plt>
  mov    %rbx,%rdi
  call   <fclose@plt>
  mov    %r14,%rdi
  call   <fclose@plt>
  mov    0xe8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L33
  add    $0xf8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L154:
  lea    D105(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L168
L155:
  lea    D36(%rip),%rsi
  lea    D157(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r13
  test   %rax,%rax
  jne    L127
  lea    D227(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L127
L192:
  lea    D36(%rip),%rsi
  lea    D157(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r14
  test   %rax,%rax
  jne    L169
  lea    D170(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L169
L33:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D36
data_type: string
name: disassemble_data
arguments: data_tag: D157
data_type: string
name: disassemble_data
arguments: data_tag: D148
data_type: string
name: disassemble_data
arguments: data_tag: D147
data_type: string
name: disassemble_data
arguments: data_tag: D248
data_type: string
name: disassemble_data
arguments: data_tag: D80
data_type: string
name: disassemble_data
arguments: data_tag: D62
data_type: string
name: disassemble_data
arguments: data_tag: D130
data_type: string
name: disassemble_data
arguments: data_tag: D17
data_type: string
name: disassemble_data
arguments: data_tag: D16
data_type: f64
name: disassemble_data
arguments: data_tag: D118
data_type: string
name: disassemble_data
arguments: data_tag: D180
data_type: string
name: disassemble_data
arguments: data_tag: D105
data_type: string
name: disassemble_data
arguments: data_tag: D227
data_type: string
name: disassemble_data
arguments: data_tag: D170
data_type: string

tool: D36: r

tool: D157: orig.txt

tool: D148: w

tool: D147: output.txt

tool: D248: %s %s %lf %lf


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


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


tool: D130: opt.txt

tool: D17: opt_hash.txt

tool: D16: 100

tool: D118: append() %lf %lf %lf


tool: D180: findName() %lf %lf %lf

tool: D105: ERROR opening input file orig.txt

tool: D227: ERROR opening input file opt.txt

tool: D170: ERROR opening input file opt_hash.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;
  }
  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;
}
```