user: Converte this assembly snippet into its equivalent C code:

```asm
<Cmd_Exec_f>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    -0x19000(%rsp),%r11
L30:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L30
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    $0x0,%eax
  call   <Cmd_Argc@plt>
  cmp    $0x2,%eax
  je     L0
  lea    D71(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <Sys_Printf@plt>
  jmp    L29
L0:
  mov    $0x1,%edi
  call   <Cmd_Argv@plt>
  mov    %rax,-0x19018(%rbp)
  mov    -0x19018(%rbp),%rax
  mov    %rax,%rdi
  call   <FS_SafePath@plt>
  test   %eax,%eax
  jne    L9
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <Sys_Printf@plt>
  jmp    L29
L9:
  mov    -0x19018(%rbp),%rax
  mov    %rax,%rdi
  call   <FS_FileExtension@plt>
  mov    %eax,%esi
  lea    D68(%rip),%rax
  mov    %rax,%rdi
  call   <strcasecmp@plt>
  test   %rax,%rax
  je     L73
  lea    D44(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <Sys_Printf@plt>
  jmp    L29
L73:
  movl   $0x19000,-0x1901c(%rbp)
  lea    -0x1901c(%rbp),%rcx
  lea    -0x19010(%rbp),%rdx
  mov    -0x19018(%rbp),%rax
  mov    %rax,%rsi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <FS_ReadFile@plt>
  test   %eax,%eax
  jne    L45
  movl   $0x19000,-0x1901c(%rbp)
  lea    -0x1901c(%rbp),%rcx
  lea    -0x19010(%rbp),%rdx
  mov    -0x19018(%rbp),%rax
  mov    %rax,%rsi
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <FS_ReadFile@plt>
  test   %eax,%eax
  jne    L45
  mov    -0x19018(%rbp),%rax
  mov    %rax,%rsi
  lea    D26(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <Sys_Printf@plt>
  jmp    L29
L45:
  mov    -0x19018(%rbp),%rax
  mov    %rax,%rsi
  lea    D46(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <Sys_Printf@plt>
  lea    -0x19010(%rbp),%rax
  mov    %rax,%rdi
  call   <Cbuf_InsertText@plt>
L29:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L75
  call   <__stack_chk_fail@plt>
L75:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D71
type_infered: string
name: extract_symbolic_data
arguments: data_label: D35
type_infered: string
name: extract_symbolic_data
arguments: data_label: D68
type_infered: string
name: extract_symbolic_data
arguments: data_label: D44
type_infered: string
name: extract_symbolic_data
arguments: data_label: D4
type_infered: string
name: extract_symbolic_data
arguments: data_label: D10
type_infered: string
name: extract_symbolic_data
arguments: data_label: D26
type_infered: string
name: extract_symbolic_data
arguments: data_label: D46
type_infered: string

tool: D71: exec <filename> : execute a script file


tool: D35: exec: absolute paths are prohibited


tool: D68: .cfg

tool: D44: exec: cfg extension required


tool: D4: qwfwd

tool: D10: qw

tool: D26: exec: couldn't exec %s


tool: D46: execing %s


assistant: ```c
void Cmd_Exec_f(void) {
  char buf[1024 * 100], *name;
  int size;
  if (Cmd_Argc() != 2) {
    Sys_Printf("exec <filename> : execute a script file\n");
    return;
  }
  name = Cmd_Argv(1);
  if (!FS_SafePath(name)) {
    Sys_Printf("exec: absolute paths are prohibited\n");
    return;
  }
  if (strcasecmp(".cfg", FS_FileExtension(name))) {
    Sys_Printf("exec: cfg extension required\n");
    return;
  }
  size = sizeof(buf);
  if (!FS_ReadFile("qwfwd", name, buf, &size)) {
    size = sizeof(buf);
    if (!FS_ReadFile("qw", name, buf, &size)) {
      Sys_Printf("exec: couldn't exec %s\n", name);
      return;
    }
  }
  Sys_Printf("execing %s\n", name);
  Cbuf_InsertText(buf);
}
```