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

```asm
<__secs_to_tm>:
  endbr64
  mov    D14(%rip),%rax
  mov    (%rax),%r8
  imul   $0x1e28500,%r8,%rax
  cmp    %rdi,%rax
  jg     L32
  mov    D11(%rip),%rax
  mov    (%rax),%r9
  imul   $0x1e28500,%r9,%rax
  cmp    %rdi,%rax
  jl     L32
  sub    $0x38bc5d80,%rdi
  push   %r13
  mov    %rsi,%rcx
  movabs $0x1845c8a0ce512957,%rdx
  mov    %rdi,%rax
  push   %r12
  imul   %rdx
  push   %rbp
  push   %rbx
  mov    %rdx,%rax
  mov    %rdi,%rdx
  sar    $0xd,%rax
  sar    $0x3f,%rdx
  sub    %rdx,%rax
  mov    %rax,%r10
  imul   $0x15180,%rax,%rax
  sub    %rax,%rdi
  mov    %edi,%esi
  jns    L216
  lea    0x15180(%rdi),%esi
  sub    $0x1,%r10
L216:
  movabs $0x4924924924924925,%rdx
  lea    0x3(%r10),%rdi
  mov    %rdi,%rax
  imul   %rdx
  mov    %rdi,%rax
  sar    $0x3f,%rax
  sar    %rdx
  sub    %rax,%rdx
  lea    0x0(,%rdx,8),%rax
  sub    %rdx,%rax
  movabs $0x396b06bcc8f862ed,%rdx
  sub    %rax,%rdi
  lea    0x7(%rdi),%eax
  cmovns %edi,%eax
  mov    %eax,%edi
  mov    %r10,%rax
  imul   %rdx
  mov    %r10,%rax
  sar    $0x3f,%rax
  sar    $0xf,%rdx
  sub    %rax,%rdx
  mov    %r10,%rax
  imul   $0x23ab1,%rdx,%r11
  mov    %edx,%ebx
  sub    %r11,%rax
  mov    %eax,%r10d
  jns    L151
  lea    0x23ab1(%rax),%r10d
  lea    -0x1(%rdx),%ebx
L151:
  mov    %r10d,%edx
  shr    $0x2,%edx
  imul   $0x396b207f,%rdx,%rdx
  shr    $0x2b,%rdx
  cmp    $0x4,%edx
  je     L324
  imul   $0xffff7154,%edx,%eax
  imul   $0x64,%edx,%ebp
  add    %r10d,%eax
  movslq %eax,%r10
  mov    %eax,%r11d
  imul   $0x166db073,%r10,%r10
  sar    $0x1f,%r11d
  sar    $0x27,%r10
  sub    %r11d,%r10d
  cmp    $0x19,%r10d
  jne    L205
  mov    $0x60,%r12d
  mov    $0xffff7708,%r11d
  mov    $0x18,%r10d
L67:
  add    %eax,%r11d
  movslq %r11d,%rax
  mov    %r11d,%r13d
  imul   $0xffffffffb38cf9b1,%rax,%rax
  sar    $0x1f,%r13d
  shr    $0x20,%rax
  add    %r11d,%eax
  sar    $0x8,%eax
  sub    %r13d,%eax
  cmp    $0x4,%eax
  je     L385
  imul   $0xfffffe93,%eax,%r13d
  add    %r13d,%r11d
  test   %eax,%eax
  jne    L361
  test   %r10d,%r10d
  setne  %r10b
  test   %edx,%edx
  sete   %dl
  or     %r10d,%edx
  movzbl %dl,%edx
L335:
  imul   $0x190,%ebx,%ebx
  add    %r12d,%eax
  add    %ebp,%eax
  add    %ebx,%eax
  lea    0x64(%rax),%ebx
  movslq %ebx,%r10
  cmp    %r10,%r9
  setl   %r9b
  cmp    %r10,%r8
  setg   %r8b
  or     %r8d,%r9d
  cmp    $0x131,%r11d
  jle    L218
  lea    -0x132(%r11),%r8d
  sub    $0x1f,%r11d
L59:
  lea    -0x1e(%r11),%edx
  cmp    $0x1e,%edx
  jle    L275
  lea    -0x3d(%r11),%edx
  cmp    $0x1d,%edx
  jle    L293
  lea    -0x5b(%r11),%edx
  cmp    $0x1e,%edx
  jle    L266
  lea    -0x7a(%r11),%edx
  cmp    $0x1e,%edx
  jle    L85
  lea    -0x99(%r11),%edx
  cmp    $0x1d,%edx
  jle    L381
  lea    -0xb7(%r11),%edx
  cmp    $0x1e,%edx
  jle    L172
  lea    -0xd6(%r11),%edx
  cmp    $0x1d,%edx
  jle    L262
  lea    -0xf4(%r11),%edx
  cmp    $0x1e,%edx
  jle    L25
  lea    -0x113(%r11),%edx
  cmp    $0x1e,%edx
  jle    L65
  sub    $0x132,%r11d
  mov    $0xa,%edx
L122:
  test   %r9b,%r9b
  jne    L188
  sub    $0x9,%edx
  add    $0x65,%eax
  mov    %edx,0x4(%rcx)
  mov    %eax,(%rcx)
L159:
  lea    0x1(%r11),%eax
  movd   %edi,%xmm3
  mov    $0x91a2b3c5,%edx
  mov    $0x88888889,%edi
  movd   %eax,%xmm0
  mov    %esi,%eax
  movd   %r8d,%xmm1
  imul   %rax,%rdx
  punpckldq %xmm3,%xmm0
  imul   %rdi,%rax
  shr    $0x2b,%rdx
  shr    $0x25,%rax
  movd   %edx,%xmm2
  mov    %eax,%edx
  mov    %eax,%ebx
  punpckldq %xmm2,%xmm1
  imul   %rdi,%rdx
  punpcklqdq %xmm1,%xmm0
  imul   $0x3c,%eax,%eax
  movups %xmm0,0x8(%rcx)
  shr    $0x25,%rdx
  imul   $0x3c,%edx,%edx
  sub    %eax,%esi
  xor    %eax,%eax
  movd   %esi,%xmm4
  sub    %edx,%ebx
  movd   %ebx,%xmm0
  punpckldq %xmm4,%xmm0
  movq   %xmm0,0x18(%rcx)
L364:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L205:
  imul   $0xfffffa4b,%r10d,%r11d
  lea    0x0(,%r10,4),%r12d
  jmp    L67
  nopl   0x0(%rax)
L218:
  lea    0x3b(%rdx,%r11,1),%r8d
  cmp    $0x1e,%r11d
  jle    L53
  sub    $0x1f,%r11d
  cmp    $0x1d,%r11d
  jg     L59
  xor    %edx,%edx
  nopw   0x0(%rax,%rax,1)
L338:
  mov    $0xffffffff,%eax
  test   %r9b,%r9b
  jne    L364
  add    $0x3,%edx
  mov    %ebx,(%rcx)
  mov    %edx,0x4(%rcx)
  jmp    L159
  nopw   0x0(%rax,%rax,1)
L385:
  sub    $0x447,%r11d
  mov    $0x3,%eax
  xor    %edx,%edx
  jmp    L335
  nopl   0x0(%rax,%rax,1)
L324:
  lea    -0x1ac04(%r10),%eax
  mov    $0x12c,%ebp
  movslq %eax,%r10
  cltd
  imul   $0x166db073,%r10,%r10
  sar    $0x27,%r10
  sub    %edx,%r10d
  mov    $0x3,%edx
  imul   $0xfffffa4b,%r10d,%r11d
  lea    0x0(,%r10,4),%r12d
  jmp    L67
  nop
L361:
  xor    %edx,%edx
  jmp    L335
  nopw   0x0(%rax,%rax,1)
L53:
  test   %r9b,%r9b
  jne    L188
  mov    %ebx,(%rcx)
  movl   $0x2,0x4(%rcx)
  jmp    L159
L275:
  mov    %edx,%r11d
  mov    $0x1,%edx
  jmp    L338
L293:
  mov    %edx,%r11d
  mov    $0x2,%edx
  jmp    L338
L266:
  mov    %edx,%r11d
  mov    $0x3,%edx
  jmp    L338
L85:
  mov    %edx,%r11d
  mov    $0x4,%edx
  jmp    L338
L381:
  mov    %edx,%r11d
  mov    $0x5,%edx
  jmp    L338
L172:
  mov    %edx,%r11d
  mov    $0x6,%edx
  jmp    L338
L262:
  mov    %edx,%r11d
  mov    $0x7,%edx
  jmp    L338
L25:
  mov    %edx,%r11d
  mov    $0x8,%edx
  jmp    L338
L65:
  mov    %edx,%r11d
  mov    $0x9,%edx
  jmp    L122
L32:
  mov    $0xffffffff,%eax
  ret
L188:
  mov    $0xffffffff,%eax
  jmp    L364
```

assistant: ```c
int __secs_to_tm(long long t, struct tm *tm) {
  long long days, secs;
  int remdays, remsecs, remyears;
  int qc_cycles, c_cycles, q_cycles;
  int years, months;
  int wday, yday, leap;
  static const char days_in_month[] = {31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31, 29};
  if (t < INT_MIN * 31622400LL || t > INT_MAX * 31622400LL)
    return -1;
  secs = t - (946684800LL + 86400 * (31 + 29));
  days = secs / 86400;
  remsecs = secs % 86400;
  if (remsecs < 0) {
    remsecs += 86400;
    days--;
  }
  wday = (3 + days) % 7;
  if (wday < 0)
    wday += 7;
  qc_cycles = days / (365 * 400 + 97);
  remdays = days % (365 * 400 + 97);
  if (remdays < 0) {
    remdays += (365 * 400 + 97);
    qc_cycles--;
  }
  c_cycles = remdays / (365 * 100 + 24);
  if (c_cycles == 4)
    c_cycles--;
  remdays -= c_cycles * (365 * 100 + 24);
  q_cycles = remdays / (365 * 4 + 1);
  if (q_cycles == 25)
    q_cycles--;
  remdays -= q_cycles * (365 * 4 + 1);
  remyears = remdays / 365;
  if (remyears == 4)
    remyears--;
  remdays -= remyears * 365;
  leap = !remyears && (q_cycles || !c_cycles);
  yday = remdays + 31 + 28 + leap;
  if (yday >= 365 + leap)
    yday -= 365 + leap;
  years = remyears + 4 * q_cycles + 100 * c_cycles + 400 * qc_cycles;
  for (months = 0; days_in_month[months] <= remdays; months++)
    remdays -= days_in_month[months];
  if (years + 100 > INT_MAX || years + 100 < INT_MIN)
    return -1;
  tm->tm_year = years + 100;
  tm->tm_mon = months + 2;
  if (tm->tm_mon >= 12) {
    tm->tm_mon -= 12;
    tm->tm_year++;
  }
  tm->tm_mday = remdays + 1;
  tm->tm_wday = wday;
  tm->tm_yday = yday;
  tm->tm_hour = remsecs / 3600;
  tm->tm_min = remsecs / 60 % 60;
  tm->tm_sec = remsecs % 60;
  return 0;
}
```