char *tai2fd(string)
char *string;
{
  double dj0, dj, tsec, dt;
  dj0 = fd2jd(string);
  dt = utdt(dj0);
  dj = dj0 - (dt / 86400.0);
  dt = utdt(dj);
  tsec = fd2ts(string);
  tsec = tsec - dt + 32.184;
  return (ts2fd(tsec));
}


x86 assembly (clang, -O0):
<tai2fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <fd2jd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
call   1060 <utdt@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  0xe81(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x1,%al
call   1060 <utdt@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <fd2ts@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  0xe31(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    $0x1,%al
call   1050 <ts2fd@plt>
cltq
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tai2fd>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <fd2jd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%al
call   1060 <utdt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
divsd  0xe91(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1060 <utdt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <fd2ts@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
subsd  0x8(%rsp),%xmm0
addsd  0xe60(%rip),%xmm0
mov    $0x1,%al
call   1050 <ts2fd@plt>
cltq
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @tai2fd(i8* %0) {
%2 = alloca i8*
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store i8* %0, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @fd2jd to i32 (i8*, ...)*)(i8* %7)
%9 = sitofp i32 %8 to double
store double %9, double* %3
%10 = load double, double* %3
%11 = call i32 (double, ...) bitcast (i32 (...)* @utdt to i32 (double, ...)*)(double %10)
%12 = sitofp i32 %11 to double
store double %12, double* %6
%13 = load double, double* %3
%14 = load double, double* %6
%15 = fdiv double %14, 8.640000e+04
%16 = fsub double %13, %15
store double %16, double* %4
%17 = load double, double* %4
%18 = call i32 (double, ...) bitcast (i32 (...)* @utdt to i32 (double, ...)*)(double %17)
%19 = sitofp i32 %18 to double
store double %19, double* %6
%20 = load i8*, i8** %2
%21 = call i32 (i8*, ...) bitcast (i32 (...)* @fd2ts to i32 (i8*, ...)*)(i8* %20)
%22 = sitofp i32 %21 to double
store double %22, double* %5
%23 = load double, double* %5
%24 = load double, double* %6
%25 = fsub double %23, %24
%26 = fadd double %25, 3.218400e+01
store double %26, double* %5
%27 = load double, double* %5
%28 = call i32 (double, ...) bitcast (i32 (...)* @ts2fd to i32 (double, ...)*)(double %27)
%29 = sext i32 %28 to i64
%30 = inttoptr i64 %29 to i8*
ret i8* %30
}

LLVM IR (-O2):
define i8* @tai2fd(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @fd2jd to i32 (i8*, ...)*)(i8* %0)
%3 = sitofp i32 %2 to double
%4 = tail call i32 (double, ...) bitcast (i32 (...)* @utdt to i32 (double, ...)*)(double %3)
%5 = sitofp i32 %4 to double
%6 = fdiv double %5, 8.640000e+04
%7 = fsub double %3, %6
%8 = tail call i32 (double, ...) bitcast (i32 (...)* @utdt to i32 (double, ...)*)(double %7)
%9 = sitofp i32 %8 to double
%10 = tail call i32 (i8*, ...) bitcast (i32 (...)* @fd2ts to i32 (i8*, ...)*)(i8* %0)
%11 = sitofp i32 %10 to double
%12 = fsub double %11, %9
%13 = fadd double %12, 3.218400e+01
%14 = tail call i32 (double, ...) bitcast (i32 (...)* @ts2fd to i32 (double, ...)*)(double %13)
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to i8*
ret i8* %16
}