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

```asm
<timestamp>:
  endbr64
  push   %r15
  push   %r14
  lea    D38(%rip),%r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  mov    %esi,%ebx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x14(%rsp),%r12
  movl   $0x0,0x14(%rsp)
  mov    %r12,%rdi
  movl   $0x0,0x18(%rsp)
  movl   $0x0,0x1c(%rsp)
  movl   $0x0,0x20(%rsp)
  movl   $0x0,0x24(%rsp)
  movb   $0x0,D38(%rip)
  call   <time@plt>
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <localtime@plt>
  lea    0x18(%rsp),%rsi
  lea    0x1c(%rsp),%r8
  mov    0x20(%rax),%edi
  mov    0x28(%rax),%rdx
  mov    (%rax),%r13
  mov    0x8(%rax),%r12
  lea    0x1(%rdi),%ecx
  mov    %ebp,%edi
  mov    %ecx,0x20(%rsp)
  mov    0x18(%rax),%rcx
  mov    %ecx,0x24(%rsp)
  mov    0x10(%rax),%rcx
  lea    0x76c(%rdx),%eax
  lea    0x20(%rsp),%rdx
  mov    %eax,0x18(%rsp)
  xor    %eax,%eax
  mov    %ecx,0x1c(%rsp)
  lea    0x24(%rsp),%rcx
  call   <tzadjust@plt>
  mov    0x1c(%rsp),%edx
  cmp    $0x17,%edx
  ja     L114
  mov    0x24(%rsp),%r15d
  lea    -0x1(%r15),%eax
  cmp    $0x1e,%eax
  jbe    L53
L114:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L138
  add    $0x38,%rsp
  mov    %r14,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L53:
  mov    0x20(%rsp),%esi
  lea    -0x1(%rsi),%eax
  cmp    $0xb,%eax
  ja     L114
  mov    0x18(%rsp),%ebp
  cmp    $0x7b4,%ebp
  jle    L114
  cmp    $0xb,%edx
  jg     L157
  test   %edx,%edx
  jne    L196
  movl   $0xc,0x1c(%rsp)
L196:
  cmp    $0x3,%ebx
  je     L36
  xor    %eax,%eax
  jmp    L215
  cs nopw 0x0(%rax,%rax,1)
L157:
  cmp    $0xc,%edx
  je     L174
  sub    $0xc,%edx
  mov    %edx,0x1c(%rsp)
  cmp    $0x3,%ebx
  je     L117
L29:
  mov    $0x1,%eax
L215:
  cmp    $0x3,%ebx
  jg     L122
  cmp    $0x1,%ebx
  je     L33
  cmp    $0x2,%ebx
  jne    L41
  test   %eax,%eax
  lea    D42(%rip),%rbx
  mov    0x1c(%rsp),%ecx
  movslq %esi,%rdx
  lea    D134(%rip),%rax
  mov    %ebp,%edi
  cmove  %rax,%rbx
  lea    D130(%rip),%rax
  mov    %ecx,0xc(%rsp)
  mov    (%rax,%rdx,8),%r14
  mov    %r15d,%edx
  xor    %eax,%eax
  call   <daynumber@plt>
  push   %rbx
  mov    %ebp,%r9d
  mov    %r15d,%r8d
  mov    %eax,%edx
  cltq
  push   %r13
  imul   $0xffffffff92492493,%rax,%rax
  mov    %edx,%esi
  push   %r12
  mov    0x24(%rsp),%ecx
  sar    $0x1f,%esi
  push   %rcx
  mov    %r14,%rcx
  lea    D38(%rip),%r14
  shr    $0x20,%rax
  mov    %r14,%rdi
  add    %edx,%eax
  sar    $0x2,%eax
  sub    %esi,%eax
  lea    0x0(,%rax,8),%esi
  sub    %eax,%esi
  mov    %edx,%eax
  lea    D122(%rip),%rdx
  sub    %esi,%eax
  lea    D163(%rip),%rsi
  cltq
  mov    (%rdx,%rax,8),%rdx
  xor    %eax,%eax
  call   <sprintf@plt>
  add    $0x20,%rsp
  jmp    L114
  nopl   0x0(%rax,%rax,1)
L36:
  mov    0x1c(%rsp),%edx
  lea    D134(%rip),%r9
L154:
  lea    D38(%rip),%r14
  mov    %r13d,%r8d
  mov    %r12d,%ecx
  xor    %eax,%eax
  lea    D51(%rip),%rsi
  mov    %r14,%rdi
  call   <sprintf@plt>
  jmp    L114
L174:
  cmp    $0x3,%ebx
  jne    L29
  nopw   0x0(%rax,%rax,1)
L117:
  lea    D42(%rip),%r9
  jmp    L154
  nopl   0x0(%rax)
L122:
  cmp    $0x4,%ebx
  jne    L41
  sub    $0x8,%rsp
  lea    D38(%rip),%r14
  mov    %esi,%edx
  mov    %r12d,%r9d
  push   %r13
  mov    0x2c(%rsp),%r8d
  mov    %r15d,%ecx
  mov    %r14,%rdi
  lea    D74(%rip),%rsi
  xor    %eax,%eax
  call   <sprintf@plt>
  pop    %rax
  pop    %rdx
  jmp    L114
  nopl   0x0(%rax,%rax,1)
L33:
  movslq %esi,%rdx
  lea    D130(%rip),%rax
  mov    %ebp,%edi
  mov    (%rax,%rdx,8),%r12
  mov    %r15d,%edx
  xor    %eax,%eax
  lea    D38(%rip),%r14
  call   <daynumber@plt>
  mov    %ebp,%r9d
  mov    %r15d,%r8d
  mov    %r14,%rdi
  movslq %eax,%rdx
  mov    %eax,%ecx
  lea    D156(%rip),%rsi
  imul   $0xffffffff92492493,%rdx,%rdx
  sar    $0x1f,%ecx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0x2,%edx
  sub    %ecx,%edx
  lea    0x0(,%rdx,8),%ecx
  sub    %edx,%ecx
  lea    D122(%rip),%rdx
  sub    %ecx,%eax
  mov    %r12,%rcx
  cltq
  mov    (%rdx,%rax,8),%rdx
  xor    %eax,%eax
  call   <sprintf@plt>
  jmp    L114
  nopw   0x0(%rax,%rax,1)
L41:
  test   %eax,%eax
  lea    D134(%rip),%rdx
  mov    %esi,%ecx
  mov    %r15d,%r8d
  lea    D42(%rip),%rax
  lea    D38(%rip),%r14
  cmove  %rdx,%rax
  sub    $0x8,%rsp
  mov    %ebp,%edx
  mov    %r14,%rdi
  lea    D40(%rip),%rsi
  push   %rax
  xor    %eax,%eax
  push   %r13
  push   %r12
  mov    0x3c(%rsp),%r9d
  call   <sprintf@plt>
  add    $0x20,%rsp
  jmp    L114
L138:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D42
data_type: string
name: parse_data
arguments: data_label: D134
data_type: string
name: parse_data
arguments: data_label: D163
data_type: string
name: parse_data
arguments: data_label: D51
data_type: string
name: parse_data
arguments: data_label: D74
data_type: string
name: parse_data
arguments: data_label: D156
data_type: string
name: parse_data
arguments: data_label: D40
data_type: string

tool: D42: pm

tool: D134: am

tool: D163: %s, %s %d, %d, %d:%02d:%02d%s

tool: D51: %d:%02d:%02d%s

tool: D74: %d%02d%02d%02d%02d

tool: D156: %s, %s %d, %d

tool: D40: %04d-%02d-%02d:%02d:%02d:%02d%s

assistant: ```c
char *timestamp(int tzdelta, int ifmt) {
  static char timebuff[256];
  time_t time_val = (time_t)(0);
  struct tm *tmstruct = (struct tm *)NULL, *localtime();
  int year = 0, hour = 0, ispm = 1, month = 0, day = 0, minute = 0, second = 0;
  int tzadjust();
  int daynumber();
  static char *daynames[] = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"};
  static char *monthnames[] = {"?", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", "?"};
  *timebuff = '\000';
  time((time_t *)(&time_val));
  tmstruct = localtime((time_t *)(&time_val));
  year = (int)(tmstruct->tm_year);
  month = (int)(tmstruct->tm_mon) + 1;
  day = (int)(tmstruct->tm_mday);
  hour = (int)(tmstruct->tm_hour);
  minute = (int)(tmstruct->tm_min);
  second = (int)(tmstruct->tm_sec);
  year += 1900;
  tzadjust(tzdelta, &year, &month, &day, &hour);
  if (hour < 0 || hour > 23 || day < 1 || day > 31 || month < 1 || month > 12 || year < 1973)
    goto end_of_job;
  switch (ifmt) {
  default:
  case 0:
    if (hour < 12) {
      ispm = 0;
      if (hour == 0)
        hour = 12;
    }
    if (hour > 12)
      hour -= 12;
    break;
  }
  switch (ifmt) {
  default:
  case 0:
    sprintf(timebuff, "%04d-%02d-%02d:%02d:%02d:%02d%s", year, month, day, hour, minute, second, ((ispm) ? "pm" : "am"));
    break;
  case 1:
    sprintf(timebuff, "%s, %s %d, %d", daynames[daynumber(year, month, day) % 7], monthnames[month], day, year);
    break;
  case 2:
    sprintf(timebuff, "%s, %s %d, %d, %d:%02d:%02d%s", daynames[daynumber(year, month, day) % 7], monthnames[month], day, year, hour, minute, second, ((ispm) ? "pm" : "am"));
    break;
  case 3:
    sprintf(timebuff, "%d:%02d:%02d%s", hour, minute, second, ((ispm) ? "pm" : "am"));
    break;
  case 4:
    sprintf(timebuff, "%d%02d%02d%02d%02d", month, day, hour, minute, second);
    break;
  }
end_of_job:
  return (timebuff);
}
```