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

```asm
<process_e>:
  endbr64
  push   %r15
  lea    D24(%rip),%rsi
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  sub    $0x418,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x408(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  test   %rax,%rax
  je     L114
  lea    D62(%rip),%rsi
  lea    D84(%rip),%rdi
  mov    %rax,%rbp
  mov    %rsp,%rbx
  call   <fopen@plt>
  lea    D21(%rip),%r12
  lea    0x200(%rsp),%r15
  mov    %rax,%r13
  lea    D73(%rip),%r14
  test   %rax,%rax
  je     L58
  mov    %rbp,%rdi
  call   <feof@plt>
  test   %eax,%eax
  jne    L2
  nopl   0x0(%rax,%rax,1)
L8:
  mov    %rbp,%rdx
  mov    $0x200,%esi
  mov    %rbx,%rdi
  movb   $0x0,(%rsp)
  call   <fgets@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %r12,%rsi
  mov    %rbx,%rdi
  mov    %eax,%edx
  call   <memcmp@plt>
  test   %rax,%rax
  je     L93
L64:
  mov    %rbx,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L104
  sub    $0x1,%eax
  mov    %rbx,%rdx
  lea    0x1(%rsp,%rax,1),%rax
  nopl   0x0(%rax)
L65:
  cmpb   $0x44,(%rdx)
  jne    L74
  movb   $0x45,(%rdx)
L74:
  add    $0x1,%rdx
  cmp    %rax,%rdx
  jne    L65
L104:
  mov    %rbx,%rdi
  mov    %r13,%rsi
  call   <fputs@plt>
  mov    %rbp,%rdi
  call   <feof@plt>
  test   %eax,%eax
  je     L8
L2:
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    %r13,%rdi
  call   <fclose@plt>
  test   %rax,%rax
  jne    L3
L63:
  mov    0x408(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L139
  add    $0x418,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L93:
  mov    %rbx,%rsi
  mov    %r15,%rdi
  call   <strcpy@plt>
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <strcpy@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %rbx,%rdi
  movslq %eax,%rsi
  call   <strcat@plt>
  jmp    L64
L114:
  mov    0x408(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L139
  mov    %r12,%rsi
  lea    D89(%rip),%rdi
L79:
  add    $0x418,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1130 <printf@plt>
L3:
  lea    D84(%rip),%rsi
  lea    D51(%rip),%rdi
  call   <printf@plt>
  jmp    L63
L58:
  mov    0x408(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L139
  lea    D84(%rip),%rsi
  lea    D34(%rip),%rdi
  jmp    L79
L139:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D24
type_guessed: string
name: read_data
arguments: label: D62
type_guessed: string
name: read_data
arguments: label: D84
type_guessed: string
name: read_data
arguments: label: D21
type_guessed: string
name: read_data
arguments: label: D73
type_guessed: string
name: read_data
arguments: label: D89
type_guessed: string
name: read_data
arguments: label: D51
type_guessed: string
name: read_data
arguments: label: D34
type_guessed: string

tool: D24: r

tool: D62: w

tool: D84: prool.tmp

tool: D21: PERMANENT GROUP

tool: D73: gr

tool: D89: prool_process_e: can't open input file `%s'


tool: D51: prool_process_e: can't close tmp file `%s'


tool: D34: prool_process_e: can't open tmp file `%s'


assistant: ```c
void process_e(char *filename) {
  FILE *f1, *f2;
  char buf[512], *pp;
  char tmp_buf[512];
  int i, len;
  f1 = fopen(filename, "r");
  if (f1 == NULL) {
    printf("prool_process_e: can't open input file `%s'\n", filename);
    return;
  }
  f2 = fopen("prool.tmp", "w");
  if (f2 == NULL) {
    printf("prool_process_e: can't open tmp file `%s'\n", "prool.tmp");
    return;
  }
  while (!feof(f1)) {
    buf[0] = 0;
    fgets(buf, 512, f1);
    if (memcmp(buf, "PERMANENT GROUP", strlen("PERMANENT GROUP")) == 0) {
      strcpy(tmp_buf, buf);
      strcpy(buf, "gr");
      strcat(buf, pp + strlen("PERMANENT GROUP"));
    }
    len = strlen(buf);
    for (i = 0; i < len; i++) {
      if (buf[i] == 'D')
        buf[i] = 'E';
    }
    fputs(buf, f2);
  }
  fclose(f1);
  if (fclose(f2)) {
    printf("prool_process_e: can't close tmp file `%s'\n", "prool.tmp");
    return;
  }
}
```