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

```asm
<sub_time>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    %edx,-0x1c(%rbp)
  mov    %ecx,-0x20(%rbp)
  mov    %r8d,-0x24(%rbp)
  mov    %r9d,-0x28(%rbp)
  mov    0x18(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jne    L28
  mov    0x20(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jne    L28
  mov    0x28(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jne    L28
  mov    0x30(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jne    L28
  mov    0x38(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jne    L28
  mov    -0x14(%rbp),%eax
  sub    0x10(%rbp),%eax
  mov    %eax,%edx
  mov    0x40(%rbp),%rax
  mov    %edx,(%rax)
  mov    0x48(%rbp),%rax
  movl   $0x4,(%rax)
  mov    $0x0,%eax
  jmp    L90
L28:
  mov    0x20(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jne    L248
  mov    0x28(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jne    L248
  mov    0x30(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jne    L248
  mov    0x38(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jne    L248
  mov    -0x14(%rbp),%eax
  sub    0x10(%rbp),%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  shl    $0x2,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%eax
  add    %edx,%eax
  sub    0x18(%rbp),%eax
  mov    %eax,%edx
  mov    0x40(%rbp),%rax
  mov    %edx,(%rax)
  mov    0x48(%rbp),%rax
  movl   $0x3,(%rax)
  mov    $0x0,%eax
  jmp    L90
L248:
  mov    -0x28(%rbp),%r9d
  mov    -0x24(%rbp),%r8d
  mov    -0x20(%rbp),%ecx
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%esi
  mov    -0x14(%rbp),%eax
  mov    0x38(%rbp),%edi
  push   %rdi
  mov    0x30(%rbp),%edi
  push   %rdi
  mov    0x28(%rbp),%edi
  push   %rdi
  mov    0x20(%rbp),%edi
  push   %rdi
  mov    0x18(%rbp),%edi
  push   %rdi
  mov    0x10(%rbp),%edi
  push   %rdi
  mov    %eax,%edi
  call   <cmp_time@plt>
  add    $0x30,%rsp
  mov    %eax,-0xc(%rbp)
  cmpl   $0x0,-0xc(%rbp)
  jns    L10
  mov    0x10(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,0x10(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  mov    0x18(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x18(%rbp),%eax
  mov    %eax,0x18(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  mov    0x20(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x1c(%rbp),%eax
  mov    %eax,0x20(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  mov    0x28(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%eax
  mov    %eax,0x28(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  mov    0x30(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,0x30(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,-0x24(%rbp)
  mov    0x38(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x28(%rbp),%eax
  mov    %eax,0x38(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,-0x28(%rbp)
L10:
  mov    0x28(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jne    L3
  mov    0x30(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jne    L3
  mov    0x38(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jne    L3
  mov    0x20(%rbp),%edi
  mov    0x18(%rbp),%ecx
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%esi
  mov    -0x14(%rbp),%eax
  mov    %edi,%r9d
  mov    %ecx,%r8d
  mov    0x10(%rbp),%ecx
  mov    %eax,%edi
  call   <sub_day@plt>
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    0x40(%rbp),%rax
  mov    %edx,(%rax)
  mov    0x48(%rbp),%rax
  movl   $0x2,(%rax)
  mov    $0x0,%eax
  jmp    L90
L3:
  mov    0x20(%rbp),%edi
  mov    0x18(%rbp),%ecx
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%esi
  mov    -0x14(%rbp),%eax
  mov    %edi,%r9d
  mov    %ecx,%r8d
  mov    0x10(%rbp),%ecx
  mov    %eax,%edi
  call   <sub_day@plt>
  sub    $0x1,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x20(%rbp),%eax
  add    $0x18,%eax
  sub    0x28(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  mov    0x30(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jne    L225
  mov    0x38(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jne    L225
  mov    -0x8(%rbp),%ecx
  movslq %ecx,%rax
  imul   $0x2aaaaaab,%rax,%rax
  shr    $0x20,%rax
  sar    %eax
  mov    %ecx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  shl    $0x2,%eax
  sub    %eax,%ecx
  mov    %ecx,%edx
  test   %edx,%edx
  jne    L169
  mov    -0x4(%rbp),%eax
  lea    (%rax,%rax,1),%ecx
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x2aaaaaab,%rdx,%rdx
  shr    $0x20,%rdx
  sar    %edx
  sar    $0x1f,%eax
  mov    %eax,%esi
  mov    %edx,%eax
  sub    %esi,%eax
  add    %ecx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0xc(%rbp),%eax
  imul   -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    0x40(%rbp),%rax
  mov    %edx,(%rax)
  mov    0x48(%rbp),%rax
  movl   $0xc,(%rax)
  mov    $0x0,%eax
  jmp    L90
L169:
  mov    -0x8(%rbp),%ecx
  movslq %ecx,%rax
  imul   $0x2aaaaaab,%rax,%rax
  shr    $0x20,%rax
  mov    %ecx,%esi
  sar    $0x1f,%esi
  mov    %eax,%edx
  sub    %esi,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  sub    %eax,%ecx
  mov    %ecx,%edx
  test   %edx,%edx
  jne    L4
  mov    -0x4(%rbp),%eax
  lea    0x0(,%rax,4),%ecx
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x2aaaaaab,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x1f,%eax
  mov    %eax,%esi
  mov    %edx,%eax
  sub    %esi,%eax
  add    %ecx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0xc(%rbp),%eax
  imul   -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    0x40(%rbp),%rax
  mov    %edx,(%rax)
  mov    0x48(%rbp),%rax
  movl   $0xb,(%rax)
  mov    $0x0,%eax
  jmp    L90
L4:
  mov    -0x8(%rbp),%edx
  movslq %edx,%rax
  imul   $0x55555556,%rax,%rax
  shr    $0x20,%rax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  add    %ecx,%ecx
  add    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  test   %eax,%eax
  jne    L22
  mov    -0x4(%rbp),%eax
  lea    0x0(,%rax,8),%ecx
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x55555556,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x1f,%eax
  mov    %eax,%esi
  mov    %edx,%eax
  sub    %esi,%eax
  add    %ecx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0xc(%rbp),%eax
  imul   -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    0x40(%rbp),%rax
  mov    %edx,(%rax)
  mov    0x48(%rbp),%rax
  movl   $0xa,(%rax)
  mov    $0x0,%eax
  jmp    L90
L22:
  mov    -0x4(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  shl    $0x3,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0xc(%rbp),%eax
  imul   -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    0x40(%rbp),%rax
  mov    %edx,(%rax)
  mov    $0x0,%eax
  jmp    L90
L225:
  mov    0x38(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jne    L147
  mov    -0x4(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  shl    $0x3,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  imul   $0x3c,%eax,%edx
  mov    -0x24(%rbp),%eax
  sub    0x30(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0xc(%rbp),%eax
  imul   -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    0x40(%rbp),%rax
  mov    %edx,(%rax)
  mov    0x48(%rbp),%rax
  movl   $0x0,(%rax)
  mov    $0x0,%eax
  jmp    L90
L147:
  mov    -0x4(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  shl    $0x3,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  imul   $0xe10,%eax,%edx
  mov    -0x24(%rbp),%eax
  sub    0x30(%rbp),%eax
  imul   $0x3c,%eax,%eax
  add    %eax,%edx
  mov    -0x28(%rbp),%eax
  sub    0x38(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0xc(%rbp),%eax
  imul   -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    0x40(%rbp),%rax
  mov    %edx,(%rax)
  mov    0x48(%rbp),%rax
  movl   $0xd,(%rax)
  mov    $0x0,%eax
L90:
  leave
  ret
```

assistant: ```c
int sub_time(int year1, int month1, int day1, int hour1, int minute1, int second1, int year0, int month0, int day0, int hour0, int minute0, int second0, int *dtime, int *unit) {
  int sign, i, dt;
  if (month0 == month1 && day0 == day1 && hour0 == hour1 && minute0 == minute1 && second0 == second1) {
    *dtime = year1 - year0;
    *unit = 4;
    return 0;
  }
  if (day0 == day1 && hour0 == hour1 && minute0 == minute1 && second0 == second1) {
    *dtime = (year1 - year0) * 12 + month1 - month0;
    *unit = 3;
    return 0;
  }
  sign = cmp_time(year1, month1, day1, hour1, minute1, second1, year0, month0, day0, hour0, minute0, second0);
  if (sign < 0) {
    i = year0;
    year0 = year1;
    year1 = i;
    i = month0;
    month0 = month1;
    month1 = i;
    i = day0;
    day0 = day1;
    day1 = i;
    i = hour0;
    hour0 = hour1;
    hour1 = i;
    i = minute0;
    minute0 = minute1;
    minute1 = i;
    i = second0;
    second0 = second1;
    second1 = i;
  }
  if (hour0 == hour1 && minute0 == minute1 && second0 == second1) {
    *dtime = sign * sub_day(year1, month1, day1, year0, month0, day0);
    *unit = 2;
    return 0;
  }
  dt = sub_day(year1, month1, day1, year0, month0, day0) - 1;
  i = 24 + hour1 - hour0;
  if (minute0 == minute1 && second0 == second1) {
    if (i % 12 == 0) {
      dt = dt * 2 + i / 12;
      *dtime = sign * dt;
      *unit = 12;
      return 0;
    }
    if (i % 6 == 0) {
      dt = dt * 4 + i / 6;
      *dtime = sign * dt;
      *unit = 11;
      return 0;
    }
    if (i % 3 == 0) {
      dt = dt * 8 + i / 3;
      *dtime = sign * dt;
      *unit = 10;
      return 0;
    }
    dt = dt * 24 + i;
    *dtime = sign * dt;
    return 0;
  }
  if (second0 == second1) {
    dt = (dt * 24 + i) * 60 + (minute1 - minute0);
    *dtime = sign * dt;
    *unit = 0;
    return 0;
  }
  dt = (dt * 24 + i) * 60 * 60 + (minute1 - minute0) * 60 + (second1 - second0);
  *dtime = sign * dt;
  *unit = 13;
  return 0;
}
```