user: 请将以下的汇编代码转换成C语言代码：

```asm
<modestr>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %edi,%ebx
  mov    %rsi,%rbp
  call   <S_ISBLK@plt>
  mov    %rax,%rdx
  mov    $0x62,%eax
  test   %rdx,%rdx
  je     L34
L45:
  mov    %al,0x0(%rbp)
  mov    D34(%rip),%rax
  mov    %ebx,%ecx
  and    (%rax),%ecx
  cmp    $0x1,%ecx
  sbb    %eax,%eax
  and    $0xffffffbb,%eax
  add    $0x72,%eax
  mov    %al,0x1(%rbp)
  mov    D39(%rip),%rax
  mov    %ebx,%edx
  and    (%rax),%edx
  cmp    $0x1,%edx
  sbb    %eax,%eax
  and    $0xffffffb6,%eax
  add    $0x77,%eax
  mov    %al,0x2(%rbp)
  mov    D31(%rip),%rax
  mov    %ebx,%ecx
  and    (%rax),%ecx
  cmp    $0x1,%ecx
  sbb    %eax,%eax
  and    $0xffffffb5,%eax
  add    $0x78,%eax
  mov    %al,0x3(%rbp)
  mov    D76(%rip),%rax
  mov    %ebx,%esi
  and    (%rax),%esi
  cmp    $0x1,%esi
  sbb    %eax,%eax
  and    $0xffffffbb,%eax
  add    $0x72,%eax
  mov    %al,0x4(%rbp)
  mov    D43(%rip),%rax
  mov    %ebx,%edi
  and    (%rax),%edi
  cmp    $0x1,%edi
  sbb    %eax,%eax
  and    $0xffffffb6,%eax
  add    $0x77,%eax
  mov    %al,0x5(%rbp)
  mov    D23(%rip),%rax
  mov    %ebx,%edx
  and    (%rax),%edx
  cmp    $0x1,%edx
  sbb    %eax,%eax
  and    $0xffffffb5,%eax
  add    $0x78,%eax
  mov    %al,0x6(%rbp)
  mov    D5(%rip),%rax
  mov    %ebx,%ecx
  and    (%rax),%ecx
  cmp    $0x1,%ecx
  sbb    %eax,%eax
  and    $0xffffffbb,%eax
  add    $0x72,%eax
  mov    %al,0x7(%rbp)
  mov    D12(%rip),%rax
  mov    %ebx,%esi
  and    (%rax),%esi
  cmp    $0x1,%esi
  sbb    %eax,%eax
  and    $0xffffffb6,%eax
  add    $0x77,%eax
  mov    %al,0x8(%rbp)
  mov    D33(%rip),%rax
  and    (%rax),%ebx
  cmp    $0x1,%ebx
  sbb    %eax,%eax
  and    $0xffffffb5,%eax
  add    $0x78,%eax
  mov    %al,0x9(%rbp)
  movb   $0x0,0xa(%rbp)
  mov    %rbp,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L34:
  mov    %ebx,%edi
  call   <S_ISCHR@plt>
  mov    %rax,%rdx
  mov    $0x63,%eax
  test   %rdx,%rdx
  jne    L45
  mov    %ebx,%edi
  call   <S_ISDIR@plt>
  mov    %rax,%rdx
  mov    $0x64,%eax
  test   %rdx,%rdx
  jne    L45
  mov    %ebx,%edi
  call   <S_ISLNK@plt>
  mov    %rax,%rdx
  mov    $0x6c,%eax
  test   %rdx,%rdx
  jne    L45
  mov    %ebx,%edi
  call   <S_ISFIFO@plt>
  mov    %rax,%rdx
  mov    $0x70,%eax
  test   %rdx,%rdx
  jne    L45
  mov    %ebx,%edi
  call   <S_ISSOCK@plt>
  cmp    $0x1,%rax
  sbb    %eax,%eax
  and    $0xffffffba,%eax
  add    $0x73,%eax
  jmp    L45
```

assistant: ```c
char *modestr(mode_t mode_bits, char *mode_str) {
  if (S_ISBLK(mode_bits))
    mode_str[0] = 'b';
  else if (S_ISCHR(mode_bits))
    mode_str[0] = 'c';
  else if (S_ISDIR(mode_bits))
    mode_str[0] = 'd';
  else if (S_ISLNK(mode_bits))
    mode_str[0] = 'l';
  else if (S_ISFIFO(mode_bits))
    mode_str[0] = 'p';
  else if (S_ISSOCK(mode_bits))
    mode_str[0] = 's';
  else
    mode_str[0] = '-';
  mode_str[1] = S_IRUSR & mode_bits ? 'r' : '-';
  mode_str[2] = S_IWUSR & mode_bits ? 'w' : '-';
  mode_str[3] = S_IXUSR & mode_bits ? 'x' : '-';
  mode_str[4] = S_IRGRP & mode_bits ? 'r' : '-';
  mode_str[5] = S_IWGRP & mode_bits ? 'w' : '-';
  mode_str[6] = S_IXGRP & mode_bits ? 'x' : '-';
  mode_str[7] = S_IROTH & mode_bits ? 'r' : '-';
  mode_str[8] = S_IWOTH & mode_bits ? 'w' : '-';
  mode_str[9] = S_IXOTH & mode_bits ? 'x' : '-';
  mode_str[10] = '\0';
  return mode_str;
}
```