user: 请从给定的汇编指令推导出C源代码:

```asm
<get_mode_string>:
  endbr64
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x8,%rsp
  call   <S_ISBLK@plt>
  mov    %rax,%r8
  mov    $0x62,%eax
  test   %r8,%r8
  je     L5
L56:
  mov    %al,0x0(%rbp)
  mov    D11(%rip),%rax
  mov    %ebx,%esi
  mov    (%rax),%ecx
  and    %ebx,%ecx
  cmp    $0x1,%ecx
  sbb    %eax,%eax
  and    $0xffffffbb,%eax
  add    $0x72,%eax
  mov    %al,0x1(%rbp)
  mov    D1(%rip),%rax
  mov    (%rax),%ecx
  and    %ebx,%ecx
  cmp    $0x1,%ecx
  sbb    %eax,%eax
  and    $0xffffffb6,%eax
  add    $0x77,%eax
  mov    %al,0x2(%rbp)
  mov    D73(%rip),%rax
  and    (%rax),%esi
  mov    D112(%rip),%rax
  je     L117
  mov    (%rax),%esi
  and    %ebx,%esi
  cmp    $0x1,%esi
  sbb    %eax,%eax
  and    $0xffffffe0,%eax
  add    $0x73,%eax
L38:
  mov    %al,0x3(%rbp)
  mov    D60(%rip),%rax
  mov    %ebx,%esi
  mov    (%rax),%edi
  and    %ebx,%edi
  cmp    $0x1,%edi
  sbb    %eax,%eax
  and    $0xffffffbb,%eax
  add    $0x72,%eax
  mov    %al,0x4(%rbp)
  mov    D79(%rip),%rax
  mov    (%rax),%edx
  and    %ebx,%edx
  cmp    $0x1,%edx
  mov    D48(%rip),%rdx
  sbb    %eax,%eax
  and    $0xffffffb6,%eax
  add    $0x77,%eax
  mov    %al,0x5(%rbp)
  mov    D53(%rip),%rax
  mov    (%rax),%ecx
  and    %ebx,%ecx
  cmp    $0x1,%ecx
  sbb    %eax,%eax
  and    (%rdx),%esi
  je     L33
  and    $0xffffffe0,%eax
  add    $0x73,%eax
L20:
  mov    %al,0x6(%rbp)
  mov    D52(%rip),%rax
  mov    (%rax),%edi
  and    %ebx,%edi
  cmp    $0x1,%edi
  sbb    %eax,%eax
  and    $0xffffffbb,%eax
  add    $0x72,%eax
  mov    %al,0x7(%rbp)
  mov    D76(%rip),%rax
  mov    (%rax),%edx
  and    %ebx,%edx
  cmp    $0x1,%edx
  mov    D91(%rip),%rdx
  sbb    %eax,%eax
  and    $0xffffffb6,%eax
  add    $0x77,%eax
  mov    %al,0x8(%rbp)
  mov    D33(%rip),%rax
  mov    (%rax),%ecx
  and    %ebx,%ecx
  cmp    $0x1,%ecx
  sbb    %eax,%eax
  and    (%rdx),%ebx
  je     L106
  and    $0xffffffe0,%eax
  movb   $0x0,0xa(%rbp)
  add    $0x74,%eax
  mov    %al,0x9(%rbp)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L117:
  mov    (%rax),%edi
  and    %ebx,%edi
  cmp    $0x1,%edi
  sbb    %eax,%eax
  and    $0xffffffb5,%eax
  add    $0x78,%eax
  jmp    L38
  nopl   0x0(%rax)
L106:
  and    $0xffffffb5,%eax
  movb   $0x0,0xa(%rbp)
  add    $0x78,%eax
  mov    %al,0x9(%rbp)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L33:
  and    $0xffffffb5,%eax
  add    $0x78,%eax
  jmp    L20
  nopl   0x0(%rax,%rax,1)
L5:
  mov    %ebx,%edi
  call   <S_ISCHR@plt>
  mov    %rax,%r8
  mov    $0x63,%eax
  test   %r8,%r8
  jne    L56
  mov    %ebx,%edi
  call   <S_ISDIR@plt>
  mov    %rax,%r8
  mov    $0x64,%eax
  test   %r8,%r8
  jne    L56
  mov    %ebx,%edi
  call   <S_ISREG@plt>
  mov    %rax,%r8
  mov    $0x2d,%eax
  test   %r8,%r8
  jne    L56
  mov    %ebx,%edi
  call   <S_ISFIFO@plt>
  mov    %rax,%r8
  mov    $0x70,%eax
  test   %r8,%r8
  jne    L56
  mov    %ebx,%edi
  call   <S_ISLNK@plt>
  mov    %rax,%r8
  mov    $0x6c,%eax
  test   %r8,%r8
  jne    L56
  mov    %ebx,%edi
  call   <S_ISSOCK@plt>
  cmp    $0x1,%rax
  sbb    %eax,%eax
  and    $0xffffffcc,%eax
  add    $0x73,%eax
  jmp    L56
```

assistant: ```c
void get_mode_string(mode_t mode, char *str) {
  str[0] = (S_ISBLK(mode)) ? 'b' : (S_ISCHR(mode)) ? 'c' : (S_ISDIR(mode)) ? 'd' : (S_ISREG(mode)) ? '-' : (S_ISFIFO(mode)) ? 'p' : (S_ISLNK(mode)) ? 'l' : (S_ISSOCK(mode)) ? 's' : '?';
  str[1] = mode & S_IRUSR ? 'r' : '-';
  str[2] = mode & S_IWUSR ? 'w' : '-';
  str[3] = mode & S_ISUID ? (mode & S_IXUSR ? 's' : 'S') : (mode & S_IXUSR ? 'x' : '-');
  str[4] = mode & S_IRGRP ? 'r' : '-';
  str[5] = mode & S_IWGRP ? 'w' : '-';
  str[6] = mode & S_ISGID ? (mode & S_IXGRP ? 's' : 'S') : (mode & S_IXGRP ? 'x' : '-');
  str[7] = mode & S_IROTH ? 'r' : '-';
  str[8] = mode & S_IWOTH ? 'w' : '-';
  str[9] = mode & S_ISVTX ? (mode & S_IXOTH ? 't' : 'T') : (mode & S_IXOTH ? 'x' : '-');
  str[10] = '\0';
}
```