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

```asm
<rtc_time_to_tm>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r12
  mov    %rsi,%r13
  movabs $0xc22e450672894ab7,%rdx
  mov    %rdi,%rax
  mul    %rdx
  shr    $0x10,%rdx
  imul   $0x15180,%edx,%eax
  mov    %eax,%eax
  sub    %rax,%r12
  lea    0x4(%rdx),%ecx
  movslq %ecx,%rax
  imul   $0xffffffff92492493,%rax,%rax
  shr    $0x20,%rax
  add    %ecx,%eax
  sar    $0x2,%eax
  mov    %ecx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  lea    0x0(,%rax,8),%esi
  sub    %eax,%esi
  sub    %esi,%ecx
  mov    %ecx,0x0(%r13)
  movslq %edx,%rax
  imul   $0xffffffffb38cf9b1,%rax,%rax
  shr    $0x20,%rax
  add    %edx,%eax
  sar    $0x8,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  lea    0x7b2(%rax),%r14d
  add    $0x7b1,%eax
  mov    %eax,%ecx
  imul   $0x51eb851f,%rcx,%rcx
  mov    %rcx,%rdi
  shr    $0x25,%rdi
  lea    0xafaa7(%rdi,%rdx,1),%ebx
  mov    %eax,%edx
  shr    $0x2,%edx
  sub    %edx,%ebx
  shr    $0x27,%rcx
  sub    %ecx,%ebx
  imul   $0x16d,%r14d,%edx
  sub    %edx,%ebx
  js     L20
L15:
  lea    -0x76c(%r14),%eax
  mov    %eax,0x4(%r13)
  lea    0x1(%rbx),%eax
  mov    %eax,0x8(%r13)
  mov    $0x0,%ebp
L61:
  mov    %r14d,%esi
  mov    %ebp,%edi
  call   <rtc_month_days@plt>
  mov    %ebx,%edx
  sub    %eax,%ebx
  js     L29
  add    $0x1,%ebp
  cmp    $0xb,%ebp
  jne    L61
L28:
  mov    %ebp,0xc(%r13)
  add    $0x1,%ebx
  mov    %ebx,0x10(%r13)
  mov    %r12,%rdx
  shr    $0x4,%rdx
  movabs $0x91a2b3c4d5e6f81,%rcx
  mov    %rdx,%rax
  mul    %rcx
  shr    $0x3,%rdx
  mov    %rdx,0x18(%r13)
  imul   $0xe10,%rdx,%rdx
  sub    %rdx,%r12
  movabs $0x8888888888888889,%rdx
  mov    %r12,%rax
  mul    %rdx
  shr    $0x5,%rdx
  mov    %rdx,0x20(%r13)
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  shl    $0x2,%rax
  sub    %rax,%r12
  mov    %r12,0x28(%r13)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L20:
  test   $0x3,%al
  jne    L11
  imul   $0x64,%edi,%edx
  mov    $0x1,%ecx
  cmp    %edx,%eax
  jne    L46
L11:
  mov    %eax,%edx
  imul   $0x51eb851f,%rdx,%rdx
  shr    $0x27,%rdx
  imul   $0x190,%edx,%edx
  cmp    %edx,%eax
  sete   %cl
  movzbl %cl,%ecx
L46:
  lea    0x16d(%rcx,%rbx,1),%ebx
  mov    %eax,%r14d
  jmp    L15
L29:
  mov    %edx,%ebx
  jmp    L28
```

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