#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 CHAR_MAX;
int CHAR_MIN;
double FLT_MAX;
double FLT_MIN;
int INT_MAX;
int INT_MIN;
float LONG_MAX;
double LONG_MIN;
int SHRT_MAX;
int SHRT_MIN;
long get_max_by_size(int);
float get_max_float();
long get_min_by_max(long);
int /*<<< orphan*/ printf(char *, double, float);
int main(void) {
  long char_min, short_min, int_min;
  long long_min;
  float float_min;
  long char_max, short_max, int_max;
  long long_max;
  float float_max;
  printf("header:range of char is %d - %d\n", CHAR_MIN, CHAR_MAX);
  char_max = get_max_by_size(sizeof(char));
  char_min = get_min_by_max(char_max);
  printf("compute:range of char is %ld - %ld\n", char_min, char_max);
  printf("header:range of int is %d - %d\n", INT_MIN, INT_MAX);
  int_max = get_max_by_size(sizeof(int));
  int_min = get_min_by_max(int_max);
  printf("compute:range of int is %ld - %ld\n", int_min, int_max);
  printf("header:range of short is %d - %d\n", SHRT_MIN, SHRT_MAX);
  short_max = get_max_by_size(sizeof(short));
  short_min = get_min_by_max(short_max);
  printf("compute:range of long is %ld - %ld\n", short_min, short_max);
  printf("header:range of long is %ld - %ld\n", LONG_MIN, LONG_MAX);
  long_max = get_max_by_size(sizeof(long));
  long_min = get_min_by_max(long_max);
  printf("compute:range of long is %ld - %ld\n", long_min, long_max);
  printf("header:range of float is %f - %f\n", FLT_MIN, FLT_MAX);
  float_max = get_max_float();
  printf("header:range of float is %f - %f\n", FLT_MIN, float_max);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e8a(%rip),%rax
cvtsi2sdl (%rax),%xmm0
mov    0x2e87(%rip),%rax
cvtsi2ssl (%rax),%xmm1
lea    0xe94(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1030 <get_max_by_size@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
call   1050 <get_min_by_max@plt>
mov    %rax,-0x10(%rbp)
cvtsi2sdq -0x10(%rbp),%xmm0
cvtsi2ssq -0x38(%rbp),%xmm1
lea    0xe82(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e15(%rip),%rax
cvtsi2sdl (%rax),%xmm0
mov    0x2e1a(%rip),%rax
cvtsi2ssl (%rax),%xmm1
lea    0xe84(%rip),%rdi
call   1040 <printf@plt>
mov    $0x4,%edi
call   1030 <get_max_by_size@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rdi
call   1050 <get_min_by_max@plt>
mov    %rax,-0x20(%rbp)
cvtsi2sdq -0x20(%rbp),%xmm0
cvtsi2ssq -0x48(%rbp),%xmm1
lea    0xe71(%rip),%rdi
call   1040 <printf@plt>
mov    0x2da0(%rip),%rax
cvtsi2sdl (%rax),%xmm0
mov    0x2d8d(%rip),%rax
cvtsi2ssl (%rax),%xmm1
lea    0xe72(%rip),%rdi
call   1040 <printf@plt>
mov    $0x2,%edi
call   1030 <get_max_by_size@plt>
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rdi
call   1050 <get_min_by_max@plt>
mov    %rax,-0x18(%rbp)
cvtsi2sdq -0x18(%rbp),%xmm0
cvtsi2ssq -0x40(%rbp),%xmm1
lea    0xe61(%rip),%rdi
call   1040 <printf@plt>
mov    0x2d73(%rip),%rax
movsd  (%rax),%xmm0
mov    0x2d48(%rip),%rax
movss  (%rax),%xmm1
lea    0xe63(%rip),%rdi
call   1040 <printf@plt>
mov    $0x8,%edi
call   1030 <get_max_by_size@plt>
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rdi
call   1050 <get_min_by_max@plt>
mov    %rax,-0x28(%rbp)
cvtsi2sdq -0x28(%rbp),%xmm0
cvtsi2ssq -0x50(%rbp),%xmm1
lea    0xe0c(%rip),%rdi
call   1040 <printf@plt>
mov    0x2d2e(%rip),%rax
movsd  (%rax),%xmm0
mov    0x2d03(%rip),%rax
movsd  (%rax),%xmm1
cvtsd2ss %xmm1,%xmm1
lea    0xe2d(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <get_max_float@plt>
movss  %xmm0,-0x54(%rbp)
mov    0x2cfc(%rip),%rax
movsd  (%rax),%xmm0
movss  -0x54(%rbp),%xmm1
lea    0xe05(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    0x2e95(%rip),%rax
cvtsi2sdl (%rax),%xmm0
mov    0x2e92(%rip),%rax
cvtsi2ssl (%rax),%xmm1
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1030 <get_max_by_size@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <get_min_by_max@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
xorps  %xmm1,%xmm1
cvtsi2ss %rbx,%xmm1
lea    0xe8f(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e22(%rip),%rax
xorps  %xmm0,%xmm0
cvtsi2sdl (%rax),%xmm0
mov    0x2e24(%rip),%rax
xorps  %xmm1,%xmm1
cvtsi2ssl (%rax),%xmm1
lea    0xe8b(%rip),%rdi
call   1040 <printf@plt>
mov    $0x4,%edi
call   1030 <get_max_by_size@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <get_min_by_max@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
xorps  %xmm1,%xmm1
cvtsi2ss %rbx,%xmm1
lea    0xe7a(%rip),%rdi
call   1040 <printf@plt>
mov    0x2da9(%rip),%rax
xorps  %xmm0,%xmm0
cvtsi2sdl (%rax),%xmm0
mov    0x2d93(%rip),%rax
xorps  %xmm1,%xmm1
cvtsi2ssl (%rax),%xmm1
lea    0xe75(%rip),%rdi
call   1040 <printf@plt>
mov    $0x2,%edi
call   1030 <get_max_by_size@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <get_min_by_max@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
xorps  %xmm1,%xmm1
cvtsi2ss %rbx,%xmm1
lea    0xe66(%rip),%r14
mov    %r14,%rdi
call   1040 <printf@plt>
mov    0x2d75(%rip),%rax
movsd  (%rax),%xmm0
mov    0x2d4a(%rip),%rax
movss  (%rax),%xmm1
lea    0xe65(%rip),%rdi
call   1040 <printf@plt>
mov    $0x8,%edi
call   1030 <get_max_by_size@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <get_min_by_max@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
xorps  %xmm1,%xmm1
cvtsi2ss %rbx,%xmm1
mov    %r14,%rdi
call   1040 <printf@plt>
mov    0x2d36(%rip),%r14
movsd  (%r14),%xmm0
mov    0x2d0a(%rip),%rax
movsd  (%rax),%xmm1
cvtsd2ss %xmm1,%xmm1
lea    0xe34(%rip),%rbx
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <get_max_float@plt>
movaps %xmm0,%xmm1
movsd  (%r14),%xmm0
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [33 x i8] c"header:range of char is %d - %d\0A\00"
@CHAR_MIN = global i32 0
@CHAR_MAX = global i32 0
@.str.1 = [36 x i8] c"compute:range of char is %ld - %ld\0A\00"
@.str.2 = [32 x i8] c"header:range of int is %d - %d\0A\00"
@INT_MIN = global i32 0
@INT_MAX = global i32 0
@.str.3 = [35 x i8] c"compute:range of int is %ld - %ld\0A\00"
@.str.4 = [34 x i8] c"header:range of short is %d - %d\0A\00"
@SHRT_MIN = global i32 0
@SHRT_MAX = global i32 0
@.str.5 = [36 x i8] c"compute:range of long is %ld - %ld\0A\00"
@.str.6 = [35 x i8] c"header:range of long is %ld - %ld\0A\00"
@LONG_MIN = global double 0.000000e+00
@LONG_MAX = global float 0.000000e+00
@.str.7 = [34 x i8] c"header:range of float is %f - %f\0A\00"
@FLT_MIN = global double 0.000000e+00
@FLT_MAX = global double 0.000000e+00
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca float
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca float
store i32 0, i32* %1
%12 = load i32, i32* @CHAR_MIN
%13 = sitofp i32 %12 to double
%14 = load i32, i32* @CHAR_MAX
%15 = sitofp i32 %14 to float
%16 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), double %13, float %15)
%17 = call i64 @get_max_by_size(i32 1)
store i64 %17, i64* %7
%18 = load i64, i64* %7
%19 = call i64 @get_min_by_max(i64 %18)
store i64 %19, i64* %2
%20 = load i64, i64* %2
%21 = sitofp i64 %20 to double
%22 = load i64, i64* %7
%23 = sitofp i64 %22 to float
%24 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), double %21, float %23)
%25 = load i32, i32* @INT_MIN
%26 = sitofp i32 %25 to double
%27 = load i32, i32* @INT_MAX
%28 = sitofp i32 %27 to float
%29 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), double %26, float %28)
%30 = call i64 @get_max_by_size(i32 4)
store i64 %30, i64* %9
%31 = load i64, i64* %9
%32 = call i64 @get_min_by_max(i64 %31)
store i64 %32, i64* %4
%33 = load i64, i64* %4
%34 = sitofp i64 %33 to double
%35 = load i64, i64* %9
%36 = sitofp i64 %35 to float
%37 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), double %34, float %36)
%38 = load i32, i32* @SHRT_MIN
%39 = sitofp i32 %38 to double
%40 = load i32, i32* @SHRT_MAX
%41 = sitofp i32 %40 to float
%42 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), double %39, float %41)
%43 = call i64 @get_max_by_size(i32 2)
store i64 %43, i64* %8
%44 = load i64, i64* %8
%45 = call i64 @get_min_by_max(i64 %44)
store i64 %45, i64* %3
%46 = load i64, i64* %3
%47 = sitofp i64 %46 to double
%48 = load i64, i64* %8
%49 = sitofp i64 %48 to float
%50 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0), double %47, float %49)
%51 = load double, double* @LONG_MIN
%52 = load float, float* @LONG_MAX
%53 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), double %51, float %52)
%54 = call i64 @get_max_by_size(i32 8)
store i64 %54, i64* %10
%55 = load i64, i64* %10
%56 = call i64 @get_min_by_max(i64 %55)
store i64 %56, i64* %5
%57 = load i64, i64* %5
%58 = sitofp i64 %57 to double
%59 = load i64, i64* %10
%60 = sitofp i64 %59 to float
%61 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0), double %58, float %60)
%62 = load double, double* @FLT_MIN
%63 = load double, double* @FLT_MAX
%64 = fptrunc double %63 to float
%65 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0), double %62, float %64)
%66 = call float (...) @get_max_float()
store float %66, float* %11
%67 = load double, double* @FLT_MIN
%68 = load float, float* %11
%69 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0), double %67, float %68)
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"header:range of char is %d - %d\0A\00"
@CHAR_MIN = global i32 0
@CHAR_MAX = global i32 0
@.str.1 = [36 x i8] c"compute:range of char is %ld - %ld\0A\00"
@.str.2 = [32 x i8] c"header:range of int is %d - %d\0A\00"
@INT_MIN = global i32 0
@INT_MAX = global i32 0
@.str.3 = [35 x i8] c"compute:range of int is %ld - %ld\0A\00"
@.str.4 = [34 x i8] c"header:range of short is %d - %d\0A\00"
@SHRT_MIN = global i32 0
@SHRT_MAX = global i32 0
@.str.5 = [36 x i8] c"compute:range of long is %ld - %ld\0A\00"
@.str.6 = [35 x i8] c"header:range of long is %ld - %ld\0A\00"
@LONG_MIN = global double 0.000000e+00
@LONG_MAX = global float 0.000000e+00
@.str.7 = [34 x i8] c"header:range of float is %f - %f\0A\00"
@FLT_MIN = global double 0.000000e+00
@FLT_MAX = global double 0.000000e+00
define i32 @main() {
%1 = load i32, i32* @CHAR_MIN
%2 = sitofp i32 %1 to double
%3 = load i32, i32* @CHAR_MAX
%4 = sitofp i32 %3 to float
%5 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), double %2, float %4)
%6 = tail call i64 @get_max_by_size(i32 1)
%7 = tail call i64 @get_min_by_max(i64 %6)
%8 = sitofp i64 %7 to double
%9 = sitofp i64 %6 to float
%10 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), double %8, float %9)
%11 = load i32, i32* @INT_MIN
%12 = sitofp i32 %11 to double
%13 = load i32, i32* @INT_MAX
%14 = sitofp i32 %13 to float
%15 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), double %12, float %14)
%16 = tail call i64 @get_max_by_size(i32 4)
%17 = tail call i64 @get_min_by_max(i64 %16)
%18 = sitofp i64 %17 to double
%19 = sitofp i64 %16 to float
%20 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), double %18, float %19)
%21 = load i32, i32* @SHRT_MIN
%22 = sitofp i32 %21 to double
%23 = load i32, i32* @SHRT_MAX
%24 = sitofp i32 %23 to float
%25 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), double %22, float %24)
%26 = tail call i64 @get_max_by_size(i32 2)
%27 = tail call i64 @get_min_by_max(i64 %26)
%28 = sitofp i64 %27 to double
%29 = sitofp i64 %26 to float
%30 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0), double %28, float %29)
%31 = load double, double* @LONG_MIN
%32 = load float, float* @LONG_MAX
%33 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), double %31, float %32)
%34 = tail call i64 @get_max_by_size(i32 8)
%35 = tail call i64 @get_min_by_max(i64 %34)
%36 = sitofp i64 %35 to double
%37 = sitofp i64 %34 to float
%38 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0), double %36, float %37)
%39 = load double, double* @FLT_MIN
%40 = load double, double* @FLT_MAX
%41 = fptrunc double %40 to float
%42 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0), double %39, float %41)
%43 = tail call float (...) @get_max_float()
%44 = load double, double* @FLT_MIN
%45 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0), double %44, float %43)
ret i32 0
}