user: Converte this assembly snippet into its equivalent C code:

```asm
<ffs2tm>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xb0,%rsp
  mov    %rdi,-0x78(%rbp)
  mov    %rsi,-0x80(%rbp)
  mov    %rdx,-0x88(%rbp)
  mov    %rcx,-0x90(%rbp)
  mov    %r8,-0x98(%rbp)
  mov    %r9,-0xa0(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0xa8(%rbp)
  mov    0x18(%rbp),%rax
  mov    %rax,-0xb0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0xb0(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jle    L269
  mov    -0xb0(%rbp),%rax
  mov    (%rax),%eax
  jmp    L539
L269:
  cmpq   $0x0,-0x78(%rbp)
  jne    L376
  lea    D80(%rip),%rax
  mov    %rax,%rdi
  call   <ffpmsg@plt>
  mov    -0xb0(%rbp),%rax
  movl   $0x1a4,(%rax)
  mov    -0xb0(%rbp),%rax
  mov    (%rax),%eax
  jmp    L539
L376:
  cmpq   $0x0,-0x98(%rbp)
  je     L150
  mov    -0x98(%rbp),%rax
  movl   $0x0,(%rax)
L150:
  cmpq   $0x0,-0xa0(%rbp)
  je     L113
  mov    -0xa0(%rbp),%rax
  movl   $0x0,(%rax)
L113:
  cmpq   $0x0,-0xa8(%rbp)
  je     L318
  mov    -0xa8(%rbp),%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
L318:
  mov    -0x78(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  je     L625
  mov    -0x78(%rbp),%rax
  add    $0x4,%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L480
L625:
  mov    -0xb0(%rbp),%rdi
  mov    -0x90(%rbp),%rcx
  mov    -0x88(%rbp),%rdx
  mov    -0x80(%rbp),%rsi
  mov    -0x78(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <ffs2dt@plt>
  test   %rax,%rax
  jle    L47
  mov    -0xb0(%rbp),%rax
  mov    (%rax),%eax
  jmp    L539
L47:
  mov    -0x78(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x64(%rbp)
  cmpl   $0x8,-0x64(%rbp)
  je     L357
  cmpl   $0xa,-0x64(%rbp)
  jne    L379
L357:
  mov    -0xb0(%rbp),%rax
  mov    (%rax),%eax
  jmp    L539
L379:
  cmpl   $0x12,-0x64(%rbp)
  jg     L587
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <ffpmsg@plt>
  mov    -0x78(%rbp),%rax
  mov    %rax,%rdi
  call   <ffpmsg@plt>
  mov    -0xb0(%rbp),%rax
  movl   $0x1a4,(%rax)
  mov    -0xb0(%rbp),%rax
  mov    (%rax),%eax
  jmp    L539
L587:
  mov    -0x78(%rbp),%rax
  add    $0xa,%rax
  movzbl (%rax),%eax
  cmp    $0x54,%al
  jne    L347
  mov    -0x78(%rbp),%rax
  add    $0xd,%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  jne    L347
  mov    -0x78(%rbp),%rax
  add    $0x10,%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  jne    L347
  mov    -0x78(%rbp),%rax
  add    $0xb,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L20
  mov    -0x78(%rbp),%rax
  add    $0xc,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L20
  mov    -0x78(%rbp),%rax
  add    $0xe,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L20
  mov    -0x78(%rbp),%rax
  add    $0xf,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L20
  mov    -0x78(%rbp),%rax
  add    $0x11,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L20
  mov    -0x78(%rbp),%rax
  add    $0x12,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L20
  cmpl   $0x13,-0x64(%rbp)
  jle    L131
  mov    -0x78(%rbp),%rax
  add    $0x13,%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  je     L131
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <ffpmsg@plt>
  mov    -0x78(%rbp),%rax
  mov    %rax,%rdi
  call   <ffpmsg@plt>
  mov    -0xb0(%rbp),%rax
  movl   $0x1a4,(%rax)
  mov    -0xb0(%rbp),%rax
  mov    (%rax),%eax
  jmp    L539
L131:
  cmpq   $0x0,-0x98(%rbp)
  je     L167
  mov    -0x78(%rbp),%rax
  add    $0xb,%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    -0x98(%rbp),%rdx
  mov    %eax,(%rdx)
L167:
  cmpq   $0x0,-0xa0(%rbp)
  je     L471
  mov    -0x78(%rbp),%rax
  add    $0xe,%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    -0xa0(%rbp),%rdx
  mov    %eax,(%rdx)
L471:
  cmpq   $0x0,-0xa8(%rbp)
  je     L485
  mov    -0x78(%rbp),%rax
  add    $0x11,%rax
  mov    %rax,%rdi
  call   <atof@plt>
  movq   %xmm0,%rax
  mov    -0xa8(%rbp),%rdx
  mov    %rax,(%rdx)
  jmp    L485
L20:
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <ffpmsg@plt>
  mov    -0x78(%rbp),%rax
  mov    %rax,%rdi
  call   <ffpmsg@plt>
  mov    -0xb0(%rbp),%rax
  movl   $0x1a4,(%rax)
  mov    -0xb0(%rbp),%rax
  mov    (%rax),%eax
  jmp    L539
L485:
  jmp    L347
L480:
  cmpq   $0x0,-0x80(%rbp)
  je     L391
  mov    -0x80(%rbp),%rax
  movl   $0x0,(%rax)
L391:
  cmpq   $0x0,-0x88(%rbp)
  je     L441
  mov    -0x88(%rbp),%rax
  movl   $0x0,(%rax)
L441:
  cmpq   $0x0,-0x90(%rbp)
  je     L640
  mov    -0x90(%rbp),%rax
  movl   $0x0,(%rax)
L640:
  mov    -0x78(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  jne    L220
  mov    -0x78(%rbp),%rax
  add    $0x5,%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  jne    L220
  mov    -0x78(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L372
  mov    -0x78(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L372
  mov    -0x78(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L372
  mov    -0x78(%rbp),%rax
  add    $0x4,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L372
  mov    -0x78(%rbp),%rax
  add    $0x6,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L372
  mov    -0x78(%rbp),%rax
  add    $0x7,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L372
  cmpq   $0x0,-0x98(%rbp)
  je     L368
  mov    -0x78(%rbp),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    -0x98(%rbp),%rdx
  mov    %eax,(%rdx)
L368:
  cmpq   $0x0,-0xa0(%rbp)
  je     L32
  mov    -0x78(%rbp),%rax
  add    $0x3,%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    -0xa0(%rbp),%rdx
  mov    %eax,(%rdx)
L32:
  cmpq   $0x0,-0xa8(%rbp)
  je     L341
  mov    -0x78(%rbp),%rax
  add    $0x6,%rax
  mov    %rax,%rdi
  call   <atof@plt>
  movq   %xmm0,%rax
  mov    -0xa8(%rbp),%rdx
  mov    %rax,(%rdx)
  jmp    L341
L372:
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <ffpmsg@plt>
  mov    -0x78(%rbp),%rax
  mov    %rax,%rdi
  call   <ffpmsg@plt>
  mov    -0xb0(%rbp),%rax
  movl   $0x1a4,(%rax)
  mov    -0xb0(%rbp),%rax
  mov    (%rax),%eax
  jmp    L539
L341:
  jmp    L174
L220:
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  call   <ffpmsg@plt>
  mov    -0x78(%rbp),%rax
  mov    %rax,%rdi
  call   <ffpmsg@plt>
  mov    -0xb0(%rbp),%rax
  movl   $0x1a4,(%rax)
  mov    -0xb0(%rbp),%rax
  mov    (%rax),%eax
  jmp    L539
L347:
  nop
L174:
  cmpq   $0x0,-0x98(%rbp)
  je     L63
  mov    -0x98(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  js     L599
  mov    -0x98(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x17,%eax
  jle    L63
L599:
  mov    -0x98(%rbp),%rax
  mov    (%rax),%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  movq   %xmm2,%rdx
  lea    -0x60(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D36(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  lea    -0x60(%rbp),%rax
  mov    %rax,%rdi
  call   <ffpmsg@plt>
  mov    -0xb0(%rbp),%rax
  movl   $0x1a4,(%rax)
  mov    -0xb0(%rbp),%rax
  mov    (%rax),%eax
  jmp    L539
L63:
  cmpq   $0x0,-0xa0(%rbp)
  je     L182
  mov    -0xa0(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  js     L82
  mov    -0xa0(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x3b,%eax
  jle    L182
L82:
  mov    -0xa0(%rbp),%rax
  mov    (%rax),%eax
  pxor   %xmm3,%xmm3
  cvtsi2sd %eax,%xmm3
  movq   %xmm3,%rdx
  lea    -0x60(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D22(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  lea    -0x60(%rbp),%rax
  mov    %rax,%rdi
  call   <ffpmsg@plt>
  mov    -0xb0(%rbp),%rax
  movl   $0x1a4,(%rax)
  mov    -0xb0(%rbp),%rax
  mov    (%rax),%eax
  jmp    L539
L182:
  cmpq   $0x0,-0xa8(%rbp)
  je     L151
  mov    -0xa8(%rbp),%rax
  movsd  (%rax),%xmm1
  pxor   %xmm0,%xmm0
  comisd %xmm1,%xmm0
  ja     L222
  mov    -0xa8(%rbp),%rax
  movsd  (%rax),%xmm0
  comisd D11(%rip),%xmm0
  jb     L151
L222:
  mov    -0xa8(%rbp),%rax
  mov    (%rax),%rdx
  lea    -0x60(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D93(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  lea    -0x60(%rbp),%rax
  mov    %rax,%rdi
  call   <ffpmsg@plt>
  mov    -0xb0(%rbp),%rax
  movl   $0x1a4,(%rax)
  mov    -0xb0(%rbp),%rax
  mov    (%rax),%eax
  jmp    L539
L151:
  mov    -0xb0(%rbp),%rax
  mov    (%rax),%eax
L539:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L525
  call   <__stack_chk_fail@plt>
L525:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D80
data_type: string
name: extract_symbolic_data
arguments: data_tag: D47
data_type: string
name: extract_symbolic_data
arguments: data_tag: D36
data_type: string
name: extract_symbolic_data
arguments: data_tag: D22
data_type: string
name: extract_symbolic_data
arguments: data_tag: D11
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D93
data_type: string

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

tool: D47: input date string has illegal format:

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

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

tool: D11: 61

tool: D93: 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);
}
```