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

```asm
<cmio_ce>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %r9d,%ebx
  mov    0x80(%rsp),%r12
  mov    0x90(%rsp),%r13
  mov    0xc8(%rsp),%ebp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  divsd  %xmm2,%xmm3
  pxor   %xmm0,%xmm0
  ucomisd %xmm3,%xmm0
  jae    L119
L116:
  test   %ebx,%ebx
  jle    L56
  mov    $0x0,%eax
L193:
  add    $0x1,%eax
  cmp    %eax,%ebx
  jne    L193
  add    %ebp,%eax
  mov    %eax,%ebp
  cmp    $0x63,%eax
  jg     L110
  cmpl   $0x0,0xd0(%rsp)
  je     L110
L43:
  cmpl   $0x1,(%r12)
  jne    L160
  test   %ebx,%ebx
  jg     L48
L160:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L201
  mov    $0x0,%eax
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L119:
  movapd %xmm3,%xmm0
  call   <log10@plt>
  jmp    L116
L110:
  test   %eax,%eax
  jle    L43
L138:
  mov    $0x0,%eax
L89:
  add    $0x1,%eax
  cmp    %ebp,%eax
  jne    L89
  jmp    L43
L48:
  mov    0x0(%r13),%rbx
  mov    0x8(%r12),%eax
  cmp    $0x1,%eax
  je     L145
  cmp    $0x3,%eax
  je     L65
  lea    0x10(%rsp),%rdi
  lea    D24(%rip),%rdx
  mov    $0x26,%esi
  call   <snprintf@plt>
  jmp    L160
L145:
  lea    0x10(%rsp),%rdi
  lea    D12(%rip),%rdx
  mov    $0x26,%esi
  call   <snprintf@plt>
  lea    0x8(%rsp),%rdx
  lea    0x4(%rsp),%rsi
  mov    %rsp,%rdi
  movq   %rbx,%xmm0
  call   <cmio_jd2y@plt>
  jmp    L160
L65:
  lea    0x10(%rsp),%rdi
  lea    D6(%rip),%rdx
  mov    $0x26,%esi
  call   <snprintf@plt>
  jmp    L160
L56:
  cmp    $0x63,%ebp
  jg     L55
  cmpl   $0x0,0xd0(%rsp)
  jne    L160
L55:
  test   %ebp,%ebp
  jg     L138
  jmp    L160
L201:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D24
type_infered: string
name: disassemble_data
arguments: data_label: D12
type_infered: string
name: disassemble_data
arguments: data_label: D6
type_infered: string

tool: D24: (5a,/,9x,a,f14.1,a)

tool: D12: (5a,/,9x,a,i10,1x,i2,1x,f4.1)

tool: D6: (5a,/,9x,a,f14.3,a)

assistant: ```c
int cmio_ce(double time, double tstart, double rcen, double rmax, int nbod, int nbig, double *m, int *stat, char **id, int nclo, int *iclo, int *jclo, int opt[8], int stopflag, double *tclo, double *dclo, double **ixvclo, double **jxvclo, char **mem, int lmem[200], FILE *outfile, int nstored, int ceflush) {
  int year, month;
  double tmp0, t1, rfac, fr, fv, theta, phi, vtheta, vphi;
  static char c[200][80];
  char fstop[38];
  char *mio_fl2c_out, *mio_re2c_out;
  char tstring[6];
  rfac = log10(rmax / rcen);
  for (int k = 0; k < nclo; k++) {
    nstored++;
  }
  if (nstored >= 100 || ceflush == 0) {
    for (int k = 0; k < nstored; k++) {
    }
    nstored = 0;
  }
  stopflag = 0;
  if (opt[0] == 1 && nclo > 0) {
    tmp0 = tclo[0];
    if (opt[2] == 1) {
      snprintf(fstop, sizeof(fstop), "(5a,/,9x,a,i10,1x,i2,1x,f4.1)");
      cmio_jd2y(tmp0, &year, &month, &t1);
    } else {
      if (opt[2] == 3) {
        snprintf(fstop, sizeof(fstop), "(5a,/,9x,a,f14.3,a)");
        t1 = (tmp0 - tstart) / 365.250;
      } else {
        snprintf(fstop, sizeof(fstop), "(5a,/,9x,a,f14.1,a)");
        if (opt[2] == 0) {
          t1 = tmp0;
        }
        if (opt[2] == 2) {
          t1 = tmp0 - tstart;
        }
      }
    }
    stopflag = 1;
  }
  return 0;
}
```