user: 请将以下的汇编代码转换成C语言代码：

```asm
<ffs2tm>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    0xa8(%rsp),%r13
  mov    0xa0(%rsp),%r14
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  mov    0x0(%r13),%eax
  test   %eax,%eax
  jg     L457
  mov    %rdi,%rbp
  test   %rdi,%rdi
  je     L319
  mov    %r8,%rbx
  mov    %r9,%r12
  test   %r8,%r8
  je     L471
  movl   $0x0,(%r8)
L471:
  test   %r12,%r12
  je     L379
  movl   $0x0,(%r12)
L379:
  test   %r14,%r14
  je     L197
  movq   $0x0,(%r14)
L197:
  cmpb   $0x2f,0x2(%rbp)
  je     L219
  cmpb   $0x2d,0x4(%rbp)
  je     L219
  test   %rsi,%rsi
  je     L216
  movl   $0x0,(%rsi)
L216:
  test   %rdx,%rdx
  je     L463
  movl   $0x0,(%rdx)
L463:
  test   %rcx,%rcx
  je     L46
  movl   $0x0,(%rcx)
L46:
  cmpb   $0x3a,0x2(%rbp)
  jne    L157
  cmpb   $0x3a,0x5(%rbp)
  je     L98
L157:
  lea    D2(%rip),%rdi
  call   <ffpmsg@plt>
  mov    %rbp,%rdi
  call   <ffpmsg@plt>
  movl   $0x1a4,0x0(%r13)
  mov    $0x1a4,%eax
L457:
  mov    0x58(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L422
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L219:
  mov    %r13,%r8
  mov    %rbp,%rdi
  call   <ffs2dt@plt>
  test   %rax,%rax
  jle    L446
L119:
  mov    0x0(%r13),%eax
  jmp    L457
  nopw   0x0(%rax,%rax,1)
L98:
  movsbl 0x0(%rbp),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L157
  movsbl 0x1(%rbp),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L157
  movsbl 0x3(%rbp),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L157
  movsbl 0x4(%rbp),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L157
  movsbl 0x6(%rbp),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L157
  movsbl 0x7(%rbp),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L157
  test   %rbx,%rbx
  je     L511
  mov    %rbp,%rdi
  call   <atoi@plt>
  mov    %eax,(%rbx)
L511:
  test   %r12,%r12
  je     L499
  lea    0x3(%rbp),%rdi
  call   <atoi@plt>
  mov    %eax,(%r12)
L499:
  test   %r14,%r14
  je     L209
  lea    0x6(%rbp),%rdi
  call   <atof@plt>
  movsd  %xmm0,(%r14)
  nopl   0x0(%rax,%rax,1)
L209:
  test   %rbx,%rbx
  je     L360
  mov    (%rbx),%eax
  cmp    $0x17,%eax
  jbe    L360
  pxor   %xmm0,%xmm0
  mov    %rsp,%rbp
  lea    D38(%rip),%rsi
  cvtsi2sd %eax,%xmm0
L346:
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <ffpmsg@plt>
  movl   $0x1a4,0x0(%r13)
  mov    $0x1a4,%eax
  jmp    L457
  nopl   0x0(%rax,%rax,1)
L446:
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %eax,%r15d
  and    $0xfffffffd,%eax
  cmp    $0x8,%eax
  je     L119
  cmp    $0x12,%r15d
  jle    L157
  cmpb   $0x54,0xa(%rbp)
  jne    L209
  cmpb   $0x3a,0xd(%rbp)
  jne    L209
  cmpb   $0x3a,0x10(%rbp)
  jne    L209
  movsbl 0xb(%rbp),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L157
  movsbl 0xc(%rbp),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L157
  movsbl 0xe(%rbp),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L157
  movsbl 0xf(%rbp),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L157
  movsbl 0x11(%rbp),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L157
  movsbl 0x12(%rbp),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L157
  cmp    $0x13,%r15d
  je     L283
  cmpb   $0x2e,0x13(%rbp)
  jne    L157
L283:
  test   %rbx,%rbx
  je     L411
  lea    0xb(%rbp),%rdi
  call   <atoi@plt>
  mov    %eax,(%rbx)
L411:
  test   %r12,%r12
  je     L344
  lea    0xe(%rbp),%rdi
  call   <atoi@plt>
  mov    %eax,(%r12)
L344:
  test   %r14,%r14
  je     L209
  lea    0x11(%rbp),%rdi
  call   <atof@plt>
  movsd  %xmm0,(%r14)
  jmp    L209
  nopl   0x0(%rax)
L360:
  test   %r12,%r12
  je     L350
  mov    (%r12),%eax
  cmp    $0x3b,%eax
  jbe    L350
  pxor   %xmm0,%xmm0
  mov    %rsp,%rbp
  lea    D31(%rip),%rsi
  cvtsi2sd %eax,%xmm0
  jmp    L346
  nopl   (%rax)
L350:
  test   %r14,%r14
  je     L119
  movsd  (%r14),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm0,%xmm1
  ja     L188
  comisd D15(%rip),%xmm0
  jb     L119
L188:
  mov    %rsp,%rbp
  lea    D20(%rip),%rsi
  jmp    L346
  nopl   (%rax)
L319:
  lea    D13(%rip),%rdi
  call   <ffpmsg@plt>
  movl   $0x1a4,0x0(%r13)
  mov    $0x1a4,%eax
  jmp    L457
L422:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D2
type_infered: string
name: unpack_data
arguments: label: D38
type_infered: string
name: unpack_data
arguments: label: D31
type_infered: string
name: unpack_data
arguments: label: D15
type_infered: f64
name: unpack_data
arguments: label: D20
type_infered: string
name: unpack_data
arguments: label: D13
type_infered: string

tool: D2: input date string has illegal format:

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

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

tool: D15: 61

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

tool: D13: error: null input date string (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);
}
```