user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<date2yyyymm>:
  endbr64
  movzbl (%rdi),%edx
  mov    %rdi,%rax
  lea    -0x30(%rdx),%ecx
  cmp    $0x9,%cl
  ja     L410
  nopw   0x0(%rax,%rax,1)
L256:
  movzbl 0x1(%rax),%edx
  add    $0x1,%rax
  lea    -0x30(%rdx),%ecx
  cmp    $0x9,%cl
  jbe    L256
L410:
  cmp    $0x20,%dl
  je     L256
  xor    %r8d,%r8d
  test   %dl,%dl
  je     L59
  lea    -0x20(%rdx),%ecx
  cmp    $0x60,%dl
  cmovg  %ecx,%edx
  movzbl 0x1(%rax),%ecx
  test   %cl,%cl
  je     L59
  lea    -0x20(%rcx),%esi
  cmp    $0x60,%cl
  cmovg  %esi,%ecx
  movzbl 0x2(%rax),%esi
  test   %sil,%sil
  je     L59
  cmp    $0x60,%sil
  lea    -0x20(%rsi),%edi
  cmovg  %edi,%esi
  sub    $0x41,%edx
  cmp    $0x12,%dl
  ja     L370
  lea    D1(%rip),%rdi
  movzbl %dl,%edx
  movslq (%rdi,%rdx,4),%rdx
  add    %rdi,%rdx
  notrack jmp *%rdx
  cmp    $0x4f,%cl
  jne    L370
  mov    $0xb,%edi
  cmp    $0x56,%sil
  je     L203
  nopl   (%rax)
L370:
  xor    %r8d,%r8d
L59:
  mov    %r8d,%eax
  ret
  cmp    $0x45,%cl
  jne    L370
  mov    $0x9,%edi
  cmp    $0x50,%sil
  jne    L370
  nopw   0x0(%rax,%rax,1)
L203:
  xor    %r8d,%r8d
  cmpb   $0x20,0x3(%rax)
  jne    L59
  lea    0x5(%rax),%rdx
  movzbl 0x4(%rax),%eax
  lea    -0x30(%rax),%ecx
  cmp    $0x9,%cl
  ja     L59
  nopl   0x0(%rax)
L77:
  lea    (%r8,%r8,4),%ecx
  movzbl %al,%eax
  add    $0x1,%rdx
  lea    -0x30(%rax,%rcx,2),%r8d
  movzbl -0x1(%rdx),%eax
  lea    -0x30(%rax),%ecx
  cmp    $0x9,%cl
  jbe    L77
  test   %r8d,%r8d
  je     L59
  imul   $0x64,%r8d,%r8d
  add    %edi,%r8d
  jmp    L59
  cmp    $0x50,%cl
  jne    L240
  mov    $0x4,%edi
  cmp    $0x52,%sil
  je     L203
L240:
  cmp    $0x55,%cl
  jne    L370
  mov    $0x8,%edi
  cmp    $0x47,%sil
  je     L203
  jmp    L370
  nop
  cmp    $0x45,%cl
  jne    L370
  cmp    $0x43,%sil
  jne    L370
  mov    $0xc,%edi
  jmp    L203
  cmp    $0x45,%cl
  jne    L370
  mov    $0x2,%edi
  cmp    $0x42,%sil
  je     L203
  jmp    L370
  cmp    $0x41,%cl
  jne    L281
  mov    $0x1,%edi
  cmp    $0x4e,%sil
  je     L203
L281:
  xor    %r8d,%r8d
  cmp    $0x55,%cl
  jne    L59
  cmp    $0x4e,%sil
  je     L87
  cmp    $0x4c,%sil
  jne    L59
  mov    $0x7,%edi
  jmp    L203
  nopl   0x0(%rax)
  xor    %r8d,%r8d
  cmp    $0x41,%cl
  jne    L59
  cmp    $0x52,%sil
  je     L405
  cmp    $0x59,%sil
  jne    L59
  mov    $0x5,%edi
  jmp    L203
  cmp    $0x43,%cl
  jne    L370
  mov    $0xa,%edi
  cmp    $0x54,%sil
  je     L203
  jmp    L370
L405:
  mov    $0x3,%edi
  jmp    L203
L87:
  mov    $0x6,%edi
  jmp    L203
```

assistant: ```c
unsigned int date2yyyymm(const char *s) {
  unsigned int mo;
  unsigned int year;
  char ch, ch1, ch2;
  for (;; s++) {
    ch = *s;
    if (ch != ' ' && (ch < '0' || ch > '9'))
      break;
  }
  mo = 0;
  if (!(ch = *(s++)))
    return 0;
  if (ch >= 'a')
    ch -= ('a' - 'A');
  if (!(ch1 = *(s++)))
    return 0;
  if (ch1 >= 'a')
    ch1 -= ('a' - 'A');
  if (!(ch2 = *(s++)))
    return 0;
  if (ch2 >= 'a')
    ch2 -= ('a' - 'A');
  switch (ch) {
  case 'J':
    if (ch1 == 'A' && ch2 == 'N') {
      mo = 1;
      break;
    }
    if (ch1 == 'U') {
      if (ch2 == 'N')
        mo = 6;
      else if (ch2 == 'L')
        mo = 7;
    }
    break;
  case 'F':
    if (ch1 == 'E' && ch2 == 'B')
      mo = 2;
    break;
  case 'A':
    if (ch1 == 'P' && ch2 == 'R')
      mo = 4;
    else if (ch1 == 'U' && ch2 == 'G')
      mo = 8;
    break;
  case 'M':
    if (ch1 != 'A')
      break;
    if (ch2 == 'R')
      mo = 3;
    else if (ch2 == 'Y')
      mo = 5;
    break;
  case 'S':
    if (ch1 == 'E' && ch2 == 'P')
      mo = 9;
    break;
  case 'O':
    if (ch1 == 'C' && ch2 == 'T')
      mo = 10;
    break;
  case 'N':
    if (ch1 == 'O' && ch2 == 'V')
      mo = 11;
    break;
  case 'D':
    if (ch1 == 'E' && ch2 == 'C')
      mo = 12;
    break;
  default:
    break;
  }
  if (!mo || *(s++) != ' ')
    return 0L;
  year = 0L;
  for (;;) {
    unsigned char chy;
    chy = (unsigned char)*(s++);
    if (chy < '0' || chy > '9') {
      if (year)
        break;
      else
        return 0;
    }
    year = year * 10 + (chy - '0');
  }
  return year * 100 + mo;
}
```