user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<flu_parse_tstamp>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  mov    %esi,%ebx
  mov    $0x2d,%esi
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <strchr@plt>
  test   %rax,%rax
  je     L126
  lea    0x4(%rsp),%r13
  mov    %r12,%rdi
  xor    %ebp,%ebp
  mov    %r13,%rsi
  call   <ptime@plt>
  test   %eax,%eax
  jne    L58
L133:
  lea    D6(%rip),%r14
  mov    %r14,%rdi
  call   <getenv@plt>
  mov    $0x1,%edx
  lea    D14(%rip),%rsi
  mov    %r14,%rdi
  mov    %rax,%r12
  call   <setenv@plt>
  xor    %eax,%eax
  call   <tzset@plt>
  mov    %r13,%rdi
  call   <mktime@plt>
  mov    %eax,%r13d
  test   %r12,%r12
  je     L19
  mov    $0x1,%edx
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <setenv@plt>
L143:
  xor    %eax,%eax
  call   <tzset@plt>
L137:
  mov    $0x8,%esi
  mov    $0x1,%edi
  call   <calloc@plt>
  mov    %r13d,0x4(%rax)
  mov    %rax,%r12
  movl   $0x0,(%rax)
  test   %rbp,%rbp
  je     L39
  mov    %rbp,%rdi
  call   <strlen@plt>
  xor    %esi,%esi
  mov    $0xa,%edx
  mov    %rbp,%rdi
  mov    %rax,%r13
  call   <strtoll@plt>
  cmp    $0x3,%r13
  je     L121
  cmp    $0x6,%r13
  je     L68
L134:
  mov    %eax,(%r12)
L39:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L75
  add    $0x10,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L126:
  mov    $0x2e,%esi
  mov    %r12,%rdi
  mov    %rax,%rbp
  call   <strchr@plt>
  mov    $0x2e,%esi
  mov    %r12,%rdi
  mov    %rax,%r13
  call   <strrchr@plt>
  test   %r13,%r13
  je     L58
  cmp    %rax,%r13
  lea    0x4(%rsp),%r13
  lea    0x1(%rax),%rdx
  mov    %r12,%rdi
  mov    %r13,%rsi
  cmovne %rdx,%rbp
  call   <ptime@plt>
  test   %eax,%eax
  jne    L58
  test   %ebx,%ebx
  jne    L133
  mov    %r13,%rdi
  call   <mktime@plt>
  mov    %eax,%r13d
  jmp    L137
  nopl   0x0(%rax)
L68:
  imul   $0x3e8,%eax,%eax
  jmp    L134
  nopl   0x0(%rax,%rax,1)
L19:
  mov    %r14,%rdi
  call   <unsetenv@plt>
  jmp    L143
  nopl   (%rax)
L58:
  xor    %r12d,%r12d
  jmp    L39
L121:
  imul   $0xf4240,%eax,%eax
  mov    %eax,(%r12)
  jmp    L39
L75:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D6
type: string
name: disassemble_data
arguments: tag: D14
type: string

tool: D6: TZ

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