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

```asm
<todate_>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%rax
  mov    %rsi,%rdi
  mov    %rdx,%rbx
  mov    %rcx,%rbp
  mov    %fs:0x28,%rdx
  mov    %rdx,0x18(%rsp)
  xor    %edx,%edx
  movl   $0x0,0x10(%rsp)
  movl   $0x0,0xc(%rsp)
  movl   $0x0,0x8(%rsp)
  movl   $0x0,0x4(%rsp)
  movl   $0x0,(%rsp)
  movl   $0x0,0x14(%rsp)
  mov    D21(%rip),%rsi
  mov    %rsi,(%rbx)
  mov    (%rax),%ecx
  mov    %rdi,%rsi
  mov    %rdi,%rdx
  mov    $0xffffffff,%eax
L9:
  cmp    %eax,%ecx
  jle    L54
  add    $0x1,%eax
  add    $0x1,%rdx
  cmpb   $0x0,-0x1(%rdx)
  jne    L9
L54:
  movslq %eax,%rdx
  lea    -0x1(%rdi,%rdx,1),%rcx
L82:
  test   %eax,%eax
  js     L104
  sub    $0x1,%eax
  cmpb   $0x20,(%rcx)
  sete   %r8b
  mov    %eax,%edx
  not    %edx
  shr    $0x1f,%edx
  sub    $0x1,%rcx
  test   %dl,%r8b
  jne    L82
L104:
  mov    $0xffffffff,%edx
L278:
  cmp    %eax,%edx
  jg     L157
  add    $0x1,%edx
  add    $0x1,%rsi
  cmpb   $0x20,-0x1(%rsi)
  je     L278
L157:
  sub    %edx,%eax
  lea    0x1(%rax),%ecx
  cmp    $0x7,%eax
  je     L258
  cmp    $0x7,%ecx
  jne    L193
  cmp    $0x1,%edx
  jne    L193
L258:
  cmpb   $0x2f,0x2(%rdi)
  jne    L263
  cmpb   $0x2f,0x5(%rdi)
  je     L273
L193:
  cmp    $0xa,%ecx
  je     L122
  cmp    $0x12,%ecx
  jle    L263
  cmpb   $0x2d,0x4(%rdi)
  jne    L263
  cmpb   $0x2d,0x7(%rdi)
  jne    L263
  cmpb   $0x54,0xa(%rdi)
  jne    L263
  cmpb   $0x3a,0xd(%rdi)
  jne    L263
  cmpb   $0x3a,0x10(%rdi)
  jne    L263
  lea    0x4(%rsp),%rcx
  mov    %rsp,%rdx
  lea    0x14(%rsp),%rax
  push   %rax
  lea    0x18(%rsp),%rax
  push   %rax
  lea    0x1c(%rsp),%r9
  lea    0x18(%rsp),%r8
  lea    D5(%rip),%rsi
  mov    $0x0,%eax
  call   <sscanf@plt>
  add    $0x10,%rsp
  jmp    L142
L273:
  lea    0x4(%rsp),%rcx
  lea    0x8(%rsp),%rdx
  mov    %rsp,%r8
  lea    D3(%rip),%rsi
  mov    $0x0,%eax
  call   <sscanf@plt>
  cmpl   $0x0,0x0(%rbp)
  je     L294
  mov    0x8(%rsp),%eax
  mov    0x4(%rsp),%edx
  mov    %edx,0x8(%rsp)
  mov    %eax,0x4(%rsp)
L294:
  addl   $0x76c,(%rsp)
L142:
  movss  0x14(%rsp),%xmm0
  comiss D19(%rip),%xmm0
  jae    L263
  mov    0x10(%rsp),%edx
  cmp    $0x3b,%edx
  jg     L263
  mov    0xc(%rsp),%esi
  cmp    $0x17,%esi
  jg     L263
  mov    0x4(%rsp),%edi
  cmp    $0xc,%edi
  jg     L263
  lea    -0x1(%rdi),%eax
  cltq
  lea    D9(%rip),%rcx
  mov    (%rcx,%rax,4),%r8d
  mov    (%rsp),%ecx
  movslq %ecx,%rax
  imul   $0x51eb851f,%rax,%rax
  sar    $0x27,%rax
  mov    %ecx,%r9d
  sar    $0x1f,%r9d
  sub    %r9d,%eax
  imul   $0x190,%eax,%eax
  cmp    %eax,%ecx
  je     L167
  test   $0x3,%cl
  jne    L3
  movslq %ecx,%rax
  imul   $0x51eb851f,%rax,%rax
  sar    $0x25,%rax
  mov    %ecx,%r9d
  sar    $0x1f,%r9d
  sub    %r9d,%eax
  imul   $0x64,%eax,%eax
  cmp    %eax,%ecx
  je     L3
L167:
  add    $0x1,%r8d
L3:
  mov    0x8(%rsp),%r9d
  cmp    %r8d,%r9d
  jg     L263
  lea    -0xe(%rdi),%eax
  movslq %eax,%r8
  imul   $0x2aaaaaab,%r8,%r8
  sar    $0x21,%r8
  sar    $0x1f,%eax
  sub    %eax,%r8d
  lea    0x0(,%r8,4),%r10d
  mov    %r8d,%eax
  sub    %r10d,%eax
  lea    -0x2(%rdi,%rax,4),%edi
  imul   $0x16f,%edi,%edi
  movslq %edi,%rax
  imul   $0x2aaaaaab,%rax,%rax
  sar    $0x21,%rax
  sar    $0x1f,%edi
  sub    %edi,%eax
  lea    0x12c0(%rcx,%r8,1),%r10d
  imul   $0x5b5,%r10d,%r10d
  lea    0x3(%r10),%edi
  test   %r10d,%r10d
  cmovns %r10d,%edi
  sar    $0x2,%edi
  add    %edi,%eax
  lea    0x1324(%rcx,%r8,1),%edi
  movslq %edi,%rcx
  imul   $0x51eb851f,%rcx,%rcx
  sar    $0x25,%rcx
  sar    $0x1f,%edi
  sub    %edi,%ecx
  lea    (%rcx,%rcx,2),%edi
  lea    0x3(%rdi),%ecx
  test   %edi,%edi
  cmovns %edi,%ecx
  sar    $0x2,%ecx
  sub    %ecx,%eax
  lea    -0x251c4c(%r9,%rax,1),%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  pxor   %xmm1,%xmm1
  cvtsi2sd %edx,%xmm1
  cvtss2sd %xmm0,%xmm0
  movsd  D60(%rip),%xmm3
  divsd  %xmm3,%xmm0
  addsd  %xmm1,%xmm0
  divsd  %xmm3,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %esi,%xmm1
  addsd  %xmm1,%xmm0
  divsd  D68(%rip),%xmm0
  addsd  %xmm0,%xmm2
  movsd  %xmm2,(%rbx)
  jmp    L263
L122:
  cmpb   $0x2d,0x4(%rdi)
  je     L223
L263:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L316
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  ret
L223:
  cmpb   $0x2d,0x7(%rdi)
  jne    L263
  lea    0x4(%rsp),%rcx
  mov    %rsp,%rdx
  lea    0x8(%rsp),%r8
  lea    D16(%rip),%rsi
  mov    $0x0,%eax
  call   <sscanf@plt>
  jmp    L142
L316:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D21
datatype: f32[2]
name: parse_data
arguments: data_tag: D5
datatype: string
name: parse_data
arguments: data_tag: D3
datatype: string
name: parse_data
arguments: data_tag: D19
datatype: f32
name: parse_data
arguments: data_tag: D9
datatype: string
name: parse_data
arguments: data_tag: D60
datatype: f32[2]
name: parse_data
arguments: data_tag: D68
datatype: f64
name: parse_data
arguments: data_tag: D16
datatype: string

tool: {"D21": [0.0,-1.875]}

tool: D5: %d-%d-%dT%d:%d:%f

tool: D3: %d/%d/%d

tool: D19: 60

tool: D9: 

tool: {"D60": [0.0,3.21875]}

tool: D68: 24

tool: D16: %d-%d-%d

assistant: ```c
void todate_(slen, sdate, ddate, oldfits) int *slen;
char *sdate;
double *ddate;
int *oldfits;
{
  static int days[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
  int first, last, len;
  int yr, mon, day, hr, min, mday, mjd, csize, tmp;
  float secs;
  yr = mon = day = hr = min = 0;
  secs = 0.0;
  *ddate = -1.0;
  first = last = -1;
  while (last < *slen && sdate[++last] != '\0')
    ;
  while (last >= 0 && sdate[--last] == ' ' && last >= 0)
    ;
  while (first <= last && sdate[++first] == ' ')
    ;
  len = last - first + 1;
  if ((len == 8 || (len == 7 && first == 1)) && sdate[2] == '/' && sdate[5] == '/') {
    sscanf(sdate, "%d/%d/%d", &day, &mon, &yr);
    if (*oldfits) {
      tmp = day;
      day = mon;
      mon = tmp;
    }
    yr += 1900;
  } else if (len == 10 && sdate[4] == '-' && sdate[7] == '-') {
    sscanf(sdate, "%d-%d-%d", &yr, &mon, &day);
  } else if (len >= 19 && sdate[4] == '-' && sdate[7] == '-' && sdate[10] == 'T' && sdate[13] == ':' && sdate[16] == ':') {
    sscanf(sdate, "%d-%d-%dT%d:%d:%f", &yr, &mon, &day, &hr, &min, &secs);
  } else {
    return;
  }
  if (secs >= 60.0 || min >= 60 || hr >= 24 || mon > 12)
    return;
  mday = days[mon - 1];
  if ((yr % 400 == 0) || ((yr % 4 == 0) && (yr % 100 != 0)))
    mday++;
  if (day > mday)
    return;
  mjd = (1461 * (yr + 4800 + (mon - 14) / 12)) / 4 + (367 * (mon - 2 - 12 * ((mon - 14) / 12))) / 12 - (3 * ((yr + 4900 + (mon - 14) / 12) / 100)) / 4 + day - 32075;
  mjd = mjd - 2400001;
  *ddate = mjd + (hr + (min + secs / 60.0) / 60.0) / 24.0;
}
```