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

```asm
<scan_xml_urldecode>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  movl   $0x0,-0x1c(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    $0x1,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L192
  mov    $0x0,%eax
  jmp    L56
L192:
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  jmp    L43
L132:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x25,%eax
  je     L172
  cmp    $0x2b,%eax
  jne    L203
  cmpl   $0x0,-0x2c(%rbp)
  je     L120
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movb   $0x20,(%rax)
  jmp    L212
L120:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    -0x18(%rbp),%rdx
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
L212:
  addq   $0x1,-0x18(%rbp)
  jmp    L43
L172:
  addq   $0x1,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L6
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jg     L134
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L134
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L166
L134:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  cmp    $0x66,%al
  jg     L166
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  cmp    $0x60,%al
  jle    L166
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  movsbl %al,%eax
  sub    $0x57,%eax
  mov    %eax,-0x1c(%rbp)
L166:
  addq   $0x1,-0x18(%rbp)
L6:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L142
  shll   $0x4,-0x1c(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jg     L8
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L8
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  add    %eax,-0x1c(%rbp)
  jmp    L216
L8:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  cmp    $0x66,%al
  jg     L216
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  cmp    $0x60,%al
  jle    L216
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  movsbl %al,%eax
  sub    $0x57,%eax
  add    %eax,-0x1c(%rbp)
L216:
  addq   $0x1,-0x18(%rbp)
L142:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    %dl,(%rax)
  jmp    L43
L203:
  mov    -0x18(%rbp),%rdx
  lea    0x1(%rdx),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x10(%rbp)
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
  nop
L43:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L132
  mov    -0x10(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x8(%rbp),%rax
L56:
  leave
  ret
```

assistant: ```c
char *scan_xml_urldecode(char *string, int space_as_plus) {
  char *pnew;
  char *src, *dst;
  int val = 0;
  pnew = (char *)malloc(strlen(string) + 1);
  if (!pnew)
    return NULL;
  src = string;
  dst = pnew;
  while (*src) {
    switch (*src) {
    case '+':
      if (space_as_plus) {
        *dst++ = ' ';
      } else {
        *dst++ = *src;
      }
      src++;
      break;
    case '%':
      src++;
      if (*src) {
        if ((*src <= '9') && (*src >= '0'))
          val = (*src - '0');
        else if ((tolower(*src) <= 'f') && (tolower(*src) >= 'a'))
          val = 10 + (tolower(*src) - 'a');
        src++;
      }
      if (*src) {
        val *= 16;
        if ((*src <= '9') && (*src >= '0'))
          val += (*src - '0');
        else if ((tolower(*src) <= 'f') && (tolower(*src) >= 'a'))
          val += (10 + (tolower(*src) - 'a'));
        src++;
      }
      *dst++ = val;
      break;
    default:
      *dst++ = *src++;
      break;
    }
  }
  *dst = '\0';
  return pnew;
}
```