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

```asm
<greg2jul>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x44(%rbp)
  mov    %esi,-0x48(%rbp)
  mov    %edx,-0x4c(%rbp)
  mov    %ecx,-0x50(%rbp)
  mov    %r8d,-0x54(%rbp)
  movsd  %xmm0,-0x60(%rbp)
  mov    -0x44(%rbp),%eax
  cltq
  mov    %rax,-0x38(%rbp)
  mov    -0x48(%rbp),%eax
  cltq
  mov    %rax,-0x18(%rbp)
  mov    -0x4c(%rbp),%eax
  cltq
  mov    %rax,-0x30(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x50(%rbp),%xmm1
  movsd  D49(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0x54(%rbp),%eax
  imul   $0x3c,%eax,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  addsd  %xmm1,%xmm0
  movsd  -0x60(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  cmpq   $0x2,-0x38(%rbp)
  jle    L0
  subq   $0x3,-0x38(%rbp)
  jmp    L6
L0:
  addq   $0x9,-0x38(%rbp)
  subq   $0x1,-0x30(%rbp)
L6:
  mov    -0x30(%rbp),%rcx
  movabs $0xa3d70a3d70a3d70b,%rdx
  mov    %rcx,%rax
  imul   %rdx
  lea    (%rdx,%rcx,1),%rax
  sar    $0x6,%rax
  sar    $0x3f,%rcx
  mov    %rcx,%rdx
  sub    %rdx,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  imul   $0xffffffffffffff9c,%rax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x10(%rbp),%rax
  imul   $0x23ab1,%rax,%rax
  lea    0x3(%rax),%rdx
  test   %rax,%rax
  cmovs  %rdx,%rax
  sar    $0x2,%rax
  mov    %rax,%rcx
  mov    -0x8(%rbp),%rax
  imul   $0x5b5,%rax,%rax
  lea    0x3(%rax),%rdx
  test   %rax,%rax
  cmovs  %rdx,%rax
  sar    $0x2,%rax
  lea    (%rcx,%rax,1),%rsi
  mov    -0x38(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    %rax,%rdx
  shl    $0x4,%rdx
  add    %rdx,%rax
  lea    0x2(%rax),%rcx
  movabs $0x6666666666666667,%rdx
  mov    %rcx,%rax
  imul   %rdx
  mov    %rdx,%rax
  sar    %rax
  sar    $0x3f,%rcx
  mov    %rcx,%rdx
  sub    %rdx,%rax
  lea    (%rsi,%rax,1),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  add    $0x1a431f,%rax
  mov    %rax,-0x28(%rbp)
  movsd  D37(%rip),%xmm0
  comisd -0x20(%rbp),%xmm0
  jbe    L18
  subq   $0x1,-0x28(%rbp)
  movsd  -0x20(%rbp),%xmm1
  movsd  D37(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  jmp    L16
L18:
  movsd  -0x20(%rbp),%xmm0
  movsd  D37(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
L16:
  pxor   %xmm1,%xmm1
  cvtsi2sdq -0x28(%rbp),%xmm1
  movsd  -0x20(%rbp),%xmm0
  movsd  D49(%rip),%xmm2
  divsd  %xmm2,%xmm0
  movsd  D11(%rip),%xmm2
  divsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  pop    %rbp
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D49
data_type: f64
name: retrieve_data
arguments: data_label: D37
data_type: byte[8]
name: retrieve_data
arguments: data_label: D11
data_type: f64

tool: D49: 3600

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

tool: D11: 24

assistant: ```c
double greg2jul(mon, day, year, h, mi, se)
int mon, day, year, h, mi;
double se;
{
  long m = mon, d = day, y = year;
  long c, ya, j;
  double seconds = h * 3600.0 + mi * 60 + se;
  if (m > 2)
    m -= 3;
  else {
    m += 9;
    --y;
  }
  c = y / 100L;
  ya = y - (100L * c);
  j = (146097L * c) / 4L + (1461L * ya) / 4L + (153L * m + 2L) / 5L + d + 1721119L;
  if (seconds < 12 * 3600.0) {
    j--;
    seconds += 12.0 * 3600.0;
  } else {
    seconds = seconds - 12.0 * 3600.0;
  }
  return (j + (seconds / 3600.0) / 24.0);
}
```