user: 这段汇编代码用C语言表示是什么样的？

```asm
<ConvertMode>:
  endbr64
  push   %r12
  xor    %r12d,%r12d
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  call   <S_ISDIR@plt>
  mov    %rbx,%rdi
  test   %rax,%rax
  setne  %r12b
  call   <S_ISCHR@plt>
  mov    %rbx,%rdi
  mov    %rax,%r8
  mov    %r12,%rax
  or     $0x2,%rax
  test   %r8,%r8
  cmovne %rax,%r12
  call   <S_ISBLK@plt>
  mov    %rbx,%rdi
  mov    %rax,%r8
  mov    %r12,%rax
  or     $0x4,%rax
  test   %r8,%r8
  cmovne %rax,%r12
  call   <S_ISREG@plt>
  mov    %rbx,%rdi
  mov    %rax,%r8
  mov    %r12,%rax
  or     $0x8,%rax
  test   %r8,%r8
  cmovne %rax,%r12
  call   <S_ISFIFO@plt>
  mov    %rax,%r8
  mov    %r12,%rax
  or     $0x10,%rax
  test   %r8,%r8
  cmovne %rax,%r12
  mov    D105(%rip),%rax
  mov    (%rax),%rdx
  mov    %r12,%rax
  or     $0x10000,%rax
  and    %rbx,%rdx
  test   %rdx,%rdx
  cmovne %rax,%r12
  mov    D12(%rip),%rax
  mov    (%rax),%rdx
  mov    %r12,%rax
  or     $0x20000,%rax
  and    %rbx,%rdx
  test   %rdx,%rdx
  cmovne %rax,%r12
  mov    D96(%rip),%rax
  mov    (%rax),%rdx
  mov    %r12,%rax
  or     $0x40000,%rax
  and    %rbx,%rdx
  test   %rdx,%rdx
  cmovne %rax,%r12
  mov    D94(%rip),%rax
  mov    (%rax),%rdx
  mov    %r12,%rax
  or     $0x80000,%rax
  and    %rbx,%rdx
  test   %rdx,%rdx
  cmovne %rax,%r12
  mov    D24(%rip),%rax
  mov    (%rax),%rdx
  mov    %r12,%rax
  or     $0x100000,%rax
  and    %rbx,%rdx
  test   %rdx,%rdx
  cmovne %rax,%r12
  mov    D64(%rip),%rax
  mov    (%rax),%rdx
  mov    %r12,%rax
  or     $0x200000,%rax
  and    %rbx,%rdx
  test   %rdx,%rdx
  cmovne %rax,%r12
  mov    D49(%rip),%rax
  mov    (%rax),%rdx
  mov    %r12,%rax
  or     $0x400000,%rax
  and    %rbx,%rdx
  test   %rdx,%rdx
  cmovne %rax,%r12
  mov    D62(%rip),%rax
  mov    (%rax),%rdx
  mov    %r12,%rax
  or     $0x800000,%rax
  and    %rbx,%rdx
  test   %rdx,%rdx
  cmovne %rax,%r12
  mov    D87(%rip),%rax
  mov    (%rax),%rdx
  mov    %r12,%rax
  or     $0x1000000,%rax
  and    %rbx,%rdx
  test   %rdx,%rdx
  cmovne %rax,%r12
  mov    D107(%rip),%rax
  mov    (%rax),%rdx
  mov    %r12,%rax
  or     $0x2000000,%rax
  and    %rbx,%rdx
  test   %rdx,%rdx
  cmovne %rax,%r12
  mov    D21(%rip),%rax
  and    (%rax),%rbx
  mov    %r12,%rax
  or     $0x4000000,%rax
  test   %rbx,%rbx
  cmovne %rax,%r12
  add    $0x8,%rsp
  pop    %rbx
  mov    %r12,%rax
  pop    %r12
  ret
```

assistant: ```c
unsigned long ConvertMode(unsigned long posix_mode) {
  unsigned long result = 0;
  if (S_ISDIR(posix_mode))
    result |= 1 << 0;
  if (S_ISCHR(posix_mode))
    result |= 1 << 1;
  if (S_ISBLK(posix_mode))
    result |= 1 << 2;
  if (S_ISREG(posix_mode))
    result |= 1 << 3;
  if (S_ISFIFO(posix_mode))
    result |= 1 << 4;
  if (posix_mode & S_IRUSR)
    result |= 1 << 16;
  if (posix_mode & S_IWUSR)
    result |= 1 << 17;
  if (posix_mode & S_IXUSR)
    result |= 1 << 18;
  if (posix_mode & S_IRGRP)
    result |= 1 << 19;
  if (posix_mode & S_IWGRP)
    result |= 1 << 20;
  if (posix_mode & S_IXGRP)
    result |= 1 << 21;
  if (posix_mode & S_IROTH)
    result |= 1 << 22;
  if (posix_mode & S_IWOTH)
    result |= 1 << 23;
  if (posix_mode & S_IXOTH)
    result |= 1 << 24;
  if (posix_mode & S_ISUID)
    result |= 1 << 25;
  if (posix_mode & S_ISGID)
    result |= 1 << 26;
  return result;
}
```