#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*/ rounder(double, double, double);
int main() {
  rounder(5.1, 0.0, 1.0);
  rounder(4.9, 0.0, 1.0);
  rounder(2.1, 0.0, 1.0);
  rounder(1.01, 0.0, 1.0);
  rounder(0.99, 0.0, 1.0);
  rounder(0.51, 0.0, 1.0);
  rounder(0.49, 0.0, 1.0);
  rounder(0.0, 0.0, 1.0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xf11(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xece(%rip),%xmm2
call   1030 <rounder@plt>
movsd  0xef1(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xeb6(%rip),%xmm2
call   1030 <rounder@plt>
movsd  0xed1(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xe9e(%rip),%xmm2
call   1030 <rounder@plt>
movsd  0xeb1(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xe86(%rip),%xmm2
call   1030 <rounder@plt>
movsd  0xe91(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xe6e(%rip),%xmm2
call   1030 <rounder@plt>
movsd  0xe71(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xe56(%rip),%xmm2
call   1030 <rounder@plt>
movsd  0xe51(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xe3e(%rip),%xmm2
call   1030 <rounder@plt>
xorps  %xmm1,%xmm1
movsd  0xe2e(%rip),%xmm2
movaps %xmm1,%xmm0
call   1030 <rounder@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xee7(%rip),%xmm0
movsd  0xee7(%rip),%xmm2
xorps  %xmm1,%xmm1
call   1030 <rounder@plt>
movsd  0xedf(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xecc(%rip),%xmm2
call   1030 <rounder@plt>
movsd  0xecf(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xeb4(%rip),%xmm2
call   1030 <rounder@plt>
movsd  0xebf(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xe9c(%rip),%xmm2
call   1030 <rounder@plt>
movsd  0xeaf(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xe84(%rip),%xmm2
call   1030 <rounder@plt>
movsd  0xe9f(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xe6c(%rip),%xmm2
call   1030 <rounder@plt>
movsd  0xe8f(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xe54(%rip),%xmm2
call   1030 <rounder@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movsd  0xe41(%rip),%xmm2
call   1030 <rounder@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @rounder(double 5.100000e+00, double 0.000000e+00, double 1.000000e+00)
%3 = call i32 @rounder(double 4.900000e+00, double 0.000000e+00, double 1.000000e+00)
%4 = call i32 @rounder(double 2.100000e+00, double 0.000000e+00, double 1.000000e+00)
%5 = call i32 @rounder(double 1.010000e+00, double 0.000000e+00, double 1.000000e+00)
%6 = call i32 @rounder(double 0x3FEFAE147AE147AE, double 0.000000e+00, double 1.000000e+00)
%7 = call i32 @rounder(double 5.100000e-01, double 0.000000e+00, double 1.000000e+00)
%8 = call i32 @rounder(double 4.900000e-01, double 0.000000e+00, double 1.000000e+00)
%9 = call i32 @rounder(double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @rounder(double 5.100000e+00, double 0.000000e+00, double 1.000000e+00)
%2 = tail call i32 @rounder(double 4.900000e+00, double 0.000000e+00, double 1.000000e+00)
%3 = tail call i32 @rounder(double 2.100000e+00, double 0.000000e+00, double 1.000000e+00)
%4 = tail call i32 @rounder(double 1.010000e+00, double 0.000000e+00, double 1.000000e+00)
%5 = tail call i32 @rounder(double 0x3FEFAE147AE147AE, double 0.000000e+00, double 1.000000e+00)
%6 = tail call i32 @rounder(double 5.100000e-01, double 0.000000e+00, double 1.000000e+00)
%7 = tail call i32 @rounder(double 4.900000e-01, double 0.000000e+00, double 1.000000e+00)
%8 = tail call i32 @rounder(double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
ret i32 0
}