user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<Cmd_Exec_f>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  lea    -0x19000(%rsp),%r11
L99:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L99
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x19018(%rsp)
  xor    %eax,%eax
  call   <Cmd_Argc@plt>
  cmp    $0x2,%eax
  je     L33
  mov    0x19018(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L24
  lea    D24(%rip),%rdi
L82:
  add    $0x19020,%rsp
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1120 <Sys_Printf@plt>
  nopl   0x0(%rax)
L33:
  mov    $0x1,%edi
  call   <Cmd_Argv@plt>
  mov    %rax,%rdi
  mov    %rax,%rbp
  call   <FS_SafePath@plt>
  test   %eax,%eax
  je     L91
  mov    %rbp,%rdi
  call   <FS_FileExtension@plt>
  lea    D2(%rip),%rdi
  mov    %eax,%esi
  call   <strcasecmp@plt>
  test   %rax,%rax
  jne    L110
  lea    0xc(%rsp),%r13
  lea    0x10(%rsp),%r12
  mov    %rbp,%rsi
  movl   $0x19000,0xc(%rsp)
  mov    %r13,%rcx
  mov    %r12,%rdx
  lea    D74(%rip),%rdi
  call   <FS_ReadFile@plt>
  test   %eax,%eax
  je     L77
L85:
  lea    D60(%rip),%rdi
  mov    %rbp,%rsi
  xor    %eax,%eax
  call   <Sys_Printf@plt>
  mov    %r12,%rdi
  call   <Cbuf_InsertText@plt>
L97:
  mov    0x19018(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L24
  add    $0x19020,%rsp
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L91:
  mov    0x19018(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L24
  lea    D22(%rip),%rdi
  jmp    L82
  nop
L77:
  mov    %r13,%rcx
  mov    %r12,%rdx
  lea    D21(%rip),%rdi
  mov    %rbp,%rsi
  movl   $0x19000,0xc(%rsp)
  call   <FS_ReadFile@plt>
  test   %eax,%eax
  jne    L85
  mov    %rbp,%rsi
  lea    D19(%rip),%rdi
  call   <Sys_Printf@plt>
  jmp    L97
  nopl   0x0(%rax)
L110:
  mov    0x19018(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L24
  lea    D63(%rip),%rdi
  jmp    L82
L24:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D24
type_infered: string
name: disassemble_data
arguments: tag: D2
type_infered: string
name: disassemble_data
arguments: tag: D74
type_infered: string
name: disassemble_data
arguments: tag: D60
type_infered: string
name: disassemble_data
arguments: tag: D22
type_infered: string
name: disassemble_data
arguments: tag: D21
type_infered: string
name: disassemble_data
arguments: tag: D19
type_infered: string
name: disassemble_data
arguments: tag: D63
type_infered: string

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


tool: D2: .cfg

tool: D74: qwfwd

tool: D60: execing %s


tool: D22: exec: absolute paths are prohibited


tool: D21: qw

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


tool: D63: exec: cfg extension required


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