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

```asm
<flu_parse_tstamp>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %esi,-0x5c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x38(%rbp)
  mov    -0x58(%rbp),%rax
  mov    $0x2d,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L34
  movl   $0x1,-0x5c(%rbp)
  jmp    L1
L34:
  mov    -0x58(%rbp),%rax
  mov    $0x2e,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x58(%rbp),%rax
  mov    $0x2e,%esi
  mov    %rax,%rdi
  call   <strrchr@plt>
  mov    %rax,-0x20(%rbp)
  cmpq   $0x0,-0x28(%rbp)
  jne    L14
  mov    $0x0,%eax
  jmp    L98
L14:
  mov    -0x28(%rbp),%rax
  cmp    -0x20(%rbp),%rax
  je     L1
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x38(%rbp)
L1:
  lea    -0x44(%rbp),%rdx
  mov    -0x58(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <ptime@plt>
  mov    %eax,-0x40(%rbp)
  cmpl   $0x0,-0x40(%rbp)
  je     L107
  mov    $0x0,%eax
  jmp    L98
L107:
  movq   $0x0,-0x30(%rbp)
  cmpl   $0x0,-0x5c(%rbp)
  je     L125
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  call   <getenv@plt>
  mov    %rax,-0x30(%rbp)
  mov    $0x1,%edx
  lea    D23(%rip),%rax
  mov    %rax,%rsi
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  call   <setenv@plt>
  mov    $0x0,%eax
  call   <tzset@plt>
L125:
  lea    -0x44(%rbp),%rax
  mov    %rax,%rdi
  call   <mktime@plt>
  mov    %eax,-0x3c(%rbp)
  cmpl   $0x0,-0x5c(%rbp)
  je     L147
  cmpq   $0x0,-0x30(%rbp)
  jne    L6
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  call   <unsetenv@plt>
  jmp    L31
L6:
  mov    -0x30(%rbp),%rax
  mov    $0x1,%edx
  mov    %rax,%rsi
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  call   <setenv@plt>
L31:
  mov    $0x0,%eax
  call   <tzset@plt>
L147:
  mov    $0x8,%esi
  mov    $0x1,%edi
  call   <calloc@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    -0x3c(%rbp),%edx
  mov    %edx,0x4(%rax)
  mov    -0x18(%rbp),%rax
  movl   $0x0,(%rax)
  cmpq   $0x0,-0x38(%rbp)
  je     L109
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x38(%rbp),%rax
  mov    $0xa,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <strtoll@plt>
  mov    -0x18(%rbp),%rdx
  mov    %eax,(%rdx)
  cmpq   $0x3,-0x10(%rbp)
  jne    L61
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  imul   $0xf4240,%eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
  jmp    L109
L61:
  cmpq   $0x6,-0x10(%rbp)
  jne    L109
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  imul   $0x3e8,%eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
L109:
  mov    -0x18(%rbp),%rax
L98:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L102
  call   <__stack_chk_fail@plt>
L102:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D16
datatype: string
name: disassemble_data
arguments: tag: D23
datatype: string

tool: D16: TZ

tool: D23: UTC

assistant: ```c
struct timespec *flu_parse_tstamp(char *s, int utc) {
  struct tm tm;
  char *subseconds = NULL;
  if (strchr(s, '-')) {
    utc = 1;
  } else {
    char *a = strchr(s, '.');
    char *b = strrchr(s, '.');
    if (a == NULL)
      return NULL;
    if (a != b)
      subseconds = b + 1;
  }
  int r = ptime(s, &tm);
  if (r != 0)
    return NULL;
  char *tz = NULL;
  if (utc) {
    tz = getenv("TZ");
    setenv("TZ", "UTC", 1);
    tzset();
  }
  time_t t = mktime(&tm);
  if (utc) {
    if (!tz)
      unsetenv("TZ");
    else
      setenv("TZ", tz, 1);
    tzset();
  }
  struct timespec *ts = calloc(1, sizeof(struct timespec));
  ts->tv_sec = t;
  ts->tv_nsec = 0;
  if (subseconds) {
    size_t st = strlen(subseconds);
    ts->tv_nsec = strtoll(subseconds, NULL, 10);
    if (st == 3)
      ts->tv_nsec = ts->tv_nsec * 1000 * 1000;
    else if (st == 6)
      ts->tv_nsec = ts->tv_nsec * 1000;
  }
  return ts;
}
```