user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %r13
  xor    %eax,%eax
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x28,%rsp
  call   <libt_walltime@plt>
  movapd %xmm0,%xmm4
  cmp    $0x1,%ebx
  jle    L33
  mov    0x8(%rbp),%r12
  cmp    $0x2,%ebx
  je     L51
  mov    0x10(%rbp),%r13
  cmp    $0x3,%ebx
  je     L39
  mov    0x18(%rbp),%rdi
  xor    %edx,%edx
  xor    %esi,%esi
  movsd  %xmm0,(%rsp)
  call   <strtoul@plt>
  xor    %esi,%esi
  mov    %r12,%rdi
  mov    %eax,%ebx
  call   <strtodelay@plt>
  xor    %esi,%esi
  mov    %r13,%rdi
  movsd  %xmm0,0x10(%rsp)
  call   <strtodelay@plt>
  movsd  (%rsp),%xmm4
  movsd  %xmm0,0x8(%rsp)
  movapd %xmm4,%xmm0
  call   <timetostr@plt>
  lea    D38(%rip),%rdi
  mov    %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  mov    %r13,%rdx
  mov    %r12,%rsi
  lea    D52(%rip),%rdi
  call   <printf@plt>
  test   %ebx,%ebx
  movsd  (%rsp),%xmm4
  movsd  0x8(%rsp),%xmm2
  movsd  0x10(%rsp),%xmm1
  jg     L8
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L33:
  lea    D5(%rip),%r13
  lea    D65(%rip),%r12
L39:
  xor    %esi,%esi
  mov    %r12,%rdi
  movsd  %xmm4,(%rsp)
  mov    $0xa,%ebx
  call   <strtodelay@plt>
  xor    %esi,%esi
  mov    %r13,%rdi
  movsd  %xmm0,0x10(%rsp)
  call   <strtodelay@plt>
  movsd  (%rsp),%xmm4
  movsd  %xmm0,0x8(%rsp)
  movapd %xmm4,%xmm0
  call   <timetostr@plt>
  lea    D38(%rip),%rdi
  mov    %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r13,%rdx
  mov    %r12,%rsi
  xor    %eax,%eax
  lea    D52(%rip),%rdi
  call   <printf@plt>
  movsd  (%rsp),%xmm4
  movsd  0x8(%rsp),%xmm2
  movsd  0x10(%rsp),%xmm1
L8:
  xor    %r12d,%r12d
  lea    D13(%rip),%rbp
  nopl   0x0(%rax)
L24:
  mov    $0xa,%edi
  movapd %xmm4,%xmm0
  movsd  %xmm4,(%rsp)
  movsd  %xmm2,0x18(%rsp)
  movsd  %xmm1,0x10(%rsp)
  call   <libt_timetointerval4@plt>
  movsd  (%rsp),%xmm4
  movsd  %xmm0,0x8(%rsp)
  addsd  %xmm0,%xmm4
  movapd %xmm4,%xmm0
  movsd  %xmm4,(%rsp)
  call   <timetostr@plt>
  movsd  0x8(%rsp),%xmm3
  mov    %r12d,%esi
  mov    %rbp,%rdi
  mov    %rax,%rdx
  add    $0x1,%r12d
  mov    $0x1,%eax
  movapd %xmm3,%xmm0
  call   <printf@plt>
  cmp    %ebx,%r12d
  movsd  (%rsp),%xmm4
  movsd  0x10(%rsp),%xmm1
  movsd  0x18(%rsp),%xmm2
  jl     L24
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L51:
  lea    D5(%rip),%r13
  jmp    L39
```

tool_calls: name: unpack_data
arguments: data_label: D38
datatype: string
name: unpack_data
arguments: data_label: D52
datatype: string
name: unpack_data
arguments: data_label: D5
datatype: string
name: unpack_data
arguments: data_label: D65
datatype: string
name: unpack_data
arguments: data_label: D13
datatype: string

tool: D38: now %s


tool: D52: /%s +%s


tool: D5: 4h

tool: D65: 1d

tool: D13: %i %s (+%.0f)


assistant: ```c
int main(int argc, char *argv[]) {
  const char *sinterval, *soffset;
  double interval, offset;
  double walltime = libt_walltime();
  ;
  double delay;
  int j, max = 10;
  sinterval = (argc >= 2) ? argv[1] : "1d";
  soffset = (argc >= 3) ? argv[2] : "4h";
  if (argc >= 4)
    max = strtoul(argv[3], NULL, 0);
  interval = strtodelay(sinterval, NULL);
  offset = strtodelay(soffset, NULL);
  printf("now %s\n", timetostr(walltime));
  printf("/%s +%s\n", sinterval, soffset);
  for (j = 0; j < max; ++j) {
    delay = libt_timetointerval4(walltime, interval, offset, 10);
    printf("%i %s (+%.0f)\n", j, timetostr(walltime + delay), delay);
    walltime += delay;
  }
  return 0;
}
```