user: What would the C source look like for the assembly code provided here:

```asm
<u8_mbtouc_aux>:
  endbr64
  mov    %rdi,%rcx
  movzbl (%rsi),%edi
  cmp    $0xc1,%dil
  jbe    L29
  cmp    $0xdf,%dil
  ja     L58
  cmp    $0x1,%rdx
  jbe    L12
  movzbl 0x1(%rsi),%esi
  mov    $0xfffd,%edx
  mov    $0x1,%eax
  add    $0xffffff80,%esi
  cmp    $0x3f,%sil
  ja     L41
  mov    %edi,%edx
  movzbl %sil,%esi
  mov    $0x2,%eax
  shl    $0x6,%edx
  and    $0x7c0,%edx
  or     %esi,%edx
  jmp    L41
  nop
L58:
  cmp    $0xef,%dil
  ja     L146
  cmp    $0x2,%rdx
  jbe    L12
  movzbl 0x1(%rsi),%r9d
  lea    -0x80(%r9),%r8d
  cmp    $0x3f,%r8b
  jbe    L44
  nopl   0x0(%rax,%rax,1)
L29:
  mov    $0xfffd,%edx
  mov    $0x1,%eax
L41:
  mov    %edx,(%rcx)
  ret
  nopl   (%rax)
L146:
  cmp    $0xf7,%dil
  ja     L29
  cmp    $0x3,%rdx
  jbe    L12
  movzbl 0x1(%rsi),%eax
  lea    -0x80(%rax),%r8d
  cmp    $0x3f,%r8b
  ja     L29
  movzbl 0x2(%rsi),%edx
  add    $0xffffff80,%edx
  cmp    $0x3f,%dl
  ja     L29
  movzbl 0x3(%rsi),%r9d
  add    $0xffffff80,%r9d
  cmp    $0x3f,%r9b
  ja     L29
  cmp    $0xf0,%dil
  jne    L86
  cmp    $0x8f,%al
  jbe    L29
L86:
  cmp    $0xf3,%dil
  jbe    L220
  cmp    $0xf4,%dil
  jne    L29
  cmp    $0x8f,%al
  ja     L29
L220:
  mov    %edi,%eax
  movzbl %r8b,%esi
  movzbl %r9b,%r9d
  movzbl %dl,%edx
  shl    $0x12,%eax
  shl    $0xc,%esi
  and    $0x1c0000,%eax
  shl    $0x6,%edx
  or     %esi,%eax
  or     %r9d,%eax
  or     %eax,%edx
  mov    $0x4,%eax
  jmp    L41
L12:
  mov    %edx,%eax
  mov    $0xfffd,%edx
  mov    %edx,(%rcx)
  ret
  nopw   0x0(%rax,%rax,1)
L44:
  movzbl 0x2(%rsi),%esi
  add    $0xffffff80,%esi
  cmp    $0x3f,%sil
  ja     L29
  cmp    $0xe0,%dil
  jne    L126
  mov    $0xfffd,%edx
  mov    $0x1,%eax
  cmp    $0x9f,%r9b
  jbe    L41
L126:
  mov    %edi,%edx
  movzbl %r8b,%r8d
  movzbl %sil,%esi
  mov    $0x3,%eax
  shl    $0xc,%edx
  shl    $0x6,%r8d
  and    $0xf000,%edx
  or     %r8d,%edx
  or     %esi,%edx
  jmp    L41
```

assistant: ```c
int u8_mbtouc_aux(unsigned int *puc, const unsigned char *s, size_t n) {
  unsigned char c = *s;
  if (c >= 0xc2) {
    if (c < 0xe0) {
      if (n >= 2) {
        if ((s[1] ^ 0x80) < 0x40) {
          *puc = ((unsigned int)(c & 0x1f) << 6) | (unsigned int)(s[1] ^ 0x80);
          return 2;
        }
      } else {
        *puc = 0xfffd;
        return n;
      }
    } else if (c < 0xf0) {
      if (n >= 3) {
        if ((s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40 && (c >= 0xe1 || s[1] >= 0xa0)) {
          *puc = ((unsigned int)(c & 0x0f) << 12) | ((unsigned int)(s[1] ^ 0x80) << 6) | (unsigned int)(s[2] ^ 0x80);
          return 3;
        }
      } else {
        *puc = 0xfffd;
        return n;
      }
    } else if (c < 0xf8) {
      if (n >= 4) {
        if ((s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40 && (s[3] ^ 0x80) < 0x40 && (c >= 0xf1 || s[1] >= 0x90) && (c < 0xf4 || (c == 0xf4 && s[1] < 0x90))) {
          *puc = ((unsigned int)(c & 0x07) << 18) | ((unsigned int)(s[1] ^ 0x80) << 12) | ((unsigned int)(s[2] ^ 0x80) << 6) | (unsigned int)(s[3] ^ 0x80);
          return 4;
        }
      } else {
        *puc = 0xfffd;
        return n;
      }
    }
  }
  *puc = 0xfffd;
  return 1;
}
```