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

```asm
<ffs2tm>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    0xa0(%rsp),%r14
  mov    0xa8(%rsp),%r13
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  mov    0x0(%r13),%eax
  test   %eax,%eax
  jg     L270
  mov    %rdi,%rbx
  mov    %r8,%rbp
  mov    %r9,%r12
  test   %rdi,%rdi
  je     L349
  test   %r8,%r8
  je     L410
  movl   $0x0,(%r8)
L410:
  test   %r12,%r12
  je     L557
  movl   $0x0,(%r12)
L557:
  test   %r14,%r14
  je     L479
  movq   $0x0,(%r14)
L479:
  cmpb   $0x2f,0x2(%rbx)
  je     L283
  cmpb   $0x2d,0x4(%rbx)
  je     L283
  test   %rsi,%rsi
  je     L482
  movl   $0x0,(%rsi)
L482:
  test   %rdx,%rdx
  je     L531
  movl   $0x0,(%rdx)
L531:
  test   %rcx,%rcx
  je     L489
  movl   $0x0,(%rcx)
L489:
  cmpb   $0x3a,0x2(%rbx)
  jne    L558
  cmpb   $0x3a,0x5(%rbx)
  je     L455
L558:
  lea    D77(%rip),%rdi
  call   <ffpmsg@plt>
  mov    %rbx,%rdi
  call   <ffpmsg@plt>
  movl   $0x1a4,0x0(%r13)
  mov    $0x1a4,%eax
L270:
  mov    0x58(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L395
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L349:
  lea    D29(%rip),%rdi
  call   <ffpmsg@plt>
  movl   $0x1a4,0x0(%r13)
  mov    $0x1a4,%eax
  jmp    L270
L283:
  mov    %r13,%r8
  mov    %rbx,%rdi
  call   <ffs2dt@plt>
  test   %rax,%rax
  jle    L122
  mov    0x0(%r13),%eax
  jmp    L270
L122:
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %eax,%r15d
  and    $0xfffffffd,%eax
  cmp    $0x8,%eax
  je     L124
  cmp    $0x12,%r15d
  jle    L94
  cmpb   $0x54,0xa(%rbx)
  je     L457
L526:
  test   %rbp,%rbp
  je     L142
  mov    0x0(%rbp),%eax
  cmp    $0x17,%eax
  ja     L495
L142:
  test   %r12,%r12
  je     L207
  mov    (%r12),%eax
  cmp    $0x3b,%eax
  ja     L415
L207:
  test   %r14,%r14
  je     L561
  movsd  (%r14),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm0,%xmm1
  ja     L419
  comisd D99(%rip),%xmm0
  jae    L419
L561:
  mov    0x0(%r13),%eax
  jmp    L270
L124:
  mov    0x0(%r13),%eax
  jmp    L270
L94:
  lea    D77(%rip),%rdi
  call   <ffpmsg@plt>
  mov    %rbx,%rdi
  call   <ffpmsg@plt>
  movl   $0x1a4,0x0(%r13)
  mov    $0x1a4,%eax
  jmp    L270
L457:
  cmpb   $0x3a,0xd(%rbx)
  jne    L526
  cmpb   $0x3a,0x10(%rbx)
  jne    L526
  movsbl 0xb(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L450
  movsbl 0xc(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L450
  movsbl 0xe(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L450
  movsbl 0xf(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L450
  movsbl 0x11(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L450
  movsbl 0x12(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L450
  cmp    $0x13,%r15d
  jle    L23
  cmpb   $0x2e,0x13(%rbx)
  jne    L188
L23:
  test   %rbp,%rbp
  je     L416
  lea    0xb(%rbx),%rdi
  call   <atoi@plt>
  mov    %eax,0x0(%rbp)
L416:
  test   %r12,%r12
  je     L485
  lea    0xe(%rbx),%rdi
  call   <atoi@plt>
  mov    %eax,(%r12)
L485:
  test   %r14,%r14
  je     L526
  lea    0x11(%rbx),%rdi
  call   <atof@plt>
  movsd  %xmm0,(%r14)
  jmp    L526
L188:
  lea    D77(%rip),%rdi
  call   <ffpmsg@plt>
  mov    %rbx,%rdi
  call   <ffpmsg@plt>
  movl   $0x1a4,0x0(%r13)
  mov    $0x1a4,%eax
  jmp    L270
L450:
  lea    D77(%rip),%rdi
  call   <ffpmsg@plt>
  mov    %rbx,%rdi
  call   <ffpmsg@plt>
  movl   $0x1a4,0x0(%r13)
  mov    $0x1a4,%eax
  jmp    L270
L455:
  movsbl (%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L564
  movsbl 0x1(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L564
  movsbl 0x3(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L564
  movsbl 0x4(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L564
  movsbl 0x6(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L564
  movsbl 0x7(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L564
  test   %rbp,%rbp
  je     L405
  mov    %rbx,%rdi
  call   <atoi@plt>
  mov    %eax,0x0(%rbp)
L405:
  test   %r12,%r12
  je     L467
  lea    0x3(%rbx),%rdi
  call   <atoi@plt>
  mov    %eax,(%r12)
L467:
  test   %r14,%r14
  je     L526
  lea    0x6(%rbx),%rdi
  call   <atof@plt>
  movsd  %xmm0,(%r14)
  jmp    L526
L564:
  lea    D77(%rip),%rdi
  call   <ffpmsg@plt>
  mov    %rbx,%rdi
  call   <ffpmsg@plt>
  movl   $0x1a4,0x0(%r13)
  mov    $0x1a4,%eax
  jmp    L270
L495:
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mov    %rsp,%rbx
  lea    D57(%rip),%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  mov    %rbx,%rdi
  call   <ffpmsg@plt>
  movl   $0x1a4,0x0(%r13)
  mov    $0x1a4,%eax
  jmp    L270
L415:
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mov    %rsp,%rbx
  lea    D63(%rip),%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  mov    %rbx,%rdi
  call   <ffpmsg@plt>
  movl   $0x1a4,0x0(%r13)
  mov    $0x1a4,%eax
  jmp    L270
L419:
  mov    %rsp,%rbx
  lea    D66(%rip),%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  mov    %rbx,%rdi
  call   <ffpmsg@plt>
  movl   $0x1a4,0x0(%r13)
  mov    $0x1a4,%eax
  jmp    L270
L395:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D77
type_infered: string
name: unpack_data
arguments: data_label: D29
type_infered: string
name: unpack_data
arguments: data_label: D99
type_infered: f64
name: unpack_data
arguments: data_label: D57
type_infered: string
name: unpack_data
arguments: data_label: D63
type_infered: string
name: unpack_data
arguments: data_label: D66
type_infered: string

tool: D77: input date string has illegal format:

tool: D29: error: null input date string (ffs2tm)

tool: D99: 61

tool: D57: hour value is out of range 0 - 23: %d (ffs2tm)

tool: D63: minute value is out of range 0 - 59: %d (ffs2tm)

tool: D66: second value is out of range 0 - 60.9999: %f (ffs2tm)

assistant: ```c
int ffs2tm(char *datestr, int *year, int *month, int *day, int *hour, int *minute, double *second, int *status) {
  int slen;
  char errmsg[81];
  if (*status > 0)
    return (*status);
  if (!datestr) {
    ffpmsg("error: null input date string (ffs2tm)");
    return (*status = 420);
  }
  if (hour)
    *hour = 0;
  if (minute)
    *minute = 0;
  if (second)
    *second = 0.;
  if (datestr[2] == '/' || datestr[4] == '-') {
    if (ffs2dt(datestr, year, month, day, status) > 0)
      return (*status);
    slen = strlen(datestr);
    if (slen == 8 || slen == 10)
      return (*status);
    else if (slen < 19) {
      ffpmsg("input date string has illegal format:");
      ffpmsg(datestr);
      return (*status = 420);
    } else if (datestr[10] == 'T' && datestr[13] == ':' && datestr[16] == ':') {
      if (isdigit((int)datestr[11]) && isdigit((int)datestr[12]) && isdigit((int)datestr[14]) && isdigit((int)datestr[15]) && isdigit((int)datestr[17]) && isdigit((int)datestr[18])) {
        if (slen > 19 && datestr[19] != '.') {
          ffpmsg("input date string has illegal format:");
          ffpmsg(datestr);
          return (*status = 420);
        }
        if (hour)
          *hour = atoi(&datestr[11]);
        if (minute)
          *minute = atoi(&datestr[14]);
        if (second)
          *second = atof(&datestr[17]);
      } else {
        ffpmsg("input date string has illegal format:");
        ffpmsg(datestr);
        return (*status = 420);
      }
    }
  } else {
    if (year)
      *year = 0;
    if (month)
      *month = 0;
    if (day)
      *day = 0;
    if (datestr[2] == ':' && datestr[5] == ':') {
      if (isdigit((int)datestr[0]) && isdigit((int)datestr[1]) && isdigit((int)datestr[3]) && isdigit((int)datestr[4]) && isdigit((int)datestr[6]) && isdigit((int)datestr[7])) {
        if (hour)
          *hour = atoi(&datestr[0]);
        if (minute)
          *minute = atoi(&datestr[3]);
        if (second)
          *second = atof(&datestr[6]);
      } else {
        ffpmsg("input date string has illegal format:");
        ffpmsg(datestr);
        return (*status = 420);
      }
    } else {
      ffpmsg("input date string has illegal format:");
      ffpmsg(datestr);
      return (*status = 420);
    }
  }
  if (hour)
    if (*hour < 0 || *hour > 23) {
      sprintf(errmsg, "hour value is out of range 0 - 23: %d (ffs2tm)", *hour);
      ffpmsg(errmsg);
      return (*status = 420);
    }
  if (minute)
    if (*minute < 0 || *minute > 59) {
      sprintf(errmsg, "minute value is out of range 0 - 59: %d (ffs2tm)", *minute);
      ffpmsg(errmsg);
      return (*status = 420);
    }
  if (second)
    if (*second < 0 || *second >= 61.) {
      sprintf(errmsg, "second value is out of range 0 - 60.9999: %f (ffs2tm)", *second);
      ffpmsg(errmsg);
      return (*status = 420);
    }
  return (*status);
}
```