#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_MAX;
double FLT_MAX;
int INT_MAX;
int /*<<< orphan*/ LONG_MAX;
int SHRT_MAX;
int /*<<< orphan*/ printf(char *, ...);
void max_values() {
  printf("MAX VALUES \n");
  printf("type	max value\n");
  printf("-------------------\n");
  printf("int	%d\n", INT_MAX);
  printf("short	%d\n", SHRT_MAX);
  printf("long	%ld\n", LONG_MAX);
  printf("float	%f\n", FLT_MAX);
  printf("double	%f\n", DBL_MAX);
  printf("-------------------\n\n");
}


x86 assembly (clang, -O0):
<max_values>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2ea3(%rip),%rax
mov    (%rax),%esi
lea    0xee4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e6c(%rip),%rax
mov    (%rax),%esi
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e5d(%rip),%rax
mov    (%rax),%esi
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e56(%rip),%rax
movsd  (%rax),%xmm0
lea    0xeb9(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    0x2e1d(%rip),%rax
movsd  (%rax),%xmm0
lea    0xeaa(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_values>:
push   %rax
lea    0xf09(%rip),%rdi
call   1030 <puts@plt>
lea    0xf09(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0c(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%esi
lea    0xeab(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e65(%rip),%rax
mov    (%rax),%esi
lea    0xe9c(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e56(%rip),%rax
mov    (%rax),%esi
lea    0xe8f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e4f(%rip),%rax
movsd  (%rax),%xmm0
lea    0xe80(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    0x2e16(%rip),%rax
movsd  (%rax),%xmm0
lea    0xe71(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe9d(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"MAX VALUES \0A\00"
@.str.1 = [16 x i8] c"type\09max value\0A\00"
@.str.2 = [21 x i8] c"-------------------\0A\00"
@.str.3 = [8 x i8] c"int\09%d\0A\00"
@INT_MAX = global i32 0
@.str.4 = [10 x i8] c"short\09%d\0A\00"
@SHRT_MAX = global i32 0
@.str.5 = [10 x i8] c"long\09%ld\0A\00"
@LONG_MAX = global i32 0
@.str.6 = [10 x i8] c"float\09%f\0A\00"
@FLT_MAX = global double 0.000000e+00
@.str.7 = [11 x i8] c"double\09%f\0A\00"
@DBL_MAX = global double 0.000000e+00
@.str.8 = [22 x i8] c"-------------------\0A\0A\00"
define void @max_values() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%4 = load i32, i32* @INT_MAX
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @SHRT_MAX
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @LONG_MAX
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %8)
%10 = load double, double* @FLT_MAX
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), double %10)
%12 = load double, double* @DBL_MAX
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), double %12)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.3 = [8 x i8] c"int\09%d\0A\00"
@INT_MAX = global i32 0
@.str.4 = [10 x i8] c"short\09%d\0A\00"
@SHRT_MAX = global i32 0
@.str.5 = [10 x i8] c"long\09%ld\0A\00"
@LONG_MAX = global i32 0
@.str.6 = [10 x i8] c"float\09%f\0A\00"
@FLT_MAX = global double 0.000000e+00
@.str.7 = [11 x i8] c"double\09%f\0A\00"
@DBL_MAX = global double 0.000000e+00
@str = [12 x i8] c"MAX VALUES \00"
@str.9 = [15 x i8] c"type\09max value\00"
@str.10 = [20 x i8] c"-------------------\00"
@str.11 = [21 x i8] c"-------------------\0A\00"
define void @max_values() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.9, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.10, i64 0, i64 0))
%4 = load i32, i32* @INT_MAX
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @SHRT_MAX
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @LONG_MAX
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %8)
%10 = load double, double* @FLT_MAX
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 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 ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), double %12)
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.11, i64 0, i64 0))
ret void
}