user: Please show me the C implementation that matches the assembly code listed below:

```asm
<mktime>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  movl   $0x0,-0x24(%rbp)
  movl   $0x3c,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  imul   $0x3c,%eax,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  shl    $0x3,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  imul   $0x16d,%eax,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x14(%rbp),%eax
  imul   $0x16e,%eax,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  add    $0x76c,%eax
  mov    %eax,-0x8(%rbp)
  movl   $0x7b2,-0x20(%rbp)
  jmp    L5
L10:
  mov    -0x20(%rbp),%eax
  mov    %eax,%edi
  call   <isLeapYear@plt>
  test   %rax,%rax
  je     L28
  mov    -0xc(%rbp),%eax
  add    %eax,-0x24(%rbp)
  jmp    L6
L28:
  mov    -0x10(%rbp),%eax
  add    %eax,-0x24(%rbp)
L6:
  addl   $0x1,-0x20(%rbp)
L5:
  mov    -0x20(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jl     L10
  mov    -0x38(%rbp),%rax
  mov    0x4(%rax),%eax
  add    $0x1,%eax
  mov    %eax,-0x4(%rbp)
  movl   $0x1,-0x20(%rbp)
  jmp    L1
L34:
  mov    -0x20(%rbp),%eax
  cmp    $0xc,%eax
  seta   %dl
  test   %dl,%dl
  jne    L66
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%rdx
  mov    %rdx,%rax
  mov    %rax,%rdx
  and    $0x15aa,%edx
  test   %rdx,%rdx
  setne  %dl
  test   %dl,%dl
  jne    L120
  mov    %rax,%rdx
  and    $0xa50,%edx
  test   %rdx,%rdx
  setne  %dl
  test   %dl,%dl
  jne    L16
  and    $0x4,%eax
  test   %rax,%rax
  setne  %al
  test   %al,%al
  jne    L119
  jmp    L66
L120:
  mov    -0x14(%rbp),%edx
  mov    %edx,%eax
  shl    $0x5,%eax
  sub    %edx,%eax
  add    %eax,-0x24(%rbp)
  jmp    L66
L16:
  mov    -0x14(%rbp),%eax
  imul   $0x1e,%eax,%eax
  add    %eax,-0x24(%rbp)
  jmp    L66
L119:
  mov    -0x8(%rbp),%eax
  mov    %eax,%edi
  call   <isLeapYear@plt>
  test   %rax,%rax
  je     L133
  mov    -0x14(%rbp),%eax
  imul   $0x1d,%eax,%eax
  add    %eax,-0x24(%rbp)
  jmp    L58
L133:
  mov    -0x14(%rbp),%eax
  imul   $0x1c,%eax,%eax
  add    %eax,-0x24(%rbp)
L58:
  nop
L66:
  addl   $0x1,-0x20(%rbp)
L1:
  mov    -0x20(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jl     L34
  mov    -0x38(%rbp),%rax
  mov    0x8(%rax),%eax
  sub    $0x1,%eax
  imul   -0x14(%rbp),%eax
  add    %eax,-0x24(%rbp)
  mov    -0x38(%rbp),%rax
  mov    0xc(%rax),%eax
  imul   -0x18(%rbp),%eax
  add    %eax,-0x24(%rbp)
  mov    -0x38(%rbp),%rax
  mov    0x10(%rax),%eax
  imul   -0x1c(%rbp),%eax
  add    %eax,-0x24(%rbp)
  mov    -0x38(%rbp),%rax
  mov    0x18(%rax),%rax
  mov    %eax,%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x24(%rbp),%eax
  leave
  ret
```

assistant: ```c
time_t mktime(struct tm *theDate) {
  time_t retVal = 0;
  const time_t secsPerMin = 60;
  const time_t secsPerHour = secsPerMin * 60;
  const time_t secsPerDay = secsPerHour * 24;
  const time_t secsPerYear = secsPerDay * 365;
  const time_t secsPerLeapYear = secsPerDay * 366;
  int currYear;
  int currMonth;
  int i;
  currYear = 1900 + theDate->tm_year;
  for (i = 1970; i < currYear; i++) {
    if (isLeapYear(i)) {
      retVal += secsPerLeapYear;
    } else {
      retVal += secsPerYear;
    }
  }
  currMonth = 1 + theDate->tm_mon;
  for (i = 1; i < currMonth; i++) {
    switch (i) {
    case 1:
    case 3:
    case 5:
    case 7:
    case 8:
    case 10:
    case 12:
      retVal += secsPerDay * 31;
      break;
    case 4:
    case 6:
    case 9:
    case 11:
      retVal += secsPerDay * 30;
      break;
    case 2:
      if (isLeapYear(currYear)) {
        retVal += secsPerDay * 29;
      } else {
        retVal += secsPerDay * 28;
      }
      break;
    }
  }
  retVal += (theDate->tm_mday - 1) * secsPerDay;
  retVal += (theDate->tm_hour) * secsPerHour;
  retVal += (theDate->tm_min) * secsPerMin;
  retVal += theDate->tm_sec;
  return retVal;
}
```