#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ pass(char *);
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ stdout;
main() {
  float a, b, c;
  a = 0.11;
  b = 3.12;
  c = a + b;
  printf("Print float, result with 'f' = %f\n", c);
  printf("Print float, result with 'e' = %e\n", c);
  printf("Print float, result with 'E' = %E\n", c);
  printf("Print float, result with 'g' = %g\n", c);
  printf("Print float, result with 'G' = %G\n", c);
  pass("float");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  0xec4(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  0xeb3(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
movss  -0xc(%rbp),%xmm0
lea    0xead(%rip),%rdi
call   1040 <printf@plt>
movss  -0xc(%rbp),%xmm0
lea    0xebf(%rip),%rdi
call   1040 <printf@plt>
movss  -0xc(%rbp),%xmm0
lea    0xed1(%rip),%rdi
call   1040 <printf@plt>
movss  -0xc(%rbp),%xmm0
lea    0xee3(%rip),%rdi
call   1040 <printf@plt>
lea    0xefa(%rip),%rdi
call   1030 <pass@plt>
mov    0x2e17(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xecc(%rip),%rdi
movss  0xec0(%rip),%xmm0
call   1040 <printf@plt>
lea    0xedb(%rip),%rdi
movss  0xeac(%rip),%xmm0
call   1040 <printf@plt>
lea    0xeea(%rip),%rdi
movss  0xe98(%rip),%xmm0
call   1040 <printf@plt>
lea    0xef9(%rip),%rdi
movss  0xe84(%rip),%xmm0
call   1040 <printf@plt>
lea    0xf08(%rip),%rdi
movss  0xe70(%rip),%xmm0
call   1040 <printf@plt>
lea    0xf17(%rip),%rdi
call   1030 <pass@plt>
mov    0x2e38(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Print float, result with 'f' = %f\0A\00"
@.str.1 = [35 x i8] c"Print float, result with 'e' = %e\0A\00"
@.str.2 = [35 x i8] c"Print float, result with 'E' = %E\0A\00"
@.str.3 = [35 x i8] c"Print float, result with 'g' = %g\0A\00"
@.str.4 = [35 x i8] c"Print float, result with 'G' = %G\0A\00"
@.str.5 = [6 x i8] c"float\00"
@stdout = global i32 0
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
store float 0x3FBC28F5C0000000, float* %1
store float 0x4008F5C280000000, float* %2
%4 = load float, float* %1
%5 = load float, float* %2
%6 = fadd float %4, %5
store float %6, float* %3
%7 = load float, float* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), float %7)
%9 = load float, float* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), float %9)
%11 = load float, float* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), float %11)
%13 = load float, float* %3
%14 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), float %13)
%15 = load float, float* %3
%16 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), float %15)
%17 = call i32 @pass(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%18 = load i32, i32* @stdout
%19 = call i32 @fflush(i32 %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"Print float, result with 'f' = %f\0A\00"
@.str.1 = [35 x i8] c"Print float, result with 'e' = %e\0A\00"
@.str.2 = [35 x i8] c"Print float, result with 'E' = %E\0A\00"
@.str.3 = [35 x i8] c"Print float, result with 'g' = %g\0A\00"
@.str.4 = [35 x i8] c"Print float, result with 'G' = %G\0A\00"
@.str.5 = [6 x i8] c"float\00"
@stdout = global i32 0
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), float 0x4009D70A20000000)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), float 0x4009D70A20000000)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), float 0x4009D70A20000000)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), float 0x4009D70A20000000)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), float 0x4009D70A20000000)
%6 = tail call i32 @pass(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = tail call i32 @fflush(i32 %7)
ret i32 0
}