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

```asm
<SV_CopySaveGame>:
  endbr64
  push   %r15
  mov    %rsi,%rdx
  push   %r14
  lea    D32(%rip),%r14
  push   %r13
  mov    %rsi,%r13
  mov    %rdi,%rsi
  push   %r12
  mov    %rdi,%r12
  lea    D62(%rip),%rdi
  push   %rbp
  push   %rbx
  sub    $0x238,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x228(%rsp)
  xor    %eax,%eax
  lea    0x20(%rsp),%rbp
  lea    0x120(%rsp),%rbx
  call   <Com_DPrintf@plt>
  mov    %r13,%rdi
  call   <SV_WipeSavegame@plt>
  xor    %eax,%eax
  call   <FS_Gamedir@plt>
  mov    %r14,%rdx
  mov    %r12,%r8
  mov    $0x100,%esi
  mov    %eax,%ecx
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <Com_sprintf@plt>
  xor    %eax,%eax
  call   <FS_Gamedir@plt>
  mov    %r14,%rdx
  mov    %r13,%r8
  mov    $0x100,%esi
  mov    %eax,%ecx
  mov    %rbx,%rdi
  lea    D76(%rip),%r14
  xor    %eax,%eax
  call   <Com_sprintf@plt>
  mov    %rbx,%rdi
  call   <FS_CreatePath@plt>
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <CopyFile@plt>
  xor    %eax,%eax
  call   <FS_Gamedir@plt>
  mov    %r12,%r8
  mov    %r14,%rdx
  mov    $0x100,%esi
  mov    %eax,%ecx
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <Com_sprintf@plt>
  xor    %eax,%eax
  call   <FS_Gamedir@plt>
  mov    %r13,%r8
  mov    %r14,%rdx
  mov    $0x100,%esi
  mov    %eax,%ecx
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <Com_sprintf@plt>
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <CopyFile@plt>
  lea    D16(%rip),%rsi
  mov    %r13,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L40
L9:
  xor    %eax,%eax
  call   <FS_Gamedir@plt>
  mov    %r12,%r8
  mov    $0x100,%esi
  mov    %rbp,%rdi
  mov    %eax,%ecx
  lea    D30(%rip),%rdx
  xor    %eax,%eax
  call   <Com_sprintf@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %eax,%r14d
  xor    %eax,%eax
  call   <FS_Gamedir@plt>
  mov    %r12,%r8
  mov    $0x100,%esi
  mov    %rbp,%rdi
  mov    %eax,%ecx
  lea    D13(%rip),%rdx
  xor    %eax,%eax
  call   <Com_sprintf@plt>
  xor    %edx,%edx
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <Sys_FindFirst@plt>
  mov    %rax,%r9
  test   %rax,%rax
  je     L46
  mov    $0x100,%eax
  lea    D63(%rip),%r12
  sub    %r14d,%eax
  mov    %eax,0x1c(%rsp)
  movslq %r14d,%rax
  lea    D52(%rip),%r14
  mov    %rax,0x10(%rsp)
  lea    0x0(%rbp,%rax,1),%r15
  nop
L38:
  add    0x10(%rsp),%r9
  mov    0x1c(%rsp),%edx
  mov    %r15,%rdi
  mov    %r9,%rsi
  mov    %r9,0x8(%rsp)
  call   <Q_strncpyz@plt>
  xor    %eax,%eax
  call   <FS_Gamedir@plt>
  mov    0x8(%rsp),%r9
  mov    %r13,%r8
  mov    %r14,%rdx
  mov    %eax,%ecx
  mov    $0x100,%esi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <Com_sprintf@plt>
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <CopyFile@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    $0x103,%edx
  mov    %r12,%rsi
  sub    %eax,%edx
  cltq
  lea    -0x3(%rbp,%rax,1),%rdi
  call   <Q_strncpyz@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    $0x103,%edx
  mov    %r12,%rsi
  sub    %eax,%edx
  cltq
  lea    -0x3(%rbx,%rax,1),%rdi
  call   <Q_strncpyz@plt>
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <CopyFile@plt>
  xor    %esi,%esi
  xor    %edi,%edi
  call   <Sys_FindNext@plt>
  mov    %rax,%r9
  test   %rax,%rax
  jne    L38
L46:
  xor    %eax,%eax
  call   <Sys_FindClose@plt>
  mov    0x228(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L10
  add    $0x238,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L40:
  xor    %eax,%eax
  lea    D66(%rip),%r14
  call   <FS_Gamedir@plt>
  mov    %r12,%r8
  mov    %r14,%rdx
  mov    %rbp,%rdi
  mov    %eax,%ecx
  mov    $0x100,%esi
  xor    %eax,%eax
  call   <Com_sprintf@plt>
  xor    %eax,%eax
  call   <FS_Gamedir@plt>
  mov    %rbx,%rdi
  mov    %r13,%r8
  mov    %r14,%rdx
  mov    %eax,%ecx
  mov    $0x100,%esi
  xor    %eax,%eax
  call   <Com_sprintf@plt>
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <CopyFile@plt>
  jmp    L9
L10:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D32
datatype: string
name: disassemble_data
arguments: tag: D62
datatype: string
name: disassemble_data
arguments: tag: D76
datatype: string
name: disassemble_data
arguments: tag: D16
datatype: string
name: disassemble_data
arguments: tag: D30
datatype: string
name: disassemble_data
arguments: tag: D13
datatype: string
name: disassemble_data
arguments: tag: D63
datatype: string
name: disassemble_data
arguments: tag: D52
datatype: string
name: disassemble_data
arguments: tag: D66
datatype: string

tool: D32: %s/save/%s/server.ssv

tool: D62: SV_CopySaveGame(%s, %s)


tool: D76: %s/save/%s/game.ssv

tool: D16: kmq2save0

tool: D30: %s/save/%s/

tool: D13: %s/save/%s/*.sav

tool: D63: sv2

tool: D52: %s/save/%s/%s

tool: D66: %s/save/%s/shot.jpg

assistant: ```c
void SV_CopySaveGame(char *src, char *dst) {
  char name[256], name2[256];
  int l, len;
  char *found;
  Com_DPrintf("SV_CopySaveGame(%s, %s)\n", src, dst);
  SV_WipeSavegame(dst);
  Com_sprintf(name, sizeof(name), "%s/save/%s/server.ssv", FS_Gamedir(), src);
  Com_sprintf(name2, sizeof(name2), "%s/save/%s/server.ssv", FS_Gamedir(), dst);
  FS_CreatePath(name2);
  CopyFile(name, name2);
  Com_sprintf(name, sizeof(name), "%s/save/%s/game.ssv", FS_Gamedir(), src);
  Com_sprintf(name2, sizeof(name2), "%s/save/%s/game.ssv", FS_Gamedir(), dst);
  CopyFile(name, name2);
  if (strcmp(dst, "kmq2save0")) {
    Com_sprintf(name, sizeof(name), "%s/save/%s/shot.jpg", FS_Gamedir(), src);
    Com_sprintf(name2, sizeof(name2), "%s/save/%s/shot.jpg", FS_Gamedir(), dst);
    CopyFile(name, name2);
  }
  Com_sprintf(name, sizeof(name), "%s/save/%s/", FS_Gamedir(), src);
  len = strlen(name);
  Com_sprintf(name, sizeof(name), "%s/save/%s/*.sav", FS_Gamedir(), src);
  found = Sys_FindFirst(name, 0, 0);
  while (found) {
    Q_strncpyz(name + len, found + len, sizeof(name) - len);
    Com_sprintf(name2, sizeof(name2), "%s/save/%s/%s", FS_Gamedir(), dst, found + len);
    CopyFile(name, name2);
    l = strlen(name);
    Q_strncpyz(name + l - 3, "sv2", sizeof(name) - l + 3);
    l = strlen(name2);
    Q_strncpyz(name2 + l - 3, "sv2", sizeof(name2) - l + 3);
    CopyFile(name, name2);
    found = Sys_FindNext(0, 0);
  }
  Sys_FindClose();
}
```