#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 FLT_DIG;
double FLT_MAX;
double FLT_MIN;
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("Storage size for float : %d \n", sizeof(float));
  printf("Minimum float positive value: %E\n", FLT_MIN);
  printf("Maximum float positive value: %E\n", FLT_MAX);
  printf("Precision value: %d\n", FLT_DIG);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
cvttsd2si (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e8a(%rip),%rax
cvttsd2si (%rax),%esi
lea    0xee7(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%esi
lea    0xef4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    0x2eb7(%rip),%rax
cvttsd2si (%rax),%esi
lea    0xeea(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e98(%rip),%rax
cvttsd2si (%rax),%esi
lea    0xef5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
lea    0xf02(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Storage size for float : %d \0A\00"
@.str.1 = [34 x i8] c"Minimum float positive value: %E\0A\00"
@FLT_MIN = global double 0.000000e+00
@.str.2 = [34 x i8] c"Maximum float positive value: %E\0A\00"
@FLT_MAX = global double 0.000000e+00
@.str.3 = [21 x i8] c"Precision value: %d\0A\00"
@FLT_DIG = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = load double, double* @FLT_MIN
%4 = fptosi double %3 to i32
%5 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load double, double* @FLT_MAX
%7 = fptosi double %6 to i32
%8 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @FLT_DIG
%10 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Storage size for float : %d \0A\00"
@.str.1 = [34 x i8] c"Minimum float positive value: %E\0A\00"
@FLT_MIN = global double 0.000000e+00
@.str.2 = [34 x i8] c"Maximum float positive value: %E\0A\00"
@FLT_MAX = global double 0.000000e+00
@.str.3 = [21 x i8] c"Precision value: %d\0A\00"
@FLT_DIG = global i32 0
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = load double, double* @FLT_MIN
%3 = fptosi double %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = load double, double* @FLT_MAX
%6 = fptosi double %5 to i32
%7 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @FLT_DIG
%9 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 %8)
ret i32 0
}