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

```asm
<parse_rfc1123>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  test   %rdi,%rdi
  je     L38
  mov    %rsp,%rbp
  xor    %esi,%esi
  mov    %rdi,%rbx
  mov    $0x1c,%edx
  mov    %rbp,%rdi
  call   <memset@plt>
  mov    $0x2c,%esi
  mov    %rbx,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L189
  movsbl 0x1(%rax),%edi
  lea    0x1(%rax),%rbx
  cmp    $0x20,%dil
  jne    L165
  xchg   %ax,%ax
L104:
  movsbl 0x1(%rbx),%edi
  add    $0x1,%rbx
  cmp    $0x20,%dil
  je     L104
L165:
  call   <xisdigit@plt>
  test   %rax,%rax
  jne    L200
L4:
  mov    %rbx,%rdi
  mov    $0x2d,%esi
  call   <strchr@plt>
  mov    %rbx,%rdi
  test   %rax,%rax
  je     L67
  call   <strlen@plt>
  cmp    $0x11,%eax
  jle    L38
  mov    %rbx,%rdi
  call   <make_num@plt>
  lea    0x3(%rbx),%rdi
  mov    %eax,(%rsp)
  call   <make_month@plt>
  lea    0x7(%rbx),%rdi
  mov    %eax,0x4(%rsp)
  call   <make_num@plt>
  lea    0xa(%rbx),%rdi
  lea    0x64(%rax),%edx
  cmp    $0x45,%eax
  cmovle %edx,%eax
  mov    %eax,0x8(%rsp)
  call   <make_num@plt>
  lea    0xd(%rbx),%rdi
  mov    %eax,0xc(%rsp)
  call   <make_num@plt>
  lea    0x10(%rbx),%rdi
  mov    %eax,0x10(%rsp)
  call   <make_num@plt>
L193:
  mov    %eax,0x14(%rsp)
  cmp    $0x3b,%eax
  ja     L38
  cmpl   $0x3b,0x10(%rsp)
  ja     L38
  cmpl   $0x17,0xc(%rsp)
  ja     L38
  mov    (%rsp),%eax
  sub    $0x1,%eax
  cmp    $0x1e,%eax
  ja     L38
  cmpl   $0xb,0x4(%rsp)
  ja     L38
  mov    0x8(%rsp),%eax
  sub    $0x46,%eax
  cmp    $0x32,%eax
  ja     L38
  mov    %rbp,%rdi
  movl   $0xffffffff,0x18(%rsp)
  call   <mktime@plt>
  mov    0x18(%rsp),%ecx
  xor    %edx,%edx
  test   %ecx,%ecx
  mov    $0xfffff1f0,%ecx
  cmovg  %ecx,%edx
  mov    D1(%rip),%rcx
  add    (%rcx),%edx
  sub    %edx,%eax
L45:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L70
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L10:
  add    $0x1,%rbx
L189:
  cmpb   $0x20,(%rbx)
  je     L10
  mov    %rbx,%rdi
  call   <strlen@plt>
  cmp    $0x17,%eax
  jle    L38
  lea    0x8(%rbx),%rdi
  call   <make_num@plt>
  lea    0x4(%rbx),%rdi
  mov    %eax,(%rsp)
  call   <make_month@plt>
  lea    0x14(%rbx),%rdi
  mov    %eax,0x4(%rsp)
  call   <atoi@plt>
  lea    0xb(%rbx),%rdi
  sub    $0x76c,%eax
  mov    %eax,0x8(%rsp)
  call   <make_num@plt>
  lea    0xe(%rbx),%rdi
  mov    %eax,0xc(%rsp)
  call   <make_num@plt>
  lea    0x11(%rbx),%rdi
  mov    %eax,0x10(%rsp)
  call   <make_num@plt>
  jmp    L193
  nopl   (%rax)
L200:
  movsbl 0x1(%rbx),%edi
  call   <xisdigit@plt>
  cmp    $0x1,%rax
  sbb    $0x0,%rbx
  jmp    L4
  cs nopw 0x0(%rax,%rax,1)
L67:
  call   <strlen@plt>
  cmp    $0x13,%eax
  jle    L38
  mov    %rbx,%rdi
  call   <make_num@plt>
  lea    0x3(%rbx),%rdi
  mov    %eax,(%rsp)
  call   <make_month@plt>
  lea    0x7(%rbx),%rdi
  mov    %eax,0x4(%rsp)
  call   <make_num@plt>
  lea    0x9(%rbx),%rdi
  mov    %eax,%r12d
  call   <make_num@plt>
  imul   $0x64,%r12d,%r12d
  lea    0xc(%rbx),%rdi
  lea    -0x76c(%r12,%rax,1),%eax
  mov    %eax,0x8(%rsp)
  call   <make_num@plt>
  lea    0xf(%rbx),%rdi
  mov    %eax,0xc(%rsp)
  call   <make_num@plt>
  lea    0x12(%rbx),%rdi
  mov    %eax,0x10(%rsp)
  call   <make_num@plt>
  jmp    L193
  nop
L38:
  mov    $0xffffffff,%eax
  jmp    L45
L70:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
time_t parse_rfc1123(const char *str) {
  const char *s;
  struct tm tm;
  time_t t;
  if (!str)
    return -1;
  memset(&tm, '\0', sizeof(struct tm));
  if ((s = strchr(str, ','))) {
    s++;
    while (*s == ' ')
      s++;
    if (xisdigit(*s) && !xisdigit(*(s + 1)))
      s--;
    if (strchr(s, '-')) {
      if ((int)strlen(s) < 18)
        return -1;
      tm.tm_mday = make_num(s);
      tm.tm_mon = make_month(s + 3);
      tm.tm_year = make_num(s + 7);
      if (tm.tm_year < 70)
        tm.tm_year += 100;
      tm.tm_hour = make_num(s + 10);
      tm.tm_min = make_num(s + 13);
      tm.tm_sec = make_num(s + 16);
    } else {
      if ((int)strlen(s) < 20)
        return -1;
      tm.tm_mday = make_num(s);
      tm.tm_mon = make_month(s + 3);
      tm.tm_year = (100 * make_num(s + 7) - 1900) + make_num(s + 9);
      tm.tm_hour = make_num(s + 12);
      tm.tm_min = make_num(s + 15);
      tm.tm_sec = make_num(s + 18);
    }
  } else {
    s = str;
    while (*s && *s == ' ')
      s++;
    if ((int)strlen(s) < 24)
      return -1;
    tm.tm_mday = make_num(s + 8);
    tm.tm_mon = make_month(s + 4);
    tm.tm_year = atoi(s + 20) - 1900;
    tm.tm_hour = make_num(s + 11);
    tm.tm_min = make_num(s + 14);
    tm.tm_sec = make_num(s + 17);
  }
  if (tm.tm_sec < 0 || tm.tm_sec > 59 || tm.tm_min < 0 || tm.tm_min > 59 || tm.tm_hour < 0 || tm.tm_hour > 23 || tm.tm_mday < 1 || tm.tm_mday > 31 || tm.tm_mon < 0 || tm.tm_mon > 11 || tm.tm_year < 70 || tm.tm_year > 120) {
    return -1;
  }
  tm.tm_isdst = -1;
  t = mktime(&tm);
  {
    time_t dst = 0;
    extern time_t timezone;
    if (tm.tm_isdst > 0)
      dst = -3600;
    t -= (timezone + dst);
  }
  return t;
}
```