#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*/ floor(float);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main() {
  float val1, val2, val3, val4;
  val1 = 1.6;
  val2 = 1.2;
  val3 = 2.8;
  val4 = 2.3;
  printf("Value1 = %.1lf\n", floor(val1));
  printf("Value2 = %.1lf\n", floor(val2));
  printf("Value3 = %.1lf\n", floor(val3));
  printf("Value4 = %.1lf\n", floor(val4));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xed5(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xec4(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xeb3(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xea2(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
call   1040 <floor@plt>
mov    %eax,%esi
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
call   1040 <floor@plt>
mov    %eax,%esi
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
call   1040 <floor@plt>
mov    %eax,%esi
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
call   1040 <floor@plt>
mov    %eax,%esi
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movss  0xed7(%rip),%xmm0
call   1040 <floor@plt>
lea    0xedb(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
movss  0xec0(%rip),%xmm0
call   1040 <floor@plt>
lea    0xed0(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
movss  0xea9(%rip),%xmm0
call   1040 <floor@plt>
lea    0xec5(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
movss  0xe92(%rip),%xmm0
call   1040 <floor@plt>
lea    0xeba(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Value1 = %.1lf\0A\00"
@.str.1 = [16 x i8] c"Value2 = %.1lf\0A\00"
@.str.2 = [16 x i8] c"Value3 = %.1lf\0A\00"
@.str.3 = [16 x i8] c"Value4 = %.1lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
store float 0x3FF99999A0000000, float* %2
store float 0x3FF3333340000000, float* %3
store float 0x4006666660000000, float* %4
store float 0x4002666660000000, float* %5
%6 = load float, float* %2
%7 = call i32 @floor(float %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load float, float* %3
%10 = call i32 @floor(float %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = load float, float* %4
%13 = call i32 @floor(float %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %13)
%15 = load float, float* %5
%16 = call i32 @floor(float %15)
%17 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Value1 = %.1lf\0A\00"
@.str.1 = [16 x i8] c"Value2 = %.1lf\0A\00"
@.str.2 = [16 x i8] c"Value3 = %.1lf\0A\00"
@.str.3 = [16 x i8] c"Value4 = %.1lf\0A\00"
define i32 @main() {
%1 = tail call i32 @floor(float 0x3FF99999A0000000)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @floor(float 0x3FF3333340000000)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 @floor(float 0x4006666660000000)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = tail call i32 @floor(float 0x4002666660000000)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %7)
ret i32 0
}