user: Demonstrate the C code that generates the assembly output below:

```asm
<unescape_string>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  call   <strlen@plt>
  lea    0x1(%rax),%rdi
  call   <malloc@plt>
  mov    %rax,%rdi
  movzbl (%rbx),%edx
  test   %dl,%dl
  je     L10
  lea    0x1(%rax),%rax
  lea    D7(%rip),%r8
  mov    $0xb,%r14d
  mov    $0x9,%r13d
  mov    $0xd,%r12d
  mov    $0xa,%ebp
  mov    $0xc,%r11d
  mov    $0x8,%r10d
  jmp    L56
L81:
  movzbl 0x1(%rbx),%edx
  lea    -0x30(%rdx),%esi
  cmp    $0x46,%sil
  ja     L94
  movzbl %sil,%esi
  movslq (%r8,%rsi,4),%rsi
  add    %r8,%rsi
  notrack jmp *%rsi
L94:
  add    $0x2,%rbx
L193:
  mov    %dl,(%rcx)
  mov    %rax,%rcx
L164:
  movzbl (%rbx),%edx
  add    $0x1,%rax
  test   %dl,%dl
  je     L37
L56:
  lea    -0x1(%rax),%rcx
  cmp    $0x5c,%dl
  je     L81
  mov    %dl,-0x1(%rax)
  mov    %rax,%rcx
  add    $0x1,%rbx
  jmp    L164
  add    $0x2,%rbx
  mov    $0x7,%edx
  jmp    L193
  add    $0x2,%rbx
  mov    %r10d,%edx
  jmp    L193
  add    $0x2,%rbx
  mov    %r11d,%edx
  jmp    L193
  add    $0x2,%rbx
  mov    %ebp,%edx
  jmp    L193
  add    $0x2,%rbx
  mov    %r12d,%edx
  jmp    L193
  add    $0x2,%rbx
  mov    %r13d,%edx
  jmp    L193
  add    $0x2,%rbx
  mov    %r14d,%edx
  jmp    L193
  movsbl %dl,%edx
  movzbl 0x2(%rbx),%esi
  lea    -0x30(%rsi),%r15d
  cmp    $0x7,%r15b
  setbe  %r9b
  movzbl %r9b,%r9d
  test   %sil,%sil
  je     L189
  movzbl 0x3(%rbx),%esi
  sub    $0x30,%esi
  cmp    $0x7,%sil
  jbe    L9
L189:
  lea    0x2(%rbx),%rsi
  sub    $0x30,%edx
  sub    $0x1,%r9d
  cmp    $0x7,%r15b
  ja     L159
L123:
  mov    %r9d,%r9d
  lea    0x1(%rsi,%r9,1),%rbx
L119:
  add    $0x1,%rsi
  movsbl -0x1(%rsi),%r9d
  lea    -0x30(%r9,%rdx,8),%edx
  cmp    %rsi,%rbx
  jne    L119
  jmp    L193
L159:
  mov    %rsi,%rbx
  jmp    L193
L10:
  mov    %rax,%rcx
L37:
  movb   $0x0,(%rcx)
  mov    %rdi,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L9:
  lea    0x2(%rbx),%rsi
  sub    $0x30,%edx
  jmp    L123
```

assistant: ```c
char *unescape_string(const char *input) {
  char *result = (char *)malloc(strlen(input) + 1);
  char *p = result;
  while (*input) {
    if (*input != '\\') {
      *p = *input;
      p++;
      input++;
    } else {
      input++;
      switch (*input) {
      case '\"':
      case '\\':
      default:
        *p = *input++;
        break;
      case 'a':
        *p = '\a';
        input++;
        break;
      case 'b':
        *p = '\b';
        input++;
        break;
      case 'f':
        *p = '\f';
        input++;
        break;
      case 'n':
        *p = '\n';
        input++;
        break;
      case 'r':
        *p = '\r';
        input++;
        break;
      case 't':
        *p = '\t';
        input++;
        break;
      case 'v':
        *p = '\v';
        input++;
        break;
      case '0':
      case '1':
      case '2':
      case '3':
      case '4':
      case '5':
      case '6':
      case '7': {
        int digits = (input[1] && input[1] >= '0' && input[1] <= '7' ? 1 : 0) + (input[1] && input[2] && input[2] >= '0' && input[2] <= '7' ? 1 : 0);
        int result = *input++ - '0';
        while (digits--)
          result = result * 8 + *input++ - '0';
        *p = (char)result;
        break;
      }
      }
      p++;
    }
  }
  *p = 0;
  return result;
}
```