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

```asm
<parse_rfc1123>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  cmpq   $0x0,-0x58(%rbp)
  jne    L88
  mov    $0xffffffff,%eax
  jmp    L84
L88:
  lea    -0x40(%rbp),%rax
  mov    $0x1c,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x58(%rbp),%rax
  mov    $0x2c,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x48(%rbp)
  cmpq   $0x0,-0x48(%rbp)
  je     L218
  addq   $0x1,-0x48(%rbp)
  jmp    L177
L91:
  addq   $0x1,-0x48(%rbp)
L177:
  mov    -0x48(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L91
  mov    -0x48(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <xisdigit@plt>
  test   %rax,%rax
  je     L224
  mov    -0x48(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <xisdigit@plt>
  test   %rax,%rax
  jne    L224
  subq   $0x1,-0x48(%rbp)
L224:
  mov    -0x48(%rbp),%rax
  mov    $0x2d,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L292
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    $0x11,%eax
  jg     L80
  mov    $0xffffffff,%eax
  jmp    L84
L80:
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <make_num@plt>
  mov    %eax,-0x40(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x3,%rax
  mov    %rax,%rdi
  call   <make_month@plt>
  mov    %eax,-0x3c(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x7,%rax
  mov    %rax,%rdi
  call   <make_num@plt>
  mov    %eax,-0x38(%rbp)
  mov    -0x38(%rbp),%eax
  cmp    $0x45,%eax
  jg     L76
  mov    -0x38(%rbp),%eax
  add    $0x64,%eax
  mov    %eax,-0x38(%rbp)
L76:
  mov    -0x48(%rbp),%rax
  add    $0xa,%rax
  mov    %rax,%rdi
  call   <make_num@plt>
  mov    %eax,-0x34(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0xd,%rax
  mov    %rax,%rdi
  call   <make_num@plt>
  mov    %eax,-0x30(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x10,%rax
  mov    %rax,%rdi
  call   <make_num@plt>
  mov    %eax,-0x2c(%rbp)
  jmp    L39
L292:
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    $0x13,%eax
  jg     L23
  mov    $0xffffffff,%eax
  jmp    L84
L23:
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <make_num@plt>
  mov    %eax,-0x40(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x3,%rax
  mov    %rax,%rdi
  call   <make_month@plt>
  mov    %eax,-0x3c(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x7,%rax
  mov    %rax,%rdi
  call   <make_num@plt>
  imul   $0x64,%eax,%eax
  lea    -0x76c(%rax),%ebx
  mov    -0x48(%rbp),%rax
  add    $0x9,%rax
  mov    %rax,%rdi
  call   <make_num@plt>
  add    %ebx,%eax
  mov    %eax,-0x38(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0xc,%rax
  mov    %rax,%rdi
  call   <make_num@plt>
  mov    %eax,-0x34(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0xf,%rax
  mov    %rax,%rdi
  call   <make_num@plt>
  mov    %eax,-0x30(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x12,%rax
  mov    %rax,%rdi
  call   <make_num@plt>
  mov    %eax,-0x2c(%rbp)
  jmp    L39
L218:
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x48(%rbp)
  jmp    L53
L18:
  addq   $0x1,-0x48(%rbp)
L53:
  mov    -0x48(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L181
  mov    -0x48(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L18
L181:
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    $0x17,%eax
  jg     L232
  mov    $0xffffffff,%eax
  jmp    L84
L232:
  mov    -0x48(%rbp),%rax
  add    $0x8,%rax
  mov    %rax,%rdi
  call   <make_num@plt>
  mov    %eax,-0x40(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x4,%rax
  mov    %rax,%rdi
  call   <make_month@plt>
  mov    %eax,-0x3c(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x14,%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  sub    $0x76c,%eax
  mov    %eax,-0x38(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0xb,%rax
  mov    %rax,%rdi
  call   <make_num@plt>
  mov    %eax,-0x34(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0xe,%rax
  mov    %rax,%rdi
  call   <make_num@plt>
  mov    %eax,-0x30(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x11,%rax
  mov    %rax,%rdi
  call   <make_num@plt>
  mov    %eax,-0x2c(%rbp)
L39:
  mov    -0x2c(%rbp),%eax
  test   %eax,%eax
  js     L242
  mov    -0x2c(%rbp),%eax
  cmp    $0x3b,%eax
  jg     L242
  mov    -0x30(%rbp),%eax
  test   %eax,%eax
  js     L242
  mov    -0x30(%rbp),%eax
  cmp    $0x3b,%eax
  jg     L242
  mov    -0x34(%rbp),%eax
  test   %eax,%eax
  js     L242
  mov    -0x34(%rbp),%eax
  cmp    $0x17,%eax
  jg     L242
  mov    -0x40(%rbp),%eax
  test   %eax,%eax
  jle    L242
  mov    -0x40(%rbp),%eax
  cmp    $0x1f,%eax
  jg     L242
  mov    -0x3c(%rbp),%eax
  test   %eax,%eax
  js     L242
  mov    -0x3c(%rbp),%eax
  cmp    $0xb,%eax
  jg     L242
  mov    -0x38(%rbp),%eax
  cmp    $0x45,%eax
  jle    L242
  mov    -0x38(%rbp),%eax
  cmp    $0x78,%eax
  jle    L320
L242:
  mov    $0xffffffff,%eax
  jmp    L84
L320:
  movl   $0xffffffff,-0x28(%rbp)
  lea    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <mktime@plt>
  mov    %eax,-0x4c(%rbp)
  movl   $0x0,-0x50(%rbp)
  mov    -0x28(%rbp),%eax
  test   %eax,%eax
  jle    L267
  movl   $0xfffff1f0,-0x50(%rbp)
L267:
  mov    D4(%rip),%rax
  mov    (%rax),%edx
  mov    -0x50(%rbp),%eax
  add    %edx,%eax
  sub    %eax,-0x4c(%rbp)
  mov    -0x4c(%rbp),%eax
L84:
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L240
  call   <__stack_chk_fail@plt>
L240:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

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