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

```asm
<xmlEncodeString>:
  endbr64
  mov    %rdi,%r10
  mov    %esi,%r11d
  lea    -0x1(%rcx),%r8d
  test   %ecx,%ecx
  je     L302
  mov    $0x0,%edi
  lea    D5(%rip),%r9
  jmp    L320
L730:
  cmp    $0x7f,%al
  je     L167
L38:
  test   %al,%al
  js     L2
  test   %r11d,%r11d
  je     L189
  add    $0x1,%rdx
  mov    %al,(%r10)
  sub    $0x1,%r11d
  lea    0x1(%r10),%r10
L404:
  add    $0x1,%edi
  mov    %r8d,%ecx
  jmp    L324
  cmp    $0x4,%r11d
  jbe    L177
  movb   $0x26,(%r10)
  movb   $0x61,0x1(%r10)
  movb   $0x6d,0x2(%r10)
  movb   $0x70,0x3(%r10)
  movb   $0x3b,0x4(%r10)
  sub    $0x5,%r11d
  lea    0x5(%r10),%r10
L177:
  add    $0x1,%rdx
  add    $0x5,%edi
  mov    %r8d,%ecx
L324:
  lea    -0x1(%rcx),%r8d
  test   %ecx,%ecx
  je     L102
L320:
  movzbl (%rdx),%eax
  cmp    $0x3e,%al
  ja     L730
  ja     L38
  movzbl %al,%esi
  movslq (%r9,%rsi,4),%rsi
  add    %r9,%rsi
  notrack jmp *%rsi
  cmp    $0x5,%r11d
  jbe    L619
  movb   $0x26,(%r10)
  movb   $0x61,0x1(%r10)
  movb   $0x70,0x2(%r10)
  movb   $0x6f,0x3(%r10)
  movb   $0x73,0x4(%r10)
  movb   $0x3b,0x5(%r10)
  sub    $0x6,%r11d
  lea    0x6(%r10),%r10
L619:
  add    $0x1,%rdx
  add    $0x6,%edi
  mov    %r8d,%ecx
  jmp    L324
  cmp    $0x3,%r11d
  jbe    L649
  movb   $0x26,(%r10)
  movb   $0x67,0x1(%r10)
  movb   $0x74,0x2(%r10)
  movb   $0x3b,0x3(%r10)
  sub    $0x4,%r11d
  lea    0x4(%r10),%r10
L649:
  add    $0x1,%rdx
  add    $0x4,%edi
  mov    %r8d,%ecx
  jmp    L324
  cmp    $0x3,%r11d
  jbe    L204
  movb   $0x26,(%r10)
  movb   $0x6c,0x1(%r10)
  movb   $0x74,0x2(%r10)
  movb   $0x3b,0x3(%r10)
  sub    $0x4,%r11d
  lea    0x4(%r10),%r10
L204:
  add    $0x1,%rdx
  add    $0x4,%edi
  mov    %r8d,%ecx
  jmp    L324
  cmp    $0x5,%r11d
  jbe    L718
  movb   $0x26,(%r10)
  movb   $0x71,0x1(%r10)
  movb   $0x75,0x2(%r10)
  movb   $0x6f,0x3(%r10)
  movb   $0x74,0x4(%r10)
  movb   $0x3b,0x5(%r10)
  sub    $0x6,%r11d
  lea    0x6(%r10),%r10
L718:
  add    $0x1,%rdx
  add    $0x6,%edi
  mov    %r8d,%ecx
  jmp    L324
L189:
  add    $0x1,%rdx
  jmp    L404
L2:
  test   %r8d,%r8d
  je     L292
  mov    %eax,%esi
  and    $0xffffffe0,%esi
  cmp    $0xc0,%sil
  je     L34
  cmp    $0x1,%r8d
  jbe    L203
  mov    %eax,%esi
  and    $0xfffffff0,%esi
  cmp    $0xe0,%sil
  je     L326
L203:
  cmp    $0x2,%r8d
  jbe    L611
  mov    %eax,%esi
  and    $0xfffffff8,%esi
  cmp    $0xf0,%sil
  je     L359
L611:
  cmp    $0x3,%r8d
  jbe    L39
  mov    %eax,%esi
  and    $0xfffffffc,%esi
  cmp    $0xf8,%sil
  jne    L39
  movzbl 0x1(%rdx),%esi
  and    $0xffffffc0,%esi
  cmp    $0x80,%sil
  je     L392
  mov    $0xffffffff,%edi
  jmp    L102
L34:
  movzbl 0x1(%rdx),%esi
  and    $0xffffffc0,%esi
  cmp    $0x80,%sil
  jne    L611
  cmp    $0x1,%r11d
  jbe    L526
  mov    %al,(%r10)
  movzbl 0x1(%rdx),%eax
  mov    %al,0x1(%r10)
  sub    $0x2,%r11d
  lea    0x2(%rdx),%rdx
  lea    0x2(%r10),%r10
L306:
  add    $0x2,%edi
  sub    $0x2,%ecx
  jmp    L324
L526:
  add    $0x2,%rdx
  jmp    L306
L326:
  movzbl 0x1(%rdx),%esi
  and    $0xffffffc0,%esi
  cmp    $0x80,%sil
  je     L17
L39:
  cmp    $0x4,%r8d
  jbe    L720
  mov    %eax,%esi
  and    $0xfffffffe,%esi
  cmp    $0xfc,%sil
  jne    L209
  movzbl 0x1(%rdx),%esi
  and    $0xffffffc0,%esi
  cmp    $0x80,%sil
  jne    L461
  movzbl 0x2(%rdx),%esi
  and    $0xffffffc0,%esi
  cmp    $0x80,%sil
  jne    L691
  movzbl 0x3(%rdx),%esi
  and    $0xffffffc0,%esi
  cmp    $0x80,%sil
  jne    L712
  movzbl 0x4(%rdx),%esi
  and    $0xffffffc0,%esi
  cmp    $0x80,%sil
  jne    L666
  movzbl 0x5(%rdx),%esi
  and    $0xffffffc0,%esi
  cmp    $0x80,%sil
  jne    L382
  cmp    $0x5,%r11d
  jbe    L629
  mov    %al,(%r10)
  movzbl 0x1(%rdx),%eax
  mov    %al,0x1(%r10)
  movzbl 0x2(%rdx),%eax
  mov    %al,0x2(%r10)
  movzbl 0x3(%rdx),%eax
  mov    %al,0x3(%r10)
  movzbl 0x4(%rdx),%eax
  mov    %al,0x4(%r10)
  movzbl 0x5(%rdx),%eax
  mov    %al,0x5(%r10)
  sub    $0x6,%r11d
  lea    0x6(%rdx),%rdx
  lea    0x6(%r10),%r10
L721:
  add    $0x6,%edi
  sub    $0x6,%ecx
  jmp    L324
L17:
  movzbl 0x2(%rdx),%esi
  and    $0xffffffc0,%esi
  cmp    $0x80,%sil
  jne    L39
  cmp    $0x2,%r11d
  jbe    L503
  mov    %al,(%r10)
  movzbl 0x1(%rdx),%eax
  mov    %al,0x1(%r10)
  movzbl 0x2(%rdx),%eax
  mov    %al,0x2(%r10)
  sub    $0x3,%r11d
  lea    0x3(%rdx),%rdx
  lea    0x3(%r10),%r10
L397:
  add    $0x3,%edi
  sub    $0x3,%ecx
  jmp    L324
L503:
  add    $0x3,%rdx
  jmp    L397
L359:
  movzbl 0x1(%rdx),%esi
  and    $0xffffffc0,%esi
  cmp    $0x80,%sil
  je     L605
  mov    $0xffffffff,%edi
  jmp    L102
L605:
  movzbl 0x2(%rdx),%esi
  and    $0xffffffc0,%esi
  cmp    $0x80,%sil
  je     L57
  mov    $0xffffffff,%edi
  jmp    L102
L57:
  movzbl 0x3(%rdx),%esi
  and    $0xffffffc0,%esi
  cmp    $0x80,%sil
  je     L179
  mov    $0xffffffff,%edi
  jmp    L102
L179:
  cmp    $0x3,%r11d
  jbe    L171
  mov    %al,(%r10)
  movzbl 0x1(%rdx),%eax
  mov    %al,0x1(%r10)
  movzbl 0x2(%rdx),%eax
  mov    %al,0x2(%r10)
  movzbl 0x3(%rdx),%eax
  mov    %al,0x3(%r10)
  sub    $0x4,%r11d
  lea    0x4(%rdx),%rdx
  lea    0x4(%r10),%r10
L307:
  add    $0x4,%edi
  sub    $0x4,%ecx
  jmp    L324
L171:
  add    $0x4,%rdx
  jmp    L307
L392:
  movzbl 0x2(%rdx),%esi
  and    $0xffffffc0,%esi
  cmp    $0x80,%sil
  je     L229
  mov    $0xffffffff,%edi
  jmp    L102
L229:
  movzbl 0x3(%rdx),%esi
  and    $0xffffffc0,%esi
  cmp    $0x80,%sil
  je     L200
  mov    $0xffffffff,%edi
  jmp    L102
L200:
  movzbl 0x4(%rdx),%esi
  and    $0xffffffc0,%esi
  cmp    $0x80,%sil
  je     L750
  mov    $0xffffffff,%edi
  jmp    L102
L750:
  cmp    $0x4,%r11d
  jbe    L452
  mov    %al,(%r10)
  movzbl 0x1(%rdx),%eax
  mov    %al,0x1(%r10)
  movzbl 0x2(%rdx),%eax
  mov    %al,0x2(%r10)
  movzbl 0x3(%rdx),%eax
  mov    %al,0x3(%r10)
  movzbl 0x4(%rdx),%eax
  mov    %al,0x4(%r10)
  sub    $0x5,%r11d
  lea    0x5(%rdx),%rdx
  lea    0x5(%r10),%r10
L477:
  add    $0x5,%edi
  sub    $0x5,%ecx
  jmp    L324
L452:
  add    $0x5,%rdx
  jmp    L477
L629:
  add    $0x6,%rdx
  jmp    L721
L302:
  mov    $0x0,%edi
  jmp    L102
  mov    $0xffffffff,%edi
L102:
  mov    %edi,%eax
  ret
L167:
  mov    $0xffffffff,%edi
  jmp    L102
L292:
  mov    $0xffffffff,%edi
  jmp    L102
L720:
  mov    $0xffffffff,%edi
  jmp    L102
L209:
  mov    $0xffffffff,%edi
  jmp    L102
L461:
  mov    $0xffffffff,%edi
  jmp    L102
L691:
  mov    $0xffffffff,%edi
  jmp    L102
L712:
  mov    $0xffffffff,%edi
  jmp    L102
L666:
  mov    $0xffffffff,%edi
  jmp    L102
L382:
  mov    $0xffffffff,%edi
  jmp    L102
```

assistant: ```c
int xmlEncodeString(unsigned char *out, unsigned int olen, const unsigned char *in, unsigned int ilen) {
  int len;
  len = 0;
  for (; ilen--;)
    switch (*in) {
    case 0x00:
    case 0x01:
    case 0x02:
    case 0x03:
    case 0x04:
    case 0x05:
    case 0x06:
    case 0x07:
    case 0x08:
    case 0x0b:
    case 0x0c:
    case 0x0e:
    case 0x0f:
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
    case 0x15:
    case 0x16:
    case 0x17:
    case 0x18:
    case 0x19:
    case 0x1a:
    case 0x1b:
    case 0x1c:
    case 0x1d:
    case 0x1e:
    case 0x1f:
    case 0x7f:
      return (-1);
      break;
    case '&':
      if (olen > 4) {
        *out++ = '&';
        *out++ = 'a';
        *out++ = 'm';
        *out++ = 'p';
        *out++ = ';';
        olen -= 5;
      }
      in++;
      len += 5;
      break;
    case '\'':
      if (olen > 5) {
        *out++ = '&';
        *out++ = 'a';
        *out++ = 'p';
        *out++ = 'o';
        *out++ = 's';
        *out++ = ';';
        olen -= 6;
      }
      in++;
      len += 6;
      break;
    case '>':
      if (olen > 3) {
        *out++ = '&';
        *out++ = 'g';
        *out++ = 't';
        *out++ = ';';
        olen -= 4;
      }
      in++;
      len += 4;
      break;
    case '<':
      if (olen > 3) {
        *out++ = '&';
        *out++ = 'l';
        *out++ = 't';
        *out++ = ';';
        olen -= 4;
      }
      in++;
      len += 4;
      break;
    case '"':
      if (olen > 5) {
        *out++ = '&';
        *out++ = 'q';
        *out++ = 'u';
        *out++ = 'o';
        *out++ = 't';
        *out++ = ';';
        olen -= 6;
      }
      in++;
      len += 6;
      break;
    default:
      if ((*in & 0x80) == 0x00) {
        if (olen > 0) {
          *out++ = *in++;
          olen--;
        } else
          in++;
        len++;
      } else if (ilen > 0 && (*in & 0xe0) == 0xc0 && (*(in + 1) & 0xc0) == 0x80) {
        if (olen > 1) {
          *out++ = *in++;
          *out++ = *in++;
          olen -= 2;
        } else
          in += 2;
        len += 2;
        ilen--;
      } else if (ilen > 1 && (*in & 0xf0) == 0xe0 && (*(in + 1) & 0xc0) == 0x80 && (*(in + 2) & 0xc0) == 0x80) {
        if (olen > 2) {
          *out++ = *in++;
          *out++ = *in++;
          *out++ = *in++;
          olen -= 3;
        } else
          in += 3;
        len += 3;
        ilen -= 2;
      } else if (ilen > 2 && (*in & 0xf8) == 0xf0 && (*(in + 1) & 0xc0) == 0x80 && (*(in + 2) & 0xc0) == 0x80 && (*(in + 3) & 0xc0) == 0x80) {
        if (olen > 3) {
          *out++ = *in++;
          *out++ = *in++;
          *out++ = *in++;
          *out++ = *in++;
          olen -= 4;
        } else
          in += 4;
        len += 4;
        ilen -= 3;
      } else if (ilen > 3 && (*in & 0xfc) == 0xf8 && (*(in + 1) & 0xc0) == 0x80 && (*(in + 2) & 0xc0) == 0x80 && (*(in + 3) & 0xc0) == 0x80 && (*(in + 4) & 0xc0) == 0x80) {
        if (olen > 4) {
          *out++ = *in++;
          *out++ = *in++;
          *out++ = *in++;
          *out++ = *in++;
          *out++ = *in++;
          olen -= 5;
        } else
          in += 5;
        len += 5;
        ilen -= 4;
      } else if (ilen > 4 && (*in & 0xfe) == 0xfc && (*(in + 1) & 0xc0) == 0x80 && (*(in + 2) & 0xc0) == 0x80 && (*(in + 3) & 0xc0) == 0x80 && (*(in + 4) & 0xc0) == 0x80 && (*(in + 5) & 0xc0) == 0x80) {
        if (olen > 5) {
          *out++ = *in++;
          *out++ = *in++;
          *out++ = *in++;
          *out++ = *in++;
          *out++ = *in++;
          *out++ = *in++;
          olen -= 6;
        } else
          in += 6;
        len += 6;
        ilen -= 5;
      } else
        return (-1);
      break;
    }
  return (len);
}
```