char *tsd2fd(tsec)
double tsec;
{
  double date, time;
  char *thms, *fdate;
  int lfd, nbc;
  ts2dt(tsec, &date, &time);
  fdate = dt2fd(date, time);
  thms = (char *)calloc(16, 1);
  lfd = strlen(fdate);
  nbc = lfd - 11;
  strncpy(thms, fdate + 11, nbc);
  return (thms);
}


x86 assembly (clang, -O0):
<tsd2fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x1,%al
call   1050 <ts2dt@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mov    $0x2,%al
call   1070 <dt2fd@plt>
cltq
mov    %rax,-0x28(%rbp)
mov    $0x10,%edi
mov    $0x1,%esi
call   1060 <calloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
sub    $0xb,%eax
mov    %eax,-0x30(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
add    $0xb,%rsi
movslq -0x30(%rbp),%rdx
call   1030 <strncpy@plt>
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tsd2fd>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    $0x1,%al
call   1050 <ts2dt@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mov    $0x2,%al
call   1070 <dt2fd@plt>
movslq %eax,%rbx
mov    $0x10,%edi
mov    $0x1,%esi
call   1060 <calloc@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1040 <strlen@plt>
add    $0xb,%rbx
add    $0xfffffff5,%eax
movslq %eax,%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <strncpy@plt>
mov    %r14,%rax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @tsd2fd(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store double %0, double* %2
%9 = load double, double* %2
%10 = call i32 (double, double*, double*, ...) bitcast (i32 (...)* @ts2dt to i32 (double, double*, double*, ...)*)(double %9, double* %3, double* %4)
%11 = load double, double* %3
%12 = load double, double* %4
%13 = call i32 (double, double, ...) bitcast (i32 (...)* @dt2fd to i32 (double, double, ...)*)(double %11, double %12)
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i8*
store i8* %15, i8** %6
%16 = call i8* @calloc(i64 16, i64 1)
store i8* %16, i8** %5
%17 = load i8*, i8** %6
%18 = call i64 @strlen(i8* %17)
%19 = trunc i64 %18 to i32
store i32 %19, i32* %7
%20 = load i32, i32* %7
%21 = sub nsw i32 %20, 11
store i32 %21, i32* %8
%22 = load i8*, i8** %5
%23 = load i8*, i8** %6
%24 = getelementptr inbounds i8, i8* %23, i64 11
%25 = load i32, i32* %8
%26 = sext i32 %25 to i64
%27 = call i8* @strncpy(i8* %22, i8* %24, i64 %26)
%28 = load i8*, i8** %5
ret i8* %28
}

LLVM IR (-O2):
define i8* @tsd2fd(double %0) {
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %2 to i8*
%5 = bitcast double* %3 to i8*
%6 = call i32 (double, double*, double*, ...) bitcast (i32 (...)* @ts2dt to i32 (double, double*, double*, ...)*)(double %0, double* %2, double* %3)
%7 = load double, double* %2
%8 = load double, double* %3
%9 = call i32 (double, double, ...) bitcast (i32 (...)* @dt2fd to i32 (double, double, ...)*)(double %7, double %8)
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
%12 = call dereferenceable_or_null(16) i8* @calloc(i64 16, i64 1)
%13 = call i64 @strlen(i8* dereferenceable(1) %11)
%14 = getelementptr inbounds i8, i8* %11, i64 11
%15 = shl i64 %13, 32
%16 = add i64 %15, -47244640256
%17 = ashr exact i64 %16, 32
%18 = call i8* @strncpy(i8* dereferenceable(1) %12, i8* %14, i64 %17)
ret i8* %12
}