user: 请从给定的汇编指令推导出C源代码：

```asm
<parseISO8601Date>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  test   %rdi,%rdi
  je     L234
  lea    0x3(%rsp),%rbp
  mov    %rdi,%r12
  mov    $0x1,%edx
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <memset@plt>
  mov    %r12,%rdi
  mov    %rbp,%rdx
  lea    D28(%rip),%rsi
  call   <strptime@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L145
  movsbl (%rax),%edi
  cmp    $0x3a,%dil
  jne    L183
  movsbl 0x1(%rax),%edi
  add    $0x1,%r12
L183:
  call   <isdigit@plt>
  test   %rax,%rax
  je     L55
  movsbl 0x1(%r12),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L55
  movzbl (%r12),%eax
  add    $0x1,%r12
  sub    $0x30,%eax
  mov    %al,0x3(%rsp)
L249:
  movzbl (%r12),%eax
  cmp    $0x5a,%al
  je     L152
  sub    $0x2b,%eax
  test   $0xfd,%al
  je     L111
L152:
  xor    %ebx,%ebx
L166:
  mov    %rbp,%rdi
  call   <mktime@plt>
  mov    %eax,0x4(%rsp)
  mov    %eax,%r12d
  cmp    $0xffffffff,%eax
  je     L173
  sub    %ebx,%r12d
  lea    0x4(%rsp),%rdi
  mov    %r12d,0x4(%rsp)
  call   <gmtime@plt>
  mov    %rax,%rdi
  call   <mktime@plt>
  mov    0x4(%rsp),%r12d
  sub    %r12d,%eax
  sub    %eax,%r12d
L219:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L161
  add    $0x10,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L55:
  movsbl (%r12),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L249
  movsbl 0x1(%r12),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L249
  movsbl (%r12),%eax
  movzbl 0x1(%r12),%edx
  add    $0x2,%r12
  lea    0x10(%rax,%rax,4),%eax
  lea    -0x30(%rdx,%rax,2),%eax
  mov    %al,0x3(%rsp)
  jmp    L249
  nopw   0x0(%rax,%rax,1)
L111:
  movsbl 0x1(%r12),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L152
  movsbl 0x2(%r12),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L152
  mov    %r12,%rdi
  call   <strlen@plt>
  cmp    $0x2,%eax
  jle    L152
  movsbl 0x1(%r12),%eax
  lea    -0xf0(%rax,%rax,4),%edx
  movsbl 0x2(%r12),%eax
  lea    -0x30(%rax,%rdx,2),%ebx
  movzbl 0x3(%r12),%eax
  imul   $0xe10,%ebx,%ebx
  cmp    $0x3a,%al
  je     L134
L233:
  movsbl %al,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L46
L181:
  mov    %ebx,%eax
  neg    %eax
  cmpb   $0x2b,(%r12)
  cmovne %eax,%ebx
  jmp    L166
  xchg   %ax,%ax
L173:
  lea    D13(%rip),%rdi
  call   <printf@plt>
  jmp    L219
L145:
  lea    D24(%rip),%rdi
  mov    $0xffffffff,%r12d
  call   <printf@plt>
  jmp    L219
L234:
  lea    D12(%rip),%rdi
  mov    $0xffffffff,%r12d
  call   <printf@plt>
  jmp    L219
L134:
  movsbl 0x4(%r12),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L239
L179:
  movzbl 0x3(%r12),%eax
  jmp    L233
L46:
  movsbl 0x4(%r12),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L181
  movsbl 0x3(%r12),%eax
  lea    -0xf0(%rax,%rax,4),%edx
  movsbl 0x4(%r12),%eax
  lea    -0x30(%rax,%rdx,2),%eax
  imul   $0x3c,%eax,%eax
  add    %eax,%ebx
  jmp    L181
L239:
  movsbl 0x5(%r12),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L179
  movsbl 0x4(%r12),%eax
  movsbl 0x5(%r12),%edx
  sub    $0x30,%eax
  imul   $0xa,%eax,%eax
  lea    -0x30(%rax,%rdx,1),%eax
  imul   $0x3c,%eax,%eax
  add    %eax,%ebx
  jmp    L181
L161:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D28
datatype: string
name: retrieve_data
arguments: data_label: D13
datatype: string
name: retrieve_data
arguments: data_label: D24
datatype: string
name: retrieve_data
arguments: data_label: D12
datatype: string

tool: D28: %t%Y-%m-%dT%H:%M%t

tool: D13: Time conversion error: mktime failed.


tool: D24: Invalid ISO8601 date format.


tool: D12: Error date string is null.


assistant: ```c
time_t parseISO8601Date(char *date) {
  struct tm tm_t;
  struct tm *tm_p;
  time_t t, t2, offset = 0;
  int success = 0;
  char *pos;
  if (date == NULL) {
    printf("Error date string is null.\n");
    return (time_t)-1;
  }
  tm_p = &tm_t;
  memset(tm_p, 0, sizeof(struct tm));
  pos = (char *)strptime((const char *)date, (const char *)"%t%Y-%m-%dT%H:%M%t", tm_p);
  if (pos != NULL) {
    if (*pos == ':') {
      pos++;
    }
    if (isdigit(pos[0]) && !isdigit(pos[1])) {
      tm_t.tm_sec = pos[0] - '0';
      pos++;
    } else if (isdigit(pos[0]) && isdigit(pos[1])) {
      tm_t.tm_sec = 10 * (pos[0] - '0') + pos[1] - '0';
      pos += 2;
    }
    if (*pos == 'Z') {
      offset = 0;
    } else if ((*pos == '+' || *pos == '-') && isdigit(pos[1]) && isdigit(pos[2]) && strlen(pos) >= 3) {
      offset = (10 * (pos[1] - '0') + (pos[2] - '0')) * 60 * 60;
      if (pos[3] == ':' && isdigit(pos[4]) && isdigit(pos[5])) {
        offset += (10 * (pos[4] - '0') + (pos[5] - '0')) * 60;
      } else if (isdigit(pos[3]) && isdigit(pos[4])) {
        offset += (10 * (pos[3] - '0') + (pos[4] - '0')) * 60;
      }
      offset *= (pos[0] == '+') ? 1 : -1;
    }
    success = 1;
  }
  if (1 == success) {
    t = mktime(&tm_t);
    if (t != (time_t)(-1)) {
      t = t - offset;
      t2 = mktime(gmtime(&t));
      t = t - (t2 - t);
      return t;
    } else {
      printf("Time conversion error: mktime failed.\n");
    }
  } else {
    printf("Invalid ISO8601 date format.\n");
  }
  return (time_t)-1;
}
```