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

```asm
<timeparse>:
  endbr64
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <atoi@plt>
  mov    %rax,%rdi
  mov    %rax,%r14
  call   <dbtget@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L112
L1:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L72
  add    $0x10,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nop
L112:
  xor    %edi,%edi
  lea    0x4(%rsp),%r12
  call   <dbtgetnxt@plt>
  xor    %esi,%esi
  mov    $0x4,%edx
  mov    %r12,%rdi
  mov    %rax,%rbp
  call   <memset@plt>
  test   %rbp,%rbp
  je     L113
L43:
  mov    %r12,%rdx
  lea    D55(%rip),%rsi
  mov    %r13,%rdi
  call   <strptime@plt>
  test   %eax,%eax
  je     L106
L46:
  mov    %r12,%rdi
  mov    %rbp,%r12
  call   <mktime@plt>
  mov    %rax,%r13
  jmp    L40
  nopl   (%rax)
L74:
  mov    %rbp,%rdi
  call   <dbtgett@plt>
  mov    %r12,%rdi
  mov    %rax,%rbx
  call   <dbtgett@plt>
  mov    %rax,%r8
  mov    %rbx,%rax
  sub    %r13,%rax
  mov    %rax,%rcx
  neg    %rcx
  cmovs  %rax,%rcx
  mov    %r8,%rax
  sub    %r13,%rax
  mov    %rax,%rdx
  neg    %rdx
  cmovns %rdx,%rax
  cmp    %rax,%rcx
  cmovl  %rbp,%r12
L40:
  mov    %rbp,%rdi
  call   <dbtgetnxt@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  jne    L74
  jmp    L1
  nopw   0x0(%rax,%rax,1)
L106:
  mov    %r12,%rdx
  lea    D42(%rip),%rsi
  mov    %r13,%rdi
  call   <strptime@plt>
  test   %eax,%eax
  jne    L46
  mov    %r12,%rdx
  lea    D10(%rip),%rsi
  mov    %r13,%rdi
  call   <strptime@plt>
  test   %eax,%eax
  jne    L46
  mov    %r12,%rdx
  lea    D39(%rip),%rsi
  mov    %r13,%rdi
  call   <strptime@plt>
  test   %eax,%eax
  jne    L46
  mov    %r14,%rcx
  mov    %r13,%rdx
  mov    $0x1,%edi
  lea    D43(%rip),%rsi
  call   <error@plt>
  jmp    L46
  nopw   0x0(%rax,%rax,1)
L113:
  mov    %r14,%rcx
  mov    %r13,%rdx
  mov    $0x1,%edi
  lea    D29(%rip),%rsi
  call   <error@plt>
  jmp    L43
L72:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D55
type: string
name: parse_data
arguments: data_tag: D42
type: string
name: parse_data
arguments: data_tag: D10
type: string
name: parse_data
arguments: data_tag: D39
type: string
name: parse_data
arguments: data_tag: D43
type: string
name: parse_data
arguments: data_tag: D29
type: string

tool: D55: %y-%m-%d %H:%M

tool: D42: %y-%m-%d

tool: D10: %y-%m

tool: D39: %y

tool: D43: time not parseable: '%s' -> %li


tool: D29: not time found: '%s' -> %li


assistant: ```c
struct dbt *timeparse(const char *stime) {
  time_t t = atoi(stime);
  struct dbt *dt = dbtget(t);
  if (!dt) {
    struct tm tm;
    struct dbt *dti = dt = dbtgetnxt(NULL);
    memset(&tm, 0, sizeof(struct tm));
    if (!dt)
      error(1, "not time found: '%s' -> %li\n", stime, t);
    if (!strptime(stime, "%y-%m-%d %H:%M", &tm) && !strptime(stime, "%y-%m-%d", &tm) && !strptime(stime, "%y-%m", &tm) && !strptime(stime, "%y", &tm))
      error(1, "time not parseable: '%s' -> %li\n", stime, t);
    t = mktime(&tm);
    while ((dti = dbtgetnxt(dti)))
      if (labs((long)dbtgett(dti) - (long)t) < labs((long)dbtgett(dt) - (long)t))
        dt = dti;
  }
  return dt;
}
```