user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<todate_>:
  endbr64
  push   %rbp
  mov    %rdi,%r8
  mov    %rsi,%rdi
  mov    %rcx,%rbp
  push   %rbx
  mov    %rdi,%rcx
  mov    %rdx,%rbx
  sub    $0x28,%rsp
  mov    (%r8),%esi
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    D51(%rip),%rax
  movl   $0x0,0x10(%rsp)
  movl   $0x0,0xc(%rsp)
  mov    %rax,(%rdx)
  mov    %rdi,%rax
  mov    $0xffffffff,%edx
  movl   $0x0,0x8(%rsp)
  movl   $0x0,0x4(%rsp)
  movl   $0x0,(%rsp)
  movl   $0x0,0x14(%rsp)
  jmp    L211
  nop
L1:
  add    $0x1,%rax
  add    $0x1,%edx
  cmpb   $0x0,-0x1(%rax)
  je     L173
L211:
  cmp    %edx,%esi
  jg     L1
L173:
  movslq %edx,%rsi
  lea    -0x1(%rdx),%eax
  lea    0x1(%rdx),%r9d
  mov    %edx,%edx
  lea    -0x1(%rsi),%r8
  sub    $0x2,%rsi
  cltq
  sub    %r9,%r8
  sub    %rdx,%rsi
  jmp    L124
  nop
L369:
  cmpb   $0x20,(%rdi,%rax,1)
  mov    %eax,%edx
  jne    L71
  sub    $0x1,%rax
  cmp    %rsi,%rax
  je     L169
L124:
  cmp    %r8,%rax
  jne    L369
L169:
  mov    $0xffffffff,%edx
L71:
  mov    $0xffffffff,%eax
  jmp    L283
  nopw   0x0(%rax,%rax,1)
L308:
  add    $0x1,%rcx
  add    $0x1,%eax
  cmpb   $0x20,-0x1(%rcx)
  jne    L307
L283:
  cmp    %edx,%eax
  jle    L308
L307:
  sub    %eax,%edx
  lea    0x1(%rdx),%ecx
  cmp    $0x7,%edx
  je     L97
  cmp    $0x7,%ecx
  jne    L246
  cmp    $0x1,%eax
  jne    L246
L97:
  cmpb   $0x2f,0x2(%rdi)
  jne    L84
  cmpb   $0x2f,0x5(%rdi)
  je     L213
L246:
  cmp    $0xa,%ecx
  je     L109
  cmp    $0x12,%ecx
  jle    L84
  cmpb   $0x2d,0x4(%rdi)
  je     L48
L84:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L148
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax,%rax,1)
L48:
  cmpb   $0x2d,0x7(%rdi)
  jne    L84
  cmpb   $0x54,0xa(%rdi)
  jne    L84
  cmpb   $0x3a,0xd(%rdi)
  jne    L84
  cmpb   $0x3a,0x10(%rdi)
  jne    L84
  lea    0x14(%rsp),%rax
  lea    0x4(%rsp),%rcx
  mov    %rsp,%rdx
  push   %rax
  lea    D57(%rip),%rsi
  lea    0x18(%rsp),%rax
  push   %rax
  xor    %eax,%eax
  lea    0x1c(%rsp),%r9
  lea    0x18(%rsp),%r8
  call   <sscanf@plt>
  pop    %rax
  pop    %rdx
  jmp    L130
  nopl   0x0(%rax,%rax,1)
L109:
  cmpb   $0x2d,0x4(%rdi)
  jne    L84
  cmpb   $0x2d,0x7(%rdi)
  jne    L84
  lea    0x4(%rsp),%rcx
  mov    %rsp,%rdx
  lea    0x8(%rsp),%r8
  xor    %eax,%eax
  lea    D34(%rip),%rsi
  call   <sscanf@plt>
  jmp    L130
L213:
  lea    0x4(%rsp),%rcx
  lea    0x8(%rsp),%rdx
  mov    %rsp,%r8
  xor    %eax,%eax
  lea    D42(%rip),%rsi
  call   <sscanf@plt>
  mov    0x0(%rbp),%ecx
  test   %ecx,%ecx
  je     L112
  mov    0x8(%rsp),%eax
  mov    0x4(%rsp),%edx
  mov    %eax,0x4(%rsp)
  mov    %edx,0x8(%rsp)
L112:
  addl   $0x76c,(%rsp)
L130:
  movss  0x14(%rsp),%xmm0
  comiss D9(%rip),%xmm0
  jae    L84
  mov    0x10(%rsp),%ecx
  cmp    $0x3b,%ecx
  jg     L84
  mov    0xc(%rsp),%esi
  cmp    $0x17,%esi
  jg     L84
  mov    0x4(%rsp),%eax
  cmp    $0xc,%eax
  jg     L84
  mov    (%rsp),%r9d
  lea    -0x1(%rax),%edx
  lea    D38(%rip),%rdi
  movslq %edx,%rdx
  mov    (%rdi,%rdx,4),%r8d
  imul   $0xc28f5c29,%r9d,%edx
  add    $0x51eb850,%edx
  mov    %edx,%edi
  ror    $0x4,%edi
  cmp    $0xa3d70a,%edi
  jbe    L274
  test   $0x3,%r9b
  jne    L127
  ror    $0x2,%edx
  cmp    $0x28f5c28,%edx
  jbe    L127
L274:
  add    $0x1,%r8d
L127:
  mov    0x8(%rsp),%edi
  cmp    %r8d,%edi
  jg     L84
  cvtss2sd %xmm0,%xmm0
  lea    -0xe(%rax),%r8d
  pxor   %xmm1,%xmm1
  pxor   %xmm2,%xmm2
  movsd  D29(%rip),%xmm3
  movslq %r8d,%rdx
  cvtsi2sd %ecx,%xmm1
  sar    $0x1f,%r8d
  imul   $0x2aaaaaab,%rdx,%rdx
  divsd  %xmm3,%xmm0
  sar    $0x21,%rdx
  sub    %r8d,%edx
  lea    0x0(,%rdx,4),%r10d
  mov    %edx,%r8d
  sub    %r10d,%r8d
  lea    0x12c0(%r9,%rdx,1),%r10d
  imul   $0x5b5,%r10d,%r10d
  lea    -0x2(%rax,%r8,4),%r8d
  imul   $0x16f,%r8d,%r8d
  movslq %r8d,%rax
  sar    $0x1f,%r8d
  imul   $0x2aaaaaab,%rax,%rax
  sar    $0x21,%rax
  sub    %r8d,%eax
  test   %r10d,%r10d
  lea    0x3(%r10),%r8d
  cmovns %r10d,%r8d
  sar    $0x2,%r8d
  add    %r8d,%eax
  lea    0x1324(%r9,%rdx,1),%r8d
  movslq %r8d,%rdx
  sar    $0x1f,%r8d
  imul   $0x51eb851f,%rdx,%rdx
  sar    $0x25,%rdx
  sub    %r8d,%edx
  lea    (%rdx,%rdx,2),%r8d
  test   %r8d,%r8d
  lea    0x3(%r8),%edx
  addsd  %xmm1,%xmm0
  cmovns %r8d,%edx
  pxor   %xmm1,%xmm1
  cvtsi2sd %esi,%xmm1
  sar    $0x2,%edx
  divsd  %xmm3,%xmm0
  sub    %edx,%eax
  lea    -0x251c4c(%rdi,%rax,1),%eax
  cvtsi2sd %eax,%xmm2
  addsd  %xmm1,%xmm0
  divsd  D18(%rip),%xmm0
  addsd  %xmm0,%xmm2
  movsd  %xmm2,(%rbx)
  jmp    L84
L148:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D51
type: f32[2]
name: extract_symbolic_data
arguments: label: D57
type: string
name: extract_symbolic_data
arguments: label: D34
type: string
name: extract_symbolic_data
arguments: label: D42
type: string
name: extract_symbolic_data
arguments: label: D9
type: f32
name: extract_symbolic_data
arguments: label: D38
type: string
name: extract_symbolic_data
arguments: label: D29
type: f32[2]
name: extract_symbolic_data
arguments: label: D18
type: f64

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

tool: D57: %d-%d-%dT%d:%d:%f

tool: D34: %d-%d-%d

tool: D42: %d/%d/%d

tool: D9: 60

tool: D38: 

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

tool: D18: 24

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;
}
```