user: 请从给定的汇编指令推导出C源代码：

```asm
<check_tpl>:
  endbr64
  push   %r15
  lea    D55(%rip),%rsi
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x2c8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x2b8(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  test   %rax,%rax
  je     L107
  mov    %rax,%rbp
  lea    0x30(%rsp),%rbx
  lea    D38(%rip),%r12
  nop
L50:
  mov    %rbp,%rdx
  mov    $0x140,%esi
  mov    %rbx,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L13
  lea    0x170(%rsp),%r14
  mov    $0x140,%edx
  xor    %esi,%esi
  mov    %r14,%rdi
  call   <memset@plt>
  mov    %rbx,%rsi
  mov    %r14,%rdi
  call   <rm_comment@plt>
  mov    $0x9,%edx
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L27
L24:
  mov    %r14,%rdi
  call   <strlen@plt>
  cmp    $0x13,%eax
  jle    L50
  mov    %r14,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  js     L158
  cltq
  jmp    L66
  cs nopw 0x0(%rax,%rax,1)
L42:
  sub    $0x1,%rax
  test   %eax,%eax
  js     L158
L66:
  cmpb   $0x9,(%r14,%rax,1)
  jne    L42
  lea    D57(%rip),%rdi
  call   <puts@plt>
  mov    %r13,%rdx
  mov    %r14,%rsi
  xor    %eax,%eax
  lea    D37(%rip),%rdi
  call   <printf@plt>
  mov    $0xffffffff,%eax
L13:
  mov    0x2b8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L44
  add    $0x2c8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L27:
  mov    %r14,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L24
  movslq %eax,%rcx
  sub    $0x1,%eax
  lea    (%r14,%rcx,1),%rdx
  lea    0x16f(%rsp,%rcx,1),%rcx
  sub    %rax,%rcx
  nopl   (%rax)
L62:
  movzbl -0x1(%rdx),%eax
  cmp    $0x20,%al
  je     L8
  cmp    $0x9,%al
  jne    L24
L8:
  movb   $0x0,-0x1(%rdx)
  sub    $0x1,%rdx
  cmp    %rcx,%rdx
  jne    L62
  jmp    L24
  nopw   0x0(%rax,%rax,1)
L158:
  lea    0x26(%rsp),%r15
  mov    $0x9,%edx
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <strncpy@plt>
  lea    0x1f(%rsp),%r8
  mov    $0x6,%edx
  lea    0x179(%rsp),%rsi
  mov    %r8,%rdi
  mov    %r8,0x8(%rsp)
  movb   $0x0,0x2f(%rsp)
  call   <strncpy@plt>
  lea    0x19(%rsp),%r9
  mov    $0x5,%edx
  lea    0x17f(%rsp),%rsi
  mov    %r9,%rdi
  movb   $0x0,0x25(%rsp)
  mov    %r9,(%rsp)
  call   <strncpy@plt>
  mov    (%rsp),%rdx
  mov    0x8(%rsp),%rsi
  mov    %r15,%rdi
  movb   $0x0,0x1e(%rsp)
  call   <param_exist@plt>
  test   %rax,%rax
  je     L50
  mov    %r14,%rdx
  mov    %r13,%rsi
  lea    D44(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D21(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L13
L107:
  mov    %r13,%rsi
  lea    D19(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L13
L44:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D55
datatype: string
name: read_data
arguments: tag: D38
datatype: string
name: read_data
arguments: tag: D57
datatype: string
name: read_data
arguments: tag: D37
datatype: string
name: read_data
arguments: tag: D44
datatype: string
name: read_data
arguments: tag: D21
datatype: string
name: read_data
arguments: tag: D19
datatype: string

tool: D55: r

tool: D38: ATOMNAME 

tool: D57: 
   Tab charater is not recognized by MCCE

tool: D37:    Please check line "%s" in file "%s" and replace tab with spaces


tool: D44: 
   In file %s, parameter "%s" is already loaded somewhere else.


tool: D21:    Try delete this entry and run MCCE again

tool: D19: 
check_tpl(): failed oppening file "%s".


assistant: ```c
int check_tpl(char *fname) {
  FILE *fp;
  char sbuff[320];
  char line[320];
  char key1[9 + 1];
  char key2[6 + 1];
  char key3[5 + 1];
  int i;
  if ((fp = fopen(fname, "r")) == NULL) {
    printf("\ncheck_tpl(): failed oppening file \"%s\".\n", fname);
    return -1;
  }
  while (fgets(sbuff, 320 * sizeof(char), fp)) {
    memset(line, 0, 320 * sizeof(char));
    rm_comment(line, sbuff);
    if (strncmp(line, "ATOMNAME ", 9)) {
      for (i = strlen(line) - 1; i >= 0; i--) {
        if (line[i] == ' ')
          line[i] = '\0';
        else if (line[i] == '\t')
          line[i] = '\0';
        else
          break;
      }
    }
    if (strlen(line) < (9 + 6 + 5))
      continue;
    for (i = strlen(line) - 1; i >= 0; i--) {
      if (line[i] == '\t') {
        printf("\n   Tab charater is not recognized by MCCE\n");
        printf("   Please check line \"%s\" in file \"%s\" and replace tab with spaces\n", line, fname);
        return -1;
      }
    }
    strncpy(key1, line, 9);
    key1[9] = '\0';
    strncpy(key2, line + 9, 6);
    key2[6] = '\0';
    strncpy(key3, line + 9 + 6, 5);
    key3[5] = '\0';
    if (param_exist(key1, key2, key3)) {
      printf("\n   In file %s, parameter \"%s\" is already loaded somewhere else.\n", fname, line);
      printf("   Try delete this entry and run MCCE again\n");
      return 0;
    }
  }
  return 0;
}
```