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

```asm
<caldat>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  cmpq   $0x231518,-0x38(%rbp)
  jle    L25
  mov    -0x38(%rbp),%rax
  sub    $0x1c7dd0,%rax
  pxor   %xmm0,%xmm0
  cvtsi2ss %rax,%xmm0
  cvtss2sd %xmm0,%xmm0
  movsd  D21(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  D86(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm1,%xmm1
  cvtsi2sdq -0x28(%rbp),%xmm1
  movsd  D21(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rdx
  sub    %rdx,%rax
  mov    %rax,-0x30(%rbp)
  jmp    L36
L25:
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x30(%rbp)
L36:
  mov    -0x30(%rbp),%rax
  add    $0x5f4,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  sub    $0x253abe,%rax
  pxor   %xmm0,%xmm0
  cvtsi2ss %rax,%xmm0
  cvtss2sd %xmm0,%xmm0
  movsd  D34(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  D53(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  D24(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  pxor   %xmm2,%xmm2
  cvtsi2sdq -0x18(%rbp),%xmm2
  movsd  D21(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x20(%rbp),%rax
  sub    -0x10(%rbp),%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  movsd  D73(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  sub    %eax,%edx
  pxor   %xmm1,%xmm1
  cvtsi2sdq -0x8(%rbp),%xmm1
  movsd  D73(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,%edx
  mov    -0x48(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x8(%rbp),%rax
  sub    $0x1,%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0xc,%eax
  jle    L2
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  lea    -0xc(%rax),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,(%rax)
L2:
  mov    -0x18(%rbp),%rax
  sub    $0x126b,%eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x2,%eax
  jle    L47
  mov    -0x50(%rbp),%rax
  mov    (%rax),%eax
  lea    -0x1(%rax),%edx
  mov    -0x50(%rbp),%rax
  mov    %edx,(%rax)
L47:
  mov    -0x50(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jg     L8
  mov    -0x50(%rbp),%rax
  mov    (%rax),%eax
  lea    -0x1(%rax),%edx
  mov    -0x50(%rbp),%rax
  mov    %edx,(%rax)
L8:
  nop
  pop    %rbp
  ret
```

tool_calls: name: read_data
arguments: label: D21
type: f64
name: read_data
arguments: label: D86
type: f64
name: read_data
arguments: label: D34
type: f64
name: read_data
arguments: label: D53
type: f64
name: read_data
arguments: label: D24
type: f64
name: read_data
arguments: label: D73
type: f64

tool: D21: 0.25

tool: D86: 36524.25

tool: D34: 122.1

tool: D53: 365.25

tool: D24: 6680

tool: D73: 30.6001

assistant: ```c
void caldat(long julian, int *mm, int *id, int *iyyy) {
  long ja, jalpha, jb, jc, jd, je;
  if (julian >= 2299161) {
    jalpha = (long)(((float)(julian - 1867216) - 0.25) / 36524.25);
    ja = julian + 1 + jalpha - (long)(0.25 * jalpha);
  } else
    ja = julian;
  jb = ja + 1524;
  jc = (long)(6680.0 + ((float)(jb - 2439870) - 122.1) / 365.25);
  jd = (long)(365 * jc + (0.25 * jc));
  je = (long)((jb - jd) / 30.6001);
  *id = jb - jd - (long)(30.6001 * je);
  *mm = je - 1;
  if (*mm > 12)
    *mm -= 12;
  *iyyy = jc - 4715;
  if (*mm > 2)
    --(*iyyy);
  if (*iyyy <= 0)
    --(*iyyy);
}
```