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

```asm
<DatetoJD>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  add    $0x76c,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x28(%rbp),%rax
  mov    0x4(%rax),%eax
  add    $0x1,%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x28(%rbp),%rax
  mov    0x20(%rax),%rax
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  mov    -0x28(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  D29(%rip),%xmm2
  divsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  mov    -0x28(%rbp),%rax
  movsd  0x10(%rax),%xmm0
  movsd  D40(%rip),%xmm2
  divsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  mov    -0x28(%rbp),%rax
  movsd  0x18(%rax),%xmm0
  movsd  D0(%rip),%xmm2
  divsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  cmpl   $0x1,-0x1c(%rbp)
  je     L37
  cmpl   $0x2,-0x1c(%rbp)
  jne    L20
L37:
  subl   $0x1,-0x20(%rbp)
  addl   $0xc,-0x1c(%rbp)
L20:
  mov    -0x20(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x51eb851f,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x5,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x14(%rbp)
  mov    $0x2,%eax
  sub    -0x14(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x14(%rbp),%eax
  lea    0x3(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x2,%eax
  add    %ecx,%eax
  mov    %eax,-0x18(%rbp)
  cmpl   $0x62e,-0x20(%rbp)
  jg     L61
  cmpl   $0x62d,-0x20(%rbp)
  jle    L48
  cmpl   $0x9,-0x1c(%rbp)
  jle    L48
  cmpl   $0xa,-0x1c(%rbp)
  jne    L61
  movsd  D37(%rip),%xmm0
  comisd -0x10(%rbp),%xmm0
  jb     L61
L48:
  movl   $0x0,-0x18(%rbp)
L61:
  mov    -0x20(%rbp),%eax
  add    $0x126c,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D14(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rdx
  mov    -0x1c(%rbp),%eax
  add    $0x1,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D63(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  movapd %xmm0,%xmm1
  addsd  -0x10(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x18(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  D30(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  pop    %rbp
  ret
```

tool_calls: name: disassemble_data
arguments: label: D29
type_guessed: f64
name: disassemble_data
arguments: label: D40
type_guessed: f64
name: disassemble_data
arguments: label: D0
type_guessed: f64
name: disassemble_data
arguments: label: D37
type_guessed: byte[8]
name: disassemble_data
arguments: label: D14
type_guessed: f64
name: disassemble_data
arguments: label: D63
type_guessed: f64
name: disassemble_data
arguments: label: D30
type_guessed: f64

tool: D29: 24

tool: D40: 1440

tool: D0: 86400

tool: {"D37": [0x00,0x00,0x00,0x00,0x00,0x00,0x2e,0x40]}

tool: D14: 365.25

tool: D63: 30.6001

tool: D30: 1524.5

assistant: ```c
extern double DatetoJD(struct tm *event_date) {
  int y, m;
  double d;
  int a, b;
  double jd;
  y = event_date->tm_year + 1900;
  m = event_date->tm_mon + 1;
  d = (double)(event_date->tm_mday) + (event_date->tm_hour / 24.0) + (event_date->tm_min / 1440.0) + (event_date->tm_sec / 86400.0);
  if (m == 1 || m == 2) {
    y--;
    m += 12;
  }
  a = (int)(y / 100);
  b = 2 - a + (int)(a / 4);
  if (y < 1583)
    if ((y < 1582) || (m < 10) || ((m == 10) && (d <= 15)))
      b = 0;
  jd = (long)(365.25 * (y + 4716)) + (long)(30.6001 * (m + 1)) + d + b - 1524.5;
  return jd;
}
```