user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<ts2i>:
  endbr64
  push   %r15
  pxor   %xmm5,%xmm5
  mov    %rdx,%r15
  push   %r14
  mov    %rsi,%r14
  push   %r13
  mov    %r9,%r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x28,%rsp
  addsd  D109(%rip),%xmm0
  movsd  D85(%rip),%xmm1
  mov    %r8,0x8(%rsp)
  mov    0x60(%rsp),%ebx
  comisd %xmm0,%xmm5
  ja     L79
  movsd  D178(%rip),%xmm1
L79:
  test   %ebx,%ebx
  jle    L123
  cmp    $0x1,%ebx
  je     L84
  cmp    $0x2,%ebx
  je     L30
  cmp    $0x3,%ebx
  je     L331
  movsd  D114(%rip),%xmm4
  mov    $0x1,%eax
  mulsd  %xmm4,%xmm0
  movsd  %xmm4,0x10(%rsp)
  addsd  %xmm1,%xmm0
  call   <dint@plt>
  pxor   %xmm2,%xmm2
  movsd  0x10(%rsp),%xmm4
  cvtsi2sd %eax,%xmm2
L265:
  movapd %xmm2,%xmm3
  movsd  D52(%rip),%xmm1
  mov    $0x2,%eax
  movsd  %xmm2,0x18(%rsp)
  divsd  %xmm4,%xmm3
  movapd %xmm3,%xmm0
  movsd  %xmm3,0x10(%rsp)
  divsd  D241(%rip),%xmm0
  call   <dmod@plt>
  movsd  0x10(%rsp),%xmm3
  movsd  D177(%rip),%xmm1
  mov    %eax,(%r12)
  mov    $0x2,%eax
  movapd %xmm3,%xmm0
  divsd  %xmm1,%xmm0
  call   <dmod@plt>
  mov    0x8(%rsp),%rdx
  movsd  0x10(%rsp),%xmm3
  mov    %eax,(%rdx)
  mov    D177(%rip),%rax
  movapd %xmm3,%xmm0
  movq   %rax,%xmm1
  mov    $0x2,%eax
  call   <dmod@plt>
  pxor   %xmm0,%xmm0
  movsd  0x18(%rsp),%xmm2
  divsd  D80(%rip),%xmm2
  cvtsi2sd %eax,%xmm0
  mov    $0x1,%eax
  movsd  %xmm0,0x0(%r13)
  movsd  D25(%rip),%xmm0
  addsd  %xmm2,%xmm0
  call   <dint@plt>
  pxor   %xmm0,%xmm0
  movsd  D146(%rip),%xmm2
  mov    $0x3,%esi
  cvtsi2sd %eax,%xmm0
  movsd  D222(%rip),%xmm3
  mov    $0x3,%r8d
  pxor   %xmm6,%xmm6
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  addsd  D49(%rip),%xmm1
  cvttsd2si %xmm1,%ecx
  pxor   %xmm1,%xmm1
  cvtsi2sd %ecx,%xmm1
  mulsd  %xmm2,%xmm1
  movsd  D218(%rip),%xmm2
  subsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  addsd  D25(%rip),%xmm1
  cvttsd2si %xmm1,%eax
  pxor   %xmm1,%xmm1
  cmp    %esi,%eax
  cmovg  %esi,%eax
  cvtsi2sd %eax,%xmm1
  mulsd  %xmm2,%xmm1
  movsd  D219(%rip),%xmm2
  subsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  addsd  D240(%rip),%xmm1
  cvttsd2si %xmm1,%esi
  pxor   %xmm1,%xmm1
  cvtsi2sd %esi,%xmm1
  mulsd  %xmm2,%xmm1
  movsd  D54(%rip),%xmm2
  subsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  addsd  %xmm3,%xmm1
  cvttsd2si %xmm1,%edi
  pxor   %xmm1,%xmm1
  cmp    %r8d,%edi
  cmovg  %r8d,%edi
  cvtsi2sd %edi,%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  comisd %xmm0,%xmm6
  ja     L222
  addsd  %xmm3,%xmm0
  cvttsd2si %xmm0,%r8d
  lea    0x1(%r8),%r9d
  mov    %r9d,(%r15)
  cmp    $0x1f,%r9d
  jle    L151
  lea    -0x1e(%r8),%r9d
  mov    %r9d,(%r15)
  cmp    $0x1e,%r9d
  jle    L299
  lea    -0x3c(%r8),%r9d
  mov    %r9d,(%r15)
  cmp    $0x1f,%r9d
  jle    L71
  lea    -0x5b(%r8),%r9d
  mov    %r9d,(%r15)
  cmp    $0x1e,%r9d
  jle    L135
  lea    -0x79(%r8),%r9d
  mov    %r9d,(%r15)
  cmp    $0x1f,%r9d
  jle    L9
  lea    -0x98(%r8),%r9d
  mov    %r9d,(%r15)
  cmp    $0x1f,%r9d
  jle    L264
  lea    -0xb7(%r8),%r9d
  mov    %r9d,(%r15)
  cmp    $0x1e,%r9d
  jle    L262
  lea    -0xd5(%r8),%r9d
  mov    %r9d,(%r15)
  cmp    $0x1f,%r9d
  jle    L15
  lea    -0xf4(%r8),%r9d
  mov    %r9d,(%r15)
  cmp    $0x1e,%r9d
  jle    L107
  lea    -0x112(%r8),%r9d
  mov    %r9d,(%r15)
  cmp    $0x1f,%r9d
  jle    L201
  lea    -0x131(%r8),%r9d
  mov    %r9d,(%r15)
  cmp    $0x1f,%r9d
  jle    L339
  lea    -0x150(%r8),%r9d
  mov    %r9d,(%r15)
  cmp    $0x1e,%r9d
  jle    L80
  sub    $0x16e,%r8d
  mov    $0x3,%r9d
  mov    %r8d,(%r15)
  mov    $0x1,%r8d
L242:
  imul   $0x64,%eax,%eax
  mov    %r9d,(%r14)
  mov    %r15,%rdx
  mov    %r13,%r9
  imul   $0x190,%ecx,%ecx
  mov    %ebx,0x60(%rsp)
  add    %eax,%ecx
  lea    (%rcx,%rsi,4),%eax
  mov    %r12,%rcx
  mov    %r14,%rsi
  add    %edi,%eax
  mov    %rbp,%rdi
  add    %r8d,%eax
  mov    0x8(%rsp),%r8
  mov    %eax,0x0(%rbp)
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1090 <fixdate@plt>
  nopl   0x0(%rax,%rax,1)
L222:
  movl   $0x1d,(%r15)
  xor    %r8d,%r8d
  mov    $0x2,%r9d
  jmp    L242
  nopw   0x0(%rax,%rax,1)
L123:
  addsd  %xmm1,%xmm0
  mov    $0x1,%eax
  call   <dint@plt>
  pxor   %xmm2,%xmm2
  movsd  D114(%rip),%xmm4
  cvtsi2sd %eax,%xmm2
  mulsd  %xmm4,%xmm2
  jmp    L265
  nopw   0x0(%rax,%rax,1)
L30:
  mulsd  D183(%rip),%xmm0
  mov    $0x1,%eax
  addsd  %xmm1,%xmm0
  call   <dint@plt>
  pxor   %xmm2,%xmm2
  movsd  D114(%rip),%xmm4
  cvtsi2sd %eax,%xmm2
  mulsd  D183(%rip),%xmm2
  jmp    L265
  nopl   0x0(%rax,%rax,1)
L331:
  mulsd  D19(%rip),%xmm0
  mov    $0x1,%eax
  addsd  %xmm1,%xmm0
  call   <dint@plt>
  pxor   %xmm2,%xmm2
  movsd  D114(%rip),%xmm4
  cvtsi2sd %eax,%xmm2
  mulsd  D79(%rip),%xmm2
  jmp    L265
  nopl   0x0(%rax,%rax,1)
L84:
  mulsd  D79(%rip),%xmm0
  mov    $0x1,%eax
  addsd  %xmm1,%xmm0
  call   <dint@plt>
  pxor   %xmm2,%xmm2
  movsd  D114(%rip),%xmm4
  cvtsi2sd %eax,%xmm2
  mulsd  D19(%rip),%xmm2
  jmp    L265
L151:
  mov    $0x2,%r9d
  mov    $0x1,%r10d
  nop
L42:
  mov    %r9d,%r8d
  mov    $0xaaaaaaab,%r11d
  imul   %r11,%r8
  shr    $0x23,%r8
  lea    (%r8,%r8,2),%r8d
  shl    $0x2,%r8d
  sub    %r8d,%r9d
  mov    %r10d,%r8d
  mov    $0xba2e8ba3,%r10d
  imul   %r10,%r8
  add    $0x1,%r9d
  shr    $0x23,%r8
  jmp    L242
L299:
  mov    $0x3,%r9d
  mov    $0x2,%r10d
  jmp    L42
L71:
  mov    $0x4,%r9d
  mov    $0x3,%r10d
  jmp    L42
L135:
  mov    $0x5,%r9d
  mov    $0x4,%r10d
  jmp    L42
L9:
  mov    $0x6,%r9d
  mov    $0x5,%r10d
  jmp    L42
L264:
  mov    $0x7,%r9d
  mov    $0x6,%r10d
  jmp    L42
L262:
  mov    $0x8,%r9d
  mov    $0x7,%r10d
  jmp    L42
L15:
  mov    $0x9,%r9d
  mov    $0x8,%r10d
  jmp    L42
L107:
  mov    $0xa,%r9d
  mov    $0x9,%r10d
  jmp    L42
L201:
  mov    $0xb,%r9d
  mov    $0xa,%r10d
  jmp    L42
L339:
  mov    $0xc,%r9d
  mov    $0xb,%r10d
  jmp    L42
L80:
  mov    $0xd,%r9d
  mov    $0xc,%r10d
  jmp    L42
```

tool_calls: name: retrieve_data
arguments: data_label: D109
type: f64
name: retrieve_data
arguments: data_label: D85
type: f32[2]
name: retrieve_data
arguments: data_label: D178
type: f64
name: retrieve_data
arguments: data_label: D114
type: f64
name: retrieve_data
arguments: data_label: D52
type: f64
name: retrieve_data
arguments: data_label: D241
type: f64
name: retrieve_data
arguments: data_label: D177
type: f64
name: retrieve_data
arguments: data_label: D80
type: f64
name: retrieve_data
arguments: data_label: D25
type: f64
name: retrieve_data
arguments: data_label: D146
type: f64
name: retrieve_data
arguments: data_label: D222
type: f64
name: retrieve_data
arguments: data_label: D49
type: f64
name: retrieve_data
arguments: data_label: D218
type: f64
name: retrieve_data
arguments: data_label: D219
type: f64
name: retrieve_data
arguments: data_label: D240
type: f64
name: retrieve_data
arguments: data_label: D54
type: f64
name: retrieve_data
arguments: data_label: D183
type: f64
name: retrieve_data
arguments: data_label: D19
type: f64
name: retrieve_data
arguments: data_label: D79
type: f64

tool: D109: 61530883200

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

tool: D178: 0.5

tool: D114: 10000

tool: D52: 24

tool: D241: 3600

tool: D177: 60

tool: D80: 864000000

tool: D25: 1e-06

tool: D146: 146097

tool: D222: 1e-08

tool: D49: 1e-05

tool: D218: 36524

tool: D219: 1461

tool: D240: 1e-10

tool: D54: 365

tool: D183: 100

tool: D19: 1000

tool: D79: 10

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;
}
```