user: 请从给定的汇编指令推导出C源代码:

```asm
<conv_expand>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    D33(%rip),%rax
  test   %rax,%rax
  je     L44
  mov    D33(%rip),%rax
  mov    %rax,%rdi
  call   <free@plt>
L44:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  shl    $0x2,%eax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,D63(%rip)
  mov    D63(%rip),%rax
  test   %rax,%rax
  jne    L39
  mov    $0x0,%eax
  jmp    L46
L39:
  mov    D63(%rip),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L147
L167:
  movsbl -0x9(%rbp),%eax
  sub    $0x7,%eax
  cmp    $0x55,%eax
  ja     L142
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D63(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D63(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  movb   $0x5c,-0x9(%rbp)
  jmp    L185
  movb   $0x27,-0x9(%rbp)
  jmp    L185
  movb   $0x22,-0x9(%rbp)
  jmp    L185
  movb   $0x61,-0x9(%rbp)
  jmp    L185
  movb   $0x62,-0x9(%rbp)
  jmp    L185
  movb   $0x65,-0x9(%rbp)
  jmp    L185
  movb   $0x66,-0x9(%rbp)
  jmp    L185
  movb   $0x6e,-0x9(%rbp)
  jmp    L185
  movb   $0x72,-0x9(%rbp)
  jmp    L185
  movb   $0x74,-0x9(%rbp)
  jmp    L185
  movb   $0x76,-0x9(%rbp)
  jmp    L185
L142:
  movzbl -0x9(%rbp),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isprint@plt>
  test   %eax,%eax
  je     L224
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movzbl -0x9(%rbp),%edx
  mov    %dl,(%rax)
  jmp    L147
L224:
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movb   $0x5c,(%rax)
  cmpb   $0x0,-0x9(%rbp)
  jns    L217
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movb   $0x4d,(%rax)
  andb   $0x7f,-0x9(%rbp)
L217:
  cmpb   $0x7f,-0x9(%rbp)
  jne    L77
  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    L147
L77:
  cmpb   $0x1f,-0x9(%rbp)
  jg     L158
  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)
  movzbl -0x9(%rbp),%edx
  or     $0x40,%edx
  mov    %dl,(%rax)
  jmp    L147
L158:
  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)
  movzbl -0x9(%rbp),%edx
  mov    %dl,(%rax)
  jmp    L147
L185:
  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)
  movzbl -0x9(%rbp),%edx
  mov    %dl,(%rax)
L147:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x9(%rbp)
  cmpb   $0x0,-0x9(%rbp)
  jne    L167
  mov    -0x8(%rbp),%rax
  movb   $0x0,(%rax)
  mov    D63(%rip),%rax
L46:
  leave
  ret
```

assistant: ```c
char *conv_expand(const char *str) {
  static char *conv_str;
  char *cp;
  char ch;
  if (conv_str)
    free(conv_str);
  conv_str = malloc(4 * strlen(str) + 1);
  if (!conv_str)
    return NULL;
  cp = conv_str;
  while ((ch = *(const 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((unsigned char)ch)) {
        *cp++ = ch;
        continue;
      }
      *cp++ = '\\';
      if (ch & 0200) {
        *cp++ = 'M';
        ch &= (char)~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;
}
```