user: What would the C source look like for the assembly code provided here?

```asm
<sub_time>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edi,0x4(%rsp)
  mov    %esi,%r12d
  mov    %edx,%r13d
  mov    %ecx,%ebp
  mov    %r8d,%ebx
  mov    %r9d,%r15d
  cmp    %edx,0x60(%rsp)
  sete   %al
  cmp    %esi,0x58(%rsp)
  jne    L169
  test   %al,%al
  je     L169
  cmp    %ecx,0x68(%rsp)
  sete   %cl
  cmp    %r8d,0x70(%rsp)
  sete   %dl
  test   %dl,%cl
  je     L169
  cmp    %r9d,0x78(%rsp)
  je     L41
L169:
  cmp    %ebp,0x68(%rsp)
  jne    L259
  test   %al,%al
  je     L259
  cmp    %r15d,0x78(%rsp)
  sete   %r14b
  cmp    %ebx,0x70(%rsp)
  jne    L6
  test   %r14b,%r14b
  je     L6
  mov    0x4(%rsp),%eax
  sub    0x50(%rsp),%eax
  lea    (%rax,%rax,2),%eax
  lea    (%r12,%rax,4),%eax
  sub    0x58(%rsp),%eax
  mov    0x80(%rsp),%rbx
  mov    %eax,(%rbx)
  mov    0x88(%rsp),%rax
  movl   $0x3,(%rax)
  jmp    L189
L41:
  mov    %edi,%eax
  sub    0x50(%rsp),%eax
  mov    0x80(%rsp),%rdi
  mov    %eax,(%rdi)
  mov    0x88(%rsp),%rax
  movl   $0x4,(%rax)
  jmp    L189
L259:
  mov    0x78(%rsp),%eax
  push   %rax
  mov    0x78(%rsp),%eax
  push   %rax
  mov    0x78(%rsp),%eax
  push   %rax
  mov    0x78(%rsp),%eax
  push   %rax
  mov    0x78(%rsp),%eax
  push   %rax
  mov    0x78(%rsp),%eax
  push   %rax
  mov    %r15d,%r9d
  mov    %ebx,%r8d
  mov    %ebp,%ecx
  mov    %r13d,%edx
  mov    %r12d,%esi
  mov    0x34(%rsp),%r14d
  mov    %r14d,%edi
  call   <cmp_time@plt>
  mov    %eax,0x3c(%rsp)
  add    $0x30,%rsp
  test   %eax,%eax
  js     L107
L93:
  cmp    0x70(%rsp),%ebx
  sete   0xb(%rsp)
  movzbl 0xb(%rsp),%edi
  cmp    0x78(%rsp),%r15d
  sete   %r14b
  cmp    0x68(%rsp),%ebp
  sete   %al
  test   %al,%dil
  je     L196
  test   %r14b,%r14b
  je     L196
  mov    0x60(%rsp),%r9d
  mov    0x58(%rsp),%r8d
  mov    0x50(%rsp),%ecx
  mov    %r13d,%edx
  mov    %r12d,%esi
  mov    0x4(%rsp),%edi
  call   <sub_day@plt>
  imul   0xc(%rsp),%eax
  mov    0x80(%rsp),%rbx
  mov    %eax,(%rbx)
  mov    0x88(%rsp),%rax
  movl   $0x2,(%rax)
  jmp    L189
L107:
  mov    %r15d,%eax
  mov    0x78(%rsp),%r15d
  mov    %eax,0x78(%rsp)
  mov    %ebx,%eax
  mov    0x70(%rsp),%ebx
  mov    %eax,0x70(%rsp)
  mov    %ebp,%eax
  mov    0x68(%rsp),%ebp
  mov    %eax,0x68(%rsp)
  mov    %r13d,%eax
  mov    0x60(%rsp),%r13d
  mov    %eax,0x60(%rsp)
  mov    %r12d,%eax
  mov    0x58(%rsp),%r12d
  mov    %eax,0x58(%rsp)
  mov    0x50(%rsp),%edi
  mov    %edi,0x4(%rsp)
  mov    %r14d,0x50(%rsp)
  jmp    L93
L29:
  movslq %eax,%rcx
  imul   $0x2aaaaaab,%rcx,%rcx
  sar    $0x21,%rcx
  sub    %esi,%ecx
  lea    (%rcx,%rdx,2),%eax
  imul   0xc(%rsp),%eax
  mov    0x80(%rsp),%rbx
  mov    %eax,(%rbx)
  mov    0x88(%rsp),%rax
  movl   $0xc,(%rax)
  jmp    L189
L178:
  movslq %eax,%rcx
  imul   $0x2aaaaaab,%rcx,%rcx
  shr    $0x20,%rcx
  sub    %esi,%ecx
  lea    (%rcx,%rdx,4),%eax
  imul   0xc(%rsp),%eax
  mov    0x80(%rsp),%rbx
  mov    %eax,(%rbx)
  mov    0x88(%rsp),%rax
  movl   $0xb,(%rax)
  jmp    L189
L103:
  lea    (%rdx,%rdx,2),%edx
  lea    (%rax,%rdx,8),%eax
  imul   0xc(%rsp),%eax
  mov    0x80(%rsp),%rbx
  mov    %eax,(%rbx)
  jmp    L189
L111:
  lea    (%rdx,%rdx,2),%edx
  lea    (%rax,%rdx,8),%eax
  imul   $0x3c,%eax,%eax
  sub    0x70(%rsp),%ebx
  add    %eax,%ebx
  imul   0xc(%rsp),%ebx
  mov    0x80(%rsp),%rax
  mov    %ebx,(%rax)
  mov    0x88(%rsp),%rax
  movl   $0x0,(%rax)
  jmp    L189
L267:
  mov    %r13d,%r9d
  mov    %r12d,%r8d
  mov    0x4(%rsp),%ecx
  mov    0x60(%rsp),%edx
  mov    0x58(%rsp),%esi
  mov    0x50(%rsp),%edi
  call   <sub_day@plt>
  lea    -0x1(%rax),%edx
  mov    0x68(%rsp),%eax
  add    $0x18,%eax
  sub    %ebp,%eax
  mov    %r15d,%ecx
  mov    0x78(%rsp),%r15d
  mov    %ecx,0x78(%rsp)
  mov    %ebx,%ecx
  mov    0x70(%rsp),%ebx
  mov    %ecx,0x70(%rsp)
L187:
  test   %r14b,%r14b
  jne    L111
  lea    (%rdx,%rdx,2),%edx
  lea    (%rax,%rdx,8),%edx
  imul   $0xe10,%edx,%edx
  sub    0x70(%rsp),%ebx
  imul   $0x3c,%ebx,%ebx
  add    %ebx,%edx
  mov    %r15d,%eax
  sub    0x78(%rsp),%eax
  add    %edx,%eax
  imul   0xc(%rsp),%eax
  mov    0x80(%rsp),%rbx
  mov    %eax,(%rbx)
  mov    0x88(%rsp),%rax
  movl   $0xd,(%rax)
L189:
  mov    $0x0,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L6:
  mov    0x78(%rsp),%eax
  push   %rax
  mov    0x78(%rsp),%eax
  push   %rax
  mov    0x78(%rsp),%eax
  push   %rax
  mov    0x78(%rsp),%eax
  push   %rax
  mov    0x78(%rsp),%eax
  push   %rax
  mov    0x78(%rsp),%eax
  push   %rax
  mov    %r15d,%r9d
  mov    %ebx,%r8d
  mov    %ebp,%ecx
  mov    %r13d,%edx
  mov    %r12d,%esi
  mov    0x34(%rsp),%edi
  call   <cmp_time@plt>
  mov    %eax,0x3c(%rsp)
  add    $0x30,%rsp
  test   %eax,%eax
  js     L267
  cmp    %ebx,0x70(%rsp)
  sete   0xb(%rsp)
  cmp    %r15d,0x78(%rsp)
  sete   %r14b
L196:
  mov    0x60(%rsp),%r9d
  mov    0x58(%rsp),%r8d
  mov    0x50(%rsp),%ecx
  mov    %r13d,%edx
  mov    %r12d,%esi
  mov    0x4(%rsp),%edi
  call   <sub_day@plt>
  lea    -0x1(%rax),%edx
  lea    0x18(%rbp),%eax
  sub    0x68(%rsp),%eax
  cmpb   $0x0,0xb(%rsp)
  je     L187
  test   %r14b,%r14b
  je     L187
  movslq %eax,%rcx
  imul   $0x2aaaaaab,%rcx,%rcx
  sar    $0x21,%rcx
  mov    %eax,%esi
  sar    $0x1f,%esi
  sub    %esi,%ecx
  lea    (%rcx,%rcx,2),%ecx
  shl    $0x2,%ecx
  cmp    %ecx,%eax
  je     L29
  movslq %eax,%rcx
  imul   $0x2aaaaaab,%rcx,%rcx
  shr    $0x20,%rcx
  mov    %eax,%esi
  sar    $0x1f,%esi
  sub    %esi,%ecx
  lea    (%rcx,%rcx,2),%ecx
  add    %ecx,%ecx
  cmp    %ecx,%eax
  je     L178
  movslq %eax,%rcx
  imul   $0x55555556,%rcx,%rcx
  shr    $0x20,%rcx
  mov    %eax,%esi
  sar    $0x1f,%esi
  sub    %esi,%ecx
  lea    (%rcx,%rcx,2),%ecx
  cmp    %ecx,%eax
  jne    L103
  movslq %eax,%rcx
  imul   $0x55555556,%rcx,%rcx
  shr    $0x20,%rcx
  sub    %esi,%ecx
  lea    (%rcx,%rdx,8),%eax
  imul   0xc(%rsp),%eax
  mov    0x80(%rsp),%rbx
  mov    %eax,(%rbx)
  mov    0x88(%rsp),%rax
  movl   $0xa,(%rax)
  jmp    L189
```

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