user: 请从给定的汇编指令推导出C源代码：

```asm
<rtc_time_to_tm>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    -0x18(%rbp),%rax
  movabs $0xc22e450672894ab7,%rdx
  mul    %rdx
  mov    %rdx,%rax
  shr    $0x10,%rax
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  imul   $0x15180,%eax,%eax
  mov    %eax,%eax
  sub    %rax,-0x18(%rbp)
  mov    -0x8(%rbp),%eax
  lea    0x4(%rax),%edx
  movslq %edx,%rax
  imul   $0xffffffff92492493,%rax,%rax
  shr    $0x20,%rax
  add    %edx,%eax
  sar    $0x2,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  shl    $0x3,%ecx
  sub    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    -0x20(%rbp),%rdx
  mov    %eax,(%rdx)
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  imul   $0xffffffffb38cf9b1,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x8,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  add    $0x7b2,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,%eax
  imul   $0x51eb851f,%rax,%rax
  shr    $0x20,%rax
  mov    %eax,%edx
  shr    $0x5,%edx
  mov    -0xc(%rbp),%eax
  sub    $0x1,%eax
  shr    $0x2,%eax
  sub    %eax,%edx
  mov    -0xc(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,%eax
  imul   $0x51eb851f,%rax,%rax
  shr    $0x20,%rax
  shr    $0x7,%eax
  sub    %eax,%edx
  mov    -0xc(%rbp),%eax
  imul   $0x16d,%eax,%eax
  sub    %eax,%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  add    $0xafaa7,%eax
  mov    %eax,-0x8(%rbp)
  cmpl   $0x0,-0x8(%rbp)
  jns    L39
  subl   $0x1,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  and    $0x3,%eax
  test   %eax,%eax
  jne    L62
  mov    -0xc(%rbp),%edx
  mov    %edx,%eax
  imul   $0x51eb851f,%rax,%rax
  shr    $0x20,%rax
  shr    $0x5,%eax
  imul   $0x64,%eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  test   %eax,%eax
  jne    L74
L62:
  mov    -0xc(%rbp),%edx
  mov    %edx,%eax
  imul   $0x51eb851f,%rax,%rax
  shr    $0x20,%rax
  shr    $0x7,%eax
  imul   $0x190,%eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  test   %eax,%eax
  jne    L10
L74:
  mov    $0x1,%eax
  jmp    L65
L10:
  mov    $0x0,%eax
L65:
  add    $0x16d,%eax
  add    %eax,-0x8(%rbp)
L39:
  mov    -0xc(%rbp),%eax
  lea    -0x76c(%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,0x4(%rax)
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,0x8(%rax)
  movl   $0x0,-0x10(%rbp)
  jmp    L23
L55:
  mov    -0xc(%rbp),%edx
  mov    -0x10(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <rtc_month_days@plt>
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  sub    %edx,%eax
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  js     L44
  mov    -0x4(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  addl   $0x1,-0x10(%rbp)
L23:
  cmpl   $0xa,-0x10(%rbp)
  jbe    L55
  jmp    L37
L44:
  nop
L37:
  mov    -0x20(%rbp),%rax
  mov    -0x10(%rbp),%edx
  mov    %edx,0xc(%rax)
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,0x10(%rax)
  mov    -0x18(%rbp),%rax
  shr    $0x4,%rax
  movabs $0x91a2b3c4d5e6f81,%rdx
  mul    %rdx
  shr    $0x3,%rdx
  mov    -0x20(%rbp),%rax
  mov    %rdx,0x18(%rax)
  mov    -0x20(%rbp),%rax
  mov    0x18(%rax),%rax
  imul   $0xe10,%rax,%rax
  sub    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movabs $0x8888888888888889,%rdx
  mul    %rdx
  shr    $0x5,%rdx
  mov    -0x20(%rbp),%rax
  mov    %rdx,0x20(%rax)
  mov    -0x20(%rbp),%rax
  mov    0x20(%rax),%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rcx
  mov    -0x18(%rbp),%rax
  sub    %rcx,%rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  mov    %rdx,0x28(%rax)
  nop
  leave
  ret
```

assistant: ```c
void rtc_time_to_tm(unsigned long time, struct rtc_time *tm) {
  unsigned int month, year;
  int days;
  days = time / 86400;
  time -= (unsigned int)days * 86400;
  tm->tm_wday = (days + 4) % 7;
  year = 1970 + days / 365;
  days -= (year - 1970) * 365 + ((year - 1) / 4 - (year - 1) / 100 + (year - 1) / 400) - ((1970 - 1) / 4 - (1970 - 1) / 100 + (1970 - 1) / 400);
  if (days < 0) {
    year -= 1;
    days += 365 + ((!(year % 4) && (year % 100)) || !(year % 400));
  }
  tm->tm_year = year - 1900;
  tm->tm_yday = days + 1;
  for (month = 0; month < 11; month++) {
    int newdays;
    newdays = days - rtc_month_days(month, year);
    if (newdays < 0)
      break;
    days = newdays;
  }
  tm->tm_mon = month;
  tm->tm_mday = days + 1;
  tm->tm_hour = time / 3600;
  time -= tm->tm_hour * 3600;
  tm->tm_min = time / 60;
  tm->tm_sec = time - tm->tm_min * 60;
}
```