user: Translate the below assembly code into C programming language:

```asm
<transfer_mode>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %edi,-0x4(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    $0xa,%edx
  mov    $0x2d,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <S_ISDIR@plt>
  test   %rax,%rax
  je     L107
  mov    -0x10(%rbp),%rax
  movb   $0x64,(%rax)
L107:
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <S_ISCHR@plt>
  test   %rax,%rax
  je     L7
  mov    -0x10(%rbp),%rax
  movb   $0x63,(%rax)
L7:
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <S_ISBLK@plt>
  test   %rax,%rax
  je     L40
  mov    -0x10(%rbp),%rax
  movb   $0x62,(%rax)
L40:
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <S_ISLNK@plt>
  test   %rax,%rax
  je     L129
  mov    -0x10(%rbp),%rax
  movb   $0x6c,(%rax)
L129:
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <S_ISFIFO@plt>
  test   %rax,%rax
  je     L30
  mov    -0x10(%rbp),%rax
  movb   $0x70,(%rax)
L30:
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <S_ISSOCK@plt>
  test   %rax,%rax
  je     L109
  mov    -0x10(%rbp),%rax
  movb   $0x73,(%rax)
L109:
  mov    D51(%rip),%rax
  mov    (%rax),%eax
  and    -0x4(%rbp),%eax
  test   %eax,%eax
  je     L126
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  movb   $0x72,(%rax)
L126:
  mov    D44(%rip),%rax
  mov    (%rax),%eax
  and    -0x4(%rbp),%eax
  test   %eax,%eax
  je     L88
  mov    -0x10(%rbp),%rax
  add    $0x2,%rax
  movb   $0x77,(%rax)
L88:
  mov    D7(%rip),%rax
  mov    (%rax),%eax
  and    -0x4(%rbp),%eax
  test   %eax,%eax
  je     L67
  mov    -0x10(%rbp),%rax
  add    $0x3,%rax
  movb   $0x78,(%rax)
L67:
  mov    D29(%rip),%rax
  mov    (%rax),%eax
  and    -0x4(%rbp),%eax
  test   %eax,%eax
  je     L34
  mov    -0x10(%rbp),%rax
  add    $0x4,%rax
  movb   $0x72,(%rax)
L34:
  mov    D71(%rip),%rax
  mov    (%rax),%eax
  and    -0x4(%rbp),%eax
  test   %eax,%eax
  je     L108
  mov    -0x10(%rbp),%rax
  add    $0x5,%rax
  movb   $0x77,(%rax)
L108:
  mov    D89(%rip),%rax
  mov    (%rax),%eax
  and    -0x4(%rbp),%eax
  test   %eax,%eax
  je     L56
  mov    -0x10(%rbp),%rax
  add    $0x6,%rax
  movb   $0x78,(%rax)
L56:
  mov    D75(%rip),%rax
  mov    (%rax),%eax
  and    -0x4(%rbp),%eax
  test   %eax,%eax
  je     L148
  mov    -0x10(%rbp),%rax
  add    $0x7,%rax
  movb   $0x72,(%rax)
L148:
  mov    D43(%rip),%rax
  mov    (%rax),%eax
  and    -0x4(%rbp),%eax
  test   %eax,%eax
  je     L139
  mov    -0x10(%rbp),%rax
  add    $0x8,%rax
  movb   $0x77,(%rax)
L139:
  mov    D68(%rip),%rax
  mov    (%rax),%eax
  and    -0x4(%rbp),%eax
  test   %eax,%eax
  je     L130
  mov    -0x10(%rbp),%rax
  add    $0x9,%rax
  movb   $0x78,(%rax)
L130:
  nop
  leave
  ret
```

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