#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*/ printf(char *, int, int, ...);
int main(int argc, char *argv[]) {
  float f1 = 1.0000002;
  float f2 = 1.0000003;
  float f3 = 1.00000002, f4 = 1.00000003;
  printf("%f %f %d\n", f1, f2, f1 == f2);
  printf("%#x %#x\n", *(int *)&f1, *(int *)&f2);
  printf("%f %f %d\n", f3, f4, f3 == f4);
  printf("%#x %#x\n", *(int *)&f3, *(int *)&f4);
  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)
movss  0xeda(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xeb8(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xeab(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
cvttss2si -0x14(%rbp),%esi
cvttss2si -0x18(%rbp),%edx
movss  -0x14(%rbp),%xmm0
ucomiss -0x18(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%ecx
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cvttss2si -0x1c(%rbp),%esi
cvttss2si -0x20(%rbp),%edx
movss  -0x1c(%rbp),%xmm0
ucomiss -0x20(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%ecx
lea    0xe49(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
lea    0xe3f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xee5(%rip),%r14
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed2(%rip),%rbx
mov    %rbx,%rdi
mov    $0x3f800002,%esi
mov    $0x3f800003,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3f800000,%esi
mov    $0x3f800000,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%f %f %d\0A\00"
@.str.1 = [9 x i8] c"%#x %#x\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 0x3FF0000040000000, float* %6
store float 0x3FF0000060000000, float* %7
store float 1.000000e+00, float* %8
store float 1.000000e+00, float* %9
%10 = load float, float* %6
%11 = fptosi float %10 to i32
%12 = load float, float* %7
%13 = fptosi float %12 to i32
%14 = load float, float* %6
%15 = load float, float* %7
%16 = fcmp oeq float %14, %15
%17 = zext i1 %16 to i32
%18 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %13, i32 %17)
%19 = bitcast float* %6 to i32*
%20 = load i32, i32* %19
%21 = bitcast float* %7 to i32*
%22 = load i32, i32* %21
%23 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %20, i32 %22)
%24 = load float, float* %8
%25 = fptosi float %24 to i32
%26 = load float, float* %9
%27 = fptosi float %26 to i32
%28 = load float, float* %8
%29 = load float, float* %9
%30 = fcmp oeq float %28, %29
%31 = zext i1 %30 to i32
%32 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %25, i32 %27, i32 %31)
%33 = bitcast float* %8 to i32*
%34 = load i32, i32* %33
%35 = bitcast float* %9 to i32*
%36 = load i32, i32* %35
%37 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %34, i32 %36)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%f %f %d\0A\00"
@.str.1 = [9 x i8] c"%#x %#x\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i32 0)
%4 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 1065353218, i32 1065353219)
%5 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i32 1)
%6 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 1065353216, i32 1065353216)
ret i32 0
}