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

```asm
<SV_CopySaveGame>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x238,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%r14
  mov    %fs:0x28,%rax
  mov    %rax,0x228(%rsp)
  xor    %eax,%eax
  mov    %rsi,%rdx
  mov    %rdi,%rsi
  lea    D65(%rip),%rdi
  call   <Com_DPrintf@plt>
  mov    %r14,%rdi
  call   <SV_WipeSavegame@plt>
  mov    $0x0,%eax
  call   <FS_Gamedir@plt>
  mov    %eax,%ecx
  lea    0x20(%rsp),%r12
  mov    %rbp,%r8
  lea    D58(%rip),%r13
  mov    %r13,%rdx
  mov    $0x100,%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <Com_sprintf@plt>
  mov    $0x0,%eax
  call   <FS_Gamedir@plt>
  mov    %eax,%ecx
  lea    0x120(%rsp),%rbx
  mov    %r14,%r8
  mov    %r13,%rdx
  mov    $0x100,%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <Com_sprintf@plt>
  mov    %rbx,%rdi
  call   <FS_CreatePath@plt>
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <CopyFile@plt>
  mov    $0x0,%eax
  call   <FS_Gamedir@plt>
  mov    %eax,%ecx
  mov    %rbp,%r8
  lea    D84(%rip),%r13
  mov    %r13,%rdx
  mov    $0x100,%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <Com_sprintf@plt>
  mov    $0x0,%eax
  call   <FS_Gamedir@plt>
  mov    %eax,%ecx
  mov    %r14,%r8
  mov    %r13,%rdx
  mov    $0x100,%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <Com_sprintf@plt>
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <CopyFile@plt>
  lea    D60(%rip),%rsi
  mov    %r14,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L14
L40:
  mov    $0x0,%eax
  call   <FS_Gamedir@plt>
  mov    %eax,%ecx
  lea    0x20(%rsp),%r12
  mov    %rbp,%r8
  lea    D34(%rip),%rdx
  mov    $0x100,%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <Com_sprintf@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  mov    $0x0,%eax
  call   <FS_Gamedir@plt>
  mov    %eax,%ecx
  mov    %rbp,%r8
  lea    D33(%rip),%rdx
  mov    $0x100,%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <Com_sprintf@plt>
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <Sys_FindFirst@plt>
  test   %rax,%rax
  je     L45
  movslq %ebx,%rcx
  mov    %rcx,0x8(%rsp)
  mov    $0x100,%r15d
  mov    %r15d,%esi
  sub    %ebx,%esi
  mov    %esi,0x14(%rsp)
  lea    (%r12,%rcx,1),%rbx
  mov    %rbx,0x18(%rsp)
L35:
  mov    0x8(%rsp),%rcx
  lea    (%rax,%rcx,1),%rbp
  mov    0x14(%rsp),%edx
  mov    %rbp,%rsi
  mov    0x18(%rsp),%rdi
  call   <Q_strncpyz@plt>
  mov    $0x0,%eax
  call   <FS_Gamedir@plt>
  mov    %eax,%ecx
  lea    0x120(%rsp),%rbx
  mov    %rbp,%r9
  mov    %r14,%r8
  lea    D17(%rip),%rdx
  mov    %r15d,%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <Com_sprintf@plt>
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <CopyFile@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    $0x103,%ebp
  mov    %ebp,%edx
  sub    %eax,%edx
  cltq
  lea    -0x3(%r12,%rax,1),%rdi
  lea    D53(%rip),%r13
  mov    %r13,%rsi
  call   <Q_strncpyz@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %ebp,%edx
  sub    %eax,%edx
  cltq
  lea    -0x3(%rbx,%rax,1),%rdi
  mov    %r13,%rsi
  call   <Q_strncpyz@plt>
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <CopyFile@plt>
  mov    $0x0,%esi
  mov    $0x0,%edi
  call   <Sys_FindNext@plt>
  test   %rax,%rax
  jne    L35
L45:
  mov    $0x0,%eax
  call   <Sys_FindClose@plt>
  mov    0x228(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  add    $0x238,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L14:
  mov    $0x0,%eax
  call   <FS_Gamedir@plt>
  mov    %eax,%ecx
  mov    %r12,%rbx
  mov    %rbp,%r8
  lea    D56(%rip),%r12
  mov    %r12,%rdx
  mov    $0x100,%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <Com_sprintf@plt>
  mov    $0x0,%eax
  call   <FS_Gamedir@plt>
  mov    %eax,%ecx
  lea    0x120(%rsp),%r13
  mov    %r14,%r8
  mov    %r12,%rdx
  mov    $0x100,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <Com_sprintf@plt>
  mov    %r13,%rsi
  mov    %rbx,%rdi
  call   <CopyFile@plt>
  jmp    L40
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D65
datatype: string
name: retrieve_data
arguments: tag: D58
datatype: string
name: retrieve_data
arguments: tag: D84
datatype: string
name: retrieve_data
arguments: tag: D60
datatype: string
name: retrieve_data
arguments: tag: D34
datatype: string
name: retrieve_data
arguments: tag: D33
datatype: string
name: retrieve_data
arguments: tag: D17
datatype: string
name: retrieve_data
arguments: tag: D53
datatype: string
name: retrieve_data
arguments: tag: D56
datatype: string

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


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

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

tool: D60: kmq2save0

tool: D34: %s/save/%s/

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

tool: D17: %s/save/%s/%s

tool: D53: sv2

tool: D56: %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();
}
```