user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  cmp    $0x1,%edi
  jle    L86
  lea    -0x2(%rdi),%eax
  lea    0x8(%rsi),%rbx
  lea    0x10(%rsi,%rax,8),%r13
  lea    D102(%rip),%r12
  lea    0x4(%rsp),%rbp
  lea    D109(%rip),%r15
  lea    D70(%rip),%r14
  jmp    L48
  nop
L20:
  mov    0x4(%rsp),%edi
  call   <S_ISREG@plt>
  mov    %r15,%rsi
  test   %rax,%rax
  je     L56
L110:
  mov    %r14,%rdi
  add    $0x8,%rbx
  call   <printf@plt>
  cmp    %r13,%rbx
  je     L86
L48:
  mov    (%rbx),%rsi
  mov    %r12,%rdi
  call   <printf@plt>
  mov    (%rbx),%rdi
  mov    %rbp,%rsi
  call   <lstat@plt>
  test   %rax,%rax
  jns    L20
  lea    D9(%rip),%rdi
  add    $0x8,%rbx
  call   <perror@plt>
  cmp    %r13,%rbx
  jne    L48
L86:
  xor    %edi,%edi
  call   <exit@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L87
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L56:
  mov    0x4(%rsp),%edi
  call   <S_ISDIR@plt>
  lea    D15(%rip),%rsi
  test   %rax,%rax
  jne    L110
  mov    0x4(%rsp),%edi
  call   <S_ISCHR@plt>
  lea    D88(%rip),%rsi
  test   %rax,%rax
  jne    L110
  mov    0x4(%rsp),%edi
  call   <S_ISBLK@plt>
  lea    D3(%rip),%rsi
  test   %rax,%rax
  jne    L110
  mov    0x4(%rsp),%edi
  call   <S_ISFIFO@plt>
  lea    D33(%rip),%rsi
  test   %rax,%rax
  jne    L110
  mov    0x4(%rsp),%edi
  call   <S_ISLNK@plt>
  lea    D32(%rip),%rsi
  test   %rax,%rax
  jne    L110
  mov    0x4(%rsp),%edi
  call   <S_ISSOCK@plt>
  lea    D62(%rip),%rsi
  test   %rax,%rax
  lea    D22(%rip),%rax
  cmove  %rax,%rsi
  jmp    L110
L87:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D102
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D109
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D70
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D9
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D15
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D88
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D3
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D33
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D32
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D62
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D22
type_guessed: string

tool: D102: %s: 

tool: D109: regular

tool: D70: %s


tool: D9: lstat()

tool: D15: directory

tool: D88: character special

tool: D3: block special

tool: D33: fifo

tool: D32: symbolic link

tool: D62: socket

tool: D22: **unknown mode**

assistant: ```c
int main(int argc, char *argv[]) {
  int i;
  struct stat buf;
  char *ptr;
  for (i = 1; i < argc; i++) {
    printf("%s: ", argv[i]);
    if (lstat(argv[i], &buf) < 0) {
      perror("lstat()");
      continue;
    }
    if (S_ISREG(buf.st_mode))
      ptr = "regular";
    else if (S_ISDIR(buf.st_mode))
      ptr = "directory";
    else if (S_ISCHR(buf.st_mode))
      ptr = "character special";
    else if (S_ISBLK(buf.st_mode))
      ptr = "block special";
    else if (S_ISFIFO(buf.st_mode))
      ptr = "fifo";
    else if (S_ISLNK(buf.st_mode))
      ptr = "symbolic link";
    else if (S_ISSOCK(buf.st_mode))
      ptr = "socket";
    else
      ptr = "**unknown mode**";
    printf("%s\n", ptr);
  }
  exit(0);
}
```