user: What is the c source code of the assembly code below?

```asm
<mywcscspn>:
  endbr64
  mov    (%rdi),%ecx
  test   %ecx,%ecx
  je     L173
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r9
  mov    %rsi,%r11
  mov    $0x0,%eax
  mov    $0x0,%esi
  mov    %edx,%r10d
  and    $0x1,%r10d
  mov    $0x5,%ebp
  mov    $0x3,%ebx
  shr    %edx
  and    $0x1,%edx
  mov    $0x4,%r12d
  mov    $0x2,%r14d
  mov    $0x1,%r13d
  jmp    L99
L241:
  lea    -0x4(%rax),%edi
  cmp    $0x1,%edi
  ja     L129
  cmp    $0x22,%ecx
  jne    L129
  cmp    $0x4,%eax
  setne  %al
  movzbl %al,%eax
  jmp    L129
L213:
  test   %dl,%dl
  je     L224
  cmp    $0x5b,%ecx
  je     L268
L224:
  cmp    $0x27,%ecx
  jne    L87
  test   %r10b,%r10b
  jne    L4
L87:
  cmp    $0x22,%ecx
  jne    L229
  test   %r10b,%r10b
  je     L229
  mov    %r12d,%eax
  jmp    L129
L229:
  mov    (%r11),%edi
  test   %edi,%edi
  je     L129
  lea    0x4(%r11),%r8
L216:
  cmp    %edi,%ecx
  je     L286
  add    $0x4,%r8
  mov    -0x4(%r8),%edi
  test   %edi,%edi
  jne    L216
  jmp    L129
L137:
  cmp    $0x5d,%ecx
  setne  %al
  movzbl %al,%eax
L129:
  add    $0x1,%rsi
  mov    (%r9,%rsi,4),%ecx
  test   %ecx,%ecx
  je     L286
L99:
  cmp    $0x3,%eax
  ja     L241
  cmp    $0x1,%eax
  ja     L220
  test   %eax,%eax
  je     L213
  cmp    $0x27,%ecx
  jne    L18
  mov    %ebx,%eax
  test   %r10b,%r10b
  jne    L129
L18:
  cmp    $0x22,%ecx
  jne    L137
  mov    %ebp,%eax
  test   %r10b,%r10b
  je     L137
  jmp    L129
L220:
  cmp    $0x27,%ecx
  jne    L129
  cmp    $0x2,%eax
  setne  %al
  movzbl %al,%eax
  jmp    L129
L268:
  mov    %r13d,%eax
  jmp    L129
L4:
  mov    %r14d,%eax
  jmp    L129
L173:
  mov    $0x0,%esi
  mov    %rsi,%rax
  ret
L286:
  mov    %rsi,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

assistant: ```c
size_t mywcscspn(const wchar_t *wcs, const wchar_t *reject, int flags) {
  enum {
    PLAIN,
    NAME_BLOCK,
    SINGLE_QUOTE,
    SINGLE_QUOTE_NAME,
    DOUBLE_QUOTE,
    DOUBLE_QUOTE_NAME,
  } state = PLAIN;
  int len = 0;
  int i;
  while (1) {
    if (!wcs[len])
      return len;
    switch (state) {
    case PLAIN:
      if ((flags & 0x02) && (wcs[len] == L'[')) {
        state = NAME_BLOCK;
        break;
      }
      if ((flags & 0x01) && (wcs[len] == L'\'')) {
        state = SINGLE_QUOTE;
        break;
      }
      if ((flags & 0x01) && (wcs[len] == L'\"')) {
        state = DOUBLE_QUOTE;
        break;
      }
      for (i = 0; reject[i]; i++)
        if (wcs[len] == reject[i])
          return len;
      break;
    case NAME_BLOCK:
      if ((flags & 0x01) && (wcs[len] == L'\'')) {
        state = SINGLE_QUOTE_NAME;
        break;
      }
      if ((flags & 0x01) && (wcs[len] == L'\"')) {
        state = DOUBLE_QUOTE_NAME;
        break;
      }
      if (wcs[len] == L']')
        state = PLAIN;
      break;
    case SINGLE_QUOTE:
    case SINGLE_QUOTE_NAME:
      if (wcs[len] == L'\'')
        state = state == SINGLE_QUOTE ? PLAIN : NAME_BLOCK;
      break;
    case DOUBLE_QUOTE:
    case DOUBLE_QUOTE_NAME:
      if (wcs[len] == L'\"')
        state = state == DOUBLE_QUOTE ? PLAIN : NAME_BLOCK;
      break;
    }
    len++;
  }
}
```