user: Translate the below assembly code into C programming language:

```asm
<u8_mbtouc_aux>:
  endbr64
  mov    %rdi,%rcx
  movzbl (%rsi),%edi
  cmp    $0xc1,%dil
  jbe    L172
  cmp    $0xdf,%dil
  ja     L239
  cmp    $0x1,%rdx
  jbe    L2
  movzbl 0x1(%rsi),%esi
  add    $0xffffff80,%esi
  mov    $0xfffd,%edx
  mov    $0x1,%eax
  cmp    $0x3f,%sil
  ja     L160
  mov    %edi,%edx
  shl    $0x6,%edx
  and    $0x7c0,%edx
  movzbl %sil,%esi
  or     %esi,%edx
  mov    $0x2,%eax
  jmp    L160
L2:
  mov    %edx,%eax
  mov    $0xfffd,%edx
  jmp    L160
L239:
  cmp    $0xef,%dil
  ja     L84
  cmp    $0x2,%rdx
  jbe    L6
  movzbl 0x1(%rsi),%eax
  lea    -0x80(%rax),%r8d
  cmp    $0x3f,%r8b
  ja     L48
  movzbl 0x2(%rsi),%esi
  add    $0xffffff80,%esi
  cmp    $0x3f,%sil
  ja     L182
  cmp    $0x9f,%al
  ja     L230
  mov    $0xfffd,%edx
  mov    $0x1,%eax
  cmp    $0xe0,%dil
  jbe    L160
L230:
  mov    %edi,%edx
  shl    $0xc,%edx
  and    $0xf000,%edx
  movzbl %r8b,%r8d
  shl    $0x6,%r8d
  or     %r8d,%edx
  movzbl %sil,%esi
  or     %esi,%edx
  mov    $0x3,%eax
  jmp    L160
L6:
  mov    %edx,%eax
  mov    $0xfffd,%edx
  jmp    L160
L84:
  cmp    $0xf7,%dil
  ja     L235
  cmp    $0x3,%rdx
  jbe    L212
  movzbl 0x1(%rsi),%eax
  lea    -0x80(%rax),%r8d
  cmp    $0x3f,%r8b
  ja     L98
  movzbl 0x2(%rsi),%edx
  add    $0xffffff80,%edx
  cmp    $0x3f,%dl
  ja     L338
  movzbl 0x3(%rsi),%r9d
  add    $0xffffff80,%r9d
  cmp    $0x3f,%r9b
  ja     L321
  cmp    $0x8f,%al
  ja     L286
  cmp    $0xf0,%dil
  jbe    L74
L286:
  cmp    $0xf3,%dil
  jbe    L179
  cmp    $0x8f,%al
  ja     L113
  cmp    $0xf4,%dil
  je     L179
L113:
  mov    $0xfffd,%edx
  mov    $0x1,%eax
  jmp    L160
L179:
  mov    %edi,%eax
  shl    $0x12,%eax
  and    $0x1c0000,%eax
  movzbl %r8b,%esi
  shl    $0xc,%esi
  or     %esi,%eax
  movzbl %r9b,%r9d
  or     %r9d,%eax
  movzbl %dl,%edx
  shl    $0x6,%edx
  or     %eax,%edx
  mov    $0x4,%eax
  jmp    L160
L212:
  mov    %edx,%eax
  mov    $0xfffd,%edx
  jmp    L160
L172:
  mov    $0xfffd,%edx
  mov    $0x1,%eax
L160:
  mov    %edx,(%rcx)
  ret
L48:
  mov    $0xfffd,%edx
  mov    $0x1,%eax
  jmp    L160
L182:
  mov    $0xfffd,%edx
  mov    $0x1,%eax
  jmp    L160
L235:
  mov    $0xfffd,%edx
  mov    $0x1,%eax
  jmp    L160
L98:
  mov    $0xfffd,%edx
  mov    $0x1,%eax
  jmp    L160
L338:
  mov    $0xfffd,%edx
  mov    $0x1,%eax
  jmp    L160
L321:
  mov    $0xfffd,%edx
  mov    $0x1,%eax
  jmp    L160
L74:
  mov    $0xfffd,%edx
  mov    $0x1,%eax
  jmp    L160
```

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;
}
```