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

```asm
<check_scheduled_time>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x3c(%rbp)
  cmpl   $0xe,-0x3c(%rbp)
  je     L376
  mov    $0xffffffff,%eax
  jmp    L238
L376:
  mov    -0x48(%rbp),%rcx
  lea    -0xd(%rbp),%rax
  mov    $0x4,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  movb   $0x0,-0x9(%rbp)
  mov    -0x48(%rbp),%rax
  lea    0x4(%rax),%rcx
  lea    -0x1c(%rbp),%rax
  mov    $0x2,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  movb   $0x0,-0x1a(%rbp)
  mov    -0x48(%rbp),%rax
  lea    0x6(%rax),%rcx
  lea    -0x19(%rbp),%rax
  mov    $0x2,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  movb   $0x0,-0x17(%rbp)
  mov    -0x48(%rbp),%rax
  lea    0x8(%rax),%rcx
  lea    -0x16(%rbp),%rax
  mov    $0x2,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  movb   $0x0,-0x14(%rbp)
  mov    -0x48(%rbp),%rax
  lea    0xa(%rax),%rcx
  lea    -0x13(%rbp),%rax
  mov    $0x2,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  movb   $0x0,-0x11(%rbp)
  mov    -0x48(%rbp),%rax
  lea    0xc(%rax),%rcx
  lea    -0x10(%rbp),%rax
  mov    $0x2,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  movb   $0x0,-0xe(%rbp)
  lea    -0xd(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x38(%rbp)
  lea    -0x1c(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x34(%rbp)
  lea    -0x19(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x30(%rbp)
  lea    -0x16(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x2c(%rbp)
  lea    -0x13(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x28(%rbp)
  lea    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x24(%rbp)
  cmpl   $0x7b1,-0x38(%rbp)
  jle    L332
  cmpl   $0x834,-0x38(%rbp)
  jle    L69
L332:
  mov    $0xffffffff,%eax
  jmp    L238
L69:
  cmpl   $0x0,-0x34(%rbp)
  jle    L160
  cmpl   $0xc,-0x34(%rbp)
  jle    L283
L160:
  mov    $0xffffffff,%eax
  jmp    L238
L283:
  cmpl   $0x0,-0x30(%rbp)
  jle    L232
  cmpl   $0x1f,-0x30(%rbp)
  jle    L378
L232:
  mov    $0xffffffff,%eax
  jmp    L238
L378:
  cmpl   $0x2,-0x34(%rbp)
  jne    L375
  mov    -0x38(%rbp),%eax
  cltd
  shr    $0x1e,%edx
  add    %edx,%eax
  and    $0x3,%eax
  sub    %edx,%eax
  mov    %eax,-0x20(%rbp)
  cmpl   $0x0,-0x20(%rbp)
  jne    L288
  movl   $0x1,-0x40(%rbp)
  mov    -0x38(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x51eb851f,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x5,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  imul   $0x64,%edx,%edx
  sub    %edx,%eax
  mov    %eax,-0x20(%rbp)
  cmpl   $0x0,-0x20(%rbp)
  jne    L30
  movl   $0x0,-0x40(%rbp)
  mov    -0x38(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x51eb851f,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x7,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  imul   $0x190,%edx,%edx
  sub    %edx,%eax
  mov    %eax,-0x20(%rbp)
  cmpl   $0x0,-0x20(%rbp)
  jne    L30
  movl   $0x1,-0x40(%rbp)
  jmp    L30
L288:
  movl   $0x0,-0x40(%rbp)
L30:
  cmpl   $0x0,-0x40(%rbp)
  jne    L117
  cmpl   $0x1c,-0x30(%rbp)
  jle    L117
  mov    $0xffffffff,%eax
  jmp    L238
L117:
  cmpl   $0x1,-0x40(%rbp)
  jne    L375
  cmpl   $0x1d,-0x30(%rbp)
  jle    L375
  mov    $0xffffffff,%eax
  jmp    L238
L375:
  cmpl   $0x4,-0x34(%rbp)
  je     L309
  cmpl   $0x6,-0x34(%rbp)
  je     L309
  cmpl   $0x9,-0x34(%rbp)
  je     L309
  cmpl   $0xb,-0x34(%rbp)
  jne    L167
L309:
  cmpl   $0x1e,-0x30(%rbp)
  jle    L167
  mov    $0xffffffff,%eax
  jmp    L238
L167:
  cmpl   $0x0,-0x2c(%rbp)
  js     L1
  cmpl   $0x17,-0x2c(%rbp)
  jle    L239
L1:
  mov    $0xffffffff,%eax
  jmp    L238
L239:
  cmpl   $0x0,-0x28(%rbp)
  js     L255
  cmpl   $0x3b,-0x28(%rbp)
  jle    L0
L255:
  mov    $0xffffffff,%eax
  jmp    L238
L0:
  cmpl   $0x0,-0x24(%rbp)
  js     L52
  cmpl   $0x3b,-0x24(%rbp)
  jle    L145
L52:
  mov    $0xffffffff,%eax
  jmp    L238
L145:
  mov    $0x0,%eax
L238:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L70
  call   <__stack_chk_fail@plt>
L70:
  leave
  ret
```

assistant: ```c
int check_scheduled_time(char *data) {
  int size, i_year, i_mon, i_day, i_hour, i_min, i_sec, val, leap_year;
  char year[5], mon[3], day[3], hour[3], min[3], sec[3];
  size = strlen(data);
  if (size != 14) {
    return -1;
  }
  strncpy(year, data, 4);
  year[4] = '\0';
  strncpy(mon, (data + 4), 2);
  mon[2] = '\0';
  strncpy(day, (data + 6), 2);
  day[2] = '\0';
  strncpy(hour, (data + 8), 2);
  hour[2] = '\0';
  strncpy(min, (data + 10), 2);
  min[2] = '\0';
  strncpy(sec, (data + 12), 2);
  sec[2] = '\0';
  i_year = atoi(year);
  i_mon = atoi(mon);
  i_day = atoi(day);
  i_hour = atoi(hour);
  i_min = atoi(min);
  i_sec = atoi(sec);
  if (i_year < 1970 || i_year > 2100) {
    return -1;
  }
  if (i_mon < 1 || i_mon > 12) {
    return -1;
  }
  if (i_day < 1 || i_day > 31) {
    return -1;
  }
  if (i_mon == 2) {
    if ((val = i_year % 4) == 0) {
      leap_year = 1;
      if ((val = i_year % 100) == 0) {
        leap_year = 0;
        if ((val = i_year % 400) == 0) {
          leap_year = 1;
        }
      }
    } else {
      leap_year = 0;
    }
    if (leap_year == 0 && i_day > 28) {
      return -1;
    }
    if (leap_year == 1 && i_day > 29) {
      return -1;
    }
  }
  if (i_mon == 4 || i_mon == 6 || i_mon == 9 || i_mon == 11) {
    if (i_day > 30) {
      return -1;
    }
  }
  if (i_hour < 0 || i_hour > 23) {
    return -1;
  }
  if (i_min < 0 || i_min > 59) {
    return -1;
  }
  if (i_sec < 0 || i_sec > 59) {
    return -1;
  }
  return 0;
}
```