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

```asm
<format_muv_str>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  movq   $0x5,-0x10(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  jmp    L50
L73:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x5c,%eax
  je     L26
  cmp    $0x5c,%eax
  jg     L171
  cmp    $0xd,%eax
  jg     L25
  cmp    $0x8,%eax
  jl     L171
  mov    $0x2500,%edx
  mov    %eax,%ecx
  shr    %cl,%rdx
  mov    %rdx,%rax
  and    $0x1,%eax
  test   %rax,%rax
  setne  %al
  test   %al,%al
  jne    L26
  jmp    L171
L25:
  cmp    $0x22,%eax
  jne    L171
L26:
  addq   $0x1,-0x10(%rbp)
  nop
L171:
  addq   $0x1,-0x10(%rbp)
  addq   $0x1,-0x20(%rbp)
L50:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L73
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movb   $0x22,(%rax)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  jmp    L91
L111:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x5c,%eax
  je     L203
  cmp    $0x5c,%eax
  jg     L146
  cmp    $0x22,%eax
  je     L203
  cmp    $0x22,%eax
  jg     L146
  cmp    $0x1b,%eax
  je     L14
  cmp    $0x1b,%eax
  jg     L146
  cmp    $0xa,%eax
  je     L45
  cmp    $0xd,%eax
  je     L45
  jmp    L146
L203:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movb   $0x5c,(%rax)
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  mov    -0x20(%rbp),%rdx
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
  jmp    L68
L45:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movb   $0x5c,(%rax)
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movb   $0x72,(%rax)
  jmp    L68
L14:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movb   $0x5c,(%rax)
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movb   $0x5b,(%rax)
  jmp    L68
L146:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  mov    -0x20(%rbp),%rdx
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
  nop
L68:
  addq   $0x1,-0x20(%rbp)
L91:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L111
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movb   $0x22,(%rax)
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movb   $0x0,(%rax)
  mov    -0x8(%rbp),%rax
  leave
  ret
```

assistant: ```c
char *format_muv_str(const char *s) {
  const char *p;
  char *out;
  char *p2;
  size_t len;
  for (len = 5, p = s; *p; len++, p++) {
    switch (*p) {
    case '\\':
    case '"':
    case '\n':
    case '\r':
    case '\b':
      len++;
      break;
    }
  }
  out = (char *)malloc(len);
  p2 = out;
  *p2++ = '\"';
  for (p = s; *p; p++) {
    switch (*p) {
    case '\\':
    case '\"':
      *p2++ = '\\';
      *p2++ = *p;
      break;
    case '\r':
    case '\n':
      *p2++ = '\\';
      *p2++ = 'r';
      break;
    case '\033':
      *p2++ = '\\';
      *p2++ = '[';
      break;
    default:
      *p2++ = *p;
      break;
    }
  }
  *p2++ = '\"';
  *p2++ = '\0';
  return out;
}
```