long double bits(x)
long double x;
{
  int i, j;
  unsigned short dd[4], ee[10];
  char strx[40];
  unsigned short *p;
  p = (unsigned short *)&x;
  for (i = 0; i < 6; i++)
    ee[i] = *p++;
  j = 0;
  for (i = 0; i < 6; i++) {
    printf("0x%04x,", ee[i] & 0xffff);
    if (++j > 7) {
      j = 0;
      printf("\n");
    }
  }
  printf("\n");
  *((double *)dd) = x;
  printf("double: ");
  for (i = 0; i < 4; i++)
    printf("0x%04x,", dd[i] & 0xffff);
  printf("\n");
  printf("double -> long double: ");
  *(long double *)ee = *(double *)dd;
  for (i = 0; i < 6; i++)
    printf("0x%04x,", ee[i] & 0xffff);
  printf("\n");
  e53toasc(dd, strx, 16);
  printf("e53toasc: %s\n", strx);
  printf("Native printf: %.17e\n", *(double *)dd);
  *((float *)dd) = x;
  printf("float: ");
  for (i = 0; i < 2; i++)
    printf("0x%04x,", dd[i] & 0xffff);
  printf("\n");
  e24toe(dd, ee);
  printf("e24toe: ");
  for (i = 0; i < 6; i++)
    printf("0x%04x,", ee[i] & 0xffff);
  printf("\n");
  e24toasc(dd, strx, 16);
  printf("e24toasc: %s\n", strx);
  return (x);
}


x86 assembly (clang, -O0):
<bits>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x78(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x6,-0x14(%rbp)
jge    1193 <bits+0x53>
mov    -0x78(%rbp),%rax
mov    %rax,%rcx
add    $0x2,%rcx
mov    %rcx,-0x78(%rbp)
mov    (%rax),%cx
movslq -0x14(%rbp),%rax
mov    %cx,-0x40(%rbp,%rax,2)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1160 <bits+0x20>
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x6,-0x14(%rbp)
jge    1202 <bits+0xc2>
movslq -0x14(%rbp),%rax
movzwl -0x40(%rbp,%rax,2),%esi
and    $0xffff,%esi
lea    0xe3f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
cmp    $0x7,%eax
jle    11ef <bits+0xaf>
movl   $0x0,-0x18(%rbp)
lea    0xe5a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    11f4 <bits+0xb4>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11a1 <bits+0x61>
lea    0xe39(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
fldt   -0x10(%rbp)
fstpl  -0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
lea    0xdf0(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jge    126a <bits+0x12a>
movslq -0x14(%rbp),%rax
movzwl -0x20(%rbp,%rax,2),%esi
and    $0xffff,%esi
lea    0xdab(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1235 <bits+0xf5>
lea    0xdd1(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x85(%rbp)
call   1060 <printf@plt>
mov    -0x85(%rbp),%al
lea    0xd7d(%rip),%rdi
call   1060 <printf@plt>
fldl   -0x20(%rbp)
fstpt  -0x40(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x6,-0x14(%rbp)
jge    12d2 <bits+0x192>
movslq -0x14(%rbp),%rax
movzwl -0x40(%rbp,%rax,2),%esi
and    $0xffff,%esi
lea    0xd43(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    129d <bits+0x15d>
lea    0xd69(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x86(%rbp)
call   1060 <printf@plt>
mov    -0x86(%rbp),%al
lea    -0x20(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    %rsi,-0x90(%rbp)
mov    $0x10,%edx
call   1050 <e53toasc@plt>
mov    -0x90(%rbp),%rsi
mov    -0x86(%rbp),%al
lea    0xd07(%rip),%rdi
call   1060 <printf@plt>
movsd  -0x20(%rbp),%xmm0
lea    0xd04(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
fldt   -0x10(%rbp)
fstps  -0x84(%rbp)
movss  -0x84(%rbp),%xmm0
ff
movss  %xmm0,-0x20(%rbp)
lea    0xcf6(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
jge    1391 <bits+0x251>
movslq -0x14(%rbp),%rax
movzwl -0x20(%rbp,%rax,2),%esi
and    $0xffff,%esi
lea    0xc84(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    135c <bits+0x21c>
lea    0xcaa(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x20(%rbp),%rdi
lea    -0x40(%rbp),%rsi
mov    $0x0,%al
call   1030 <e24toe@plt>
lea    0xc97(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x6,-0x14(%rbp)
jge    13f8 <bits+0x2b8>
movslq -0x14(%rbp),%rax
movzwl -0x40(%rbp,%rax,2),%esi
and    $0xffff,%esi
lea    0xc1d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    13c3 <bits+0x283>
lea    0xc43(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x91(%rbp)
call   1060 <printf@plt>
mov    -0x91(%rbp),%al
lea    -0x20(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    %rsi,-0xa0(%rbp)
mov    $0x10,%edx
call   1040 <e24toasc@plt>
mov    -0xa0(%rbp),%rsi
mov    -0x91(%rbp),%al
lea    0xc16(%rip),%rdi
call   1060 <printf@plt>
fldt   -0x10(%rbp)
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bits>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xa0,%rsp
fldt   0xd0(%rsp)
fld    %st(0)
fstpt  0x2c(%rsp)
fstpt  0x50(%rsp)
movzwl 0x58(%rsp),%r14d
mov    0x50(%rsp),%rbp
movzwl %bp,%esi
lea    0xe7b(%rip),%r12
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %ebp,%esi
shr    $0x10,%esi
mov    %rbp,%rbx
shr    $0x20,%rbx
shr    $0x30,%rbp
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
movzwl %bx,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r12,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r12,%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r12,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
fldt   0x2c(%rsp)
fstpl  0x68(%rsp)
movsd  0x68(%rsp),%xmm0
movsd  %xmm0,0x38(%rsp)
movsd  %xmm0,0x8(%rsp)
lea    0xe11(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
movq   0x38(%rsp),%xmm0
movq   %xmm0,%rbp
movzwl %bp,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %ebp,%esi
shr    $0x10,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbp,%rax
shr    $0x20,%rax
movzwl %ax,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
shr    $0x30,%rbp
mov    %r12,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xd9f(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
movsd  0x38(%rsp),%xmm0
movsd  %xmm0,0x60(%rsp)
fldl   0x60(%rsp)
fld    %st(0)
fstpt  0x40(%rsp)
movzwl 0x48(%rsp),%r14d
mov    0x40(%rsp),%rbp
fstpt  0x10(%rsp)
movzwl %bp,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %ebp,%esi
shr    $0x10,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbp,%rax
shr    $0x20,%rax
movzwl %ax,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
shr    $0x30,%rbp
mov    %r12,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r12,%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r12,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x8(%rsp),%r15
lea    0x70(%rsp),%r14
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0x10,%edx
xor    %eax,%eax
call   1060 <e53toasc@plt>
lea    0xd05(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
movsd  0x8(%rsp),%xmm0
lea    0xcfc(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
fldt   0x2c(%rsp)
fstps  0x8(%rsp)
lea    0xcfc(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
movzwl 0x8(%rsp),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
movzwl 0xa(%rsp),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x10(%rsp),%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <e24toe@plt>
lea    0xcbf(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
movzwl 0x10(%rsp),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
movzwl 0x12(%rsp),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
movzwl 0x14(%rsp),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
movzwl 0x16(%rsp),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
movzwl 0x18(%rsp),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
movzwl 0x1a(%rsp),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0x10,%edx
xor    %eax,%eax
call   1050 <e24toasc@plt>
lea    0xc44(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
fldt   0x2c(%rsp)
add    $0xa0,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"0x%04x,\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [9 x i8] c"double: \00"
@.str.3 = [24 x i8] c"double -> long double: \00"
@.str.4 = [14 x i8] c"e53toasc: %s\0A\00"
@.str.5 = [22 x i8] c"Native printf: %.17e\0A\00"
@.str.6 = [8 x i8] c"float: \00"
@.str.7 = [9 x i8] c"e24toe: \00"
@.str.8 = [14 x i8] c"e24toasc: %s\0A\00"
define x86_fp80 @bits(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca i32
%4 = alloca i32
%5 = alloca [4 x i16]
%6 = alloca [10 x i16]
%7 = alloca [40 x i8]
%8 = alloca i16*
store x86_fp80 %0, x86_fp80* %2
%9 = bitcast x86_fp80* %2 to i16*
store i16* %9, i16** %8
store i32 0, i32* %3
br label %10
10: ; preds = %20, %1
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 6
br i1 %12, label %13, label %23
13: ; preds = %10
%14 = load i16*, i16** %8
%15 = getelementptr inbounds i16, i16* %14, i32 1
store i16* %15, i16** %8
%16 = load i16, i16* %14
%17 = load i32, i32* %3
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 %18
store i16 %16, i16* %19
br label %20
20: ; preds = %13
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 1
store i32 %22, i32* %3
br label %10
23: ; preds = %10
store i32 0, i32* %4
store i32 0, i32* %3
br label %24
24: ; preds = %41, %23
%25 = load i32, i32* %3
%26 = icmp slt i32 %25, 6
br i1 %26, label %27, label %44
27: ; preds = %24
%28 = load i32, i32* %3
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 %29
%31 = load i16, i16* %30
%32 = zext i16 %31 to i32
%33 = and i32 %32, 65535
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %33)
%35 = load i32, i32* %4
%36 = add nsw i32 %35, 1
store i32 %36, i32* %4
%37 = icmp sgt i32 %36, 7
br i1 %37, label %38, label %40
38: ; preds = %27
store i32 0, i32* %4
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %40
40: ; preds = %38, %27
br label %41
41: ; preds = %40
%42 = load i32, i32* %3
%43 = add nsw i32 %42, 1
store i32 %43, i32* %3
br label %24
44: ; preds = %24
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%46 = load x86_fp80, x86_fp80* %2
%47 = fptrunc x86_fp80 %46 to double
%48 = getelementptr inbounds [4 x i16], [4 x i16]* %5, i64 0, i64 0
%49 = bitcast i16* %48 to double*
store double %47, double* %49
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %3
br label %51
51: ; preds = %62, %44
%52 = load i32, i32* %3
%53 = icmp slt i32 %52, 4
br i1 %53, label %54, label %65
54: ; preds = %51
%55 = load i32, i32* %3
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [4 x i16], [4 x i16]* %5, i64 0, i64 %56
%58 = load i16, i16* %57
%59 = zext i16 %58 to i32
%60 = and i32 %59, 65535
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %60)
br label %62
62: ; preds = %54
%63 = load i32, i32* %3
%64 = add nsw i32 %63, 1
store i32 %64, i32* %3
br label %51
65: ; preds = %51
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%68 = getelementptr inbounds [4 x i16], [4 x i16]* %5, i64 0, i64 0
%69 = bitcast i16* %68 to double*
%70 = load double, double* %69
%71 = fpext double %70 to x86_fp80
%72 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 0
%73 = bitcast i16* %72 to x86_fp80*
store x86_fp80 %71, x86_fp80* %73
store i32 0, i32* %3
br label %74
74: ; preds = %85, %65
%75 = load i32, i32* %3
%76 = icmp slt i32 %75, 6
br i1 %76, label %77, label %88
77: ; preds = %74
%78 = load i32, i32* %3
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 %79
%81 = load i16, i16* %80
%82 = zext i16 %81 to i32
%83 = and i32 %82, 65535
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %83)
br label %85
85: ; preds = %77
%86 = load i32, i32* %3
%87 = add nsw i32 %86, 1
store i32 %87, i32* %3
br label %74
88: ; preds = %74
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%90 = getelementptr inbounds [4 x i16], [4 x i16]* %5, i64 0, i64 0
%91 = getelementptr inbounds [40 x i8], [40 x i8]* %7, i64 0, i64 0
%92 = call i32 (i16*, i8*, i32, ...) bitcast (i32 (...)* @e53toasc to i32 (i16*, i8*, i32, ...)*)(i16* %90, i8* %91, i32 16)
%93 = getelementptr inbounds [40 x i8], [40 x i8]* %7, i64 0, i64 0
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i8* %93)
%95 = getelementptr inbounds [4 x i16], [4 x i16]* %5, i64 0, i64 0
%96 = bitcast i16* %95 to double*
%97 = load double, double* %96
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), double %97)
%99 = load x86_fp80, x86_fp80* %2
%100 = fptrunc x86_fp80 %99 to float
%101 = getelementptr inbounds [4 x i16], [4 x i16]* %5, i64 0, i64 0
%102 = bitcast i16* %101 to float*
store float %100, float* %102
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %3
br label %104
104: ; preds = %115, %88
%105 = load i32, i32* %3
%106 = icmp slt i32 %105, 2
br i1 %106, label %107, label %118
107: ; preds = %104
%108 = load i32, i32* %3
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds [4 x i16], [4 x i16]* %5, i64 0, i64 %109
%111 = load i16, i16* %110
%112 = zext i16 %111 to i32
%113 = and i32 %112, 65535
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %113)
br label %115
115: ; preds = %107
%116 = load i32, i32* %3
%117 = add nsw i32 %116, 1
store i32 %117, i32* %3
br label %104
118: ; preds = %104
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%120 = getelementptr inbounds [4 x i16], [4 x i16]* %5, i64 0, i64 0
%121 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 0
%122 = call i32 (i16*, i16*, ...) bitcast (i32 (...)* @e24toe to i32 (i16*, i16*, ...)*)(i16* %120, i16* %121)
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
store i32 0, i32* %3
br label %124
124: ; preds = %135, %118
%125 = load i32, i32* %3
%126 = icmp slt i32 %125, 6
br i1 %126, label %127, label %138
127: ; preds = %124
%128 = load i32, i32* %3
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 %129
%131 = load i16, i16* %130
%132 = zext i16 %131 to i32
%133 = and i32 %132, 65535
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %133)
br label %135
135: ; preds = %127
%136 = load i32, i32* %3
%137 = add nsw i32 %136, 1
store i32 %137, i32* %3
br label %124
138: ; preds = %124
%139 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%140 = getelementptr inbounds [4 x i16], [4 x i16]* %5, i64 0, i64 0
%141 = getelementptr inbounds [40 x i8], [40 x i8]* %7, i64 0, i64 0
%142 = call i32 (i16*, i8*, i32, ...) bitcast (i32 (...)* @e24toasc to i32 (i16*, i8*, i32, ...)*)(i16* %140, i8* %141, i32 16)
%143 = getelementptr inbounds [40 x i8], [40 x i8]* %7, i64 0, i64 0
%144 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8* %143)
%145 = load x86_fp80, x86_fp80* %2
ret x86_fp80 %145
}

LLVM IR (-O2):
@.str = [8 x i8] c"0x%04x,\00"
@.str.2 = [9 x i8] c"double: \00"
@.str.3 = [24 x i8] c"double -> long double: \00"
@.str.4 = [14 x i8] c"e53toasc: %s\0A\00"
@.str.5 = [22 x i8] c"Native printf: %.17e\0A\00"
@.str.6 = [8 x i8] c"float: \00"
@.str.7 = [9 x i8] c"e24toe: \00"
@.str.8 = [14 x i8] c"e24toasc: %s\0A\00"
define x86_fp80 @bits(x86_fp80 %0) {
%2 = alloca double
%3 = alloca [10 x i16]
%4 = alloca [40 x i8]
%5 = bitcast double* %2 to i8*
%6 = bitcast [10 x i16]* %3 to i8*
%7 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 0
%8 = bitcast [10 x i16]* %3 to x86_fp80*
%9 = getelementptr inbounds [10 x i16], [10 x i16]* %3, i64 0, i64 0
%10 = bitcast x86_fp80 %0 to i80
%11 = trunc i80 %10 to i32
%12 = and i32 %11, 65535
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = trunc i80 %10 to i32
%15 = lshr i32 %14, 16
%16 = lshr i80 %10, 32
%17 = trunc i80 %16 to i32
%18 = lshr i80 %10, 48
%19 = trunc i80 %18 to i32
%20 = lshr i80 %10, 64
%21 = trunc i80 %20 to i32
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %15)
%23 = and i32 %17, 65535
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %23)
%25 = and i32 %19, 65535
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %25)
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %21)
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 0)
%29 = getelementptr inbounds [10 x i16], [10 x i16]* %3, i64 0, i64 4
%30 = getelementptr inbounds [10 x i16], [10 x i16]* %3, i64 0, i64 3
%31 = getelementptr inbounds [10 x i16], [10 x i16]* %3, i64 0, i64 2
%32 = getelementptr inbounds [10 x i16], [10 x i16]* %3, i64 0, i64 1
%33 = getelementptr inbounds [10 x i16], [10 x i16]* %3, i64 0, i64 5
%34 = bitcast double* %2 to [4 x i16]*
%35 = tail call i32 @putchar(i32 10)
%36 = fptrunc x86_fp80 %0 to double
store double %36, double* %2
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%38 = bitcast double* %2 to i16*
%39 = bitcast double %36 to i64
%40 = trunc i64 %39 to i32
%41 = and i32 %40, 65535
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %41)
%43 = getelementptr inbounds [4 x i16], [4 x i16]* %34, i64 0, i64 1
%44 = trunc i64 %39 to i32
%45 = lshr i32 %44, 16
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %45)
%47 = lshr i64 %39, 32
%48 = trunc i64 %47 to i32
%49 = and i32 %48, 65535
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %49)
%51 = lshr i64 %39, 48
%52 = trunc i64 %51 to i32
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %52)
%54 = tail call i32 @putchar(i32 10)
%55 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%56 = fpext double %36 to x86_fp80
store x86_fp80 %56, x86_fp80* %8
%57 = bitcast x86_fp80 %56 to i80
%58 = trunc i80 %57 to i32
%59 = and i32 %58, 65535
%60 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %59)
%61 = trunc i80 %57 to i32
%62 = lshr i32 %61, 16
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %62)
%64 = lshr i80 %57, 32
%65 = trunc i80 %64 to i32
%66 = and i32 %65, 65535
%67 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %66)
%68 = lshr i80 %57, 48
%69 = trunc i80 %68 to i32
%70 = and i32 %69, 65535
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %70)
%72 = lshr i80 %57, 64
%73 = trunc i80 %72 to i32
%74 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %73)
%75 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 0)
%76 = bitcast double* %2 to i16*
%77 = tail call i32 @putchar(i32 10)
%78 = call i32 (i16*, i8*, i32, ...) bitcast (i32 (...)* @e53toasc to i32 (i16*, i8*, i32, ...)*)(i16* %76, i8* %7, i32 16)
%79 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i8* %7)
%80 = load double, double* %2
%81 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), double %80)
%82 = fptrunc x86_fp80 %0 to float
%83 = bitcast double* %2 to float*
store float %82, float* %83
%84 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%85 = load i16, i16* %38
%86 = zext i16 %85 to i32
%87 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %86)
%88 = load i16, i16* %43
%89 = zext i16 %88 to i32
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %89)
%91 = call i32 @putchar(i32 10)
%92 = call i32 (i16*, i16*, ...) bitcast (i32 (...)* @e24toe to i32 (i16*, i16*, ...)*)(i16* %76, i16* %9)
%93 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%94 = load i16, i16* %9
%95 = zext i16 %94 to i32
%96 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %95)
%97 = load i16, i16* %32
%98 = zext i16 %97 to i32
%99 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %98)
%100 = load i16, i16* %31
%101 = zext i16 %100 to i32
%102 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %101)
%103 = load i16, i16* %30
%104 = zext i16 %103 to i32
%105 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %104)
%106 = load i16, i16* %29
%107 = zext i16 %106 to i32
%108 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %107)
%109 = load i16, i16* %33
%110 = zext i16 %109 to i32
%111 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %110)
%112 = call i32 @putchar(i32 10)
%113 = call i32 (i16*, i8*, i32, ...) bitcast (i32 (...)* @e24toasc to i32 (i16*, i8*, i32, ...)*)(i16* %76, i8* %7, i32 16)
%114 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8* %7)
ret x86_fp80 %0
}