#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*/ ceil(double);
int /*<<< orphan*/ floor(double);
int /*<<< orphan*/ printf(char const *, ...);
int /*<<< orphan*/ round(double);
int /*<<< orphan*/ trunc(double);
int main() {
  const char *format = "%.1f \t%.1f \t%.1f \t%.1f \t%.1f\n";
  printf("value\tround\tfloor\tceil\ttrunc\n");
  printf("-----\t-----\t-----\t----\t-----\n");
  printf(format, 2.3, round(2.3), floor(2.3), ceil(2.3), trunc(2.3));
  printf(format, 3.8, round(3.8), floor(3.8), ceil(3.8), trunc(3.8));
  printf(format, 5.5, round(5.5), floor(5.5), ceil(5.5), trunc(5.5));
  printf(format, -2.3, round(-2.3), floor(-2.3), ceil(-2.3), trunc(-2.3));
  printf(format, -3.8, round(-3.8), floor(-3.8), ceil(-3.8), trunc(-3.8));
  printf(format, -5.5, round(-5.5), floor(-5.5), ceil(-5.5), trunc(-5.5));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeea(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0xa0(%rbp)
movsd  0xe8c(%rip),%xmm0
call   1060 <round@plt>
mov    %eax,-0x94(%rbp)
movsd  0xe79(%rip),%xmm0
call   1070 <floor@plt>
mov    %eax,-0x90(%rbp)
movsd  0xe66(%rip),%xmm0
call   1030 <ceil@plt>
mov    %eax,-0x8c(%rbp)
movsd  0xe53(%rip),%xmm0
call   1050 <trunc@plt>
mov    -0xa0(%rbp),%rdi
mov    -0x94(%rbp),%esi
mov    -0x90(%rbp),%edx
mov    -0x8c(%rbp),%ecx
mov    %eax,%r8d
movsd  0xe2a(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x88(%rbp)
movsd  0xe08(%rip),%xmm0
call   1060 <round@plt>
mov    %eax,-0x7c(%rbp)
movsd  0xdf8(%rip),%xmm0
call   1070 <floor@plt>
mov    %eax,-0x78(%rbp)
movsd  0xde8(%rip),%xmm0
call   1030 <ceil@plt>
mov    %eax,-0x74(%rbp)
movsd  0xdd8(%rip),%xmm0
call   1050 <trunc@plt>
mov    -0x88(%rbp),%rdi
mov    -0x7c(%rbp),%esi
mov    -0x78(%rbp),%edx
mov    -0x74(%rbp),%ecx
mov    %eax,%r8d
movsd  0xdb8(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x70(%rbp)
movsd  0xd99(%rip),%xmm0
call   1060 <round@plt>
mov    %eax,-0x64(%rbp)
movsd  0xd89(%rip),%xmm0
call   1070 <floor@plt>
mov    %eax,-0x60(%rbp)
movsd  0xd79(%rip),%xmm0
call   1030 <ceil@plt>
mov    %eax,-0x5c(%rbp)
movsd  0xd69(%rip),%xmm0
call   1050 <trunc@plt>
mov    -0x70(%rbp),%rdi
mov    -0x64(%rbp),%esi
mov    -0x60(%rbp),%edx
mov    -0x5c(%rbp),%ecx
mov    %eax,%r8d
movsd  0xd4c(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x58(%rbp)
movsd  0xd2d(%rip),%xmm0
call   1060 <round@plt>
mov    %eax,-0x4c(%rbp)
movsd  0xd1d(%rip),%xmm0
call   1070 <floor@plt>
mov    %eax,-0x48(%rbp)
movsd  0xd0d(%rip),%xmm0
call   1030 <ceil@plt>
mov    %eax,-0x44(%rbp)
movsd  0xcfd(%rip),%xmm0
call   1050 <trunc@plt>
mov    -0x58(%rbp),%rdi
mov    -0x4c(%rbp),%esi
mov    -0x48(%rbp),%edx
mov    -0x44(%rbp),%ecx
mov    %eax,%r8d
movsd  0xce0(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
movsd  0xcc1(%rip),%xmm0
call   1060 <round@plt>
mov    %eax,-0x34(%rbp)
movsd  0xcb1(%rip),%xmm0
call   1070 <floor@plt>
mov    %eax,-0x30(%rbp)
movsd  0xca1(%rip),%xmm0
call   1030 <ceil@plt>
mov    %eax,-0x2c(%rbp)
movsd  0xc91(%rip),%xmm0
call   1050 <trunc@plt>
mov    -0x40(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    -0x30(%rbp),%edx
mov    -0x2c(%rbp),%ecx
mov    %eax,%r8d
movsd  0xc74(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
movsd  0xc55(%rip),%xmm0
call   1060 <round@plt>
mov    %eax,-0x1c(%rbp)
movsd  0xc45(%rip),%xmm0
call   1070 <floor@plt>
mov    %eax,-0x18(%rbp)
movsd  0xc35(%rip),%xmm0
call   1030 <ceil@plt>
mov    %eax,-0x14(%rbp)
movsd  0xc25(%rip),%xmm0
call   1050 <trunc@plt>
mov    -0x28(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    %eax,%r8d
movsd  0xc08(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
lea    0xef1(%rip),%rdi
call   1030 <puts@plt>
movsd  0xe79(%rip),%xmm0
call   1070 <round@plt>
mov    %eax,%r15d
movsd  0xe69(%rip),%xmm0
call   1080 <floor@plt>
mov    %eax,%ebx
movsd  0xe5a(%rip),%xmm0
call   1040 <ceil@plt>
mov    %eax,%ebp
movsd  0xe4b(%rip),%xmm0
call   1060 <trunc@plt>
lea    0xe6f(%rip),%r14
mov    %r14,%rdi
movsd  0xe34(%rip),%xmm0
mov    %r15d,%esi
mov    %ebx,%edx
mov    %ebp,%ecx
mov    %eax,%r8d
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xe23(%rip),%xmm0
call   1070 <round@plt>
mov    %eax,%r15d
movsd  0xe13(%rip),%xmm0
call   1080 <floor@plt>
mov    %eax,%ebp
movsd  0xe04(%rip),%xmm0
call   1040 <ceil@plt>
mov    %eax,%ebx
movsd  0xdf5(%rip),%xmm0
call   1060 <trunc@plt>
mov    %r14,%rdi
movsd  0xde5(%rip),%xmm0
mov    %r15d,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
mov    %eax,%r8d
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xdd4(%rip),%xmm0
call   1070 <round@plt>
mov    %eax,%r15d
movsd  0xdc4(%rip),%xmm0
call   1080 <floor@plt>
mov    %eax,%ebp
movsd  0xdb5(%rip),%xmm0
call   1040 <ceil@plt>
mov    %eax,%ebx
movsd  0xda6(%rip),%xmm0
call   1060 <trunc@plt>
mov    %r14,%rdi
movsd  0xd96(%rip),%xmm0
mov    %r15d,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
mov    %eax,%r8d
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xd85(%rip),%xmm0
call   1070 <round@plt>
mov    %eax,%r15d
movsd  0xd75(%rip),%xmm0
call   1080 <floor@plt>
mov    %eax,%ebp
movsd  0xd66(%rip),%xmm0
call   1040 <ceil@plt>
mov    %eax,%ebx
movsd  0xd57(%rip),%xmm0
call   1060 <trunc@plt>
mov    %r14,%rdi
movsd  0xd47(%rip),%xmm0
mov    %r15d,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
mov    %eax,%r8d
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xd36(%rip),%xmm0
call   1070 <round@plt>
mov    %eax,%r15d
movsd  0xd26(%rip),%xmm0
call   1080 <floor@plt>
mov    %eax,%ebp
movsd  0xd17(%rip),%xmm0
call   1040 <ceil@plt>
mov    %eax,%ebx
movsd  0xd08(%rip),%xmm0
call   1060 <trunc@plt>
mov    %r14,%rdi
movsd  0xcf8(%rip),%xmm0
mov    %r15d,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
mov    %eax,%r8d
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xce7(%rip),%xmm0
call   1070 <round@plt>
mov    %eax,%r15d
movsd  0xcd7(%rip),%xmm0
call   1080 <floor@plt>
mov    %eax,%ebp
movsd  0xcc8(%rip),%xmm0
call   1040 <ceil@plt>
mov    %eax,%ebx
movsd  0xcb9(%rip),%xmm0
call   1060 <trunc@plt>
mov    %r14,%rdi
movsd  0xca9(%rip),%xmm0
mov    %r15d,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
mov    %eax,%r8d
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [30 x i8] c"%.1f \09%.1f \09%.1f \09%.1f \09%.1f\0A\00"
@.str.1 = [30 x i8] c"value\09round\09floor\09ceil\09trunc\0A\00"
@.str.2 = [30 x i8] c"-----\09-----\09-----\09----\09-----\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = call i32 @round(double 2.300000e+00)
%7 = call i32 @floor(double 2.300000e+00)
%8 = call i32 @ceil(double 2.300000e+00)
%9 = call i32 @trunc(double 2.300000e+00)
%10 = call i32 (i8*, ...) @printf(i8* %5, double 2.300000e+00, i32 %6, i32 %7, i32 %8, i32 %9)
%11 = load i8*, i8** %2
%12 = call i32 @round(double 3.800000e+00)
%13 = call i32 @floor(double 3.800000e+00)
%14 = call i32 @ceil(double 3.800000e+00)
%15 = call i32 @trunc(double 3.800000e+00)
%16 = call i32 (i8*, ...) @printf(i8* %11, double 3.800000e+00, i32 %12, i32 %13, i32 %14, i32 %15)
%17 = load i8*, i8** %2
%18 = call i32 @round(double 5.500000e+00)
%19 = call i32 @floor(double 5.500000e+00)
%20 = call i32 @ceil(double 5.500000e+00)
%21 = call i32 @trunc(double 5.500000e+00)
%22 = call i32 (i8*, ...) @printf(i8* %17, double 5.500000e+00, i32 %18, i32 %19, i32 %20, i32 %21)
%23 = load i8*, i8** %2
%24 = call i32 @round(double -2.300000e+00)
%25 = call i32 @floor(double -2.300000e+00)
%26 = call i32 @ceil(double -2.300000e+00)
%27 = call i32 @trunc(double -2.300000e+00)
%28 = call i32 (i8*, ...) @printf(i8* %23, double -2.300000e+00, i32 %24, i32 %25, i32 %26, i32 %27)
%29 = load i8*, i8** %2
%30 = call i32 @round(double -3.800000e+00)
%31 = call i32 @floor(double -3.800000e+00)
%32 = call i32 @ceil(double -3.800000e+00)
%33 = call i32 @trunc(double -3.800000e+00)
%34 = call i32 (i8*, ...) @printf(i8* %29, double -3.800000e+00, i32 %30, i32 %31, i32 %32, i32 %33)
%35 = load i8*, i8** %2
%36 = call i32 @round(double -5.500000e+00)
%37 = call i32 @floor(double -5.500000e+00)
%38 = call i32 @ceil(double -5.500000e+00)
%39 = call i32 @trunc(double -5.500000e+00)
%40 = call i32 (i8*, ...) @printf(i8* %35, double -5.500000e+00, i32 %36, i32 %37, i32 %38, i32 %39)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"%.1f \09%.1f \09%.1f \09%.1f \09%.1f\0A\00"
@str = [29 x i8] c"value\09round\09floor\09ceil\09trunc\00"
@str.3 = [29 x i8] c"-----\09-----\09-----\09----\09-----\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @round(double 2.300000e+00)
%4 = tail call i32 @floor(double 2.300000e+00)
%5 = tail call i32 @ceil(double 2.300000e+00)
%6 = tail call i32 @trunc(double 2.300000e+00)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), double 2.300000e+00, i32 %3, i32 %4, i32 %5, i32 %6)
%8 = tail call i32 @round(double 3.800000e+00)
%9 = tail call i32 @floor(double 3.800000e+00)
%10 = tail call i32 @ceil(double 3.800000e+00)
%11 = tail call i32 @trunc(double 3.800000e+00)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), double 3.800000e+00, i32 %8, i32 %9, i32 %10, i32 %11)
%13 = tail call i32 @round(double 5.500000e+00)
%14 = tail call i32 @floor(double 5.500000e+00)
%15 = tail call i32 @ceil(double 5.500000e+00)
%16 = tail call i32 @trunc(double 5.500000e+00)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), double 5.500000e+00, i32 %13, i32 %14, i32 %15, i32 %16)
%18 = tail call i32 @round(double -2.300000e+00)
%19 = tail call i32 @floor(double -2.300000e+00)
%20 = tail call i32 @ceil(double -2.300000e+00)
%21 = tail call i32 @trunc(double -2.300000e+00)
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), double -2.300000e+00, i32 %18, i32 %19, i32 %20, i32 %21)
%23 = tail call i32 @round(double -3.800000e+00)
%24 = tail call i32 @floor(double -3.800000e+00)
%25 = tail call i32 @ceil(double -3.800000e+00)
%26 = tail call i32 @trunc(double -3.800000e+00)
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), double -3.800000e+00, i32 %23, i32 %24, i32 %25, i32 %26)
%28 = tail call i32 @round(double -5.500000e+00)
%29 = tail call i32 @floor(double -5.500000e+00)
%30 = tail call i32 @ceil(double -5.500000e+00)
%31 = tail call i32 @trunc(double -5.500000e+00)
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), double -5.500000e+00, i32 %28, i32 %29, i32 %30, i32 %31)
ret i32 0
}