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

```asm
<ts2i>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  movsd  %xmm0,-0x48(%rbp)
  mov    %rdi,-0x50(%rbp)
  mov    %rsi,-0x58(%rbp)
  mov    %rdx,-0x60(%rbp)
  mov    %rcx,-0x68(%rbp)
  mov    %r8,-0x70(%rbp)
  mov    %r9,-0x78(%rbp)
  movsd  -0x48(%rbp),%xmm1
  movsd  D305(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x10(%rbp),%xmm0
  jbe    L151
  movsd  D15(%rip),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  jmp    L141
L151:
  movsd  D28(%rip),%xmm0
  movsd  %xmm0,-0x18(%rbp)
L141:
  cmpl   $0x0,0x10(%rbp)
  jg     L116
  movsd  -0x10(%rbp),%xmm0
  addsd  -0x18(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   <dint@plt>
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D115(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  jmp    L155
L116:
  cmpl   $0x1,0x10(%rbp)
  jg     L9
  movsd  -0x10(%rbp),%xmm1
  movsd  D61(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  -0x18(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   <dint@plt>
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D226(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  jmp    L155
L9:
  cmpl   $0x2,0x10(%rbp)
  jg     L174
  movsd  -0x10(%rbp),%xmm1
  movsd  D79(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  -0x18(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   <dint@plt>
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D79(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  jmp    L155
L174:
  cmpl   $0x3,0x10(%rbp)
  jg     L89
  movsd  -0x10(%rbp),%xmm1
  movsd  D226(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  -0x18(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   <dint@plt>
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D61(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  jmp    L155
L89:
  movsd  -0x10(%rbp),%xmm1
  movsd  D115(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  -0x18(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   <dint@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x20(%rbp)
L155:
  movsd  -0x20(%rbp),%xmm0
  movsd  D115(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movsd  D50(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movsd  D156(%rip),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  mov    $0x2,%eax
  call   <dmod@plt>
  mov    -0x68(%rbp),%rdx
  mov    %eax,(%rdx)
  movsd  -0x10(%rbp),%xmm0
  movsd  D219(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movsd  D219(%rip),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  mov    $0x2,%eax
  call   <dmod@plt>
  mov    -0x70(%rbp),%rdx
  mov    %eax,(%rdx)
  movsd  D219(%rip),%xmm0
  mov    -0x10(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  mov    $0x2,%eax
  call   <dmod@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mov    -0x78(%rbp),%rax
  movsd  %xmm0,(%rax)
  movsd  -0x20(%rbp),%xmm0
  movsd  D64(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  D161(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   <dint@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movsd  D65(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  D266(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x2c(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x2c(%rbp),%xmm1
  movsd  D65(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x8(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movsd  D189(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  D161(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x38(%rbp)
  cmpl   $0x3,-0x38(%rbp)
  jle    L92
  movl   $0x3,-0x38(%rbp)
L92:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x38(%rbp),%xmm1
  movsd  D189(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x8(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movsd  D66(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  D316(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x28(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x28(%rbp),%xmm1
  movsd  D66(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x8(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movsd  D269(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  D118(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x34(%rbp)
  cmpl   $0x3,-0x34(%rbp)
  jle    L129
  movl   $0x3,-0x34(%rbp)
L129:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x34(%rbp),%xmm1
  movsd  D269(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x8(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x8(%rbp),%xmm0
  jbe    L133
  movl   $0x0,-0x30(%rbp)
  mov    -0x60(%rbp),%rax
  movl   $0x1d,(%rax)
  jmp    L13
L133:
  movsd  -0x8(%rbp),%xmm1
  movsd  D118(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  lea    0x1(%rax),%edx
  mov    -0x60(%rbp),%rax
  mov    %edx,(%rax)
  movl   $0x1,-0x30(%rbp)
  jmp    L36
L103:
  mov    -0x30(%rbp),%eax
  sub    $0x1,%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    %edx
  sar    $0x1f,%eax
  sub    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  cltd
  shr    $0x1f,%edx
  add    %edx,%eax
  and    $0x1,%eax
  sub    %edx,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x60(%rbp),%rax
  mov    (%rax),%eax
  mov    -0x24(%rbp),%edx
  add    $0x1e,%edx
  cmp    %edx,%eax
  jle    L6
  mov    -0x60(%rbp),%rax
  mov    (%rax),%eax
  sub    -0x24(%rbp),%eax
  lea    -0x1e(%rax),%edx
  mov    -0x60(%rbp),%rax
  mov    %edx,(%rax)
  addl   $0x1,-0x30(%rbp)
L36:
  cmpl   $0xc,-0x30(%rbp)
  jle    L103
  jmp    L13
L6:
  nop
L13:
  mov    -0x30(%rbp),%eax
  lea    0x1(%rax),%ecx
  movslq %ecx,%rax
  imul   $0x2aaaaaab,%rax,%rax
  shr    $0x20,%rax
  sar    %eax
  mov    %ecx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  shl    $0x2,%eax
  sub    %eax,%ecx
  mov    %ecx,%edx
  add    $0x1,%edx
  mov    -0x58(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x2c(%rbp),%eax
  imul   $0x190,%eax,%edx
  mov    -0x38(%rbp),%eax
  imul   $0x64,%eax,%eax
  add    %eax,%edx
  mov    -0x28(%rbp),%eax
  shl    $0x2,%eax
  add    %eax,%edx
  mov    -0x34(%rbp),%eax
  lea    (%rdx,%rax,1),%ecx
  mov    -0x30(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x2e8ba2e9,%rdx,%rdx
  shr    $0x20,%rdx
  sar    %edx
  sar    $0x1f,%eax
  mov    %eax,%esi
  mov    %edx,%eax
  sub    %esi,%eax
  lea    (%rcx,%rax,1),%edx
  mov    -0x50(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x78(%rbp),%r9
  mov    -0x70(%rbp),%r8
  mov    -0x68(%rbp),%rcx
  mov    -0x60(%rbp),%rdx
  mov    -0x58(%rbp),%rsi
  mov    -0x50(%rbp),%rax
  sub    $0x8,%rsp
  mov    0x10(%rbp),%edi
  push   %rdi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fixdate@plt>
  add    $0x10,%rsp
  nop
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D305
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D15
data_type: f32[2]
name: extract_symbolic_data
arguments: data_tag: D28
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D115
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D61
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D226
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D79
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D50
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D156
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D219
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D64
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D161
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D65
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D266
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D189
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D66
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D316
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D269
data_type: f64
name: extract_symbolic_data
arguments: data_tag: D118
data_type: f64

tool: D305: 61530883200

tool: {"D15": [0.0,-1.75]}

tool: D28: 0.5

tool: D115: 10000

tool: D61: 10

tool: D226: 1000

tool: D79: 100

tool: D50: 3600

tool: D156: 24

tool: D219: 60

tool: D64: 864000000

tool: D161: 1e-06

tool: D65: 146097

tool: D266: 1e-05

tool: D189: 36524

tool: D66: 1461

tool: D316: 1e-10

tool: D269: 365

tool: D118: 1e-08

assistant: ```c
void ts2i(tsec, iyr, imon, iday, ihr, imn, sec, ndsec) double tsec;
int *iyr;
int *imon;
int *iday;
int *ihr;
int *imn;
double *sec;
int ndsec;
{
  double t, days, ts, dts;
  int nc, nc4, nly, ny, m, im;
  ts = tsec + 61530883200.0;
  if (ts < 0.0)
    dts = -0.5;
  else
    dts = 0.5;
  if (ndsec < 1)
    t = dint(ts + dts) * 10000.0;
  else if (ndsec < 2)
    t = dint(ts * 10.0 + dts) * 1000.0;
  else if (ndsec < 3)
    t = dint(ts * 100.0 + dts) * 100.0;
  else if (ndsec < 4)
    t = dint(ts * 1000.0 + dts) * 10.0;
  else
    t = dint(ts * 10000.0 + dts);
  ts = t / 10000.0;
  *ihr = (int)(dmod(ts / 3600.0, 24.0));
  *imn = (int)(dmod(ts / 60.0, 60.0));
  *sec = dmod(ts, 60.0);
  days = dint((t / 864000000.0) + 0.000001);
  nc4 = (int)((days / 146097.0) + 0.00001);
  days = days - (146097.0 * (double)(nc4));
  nc = (int)((days / 36524.0) + 0.000001);
  if (nc > 3)
    nc = 3;
  days = days - (36524.0 * nc);
  nly = (int)((days / 1461.0) + 0.0000000001);
  days = days - (1461.0 * (double)nly);
  ny = (int)((days / 365.0) + 0.00000001);
  if (ny > 3)
    ny = 3;
  days = days - (365.0 * (double)ny);
  if (days < 0) {
    m = 0;
    *iday = 29;
  } else {
    *iday = (int)(days + 0.00000001) + 1;
    for (m = 1; m <= 12; m++) {
      im = (m + ((m - 1) / 5)) % 2;
      if (*iday - 1 < im + 30)
        break;
      *iday = *iday - im - 30;
    }
  }
  *imon = ((m + 1) % 12) + 1;
  *iyr = nc4 * 400 + nc * 100 + nly * 4 + ny + m / 11;
  fixdate(iyr, imon, iday, ihr, imn, sec, ndsec);
  return;
}
```