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

```asm
<fcitx_utf8_get_char_extended>:
  endbr64
  movzbl (%rdi),%eax
  mov    %rdi,%rdx
  mov    %eax,%ecx
  test   %al,%al
  jns    L211
  cmp    $0xbf,%eax
  jbe    L335
  cmp    $0xdf,%eax
  ja     L213
  and    $0x1f,%ecx
  mov    $0x2,%eax
  mov    $0x2,%edi
L31:
  cmp    %eax,%esi
  jae    L168
  cmp    $0x1,%esi
  jle    L99
  movzbl 0x1(%rdx),%eax
  and    $0xffffffc0,%eax
  cmp    $0x80,%al
  jne    L335
  cmp    $0x2,%esi
  je     L99
  movzbl 0x2(%rdx),%eax
  and    $0xffffffc0,%eax
  cmp    $0x80,%al
  jne    L335
  cmp    $0x3,%esi
  je     L99
  movzbl 0x3(%rdx),%eax
  and    $0xffffffc0,%eax
  cmp    $0x80,%al
  jne    L335
  cmp    $0x4,%esi
  je     L99
  movzbl 0x4(%rdx),%eax
  and    $0xffffffc0,%eax
  cmp    $0x80,%al
  jne    L335
  xor    %eax,%eax
  cmp    $0x5,%esi
  setne  %al
  sub    $0x2,%eax
  ret
L12:
  cmp    $0x7f,%ecx
  ja     L94
  nopl   0x0(%rax)
L335:
  mov    $0xffffffff,%eax
L211:
  ret
  xchg   %ax,%ax
L213:
  cmp    $0xef,%eax
  jbe    L200
  cmp    $0xf7,%eax
  ja     L325
  and    $0x7,%ecx
  mov    $0x4,%eax
  mov    $0x4,%edi
  jmp    L31
  nopl   0x0(%rax,%rax,1)
L168:
  movzbl 0x1(%rdx),%eax
  mov    %eax,%esi
  and    $0xffffffc0,%esi
  cmp    $0x80,%sil
  jne    L321
  shl    $0x6,%ecx
  and    $0x3f,%eax
  or     %eax,%ecx
  cmp    $0x2,%edi
  je     L12
  movzbl 0x2(%rdx),%eax
  mov    %eax,%esi
  and    $0xffffffc0,%esi
  cmp    $0x80,%sil
  jne    L321
  shl    $0x6,%ecx
  and    $0x3f,%eax
  or     %eax,%ecx
  cmp    $0x3,%edi
  je     L270
  movzbl 0x3(%rdx),%eax
  mov    %eax,%esi
  and    $0xffffffc0,%esi
  cmp    $0x80,%sil
  jne    L321
  shl    $0x6,%ecx
  and    $0x3f,%eax
  or     %eax,%ecx
  cmp    $0x4,%edi
  je     L270
  movzbl 0x4(%rdx),%eax
  mov    %eax,%esi
  and    $0xffffffc0,%esi
  cmp    $0x80,%sil
  jne    L321
  shl    $0x6,%ecx
  and    $0x3f,%eax
  or     %eax,%ecx
  cmp    $0x6,%edi
  jne    L270
  movzbl 0x5(%rdx),%eax
  shl    $0x6,%ecx
  mov    %eax,%edx
  mov    %eax,%esi
  and    $0x3f,%esi
  and    $0xffffffc0,%edx
  or     %esi,%ecx
  cmp    $0x80,%dl
  jne    L321
L270:
  mov    $0xffffffff,%eax
  cmp    $0x7f,%ecx
  jbe    L211
  cmp    $0x7ff,%ecx
  jbe    L211
  mov    $0x3,%eax
  cmp    $0xffff,%ecx
  jbe    L170
  mov    $0x4,%eax
  cmp    $0x1fffff,%ecx
  jbe    L170
  xor    %eax,%eax
  cmp    $0x3ffffff,%ecx
  seta   %al
  add    $0x5,%eax
L170:
  cmp    %eax,%edi
  jne    L335
L94:
  mov    %ecx,%eax
  ret
  nopl   (%rax)
L200:
  and    $0xf,%ecx
  mov    $0x3,%eax
  mov    $0x3,%edi
  jmp    L31
  nopw   0x0(%rax,%rax,1)
L321:
  cmp    $0x1,%al
  mov    $0xfffffffe,%eax
  sbb    $0xffffffff,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L325:
  cmp    $0xfb,%eax
  jbe    L117
  cmp    $0xfd,%eax
  ja     L335
  and    $0x1,%ecx
  mov    $0x6,%eax
  mov    $0x6,%edi
  jmp    L31
  nopl   0x0(%rax)
L99:
  mov    $0xfffffffe,%eax
  ret
  xchg   %ax,%ax
L117:
  and    $0x3,%ecx
  mov    $0x5,%eax
  mov    $0x5,%edi
  jmp    L31
```

assistant: ```c
__attribute__((visibility("default"))) int fcitx_utf8_get_char_extended(const char *s, int max_len) {
  const unsigned char *p = (const unsigned char *)s;
  int i, len;
  unsigned int wc = (unsigned char)*p;
  if (wc < 0x80) {
    return wc;
  } else if (wc < 0xc0) {
    return (unsigned int)-1;
  } else if (wc < 0xe0) {
    len = 2;
    wc &= 0x1f;
  } else if (wc < 0xf0) {
    len = 3;
    wc &= 0x0f;
  } else if (wc < 0xf8) {
    len = 4;
    wc &= 0x07;
  } else if (wc < 0xfc) {
    len = 5;
    wc &= 0x03;
  } else if (wc < 0xfe) {
    len = 6;
    wc &= 0x01;
  } else {
    return (unsigned int)-1;
  }
  if (max_len >= 0 && len > max_len) {
    for (i = 1; i < max_len; i++) {
      if ((((unsigned char *)p)[i] & 0xc0) != 0x80)
        return (unsigned int)-1;
    }
    return (unsigned int)-2;
  }
  for (i = 1; i < len; ++i) {
    unsigned int ch = ((unsigned char *)p)[i];
    if ((ch & 0xc0) != 0x80) {
      if (ch)
        return (unsigned int)-1;
      else
        return (unsigned int)-2;
    }
    wc <<= 6;
    wc |= (ch & 0x3f);
  }
  if (((wc) < 0x80 ? 1 : ((wc) < 0x800 ? 2 : ((wc) < 0x10000 ? 3 : ((wc) < 0x200000 ? 4 : ((wc) < 0x4000000 ? 5 : 6))))) != len)
    return (unsigned int)-1;
  return wc;
}
```