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     L178
  mov    %rsp,%rbp
  mov    %rdi,%rbx
  mov    $0x1c,%edx
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <memset@plt>
  mov    $0x2c,%esi
  mov    %rbx,%rdi
  call   <strchr@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L69
  movsbl 0x1(%rax),%edi
  lea    0x1(%rax),%rbx
  cmp    $0x20,%dil
  jne    L94
  nopl   0x0(%rax)
L63:
  mov    %rbx,%r12
  movsbl 0x1(%rbx),%edi
  add    $0x1,%rbx
  cmp    $0x20,%dil
  je     L63
L94:
  call   <xisdigit@plt>
  test   %rax,%rax
  jne    L41
L148:
  mov    %rbx,%rdi
  mov    $0x2d,%esi
  call   <strchr@plt>
  mov    %rbx,%rdi
  test   %rax,%rax
  je     L207
  call   <strlen@plt>
  cmp    $0x11,%eax
  jle    L178
  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>
L201:
  mov    %eax,0x14(%rsp)
  cmp    $0x3b,%eax
  ja     L178
  cmpl   $0x3b,0x10(%rsp)
  ja     L178
  cmpl   $0x17,0xc(%rsp)
  ja     L178
  mov    (%rsp),%eax
  sub    $0x1,%eax
  cmp    $0x1e,%eax
  ja     L178
  cmpl   $0xb,0x4(%rsp)
  ja     L178
  mov    0x8(%rsp),%eax
  sub    $0x46,%eax
  cmp    $0x32,%eax
  ja     L178
  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    D7(%rip),%rcx
  add    (%rcx),%edx
  sub    %edx,%eax
L145:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L116
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L114:
  add    $0x1,%rbx
L69:
  cmpb   $0x20,(%rbx)
  je     L114
  mov    %rbx,%rdi
  call   <strlen@plt>
  cmp    $0x17,%eax
  jle    L178
  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    L201
  nopl   (%rax)
L41:
  movsbl 0x1(%rbx),%edi
  call   <xisdigit@plt>
  test   %rax,%rax
  cmove  %r12,%rbx
  jmp    L148
  nopl   (%rax)
L207:
  call   <strlen@plt>
  cmp    $0x13,%eax
  jle    L178
  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    L201
  nop
L178:
  mov    $0xffffffff,%eax
  jmp    L145
L116:
  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;
}
```