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

```asm
<get_mode_string>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %edi,-0x64(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D51(%rip),%rax
  mov    %rax,-0x58(%rbp)
  lea    D70(%rip),%rax
  mov    %rax,-0x50(%rbp)
  lea    D54(%rip),%rax
  mov    %rax,-0x48(%rbp)
  lea    D2(%rip),%rax
  mov    %rax,-0x40(%rbp)
  lea    D58(%rip),%rax
  mov    %rax,-0x38(%rbp)
  lea    D85(%rip),%rax
  mov    %rax,-0x30(%rbp)
  lea    D35(%rip),%rax
  mov    %rax,-0x28(%rbp)
  lea    D26(%rip),%rax
  mov    %rax,-0x20(%rbp)
  lea    D97(%rip),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x64(%rbp),%eax
  mov    %eax,%edi
  call   <S_ISREG@plt>
  test   %rax,%rax
  je     L17
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movb   $0x2d,(%rax)
  jmp    L22
L17:
  mov    -0x64(%rbp),%eax
  mov    %eax,%edi
  call   <S_ISDIR@plt>
  test   %rax,%rax
  je     L133
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movb   $0x64,(%rax)
  jmp    L22
L133:
  mov    -0x64(%rbp),%eax
  mov    %eax,%edi
  call   <S_ISCHR@plt>
  test   %rax,%rax
  je     L38
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movb   $0x63,(%rax)
  jmp    L22
L38:
  mov    -0x64(%rbp),%eax
  mov    %eax,%edi
  call   <S_ISBLK@plt>
  test   %rax,%rax
  je     L55
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movb   $0x62,(%rax)
  jmp    L22
L55:
  mov    -0x64(%rbp),%eax
  mov    %eax,%edi
  call   <S_ISFIFO@plt>
  test   %rax,%rax
  je     L20
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movb   $0x70,(%rax)
  jmp    L22
L20:
  mov    -0x64(%rbp),%eax
  mov    %eax,%edi
  call   <S_ISLNK@plt>
  test   %rax,%rax
  je     L47
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movb   $0x6c,(%rax)
  jmp    L22
L47:
  mov    -0x64(%rbp),%eax
  mov    %eax,%edi
  call   <S_ISSOCK@plt>
  test   %rax,%rax
  je     L22
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movb   $0x73,(%rax)
L22:
  mov    -0x64(%rbp),%eax
  sar    $0x6,%eax
  and    $0x7,%eax
  mov    %eax,-0x5c(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  mov    -0x50(%rbp,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  addq   $0x3,-0x58(%rbp)
  mov    -0x64(%rbp),%eax
  sar    $0x3,%eax
  and    $0x7,%eax
  mov    %eax,-0x5c(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  mov    -0x50(%rbp,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  addq   $0x3,-0x58(%rbp)
  mov    -0x64(%rbp),%eax
  and    $0x7,%eax
  mov    %eax,-0x5c(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  mov    -0x50(%rbp,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  addq   $0x3,-0x58(%rbp)
  mov    -0x58(%rbp),%rax
  movb   $0x0,(%rax)
  lea    D51(%rip),%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L113
  call   <__stack_chk_fail@plt>
L113:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D70
type_infered: string
name: parse_data
arguments: data_tag: D54
type_infered: string
name: parse_data
arguments: data_tag: D2
type_infered: string
name: parse_data
arguments: data_tag: D58
type_infered: string
name: parse_data
arguments: data_tag: D85
type_infered: string
name: parse_data
arguments: data_tag: D35
type_infered: string
name: parse_data
arguments: data_tag: D26
type_infered: string
name: parse_data
arguments: data_tag: D97
type_infered: string

tool: D70: ---

tool: D54: --x

tool: D2: -w-

tool: D58: -wx

tool: D85: r--

tool: D35: r-x

tool: D26: rw-

tool: D97: rwx

assistant: ```c
char *get_mode_string(mode_t mode) {
  int m;
  static char mode_string[16];
  char *buff = mode_string;
  char *perm[] = {"---", "--x", "-w-", "-wx", "r--", "r-x", "rw-", "rwx"};
  if (S_ISREG(mode)) {
    *(buff++) = '-';
  } else if (S_ISDIR(mode)) {
    *(buff++) = 'd';
  } else if (S_ISCHR(mode)) {
    *(buff++) = 'c';
  } else if (S_ISBLK(mode)) {
    *(buff++) = 'b';
  } else if (S_ISFIFO(mode)) {
    *(buff++) = 'p';
  } else if (S_ISLNK(mode)) {
    *(buff++) = 'l';
  } else if (S_ISSOCK(mode)) {
    *(buff++) = 's';
  }
  m = (mode >> 6) & 7;
  strcpy(buff, perm[m]);
  buff += 3;
  m = (mode >> 3) & 7;
  strcpy(buff, perm[m]);
  buff += 3;
  m = (mode >> 0) & 7;
  strcpy(buff, perm[m]);
  buff += 3;
  *buff = 0;
  return (mode_string);
}
```