user: Translate the below assembly code into C programming language:

```asm
<rtc_time_to_tm>:
  endbr64
  movabs $0xc22e450672894ab7,%rdx
  mov    %rdi,%rax
  push   %r14
  mul    %rdx
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  shr    $0x10,%rdx
  push   %rbx
  imul   $0x15180,%edx,%eax
  lea    0x4(%rdx),%ecx
  mov    %ecx,%esi
  sar    $0x1f,%esi
  sub    %rax,%r12
  movslq %ecx,%rax
  imul   $0xffffffff92492493,%rax,%rax
  shr    $0x20,%rax
  add    %ecx,%eax
  sar    $0x2,%eax
  sub    %esi,%eax
  lea    0x0(,%rax,8),%esi
  sub    %eax,%esi
  movslq %edx,%rax
  imul   $0xffffffffb38cf9b1,%rax,%rax
  sub    %esi,%ecx
  mov    %ecx,0x0(%r13)
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  shr    $0x20,%rax
  add    %edx,%eax
  sar    $0x8,%eax
  sub    %ecx,%eax
  lea    0x7b1(%rax),%ecx
  lea    0x7b2(%rax),%r14d
  mov    %rcx,%rax
  imul   $0x51eb851f,%rcx,%rcx
  mov    %rcx,%rdi
  shr    $0x27,%rcx
  shr    $0x25,%rdi
  lea    0xafaa7(%rdi,%rdx,1),%ebx
  mov    %eax,%edx
  shr    $0x2,%edx
  sub    %edx,%ebx
  imul   $0x16d,%r14d,%edx
  sub    %ecx,%ebx
  sub    %edx,%ebx
  js     L40
L17:
  lea    -0x76c(%r14),%eax
  xor    %ebp,%ebp
  mov    %eax,0x4(%r13)
  lea    0x1(%rbx),%eax
  mov    %eax,0x8(%r13)
  nopw   0x0(%rax,%rax,1)
L12:
  mov    %r14d,%esi
  mov    %ebp,%edi
  call   <rtc_month_days@plt>
  mov    %ebx,%edx
  sub    %eax,%ebx
  js     L28
  add    $0x1,%ebp
  cmp    $0xb,%ebp
  jne    L12
L34:
  mov    %r12,%rdx
  add    $0x1,%ebx
  mov    %ebp,0xc(%r13)
  movabs $0x91a2b3c4d5e6f81,%rcx
  shr    $0x4,%rdx
  mov    %ebx,0x10(%r13)
  pop    %rbx
  mov    %rdx,%rax
  pop    %rbp
  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,%rax
  mov    %rdx,0x20(%r13)
  shl    $0x4,%rax
  sub    %rdx,%rax
  shl    $0x2,%rax
  sub    %rax,%r12
  mov    %r12,0x28(%r13)
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  cs nopw 0x0(%rax,%rax,1)
L40:
  test   $0x3,%al
  jne    L50
  imul   $0xc28f5c29,%eax,%ecx
  mov    $0x16e,%edx
  ror    $0x2,%ecx
  cmp    $0x28f5c28,%ecx
  jbe    L50
  add    %edx,%ebx
  mov    %eax,%r14d
  jmp    L17
  nopl   0x0(%rax)
L50:
  imul   $0xc28f5c29,%eax,%edx
  mov    %eax,%r14d
  ror    $0x4,%edx
  cmp    $0xa3d70a,%edx
  setbe  %dl
  movzbl %dl,%edx
  add    $0x16d,%edx
  add    %edx,%ebx
  jmp    L17
  nopl   (%rax)
L28:
  mov    %edx,%ebx
  jmp    L34
```

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