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

```asm
<check_tpl>:
  endbr64
  push   %r15
  lea    D61(%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     L38
  mov    %rax,%rbp
  lea    0x30(%rsp),%rbx
  lea    D10(%rip),%r12
  nop
L50:
  mov    %rbp,%rdx
  mov    $0x140,%esi
  mov    %rbx,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L47
  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    L147
L126:
  mov    %r14,%rdi
  call   <strlen@plt>
  cmp    $0x13,%eax
  jle    L50
  mov    %r14,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  js     L28
  cltq
  jmp    L144
  cs nopw 0x0(%rax,%rax,1)
L30:
  sub    $0x1,%rax
  test   %eax,%eax
  js     L28
L144:
  cmpb   $0x9,(%r14,%rax,1)
  jne    L30
  lea    D53(%rip),%rdi
  call   <puts@plt>
  mov    %r13,%rdx
  mov    %r14,%rsi
  xor    %eax,%eax
  lea    D32(%rip),%rdi
  call   <printf@plt>
  mov    $0xffffffff,%eax
L47:
  mov    0x2b8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L129
  add    $0x2c8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L147:
  mov    %r14,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L126
  movslq %eax,%rcx
  sub    $0x1,%eax
  lea    (%r14,%rcx,1),%rdx
  lea    0x16f(%rsp,%rcx,1),%rcx
  sub    %rax,%rcx
  nopl   (%rax)
L123:
  movzbl -0x1(%rdx),%eax
  cmp    $0x20,%al
  je     L5
  cmp    $0x9,%al
  jne    L126
L5:
  movb   $0x0,-0x1(%rdx)
  sub    $0x1,%rdx
  cmp    %rcx,%rdx
  jne    L123
  jmp    L126
  nopw   0x0(%rax,%rax,1)
L28:
  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    D9(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D36(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L47
L38:
  mov    %r13,%rsi
  lea    D51(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L47
L129:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D61
type: string
name: parse_data
arguments: data_tag: D10
type: string
name: parse_data
arguments: data_tag: D53
type: string
name: parse_data
arguments: data_tag: D32
type: string
name: parse_data
arguments: data_tag: D9
type: string
name: parse_data
arguments: data_tag: D36
type: string
name: parse_data
arguments: data_tag: D51
type: string

tool: D61: r

tool: D10: ATOMNAME 

tool: D53: 
   Tab charater is not recognized by MCCE

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


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


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

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