#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 main() {
  float f1 = 24.4, f2 = 25.6;
  int i1 = 16, i2 = 5;
  printf("f1 + f2 = %f\n", f1 + f2);
  printf("f1 / f2 = %f\n", f1 / f2);
  printf("f1 * f2 = %f\n", f1 * f2);
  printf("f1 - f2 = %f\n", f1 - f2);
  printf("i1 %% i2 = %i\n", i1 % i2);
  printf("f1 > f2 is %i\n", f1 > f2);
  printf("f1 < f2 is %i\n", f1 < f2);
  printf("2 == 2 is %i\n", 2 == 2);
  printf("3 != 2 is %i\n", 3 != 2);
  printf("3 == 2 && 2 == 2 is %i\n", 3 == 2 && 2 == 2);
  printf("3 != 2 || 2 == 2 is %i\n", 3 != 2 && 2 == 2);
  printf("1.3 - 0.7 = %f\n", 1.3 - 0.7);
  printf("1.3 - 0.7 == 0.6 is %i\n", 1.3 - 0.7 == 0.6);
  printf("1.3 - 0.7 != 0.6 is %i\n", 1.3 - 0.7 != 0.6);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xedd(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xecc(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movl   $0x10,-0x10(%rbp)
movl   $0x5,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
cvttss2si %xmm0,%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
divss  -0xc(%rbp),%xmm0
cvttss2si %xmm0,%esi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
cvttss2si %xmm0,%esi
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
cvttss2si %xmm0,%esi
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
cltd
idivl  -0x14(%rbp)
mov    %edx,%esi
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe73(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe61(%rip),%rdi
call   1030 <printf@plt>
lea    0xe7c(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xe53(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xe50(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xe5a(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xe61(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xe63(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xe6d(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x32,%esi
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
mov    $0x270,%esi
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
mov    $0xffffffff,%esi
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"f1 + f2 = %f\0A\00"
@.str.1 = [14 x i8] c"f1 / f2 = %f\0A\00"
@.str.2 = [14 x i8] c"f1 * f2 = %f\0A\00"
@.str.3 = [14 x i8] c"f1 - f2 = %f\0A\00"
@.str.4 = [15 x i8] c"i1 %% i2 = %i\0A\00"
@.str.5 = [15 x i8] c"f1 > f2 is %i\0A\00"
@.str.6 = [15 x i8] c"f1 < f2 is %i\0A\00"
@.str.7 = [14 x i8] c"2 == 2 is %i\0A\00"
@.str.8 = [14 x i8] c"3 != 2 is %i\0A\00"
@.str.9 = [24 x i8] c"3 == 2 && 2 == 2 is %i\0A\00"
@.str.10 = [24 x i8] c"3 != 2 || 2 == 2 is %i\0A\00"
@.str.11 = [16 x i8] c"1.3 - 0.7 = %f\0A\00"
@.str.12 = [24 x i8] c"1.3 - 0.7 == 0.6 is %i\0A\00"
@.str.13 = [24 x i8] c"1.3 - 0.7 != 0.6 is %i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store float 0x4038666660000000, float* %2
store float 0x40399999A0000000, float* %3
store i32 16, i32* %4
store i32 5, i32* %5
%6 = load float, float* %2
%7 = load float, float* %3
%8 = fadd float %6, %7
%9 = fptosi float %8 to i32
%10 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load float, float* %2
%12 = load float, float* %3
%13 = fdiv float %11, %12
%14 = fptosi float %13 to i32
%15 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = load float, float* %2
%17 = load float, float* %3
%18 = fmul float %16, %17
%19 = fptosi float %18 to i32
%20 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %19)
%21 = load float, float* %2
%22 = load float, float* %3
%23 = fsub float %21, %22
%24 = fptosi float %23 to i32
%25 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 %24)
%26 = load i32, i32* %4
%27 = load i32, i32* %5
%28 = srem i32 %26, %27
%29 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %28)
%30 = load float, float* %2
%31 = load float, float* %3
%32 = fcmp ogt float %30, %31
%33 = zext i1 %32 to i32
%34 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 %33)
%35 = load float, float* %2
%36 = load float, float* %3
%37 = fcmp olt float %35, %36
%38 = zext i1 %37 to i32
%39 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %38)
%40 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i32 1)
%41 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 1)
%42 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0), i32 0)
%43 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0), i32 1)
%44 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), i32 0)
%45 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i32 0)
%46 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0), i32 1)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"f1 + f2 = %f\0A\00"
@.str.1 = [14 x i8] c"f1 / f2 = %f\0A\00"
@.str.2 = [14 x i8] c"f1 * f2 = %f\0A\00"
@.str.3 = [14 x i8] c"f1 - f2 = %f\0A\00"
@.str.4 = [15 x i8] c"i1 %% i2 = %i\0A\00"
@.str.5 = [15 x i8] c"f1 > f2 is %i\0A\00"
@.str.6 = [15 x i8] c"f1 < f2 is %i\0A\00"
@.str.7 = [14 x i8] c"2 == 2 is %i\0A\00"
@.str.8 = [14 x i8] c"3 != 2 is %i\0A\00"
@.str.9 = [24 x i8] c"3 == 2 && 2 == 2 is %i\0A\00"
@.str.10 = [24 x i8] c"3 != 2 || 2 == 2 is %i\0A\00"
@.str.11 = [16 x i8] c"1.3 - 0.7 = %f\0A\00"
@.str.12 = [24 x i8] c"1.3 - 0.7 == 0.6 is %i\0A\00"
@.str.13 = [24 x i8] c"1.3 - 0.7 != 0.6 is %i\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 50)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 624)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 -1)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 1)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 0)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 1)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i32 1)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 1)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0), i32 0)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0), i32 1)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), i32 0)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i32 0)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0), i32 1)
ret i32 0
}