#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 FLT_MAX;
double FLT_MIN;
int INT_MAX;
int INT_MIN;
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("The value of INT_MAX is %i\n", INT_MAX);
  printf("The value of INT_MIN is %i\n", INT_MIN);
  printf("An int takes %li bytes\n", sizeof(int));
  printf("The value of FLT_MAX is %f\n", FLT_MAX);
  printf("The value of FLT_MIN is %.50f\n", FLT_MIN);
  printf("A float takes %li bytes\n", sizeof(float));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%esi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    0x2e6f(%rip),%rax
cvttsd2si (%rax),%esi
lea    0xee4(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e70(%rip),%rax
cvttsd2si (%rax),%esi
lea    0xee9(%rip),%rdi
call   1030 <printf@plt>
lea    0xefc(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    0x2e7d(%rip),%rax
cvttsd2si (%rax),%esi
lea    0xef2(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e7e(%rip),%rax
cvttsd2si (%rax),%esi
lea    0xef7(%rip),%rdi
call   1030 <printf@plt>
lea    0xf0a(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"The value of INT_MAX is %i\0A\00"
@INT_MAX = global i32 0
@.str.1 = [28 x i8] c"The value of INT_MIN is %i\0A\00"
@INT_MIN = global i32 0
@.str.2 = [24 x i8] c"An int takes %li bytes\0A\00"
@.str.3 = [28 x i8] c"The value of FLT_MAX is %f\0A\00"
@FLT_MAX = global double 0.000000e+00
@.str.4 = [31 x i8] c"The value of FLT_MIN is %.50f\0A\00"
@FLT_MIN = global double 0.000000e+00
@.str.5 = [25 x i8] c"A float takes %li bytes\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @INT_MAX
%3 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @INT_MIN
%5 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 4)
%7 = load double, double* @FLT_MAX
%8 = fptosi double %7 to i32
%9 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i32 %8)
%10 = load double, double* @FLT_MIN
%11 = fptosi double %10 to i32
%12 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i32 %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 4)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"The value of INT_MAX is %i\0A\00"
@INT_MAX = global i32 0
@.str.1 = [28 x i8] c"The value of INT_MIN is %i\0A\00"
@INT_MIN = global i32 0
@.str.2 = [24 x i8] c"An int takes %li bytes\0A\00"
@.str.3 = [28 x i8] c"The value of FLT_MAX is %f\0A\00"
@FLT_MAX = global double 0.000000e+00
@.str.4 = [31 x i8] c"The value of FLT_MIN is %.50f\0A\00"
@FLT_MIN = global double 0.000000e+00
@.str.5 = [25 x i8] c"A float takes %li bytes\0A\00"
define i32 @main() {
%1 = load i32, i32* @INT_MAX
%2 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @INT_MIN
%4 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 4)
%6 = load double, double* @FLT_MAX
%7 = fptosi double %6 to i32
%8 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = load double, double* @FLT_MIN
%10 = fptosi double %9 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i32 %10)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 4)
ret i32 0
}