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     L48
  lea    0x4(%rsp),%r13
  mov    %r12,%rdi
  xor    %ebp,%ebp
  mov    %r13,%rsi
  call   <ptime@plt>
  test   %eax,%eax
  jne    L59
L119:
  lea    D5(%rip),%r14
  mov    %r14,%rdi
  call   <getenv@plt>
  mov    $0x1,%edx
  lea    D3(%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     L46
  mov    $0x1,%edx
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <setenv@plt>
L97:
  xor    %eax,%eax
  call   <tzset@plt>
L106:
  mov    $0x8,%esi
  mov    $0x1,%edi
  call   <calloc@plt>
  mov    %r13d,0x4(%rax)
  mov    %rax,%r12
  movl   $0x0,(%rax)
  test   %rbp,%rbp
  je     L86
  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     L103
  cmp    $0x6,%r13
  je     L76
L112:
  mov    %eax,(%r12)
L86:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L113
  add    $0x10,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L48:
  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     L59
  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    L59
  test   %ebx,%ebx
  jne    L119
  mov    %r13,%rdi
  call   <mktime@plt>
  mov    %eax,%r13d
  jmp    L106
  nopl   0x0(%rax)
L76:
  imul   $0x3e8,%eax,%eax
  jmp    L112
  nopl   0x0(%rax,%rax,1)
L46:
  mov    %r14,%rdi
  call   <unsetenv@plt>
  jmp    L97
  nopl   (%rax)
L59:
  xor    %r12d,%r12d
  jmp    L86
L103:
  imul   $0xf4240,%eax,%eax
  mov    %eax,(%r12)
  jmp    L86
L113:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D5
type_guessed: string
name: retrieve_data
arguments: data_tag: D3
type_guessed: string

tool: D5: TZ

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