#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;
int INT_MAX;
int INT_MIN;
unsigned long LONG_MAX;
unsigned long LONG_MIN;
int SHRT_MAX;
int SHRT_MIN;
int UCHAR_MAX;
int UINT_MAX;
unsigned long ULONG_MAX;
int USHRT_MAX;
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("char Max:%d  char Min:%d\n", CHAR_MAX, CHAR_MIN);
  printf("unsigned char Max:%u unsignd char Min:%u\n", UCHAR_MAX, 0);
  printf("short Max:%d  short Min:%d\n", SHRT_MAX, SHRT_MIN);
  printf("unsigned short Max:%u  unsigned short Min:%u\n", USHRT_MAX, 0);
  printf("int Max:%d  int Min:%d\n", INT_MAX, INT_MIN);
  printf("unsigned int Max:%u  unsigned int Min:%u\n", UINT_MAX, 0);
  printf("long Max:%ld  long Min:%ld\n", LONG_MAX, LONG_MIN);
  printf("unsigned long Max:%lu  unsigned long Min:%u\n", ULONG_MAX, 0);
  unsigned char c = ~0;
  unsigned int i = ~0;
  unsigned short s = ~0;
  unsigned long l = ~0;
  printf("----\n");
  printf("char Max:%d  char Min:%d\n", (c >> 1), (-(c >> 1) - 1));
  printf("unsigned char Max:%u unsignd char Min:%u\n", c, 0);
  printf("short Max:%d  short Min:%d\n", (s >> 1), (-(s >> 1) - 1));
  printf("unsigned short Max:%u  unsigned short Min:%u\n", s, 0);
  printf("int Max:%d  int Min:%d\n", (i >> 1), (-(i >> 1) - 1));
  printf("unsigned int Max:%u  unsigned int Min:%u\n", i, 0);
  printf("long Max:%ld  long Min:%ld\n", (l >> 1), (-(l >> 1) - 1));
  printf("unsigned long Max:%lu  unsigned long Min:%u\n", l, 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%esi
mov    0x2ea9(%rip),%rax
mov    (%rax),%edx
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
lea    0xecb(%rip),%rdi
xor    %edx,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e31(%rip),%rax
mov    (%rax),%esi
mov    0x2e30(%rip),%rax
mov    (%rax),%edx
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e51(%rip),%rax
mov    (%rax),%esi
lea    0xed8(%rip),%rdi
xor    %edx,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e30(%rip),%rax
mov    (%rax),%esi
mov    0x2e0f(%rip),%rax
mov    (%rax),%edx
lea    0xee4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e08(%rip),%rax
mov    (%rax),%esi
lea    0xee5(%rip),%rdi
xor    %edx,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2dcf(%rip),%rax
mov    (%rax),%rsi
mov    0x2ddd(%rip),%rax
mov    (%rax),%rdx
lea    0xeeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d8d(%rip),%rax
mov    (%rax),%rsi
lea    0xeef(%rip),%rdi
xor    %edx,%edx
mov    $0x0,%al
call   1030 <printf@plt>
movb   $0xff,-0x5(%rbp)
movl   $0xffffffff,-0xc(%rbp)
movw   $0xffff,-0xe(%rbp)
movq   $0xffffffffffffffff,-0x18(%rbp)
ff
lea    0xef3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movzbl -0x5(%rbp),%esi
sar    $0x1,%esi
movzbl -0x5(%rbp),%eax
sar    $0x1,%eax
xor    %edx,%edx
sub    %eax,%edx
sub    $0x1,%edx
lea    0xdb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movzbl -0x5(%rbp),%esi
lea    0xdbf(%rip),%rdi
xor    %edx,%edx
mov    $0x0,%al
call   1030 <printf@plt>
movzwl -0xe(%rbp),%esi
sar    $0x1,%esi
movzwl -0xe(%rbp),%eax
sar    $0x1,%eax
xor    %edx,%edx
sub    %eax,%edx
sub    $0x1,%edx
lea    0xdc4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movzwl -0xe(%rbp),%esi
lea    0xdce(%rip),%rdi
xor    %edx,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
shr    $0x1,%esi
mov    -0xc(%rbp),%eax
shr    $0x1,%eax
xor    %edx,%edx
sub    %eax,%edx
sub    $0x1,%edx
lea    0xdd9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xde0(%rip),%rdi
xor    %edx,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
shr    $0x1,%rsi
mov    -0x18(%rbp),%rax
shr    $0x1,%rax
xor    %ecx,%ecx
mov    %ecx,%edx
sub    %rax,%rdx
sub    $0x1,%rdx
lea    0xddf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xde9(%rip),%rdi
xor    %edx,%edx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    0x2eae(%rip),%rax
mov    (%rax),%esi
mov    0x2e9d(%rip),%rax
mov    (%rax),%edx
lea    0xebc(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%esi
lea    0xebf(%rip),%rdi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e25(%rip),%rax
mov    (%rax),%esi
mov    0x2e24(%rip),%rax
mov    (%rax),%edx
lea    0xec7(%rip),%r12
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e42(%rip),%rax
mov    (%rax),%esi
lea    0xec9(%rip),%r13
mov    %r13,%rdi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e1e(%rip),%rax
mov    (%rax),%esi
mov    0x2dfd(%rip),%rax
mov    (%rax),%edx
lea    0xed2(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2df3(%rip),%rax
mov    (%rax),%esi
lea    0xed0(%rip),%rbp
mov    %rbp,%rdi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2db7(%rip),%rax
mov    (%rax),%rsi
mov    0x2dc5(%rip),%rax
mov    (%rax),%rdx
lea    0xed3(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2d72(%rip),%rax
mov    (%rax),%rsi
lea    0xed4(%rip),%r15
mov    %r15,%rdi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeee(%rip),%rdi
call   1030 <puts@plt>
lea    0xdc9(%rip),%rdi
mov    $0x7f,%esi
mov    $0xffffff80,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdcb(%rip),%rdi
mov    $0xff,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    $0x7fff,%esi
mov    $0xffff8000,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13,%rdi
mov    $0xffff,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x7fffffff,%esi
mov    $0x80000000,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0xffffffff,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
movabs $0x7fffffffffffffff,%rsi
ff ff 7f
lea    0x1(%rsi),%rdx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    $0xffffffffffffffff,%rsi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"char Max:%d char Min:%d\0A\00"
@CHAR_MAX = global i32 0
@CHAR_MIN = global i32 0
@.str.1 = [42 x i8] c"unsigned char Max:%u unsignd char Min:%u\0A\00"
@UCHAR_MAX = global i32 0
@.str.2 = [28 x i8] c"short Max:%d short Min:%d\0A\00"
@SHRT_MAX = global i32 0
@SHRT_MIN = global i32 0
@.str.3 = [46 x i8] c"unsigned short Max:%u unsigned short Min:%u\0A\00"
@USHRT_MAX = global i32 0
@.str.4 = [24 x i8] c"int Max:%d int Min:%d\0A\00"
@INT_MAX = global i32 0
@INT_MIN = global i32 0
@.str.5 = [42 x i8] c"unsigned int Max:%u unsigned int Min:%u\0A\00"
@UINT_MAX = global i32 0
@.str.6 = [28 x i8] c"long Max:%ld long Min:%ld\0A\00"
@LONG_MAX = global i64 0
@LONG_MIN = global i64 0
@.str.7 = [45 x i8] c"unsigned long Max:%lu unsigned long Min:%u\0A\00"
@ULONG_MAX = global i64 0
@.str.8 = [6 x i8] c"----\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
%4 = alloca i16
%5 = alloca i64
store i32 0, i32* %1
%6 = load i32, i32* @CHAR_MAX
%7 = load i32, i32* @CHAR_MIN
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
%9 = load i32, i32* @UCHAR_MAX
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32 0)
%11 = load i32, i32* @SHRT_MAX
%12 = load i32, i32* @SHRT_MIN
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 %11, i32 %12)
%14 = load i32, i32* @USHRT_MAX
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0), i32 %14, i32 0)
%16 = load i32, i32* @INT_MAX
%17 = load i32, i32* @INT_MIN
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %16, i32 %17)
%19 = load i32, i32* @UINT_MAX
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0), i32 %19, i32 0)
%21 = load i64, i64* @LONG_MAX
%22 = load i64, i64* @LONG_MIN
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i64 %21, i64 %22)
%24 = load i64, i64* @ULONG_MAX
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0), i64 %24, i32 0)
store i8 -1, i8* %2
store i32 -1, i32* %3
store i16 -1, i16* %4
store i64 -1, i64* %5
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%27 = load i8, i8* %2
%28 = zext i8 %27 to i32
%29 = ashr i32 %28, 1
%30 = load i8, i8* %2
%31 = zext i8 %30 to i32
%32 = ashr i32 %31, 1
%33 = sub nsw i32 0, %32
%34 = sub nsw i32 %33, 1
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %29, i32 %34)
%36 = load i8, i8* %2
%37 = zext i8 %36 to i32
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 %37, i32 0)
%39 = load i16, i16* %4
%40 = zext i16 %39 to i32
%41 = ashr i32 %40, 1
%42 = load i16, i16* %4
%43 = zext i16 %42 to i32
%44 = ashr i32 %43, 1
%45 = sub nsw i32 0, %44
%46 = sub nsw i32 %45, 1
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 %41, i32 %46)
%48 = load i16, i16* %4
%49 = zext i16 %48 to i32
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0), i32 %49, i32 0)
%51 = load i32, i32* %3
%52 = lshr i32 %51, 1
%53 = load i32, i32* %3
%54 = lshr i32 %53, 1
%55 = sub i32 0, %54
%56 = sub i32 %55, 1
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %52, i32 %56)
%58 = load i32, i32* %3
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0), i32 %58, i32 0)
%60 = load i64, i64* %5
%61 = lshr i64 %60, 1
%62 = load i64, i64* %5
%63 = lshr i64 %62, 1
%64 = sub i64 0, %63
%65 = sub i64 %64, 1
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i64 %61, i64 %65)
%67 = load i64, i64* %5
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0), i64 %67, i32 0)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"char Max:%d char Min:%d\0A\00"
@CHAR_MAX = global i32 0
@CHAR_MIN = global i32 0
@.str.1 = [42 x i8] c"unsigned char Max:%u unsignd char Min:%u\0A\00"
@UCHAR_MAX = global i32 0
@.str.2 = [28 x i8] c"short Max:%d short Min:%d\0A\00"
@SHRT_MAX = global i32 0
@SHRT_MIN = global i32 0
@.str.3 = [46 x i8] c"unsigned short Max:%u unsigned short Min:%u\0A\00"
@USHRT_MAX = global i32 0
@.str.4 = [24 x i8] c"int Max:%d int Min:%d\0A\00"
@INT_MAX = global i32 0
@INT_MIN = global i32 0
@.str.5 = [42 x i8] c"unsigned int Max:%u unsigned int Min:%u\0A\00"
@UINT_MAX = global i32 0
@.str.6 = [28 x i8] c"long Max:%ld long Min:%ld\0A\00"
@LONG_MAX = global i64 0
@LONG_MIN = global i64 0
@.str.7 = [45 x i8] c"unsigned long Max:%lu unsigned long Min:%u\0A\00"
@ULONG_MAX = global i64 0
@str = [5 x i8] c"----\00"
define i32 @main() {
%1 = load i32, i32* @CHAR_MAX
%2 = load i32, i32* @CHAR_MIN
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
%4 = load i32, i32* @UCHAR_MAX
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 %4, i32 0)
%6 = load i32, i32* @SHRT_MAX
%7 = load i32, i32* @SHRT_MIN
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 %6, i32 %7)
%9 = load i32, i32* @USHRT_MAX
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0), i32 %9, i32 0)
%11 = load i32, i32* @INT_MAX
%12 = load i32, i32* @INT_MIN
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %11, i32 %12)
%14 = load i32, i32* @UINT_MAX
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0), i32 %14, i32 0)
%16 = load i64, i64* @LONG_MAX
%17 = load i64, i64* @LONG_MIN
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i64 %16, i64 %17)
%19 = load i64, i64* @ULONG_MAX
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0), i64 %19, i32 0)
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 127, i32 -128)
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 255, i32 0)
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 32767, i32 -32768)
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0), i32 65535, i32 0)
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 2147483647, i32 -2147483648)
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0), i32 -1, i32 0)
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i64 9223372036854775807, i64 -9223372036854775808)
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0), i64 -1, i32 0)
ret i32 0
}