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
  mov    %rsi,%rbx
  sub    $0x8,%rsp
  cmp    $0x2,%edi
  je     L137
  mov    (%rsi),%rsi
  lea    D85(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  or     $0xffffffff,%edi
  call   <exit@plt>
L137:
  mov    $0x1,%esi
  mov    $0x1000,%edi
  call   <calloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L25
  mov    $0x1,%esi
  mov    $0x1000,%edi
  call   <calloc@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L122
  mov    0x8(%rbx),%rsi
  mov    %r12,%rdi
  lea    0x1(%r12),%r15
  lea    D57(%rip),%r13
  lea    D76(%rip),%r14
  call   <strcpy@plt>
  mov    %r12,%rsi
  lea    D56(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L73
  nopl   0x0(%rax,%rax,1)
L8:
  cmp    $0x2,%eax
  je     L230
L155:
  mov    %r15,%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x2,%esi
  mov    %rbp,%rdi
  call   <strnlen@plt>
  cmp    $0x1,%eax
  je     L76
  mov    $0x1,%edx
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <strncat@plt>
L76:
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
L244:
  mov    %rbx,%r15
L73:
  mov    $0x2f,%esi
  mov    %r15,%rdi
  call   <strchr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L178
  cmpb   $0x0,(%r15)
  je     L226
  cmpb   $0x2f,0x1(%rbx)
  je     L157
  movb   $0x0,(%rbx)
  mov    %r15,%rdi
  add    $0x1,%rbx
  call   <strlen@plt>
  cmp    $0x1,%eax
  jne    L8
  cmpb   $0x2e,(%r15)
  jne    L155
  jmp    L244
L178:
  movzbl (%r15),%eax
  test   %al,%al
  je     L226
  cmp    $0x2e,%al
  jne    L199
L226:
  cmpb   $0x0,0x0(%rbp)
  je     L5
L152:
  mov    %rbp,%rsi
  lea    D52(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L93:
  mov    %rbp,%rdi
  call   <free@plt>
L122:
  mov    %r12,%rdi
  call   <free@plt>
L25:
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L230:
  mov    $0x2,%edx
  lea    D19(%rip),%rsi
  mov    %r15,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L155
  cmpb   $0x0,0x0(%rbp)
  je     L244
  cmpb   $0x0,0x1(%rbp)
  je     L244
  mov    $0x2f,%esi
  mov    %rbp,%rdi
  call   <strrchr@plt>
  cmp    %rax,%rbp
  je     L89
  movb   $0x0,(%rax)
  jmp    L244
L157:
  lea    D86(%rip),%rdi
  call   <puts@plt>
  jmp    L93
L5:
  mov    $0x1,%edx
  lea    D76(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncat@plt>
  jmp    L152
L199:
  mov    $0x2,%esi
  mov    %rbp,%rdi
  call   <strnlen@plt>
  sub    $0x1,%eax
  je     L211
  mov    $0x1,%edx
  lea    D76(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncat@plt>
L211:
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L226
L89:
  movb   $0x0,0x1(%rbp)
  jmp    L244
```

tool_calls: name: extract_symbolic_data
arguments: tag: D85
type_infered: string
name: extract_symbolic_data
arguments: tag: D57
type_infered: string
name: extract_symbolic_data
arguments: tag: D76
type_infered: string
name: extract_symbolic_data
arguments: tag: D56
type_infered: string
name: extract_symbolic_data
arguments: tag: D52
type_infered: string
name: extract_symbolic_data
arguments: tag: D19
type_infered: string
name: extract_symbolic_data
arguments: tag: D86
type_infered: string

tool: D85: 	Usage: %s directory


tool: D57: mid dir :%s


tool: D76: /

tool: D56:    ___________ old_path : %s _________


tool: D52:    ___________ new_path : %s _________


tool: D19: ..

tool: D86:  directory formt error! 

assistant: ```c
int main(int argc, char *argv[]) {
  if (argc != 2) {
    printf("	Usage: %s directory\n", argv[0]);
    exit(-1);
  }
  char *old_path = calloc(4096, 1);
  if (!old_path)
    goto out1;
  char *new_path = calloc(4096, 1);
  if (!new_path)
    goto out2;
  strcpy(old_path, argv[1]);
  printf("   ___________ old_path : %s _________\n", old_path);
  char *slash = NULL, *tmp_slash = NULL, *dir_start = old_path + 1;
  while ((slash = strchr(dir_start, '/')) != NULL && *dir_start != '\0') {
    if (*(slash + 1) == '/') {
      printf(" directory formt error! \n");
      goto out3;
    }
    *slash = '\0';
    int mid_dir_len = strlen(dir_start);
    if (mid_dir_len == 1 && *dir_start == '.') {
      dir_start = slash + 1;
    } else if (mid_dir_len == 2 && !strncmp(dir_start, "..", 2)) {
      if (*new_path != '\0' && *(new_path + 1) != '\0') {
        tmp_slash = strrchr(new_path, '/');
        if (new_path != tmp_slash)
          *tmp_slash = '\0';
        else
          *(tmp_slash + 1) = '\0';
      }
      dir_start = slash + 1;
    } else {
      printf("mid dir :%s\n", dir_start);
      if (strnlen(new_path, 2) != 1)
        strncat(new_path, "/", 1);
      strcat(new_path, dir_start);
      dir_start = slash + 1;
    }
  }
  if (*dir_start != '\0' && *dir_start != '.' && !slash) {
    if (strnlen(new_path, 2) != 1)
      strncat(new_path, "/", 1);
    strcat(new_path, dir_start);
  }
  if (*new_path == '\0') {
    strncat(new_path, "/", 1);
  }
  printf("   ___________ new_path : %s _________\n", new_path);
out3:
  free(new_path);
out2:
  free(old_path);
out1:
  return 0;
}
```