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

```asm
<conv_expand>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    D5(%rip),%rax
  test   %rax,%rax
  je     L76
  mov    D5(%rip),%rax
  mov    %rax,%rdi
  call   <free@plt>
L76:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  shl    $0x2,%eax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,D81(%rip)
  mov    D81(%rip),%rax
  test   %rax,%rax
  jne    L41
  lea    D81(%rip),%rax
  jmp    L242
L41:
  mov    D81(%rip),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L206
L70:
  mov    -0xc(%rbp),%eax
  sub    $0x7,%eax
  cmp    $0x55,%eax
  ja     L196
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D76(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D76(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  movl   $0x5c,-0xc(%rbp)
  jmp    L75
  movl   $0x27,-0xc(%rbp)
  jmp    L75
  movl   $0x22,-0xc(%rbp)
  jmp    L75
  movl   $0x61,-0xc(%rbp)
  jmp    L75
  movl   $0x62,-0xc(%rbp)
  jmp    L75
  movl   $0x65,-0xc(%rbp)
  jmp    L75
  movl   $0x66,-0xc(%rbp)
  jmp    L75
  movl   $0x6e,-0xc(%rbp)
  jmp    L75
  movl   $0x72,-0xc(%rbp)
  jmp    L75
  movl   $0x74,-0xc(%rbp)
  jmp    L75
  movl   $0x76,-0xc(%rbp)
  jmp    L75
L196:
  mov    -0xc(%rbp),%eax
  mov    %eax,%edi
  call   <isprint@plt>
  test   %eax,%eax
  je     L116
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    -0xc(%rbp),%edx
  mov    %dl,(%rax)
  jmp    L206
L116:
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movb   $0x5c,(%rax)
  mov    -0xc(%rbp),%eax
  and    $0x80,%eax
  test   %eax,%eax
  je     L164
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movb   $0x4d,(%rax)
  andl   $0xffffff7f,-0xc(%rbp)
L164:
  cmpl   $0x7f,-0xc(%rbp)
  jne    L22
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movb   $0x5e,(%rax)
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movb   $0x3f,(%rax)
  jmp    L206
L22:
  cmpl   $0x1f,-0xc(%rbp)
  jg     L137
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movb   $0x5e,(%rax)
  mov    -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  or     $0x40,%ecx
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L206
L137:
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movb   $0x2d,(%rax)
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    -0xc(%rbp),%edx
  mov    %dl,(%rax)
  jmp    L206
L75:
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movb   $0x5c,(%rax)
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    -0xc(%rbp),%edx
  mov    %dl,(%rax)
L206:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0xc(%rbp)
  cmpl   $0x0,-0xc(%rbp)
  jne    L70
  mov    -0x8(%rbp),%rax
  movb   $0x0,(%rax)
  mov    D81(%rip),%rax
L242:
  leave
  ret
```

assistant: ```c
char *conv_expand(const char *str) {
  static char *conv_str;
  static char no_memory[] = "<no memory>";
  char *cp;
  int ch;
  if (conv_str)
    free(conv_str);
  conv_str = malloc(4 * strlen(str) + 1);
  if (!conv_str)
    return no_memory;
  cp = conv_str;
  while ((ch = *(const unsigned char *)str++) != '\0') {
    switch (ch) {
    case '\\':
      ch = '\\';
      break;
    case '\'':
      ch = '\'';
      break;
    case '"':
      ch = '"';
      break;
    case '\a':
      ch = 'a';
      break;
    case '\b':
      ch = 'b';
      break;
    case '\e':
      ch = 'e';
      break;
    case '\f':
      ch = 'f';
      break;
    case '\n':
      ch = 'n';
      break;
    case '\r':
      ch = 'r';
      break;
    case '\t':
      ch = 't';
      break;
    case '\v':
      ch = 'v';
      break;
    default:
      if (isprint(ch)) {
        *cp++ = ch;
        continue;
      }
      *cp++ = '\\';
      if (ch & 0200) {
        *cp++ = 'M';
        ch &= ~0200;
      }
      if (ch == 0177) {
        *cp++ = '^';
        *cp++ = '?';
        continue;
      }
      if (ch < 040) {
        *cp++ = '^';
        *cp++ = ch | 0100;
        continue;
      }
      *cp++ = '-';
      *cp++ = ch;
      continue;
    }
    *cp++ = '\\';
    *cp++ = ch;
  }
  *cp = 0;
  return conv_str;
}
```