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

```asm
<main>:
  endbr64
  push   %rbx
  mov    %rsi,%rbx
  cmp    $0x1,%edi
  jle    L6
L49:
  mov    0x8(%rbx),%rdi
  call   <getpwnam@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L34
L30:
  mov    (%rbx),%rsi
  lea    D77(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x8(%rbx),%rsi
  lea    D81(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x10(%rbx),%rsi
  lea    D43(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x18(%rbx),%rsi
  lea    D84(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x20(%rbx),%rsi
  lea    D62(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x28(%rbx),%esi
  lea    D67(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x2c(%rbx),%esi
  lea    D83(%rip),%rdi
  xor    %eax,%eax
  lea    D4(%rip),%rbx
  call   <printf@plt>
  lea    D110(%rip),%rdi
  call   <puts@plt>
  jmp    L14
  cs nopw 0x0(%rax,%rax,1)
L5:
  mov    0x20(%rax),%rcx
  mov    0x18(%rax),%rdx
  mov    %rbx,%rdi
  mov    0x2c(%rax),%r9d
  mov    0x28(%rax),%r8d
  mov    (%rax),%rsi
  xor    %eax,%eax
  call   <printf@plt>
L14:
  xor    %eax,%eax
  call   <getpwent@plt>
  test   %rax,%rax
  jne    L5
  lea    D99(%rip),%rdi
  lea    D60(%rip),%rbx
  call   <puts@plt>
  jmp    L46
  xchg   %ax,%ax
L48:
  mov    0x8(%rax),%rdx
  mov    (%rax),%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <printf@plt>
L46:
  xor    %eax,%eax
  call   <getspent@plt>
  test   %rax,%rax
  jne    L48
  pop    %rbx
  ret
L6:
  mov    (%rsi),%rsi
  lea    D63(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L49
L34:
  lea    D20(%rip),%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L30
```

tool_calls: name: extract_symbolic_data
arguments: label: D77
type_infered: string
name: extract_symbolic_data
arguments: label: D81
type_infered: string
name: extract_symbolic_data
arguments: label: D43
type_infered: string
name: extract_symbolic_data
arguments: label: D84
type_infered: string
name: extract_symbolic_data
arguments: label: D62
type_infered: string
name: extract_symbolic_data
arguments: label: D67
type_infered: string
name: extract_symbolic_data
arguments: label: D83
type_infered: string
name: extract_symbolic_data
arguments: label: D4
type_infered: string
name: extract_symbolic_data
arguments: label: D110
type_infered: string
name: extract_symbolic_data
arguments: label: D99
type_infered: string
name: extract_symbolic_data
arguments: label: D60
type_infered: string
name: extract_symbolic_data
arguments: label: D63
type_infered: string
name: extract_symbolic_data
arguments: label: D20
type_infered: string

tool: D77: pw_name: %s


tool: D81: pw_passwd: %s


tool: D43: pw_gecos: %s


tool: D84: pw_dir: %s


tool: D62: pw_shell: %s


tool: D67: pw_uid: %d


tool: D83: pw_gid: %d


tool: D4: %20s : %32s : %32s : %6d : %6d


tool: D110: ===================================

tool: D99: shadow===================================

tool: D60: [%s] : [%s]


tool: D63: Usage: %s username


tool: D20: get user information error

assistant: ```c
int main(int argc, char *argv[]) {
  struct passwd *pwd;
  struct spwd *spw;
  if (argc < 2) {
    printf("Usage: %s username\n", argv[0]);
    exit(1);
  }
  pwd = getpwnam(argv[1]);
  if (pwd == NULL) {
    perror("get user information error");
    exit(1);
  }
  printf("pw_name: %s\n", pwd->pw_name);
  printf("pw_passwd: %s\n", pwd->pw_passwd);
  printf("pw_gecos: %s\n", pwd->pw_gecos);
  printf("pw_dir: %s\n", pwd->pw_dir);
  printf("pw_shell: %s\n", pwd->pw_shell);
  printf("pw_uid: %d\n", pwd->pw_uid);
  printf("pw_gid: %d\n", pwd->pw_gid);
  printf("===================================\n");
  while ((pwd = getpwent()) != NULL) {
    printf("%20s : %32s : %32s : %6d : %6d\n", pwd->pw_name, pwd->pw_dir, pwd->pw_shell, pwd->pw_uid, pwd->pw_gid);
  }
  printf("shadow===================================\n");
  while ((spw = getspent()) != NULL) {
    printf("[%s] : [%s]\n", spw->sp_namp, spw->sp_pwdp);
  }
  return 0;
}
```