char *eqstrn(dra, ddec)
double dra;
double ddec;
{
  char *eqcoor;
  char decp;
  int rah, irm, decd, decm;
  double xpos, ypos, xp, yp, ras, decs;
  xpos = dra / 15.0;
  rah = (int)xpos;
  xp = (double)60.0 * (xpos - (double)rah);
  irm = (int)xp;
  ras = (double)60.0 * (xp - (double)irm);
  if (ddec < 0) {
    ypos = -ddec;
    decp = '-';
  } else {
    decp = '+';
    ypos = ddec;
  }
  decd = (int)ypos;
  yp = (double)60.0 * (ypos - (double)decd);
  decm = (int)yp;
  decs = (double)60.0 * (yp - (double)decm);
  eqcoor = malloc(32);
  (void)sprintf(eqcoor, "%02d:%02d:%06.3f %c%02d:%02d:%05.2f", rah, irm, ras,
                decp, decd, decm, decs);
  if (eqcoor[6] == ' ')
    eqcoor[6] = '0';
  if (eqcoor[20] == ' ')
    eqcoor[20] = '0';
  return (eqcoor);
}


x86 assembly (clang, -O0):
<eqstrn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xec9(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
cvttsd2si -0x38(%rbp),%eax
mov    %eax,-0x20(%rbp)
movsd  -0x38(%rbp),%xmm1
cvtsi2sdl -0x20(%rbp),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe9a(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
cvttsd2si -0x48(%rbp),%eax
mov    %eax,-0x24(%rbp)
movsd  -0x48(%rbp),%xmm1
cvtsi2sdl -0x24(%rbp),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe73(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11ce <eqstrn+0xae>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x40(%rbp)
movb   $0x2d,-0x19(%rbp)
jmp    11dc <eqstrn+0xbc>
movb   $0x2b,-0x19(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
cvttsd2si -0x40(%rbp),%eax
mov    %eax,-0x28(%rbp)
movsd  -0x40(%rbp),%xmm1
cvtsi2sdl -0x28(%rbp),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe06(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
cvttsd2si -0x50(%rbp),%eax
mov    %eax,-0x2c(%rbp)
movsd  -0x50(%rbp),%xmm1
cvtsi2sdl -0x2c(%rbp),%xmm0
subsd  %xmm0,%xmm1
movsd  0xddf(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    $0x20,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%edx
mov    -0x24(%rbp),%ecx
movsd  -0x58(%rbp),%xmm0
movsbl -0x19(%rbp),%r8d
mov    -0x28(%rbp),%r9d
mov    -0x2c(%rbp),%eax
movsd  -0x60(%rbp),%xmm1
lea    0xdb1(%rip),%rsi
mov    %eax,(%rsp)
mov    $0x2,%al
call   1040 <sprintf@plt>
mov    -0x18(%rbp),%rax
movsbl 0x6(%rax),%eax
cmp    $0x20,%eax
jne    1282 <eqstrn+0x162>
mov    -0x18(%rbp),%rax
movb   $0x30,0x6(%rax)
mov    -0x18(%rbp),%rax
movsbl 0x14(%rax),%eax
cmp    $0x20,%eax
jne    129b <eqstrn+0x17b>
mov    -0x18(%rbp),%rax
movb   $0x30,0x14(%rax)
mov    -0x18(%rbp),%rax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eqstrn>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
divsd  0xeca(%rip),%xmm0
cvttsd2si %xmm0,%r14d
cvttpd2dq %xmm0,%xmm2
cvtdq2pd %xmm2,%xmm2
subsd  %xmm2,%xmm0
movsd  0xeb9(%rip),%xmm2
mulsd  %xmm2,%xmm0
cvttsd2si %xmm0,%r15d
cvttpd2dq %xmm0,%xmm3
cvtdq2pd %xmm3,%xmm3
subsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm0
movapd %xmm0,0x20(%rsp)
xorpd  %xmm0,%xmm0
xor    %eax,%eax
ucomisd %xmm1,%xmm0
seta   %cl
jbe    1185 <eqstrn+0x65>
xorpd  0xe8b(%rip),%xmm1
mov    %cl,%al
lea    (%rax,%rax,1),%r12d
add    $0x2b,%r12d
cvttsd2si %xmm1,%r13d
cvttpd2dq %xmm1,%xmm0
cvtdq2pd %xmm0,%xmm0
subsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
cvttsd2si %xmm1,%ebp
cvttpd2dq %xmm1,%xmm0
cvtdq2pd %xmm0,%xmm0
subsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
movapd %xmm1,0x10(%rsp)
mov    $0x20,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
mov    %ebp,(%rsp)
lea    0xe4b(%rip),%rsi
mov    %rax,%rdi
mov    %r14d,%edx
mov    %r15d,%ecx
movaps 0x20(%rsp),%xmm0
mov    %r12d,%r8d
mov    %r13d,%r9d
movaps 0x10(%rsp),%xmm1
mov    $0x2,%al
call   1040 <sprintf@plt>
cmpb   $0x20,0x6(%rbx)
jne    11ff <eqstrn+0xdf>
movb   $0x30,0x6(%rbx)
cmpb   $0x20,0x14(%rbx)
jne    1209 <eqstrn+0xe9>
movb   $0x30,0x14(%rbx)
mov    %rbx,%rax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [36 x i8] c"%02d:%02d:%06.3f %c%02d:%02d:%05.2f\00"
define i8* @eqstrn(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
store double %0, double* %3
store double %1, double* %4
%17 = load double, double* %3
%18 = fdiv double %17, 1.500000e+01
store double %18, double* %11
%19 = load double, double* %11
%20 = fptosi double %19 to i32
store i32 %20, i32* %7
%21 = load double, double* %11
%22 = load i32, i32* %7
%23 = sitofp i32 %22 to double
%24 = fsub double %21, %23
%25 = fmul double 6.000000e+01, %24
store double %25, double* %13
%26 = load double, double* %13
%27 = fptosi double %26 to i32
store i32 %27, i32* %8
%28 = load double, double* %13
%29 = load i32, i32* %8
%30 = sitofp i32 %29 to double
%31 = fsub double %28, %30
%32 = fmul double 6.000000e+01, %31
store double %32, double* %15
%33 = load double, double* %4
%34 = fcmp olt double %33, 0.000000e+00
br i1 %34, label %35, label %38
35: ; preds = %2
%36 = load double, double* %4
%37 = fneg double %36
store double %37, double* %12
store i8 45, i8* %6
br label %40
38: ; preds = %2
store i8 43, i8* %6
%39 = load double, double* %4
store double %39, double* %12
br label %40
40: ; preds = %38, %35
%41 = load double, double* %12
%42 = fptosi double %41 to i32
store i32 %42, i32* %9
%43 = load double, double* %12
%44 = load i32, i32* %9
%45 = sitofp i32 %44 to double
%46 = fsub double %43, %45
%47 = fmul double 6.000000e+01, %46
store double %47, double* %14
%48 = load double, double* %14
%49 = fptosi double %48 to i32
store i32 %49, i32* %10
%50 = load double, double* %14
%51 = load i32, i32* %10
%52 = sitofp i32 %51 to double
%53 = fsub double %50, %52
%54 = fmul double 6.000000e+01, %53
store double %54, double* %16
%55 = call i8* @malloc(i64 32)
store i8* %55, i8** %5
%56 = load i8*, i8** %5
%57 = load i32, i32* %7
%58 = load i32, i32* %8
%59 = load double, double* %15
%60 = load i8, i8* %6
%61 = sext i8 %60 to i32
%62 = load i32, i32* %9
%63 = load i32, i32* %10
%64 = load double, double* %16
%65 = call i32 (i8*, i8*, ...) @sprintf(i8* %56, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %57, i32 %58, double %59, i32 %61, i32 %62, i32 %63, double %64)
%66 = load i8*, i8** %5
%67 = getelementptr inbounds i8, i8* %66, i64 6
%68 = load i8, i8* %67
%69 = sext i8 %68 to i32
%70 = icmp eq i32 %69, 32
br i1 %70, label %71, label %74
71: ; preds = %40
%72 = load i8*, i8** %5
%73 = getelementptr inbounds i8, i8* %72, i64 6
store i8 48, i8* %73
br label %74
74: ; preds = %71, %40
%75 = load i8*, i8** %5
%76 = getelementptr inbounds i8, i8* %75, i64 20
%77 = load i8, i8* %76
%78 = sext i8 %77 to i32
%79 = icmp eq i32 %78, 32
br i1 %79, label %80, label %83
80: ; preds = %74
%81 = load i8*, i8** %5
%82 = getelementptr inbounds i8, i8* %81, i64 20
store i8 48, i8* %82
br label %83
83: ; preds = %80, %74
%84 = load i8*, i8** %5
ret i8* %84
}

LLVM IR (-O2):
@.str = [36 x i8] c"%02d:%02d:%06.3f %c%02d:%02d:%05.2f\00"
define noalias i8* @eqstrn(double %0, double %1) {
%3 = fdiv double %0, 1.500000e+01
%4 = fptosi double %3 to i32
%5 = sitofp i32 %4 to double
%6 = fsub double %3, %5
%7 = fmul double %6, 6.000000e+01
%8 = fptosi double %7 to i32
%9 = sitofp i32 %8 to double
%10 = fsub double %7, %9
%11 = fmul double %10, 6.000000e+01
%12 = fcmp olt double %1, 0.000000e+00
%13 = fneg double %1
%14 = select i1 %12, double %13, double %1
%15 = select i1 %12, i32 45, i32 43
%16 = fptosi double %14 to i32
%17 = sitofp i32 %16 to double
%18 = fsub double %14, %17
%19 = fmul double %18, 6.000000e+01
%20 = fptosi double %19 to i32
%21 = sitofp i32 %20 to double
%22 = fsub double %19, %21
%23 = fmul double %22, 6.000000e+01
%24 = tail call dereferenceable_or_null(32) i8* @malloc(i64 32)
%25 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %24, i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %8, double %11, i32 %15, i32 %16, i32 %20, double %23)
%26 = getelementptr inbounds i8, i8* %24, i64 6
%27 = load i8, i8* %26
%28 = icmp eq i8 %27, 32
br i1 %28, label %29, label %30
29: ; preds = %2
store i8 48, i8* %26
br label %30
30: ; preds = %29, %2
%31 = getelementptr inbounds i8, i8* %24, i64 20
%32 = load i8, i8* %31
%33 = icmp eq i8 %32, 32
br i1 %33, label %34, label %35
34: ; preds = %30
store i8 48, i8* %31
br label %35
35: ; preds = %34, %30
ret i8* %24
}