#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ ctime2jd(double, double *);
int /*<<< orphan*/ eraTaitt(double, double, double *, double *);
int /*<<< orphan*/ eraUtctai(double, double, double *, double *);
void ctime2jdtt(double ctime, double jd_tt[2]) {
  double jd_utc[2], jd_tai[2];
  ctime2jd(ctime, jd_utc);
  eraUtctai(jd_utc[0], jd_utc[1], &jd_tai[0], &jd_tai[1]);
  eraTaitt(jd_tai[0], jd_tai[1], &jd_tt[0], &jd_tt[1]);
}


x86 assembly (clang, -O0):
<ctime2jdtt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0x20(%rbp),%rdi
call   1040 <ctime2jd@plt>
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    -0x30(%rbp),%rdi
lea    -0x30(%rbp),%rsi
add    $0x8,%rsi
call   1030 <eraUtctai@plt>
movsd  -0x30(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1050 <eraTaitt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctime2jdtt>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbx
lea    0x10(%rsp),%rdi
call   1040 <ctime2jd@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
lea    0x8(%rsp),%rsi
mov    %rsp,%rdi
call   1030 <eraUtctai@plt>
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
lea    0x8(%rbx),%rsi
mov    %rbx,%rdi
call   1050 <eraTaitt@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @ctime2jdtt(double %0, double* %1) {
%3 = alloca double
%4 = alloca double*
%5 = alloca [2 x double]
%6 = alloca [2 x double]
store double %0, double* %3
store double* %1, double** %4
%7 = load double, double* %3
%8 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 0
%9 = call i32 @ctime2jd(double %7, double* %8)
%10 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 0
%11 = load double, double* %10
%12 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 1
%13 = load double, double* %12
%14 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 0
%15 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 1
%16 = call i32 @eraUtctai(double %11, double %13, double* %14, double* %15)
%17 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 0
%18 = load double, double* %17
%19 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 1
%20 = load double, double* %19
%21 = load double*, double** %4
%22 = getelementptr inbounds double, double* %21, i64 0
%23 = load double*, double** %4
%24 = getelementptr inbounds double, double* %23, i64 1
%25 = call i32 @eraTaitt(double %18, double %20, double* %22, double* %24)
ret void
}

LLVM IR (-O2):
define void @ctime2jdtt(double %0, double* %1) {
%3 = alloca [2 x double]
%4 = alloca [2 x double]
%5 = bitcast [2 x double]* %3 to i8*
%6 = bitcast [2 x double]* %4 to i8*
%7 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 0
%8 = call i32 @ctime2jd(double %0, double* %7)
%9 = load double, double* %7
%10 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 1
%11 = load double, double* %10
%12 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 0
%13 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 1
%14 = call i32 @eraUtctai(double %9, double %11, double* %12, double* %13)
%15 = load double, double* %12
%16 = load double, double* %13
%17 = getelementptr inbounds double, double* %1, i64 1
%18 = call i32 @eraTaitt(double %15, double %16, double* %1, double* %17)
ret void
}