user: What is the c source code of the assembly code below:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x238,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x228(%rsp)
  xor    %eax,%eax
  cmp    $0x2,%edi
  jle    L77
  movslq %edi,%rax
  mov    %edi,%r14d
  lea    0x1c(%rsp),%r12
  mov    %rsi,%rbp
  lea    -0x8(%rsi,%rax,8),%r13
  mov    %r12,%rsi
  mov    0x0(%r13),%rdi
  call   <stat@plt>
  test   %rax,%rax
  je     L12
L48:
  cmp    $0x3,%r14d
  jne    L37
  lea    0x8(%rbp),%rbx
  lea    D21(%rip),%r15
  add    $0x10,%rbp
  jmp    L39
  nopl   0x0(%rax)
L46:
  mov    0x0(%r13),%rsi
  lea    0x20(%rsp),%r14
  mov    $0x1ff,%edx
  add    $0x8,%rbx
  mov    %r14,%rdi
  call   <strncpy@plt>
  mov    -0x8(%rbx),%rdi
  mov    %r14,%rsi
  call   <rename@plt>
  cmp    %rbx,%rbp
  je     L83
L39:
  mov    (%rbx),%rdi
  mov    %r12,%rsi
  call   <stat@plt>
  test   %rax,%rax
  jns    L46
  mov    (%rbx),%rsi
  mov    %r15,%rdi
  xor    %eax,%eax
  add    $0x8,%rbx
  call   <printf@plt>
  cmp    %rbx,%rbp
  jne    L39
  nopl   0x0(%rax)
L83:
  mov    0x228(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L99
  add    $0x238,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L12:
  testb  $0x40,0x1d(%rsp)
  je     L48
  lea    -0x3(%r14),%eax
  lea    0x8(%rbp),%rbx
  lea    0x10(%rbp,%rax,8),%rax
  lea    D8(%rip),%r15
  mov    %rax,0x8(%rsp)
  lea    0x20(%rsp),%rbp
  jmp    L120
  nopl   0x0(%rax)
L76:
  mov    0x0(%r13),%rsi
  mov    $0x1ff,%edx
  mov    %rbp,%rdi
  mov    $0x1ff,%r14d
  call   <strncpy@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %r14d,%edx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  sub    %eax,%edx
  call   <strncat@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    (%rbx),%rsi
  mov    %r14d,%edx
  mov    %rbp,%rdi
  sub    %eax,%edx
  call   <strncat@plt>
  mov    (%rbx),%rdi
  mov    %rbp,%rsi
  call   <rename@plt>
L23:
  add    $0x8,%rbx
  cmp    0x8(%rsp),%rbx
  je     L83
L120:
  mov    (%rbx),%rdi
  mov    %r12,%rsi
  call   <stat@plt>
  test   %rax,%rax
  jns    L76
  mov    (%rbx),%rsi
  lea    D21(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L23
L77:
  lea    D34(%rip),%rdi
  call   <puts@plt>
  lea    D28(%rip),%rdi
  call   <puts@plt>
  jmp    L83
L37:
  mov    0x0(%r13),%rsi
  lea    D24(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L83
L99:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D21
type_infered: string
name: extract_symbolic_data
arguments: data_label: D8
type_infered: string
name: extract_symbolic_data
arguments: data_label: D34
type_infered: string
name: extract_symbolic_data
arguments: data_label: D28
type_infered: string
name: extract_symbolic_data
arguments: data_label: D24
type_infered: string

tool: D21: mv: cannot stat %s


tool: D8: /

tool: D34: mv: file1 file.. dest dir

tool: D28: mv: file1 file2

tool: D24: mv: for multiple files, dest %s should be a directory


assistant: ```c
int main(int argc, char *argv[]) {
  struct stat st;
  int dst_exists = 0, dst_isdir = 0;
  int i, err;
  char buf[512];
  if (argc < 3) {
    printf("mv: file1 file.. dest dir\n");
    printf("mv: file1 file2\n");
    return 1;
  }
  if (stat(argv[argc - 1], &st) == 0) {
    dst_exists = 1;
    if (st.st_mode & 0040000)
      dst_isdir = 1;
  }
  if (argc > 3 && (!dst_exists || !dst_isdir)) {
    printf("mv: for multiple files, dest %s should be a directory\n", argv[argc - 1]);
    return 1;
  }
  for (i = 1; i < argc - 1; i++) {
    if (stat(argv[i], &st) < 0) {
      printf("mv: cannot stat %s\n", argv[i]);
      err++;
      continue;
    }
    strncpy(buf, argv[argc - 1], sizeof(buf) - 1);
    if (dst_isdir) {
      strncat(buf, "/", sizeof(buf) - strlen(buf) - 1);
      strncat(buf, argv[i], sizeof(buf) - strlen(buf) - 1);
    }
    if (rename(argv[i], buf) < 0)
      err++;
  }
  return err;
}
```