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

```asm
<check_tpl>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x2b8,%rsp
  mov    %rdi,%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x2a8(%rsp)
  xor    %eax,%eax
  lea    D60(%rip),%rsi
  call   <fopen@plt>
  test   %rax,%rax
  je     L76
  mov    %rax,%rbx
  lea    D69(%rip),%rbp
L138:
  lea    0x20(%rsp),%rdi
  mov    %rbx,%rdx
  mov    $0x140,%esi
  call   <fgets@plt>
  test   %rax,%rax
  je     L110
  lea    0x160(%rsp),%r13
  mov    $0x140,%edx
  mov    $0x0,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  lea    0x20(%rsp),%rsi
  mov    %r13,%rdi
  call   <rm_comment@plt>
  mov    $0x9,%edx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L30
L29:
  lea    0x160(%rsp),%rdi
  call   <strlen@plt>
  cmp    $0x13,%eax
  jle    L138
  lea    0x160(%rsp),%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  js     L111
  cltq
  lea    0x160(%rsp),%rdx
L31:
  cmpb   $0x9,(%rax,%rdx,1)
  je     L120
  sub    $0x1,%rax
  test   %eax,%eax
  jns    L31
L111:
  lea    0x160(%rsp),%rsi
  lea    0x16(%rsp),%r13
  mov    $0x9,%edx
  mov    %r13,%rdi
  call   <strncpy@plt>
  movb   $0x0,0x1f(%rsp)
  lea    0x169(%rsp),%rsi
  lea    0xf(%rsp),%r14
  mov    $0x6,%edx
  mov    %r14,%rdi
  call   <strncpy@plt>
  movb   $0x0,0x15(%rsp)
  lea    0x16f(%rsp),%rsi
  lea    0x9(%rsp),%r15
  mov    $0x5,%edx
  mov    %r15,%rdi
  call   <strncpy@plt>
  movb   $0x0,0xe(%rsp)
  mov    %r15,%rdx
  mov    %r14,%rsi
  mov    %r13,%rdi
  call   <param_exist@plt>
  test   %rax,%rax
  je     L138
  lea    0x160(%rsp),%rdx
  mov    %r12,%rsi
  lea    D46(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D10(%rip),%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  jmp    L110
L76:
  mov    %r12,%rsi
  lea    D54(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L110
L30:
  mov    %r13,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L29
  movslq %eax,%rcx
  lea    0x160(%rsp,%rcx,1),%rdx
  lea    0x15f(%rsp,%rcx,1),%rsi
  lea    -0x1(%rax),%eax
  sub    %rax,%rsi
  jmp    L0
L1:
  movb   $0x0,-0x1(%rcx)
  sub    $0x1,%rdx
  cmp    %rsi,%rdx
  je     L29
L0:
  mov    %rdx,%rcx
  movzbl -0x1(%rdx),%eax
  cmp    $0x20,%al
  je     L1
  cmp    $0x9,%al
  je     L1
  jmp    L29
L120:
  lea    D14(%rip),%rdi
  call   <puts@plt>
  lea    0x160(%rsp),%rsi
  mov    %r12,%rdx
  lea    D51(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
L110:
  mov    0x2a8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L63
  add    $0x2b8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L63:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D60
type: string
name: retrieve_data
arguments: label: D69
type: string
name: retrieve_data
arguments: label: D46
type: string
name: retrieve_data
arguments: label: D10
type: string
name: retrieve_data
arguments: label: D54
type: string
name: retrieve_data
arguments: label: D14
type: string
name: retrieve_data
arguments: label: D51
type: string

tool: D60: r

tool: D69: ATOMNAME 

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


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

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


tool: D14: 
   Tab charater is not recognized by MCCE

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


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;
}
```