user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<pretty>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  test   %rdi,%rdi
  je     L32
  mov    (%rdi),%rsi
  mov    %rdi,%rbp
  xor    %eax,%eax
  lea    D35(%rip),%rdi
  call   <printf@plt>
  lea    D85(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  pop    %rbx
  mov    %rbp,%rdi
  mov    $0x1,%esi
  pop    %rbp
  pop    %r12
  jmp    1170 <group@plt>
L32:
  xor    %eax,%eax
  call   <getlogin@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L137
L118:
  xor    %eax,%eax
  call   <getuid@plt>
  mov    %eax,%edi
  mov    %eax,%ebx
  call   <getpwuid@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L93
  mov    (%rax),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L47
L103:
  mov    0x0(%rbp),%rsi
  lea    D35(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L66:
  xor    %eax,%eax
  call   <geteuid@plt>
  mov    %eax,%ebp
  cmp    %eax,%ebx
  jne    L108
L114:
  xor    %eax,%eax
  call   <getgid@plt>
  mov    %eax,%ebp
  xor    %eax,%eax
  call   <getegid@plt>
  cmp    %eax,%ebp
  jne    L14
L89:
  lea    D85(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  pop    %rbx
  mov    $0x1,%esi
  pop    %rbp
  xor    %edi,%edi
  pop    %r12
  jmp    1170 <group@plt>
  nopl   0x0(%rax)
L14:
  mov    %ebp,%edi
  call   <getgrgid@plt>
  test   %rax,%rax
  je     L23
  mov    (%rax),%rsi
  lea    D65(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L89
  nopl   0x0(%rax,%rax,1)
L108:
  mov    %eax,%edi
  call   <getpwuid@plt>
  test   %rax,%rax
  je     L123
  mov    (%rax),%rsi
  lea    D104(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L114
  cs nopw 0x0(%rax,%rax,1)
L47:
  mov    %r12,%rsi
  lea    D55(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L103
  cs nopw 0x0(%rax,%rax,1)
L93:
  mov    %r12,%rsi
  lea    D55(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %ebx,%esi
  lea    D103(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L66
  cs nopw 0x0(%rax,%rax,1)
L137:
  lea    D86(%rip),%rsi
  mov    $0x1,%edi
  call   <err@plt>
  jmp    L118
  cs nopw 0x0(%rax,%rax,1)
L23:
  mov    %ebp,%esi
  lea    D4(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L89
  nopl   (%rax)
L123:
  mov    %ebp,%esi
  lea    D3(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L114
```

tool_calls: name: parse_data
arguments: label: D35
data_type: string
name: parse_data
arguments: label: D85
data_type: string
name: parse_data
arguments: label: D65
data_type: string
name: parse_data
arguments: label: D104
data_type: string
name: parse_data
arguments: label: D55
data_type: string
name: parse_data
arguments: label: D103
data_type: string
name: parse_data
arguments: label: D86
data_type: string
name: parse_data
arguments: label: D4
data_type: string
name: parse_data
arguments: label: D3
data_type: string

tool: D35: uid	%s


tool: D85: groups	

tool: D65: rgid	%s


tool: D104: euid	%s


tool: D55: login	%s


tool: D103: uid	%u


tool: D86: getlogin

tool: D4: rgid	%u


tool: D3: euid	%u


assistant: ```c
void pretty(struct passwd *pw) {
  struct group *gr;
  u_int eid, rid;
  char *login;
  if (pw) {
    (void)printf("uid\t%s\n", pw->pw_name);
    (void)printf("groups\t");
    group(pw, 1);
  } else {
    if ((login = getlogin()) == NULL)
      err(1, "getlogin");
    pw = getpwuid(rid = getuid());
    if (pw == NULL || strcmp(login, pw->pw_name))
      (void)printf("login\t%s\n", login);
    if (pw)
      (void)printf("uid\t%s\n", pw->pw_name);
    else
      (void)printf("uid\t%u\n", rid);
    if ((eid = geteuid()) != rid) {
      if ((pw = getpwuid(eid)) != NULL)
        (void)printf("euid\t%s\n", pw->pw_name);
      else
        (void)printf("euid\t%u\n", eid);
    }
    if ((rid = getgid()) != (eid = getegid())) {
      if ((gr = getgrgid(rid)) != NULL)
        (void)printf("rgid\t%s\n", gr->gr_name);
      else
        (void)printf("rgid\t%u\n", rid);
    }
    (void)printf("groups\t");
    group(NULL, 1);
  }
}
```