void mjd2i(dj, iyr, imon, iday, ihr, imn, sec, ndsec) double dj;
int *iyr;
int *imon;
int *iday;
int *ihr;
int *imn;
double *sec;
int ndsec;
{
  double tsec;
  tsec = jd2ts(dj + 2400000.5);
  ts2i(tsec, iyr, imon, iday, ihr, imn, sec, ndsec);
  return;
}


x86 assembly (clang, -O0):
<mjd2i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x10(%rbp),%eax
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
movsd  0xeb0(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
mov    $0x1,%al
call   1030 <jd2ts@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x38(%rbp),%r9
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
mov    $0x1,%al
call   1040 <ts2i@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mjd2i>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r14
mov    %r8,%r15
mov    %rcx,%r12
mov    %rdx,%r13
mov    %rsi,%rbx
mov    %rdi,%rbp
addsd  0xebb(%rip),%xmm0
mov    $0x1,%al
call   1030 <jd2ts@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    0x40(%rsp),%eax
mov    %eax,(%rsp)
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
mov    %r14,%r9
mov    $0x1,%al
call   1040 <ts2i@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @mjd2i(double %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, double* %6, i32 %7) {
%9 = alloca double
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca double*
%16 = alloca i32
%17 = alloca double
store double %0, double* %9
store i32* %1, i32** %10
store i32* %2, i32** %11
store i32* %3, i32** %12
store i32* %4, i32** %13
store i32* %5, i32** %14
store double* %6, double** %15
store i32 %7, i32* %16
%18 = load double, double* %9
%19 = fadd double %18, 0x41424F8040000000
%20 = call i32 (double, ...) bitcast (i32 (...)* @jd2ts to i32 (double, ...)*)(double %19)
%21 = sitofp i32 %20 to double
store double %21, double* %17
%22 = load double, double* %17
%23 = load i32*, i32** %10
%24 = load i32*, i32** %11
%25 = load i32*, i32** %12
%26 = load i32*, i32** %13
%27 = load i32*, i32** %14
%28 = load double*, double** %15
%29 = load i32, i32* %16
%30 = call i32 (double, i32*, i32*, i32*, i32*, i32*, double*, i32, ...) bitcast (i32 (...)* @ts2i to i32 (double, i32*, i32*, i32*, i32*, i32*, double*, i32, ...)*)(double %22, i32* %23, i32* %24, i32* %25, i32* %26, i32* %27, double* %28, i32 %29)
ret void
}

LLVM IR (-O2):
define void @mjd2i(double %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, double* %6, i32 %7) {
%9 = fadd double %0, 0x41424F8040000000
%10 = tail call i32 (double, ...) bitcast (i32 (...)* @jd2ts to i32 (double, ...)*)(double %9)
%11 = sitofp i32 %10 to double
%12 = tail call i32 (double, i32*, i32*, i32*, i32*, i32*, double*, i32, ...) bitcast (i32 (...)* @ts2i to i32 (double, i32*, i32*, i32*, i32*, i32*, double*, i32, ...)*)(double %11, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, double* %6, i32 %7)
ret void
}