#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
char *get_bits_float(float);
char *get_bits_int(int);
int get_exp(float);
int get_frac(float);
int get_sign(float);
int /*<<< orphan*/ printf(char *, char *, ...);
int main() {
  float x = 1.200000e+38;
  printf("All  %16s \n", get_bits_float(x));
  printf("   W %16s \n\n", "01111110101101001000111001010010");
  printf("Exp  %16s %10d\n", get_bits_int(get_exp(x)), get_exp(x));
  printf("   M %16s \n", get_bits_int(0x7F800000));
  printf("   W %16s %10d\n\n", "01111110100000000000000000000000", 2122317824);
  printf("Frac %16s %10d\n", get_bits_int(get_frac(x)), get_frac(x));
  printf("   M %16s \n", get_bits_int(0x007FFFFF));
  printf("   W %16s %10d\n\n", "00000000001101001000111001010010", 3444306);
  printf("Sign %16s %10d\n", get_bits_int(get_sign(x)), get_sign(x));
  printf("   M %16s \n", get_bits_int(0x80000000));
  printf("   W %16s %10d\n\n", "00000000000000000000000000000000", 0);
  printf("All  %16s \n", get_bits_float(x));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  0xe90(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1080 <get_bits_float@plt>
mov    %rax,%rsi
lea    0xe7b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe79(%rip),%rdi
lea    0xe7f(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
movss  -0x4(%rbp),%xmm0
call   1060 <get_exp@plt>
mov    %eax,%edi
call   1070 <get_bits_int@plt>
mov    %rax,-0x20(%rbp)
movss  -0x4(%rbp),%xmm0
call   1060 <get_exp@plt>
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
lea    0xe6d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x7f800000,%edi
call   1070 <get_bits_int@plt>
mov    %rax,%rsi
lea    0xe62(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe60(%rip),%rdi
lea    0xe6a(%rip),%rsi
mov    $0x7e800000,%edx
mov    $0x0,%al
call   1040 <printf@plt>
movss  -0x4(%rbp),%xmm0
call   1030 <get_frac@plt>
mov    %eax,%edi
call   1070 <get_bits_int@plt>
mov    %rax,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <get_frac@plt>
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
lea    0xe53(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x7fffff,%edi
call   1070 <get_bits_int@plt>
mov    %rax,%rsi
lea    0xdfa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdf8(%rip),%rdi
lea    0xe33(%rip),%rsi
mov    $0x348e52,%edx
mov    $0x0,%al
call   1040 <printf@plt>
movss  -0x4(%rbp),%xmm0
call   1050 <get_sign@plt>
mov    %eax,%edi
call   1070 <get_bits_int@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1050 <get_sign@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
lea    0xe1c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x80000000,%edi
call   1070 <get_bits_int@plt>
mov    %rax,%rsi
lea    0xd92(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd90(%rip),%rdi
lea    0xdfc(%rip),%rsi
xor    %edx,%edx
mov    $0x0,%al
call   1040 <printf@plt>
movss  -0x4(%rbp),%xmm0
call   1080 <get_bits_float@plt>
mov    %rax,%rsi
lea    0xd16(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
movss  0xe90(%rip),%xmm0
call   1080 <get_bits_float@plt>
lea    0xe88(%rip),%r14
mov    %r14,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe80(%rip),%rdi
lea    0xe86(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
movss  0xe5a(%rip),%xmm0
call   1060 <get_exp@plt>
mov    %eax,%edi
call   1070 <get_bits_int@plt>
mov    %rax,%rbx
movss  0xe43(%rip),%xmm0
call   1060 <get_exp@plt>
lea    0xe75(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x7f800000,%edi
call   1070 <get_bits_int@plt>
lea    0xe68(%rip),%r12
mov    %r12,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe60(%rip),%r15
lea    0xe6a(%rip),%rsi
mov    %r15,%rdi
mov    $0x7e800000,%edx
xor    %eax,%eax
call   1040 <printf@plt>
movss  0xde8(%rip),%xmm0
call   1030 <get_frac@plt>
mov    %eax,%edi
call   1070 <get_bits_int@plt>
mov    %rax,%rbx
movss  0xdd1(%rip),%xmm0
call   1030 <get_frac@plt>
lea    0xe51(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x7fffff,%edi
call   1070 <get_bits_int@plt>
mov    %r12,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe37(%rip),%rsi
mov    %r15,%rdi
mov    $0x348e52,%edx
xor    %eax,%eax
call   1040 <printf@plt>
movss  0xd84(%rip),%xmm0
call   1050 <get_sign@plt>
mov    %eax,%edi
call   1070 <get_bits_int@plt>
mov    %rax,%rbx
movss  0xd6d(%rip),%xmm0
call   1050 <get_sign@plt>
lea    0xe1e(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x80000000,%edi
call   1070 <get_bits_int@plt>
mov    %r12,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe04(%rip),%rsi
mov    %r15,%rdi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
movss  0xd23(%rip),%xmm0
call   1080 <get_bits_float@plt>
mov    %r14,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [12 x i8] c"All %16s \0A\00"
@.str.1 = [13 x i8] c" W %16s \0A\0A\00"
@.str.2 = [33 x i8] c"01111110101101001000111001010010\00"
@.str.3 = [16 x i8] c"Exp %16s %10d\0A\00"
@.str.4 = [12 x i8] c" M %16s \0A\00"
@.str.5 = [17 x i8] c" W %16s %10d\0A\0A\00"
@.str.6 = [33 x i8] c"01111110100000000000000000000000\00"
@.str.7 = [16 x i8] c"Frac %16s %10d\0A\00"
@.str.8 = [33 x i8] c"00000000001101001000111001010010\00"
@.str.9 = [16 x i8] c"Sign %16s %10d\0A\00"
@.str.10 = [33 x i8] c"00000000000000000000000000000000\00"
define i32 @main() {
%1 = alloca float
store float 0x47D691CA40000000, float* %1
%2 = load float, float* %1
%3 = call i8* @get_bits_float(float %2)
%4 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%6 = load float, float* %1
%7 = call i32 @get_exp(float %6)
%8 = call i8* @get_bits_int(i32 %7)
%9 = load float, float* %1
%10 = call i32 @get_exp(float %9)
%11 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %8, i32 %10)
%12 = call i8* @get_bits_int(i32 2139095040)
%13 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %12)
%14 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i32 2122317824)
%15 = load float, float* %1
%16 = call i32 @get_frac(float %15)
%17 = call i8* @get_bits_int(i32 %16)
%18 = load float, float* %1
%19 = call i32 @get_frac(float %18)
%20 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i8* %17, i32 %19)
%21 = call i8* @get_bits_int(i32 8388607)
%22 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %21)
%23 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0), i32 3444306)
%24 = load float, float* %1
%25 = call i32 @get_sign(float %24)
%26 = call i8* @get_bits_int(i32 %25)
%27 = load float, float* %1
%28 = call i32 @get_sign(float %27)
%29 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), i8* %26, i32 %28)
%30 = call i8* @get_bits_int(i32 -2147483648)
%31 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %30)
%32 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.10, i64 0, i64 0), i32 0)
%33 = load float, float* %1
%34 = call i8* @get_bits_float(float %33)
%35 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %34)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"All %16s \0A\00"
@.str.1 = [13 x i8] c" W %16s \0A\0A\00"
@.str.2 = [33 x i8] c"01111110101101001000111001010010\00"
@.str.3 = [16 x i8] c"Exp %16s %10d\0A\00"
@.str.4 = [12 x i8] c" M %16s \0A\00"
@.str.5 = [17 x i8] c" W %16s %10d\0A\0A\00"
@.str.6 = [33 x i8] c"01111110100000000000000000000000\00"
@.str.7 = [16 x i8] c"Frac %16s %10d\0A\00"
@.str.8 = [33 x i8] c"00000000001101001000111001010010\00"
@.str.9 = [16 x i8] c"Sign %16s %10d\0A\00"
@.str.10 = [33 x i8] c"00000000000000000000000000000000\00"
define i32 @main() {
%1 = tail call i8* @get_bits_float(float 0x47D691CA40000000)
%2 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @get_exp(float 0x47D691CA40000000)
%5 = tail call i8* @get_bits_int(i32 %4)
%6 = tail call i32 @get_exp(float 0x47D691CA40000000)
%7 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %5, i32 %6)
%8 = tail call i8* @get_bits_int(i32 2139095040)
%9 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %8)
%10 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i32 2122317824)
%11 = tail call i32 @get_frac(float 0x47D691CA40000000)
%12 = tail call i8* @get_bits_int(i32 %11)
%13 = tail call i32 @get_frac(float 0x47D691CA40000000)
%14 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i8* %12, i32 %13)
%15 = tail call i8* @get_bits_int(i32 8388607)
%16 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %15)
%17 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0), i32 3444306)
%18 = tail call i32 @get_sign(float 0x47D691CA40000000)
%19 = tail call i8* @get_bits_int(i32 %18)
%20 = tail call i32 @get_sign(float 0x47D691CA40000000)
%21 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), i8* %19, i32 %20)
%22 = tail call i8* @get_bits_int(i32 -2147483648)
%23 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %22)
%24 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.10, i64 0, i64 0), i32 0)
%25 = tail call i8* @get_bits_float(float 0x47D691CA40000000)
%26 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %25)
ret i32 0
}