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    D20(%rip),%rax
  mov    (%rax),%rdx
  mov    %r12,%rax
  or     $0x10000,%rax
  and    %rbx,%rdx
  test   %rdx,%rdx
  cmovne %rax,%r12
  mov    D108(%rip),%rax
  mov    (%rax),%rdx
  mov    %r12,%rax
  or     $0x20000,%rax
  and    %rbx,%rdx
  test   %rdx,%rdx
  cmovne %rax,%r12
  mov    D46(%rip),%rax
  mov    (%rax),%rdx
  mov    %r12,%rax
  or     $0x40000,%rax
  and    %rbx,%rdx
  test   %rdx,%rdx
  cmovne %rax,%r12
  mov    D67(%rip),%rax
  mov    (%rax),%rdx
  mov    %r12,%rax
  or     $0x80000,%rax
  and    %rbx,%rdx
  test   %rdx,%rdx
  cmovne %rax,%r12
  mov    D93(%rip),%rax
  mov    (%rax),%rdx
  mov    %r12,%rax
  or     $0x100000,%rax
  and    %rbx,%rdx
  test   %rdx,%rdx
  cmovne %rax,%r12
  mov    D101(%rip),%rax
  mov    (%rax),%rdx
  mov    %r12,%rax
  or     $0x200000,%rax
  and    %rbx,%rdx
  test   %rdx,%rdx
  cmovne %rax,%r12
  mov    D81(%rip),%rax
  mov    (%rax),%rdx
  mov    %r12,%rax
  or     $0x400000,%rax
  and    %rbx,%rdx
  test   %rdx,%rdx
  cmovne %rax,%r12
  mov    D74(%rip),%rax
  mov    (%rax),%rdx
  mov    %r12,%rax
  or     $0x800000,%rax
  and    %rbx,%rdx
  test   %rdx,%rdx
  cmovne %rax,%r12
  mov    D80(%rip),%rax
  mov    (%rax),%rdx
  mov    %r12,%rax
  or     $0x1000000,%rax
  and    %rbx,%rdx
  test   %rdx,%rdx
  cmovne %rax,%r12
  mov    D109(%rip),%rax
  mov    (%rax),%rdx
  mov    %r12,%rax
  or     $0x2000000,%rax
  and    %rbx,%rdx
  test   %rdx,%rdx
  cmovne %rax,%r12
  mov    D1(%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;
}
```