user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %r15
  lea    D86(%rip),%rsi
  lea    D71(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x118,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  lea    D277(%rip),%rsi
  lea    D175(%rip),%rdi
  mov    %rax,%r13
  call   <fopen@plt>
  mov    %rax,0x48(%rsp)
  test   %r13,%r13
  je     L236
L31:
  lea    0xd0(%rsp),%rax
  xor    %r12d,%r12d
  lea    0x58(%rsp),%r14
  movq   $0x0,0x40(%rsp)
  mov    %rax,(%rsp)
  lea    0x50(%rsp),%r15
  lea    0x90(%rsp),%rbx
  movq   $0x0,0x38(%rsp)
  lea    D133(%rip),%rbp
  jmp    L214
  nopl   0x0(%rax,%rax,1)
L21:
  mov    (%rsp),%rcx
  mov    %r14,%r9
  mov    %r15,%r8
  mov    %rbx,%rdx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  add    $0x1,%r12d
  call   <fscanf@plt>
  movsd  0x38(%rsp),%xmm5
  movsd  0x40(%rsp),%xmm6
  addsd  0x50(%rsp),%xmm5
  addsd  0x58(%rsp),%xmm6
  movsd  %xmm5,0x38(%rsp)
  movsd  %xmm6,0x40(%rsp)
  cmp    $0x64,%r12d
  je     L70
L214:
  mov    %r13,%rdi
  call   <feof@plt>
  test   %rax,%rax
  je     L21
  mov    %r12d,%esi
  lea    D332(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D35(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L21
L70:
  mov    %r13,%rdi
  call   <fclose@plt>
  lea    D86(%rip),%rsi
  lea    D49(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L119
L146:
  xor    %r12d,%r12d
  lea    0x68(%rsp),%r14
  lea    0x60(%rsp),%r15
  movq   $0x0,0x30(%rsp)
  movq   $0x0,0x28(%rsp)
  jmp    L48
  nopl   0x0(%rax)
L17:
  mov    (%rsp),%rcx
  mov    %r14,%r9
  mov    %r15,%r8
  mov    %rbx,%rdx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  add    $0x1,%r12d
  call   <fscanf@plt>
  movsd  0x28(%rsp),%xmm7
  movsd  0x30(%rsp),%xmm1
  addsd  0x60(%rsp),%xmm7
  addsd  0x68(%rsp),%xmm1
  movsd  %xmm7,0x28(%rsp)
  movsd  %xmm1,0x30(%rsp)
  cmp    $0x64,%r12d
  je     L101
L48:
  mov    %r13,%rdi
  call   <feof@plt>
  test   %rax,%rax
  je     L17
  mov    %r12d,%esi
  lea    D332(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D35(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L17
L101:
  mov    %r13,%rdi
  call   <fclose@plt>
  lea    D86(%rip),%rsi
  lea    D274(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L4
L16:
  xor    %r12d,%r12d
  lea    0x78(%rsp),%r14
  lea    0x70(%rsp),%r15
  movq   $0x0,0x20(%rsp)
  movq   $0x0,0x18(%rsp)
  jmp    L115
  nopl   0x0(%rax)
L143:
  mov    (%rsp),%rcx
  mov    %r14,%r9
  mov    %r15,%r8
  mov    %rbx,%rdx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  add    $0x1,%r12d
  call   <fscanf@plt>
  movsd  0x18(%rsp),%xmm2
  movsd  0x20(%rsp),%xmm3
  addsd  0x70(%rsp),%xmm2
  addsd  0x78(%rsp),%xmm3
  movsd  %xmm2,0x18(%rsp)
  movsd  %xmm3,0x20(%rsp)
  cmp    $0x64,%r12d
  je     L171
L115:
  mov    %r13,%rdi
  call   <feof@plt>
  test   %rax,%rax
  je     L143
  mov    %r12d,%esi
  lea    D332(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D35(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L143
L171:
  mov    %r13,%rdi
  call   <fclose@plt>
  lea    D86(%rip),%rsi
  lea    D251(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L96
L1:
  pxor   %xmm5,%xmm5
  xor    %r12d,%r12d
  lea    0x88(%rsp),%r15
  movsd  %xmm5,0x10(%rsp)
  lea    0x80(%rsp),%r14
  movsd  %xmm5,0x8(%rsp)
  jmp    L191
  nopl   (%rax)
L262:
  mov    (%rsp),%rcx
  mov    %r15,%r9
  mov    %r14,%r8
  mov    %rbx,%rdx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  add    $0x1,%r12d
  call   <fscanf@plt>
  movsd  0x8(%rsp),%xmm0
  movsd  0x10(%rsp),%xmm4
  addsd  0x80(%rsp),%xmm0
  addsd  0x88(%rsp),%xmm4
  movsd  %xmm0,0x8(%rsp)
  movsd  %xmm4,0x10(%rsp)
  cmp    $0x64,%r12d
  je     L156
L191:
  mov    %r13,%rdi
  call   <feof@plt>
  test   %rax,%rax
  je     L262
  mov    %r12d,%esi
  lea    D332(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D35(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L262
L156:
  movsd  D340(%rip),%xmm4
  movsd  0x38(%rsp),%xmm0
  lea    D275(%rip),%rsi
  movsd  0x8(%rsp),%xmm3
  movsd  0x18(%rsp),%xmm2
  movsd  0x28(%rsp),%xmm1
  divsd  %xmm4,%xmm0
  mov    0x48(%rsp),%rbx
  mov    %rbx,%rdi
  divsd  %xmm4,%xmm3
  divsd  %xmm4,%xmm2
  divsd  %xmm4,%xmm1
  call   <fprintf@plt>
  mov    D340(%rip),%rax
  mov    %rbx,%rdi
  movsd  0x40(%rsp),%xmm5
  movsd  0x10(%rsp),%xmm6
  movsd  0x20(%rsp),%xmm7
  lea    D98(%rip),%rsi
  movsd  0x30(%rsp),%xmm8
  movq   %rax,%xmm4
  divsd  %xmm4,%xmm5
  divsd  %xmm4,%xmm6
  movapd %xmm5,%xmm0
  divsd  %xmm4,%xmm7
  movapd %xmm6,%xmm3
  divsd  %xmm4,%xmm8
  movapd %xmm7,%xmm2
  movapd %xmm8,%xmm1
  call   <fprintf@plt>
  movsd  0x8(%rsp),%xmm3
  mov    %rbx,%rdi
  addsd  0x10(%rsp),%xmm3
  movsd  0x18(%rsp),%xmm2
  movsd  0x28(%rsp),%xmm1
  lea    D249(%rip),%rsi
  addsd  0x20(%rsp),%xmm2
  addsd  0x30(%rsp),%xmm1
  movsd  0x38(%rsp),%xmm0
  mov    D340(%rip),%rax
  addsd  0x40(%rsp),%xmm0
  movq   %rax,%xmm4
  divsd  %xmm4,%xmm3
  divsd  %xmm4,%xmm0
  divsd  %xmm4,%xmm2
  divsd  %xmm4,%xmm1
  call   <fprintf@plt>
  mov    %rbx,%rdi
  call   <fclose@plt>
  mov    %r13,%rdi
  call   <fclose@plt>
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L37
  add    $0x118,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L236:
  lea    D186(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L31
L119:
  lea    D86(%rip),%rsi
  lea    D71(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r13
  test   %rax,%rax
  jne    L146
  lea    D240(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L146
L4:
  lea    D86(%rip),%rsi
  lea    D71(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r13
  test   %rax,%rax
  jne    L16
  lea    D240(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L16
L96:
  lea    D86(%rip),%rsi
  lea    D71(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r13
  test   %rax,%rax
  jne    L1
  lea    D240(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L1
L37:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D86
data_type: string
name: disassemble_data
arguments: data_label: D71
data_type: string
name: disassemble_data
arguments: data_label: D277
data_type: string
name: disassemble_data
arguments: data_label: D175
data_type: string
name: disassemble_data
arguments: data_label: D133
data_type: string
name: disassemble_data
arguments: data_label: D332
data_type: string
name: disassemble_data
arguments: data_label: D35
data_type: string
name: disassemble_data
arguments: data_label: D49
data_type: string
name: disassemble_data
arguments: data_label: D274
data_type: string
name: disassemble_data
arguments: data_label: D251
data_type: string
name: disassemble_data
arguments: data_label: D340
data_type: f64
name: disassemble_data
arguments: data_label: D275
data_type: string
name: disassemble_data
arguments: data_label: D98
data_type: string
name: disassemble_data
arguments: data_label: D249
data_type: string
name: disassemble_data
arguments: data_label: D186
data_type: string
name: disassemble_data
arguments: data_label: D240
data_type: string

tool: D86: r

tool: D71: orig.txt

tool: D277: w

tool: D175: output.txt

tool: D133: %s %s %lf %lf


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


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


tool: D49: opt.txt

tool: D274: bst.txt

tool: D251: combine.txt

tool: D340: 100

tool: D275: append() %lf %lf %lf %lf


tool: D98: findName() %lf %lf %lf %lf


tool: D249: TimeSum %lf %lf %lf %lf

tool: D186: ERROR opening input file orig.txt

tool: D240: 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;
  }
  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;
}
```