user: What is the c source code of the assembly code below:

```asm
<ns_datetosecs>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <strlen@plt>
  cmp    $0xe,%eax
  je     L51
  movl   $0x1,0x0(%rbp)
  mov    $0x0,%edi
L86:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L78
  mov    %edi,%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  ret
L51:
  movl   $0x0,0x0(%rbp)
  mov    %rsp,%rdi
  mov    $0x18,%edx
  mov    $0x0,%esi
  call   <memset@plt>
  mov    %rbp,%r8
  mov    $0x270f,%ecx
  mov    $0x7c6,%edx
  mov    $0x4,%esi
  mov    %rbx,%rdi
  call   <datepart@plt>
  sub    $0x76c,%rax
  mov    %eax,(%rsp)
  lea    0x4(%rbx),%rdi
  mov    %rbp,%r8
  mov    $0xc,%ecx
  mov    $0x1,%edx
  mov    $0x2,%esi
  call   <datepart@plt>
  sub    $0x1,%rax
  mov    %eax,0x4(%rsp)
  lea    0x6(%rbx),%rdi
  mov    %rbp,%r8
  mov    $0x1f,%ecx
  mov    $0x1,%edx
  mov    $0x2,%esi
  call   <datepart@plt>
  mov    %eax,0x8(%rsp)
  lea    0x8(%rbx),%rdi
  mov    %rbp,%r8
  mov    $0x17,%ecx
  mov    $0x0,%edx
  mov    $0x2,%esi
  call   <datepart@plt>
  mov    %eax,0xc(%rsp)
  lea    0xa(%rbx),%rdi
  mov    %rbp,%r8
  mov    $0x3b,%ecx
  mov    $0x0,%edx
  mov    $0x2,%esi
  call   <datepart@plt>
  mov    %eax,0x10(%rsp)
  lea    0xc(%rbx),%rdi
  mov    %rbp,%r8
  mov    $0x3b,%ecx
  mov    $0x0,%edx
  mov    $0x2,%esi
  call   <datepart@plt>
  mov    0x0(%rbp),%edx
  mov    $0x0,%edi
  test   %edx,%edx
  jne    L86
  imul   $0x3c,0x10(%rsp),%ecx
  add    %eax,%ecx
  imul   $0xe10,0xc(%rsp),%eax
  add    %ecx,%eax
  mov    0x8(%rsp),%ebx
  lea    -0x1(%rbx),%esi
  imul   $0x15180,%esi,%esi
  add    %eax,%esi
  mov    0x4(%rsp),%edi
  test   %edi,%edi
  jle    L24
  lea    D9(%rip),%rax
  lea    -0x1(%rdi),%ecx
  lea    0x4(%rax),%r8
  lea    (%r8,%rcx,4),%rcx
L35:
  add    (%rax),%edx
  add    $0x4,%rax
  cmp    %rcx,%rax
  jne    L35
L24:
  imul   $0x15180,%edx,%edx
  add    %esi,%edx
  cmp    $0x1,%edi
  jle    L101
  mov    (%rsp),%eax
  lea    0x76c(%rax),%ecx
  test   $0x3,%al
  jne    L134
  movslq %ecx,%rax
  imul   $0x51eb851f,%rax,%rax
  sar    $0x25,%rax
  mov    %ecx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  imul   $0x64,%eax,%eax
  cmp    %eax,%ecx
  jne    L19
L134:
  movslq %ecx,%rax
  imul   $0x51eb851f,%rax,%rax
  sar    $0x27,%rax
  mov    %ecx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  imul   $0x190,%eax,%eax
  cmp    %eax,%ecx
  jne    L101
L19:
  add    $0x15180,%edx
L101:
  mov    (%rsp),%r8d
  lea    -0x46(%r8),%edi
  imul   $0x1e13380,%edi,%edi
  add    %edx,%edi
  cmp    $0x46,%r8d
  jle    L86
  add    $0x76c,%r8d
  mov    $0x7b2,%edx
  jmp    L133
L120:
  movslq %esi,%rax
  imul   $0x51eb851f,%rax,%rax
  sar    $0x27,%rax
  mov    %esi,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  imul   $0x190,%eax,%eax
  cmp    %eax,%esi
  jne    L110
L154:
  add    $0x15180,%edi
L110:
  add    $0x1,%edx
  cmp    %r8d,%edx
  je     L86
L133:
  mov    %edx,%esi
  test   $0x3,%dl
  jne    L120
  movslq %edx,%rax
  imul   $0x51eb851f,%rax,%rax
  sar    $0x25,%rax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  imul   $0x64,%eax,%eax
  cmp    %eax,%edx
  jne    L154
  jmp    L120
L78:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D9
data_type: string

tool: D9: 

assistant: ```c
u_int32_t ns_datetosecs(const char *cp, int *errp) {
  struct tm time;
  u_int32_t result;
  int mdays, i;
  static const int days_per_month[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
  if (strlen(cp) != 14U) {
    *errp = 1;
    return (0);
  }
  *errp = 0;
  memset(&time, 0, sizeof time);
  time.tm_year = datepart(cp + 0, 4, 1990, 9999, errp) - 1900;
  time.tm_mon = datepart(cp + 4, 2, 01, 12, errp) - 1;
  time.tm_mday = datepart(cp + 6, 2, 01, 31, errp);
  time.tm_hour = datepart(cp + 8, 2, 00, 23, errp);
  time.tm_min = datepart(cp + 10, 2, 00, 59, errp);
  time.tm_sec = datepart(cp + 12, 2, 00, 59, errp);
  if (*errp)
    return (0);
  result = time.tm_sec;
  result += time.tm_min * 60;
  result += time.tm_hour * (60 * 60);
  result += (time.tm_mday - 1) * ((u_int32_t)24 * 60 * 60);
  mdays = 0;
  for (i = 0; i < time.tm_mon; i++)
    mdays += days_per_month[i];
  result += mdays * ((u_int32_t)24 * 60 * 60);
  if (time.tm_mon > 1 && ((((1900 + time.tm_year) % 4) == 0 && ((1900 + time.tm_year) % 100) != 0) || ((1900 + time.tm_year) % 400) == 0))
    result += ((u_int32_t)24 * 60 * 60);
  result += (time.tm_year - 70) * (((u_int32_t)24 * 60 * 60) * 365);
  for (i = 70; i < time.tm_year; i++)
    if (((((1900 + i) % 4) == 0 && ((1900 + i) % 100) != 0) || ((1900 + i) % 400) == 0))
      result += ((u_int32_t)24 * 60 * 60);
  return (result);
}
```