#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 */
double DBL_EPSILON;
double DBL_MAX;
double DBL_MIN;
int FE_DOWNWARD;
int FE_TONEAREST;
int FE_TOWARDZERO;
int FE_UPWARD;
double FLT_EPSILON;
double FLT_MAX;
double FLT_MIN;
int /*<<< orphan*/ change_rounding(int);
int /*<<< orphan*/ current_rounding();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ test_rounding();
int main(void) {
  printf("** Floating-point single-precision constants ** \n");
  printf("FLT_MIN 	= %E \n", FLT_MIN);
  printf("FLT_MAX 	= %E \n", FLT_MAX);
  printf("FLT_EPSILON	= %E \n", FLT_EPSILON);
  printf("\n");
  printf("** Floating-point double-precision constants ** \n");
  printf("DBL_MIN 	= %E \n", DBL_MIN);
  printf("DBL_MAX 	= %E \n", DBL_MAX);
  printf("DBL_EPSILON	= %E \n", DBL_EPSILON);
  printf("\n");
  printf("** Floating point rounding modes ** \n");
  printf("Rounding Mode FE_TONEAREST	= %d \n", FE_TONEAREST);
  printf("Rounding Mode FE_DOWNWARD	= %d \n", FE_DOWNWARD);
  printf("Rounding Mode FE_UPWARD		= %d \n", FE_UPWARD);
  printf("Rounding Mode FE_TOWARDZERO	= %d \n", FE_TOWARDZERO);
  printf("\n");
  current_rounding();
  test_rounding();
  printf("\n");
  change_rounding(FE_DOWNWARD);
  current_rounding();
  test_rounding();
  printf("\n");
  change_rounding(FE_UPWARD);
  current_rounding();
  test_rounding();
  printf("\n");
  change_rounding(FE_TOWARDZERO);
  current_rounding();
  test_rounding();
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2e6c(%rip),%rax
movsd  (%rax),%xmm0
lea    0xec3(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    0x2e43(%rip),%rax
movsd  (%rax),%xmm0
lea    0xeba(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    0x2e1a(%rip),%rax
movsd  (%rax),%xmm0
lea    0xeb1(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xf3f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2dd5(%rip),%rax
movsd  (%rax),%xmm0
lea    0xec1(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    0x2db4(%rip),%rax
movsd  (%rax),%xmm0
lea    0xeb8(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    0x2de3(%rip),%rax
movsd  (%rax),%xmm0
lea    0xeaf(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2da6(%rip),%rax
mov    (%rax),%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2d7f(%rip),%rax
mov    (%rax),%esi
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2d48(%rip),%rax
mov    (%rax),%esi
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2d71(%rip),%rax
mov    (%rax),%esi
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe60(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1040 <current_rounding@plt>
mov    $0x0,%al
call   1060 <test_rounding@plt>
lea    0xe44(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2d10(%rip),%rax
mov    (%rax),%edi
call   1030 <change_rounding@plt>
mov    $0x0,%al
call   1040 <current_rounding@plt>
mov    $0x0,%al
call   1060 <test_rounding@plt>
lea    0xe1a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2cc6(%rip),%rax
mov    (%rax),%edi
call   1030 <change_rounding@plt>
mov    $0x0,%al
call   1040 <current_rounding@plt>
mov    $0x0,%al
call   1060 <test_rounding@plt>
lea    0xdf0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2cdc(%rip),%rax
mov    (%rax),%edi
call   1030 <change_rounding@plt>
mov    $0x0,%al
call   1040 <current_rounding@plt>
mov    $0x0,%al
call   1060 <test_rounding@plt>
lea    0xdc6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xf80(%rip),%rdi
call   1050 <puts@plt>
mov    0x2e58(%rip),%rax
movsd  (%rax),%xmm0
lea    0xe7d(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
mov    0x2e2f(%rip),%rax
movsd  (%rax),%xmm0
lea    0xe74(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
mov    0x2e06(%rip),%rax
movsd  (%rax),%xmm0
lea    0xe6b(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
lea    0xf50(%rip),%rdi
call   1050 <puts@plt>
mov    0x2dc7(%rip),%rax
movsd  (%rax),%xmm0
lea    0xe4f(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
mov    0x2da6(%rip),%rax
movsd  (%rax),%xmm0
lea    0xe46(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
mov    0x2dd5(%rip),%rax
movsd  (%rax),%xmm0
lea    0xe3d(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
lea    0xf20(%rip),%rdi
call   1050 <puts@plt>
mov    0x2d9e(%rip),%rax
mov    (%rax),%esi
lea    0xe23(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x2d77(%rip),%rbx
mov    (%rbx),%esi
lea    0xe2e(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x2d40(%rip),%r15
mov    (%r15),%esi
lea    0xe37(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x2d68(%rip),%r14
mov    (%r14),%esi
lea    0xe3f(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
xor    %eax,%eax
call   1060 <current_rounding@plt>
xor    %eax,%eax
call   1080 <test_rounding@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    (%rbx),%edi
call   1030 <change_rounding@plt>
xor    %eax,%eax
call   1060 <current_rounding@plt>
xor    %eax,%eax
call   1080 <test_rounding@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    (%r15),%edi
call   1030 <change_rounding@plt>
xor    %eax,%eax
call   1060 <current_rounding@plt>
xor    %eax,%eax
call   1080 <test_rounding@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    (%r14),%edi
call   1030 <change_rounding@plt>
xor    %eax,%eax
call   1060 <current_rounding@plt>
xor    %eax,%eax
call   1080 <test_rounding@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [50 x i8] c"** Floating-point single-precision constants ** \0A\00"
@.str.1 = [16 x i8] c"FLT_MIN \09= %E \0A\00"
@FLT_MIN = global double 0.000000e+00
@.str.2 = [16 x i8] c"FLT_MAX \09= %E \0A\00"
@FLT_MAX = global double 0.000000e+00
@.str.3 = [19 x i8] c"FLT_EPSILON\09= %E \0A\00"
@FLT_EPSILON = global double 0.000000e+00
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [50 x i8] c"** Floating-point double-precision constants ** \0A\00"
@.str.6 = [16 x i8] c"DBL_MIN \09= %E \0A\00"
@DBL_MIN = global double 0.000000e+00
@.str.7 = [16 x i8] c"DBL_MAX \09= %E \0A\00"
@DBL_MAX = global double 0.000000e+00
@.str.8 = [19 x i8] c"DBL_EPSILON\09= %E \0A\00"
@DBL_EPSILON = global double 0.000000e+00
@.str.9 = [38 x i8] c"** Floating point rounding modes ** \0A\00"
@.str.10 = [34 x i8] c"Rounding Mode FE_TONEAREST\09= %d \0A\00"
@FE_TONEAREST = global i32 0
@.str.11 = [33 x i8] c"Rounding Mode FE_DOWNWARD\09= %d \0A\00"
@FE_DOWNWARD = global i32 0
@.str.12 = [32 x i8] c"Rounding Mode FE_UPWARD\09\09= %d \0A\00"
@FE_UPWARD = global i32 0
@.str.13 = [35 x i8] c"Rounding Mode FE_TOWARDZERO\09= %d \0A\00"
@FE_TOWARDZERO = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%3 = load double, double* @FLT_MIN
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %3)
%5 = load double, double* @FLT_MAX
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), double %5)
%7 = load double, double* @FLT_EPSILON
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), double %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0))
%11 = load double, double* @DBL_MIN
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), double %11)
%13 = load double, double* @DBL_MAX
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), double %13)
%15 = load double, double* @DBL_EPSILON
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), double %15)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.9, i64 0, i64 0))
%19 = load i32, i32* @FE_TONEAREST
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.10, i64 0, i64 0), i32 %19)
%21 = load i32, i32* @FE_DOWNWARD
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.11, i64 0, i64 0), i32 %21)
%23 = load i32, i32* @FE_UPWARD
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.12, i64 0, i64 0), i32 %23)
%25 = load i32, i32* @FE_TOWARDZERO
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.13, i64 0, i64 0), i32 %25)
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%28 = call i32 (...) @current_rounding()
%29 = call i32 (...) @test_rounding()
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%31 = load i32, i32* @FE_DOWNWARD
%32 = call i32 @change_rounding(i32 %31)
%33 = call i32 (...) @current_rounding()
%34 = call i32 (...) @test_rounding()
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%36 = load i32, i32* @FE_UPWARD
%37 = call i32 @change_rounding(i32 %36)
%38 = call i32 (...) @current_rounding()
%39 = call i32 (...) @test_rounding()
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%41 = load i32, i32* @FE_TOWARDZERO
%42 = call i32 @change_rounding(i32 %41)
%43 = call i32 (...) @current_rounding()
%44 = call i32 (...) @test_rounding()
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [16 x i8] c"FLT_MIN \09= %E \0A\00"
@FLT_MIN = global double 0.000000e+00
@.str.2 = [16 x i8] c"FLT_MAX \09= %E \0A\00"
@FLT_MAX = global double 0.000000e+00
@.str.3 = [19 x i8] c"FLT_EPSILON\09= %E \0A\00"
@FLT_EPSILON = global double 0.000000e+00
@.str.6 = [16 x i8] c"DBL_MIN \09= %E \0A\00"
@DBL_MIN = global double 0.000000e+00
@.str.7 = [16 x i8] c"DBL_MAX \09= %E \0A\00"
@DBL_MAX = global double 0.000000e+00
@.str.8 = [19 x i8] c"DBL_EPSILON\09= %E \0A\00"
@DBL_EPSILON = global double 0.000000e+00
@.str.10 = [34 x i8] c"Rounding Mode FE_TONEAREST\09= %d \0A\00"
@FE_TONEAREST = global i32 0
@.str.11 = [33 x i8] c"Rounding Mode FE_DOWNWARD\09= %d \0A\00"
@FE_DOWNWARD = global i32 0
@.str.12 = [32 x i8] c"Rounding Mode FE_UPWARD\09\09= %d \0A\00"
@FE_UPWARD = global i32 0
@.str.13 = [35 x i8] c"Rounding Mode FE_TOWARDZERO\09= %d \0A\00"
@FE_TOWARDZERO = global i32 0
@str = [49 x i8] c"** Floating-point single-precision constants ** \00"
@str.14 = [49 x i8] c"** Floating-point double-precision constants ** \00"
@str.15 = [37 x i8] c"** Floating point rounding modes ** \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
%2 = load double, double* @FLT_MIN
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %2)
%4 = load double, double* @FLT_MAX
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), double %4)
%6 = load double, double* @FLT_EPSILON
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), double %6)
%8 = tail call i32 @putchar(i32 10)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.14, i64 0, i64 0))
%10 = load double, double* @DBL_MIN
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), double %10)
%12 = load double, double* @DBL_MAX
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), double %12)
%14 = load double, double* @DBL_EPSILON
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), double %14)
%16 = tail call i32 @putchar(i32 10)
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.15, i64 0, i64 0))
%18 = load i32, i32* @FE_TONEAREST
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.10, i64 0, i64 0), i32 %18)
%20 = load i32, i32* @FE_DOWNWARD
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.11, i64 0, i64 0), i32 %20)
%22 = load i32, i32* @FE_UPWARD
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.12, i64 0, i64 0), i32 %22)
%24 = load i32, i32* @FE_TOWARDZERO
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.13, i64 0, i64 0), i32 %24)
%26 = tail call i32 @putchar(i32 10)
%27 = tail call i32 (...) @current_rounding()
%28 = tail call i32 (...) @test_rounding()
%29 = tail call i32 @putchar(i32 10)
%30 = load i32, i32* @FE_DOWNWARD
%31 = tail call i32 @change_rounding(i32 %30)
%32 = tail call i32 (...) @current_rounding()
%33 = tail call i32 (...) @test_rounding()
%34 = tail call i32 @putchar(i32 10)
%35 = load i32, i32* @FE_UPWARD
%36 = tail call i32 @change_rounding(i32 %35)
%37 = tail call i32 (...) @current_rounding()
%38 = tail call i32 (...) @test_rounding()
%39 = tail call i32 @putchar(i32 10)
%40 = load i32, i32* @FE_TOWARDZERO
%41 = tail call i32 @change_rounding(i32 %40)
%42 = tail call i32 (...) @current_rounding()
%43 = tail call i32 (...) @test_rounding()
%44 = tail call i32 @putchar(i32 10)
ret i32 0
}