#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 DBL_DIG;
double DBL_MAX;
double DBL_MIN;
int FLT_DIG;
double FLT_MAX;
double FLT_MIN;
int INT_MAX;
int INT_MIN;
int LONG_MAX;
double LONG_MIN;
int SCHAR_MAX;
int SCHAR_MIN;
int SHRT_MAX;
int SHRT_MIN;
int UCHAR_MAX;
int UINT_MAX;
double ULONG_MAX;
int USHRT_MAX;
int /*<<< orphan*/ printf(char *, ...);
void read_ranges(void) {
  printf("The output will have the following syntax:\n");
  printf("TYPE\n\tunsigned: max-value\n\tsigned: min-value TO max-value\n\n");
  printf("CHAR\n\tunsigned: %u\n\tsigned: %d TO %d\n\n", UCHAR_MAX, SCHAR_MIN,
         SCHAR_MAX);
  printf("SHORT\n\tunsigned: %u\n\tsigned: %d TO %d\n\n", USHRT_MAX, SHRT_MIN,
         SHRT_MAX);
  printf("INT\n\tunsigned: %u\n\tsigned: %d TO %d\n\n", UINT_MAX, INT_MIN,
         INT_MAX);
  printf("LONG\n\tunsigned: %lu\n\tsigned: %ld TO %ld\n\n", ULONG_MAX, LONG_MIN,
         LONG_MAX);
  printf("FLOAT\n\t%g TO %g (%d precision digits)\n\n", FLT_MIN, FLT_MAX,
         FLT_DIG);
  printf("DOUBLE\n\t%g TO %g (%d precision digits)\n\n", DBL_MIN, DBL_MAX,
         DBL_DIG);
}


x86 assembly (clang, -O0):
<read_ranges>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
mov    0x2e50(%rip),%rax
mov    (%rax),%edx
mov    0x2e3f(%rip),%rax
mov    (%rax),%ecx
lea    0xf16(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%esi
mov    0x2e0f(%rip),%rax
mov    (%rax),%edx
mov    0x2dfe(%rip),%rax
mov    (%rax),%ecx
lea    0xf14(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e37(%rip),%rax
mov    (%rax),%esi
mov    0x2e16(%rip),%rax
mov    (%rax),%edx
mov    0x2e2d(%rip),%rax
mov    (%rax),%ecx
lea    0xf13(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d9e(%rip),%rax
movsd  (%rax),%xmm0
mov    0x2dfb(%rip),%rax
movsd  (%rax),%xmm1
mov    0x2db8(%rip),%rax
mov    (%rax),%esi
lea    0xf0c(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
mov    0x2df9(%rip),%rax
movsd  (%rax),%xmm0
mov    0x2db6(%rip),%rax
movsd  (%rax),%xmm1
mov    0x2e03(%rip),%rax
mov    (%rax),%esi
lea    0xf09(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
mov    0x2d5c(%rip),%rax
movsd  (%rax),%xmm0
mov    0x2d49(%rip),%rax
movsd  (%rax),%xmm1
mov    0x2d8e(%rip),%rax
mov    (%rax),%esi
lea    0xf04(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_ranges>:
push   %rax
lea    0xfc8(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe7(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
mov    0x2e47(%rip),%rax
mov    (%rax),%edx
mov    0x2e36(%rip),%rax
mov    (%rax),%ecx
lea    0xea5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e67(%rip),%rax
mov    (%rax),%esi
mov    0x2e06(%rip),%rax
mov    (%rax),%edx
mov    0x2df5(%rip),%rax
mov    (%rax),%ecx
lea    0xea3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e2e(%rip),%rax
mov    (%rax),%esi
mov    0x2e0d(%rip),%rax
mov    (%rax),%edx
mov    0x2e24(%rip),%rax
mov    (%rax),%ecx
lea    0xea2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2d95(%rip),%rax
movsd  (%rax),%xmm0
mov    0x2df2(%rip),%rax
movsd  (%rax),%xmm1
mov    0x2daf(%rip),%rax
mov    (%rax),%esi
lea    0xe9b(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
mov    0x2df0(%rip),%rax
movsd  (%rax),%xmm0
mov    0x2dad(%rip),%rax
movsd  (%rax),%xmm1
mov    0x2dfa(%rip),%rax
mov    (%rax),%esi
lea    0xe98(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
mov    0x2d53(%rip),%rax
movsd  (%rax),%xmm0
mov    0x2d40(%rip),%rax
movsd  (%rax),%xmm1
mov    0x2d85(%rip),%rax
mov    (%rax),%esi
lea    0xe93(%rip),%rdi
mov    $0x2,%al
pop    %rcx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"The output will have the following syntax:\0A\00"
@.str.1 = [60 x i8] c"TYPE\0A\09unsigned: max-value\0A\09signed: min-value TO max-value\0A\0A\00"
@.str.2 = [39 x i8] c"CHAR\0A\09unsigned: %u\0A\09signed: %d TO %d\0A\0A\00"
@UCHAR_MAX = global i32 0
@SCHAR_MIN = global i32 0
@SCHAR_MAX = global i32 0
@.str.3 = [40 x i8] c"SHORT\0A\09unsigned: %u\0A\09signed: %d TO %d\0A\0A\00"
@USHRT_MAX = global i32 0
@SHRT_MIN = global i32 0
@SHRT_MAX = global i32 0
@.str.4 = [38 x i8] c"INT\0A\09unsigned: %u\0A\09signed: %d TO %d\0A\0A\00"
@UINT_MAX = global i32 0
@INT_MIN = global i32 0
@INT_MAX = global i32 0
@.str.5 = [42 x i8] c"LONG\0A\09unsigned: %lu\0A\09signed: %ld TO %ld\0A\0A\00"
@ULONG_MAX = global double 0.000000e+00
@LONG_MIN = global double 0.000000e+00
@LONG_MAX = global i32 0
@.str.6 = [40 x i8] c"FLOAT\0A\09%g TO %g (%d precision digits)\0A\0A\00"
@FLT_MIN = global double 0.000000e+00
@FLT_MAX = global double 0.000000e+00
@FLT_DIG = global i32 0
@.str.7 = [41 x i8] c"DOUBLE\0A\09%g TO %g (%d precision digits)\0A\0A\00"
@DBL_MIN = global double 0.000000e+00
@DBL_MAX = global double 0.000000e+00
@DBL_DIG = global i32 0
define void @read_ranges() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @UCHAR_MAX
%4 = load i32, i32* @SCHAR_MIN
%5 = load i32, i32* @SCHAR_MAX
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i32 %3, i32 %4, i32 %5)
%7 = load i32, i32* @USHRT_MAX
%8 = load i32, i32* @SHRT_MIN
%9 = load i32, i32* @SHRT_MAX
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
%11 = load i32, i32* @UINT_MAX
%12 = load i32, i32* @INT_MIN
%13 = load i32, i32* @INT_MAX
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), i32 %11, i32 %12, i32 %13)
%15 = load double, double* @ULONG_MAX
%16 = load double, double* @LONG_MIN
%17 = load i32, i32* @LONG_MAX
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0), double %15, double %16, i32 %17)
%19 = load double, double* @FLT_MIN
%20 = load double, double* @FLT_MAX
%21 = load i32, i32* @FLT_DIG
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.6, i64 0, i64 0), double %19, double %20, i32 %21)
%23 = load double, double* @DBL_MIN
%24 = load double, double* @DBL_MAX
%25 = load i32, i32* @DBL_DIG
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), double %23, double %24, i32 %25)
ret void
}

LLVM IR (-O2):
@.str.2 = [39 x i8] c"CHAR\0A\09unsigned: %u\0A\09signed: %d TO %d\0A\0A\00"
@UCHAR_MAX = global i32 0
@SCHAR_MIN = global i32 0
@SCHAR_MAX = global i32 0
@.str.3 = [40 x i8] c"SHORT\0A\09unsigned: %u\0A\09signed: %d TO %d\0A\0A\00"
@USHRT_MAX = global i32 0
@SHRT_MIN = global i32 0
@SHRT_MAX = global i32 0
@.str.4 = [38 x i8] c"INT\0A\09unsigned: %u\0A\09signed: %d TO %d\0A\0A\00"
@UINT_MAX = global i32 0
@INT_MIN = global i32 0
@INT_MAX = global i32 0
@.str.5 = [42 x i8] c"LONG\0A\09unsigned: %lu\0A\09signed: %ld TO %ld\0A\0A\00"
@ULONG_MAX = global double 0.000000e+00
@LONG_MIN = global double 0.000000e+00
@LONG_MAX = global i32 0
@.str.6 = [40 x i8] c"FLOAT\0A\09%g TO %g (%d precision digits)\0A\0A\00"
@FLT_MIN = global double 0.000000e+00
@FLT_MAX = global double 0.000000e+00
@FLT_DIG = global i32 0
@.str.7 = [41 x i8] c"DOUBLE\0A\09%g TO %g (%d precision digits)\0A\0A\00"
@DBL_MIN = global double 0.000000e+00
@DBL_MAX = global double 0.000000e+00
@DBL_DIG = global i32 0
@str = [43 x i8] c"The output will have the following syntax:\00"
@str.8 = [59 x i8] c"TYPE\0A\09unsigned: max-value\0A\09signed: min-value TO max-value\0A\00"
define void @read_ranges() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.8, i64 0, i64 0))
%3 = load i32, i32* @UCHAR_MAX
%4 = load i32, i32* @SCHAR_MIN
%5 = load i32, i32* @SCHAR_MAX
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i32 %3, i32 %4, i32 %5)
%7 = load i32, i32* @USHRT_MAX
%8 = load i32, i32* @SHRT_MIN
%9 = load i32, i32* @SHRT_MAX
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
%11 = load i32, i32* @UINT_MAX
%12 = load i32, i32* @INT_MIN
%13 = load i32, i32* @INT_MAX
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), i32 %11, i32 %12, i32 %13)
%15 = load double, double* @ULONG_MAX
%16 = load double, double* @LONG_MIN
%17 = load i32, i32* @LONG_MAX
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0), double %15, double %16, i32 %17)
%19 = load double, double* @FLT_MIN
%20 = load double, double* @FLT_MAX
%21 = load i32, i32* @FLT_DIG
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.6, i64 0, i64 0), double %19, double %20, i32 %21)
%23 = load double, double* @DBL_MIN
%24 = load double, double* @DBL_MAX
%25 = load i32, i32* @DBL_DIG
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), double %23, double %24, i32 %25)
ret void
}