user: What would the C source look like for the assembly code provided here:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x328,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x318(%rsp)
  xor    %eax,%eax
  cmp    $0x2,%edi
  je     L115
  mov    (%rsi),%rdi
  call   <basename@plt>
  lea    D13(%rip),%rdi
  mov    %eax,%esi
  call   <err_quit@plt>
L115:
  mov    0x8(%rbx),%rcx
  lea    0x10(%rsp),%r14
  mov    $0x100,%esi
  xor    %eax,%eax
  lea    D55(%rip),%rdx
  mov    %r14,%rdi
  call   <snprintf@plt>
  mov    %r14,%rdi
  call   <opendir@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L159
L8:
  lea    D75(%rip),%rbp
  lea    D36(%rip),%r13
  nopw   0x0(%rax,%rax,1)
L81:
  mov    %rbx,%rdi
  call   <readdir@plt>
  mov    %rax,%r15
  test   %rax,%rax
  je     L99
  mov    (%r15),%rdi
  mov    %rbp,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L81
  mov    (%r15),%rdi
  mov    %r13,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L81
  mov    (%r15),%r8
  lea    0x110(%rsp),%r12
  xor    %eax,%eax
  mov    %r14,%rcx
  lea    D19(%rip),%rdx
  mov    $0x100,%esi
  mov    %r12,%rdi
  call   <snprintf@plt>
  lea    0x210(%rsp),%r15
  mov    $0xff,%edx
  mov    %r12,%rdi
  mov    %r15,%rsi
  call   <readlink@plt>
  cmp    $0xffffffff,%eax
  je     L23
  cltq
  movb   $0x0,0x210(%rsp,%rax,1)
  cmpb   $0x2f,0x210(%rsp)
  je     L81
L127:
  mov    $0x3a,%esi
  mov    %r15,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L81
  movb   $0x0,(%rax)
  lea    D51(%rip),%rsi
  mov    %r15,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L81
  lea    0x8(%rsp),%rsi
  mov    %r12,%rdi
  call   <stat@plt>
  test   %rax,%rax
  js     L100
L140:
  mov    0x8(%rsp),%rdi
  call   <sockq@plt>
  jmp    L81
  nopl   0x0(%rax,%rax,1)
L99:
  mov    0x318(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L33
  add    $0x328,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L23:
  lea    D4(%rip),%rdi
  call   <err_sys@plt>
  cmpb   $0x2f,0x210(%rsp)
  movb   $0x0,0x20f(%rsp)
  jne    L127
  jmp    L81
L100:
  lea    D11(%rip),%rdi
  call   <err_sys@plt>
  jmp    L140
L159:
  lea    D24(%rip),%rdi
  call   <err_sys@plt>
  jmp    L8
L33:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D13
type_guessed: string
name: extract_symbolic_data
arguments: tag: D55
type_guessed: string
name: extract_symbolic_data
arguments: tag: D75
type_guessed: string
name: extract_symbolic_data
arguments: tag: D36
type_guessed: string
name: extract_symbolic_data
arguments: tag: D19
type_guessed: string
name: extract_symbolic_data
arguments: tag: D51
type_guessed: string
name: extract_symbolic_data
arguments: tag: D4
type_guessed: string
name: extract_symbolic_data
arguments: tag: D11
type_guessed: string
name: extract_symbolic_data
arguments: tag: D24
type_guessed: string

tool: D13: Usage: %s <PID>

tool: D55: /proc/%s/fd

tool: D75: .

tool: D36: ..

tool: D19: %s/%s

tool: D51: socket

tool: D4: readlink

tool: D11: stat error

tool: D24: opendir error

assistant: ```c
int main(int argc, char *argv[]) {
  DIR *dp;
  char *ch, buf[256], filename[256], pathname[256];
  struct dirent *dirp;
  int n;
  unsigned long long ino;
  struct stat statbuf;
  if (argc != 2)
    err_quit("Usage: %s <PID>", basename(argv[0]));
  snprintf(buf, sizeof(buf), "/proc/%s/fd", argv[1]);
  if ((dp = opendir(buf)) == NULL)
    err_sys("opendir error");
  while ((dirp = readdir(dp)) != NULL) {
    if (strcmp(dirp->d_name, ".") == 0 || strcmp(dirp->d_name, "..") == 0)
      continue;
    snprintf(filename, sizeof(filename), "%s/%s", buf, dirp->d_name);
    if ((n = readlink(filename, pathname, sizeof(pathname) - 1)) == -1)
      err_sys("readlink");
    pathname[n] = '\0';
    if (*pathname == '/')
      continue;
    if ((ch = strchr(pathname, ':'))) {
      *ch = '\0';
      if (strcmp(pathname, "socket") == 0) {
        if (stat(filename, &statbuf) < 0)
          err_sys("stat error");
        ino = (unsigned long long)statbuf.st_ino;
        sockq(ino);
      }
    }
  }
  return 0;
}
```