#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 */
int /*<<< orphan*/ print_float_bits(float);
int /*<<< orphan*/ printf(char *, float, float);
int /*<<< orphan*/ putchar(char);
int scanf(char *, float *);
int main(int argc, char **argv) {
  float f;
  while (scanf("%f", &f) == 1) {
    printf("%10g = %24.17g = ", f, f);
    print_float_bits(f);
    putchar('\n');
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea3(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    119e <main+0x5e>
movss  -0x14(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
lea    0xe83(%rip),%rdi
call   1040 <printf@plt>
movss  -0x14(%rbp),%xmm0
call   1060 <print_float_bits@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1156 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xeb0(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    11b6 <main+0x76>
lea    0xe9d(%rip),%r14
lea    0xe93(%rip),%r15
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movss  0xc(%rsp),%xmm0
mov    %r14,%rdi
movaps %xmm0,%xmm1
call   1040 <printf@plt>
movss  0xc(%rsp),%xmm0
call   1060 <print_float_bits@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
cmp    $0x1,%eax
je     1180 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [18 x i8] c"%10g = %24.17g = \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %7
7: ; preds = %10, %2
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %6)
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %17
10: ; preds = %7
%11 = load float, float* %6
%12 = load float, float* %6
%13 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), float %11, float %12)
%14 = load float, float* %6
%15 = call i32 @print_float_bits(float %14)
%16 = call i32 @putchar(i8 signext 10)
br label %7
17: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [18 x i8] c"%10g = %24.17g = \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca float
%4 = bitcast float* %3 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %3)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %15
7: ; preds = %2, %7
%8 = load float, float* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), float %8, float %8)
%10 = load float, float* %3
%11 = call i32 @print_float_bits(float %10)
%12 = call i32 @putchar(i8 signext 10)
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %3)
%14 = icmp eq i32 %13, 1
br i1 %14, label %7, label %15
15: ; preds = %7, %2
ret i32 0
}