user: What would the C source look like for the assembly code provided here?

```asm
<fftm2s>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %edi,0x14(%rsp)
  mov    %esi,0x18(%rsp)
  mov    %edx,0x1c(%rsp)
  movsd  %xmm0,0x8(%rsp)
  mov    0xc0(%rsp),%r15
  mov    0xc8(%rsp),%r14
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  mov    (%r14),%eax
  test   %eax,%eax
  jg     L52
  mov    %ecx,%r12d
  mov    %r8d,%r13d
  mov    %r9d,%ebp
  movb   $0x0,(%r15)
  mov    %esi,%eax
  or     %edx,%eax
  or     %edi,%eax
  mov    %eax,%ebx
  jne    L36
L67:
  cmp    $0x17,%r12d
  ja     L175
  cmp    $0x3b,%r13d
  ja     L136
  pxor   %xmm0,%xmm0
  movsd  0x8(%rsp),%xmm1
  comisd %xmm1,%xmm0
  ja     L87
  comisd D85(%rip),%xmm1
  jae    L87
  cmp    $0x19,%ebp
  jg     L54
  test   %ebp,%ebp
  je     L81
  lea    0x3(%rbp),%r8d
  jns    L138
  mov    0x1c(%rsp),%r8d
  mov    0x18(%rsp),%ecx
  mov    0x14(%rsp),%edx
  lea    D77(%rip),%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L19
L36:
  mov    %r14,%rcx
  call   <ffverifydate@plt>
  test   %rax,%rax
  jle    L67
  lea    D73(%rip),%rdi
  call   <ffpmsg@plt>
  mov    (%r14),%eax
  jmp    L52
L175:
  lea    0x20(%rsp),%rbx
  mov    %r12d,%edx
  lea    D11(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %rbx,%rdi
  call   <ffpmsg@plt>
  movl   $0x1a4,(%r14)
  mov    $0x1a4,%eax
  jmp    L52
L136:
  lea    0x20(%rsp),%rbx
  mov    %r13d,%edx
  lea    D57(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %rbx,%rdi
  call   <ffpmsg@plt>
  movl   $0x1a4,(%r14)
  mov    $0x1a4,%eax
  jmp    L52
L87:
  cvttsd2si 0x8(%rsp),%edx
  lea    0x20(%rsp),%rbx
  lea    D44(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %rbx,%rdi
  call   <ffpmsg@plt>
  movl   $0x1a4,(%r14)
  mov    $0x1a4,%eax
  jmp    L52
L54:
  lea    0x20(%rsp),%rbx
  mov    %ebp,%edx
  lea    D10(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %rbx,%rdi
  call   <ffpmsg@plt>
  movl   $0x1a4,(%r14)
  mov    $0x1a4,%eax
  jmp    L52
L81:
  mov    $0x2,%r8d
L138:
  test   %ebx,%ebx
  jne    L63
  movsd  0x8(%rsp),%xmm0
  mov    %ebp,%r9d
  mov    %r13d,%ecx
  mov    %r12d,%edx
  lea    D59(%rip),%rsi
  mov    %r15,%rdi
  mov    $0x1,%eax
  call   <sprintf@plt>
L19:
  mov    (%r14),%eax
L52:
  mov    0x78(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L31
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L63:
  sub    $0x8,%rsp
  push   %rbp
  push   %r8
  push   %r13
  movsd  0x28(%rsp),%xmm0
  mov    %r12d,%r9d
  mov    0x3c(%rsp),%r8d
  mov    0x38(%rsp),%ecx
  mov    0x34(%rsp),%edx
  lea    D76(%rip),%rsi
  mov    %r15,%rdi
  mov    $0x1,%eax
  call   <sprintf@plt>
  add    $0x20,%rsp
  jmp    L19
L31:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D85
type: f32
name: retrieve_data
arguments: tag: D77
type: string
name: retrieve_data
arguments: tag: D73
type: string
name: retrieve_data
arguments: tag: D11
type: string
name: retrieve_data
arguments: tag: D57
type: string
name: retrieve_data
arguments: tag: D44
type: string
name: retrieve_data
arguments: tag: D10
type: string
name: retrieve_data
arguments: tag: D59
type: string
name: retrieve_data
arguments: tag: D76
type: string

tool: D85: 0

tool: D77: %.4d-%.2d-%.2d

tool: D73: invalid date (fftm2s)

tool: D11: input hour value is out of range 0 - 23: %d (fftm2s)

tool: D57: input minute value is out of range 0 - 59: %d (fftm2s)

tool: D44: input second value is out of range 0 - 60.999: %f (fftm2s)

tool: D10: input decimals value is out of range 0 - 25: %d (fftm2s)

tool: D59: %.2d:%.2d:%0*.*f

tool: D76: %.4d-%.2d-%.2dT%.2d:%.2d:%0*.*f

assistant: ```c
int fftm2s(int year, int month, int day, int hour, int minute, double second, int decimals, char *datestr, int *status) {
  int width;
  char errmsg[81];
  if (*status > 0)
    return (*status);
  *datestr = '\0';
  if (year != 0 || month != 0 || day != 0) {
    if (ffverifydate(year, month, day, status) > 0) {
      ffpmsg("invalid date (fftm2s)");
      return (*status);
    }
  }
  if (hour < 0 || hour > 23) {
    sprintf(errmsg, "input hour value is out of range 0 - 23: %d (fftm2s)", hour);
    ffpmsg(errmsg);
    return (*status = 420);
  } else if (minute < 0 || minute > 59) {
    sprintf(errmsg, "input minute value is out of range 0 - 59: %d (fftm2s)", minute);
    ffpmsg(errmsg);
    return (*status = 420);
  } else if (second < 0. || second >= 61) {
    sprintf(errmsg, "input second value is out of range 0 - 60.999: %f (fftm2s)", second);
    ffpmsg(errmsg);
    return (*status = 420);
  } else if (decimals > 25) {
    sprintf(errmsg, "input decimals value is out of range 0 - 25: %d (fftm2s)", decimals);
    ffpmsg(errmsg);
    return (*status = 420);
  }
  if (decimals == 0)
    width = 2;
  else
    width = decimals + 3;
  if (decimals < 0) {
    sprintf(datestr, "%.4d-%.2d-%.2d", year, month, day);
  } else if (year == 0 && month == 0 && day == 0) {
    sprintf(datestr, "%.2d:%.2d:%0*.*f", hour, minute, width, decimals, second);
  } else {
    sprintf(datestr, "%.4d-%.2d-%.2dT%.2d:%.2d:%0*.*f", year, month, day, hour, minute, width, decimals, second);
  }
  return (*status);
}
```