int main() {
  float f = 1.2e+38;
  printf("value %10e\n", f);
  printf("all bits %45s\n", get_bits_float(f));
  unsigned int exp = get_exp(f);
  printf("exp  %15d %33s\n", exp, get_bits_int(exp));
  unsigned int frac = get_frac(f);
  printf("frac %15d %33s\n", frac, get_bits_int(frac));
  unsigned int sign = get_sign(f);
  printf("sign %15d %33s\n", sign, get_bits_int(sign));
  if (is_normalized(f)) {
    printf("%e is normalized\n", f);
  } else if (is_special(f)) {
    printf("%e is special\n", f);
  } else if (is_denormalized(f)) {
    printf("%e is denormalized\n", f);
  }
  printf("E = %d\n", get_E(f));
  printf("M = %s\n", get_M(f));
  printf("S = %d\n", get_s(f));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xe29(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe18(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   10c0 <get_bits_float@plt>
mov    %eax,%esi
lea    0xe04(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1080 <get_exp@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x0,%al
call   10b0 <get_bits_int@plt>
mov    -0x20(%rbp),%esi
mov    %eax,%edx
lea    0xddd(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1050 <get_frac@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x0,%al
call   10b0 <get_bits_int@plt>
mov    -0x1c(%rbp),%esi
mov    %eax,%edx
lea    0xdb7(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1070 <get_sign@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    $0x0,%al
call   10b0 <get_bits_int@plt>
mov    -0x18(%rbp),%esi
mov    %eax,%edx
lea    0xd91(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   10d0 <is_normalized@plt>
cmp    $0x0,%eax
je     12ea <main+0x12a>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd71(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
jmp    1359 <main+0x199>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1040 <is_special@plt>
cmp    $0x0,%eax
je     131f <main+0x15f>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd4e(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
jmp    1354 <main+0x194>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   10e0 <is_denormalized@plt>
cmp    $0x0,%eax
je     134f <main+0x18f>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd28(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
jmp    1354 <main+0x194>
jmp    1359 <main+0x199>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1090 <get_E@plt>
mov    %eax,%esi
lea    0xd12(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   10a0 <get_M@plt>
mov    %eax,%esi
lea    0xcfa(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1030 <get_s@plt>
mov    %eax,%esi
lea    0xce2(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xe40(%rip),%rdi
movsd  0xe30(%rip),%xmm0
mov    $0x1,%al
call   1060 <printf@plt>
movsd  0xe21(%rip),%xmm0
mov    $0x1,%al
call   10c0 <get_bits_float@plt>
lea    0xe27(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
movsd  0xe02(%rip),%xmm0
mov    $0x1,%al
call   1080 <get_exp@plt>
mov    %eax,%ebx
mov    %eax,%edi
xor    %eax,%eax
call   10b0 <get_bits_int@plt>
lea    0xe0c(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
movsd  0xdd6(%rip),%xmm0
mov    $0x1,%al
call   1050 <get_frac@plt>
mov    %eax,%ebx
mov    %eax,%edi
xor    %eax,%eax
call   10b0 <get_bits_int@plt>
lea    0xdf0(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
movsd  0xdaa(%rip),%xmm0
mov    $0x1,%al
call   1070 <get_sign@plt>
mov    %eax,%ebx
mov    %eax,%edi
xor    %eax,%eax
call   10b0 <get_bits_int@plt>
lea    0xdd4(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <printf@plt>
movsd  0xd7e(%rip),%xmm0
mov    $0x1,%al
call   10d0 <is_normalized@plt>
test   %eax,%eax
je     1296 <main+0xd6>
lea    0xdbf(%rip),%rdi
jmp    12cc <main+0x10c>
movsd  0xd62(%rip),%xmm0
mov    $0x1,%al
call   1040 <is_special@plt>
test   %eax,%eax
je     12b2 <main+0xf2>
lea    0xdb5(%rip),%rdi
jmp    12cc <main+0x10c>
movsd  0xd46(%rip),%xmm0
mov    $0x1,%al
call   10e0 <is_denormalized@plt>
test   %eax,%eax
je     12db <main+0x11b>
lea    0xda8(%rip),%rdi
movsd  0xd2c(%rip),%xmm0
mov    $0x1,%al
call   1060 <printf@plt>
movsd  0xd1d(%rip),%xmm0
mov    $0x1,%al
call   1090 <get_E@plt>
lea    0xd97(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
movsd  0xcfe(%rip),%xmm0
mov    $0x1,%al
call   10a0 <get_M@plt>
lea    0xd80(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
movsd  0xcdf(%rip),%xmm0
mov    $0x1,%al
call   1030 <get_s@plt>
lea    0xd69(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"value %10e\0A\00"
@.str.1 = [15 x i8] c"all bits %45s\0A\00"
@.str.2 = [16 x i8] c"exp %15d %33s\0A\00"
@.str.3 = [16 x i8] c"frac %15d %33s\0A\00"
@.str.4 = [16 x i8] c"sign %15d %33s\0A\00"
@.str.5 = [18 x i8] c"%e is normalized\0A\00"
@.str.6 = [15 x i8] c"%e is special\0A\00"
@.str.7 = [20 x i8] c"%e is denormalized\0A\00"
@.str.8 = [8 x i8] c"E = %d\0A\00"
@.str.9 = [8 x i8] c"M = %s\0A\00"
@.str.10 = [8 x i8] c"S = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store float 0x47D691CA40000000, float* %2
%6 = load float, float* %2
%7 = fpext float %6 to double
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double %7)
%9 = load float, float* %2
%10 = fpext float %9 to double
%11 = call i32 (double, ...) bitcast (i32 (...)* @get_bits_float to i32 (double, ...)*)(double %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = load float, float* %2
%14 = fpext float %13 to double
%15 = call i32 (double, ...) bitcast (i32 (...)* @get_exp to i32 (double, ...)*)(double %14)
store i32 %15, i32* %3
%16 = load i32, i32* %3
%17 = load i32, i32* %3
%18 = call i32 (i32, ...) bitcast (i32 (...)* @get_bits_int to i32 (i32, ...)*)(i32 %17)
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %16, i32 %18)
%20 = load float, float* %2
%21 = fpext float %20 to double
%22 = call i32 (double, ...) bitcast (i32 (...)* @get_frac to i32 (double, ...)*)(double %21)
store i32 %22, i32* %4
%23 = load i32, i32* %4
%24 = load i32, i32* %4
%25 = call i32 (i32, ...) bitcast (i32 (...)* @get_bits_int to i32 (i32, ...)*)(i32 %24)
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %23, i32 %25)
%27 = load float, float* %2
%28 = fpext float %27 to double
%29 = call i32 (double, ...) bitcast (i32 (...)* @get_sign to i32 (double, ...)*)(double %28)
store i32 %29, i32* %5
%30 = load i32, i32* %5
%31 = load i32, i32* %5
%32 = call i32 (i32, ...) bitcast (i32 (...)* @get_bits_int to i32 (i32, ...)*)(i32 %31)
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %30, i32 %32)
%34 = load float, float* %2
%35 = fpext float %34 to double
%36 = call i32 (double, ...) bitcast (i32 (...)* @is_normalized to i32 (double, ...)*)(double %35)
%37 = icmp ne i32 %36, 0
br i1 %37, label %38, label %42
38: ; preds = %0
%39 = load float, float* %2
%40 = fpext float %39 to double
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), double %40)
br label %62
42: ; preds = %0
%43 = load float, float* %2
%44 = fpext float %43 to double
%45 = call i32 (double, ...) bitcast (i32 (...)* @is_special to i32 (double, ...)*)(double %44)
%46 = icmp ne i32 %45, 0
br i1 %46, label %47, label %51
47: ; preds = %42
%48 = load float, float* %2
%49 = fpext float %48 to double
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), double %49)
br label %61
51: ; preds = %42
%52 = load float, float* %2
%53 = fpext float %52 to double
%54 = call i32 (double, ...) bitcast (i32 (...)* @is_denormalized to i32 (double, ...)*)(double %53)
%55 = icmp ne i32 %54, 0
br i1 %55, label %56, label %60
56: ; preds = %51
%57 = load float, float* %2
%58 = fpext float %57 to double
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), double %58)
br label %60
60: ; preds = %56, %51
br label %61
61: ; preds = %60, %47
br label %62
62: ; preds = %61, %38
%63 = load float, float* %2
%64 = fpext float %63 to double
%65 = call i32 (double, ...) bitcast (i32 (...)* @get_E to i32 (double, ...)*)(double %64)
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 %65)
%67 = load float, float* %2
%68 = fpext float %67 to double
%69 = call i32 (double, ...) bitcast (i32 (...)* @get_M to i32 (double, ...)*)(double %68)
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i32 %69)
%71 = load float, float* %2
%72 = fpext float %71 to double
%73 = call i32 (double, ...) bitcast (i32 (...)* @get_s to i32 (double, ...)*)(double %72)
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i32 %73)
%75 = load i32, i32* %1
ret i32 %75
}

LLVM IR (-O2):
@.str = [12 x i8] c"value %10e\0A\00"
@.str.1 = [15 x i8] c"all bits %45s\0A\00"
@.str.2 = [16 x i8] c"exp %15d %33s\0A\00"
@.str.3 = [16 x i8] c"frac %15d %33s\0A\00"
@.str.4 = [16 x i8] c"sign %15d %33s\0A\00"
@.str.5 = [18 x i8] c"%e is normalized\0A\00"
@.str.6 = [15 x i8] c"%e is special\0A\00"
@.str.7 = [20 x i8] c"%e is denormalized\0A\00"
@.str.8 = [8 x i8] c"E = %d\0A\00"
@.str.9 = [8 x i8] c"M = %s\0A\00"
@.str.10 = [8 x i8] c"S = %d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double 0x47D691CA40000000)
%2 = tail call i32 (double, ...) bitcast (i32 (...)* @get_bits_float to i32 (double, ...)*)(double 0x47D691CA40000000)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%4 = tail call i32 (double, ...) bitcast (i32 (...)* @get_exp to i32 (double, ...)*)(double 0x47D691CA40000000)
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @get_bits_int to i32 (i32, ...)*)(i32 %4)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %4, i32 %5)
%7 = tail call i32 (double, ...) bitcast (i32 (...)* @get_frac to i32 (double, ...)*)(double 0x47D691CA40000000)
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @get_bits_int to i32 (i32, ...)*)(i32 %7)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %7, i32 %8)
%10 = tail call i32 (double, ...) bitcast (i32 (...)* @get_sign to i32 (double, ...)*)(double 0x47D691CA40000000)
%11 = tail call i32 (i32, ...) bitcast (i32 (...)* @get_bits_int to i32 (i32, ...)*)(i32 %10)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %10, i32 %11)
%13 = tail call i32 (double, ...) bitcast (i32 (...)* @is_normalized to i32 (double, ...)*)(double 0x47D691CA40000000)
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %21
15: ; preds = %0
%16 = tail call i32 (double, ...) bitcast (i32 (...)* @is_special to i32 (double, ...)*)(double 0x47D691CA40000000)
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = tail call i32 (double, ...) bitcast (i32 (...)* @is_denormalized to i32 (double, ...)*)(double 0x47D691CA40000000)
%20 = icmp eq i32 %19, 0
br i1 %20, label %24, label %21
21: ; preds = %18, %15, %0
%22 = phi i8* [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), %0 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), %15 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), %18 ]
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %22, double 0x47D691CA40000000)
br label %24
24: ; preds = %21, %18
%25 = tail call i32 (double, ...) bitcast (i32 (...)* @get_E to i32 (double, ...)*)(double 0x47D691CA40000000)
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 %25)
%27 = tail call i32 (double, ...) bitcast (i32 (...)* @get_M to i32 (double, ...)*)(double 0x47D691CA40000000)
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i32 %27)
%29 = tail call i32 (double, ...) bitcast (i32 (...)* @get_s to i32 (double, ...)*)(double 0x47D691CA40000000)
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i32 %29)
ret i32 0
}