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

```asm
<is_date>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %esi,-0x38(%rbp)
  mov    %edx,-0x3c(%rbp)
  mov    %rcx,-0x48(%rbp)
  mov    %r8d,-0x40(%rbp)
  mov    %r9,-0x50(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpl   $0x0,-0x38(%rbp)
  jle    L90
  cmpl   $0xc,-0x38(%rbp)
  jg     L90
  cmpl   $0x0,-0x3c(%rbp)
  jle    L90
  cmpl   $0x1f,-0x3c(%rbp)
  jg     L90
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rdx
  mov    %rdx,-0x14(%rbp)
  mov    0x8(%rax),%eax
  mov    %eax,-0xc(%rbp)
  cmpq   $0x0,-0x48(%rbp)
  je     L26
  lea    -0x14(%rbp),%rax
  jmp    L40
L26:
  mov    -0x50(%rbp),%rax
L40:
  mov    %rax,-0x20(%rbp)
  mov    -0x38(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x20(%rbp),%rax
  mov    -0x3c(%rbp),%edx
  mov    %edx,0x4(%rax)
  cmpl   $0xffffffff,-0x34(%rbp)
  jne    L148
  cmpq   $0x0,-0x48(%rbp)
  jne    L93
  mov    $0x1,%eax
  jmp    L144
L93:
  mov    -0x48(%rbp),%rax
  mov    0x8(%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,0x8(%rax)
  jmp    L122
L148:
  cmpl   $0x7b1,-0x34(%rbp)
  jle    L246
  cmpl   $0x833,-0x34(%rbp)
  jg     L246
  mov    -0x34(%rbp),%eax
  lea    -0x76c(%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,0x8(%rax)
  jmp    L122
L246:
  cmpl   $0x46,-0x34(%rbp)
  jle    L149
  cmpl   $0x63,-0x34(%rbp)
  jg     L149
  mov    -0x20(%rbp),%rax
  mov    -0x34(%rbp),%edx
  mov    %edx,0x8(%rax)
  jmp    L122
L149:
  cmpl   $0x25,-0x34(%rbp)
  jg     L86
  mov    -0x34(%rbp),%eax
  lea    0x64(%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,0x8(%rax)
  jmp    L122
L86:
  mov    $0x0,%eax
  jmp    L144
L122:
  cmpq   $0x0,-0x48(%rbp)
  jne    L142
  mov    $0x1,%eax
  jmp    L144
L142:
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <tm_to_time_t@plt>
  mov    %eax,-0x24(%rbp)
  cmpl   $0xffffffff,-0x24(%rbp)
  je     L249
  mov    -0x40(%rbp),%eax
  add    $0xd2f00,%eax
  cmp    %eax,-0x24(%rbp)
  jle    L249
  mov    $0x0,%eax
  jmp    L144
L249:
  mov    -0x20(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x50(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x20(%rbp),%rax
  mov    0x4(%rax),%edx
  mov    -0x50(%rbp),%rax
  mov    %edx,0x4(%rax)
  cmpl   $0xffffffff,-0x34(%rbp)
  je     L32
  mov    -0x20(%rbp),%rax
  mov    0x8(%rax),%edx
  mov    -0x50(%rbp),%rax
  mov    %edx,0x8(%rax)
L32:
  mov    $0x1,%eax
  jmp    L144
L90:
  mov    $0x0,%eax
L144:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L189
  call   <__stack_chk_fail@plt>
L189:
  leave
  ret
```

assistant: ```c
int is_date(int year, int month, int day, struct tm *now_tm, time_t now, struct tm *tm) {
  if (month > 0 && month < 13 && day > 0 && day < 32) {
    struct tm check = *tm;
    struct tm *r = (now_tm ? &check : tm);
    time_t specified;
    r->tm_mon = month - 1;
    r->tm_mday = day;
    if (year == -1) {
      if (!now_tm)
        return 1;
      r->tm_year = now_tm->tm_year;
    } else if (year >= 1970 && year < 2100)
      r->tm_year = year - 1900;
    else if (year > 70 && year < 100)
      r->tm_year = year;
    else if (year < 38)
      r->tm_year = year + 100;
    else
      return 0;
    if (!now_tm)
      return 1;
    specified = tm_to_time_t(r);
    if ((specified != -1) && (now + 10 * 24 * 3600 < specified))
      return 0;
    tm->tm_mon = r->tm_mon;
    tm->tm_mday = r->tm_mday;
    if (year != -1)
      tm->tm_year = r->tm_year;
    return 1;
  }
  return 0;
}
```