user: 请从给定的汇编指令推导出C源代码:

```asm
<date2yyyymm>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
L316:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0xc(%rbp)
  cmpb   $0x20,-0xc(%rbp)
  je     L537
  cmpb   $0x2f,-0xc(%rbp)
  jle    L422
  cmpb   $0x39,-0xc(%rbp)
  jg     L422
L537:
  addq   $0x1,-0x18(%rbp)
  jmp    L316
L422:
  movl   $0x0,-0x8(%rbp)
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0xc(%rbp)
  cmpb   $0x0,-0xc(%rbp)
  jne    L170
  mov    $0x0,%eax
  jmp    L461
L170:
  cmpb   $0x60,-0xc(%rbp)
  jle    L496
  movzbl -0xc(%rbp),%eax
  sub    $0x20,%eax
  mov    %al,-0xc(%rbp)
L496:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0xb(%rbp)
  cmpb   $0x0,-0xb(%rbp)
  jne    L456
  mov    $0x0,%eax
  jmp    L461
L456:
  cmpb   $0x60,-0xb(%rbp)
  jle    L265
  movzbl -0xb(%rbp),%eax
  sub    $0x20,%eax
  mov    %al,-0xb(%rbp)
L265:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0xa(%rbp)
  cmpb   $0x0,-0xa(%rbp)
  jne    L182
  mov    $0x0,%eax
  jmp    L461
L182:
  cmpb   $0x60,-0xa(%rbp)
  jle    L198
  movzbl -0xa(%rbp),%eax
  sub    $0x20,%eax
  mov    %al,-0xa(%rbp)
L198:
  movsbl -0xc(%rbp),%eax
  sub    $0x41,%eax
  cmp    $0x12,%eax
  ja     L69
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D15(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D15(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  cmpb   $0x41,-0xb(%rbp)
  jne    L476
  cmpb   $0x4e,-0xa(%rbp)
  jne    L476
  movl   $0x1,-0x8(%rbp)
  jmp    L580
L476:
  cmpb   $0x55,-0xb(%rbp)
  jne    L331
  cmpb   $0x4e,-0xa(%rbp)
  jne    L513
  movl   $0x6,-0x8(%rbp)
  jmp    L331
L513:
  cmpb   $0x4c,-0xa(%rbp)
  jne    L331
  movl   $0x7,-0x8(%rbp)
  jmp    L331
  cmpb   $0x45,-0xb(%rbp)
  jne    L150
  cmpb   $0x42,-0xa(%rbp)
  jne    L150
  movl   $0x2,-0x8(%rbp)
  jmp    L150
  cmpb   $0x50,-0xb(%rbp)
  jne    L301
  cmpb   $0x52,-0xa(%rbp)
  jne    L301
  movl   $0x4,-0x8(%rbp)
  jmp    L240
L301:
  cmpb   $0x55,-0xb(%rbp)
  jne    L240
  cmpb   $0x47,-0xa(%rbp)
  jne    L240
  movl   $0x8,-0x8(%rbp)
  jmp    L240
  cmpb   $0x41,-0xb(%rbp)
  jne    L128
  cmpb   $0x52,-0xa(%rbp)
  jne    L558
  movl   $0x3,-0x8(%rbp)
  jmp    L12
L558:
  cmpb   $0x59,-0xa(%rbp)
  jne    L12
  movl   $0x5,-0x8(%rbp)
  jmp    L12
  cmpb   $0x45,-0xb(%rbp)
  jne    L508
  cmpb   $0x50,-0xa(%rbp)
  jne    L508
  movl   $0x9,-0x8(%rbp)
  jmp    L508
  cmpb   $0x43,-0xb(%rbp)
  jne    L285
  cmpb   $0x54,-0xa(%rbp)
  jne    L285
  movl   $0xa,-0x8(%rbp)
  jmp    L285
  cmpb   $0x4f,-0xb(%rbp)
  jne    L493
  cmpb   $0x56,-0xa(%rbp)
  jne    L493
  movl   $0xb,-0x8(%rbp)
  jmp    L493
  cmpb   $0x45,-0xb(%rbp)
  jne    L599
  cmpb   $0x43,-0xa(%rbp)
  jne    L599
  movl   $0xc,-0x8(%rbp)
  jmp    L599
L69:
  nop
  jmp    L580
L331:
  nop
  jmp    L580
L150:
  nop
  jmp    L580
L240:
  nop
  jmp    L580
L128:
  nop
  jmp    L580
L12:
  nop
  jmp    L580
L508:
  nop
  jmp    L580
L285:
  nop
  jmp    L580
L493:
  nop
  jmp    L580
L599:
  nop
L580:
  cmpl   $0x0,-0x8(%rbp)
  je     L234
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L251
L234:
  mov    $0x0,%eax
  jmp    L461
L251:
  movl   $0x0,-0x4(%rbp)
L639:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x9(%rbp)
  cmpb   $0x2f,-0x9(%rbp)
  jbe    L494
  cmpb   $0x39,-0x9(%rbp)
  jbe    L410
L494:
  cmpl   $0x0,-0x4(%rbp)
  jne    L367
  mov    $0x0,%eax
  jmp    L461
L410:
  mov    -0x4(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%edx
  movzbl -0x9(%rbp),%eax
  add    %edx,%eax
  sub    $0x30,%eax
  mov    %eax,-0x4(%rbp)
  jmp    L639
L367:
  nop
  mov    -0x4(%rbp),%eax
  imul   $0x64,%eax,%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
L461:
  pop    %rbp
  ret
```

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