user: Translate the below assembly code into C programming language:

```asm
<check_tpl>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x2d0,%rsp
  mov    %rdi,-0x2c8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x2c8(%rbp),%rax
  lea    D62(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x2b0(%rbp)
  cmpq   $0x0,-0x2b0(%rbp)
  jne    L26
  mov    -0x2c8(%rbp),%rax
  mov    %rax,%rsi
  lea    D48(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L8
L92:
  lea    -0x150(%rbp),%rax
  mov    $0x140,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x290(%rbp),%rdx
  lea    -0x150(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <rm_comment@plt>
  lea    -0x150(%rbp),%rax
  mov    $0x9,%edx
  lea    D27(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L11
  lea    -0x150(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  mov    %eax,-0x2b4(%rbp)
  jmp    L3
L114:
  mov    -0x2b4(%rbp),%eax
  cltq
  movzbl -0x150(%rbp,%rax,1),%eax
  cmp    $0x20,%al
  jne    L103
  mov    -0x2b4(%rbp),%eax
  cltq
  movb   $0x0,-0x150(%rbp,%rax,1)
  jmp    L31
L103:
  mov    -0x2b4(%rbp),%eax
  cltq
  movzbl -0x150(%rbp,%rax,1),%eax
  cmp    $0x9,%al
  jne    L155
  mov    -0x2b4(%rbp),%eax
  cltq
  movb   $0x0,-0x150(%rbp,%rax,1)
L31:
  subl   $0x1,-0x2b4(%rbp)
L3:
  cmpl   $0x0,-0x2b4(%rbp)
  jns    L114
  jmp    L11
L155:
  nop
L11:
  lea    -0x150(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    $0x13,%eax
  jg     L2
  jmp    L26
L2:
  lea    -0x150(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  mov    %eax,-0x2b4(%rbp)
  jmp    L87
L167:
  mov    -0x2b4(%rbp),%eax
  cltq
  movzbl -0x150(%rbp,%rax,1),%eax
  cmp    $0x9,%al
  jne    L101
  lea    D34(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x2c8(%rbp),%rdx
  lea    -0x150(%rbp),%rax
  mov    %rax,%rsi
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L8
L101:
  subl   $0x1,-0x2b4(%rbp)
L87:
  cmpl   $0x0,-0x2b4(%rbp)
  jns    L167
  lea    -0x150(%rbp),%rcx
  lea    -0x29a(%rbp),%rax
  mov    $0x9,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  movb   $0x0,-0x291(%rbp)
  lea    -0x150(%rbp),%rax
  add    $0x9,%rax
  lea    -0x2a1(%rbp),%rcx
  mov    $0x6,%edx
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <strncpy@plt>
  movb   $0x0,-0x29b(%rbp)
  lea    -0x150(%rbp),%rax
  add    $0xf,%rax
  lea    -0x2a7(%rbp),%rcx
  mov    $0x5,%edx
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <strncpy@plt>
  movb   $0x0,-0x2a2(%rbp)
  lea    -0x2a7(%rbp),%rdx
  lea    -0x2a1(%rbp),%rcx
  lea    -0x29a(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <param_exist@plt>
  test   %rax,%rax
  je     L26
  lea    -0x150(%rbp),%rdx
  mov    -0x2c8(%rbp),%rax
  mov    %rax,%rsi
  lea    D31(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  jmp    L8
L26:
  mov    -0x2b0(%rbp),%rdx
  lea    -0x290(%rbp),%rax
  mov    $0x140,%esi
  mov    %rax,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  jne    L92
  mov    $0x0,%eax
L8:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L141
  call   <__stack_chk_fail@plt>
L141:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D62
data_type: string
name: disassemble_data
arguments: data_tag: D48
data_type: string
name: disassemble_data
arguments: data_tag: D27
data_type: string
name: disassemble_data
arguments: data_tag: D34
data_type: string
name: disassemble_data
arguments: data_tag: D1
data_type: string
name: disassemble_data
arguments: data_tag: D31
data_type: string
name: disassemble_data
arguments: data_tag: D7
data_type: string

tool: D62: r

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


tool: D27: ATOMNAME 

tool: D34: 
   Tab charater is not recognized by MCCE

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


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


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

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