user: Please show me the C implementation that matches the assembly code listed below:

```asm
<Strptime_Strptime>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x150,%rsp
  mov    %rdi,-0x138(%rbp)
  mov    %rsi,-0x140(%rbp)
  mov    %rdx,-0x148(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x138(%rbp),%rax
  mov    %rax,-0x120(%rbp)
  mov    -0x140(%rbp),%rax
  mov    %rax,-0x118(%rbp)
  mov    -0x148(%rbp),%rax
  movq   $0x0,0x20(%rax)
  mov    -0x148(%rbp),%rax
  movq   $0x0,0x28(%rax)
  mov    -0x148(%rbp),%rax
  movq   $0x0,(%rax)
  mov    -0x148(%rbp),%rax
  movl   $0x1,0x8(%rax)
  mov    -0x148(%rbp),%rax
  movq   $0x0,0x30(%rax)
  mov    -0x148(%rbp),%rax
  movq   $0x0,0x10(%rax)
  mov    -0x148(%rbp),%rax
  movq   $0x0,0x18(%rax)
  mov    -0x148(%rbp),%rax
  movq   $0x0,0x38(%rax)
  mov    -0x148(%rbp),%rax
  movq   $0x0,0x40(%rax)
  movl   $0x0,-0x12c(%rbp)
  movl   $0x0,-0x128(%rbp)
  movl   $0x0,-0x124(%rbp)
  jmp    L1060
L405:
  lea    -0x110(%rbp),%rax
  mov    $0x100,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x118(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x25,%al
  jne    L512
  addq   $0x1,-0x118(%rbp)
  mov    -0x118(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x41,%eax
  cmp    $0x38,%eax
  ja     L846
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D38(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D38(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  movl   $0x1,-0x124(%rbp)
  jmp    L560
  movl   $0x1,-0x124(%rbp)
  jmp    L560
  movl   $0x1,-0x124(%rbp)
  jmp    L560
  movl   $0x1,-0x124(%rbp)
  jmp    L560
  movl   $0x1,-0x124(%rbp)
  jmp    L560
  movl   $0x1,-0x124(%rbp)
  jmp    L560
  movl   $0x0,-0x130(%rbp)
  jmp    L569
L152:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %eax,%eax
  je     L793
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x130(%rbp),%eax
  cltq
  mov    %dl,-0x110(%rbp,%rax,1)
  addl   $0x1,-0x130(%rbp)
  addq   $0x1,-0x120(%rbp)
L569:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L152
  jmp    L835
L793:
  nop
L835:
  mov    -0x130(%rbp),%eax
  cltq
  movb   $0x0,-0x110(%rbp,%rax,1)
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L315
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x12c(%rbp)
  jmp    L560
L315:
  movl   $0x1,-0x124(%rbp)
  jmp    L560
  movl   $0x0,-0x130(%rbp)
  jmp    L709
L792:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %eax,%eax
  je     L401
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x130(%rbp),%eax
  cltq
  mov    %dl,-0x110(%rbp,%rax,1)
  addl   $0x1,-0x130(%rbp)
  addq   $0x1,-0x120(%rbp)
L709:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L792
  jmp    L987
L401:
  nop
L987:
  mov    -0x130(%rbp),%eax
  cltq
  movb   $0x0,-0x110(%rbp,%rax,1)
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L260
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,%edx
  mov    -0x148(%rbp),%rax
  mov    %edx,0x8(%rax)
  jmp    L560
L260:
  movl   $0x1,-0x124(%rbp)
  jmp    L560
  movl   $0x1,-0x124(%rbp)
  jmp    L560
  movl   $0x0,-0x130(%rbp)
  jmp    L261
L59:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %eax,%eax
  je     L1069
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x130(%rbp),%eax
  cltq
  mov    %dl,-0x110(%rbp,%rax,1)
  addl   $0x1,-0x130(%rbp)
  addq   $0x1,-0x120(%rbp)
L261:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L59
  jmp    L827
L1069:
  nop
L827:
  mov    -0x130(%rbp),%eax
  cltq
  movb   $0x0,-0x110(%rbp,%rax,1)
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L944
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %rax,%rdx
  mov    -0x148(%rbp),%rax
  mov    %rdx,(%rax)
  jmp    L560
L944:
  movl   $0x1,-0x124(%rbp)
  jmp    L560
  movl   $0x1,-0x124(%rbp)
  jmp    L560
  movl   $0x0,-0x130(%rbp)
  jmp    L1279
L690:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %eax,%eax
  je     L860
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x130(%rbp),%eax
  cltq
  mov    %dl,-0x110(%rbp,%rax,1)
  addl   $0x1,-0x130(%rbp)
  addq   $0x1,-0x120(%rbp)
L1279:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L690
  jmp    L2
L860:
  nop
L2:
  mov    -0x130(%rbp),%eax
  cltq
  movb   $0x0,-0x110(%rbp,%rax,1)
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L590
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    -0x148(%rbp),%rdx
  mov    %rax,0x38(%rdx)
  jmp    L560
L590:
  movl   $0x1,-0x124(%rbp)
  jmp    L560
  movl   $0x0,-0x130(%rbp)
  jmp    L599
L1131:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %eax,%eax
  je     L789
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x130(%rbp),%eax
  cltq
  mov    %dl,-0x110(%rbp,%rax,1)
  addl   $0x1,-0x130(%rbp)
  addq   $0x1,-0x120(%rbp)
L599:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L1131
  jmp    L1212
L789:
  nop
L1212:
  mov    -0x130(%rbp),%eax
  cltq
  movb   $0x0,-0x110(%rbp,%rax,1)
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L523
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  sub    $0x1,%rax
  mov    %rax,%rdx
  mov    -0x148(%rbp),%rax
  mov    %rdx,0x30(%rax)
  jmp    L560
L523:
  movl   $0x1,-0x124(%rbp)
  jmp    L560
  movl   $0x0,-0x130(%rbp)
  jmp    L669
L680:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %eax,%eax
  je     L762
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x130(%rbp),%eax
  cltq
  mov    %dl,-0x110(%rbp,%rax,1)
  addl   $0x1,-0x130(%rbp)
  addq   $0x1,-0x120(%rbp)
L669:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L680
  jmp    L197
L762:
  nop
L197:
  mov    -0x130(%rbp),%eax
  cltq
  movb   $0x0,-0x110(%rbp,%rax,1)
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L414
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    -0x148(%rbp),%rdx
  mov    %rax,0x28(%rdx)
  jmp    L560
L414:
  movl   $0x1,-0x124(%rbp)
  jmp    L560
L1271:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %eax,%eax
  je     L130
  addq   $0x1,-0x120(%rbp)
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L1271
  jmp    L560
L130:
  nop
  jmp    L560
  movl   $0x0,-0x130(%rbp)
  jmp    L333
L384:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isalpha@plt>
  test   %eax,%eax
  je     L666
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x130(%rbp),%eax
  cltq
  mov    %dl,-0x110(%rbp,%rax,1)
  addl   $0x1,-0x130(%rbp)
  addq   $0x1,-0x120(%rbp)
L333:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L384
  jmp    L1078
L666:
  nop
L1078:
  mov    -0x130(%rbp),%eax
  cltq
  movb   $0x0,-0x110(%rbp,%rax,1)
  lea    -0x110(%rbp),%rax
  mov    $0x2,%edx
  mov    %rax,%rsi
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L964
  movl   $0x0,-0x128(%rbp)
  jmp    L1014
L964:
  lea    -0x110(%rbp),%rax
  mov    $0x2,%edx
  mov    %rax,%rsi
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L877
  movl   $0x1,-0x128(%rbp)
  jmp    L1014
L877:
  movl   $0x1,-0x124(%rbp)
L1014:
  mov    -0x148(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jle    L496
  mov    -0x148(%rbp),%rax
  mov    (%rax),%rcx
  mov    -0x128(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  shl    $0x2,%eax
  cltq
  lea    (%rcx,%rax,1),%rdx
  mov    -0x148(%rbp),%rax
  mov    %rdx,(%rax)
  jmp    L496
  movl   $0x0,-0x130(%rbp)
  jmp    L595
L1194:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %eax,%eax
  je     L834
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x130(%rbp),%eax
  cltq
  mov    %dl,-0x110(%rbp,%rax,1)
  addl   $0x1,-0x130(%rbp)
  addq   $0x1,-0x120(%rbp)
L595:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L1194
  jmp    L1298
L834:
  nop
L1298:
  mov    -0x130(%rbp),%eax
  cltq
  movb   $0x0,-0x110(%rbp,%rax,1)
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L1266
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %rax,%rcx
  mov    -0x128(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  shl    $0x2,%eax
  cltq
  add    %rcx,%rax
  mov    %rax,%rdx
  mov    -0x148(%rbp),%rax
  mov    %rdx,(%rax)
  jmp    L560
L1266:
  movl   $0x1,-0x124(%rbp)
  jmp    L560
  movl   $0x1,-0x124(%rbp)
  jmp    L560
  movl   $0x0,-0x130(%rbp)
  jmp    L608
L362:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %eax,%eax
  je     L716
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x130(%rbp),%eax
  cltq
  mov    %dl,-0x110(%rbp,%rax,1)
  addl   $0x1,-0x130(%rbp)
  addq   $0x1,-0x120(%rbp)
L608:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L362
  jmp    L829
L716:
  nop
L829:
  mov    -0x130(%rbp),%eax
  cltq
  movb   $0x0,-0x110(%rbp,%rax,1)
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L399
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    -0x148(%rbp),%rdx
  mov    %rax,0x20(%rdx)
  jmp    L560
L399:
  movl   $0x1,-0x124(%rbp)
  jmp    L560
L469:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %eax,%eax
  je     L1228
  addq   $0x1,-0x120(%rbp)
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L469
  jmp    L560
L1228:
  nop
  jmp    L560
  movl   $0x1,-0x124(%rbp)
  jmp    L560
  movl   $0x1,-0x124(%rbp)
  jmp    L560
  movl   $0x0,-0x130(%rbp)
  jmp    L56
L619:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %eax,%eax
  je     L382
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x130(%rbp),%eax
  cltq
  mov    %dl,-0x110(%rbp,%rax,1)
  addl   $0x1,-0x130(%rbp)
  addq   $0x1,-0x120(%rbp)
L56:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L619
  jmp    L484
L382:
  nop
L484:
  mov    -0x130(%rbp),%eax
  cltq
  movb   $0x0,-0x110(%rbp,%rax,1)
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L150
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    -0x148(%rbp),%rdx
  mov    %rax,0x18(%rdx)
  jmp    L560
L150:
  movl   $0x1,-0x124(%rbp)
  jmp    L560
  movl   $0x1,-0x124(%rbp)
  jmp    L560
  movl   $0x1,-0x124(%rbp)
  jmp    L560
  movl   $0x1,-0x124(%rbp)
  jmp    L560
  movl   $0x0,-0x130(%rbp)
  jmp    L633
L805:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %eax,%eax
  je     L655
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x130(%rbp),%eax
  cltq
  mov    %dl,-0x110(%rbp,%rax,1)
  addl   $0x1,-0x130(%rbp)
  addq   $0x1,-0x120(%rbp)
L633:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L805
  jmp    L309
L655:
  nop
L309:
  mov    -0x130(%rbp),%eax
  cltq
  movb   $0x0,-0x110(%rbp,%rax,1)
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L699
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %rax,%rdx
  mov    -0x148(%rbp),%rax
  mov    %rdx,0x10(%rax)
  cmpl   $0x0,-0x12c(%rbp)
  jne    L882
  mov    -0x148(%rbp),%rax
  mov    0x10(%rax),%rax
  test   %rax,%rax
  js     L534
  mov    -0x148(%rbp),%rax
  mov    0x10(%rax),%rax
  cmp    $0x44,%rax
  jg     L534
  mov    -0x148(%rbp),%rax
  mov    0x10(%rax),%rax
  lea    0x64(%rax),%rdx
  mov    -0x148(%rbp),%rax
  mov    %rdx,0x10(%rax)
  jmp    L1167
L534:
  mov    -0x148(%rbp),%rax
  mov    0x10(%rax),%rax
  cmp    $0x44,%rax
  jle    L1167
  mov    -0x148(%rbp),%rax
  mov    0x10(%rax),%rax
  cmp    $0x63,%rax
  jg     L1167
  mov    -0x148(%rbp),%rax
  mov    0x10(%rax),%rdx
  mov    -0x148(%rbp),%rax
  mov    %rdx,0x10(%rax)
  jmp    L1167
L882:
  mov    -0x148(%rbp),%rax
  mov    0x10(%rax),%rdx
  mov    -0x12c(%rbp),%eax
  imul   $0x64,%eax,%eax
  cltq
  add    %rax,%rdx
  mov    -0x148(%rbp),%rax
  mov    %rdx,0x10(%rax)
  jmp    L1167
L699:
  movl   $0x1,-0x124(%rbp)
  jmp    L1167
  movl   $0x0,-0x130(%rbp)
  jmp    L0
L769:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %eax,%eax
  je     L361
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x130(%rbp),%eax
  cltq
  mov    %dl,-0x110(%rbp,%rax,1)
  addl   $0x1,-0x130(%rbp)
  addq   $0x1,-0x120(%rbp)
L0:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L769
  jmp    L1086
L361:
  nop
L1086:
  mov    -0x130(%rbp),%eax
  cltq
  movb   $0x0,-0x110(%rbp,%rax,1)
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L903
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  sub    $0x76c,%rax
  mov    %rax,%rdx
  mov    -0x148(%rbp),%rax
  mov    %rdx,0x10(%rax)
  jmp    L560
L903:
  movl   $0x1,-0x124(%rbp)
  jmp    L560
L846:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x118(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L182
  addq   $0x1,-0x120(%rbp)
  addq   $0x1,-0x118(%rbp)
  jmp    L560
L182:
  movl   $0x1,-0x124(%rbp)
  jmp    L560
L496:
  nop
  jmp    L560
L1167:
  nop
L560:
  addq   $0x1,-0x118(%rbp)
  jmp    L119
L512:
  mov    -0x120(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x118(%rbp),%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L541
  addq   $0x1,-0x120(%rbp)
  addq   $0x1,-0x118(%rbp)
  jmp    L119
L541:
  movl   $0x1,-0x124(%rbp)
L119:
  cmpl   $0x0,-0x124(%rbp)
  jne    L300
L1060:
  mov    -0x118(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L405
  jmp    L568
L300:
  nop
L568:
  mov    -0x120(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L75
  call   <__stack_chk_fail@plt>
L75:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D8
type: string
name: parse_data
arguments: data_tag: D22
type: string

tool: D8: am

tool: D22: pm

assistant: ```c
char *Strptime_Strptime(char *s, char *format, struct tm *tm) {
  char *t;
  char *m;
  char buffer[256];
  int i;
  int century;
  int period;
  int error;
  t = s;
  m = format;
  tm->tm_sec = 0;
  tm->tm_min = 0;
  tm->tm_hour = 0;
  tm->tm_mday = 1;
  tm->tm_mon = 0;
  tm->tm_year = 0;
  tm->tm_wday = 0;
  tm->tm_yday = 0;
  tm->tm_isdst = 0;
  century = 0;
  period = 0;
  error = 0;
  while (*m) {
    memset(buffer, 0, sizeof(buffer));
    if (*m == '%') {
      m++;
      switch (*m) {
      case 'a':
        error = 1;
        break;
      case 'A':
        error = 1;
        break;
      case 'b':
        error = 1;
        break;
      case 'B':
        error = 1;
        break;
      case 'h':
        error = 1;
        break;
      case 'c':
        error = 1;
        break;
      case 'C':
        i = 0;
        while (*t) {
          if (isdigit(*t)) {
            buffer[i] = *t;
            i++;
            t++;
          } else {
            break;
          }
        }
        buffer[i] = '\0';
        if (strlen(buffer) > 0) {
          century = atoi(buffer);
        } else {
          error = 1;
        }
        break;
      case 'd':
      case 'e':
        i = 0;
        while (*t) {
          if (isdigit(*t)) {
            buffer[i] = *t;
            i++;
            t++;
          } else {
            break;
          }
        }
        buffer[i] = '\0';
        if (strlen(buffer) > 0) {
          tm->tm_mday = atoi(buffer);
        } else {
          error = 1;
        }
        break;
      case 'D':
        error = 1;
        break;
      case 'H':
        i = 0;
        while (*t) {
          if (isdigit(*t)) {
            buffer[i] = *t;
            i++;
            t++;
          } else {
            break;
          }
        }
        buffer[i] = '\0';
        if (strlen(buffer) > 0) {
          tm->tm_hour = atoi(buffer);
        } else {
          error = 1;
        }
        break;
      case 'I':
        error = 1;
        break;
      case 'j':
        i = 0;
        while (*t) {
          if (isdigit(*t)) {
            buffer[i] = *t;
            i++;
            t++;
          } else {
            break;
          }
        }
        buffer[i] = '\0';
        if (strlen(buffer) > 0) {
          tm->tm_yday = atoi(buffer);
        } else {
          error = 1;
        }
        break;
      case 'm':
        i = 0;
        while (*t) {
          if (isdigit(*t)) {
            buffer[i] = *t;
            i++;
            t++;
          } else {
            break;
          }
        }
        buffer[i] = '\0';
        if (strlen(buffer) > 0) {
          tm->tm_mon = atoi(buffer) - 1;
        } else {
          error = 1;
        }
        break;
      case 'M':
        i = 0;
        while (*t) {
          if (isdigit(*t)) {
            buffer[i] = *t;
            i++;
            t++;
          } else {
            break;
          }
        }
        buffer[i] = '\0';
        if (strlen(buffer) > 0) {
          tm->tm_min = atoi(buffer);
        } else {
          error = 1;
        }
        break;
      case 'n':
        while (*t) {
          if (isspace(*t)) {
            t++;
          } else {
            break;
          }
        }
        break;
      case 'p':
        i = 0;
        while (*t) {
          if (isalpha(*t)) {
            buffer[i] = *t;
            i++;
            t++;
          } else {
            break;
          }
        }
        buffer[i] = '\0';
        if (strncmp("am", buffer, 2) == 0) {
          period = 0;
        } else if (strncmp("pm", buffer, 2) == 0) {
          period = 1;
        } else {
          error = 1;
        }
        if (tm->tm_hour > 0) {
          tm->tm_hour = tm->tm_hour + 12 * period;
        }
        break;
      case 'r':
        i = 0;
        while (*t) {
          if (isdigit(*t)) {
            buffer[i] = *t;
            i++;
            t++;
          } else {
            break;
          }
        }
        buffer[i] = '\0';
        if (strlen(buffer) > 0) {
          tm->tm_hour = atoi(buffer) + 12 * period;
        } else {
          error = 1;
        }
        break;
      case 'R':
        error = 1;
        break;
      case 'S':
        i = 0;
        while (*t) {
          if (isdigit(*t)) {
            buffer[i] = *t;
            i++;
            t++;
          } else {
            break;
          }
        }
        buffer[i] = '\0';
        if (strlen(buffer) > 0) {
          tm->tm_sec = atoi(buffer);
        } else {
          error = 1;
        }
        break;
      case 't':
        while (*t) {
          if (isspace(*t)) {
            t++;
          } else {
            break;
          }
        }
        break;
      case 'T':
        error = 1;
        break;
      case 'U':
        error = 1;
        break;
      case 'w':
        i = 0;
        while (*t) {
          if (isdigit(*t)) {
            buffer[i] = *t;
            i++;
            t++;
          } else {
            break;
          }
        }
        buffer[i] = '\0';
        if (strlen(buffer) > 0) {
          tm->tm_wday = atoi(buffer);
        } else {
          error = 1;
        }
        break;
      case 'W':
        error = 1;
        break;
      case 'x':
        error = 1;
        break;
      case 'X':
        error = 1;
        break;
      case 'y':
        i = 0;
        while (*t) {
          if (isdigit(*t)) {
            buffer[i] = *t;
            i++;
            t++;
          } else {
            break;
          }
        }
        buffer[i] = '\0';
        if (strlen(buffer) > 0) {
          tm->tm_year = atoi(buffer);
          if (century == 0) {
            if ((tm->tm_year >= 0) && (tm->tm_year <= 68)) {
              tm->tm_year = tm->tm_year + 100;
            } else if ((tm->tm_year >= 69) && (tm->tm_year <= 99)) {
              tm->tm_year = tm->tm_year;
            }
          } else {
            tm->tm_year = tm->tm_year + century * 100;
          }
        } else {
          error = 1;
        }
        break;
      case 'Y':
        i = 0;
        while (*t) {
          if (isdigit(*t)) {
            buffer[i] = *t;
            i++;
            t++;
          } else {
            break;
          }
        }
        buffer[i] = '\0';
        if (strlen(buffer) > 0) {
          tm->tm_year = atoi(buffer) - 1900;
        } else {
          error = 1;
        }
        break;
      default:
        if (*t == *m) {
          t++;
          m++;
        } else {
          error = 1;
        }
        break;
      }
      m++;
    } else {
      if (*t == *m) {
        t++;
        m++;
      } else {
        error = 1;
      }
    }
    if (error) {
      break;
    }
  }
  return t;
}
```