user: Demonstrate the C code that generates the assembly output below:

```asm
<readstat_sav_date_parse>:
  endbr64
  movabs $0x1e0000001f,%rdx
  push   %r14
  movabs $0x1f0000001f,%rcx
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  movabs $0x1d0000001f,%rsi
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x480,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x478(%rsp)
  movabs $0x1c0000001f,%rax
  cmpb   $0x0,(%rdi)
  mov    %rdx,0x18(%rsp)
  mov    %rdx,0x20(%rsp)
  mov    %rcx,0x28(%rsp)
  mov    %rsi,0x40(%rsp)
  mov    %rdx,0x48(%rsp)
  mov    %rdx,0x50(%rsp)
  mov    %rax,0x10(%rsp)
  movabs $0x1f0000001e,%rax
  mov    %rax,0x30(%rsp)
  mov    %rax,0x38(%rsp)
  mov    %rcx,0x58(%rsp)
  mov    %rax,0x60(%rsp)
  mov    %rax,0x68(%rsp)
  jne    L121
L61:
  mov    %rbx,0x0(%rbp)
  pxor   %xmm0,%xmm0
L76:
  mov    0x478(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L135
  add    $0x480,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L121:
  lea    D25(%rip),%r13
  lea    0xc(%rsp),%r8
  lea    0x8(%rsp),%rcx
  lea    0x4(%rsp),%rdx
  mov    %r13,%rsi
  call   <sscanf@plt>
  mov    %eax,%r8d
  mov    0x8(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x8(%rsp)
  cmp    $0x3,%r8d
  jne    L61
  cmp    $0xb,%eax
  ja     L61
  mov    0x4(%rsp),%edi
  call   <is_leap@plt>
  lea    0x10(%rsp),%rdx
  movslq 0x8(%rsp),%rsi
  mov    0xc(%rsp),%ecx
  mov    %rax,%r8
  lea    0x40(%rsp),%rax
  test   %r8,%r8
  cmovne %rax,%rdx
  mov    %rsi,%rax
  cmp    (%rdx,%rsi,4),%ecx
  jg     L61
  test   %ecx,%ecx
  jle    L61
  mov    0x4(%rsp),%edi
  cmp    $0x62e,%edi
  jle    L80
  mov    $0x62e,%r14d
  xor    %r12d,%r12d
  nopw   0x0(%rax,%rax,1)
L94:
  mov    %r14d,%edi
  call   <is_leap@plt>
  mov    0x4(%rsp),%edi
  cmp    $0x1,%rax
  sbb    $0xfffffe92,%r12d
  add    $0x1,%r14d
  cmp    %r14d,%edi
  jg     L94
  mov    0x8(%rsp),%eax
L62:
  test   %eax,%eax
  jle    L50
  xor    %r14d,%r14d
  jmp    L38
  nopl   (%rax)
L13:
  mov    0x40(%rsp,%r14,4),%eax
L144:
  add    %eax,%r12d
  mov    0x8(%rsp),%eax
  add    $0x1,%r14
  mov    0x4(%rsp),%edi
  cmp    %r14d,%eax
  jle    L50
L38:
  call   <is_leap@plt>
  test   %rax,%rax
  jne    L13
  mov    0x10(%rsp,%r14,4),%eax
  jmp    L144
  nopw   0x0(%rax,%rax,1)
L50:
  mov    0xc(%rsp),%r9d
  lea    0x70(%rsp),%r10
  mov    %edi,%ecx
  lea    0x1(%rax),%r8d
  mov    %r13,%rdx
  mov    $0x400,%esi
  mov    %r10,%rdi
  lea    -0x1(%r9,%r12,1),%r12d
  call   <snprintf@plt>
  pxor   %xmm0,%xmm0
  cltq
  cvtsi2sd %r12d,%xmm0
  mulsd  D18(%rip),%xmm0
  add    %rax,%rbx
  mov    %rbx,0x0(%rbp)
  subsd  D22(%rip),%xmm0
  jmp    L76
L80:
  xor    %r12d,%r12d
  jmp    L62
L135:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D25
datatype: string
name: extract_symbolic_data
arguments: data_label: D18
datatype: f64
name: extract_symbolic_data
arguments: data_label: D22
datatype: byte[8]

tool: D25: %d-%d-%d

tool: D18: 86400

tool: {"D22": [0x00,0x00,0x00,0x00,0xd0,0x90,0x77,0x41]}

assistant: ```c
double readstat_sav_date_parse(const char *s, char **dest) {
  int daysPerMonth[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
  int daysPerMonthLeap[] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
  int year, month, day;
  if (strlen(s) == 0) {
    *dest = (char *)s;
    return 0;
  }
  int ret = sscanf(s, "%d-%d-%d", &year, &month, &day);
  month--;
  if (month < 0 || month > 11 || ret != 3) {
    *dest = (char *)s;
    return 0;
  }
  int maxdays = (is_leap(year) ? daysPerMonthLeap : daysPerMonth)[month];
  if (day < 1 || day > maxdays) {
    *dest = (char *)s;
    return 0;
  } else {
    int days = 0;
    for (int i = 1582; i < year; i++) {
      days += is_leap(i) ? 366 : 365;
    }
    for (int m = 0; m < month; m++) {
      days += is_leap(year) ? daysPerMonthLeap[m] : daysPerMonth[m];
    }
    days += day - 1;
    char buf[1024];
    *dest = (char *)s + snprintf(buf, sizeof(buf), "%d-%d-%d", year, month + 1, day);
    return (days * 86400.0) - 24710400;
  }
}
```