user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x88,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,-0xb0(%rbp)
  lea    D106(%rip),%rsi
  lea    D43(%rip),%rdi
  call   <fopen@plt>
  test   %rax,%rax
  je     L21
  mov    %rax,%rbx
  lea    -0x50(%rbp),%rdi
  mov    %rax,%rdx
  mov    $0x4,%esi
  call   <fgets@plt>
  test   %rax,%rax
  je     L111
  lea    -0x50(%rbp),%rsi
  lea    -0x4c(%rbp),%rdi
  mov    $0x4,%edx
  call   <memcpy@plt>
  movb   $0x0,-0x48(%rbp)
L111:
  mov    %rbx,%rdi
  call   <fclose@plt>
  lea    D63(%rip),%rsi
  lea    D53(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L130
L20:
  movl   $0x64,-0xa4(%rbp)
  lea    D42(%rip),%r15
  lea    D11(%rip),%r13
  lea    D89(%rip),%r14
  jmp    L137
L21:
  lea    D66(%rip),%rdi
  call   <perror@plt>
  mov    -0xb0(%rbp),%rsp
  mov    $0xffffffff,%eax
  jmp    L123
L130:
  lea    D53(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L20
L11:
  lea    -0x84(%rbp),%rbx
L126:
  mov    %rbx,%rdi
  call   <wait@plt>
  cmp    $0xffffffff,%eax
  jne    L126
  mov    -0x3c(%rbp),%edi
  call   <close@plt>
  mov    %r13,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  lea    -0x54(%rbp),%rsi
  mov    -0x40(%rbp),%edi
  call   <read@plt>
  test   %eax,%eax
  js     L32
  movslq %eax,%rdx
  movb   $0x0,-0x54(%rbp,%rdx,1)
  mov    %eax,-0xa0(%rbp)
  fildl  -0xa0(%rbp)
  lea    -0x10(%rsp),%rsp
  fstpt  (%rsp)
  mov    %r14,%rdi
  call   <printf@plt>
  add    $0x10,%rsp
L33:
  lea    -0x70(%rbp),%rdi
  mov    $0x0,%esi
  call   <gettimeofday@plt>
  mov    -0x70(%rbp),%rax
  sub    -0x80(%rbp),%rax
  mov    %rax,-0xa0(%rbp)
  fildll -0xa0(%rbp)
  fdivs  0xbf3(%rip)        # 20a8 <_fini+0xaac>
  mov    -0x68(%rbp),%rax
  sub    -0x78(%rbp),%rax
  mov    %rax,-0xa0(%rbp)
  fildll -0xa0(%rbp)
  faddp  %st,%st(1)
  fld    %st(0)
  fstpt  -0xa0(%rbp)
  lea    -0x10(%rsp),%rsp
  fstpt  (%rsp)
  lea    D108(%rip),%rbx
  mov    %rbx,%rdi
  call   <printf@plt>
  push   -0x98(%rbp)
  push   -0xa0(%rbp)
  lea    D85(%rip),%rdi
  call   <printf@plt>
  add    $0x20,%rsp
  push   -0x98(%rbp)
  push   -0xa0(%rbp)
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <fprintf@plt>
  mov    %r12,%rdi
  call   <fflush@plt>
  add    $0x10,%rsp
  subl   $0x1,-0xa4(%rbp)
  je     L13
L137:
  lea    -0x48(%rbp),%rdi
  call   <pipe@plt>
  lea    -0x40(%rbp),%rdi
  call   <pipe@plt>
  lea    -0x80(%rbp),%rdi
  mov    $0x0,%esi
  call   <gettimeofday@plt>
  call   <fork@plt>
  cmp    $0xffffffff,%eax
  je     L22
  test   %eax,%eax
  jne    L11
  lea    -0x4c(%rbp),%rdx
  lea    -0x40(%rbp),%rsi
  lea    -0x48(%rbp),%rdi
  lea    -0x54(%rbp),%r8
  mov    %r13,%rcx
  call   <runpipe@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  jmp    L11
L32:
  lea    D78(%rip),%rdi
  call   <perror@plt>
  jmp    L33
L22:
  mov    %r15,%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L33
L13:
  mov    %r12,%rdi
  call   <fclose@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  mov    -0xb0(%rbp),%rsp
  mov    $0x0,%eax
L123:
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L51
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L51:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D106
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D43
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D63
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D53
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D42
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D11
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D89
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D66
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D108
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D85
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D78
type_infered: string

tool: D106: r

tool: D43: 512KB.txt

tool: D63: wt+

tool: D53: /home/george/Documents/C/pipe64K.txt

tool: D42: fork

tool: D11: k

tool: D89: read %d bytes from the pipe2 


tool: D66: Error opening file

tool: D108: %Lf


tool: D85: time spend (half of bi-direction): %Lf


tool: D78: read

assistant: ```c
int main(int argc, char **argv) {
  int pid, status;
  int fd1[2];
  int fd2[2];
  int bytes = 4;
  char buf[bytes];
  int n2;
  struct timeval start, end;
  FILE *fp;
  char str[bytes];
  char string[bytes];
  fp = fopen("512KB.txt", "r");
  if (fp == NULL) {
    perror("Error opening file");
    return (-1);
  }
  if (fgets(str, bytes, fp) != NULL) {
    memcpy(string, str, bytes);
    string[bytes] = '\0';
  }
  fclose(fp);
  char *data1 = string;
  char *data2 = "k";
  FILE *fp2;
  if ((fp2 = fopen("/home/george/Documents/C/pipe64K.txt", "wt+")) == NULL) {
    perror("/home/george/Documents/C/pipe64K.txt");
    exit(1);
  }
  int i = 0;
  for (i; i < 100; i++) {
    pipe(fd1);
    pipe(fd2);
    gettimeofday(&start, NULL);
    switch (pid = fork()) {
    case 0:
      runpipe(fd1, fd2, data1, data2, buf);
      exit(0);
    default:
      while ((pid = wait(&status)) != -1)
        ;
      close(fd2[1]);
      if ((n2 = read(fd2[0], buf, strlen(data2))) >= 0) {
        buf[n2] = 0;
        printf("read %d bytes from the pipe2 \n", n2);
      } else
        perror("read");
      break;
    case -1:
      perror("fork");
      exit(1);
    }
    gettimeofday(&end, NULL);
    long double time = ((long double)(end.tv_sec - start.tv_sec) + ((long double)(end.tv_usec - start.tv_usec) / 1000000.0));
    printf("%Lf\n", time);
    printf("time spend (half of bi-direction): %Lf\n", time);
    fprintf(fp2, "%Lf\n", time);
    fflush(fp2);
  }
  fclose(fp2);
  exit(0);
}
```