void dt2i(date, time, iyr, imon, iday, ihr, imn, sec, ndsec) double date;
double time;
int *iyr;
int *imon;
int *iday;
int *ihr;
int *imn;
double *sec;
int ndsec;
{
  double t, d;
  t = time;
  if (date < 0.0)
    d = -date;
  else
    d = date;
  *ihr = dint(t + 0.000000001);
  t = 100.0 * (t - (double)*ihr);
  *imn = dint(t + 0.0000001);
  *sec = 100.0 * (t - (double)*imn);
  *iyr = dint(d + 0.00001);
  d = 100.0 * (d - (double)*iyr);
  if (date < 0.0)
    *iyr = -*iyr;
  *imon = dint(d + 0.001);
  d = 100.0 * (d - (double)*imon);
  *iday = dint(d + 0.1);
  fixdate(iyr, imon, iday, ihr, imn, sec, ndsec);
  return;
}


x86 assembly (clang, -O0):
<dt2i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0x10(%rbp),%eax
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
mov    %r9,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    118b <dt2i+0x6b>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1195 <dt2i+0x75>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe7b(%rip),%xmm0
addsd  -0x48(%rbp),%xmm0
mov    $0x1,%al
call   1030 <dint@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,(%rax)
movsd  -0x48(%rbp),%xmm1
mov    -0x30(%rbp),%rax
cvtsi2sdl (%rax),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe36(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe35(%rip),%xmm0
addsd  -0x48(%rbp),%xmm0
mov    $0x1,%al
call   1030 <dint@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%rax
mov    %ecx,(%rax)
movsd  -0x48(%rbp),%xmm1
mov    -0x38(%rbp),%rax
cvtsi2sdl (%rax),%xmm0
subsd  %xmm0,%xmm1
movsd  0xdf8(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x40(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xdec(%rip),%xmm0
addsd  -0x50(%rbp),%xmm0
mov    $0x1,%al
call   1030 <dint@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movsd  -0x50(%rbp),%xmm1
mov    -0x18(%rbp),%rax
cvtsi2sdl (%rax),%xmm0
subsd  %xmm0,%xmm1
movsd  0xdb7(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    126e <dt2i+0x14e>
mov    -0x18(%rbp),%rax
xor    %ecx,%ecx
sub    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movsd  0xdb2(%rip),%xmm0
addsd  -0x50(%rbp),%xmm0
mov    $0x1,%al
call   1030 <dint@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
movsd  -0x50(%rbp),%xmm1
mov    -0x20(%rbp),%rax
cvtsi2sdl (%rax),%xmm0
subsd  %xmm0,%xmm1
movsd  0xd5d(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xd6c(%rip),%xmm0
addsd  -0x50(%rbp),%xmm0
mov    $0x1,%al
call   1030 <dint@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x38(%rbp),%r8
mov    -0x40(%rbp),%r9
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
mov    $0x0,%al
call   1040 <fixdate@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dt2i>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9,%r14
mov    %r8,%r15
mov    %rcx,%r12
mov    %rdx,%r13
mov    %rsi,%rbx
mov    %rdi,%rbp
movsd  %xmm1,0x8(%rsp)
movapd %xmm0,0x20(%rsp)
movapd 0xeac(%rip),%xmm2
xorpd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm4
cmpltsd %xmm3,%xmm4
andpd  %xmm4,%xmm2
andnpd %xmm0,%xmm4
orpd   %xmm2,%xmm4
movapd %xmm4,0x10(%rsp)
movsd  0xe91(%rip),%xmm0
addsd  %xmm1,%xmm0
mov    $0x1,%al
call   1030 <dint@plt>
mov    %eax,(%r12)
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xe71(%rip),%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0xe6b(%rip),%xmm0
addsd  %xmm1,%xmm0
mov    $0x1,%al
call   1030 <dint@plt>
mov    %eax,(%r15)
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xe3c(%rip),%xmm1
movsd  %xmm1,(%r14)
movsd  0xe3f(%rip),%xmm0
addsd  0x10(%rsp),%xmm0
mov    $0x1,%al
call   1030 <dint@plt>
mov    %eax,%ecx
neg    %ecx
xorpd  %xmm0,%xmm0
ucomisd 0x20(%rsp),%xmm0
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movapd 0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
cmovbe %eax,%ecx
mulsd  0xdf8(%rip),%xmm1
movapd %xmm1,0x10(%rsp)
mov    %ecx,0x0(%rbp)
movsd  0xdff(%rip),%xmm0
addsd  %xmm1,%xmm0
mov    $0x1,%al
call   1030 <dint@plt>
mov    %eax,(%rbx)
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movapd 0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xdc1(%rip),%xmm1
addsd  0xdd9(%rip),%xmm1
movapd %xmm1,%xmm0
mov    $0x1,%al
call   1030 <dint@plt>
mov    %eax,0x0(%r13)
mov    0x70(%rsp),%eax
mov    %eax,(%rsp)
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
mov    %r14,%r9
xor    %eax,%eax
call   1040 <fixdate@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @dt2i(double %0, double %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6, double* %7, i32 %8) {
%10 = alloca double
%11 = alloca double
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca double*
%18 = alloca i32
%19 = alloca double
%20 = alloca double
store double %0, double* %10
store double %1, double* %11
store i32* %2, i32** %12
store i32* %3, i32** %13
store i32* %4, i32** %14
store i32* %5, i32** %15
store i32* %6, i32** %16
store double* %7, double** %17
store i32 %8, i32* %18
%21 = load double, double* %11
store double %21, double* %19
%22 = load double, double* %10
%23 = fcmp olt double %22, 0.000000e+00
br i1 %23, label %24, label %27
24: ; preds = %9
%25 = load double, double* %10
%26 = fneg double %25
store double %26, double* %20
br label %29
27: ; preds = %9
%28 = load double, double* %10
store double %28, double* %20
br label %29
29: ; preds = %27, %24
%30 = load double, double* %19
%31 = fadd double %30, 1.000000e-09
%32 = call i32 (double, ...) bitcast (i32 (...)* @dint to i32 (double, ...)*)(double %31)
%33 = load i32*, i32** %15
store i32 %32, i32* %33
%34 = load double, double* %19
%35 = load i32*, i32** %15
%36 = load i32, i32* %35
%37 = sitofp i32 %36 to double
%38 = fsub double %34, %37
%39 = fmul double 1.000000e+02, %38
store double %39, double* %19
%40 = load double, double* %19
%41 = fadd double %40, 0x3E7AD7F29ABCAF48
%42 = call i32 (double, ...) bitcast (i32 (...)* @dint to i32 (double, ...)*)(double %41)
%43 = load i32*, i32** %16
store i32 %42, i32* %43
%44 = load double, double* %19
%45 = load i32*, i32** %16
%46 = load i32, i32* %45
%47 = sitofp i32 %46 to double
%48 = fsub double %44, %47
%49 = fmul double 1.000000e+02, %48
%50 = load double*, double** %17
store double %49, double* %50
%51 = load double, double* %20
%52 = fadd double %51, 1.000000e-05
%53 = call i32 (double, ...) bitcast (i32 (...)* @dint to i32 (double, ...)*)(double %52)
%54 = load i32*, i32** %12
store i32 %53, i32* %54
%55 = load double, double* %20
%56 = load i32*, i32** %12
%57 = load i32, i32* %56
%58 = sitofp i32 %57 to double
%59 = fsub double %55, %58
%60 = fmul double 1.000000e+02, %59
store double %60, double* %20
%61 = load double, double* %10
%62 = fcmp olt double %61, 0.000000e+00
br i1 %62, label %63, label %68
63: ; preds = %29
%64 = load i32*, i32** %12
%65 = load i32, i32* %64
%66 = sub nsw i32 0, %65
%67 = load i32*, i32** %12
store i32 %66, i32* %67
br label %68
68: ; preds = %63, %29
%69 = load double, double* %20
%70 = fadd double %69, 1.000000e-03
%71 = call i32 (double, ...) bitcast (i32 (...)* @dint to i32 (double, ...)*)(double %70)
%72 = load i32*, i32** %13
store i32 %71, i32* %72
%73 = load double, double* %20
%74 = load i32*, i32** %13
%75 = load i32, i32* %74
%76 = sitofp i32 %75 to double
%77 = fsub double %73, %76
%78 = fmul double 1.000000e+02, %77
store double %78, double* %20
%79 = load double, double* %20
%80 = fadd double %79, 1.000000e-01
%81 = call i32 (double, ...) bitcast (i32 (...)* @dint to i32 (double, ...)*)(double %80)
%82 = load i32*, i32** %14
store i32 %81, i32* %82
%83 = load i32*, i32** %12
%84 = load i32*, i32** %13
%85 = load i32*, i32** %14
%86 = load i32*, i32** %15
%87 = load i32*, i32** %16
%88 = load double*, double** %17
%89 = load i32, i32* %18
%90 = call i32 (i32*, i32*, i32*, i32*, i32*, double*, i32, ...) bitcast (i32 (...)* @fixdate to i32 (i32*, i32*, i32*, i32*, i32*, double*, i32, ...)*)(i32* %83, i32* %84, i32* %85, i32* %86, i32* %87, double* %88, i32 %89)
ret void
}

LLVM IR (-O2):
define void @dt2i(double %0, double %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6, double* %7, i32 %8) {
%10 = fcmp olt double %0, 0.000000e+00
%11 = fneg double %0
%12 = select i1 %10, double %11, double %0
%13 = fadd double %1, 1.000000e-09
%14 = tail call i32 (double, ...) bitcast (i32 (...)* @dint to i32 (double, ...)*)(double %13)
store i32 %14, i32* %5
%15 = sitofp i32 %14 to double
%16 = fsub double %1, %15
%17 = fmul double %16, 1.000000e+02
%18 = fadd double %17, 0x3E7AD7F29ABCAF48
%19 = tail call i32 (double, ...) bitcast (i32 (...)* @dint to i32 (double, ...)*)(double %18)
store i32 %19, i32* %6
%20 = sitofp i32 %19 to double
%21 = fsub double %17, %20
%22 = fmul double %21, 1.000000e+02
store double %22, double* %7
%23 = fadd double %12, 1.000000e-05
%24 = tail call i32 (double, ...) bitcast (i32 (...)* @dint to i32 (double, ...)*)(double %23)
%25 = sitofp i32 %24 to double
%26 = fsub double %12, %25
%27 = fmul double %26, 1.000000e+02
%28 = sub nsw i32 0, %24
%29 = select i1 %10, i32 %28, i32 %24
store i32 %29, i32* %2
%30 = fadd double %27, 1.000000e-03
%31 = tail call i32 (double, ...) bitcast (i32 (...)* @dint to i32 (double, ...)*)(double %30)
store i32 %31, i32* %3
%32 = sitofp i32 %31 to double
%33 = fsub double %27, %32
%34 = fmul double %33, 1.000000e+02
%35 = fadd double %34, 1.000000e-01
%36 = tail call i32 (double, ...) bitcast (i32 (...)* @dint to i32 (double, ...)*)(double %35)
store i32 %36, i32* %4
%37 = tail call i32 (i32*, i32*, i32*, i32*, i32*, double*, i32, ...) bitcast (i32 (...)* @fixdate to i32 (i32*, i32*, i32*, i32*, i32*, double*, i32, ...)*)(i32* %2, i32* %3, i32* %4, i32* %5, i32* %6, double* %7, i32 %8)
ret void
}