#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 main(int argc, const char *argv[]) {
  printf("Machin epsilon\n");
  float a = 1.0f;
  float e = 0.00000005f;
  float sum = a + e;
  printf("Sum: %e + %e = %.7e\n", a, e, sum);
  if (sum == 1.0f) {
    printf("Sum == 1.0f\n");
  } else {
    printf("Sum != 1.0f\n");
  }
}


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    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  0xec4(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xebb(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x1c(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xe99(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
movss  -0x1c(%rbp),%xmm0
movss  0xe6d(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    11b5 <main+0xa5>
jp     11b5 <main+0xa5>
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11c3 <main+0xb3>
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xefd(%rip),%rdi
call   1030 <puts@plt>
lea    0xedc(%rip),%rdi
movsd  0xec4(%rip),%xmm1
movsd  0xec4(%rip),%xmm0
movaps %xmm0,%xmm2
mov    $0x3,%al
call   1040 <printf@plt>
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Machin epsilon\0A\00"
@.str.1 = [21 x i8] c"Sum: %e + %e = %.7e\0A\00"
@.str.2 = [13 x i8] c"Sum == 1.0f\0A\00"
@.str.3 = [13 x i8] c"Sum != 1.0f\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
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
store float 1.000000e+00, float* %6
store float 0x3E6AD7F2A0000000, float* %7
%10 = load float, float* %6
%11 = load float, float* %7
%12 = fadd float %10, %11
store float %12, float* %8
%13 = load float, float* %6
%14 = fpext float %13 to double
%15 = load float, float* %7
%16 = fpext float %15 to double
%17 = load float, float* %8
%18 = fpext float %17 to double
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), double %14, double %16, double %18)
%20 = load float, float* %8
%21 = fcmp oeq float %20, 1.000000e+00
br i1 %21, label %22, label %24
22: ; preds = %2
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
br label %26
24: ; preds = %2
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
br label %26
26: ; preds = %24, %22
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
@.str.1 = [21 x i8] c"Sum: %e + %e = %.7e\0A\00"
@str = [15 x i8] c"Machin epsilon\00"
@str.4 = [12 x i8] c"Sum == 1.0f\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), double 1.000000e+00, double 0x3E6AD7F2A0000000, double 1.000000e+00)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.4, i64 0, i64 0))
ret i32 0
}