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

```asm
<do_get_perms>:
  endbr64
  push   %rbx
  mov    %edi,%ebx
  call   <do_get_type@plt>
  mov    $0x2d,%edx
  cmp    $0x66,%al
  cmove  %edx,%eax
  mov    D179(%rip),%rdx
  mov    %al,D149(%rip)
  mov    D99(%rip),%rax
  mov    (%rax),%ecx
  and    %ebx,%ecx
  cmp    $0x1,%ecx
  sbb    %eax,%eax
  and    $0xffffffbb,%eax
  add    $0x72,%eax
  mov    %al,D174(%rip)
  mov    D162(%rip),%rax
  mov    (%rax),%esi
  and    %ebx,%esi
  cmp    $0x1,%esi
  mov    %ebx,%esi
  sbb    %eax,%eax
  and    $0xffffffb6,%eax
  add    $0x77,%eax
  mov    %al,D66(%rip)
  mov    D168(%rip),%rax
  mov    (%rax),%ecx
  and    %ebx,%ecx
  cmp    $0x1,%ecx
  sbb    %eax,%eax
  and    (%rdx),%esi
  je     L56
  and    $0xffffffe0,%eax
  add    $0x73,%eax
L24:
  mov    %al,D189(%rip)
  mov    D148(%rip),%rax
  mov    D145(%rip),%rdx
  mov    (%rax),%edi
  and    %ebx,%edi
  cmp    $0x1,%edi
  mov    %ebx,%edi
  sbb    %eax,%eax
  and    $0xffffffbb,%eax
  add    $0x72,%eax
  mov    %al,D164(%rip)
  mov    D226(%rip),%rax
  mov    (%rax),%ecx
  and    %ebx,%ecx
  cmp    $0x1,%ecx
  sbb    %eax,%eax
  and    $0xffffffb6,%eax
  add    $0x77,%eax
  mov    %al,D206(%rip)
  mov    D139(%rip),%rax
  mov    (%rax),%esi
  and    %ebx,%esi
  cmp    $0x1,%esi
  sbb    %eax,%eax
  and    (%rdx),%edi
  je     L55
  and    $0xffffffe0,%eax
  add    $0x73,%eax
L7:
  mov    %al,D132(%rip)
  mov    D208(%rip),%rax
  mov    D10(%rip),%rdx
  mov    (%rax),%ecx
  and    %ebx,%ecx
  cmp    $0x1,%ecx
  sbb    %eax,%eax
  and    $0xffffffbb,%eax
  add    $0x72,%eax
  mov    %al,D218(%rip)
  mov    D49(%rip),%rax
  mov    (%rax),%esi
  and    %ebx,%esi
  cmp    $0x1,%esi
  sbb    %eax,%eax
  and    $0xffffffb6,%eax
  add    $0x77,%eax
  mov    %al,D223(%rip)
  mov    D221(%rip),%rax
  mov    (%rax),%edi
  and    %ebx,%edi
  cmp    $0x1,%edi
  sbb    %eax,%eax
  and    (%rdx),%ebx
  je     L15
  and    $0xffffffe0,%eax
  add    $0x74,%eax
L0:
  mov    %al,D118(%rip)
  pop    %rbx
  lea    D149(%rip),%rax
  movb   $0x0,D39(%rip)
  ret
  nopl   (%rax)
L56:
  and    $0xffffffb5,%eax
  add    $0x78,%eax
  jmp    L24
  nopl   0x0(%rax,%rax,1)
L15:
  and    $0xffffffb5,%eax
  add    $0x78,%eax
  jmp    L0
L55:
  and    $0xffffffb5,%eax
  add    $0x78,%eax
  jmp    L7
```

assistant: ```c
char *do_get_perms(struct stat attr) {
  static char perms[11];
  char type = do_get_type(attr);
  perms[0] = (char)(type == 'f' ? '-' : type);
  perms[1] = (char)(attr.st_mode & S_IRUSR ? 'r' : '-');
  perms[2] = (char)(attr.st_mode & S_IWUSR ? 'w' : '-');
  perms[3] = (char)(attr.st_mode & S_ISUID ? (attr.st_mode & S_IXUSR ? 's' : 'S') : (attr.st_mode & S_IXUSR ? 'x' : '-'));
  perms[4] = (char)(attr.st_mode & S_IRGRP ? 'r' : '-');
  perms[5] = (char)(attr.st_mode & S_IWGRP ? 'w' : '-');
  perms[6] = (char)(attr.st_mode & S_ISGID ? (attr.st_mode & S_IXGRP ? 's' : 'S') : (attr.st_mode & S_IXGRP ? 'x' : '-'));
  perms[7] = (char)(attr.st_mode & S_IROTH ? 'r' : '-');
  perms[8] = (char)(attr.st_mode & S_IWOTH ? 'w' : '-');
  perms[9] = (char)(attr.st_mode & S_ISVTX ? (attr.st_mode & S_IXOTH ? 't' : 'T') : (attr.st_mode & S_IXOTH ? 'x' : '-'));
  perms[10] = '\0';
  return perms;
}
```