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

```asm
<ezxml_str2utf8>:
  endbr64
  push   %r15
  push   %r14
  mov    %rsi,%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    (%rdi),%rax
  mov    %rdi,0x8(%rsp)
  movzbl (%rax),%edx
  cmp    $0xfe,%dl
  je     L177
  xor    %eax,%eax
  cmp    $0xff,%dl
  jne    L102
  movl   $0x0,0x4(%rsp)
L81:
  mov    (%r14),%r15
  mov    %r15,%rdi
  call   <malloc@plt>
  mov    %rax,%rdi
  mov    (%r14),%rax
  lea    -0x1(%rax),%rcx
  cmp    $0x2,%rcx
  jbe    L75
  mov    $0x2,%r12d
  xor    %r13d,%r13d
  nopl   0x0(%rax)
L155:
  mov    0x8(%rsp),%rax
  mov    0x4(%rsp),%r9d
  mov    (%rax),%rsi
  movsbl 0x1(%rsi,%r12,1),%eax
  movsbl (%rsi,%r12,1),%r8d
  test   %r9d,%r9d
  je     L112
  shl    $0x8,%r8d
  movzbl %al,%eax
  movzwl %r8w,%r8d
  or     %eax,%r8d
  movslq %r8d,%rbx
L1:
  lea    -0xd800(%rbx),%rax
  cmp    $0x7ff,%rax
  ja     L139
  lea    0x2(%r12),%r8
  cmp    %r8,%rcx
  jbe    L161
  mov    0x4(%rsp),%edx
  movsbl 0x3(%rsi,%r12,1),%eax
  movsbl 0x2(%rsi,%r12,1),%ecx
  test   %edx,%edx
  je     L209
  shl    $0x8,%ecx
  movzbl %al,%eax
  movzwl %cx,%ecx
  or     %ecx,%eax
  cltq
L56:
  shl    $0xa,%rbx
  and    $0x3ff,%eax
  mov    %r8,%r12
  and    $0xffc00,%ebx
  or     %rax,%rbx
  add    $0x10000,%rbx
L139:
  lea    0x6(%r13),%rbp
  cmp    %r15,%rbp
  jbe    L144
  nopl   0x0(%rax)
L123:
  add    $0x400,%r15
  mov    %r15,%rsi
  call   <realloc@plt>
  mov    %rax,%rdi
  cmp    %rbp,%r15
  jb     L123
L144:
  lea    (%rdi,%r13,1),%r9
  lea    0x1(%r13),%r8
  cmp    $0x7f,%rbx
  jg     L73
  mov    %bl,(%r9)
  mov    %r8,%r13
L70:
  mov    (%r14),%rax
  add    $0x2,%r12
  lea    -0x1(%rax),%rcx
  cmp    %r12,%rcx
  ja     L155
L207:
  mov    %r13,(%r14)
  mov    %r13,%rsi
  call   <realloc@plt>
  mov    0x8(%rsp),%rdx
  mov    %rax,(%rdx)
L102:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L112:
  shl    $0x8,%eax
  movzbl %r8b,%r8d
  movzwl %ax,%ebx
  or     %r8d,%ebx
  movslq %ebx,%rbx
  jmp    L1
  nopl   (%rax)
L73:
  mov    %rbx,%rax
  xor    %ecx,%ecx
  nopl   (%rax)
L46:
  mov    %rax,%rsi
  mov    %ecx,%r10d
  add    $0x1,%ecx
  shr    $0x3f,%rsi
  add    %rsi,%rax
  sar    %rax
  jne    L46
  sub    $0x1,%r10d
  mov    %rbx,%rdx
  movslq %r10d,%rsi
  sar    $0x1f,%r10d
  imul   $0x66666667,%rsi,%rsi
  sar    $0x21,%rsi
  sub    %r10d,%esi
  mov    $0xff,%r10d
  lea    (%rsi,%rsi,2),%ecx
  lea    (%rcx,%rcx,1),%eax
  mov    $0x7,%ecx
  sub    %esi,%ecx
  shl    %cl,%r10d
  mov    %eax,%ecx
  sar    %cl,%rdx
  or     %edx,%r10d
  mov    %r10b,(%r9)
  test   %esi,%esi
  je     L128
  sub    $0x1,%esi
  lea    -0x6(%rax),%ecx
  add    %rdi,%r8
  nop
L157:
  mov    %rbx,%rax
  add    $0x1,%r8
  sar    %cl,%rax
  sub    $0x6,%ecx
  and    $0x3f,%eax
  or     $0xffffff80,%eax
  mov    %al,-0x1(%r8)
  cmp    $0xfffffffa,%ecx
  jne    L157
  movslq %esi,%rsi
  lea    0x2(%r13,%rsi,1),%r13
  jmp    L70
  nopl   0x0(%rax)
L161:
  mov    %r8,%r12
  jmp    L139
  nopl   0x0(%rax,%rax,1)
L209:
  shl    $0x8,%eax
  movzbl %cl,%ecx
  movzwl %ax,%eax
  or     %ecx,%eax
  cltq
  jmp    L56
L177:
  movl   $0x1,0x4(%rsp)
  jmp    L81
L128:
  mov    %r8,%r13
  jmp    L70
L75:
  xor    %r13d,%r13d
  jmp    L207
```

assistant: ```c
char *ezxml_str2utf8(char **s, size_t *len) {
  char *u;
  size_t l = 0, sl, max = *len;
  long c, d;
  int b, be = (**s == '\xFE') ? 1 : (**s == '\xFF') ? 0 : -1;
  if (be == -1)
    return NULL;
  u = (char *)malloc(max);
  for (sl = 2; sl < *len - 1; sl += 2) {
    c = (be) ? (((*s)[sl] & 0xFF) << 8) | ((*s)[sl + 1] & 0xFF) : (((*s)[sl + 1] & 0xFF) << 8) | ((*s)[sl] & 0xFF);
    if (c >= 0xD800 && c <= 0xDFFF && (sl += 2) < *len - 1) {
      d = (be) ? (((*s)[sl] & 0xFF) << 8) | ((*s)[sl + 1] & 0xFF) : (((*s)[sl + 1] & 0xFF) << 8) | ((*s)[sl] & 0xFF);
      c = (((c & 0x3FF) << 10) | (d & 0x3FF)) + 0x10000;
    }
    while (l + 6 > max)
      u = (char *)realloc(u, max += 1024);
    if (c < 0x80)
      u[l++] = (char)c;
    else {
      for (b = 0, d = c; d; d /= 2)
        b++;
      b = (b - 2) / 5;
      u[l++] = (char)((0xFF << (7 - b)) | (c >> (6 * b)));
      while (b)
        u[l++] = 0x80 | ((c >> (6 * --b)) & 0x3F);
    }
  }
  return *s = (char *)realloc(u, *len = l);
}
```