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

```asm
<parseISO8601Date>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x24(%rbp)
  movl   $0x0,-0x20(%rbp)
  cmpq   $0x0,-0x38(%rbp)
  jne    L146
  lea    D29(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L200
L146:
  lea    -0x29(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    $0x1,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x10(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  lea    D27(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strptime@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L73
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  jne    L284
  addq   $0x1,-0x18(%rbp)
L284:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L215
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L215
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  sub    $0x30,%eax
  mov    %al,-0x29(%rbp)
  addq   $0x1,-0x18(%rbp)
  jmp    L244
L215:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L244
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L244
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  add    %edx,%eax
  sub    $0x30,%eax
  mov    %al,-0x29(%rbp)
  addq   $0x2,-0x18(%rbp)
L244:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5a,%al
  jne    L76
  movl   $0x0,-0x24(%rbp)
  jmp    L170
L76:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2b,%al
  je     L78
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L170
L78:
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L170
  mov    -0x18(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L170
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    $0x2,%eax
  jle    L170
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  lea    -0x30(%rax),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  add    %edx,%eax
  imul   $0xe10,%eax,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x18(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  jne    L262
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L262
  mov    -0x18(%rbp),%rax
  add    $0x5,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L262
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  lea    -0x30(%rax),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x5,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  add    %edx,%eax
  imul   $0x3c,%eax,%eax
  add    %eax,-0x24(%rbp)
  jmp    L5
L262:
  mov    -0x18(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L5
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L5
  mov    -0x18(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  lea    -0x30(%rax),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  add    %edx,%eax
  imul   $0x3c,%eax,%eax
  add    %eax,-0x24(%rbp)
L5:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2b,%al
  jne    L205
  mov    $0x1,%edx
  jmp    L39
L205:
  mov    $0xffffffff,%edx
L39:
  mov    -0x24(%rbp),%eax
  imul   %edx,%eax
  mov    %eax,-0x24(%rbp)
L170:
  movl   $0x1,-0x20(%rbp)
L73:
  cmpl   $0x1,-0x20(%rbp)
  jne    L206
  lea    -0x29(%rbp),%rax
  mov    %rax,%rdi
  call   <mktime@plt>
  mov    %eax,-0x28(%rbp)
  mov    -0x28(%rbp),%eax
  cmp    $0xffffffff,%eax
  je     L110
  mov    -0x28(%rbp),%eax
  sub    -0x24(%rbp),%eax
  mov    %eax,-0x28(%rbp)
  lea    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <gmtime@plt>
  mov    %rax,%rdi
  call   <mktime@plt>
  mov    %eax,-0x1c(%rbp)
  mov    -0x28(%rbp),%eax
  mov    -0x28(%rbp),%ecx
  mov    -0x1c(%rbp),%edx
  sub    %ecx,%edx
  sub    %edx,%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x28(%rbp),%eax
  jmp    L200
L110:
  lea    D34(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L264
L206:
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L264:
  mov    $0xffffffff,%eax
L200:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L161
  call   <__stack_chk_fail@plt>
L161:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D29
data_type: string
name: unpack_data
arguments: data_tag: D27
data_type: string
name: unpack_data
arguments: data_tag: D34
data_type: string
name: unpack_data
arguments: data_tag: D3
data_type: string

tool: D29: Error date string is null.


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

tool: D34: Time conversion error: mktime failed.


tool: D3: Invalid ISO8601 date format.


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