void writeangle(char *descrip, double angle) {
  double d, m, s;
  split_time(angle, &d, &m, &s);
  printf("<TR><TD> %s </TD><TD ALIGN = RIGHT>", descrip);
  printf("%.0f%s %2.0f%s %5.3f%s", d, "&deg", m, "\'", s, "\'\'");
  printf("</TD><TD ALIGN = LEFT></TD></TR>\n");
}


x86 assembly (clang, -O0):
<writeangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
lea    -0x28(%rbp),%rdx
mov    $0x1,%al
call   1040 <split_time@plt>
mov    -0x8(%rbp),%rsi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
lea    0xeb3(%rip),%rdi
lea    0xec3(%rip),%rsi
lea    0xec2(%rip),%rdx
lea    0xeba(%rip),%rcx
mov    $0x3,%al
call   1030 <printf@plt>
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeangle>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbx
lea    0x18(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    $0x1,%al
call   1050 <split_time@plt>
lea    0xeab(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
movsd  0x18(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
lea    0xeac(%rip),%rdi
lea    0xebc(%rip),%rsi
lea    0xebb(%rip),%rdx
lea    0xeb3(%rip),%rcx
mov    $0x3,%al
call   1040 <printf@plt>
lea    0xea8(%rip),%rdi
call   1030 <puts@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"<TR><TD> %s </TD><TD ALIGN = RIGHT>\00"
@.str.1 = [23 x i8] c"%.0f%s %2.0f%s %5.3f%s\00"
@.str.2 = [5 x i8] c"&deg\00"
@.str.3 = [2 x i8] c"'\00"
@.str.4 = [3 x i8] c"''\00"
@.str.5 = [34 x i8] c"</TD><TD ALIGN = LEFT></TD></TR>\0A\00"
define void @writeangle(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store i8* %0, i8** %3
store double %1, double* %4
%8 = load double, double* %4
%9 = call i32 (double, double*, double*, double*, ...) bitcast (i32 (...)* @split_time to i32 (double, double*, double*, double*, ...)*)(double %8, double* %5, double* %6, double* %7)
%10 = load i8*, i8** %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load double, double* %5
%13 = load double, double* %6
%14 = load double, double* %7
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), double %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), double %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), double %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"<TR><TD> %s </TD><TD ALIGN = RIGHT>\00"
@.str.1 = [23 x i8] c"%.0f%s %2.0f%s %5.3f%s\00"
@.str.2 = [5 x i8] c"&deg\00"
@.str.3 = [2 x i8] c"'\00"
@.str.4 = [3 x i8] c"''\00"
@str = [33 x i8] c"</TD><TD ALIGN = LEFT></TD></TR>\00"
define void @writeangle(i8* %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = bitcast double* %3 to i8*
%7 = bitcast double* %4 to i8*
%8 = bitcast double* %5 to i8*
%9 = call i32 (double, double*, double*, double*, ...) bitcast (i32 (...)* @split_time to i32 (double, double*, double*, double*, ...)*)(double %1, double* %3, double* %4, double* %5)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %0)
%11 = load double, double* %3
%12 = load double, double* %4
%13 = load double, double* %5
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), double %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), double %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), double %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret void
}