user: 请将以下的汇编代码转换成C语言代码：

```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    L4
  lea    0x8(%rsi),%rbx
  lea    -0x2(%rdi),%eax
  lea    0x10(%rsi,%rax,8),%r12
  lea    D96(%rip),%rbp
  lea    D12(%rip),%r14
  lea    D76(%rip),%r13
  lea    D51(%rip),%r15
  jmp    L28
L0:
  lea    D3(%rip),%rdi
  call   <perror@plt>
  jmp    L82
L81:
  mov    %r13,%rdi
  call   <printf@plt>
L82:
  add    $0x8,%rbx
  cmp    %r12,%rbx
  je     L4
L28:
  mov    (%rbx),%rsi
  mov    %rbp,%rdi
  call   <printf@plt>
  lea    0x4(%rsp),%rsi
  mov    (%rbx),%rdi
  call   <lstat@plt>
  test   %rax,%rax
  js     L0
  mov    0x4(%rsp),%edi
  call   <S_ISREG@plt>
  mov    %r14,%rsi
  test   %rax,%rax
  jne    L81
  mov    0x4(%rsp),%edi
  call   <S_ISDIR@plt>
  mov    %r15,%rsi
  test   %rax,%rax
  jne    L81
  mov    0x4(%rsp),%edi
  call   <S_ISCHR@plt>
  lea    D46(%rip),%rsi
  test   %rax,%rax
  jne    L81
  mov    0x4(%rsp),%edi
  call   <S_ISBLK@plt>
  lea    D80(%rip),%rsi
  test   %rax,%rax
  jne    L81
  mov    0x4(%rsp),%edi
  call   <S_ISFIFO@plt>
  lea    D18(%rip),%rsi
  test   %rax,%rax
  jne    L81
  mov    0x4(%rsp),%edi
  call   <S_ISLNK@plt>
  lea    D47(%rip),%rsi
  test   %rax,%rax
  jne    L81
  mov    0x4(%rsp),%edi
  call   <S_ISSOCK@plt>
  test   %rax,%rax
  lea    D69(%rip),%rsi
  lea    D28(%rip),%rax
  cmove  %rax,%rsi
  jmp    L81
L4:
  mov    $0x0,%edi
  call   <exit@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L115
  mov    $0x0,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L115:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D96
type_guessed: string
name: unpack_data
arguments: tag: D12
type_guessed: string
name: unpack_data
arguments: tag: D76
type_guessed: string
name: unpack_data
arguments: tag: D51
type_guessed: string
name: unpack_data
arguments: tag: D3
type_guessed: string
name: unpack_data
arguments: tag: D46
type_guessed: string
name: unpack_data
arguments: tag: D80
type_guessed: string
name: unpack_data
arguments: tag: D18
type_guessed: string
name: unpack_data
arguments: tag: D47
type_guessed: string
name: unpack_data
arguments: tag: D69
type_guessed: string
name: unpack_data
arguments: tag: D28
type_guessed: string

tool: D96: %s: 

tool: D12: regular

tool: D76: %s


tool: D51: directory

tool: D3: lstat()

tool: D46: character special

tool: D80: block special

tool: D18: fifo

tool: D47: symbolic link

tool: D69: socket

tool: D28: **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);
}
```