#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 /*<<< orphan*/ printf(char *, unsigned long);
main() {
  printf("signed char min = %d\n", -(char)((unsigned char)~0 >> 1));
  printf("signed char max = %d\n", (char)((unsigned char)~0 >> 1));
  printf("signed short min = %d\n", -(short)((unsigned short)~0 >> 1));
  printf("signed short max = %d\n", (short)((unsigned short)~0 >> 1));
  printf("signed int min = %d\n", -(int)((unsigned int)~0 >> 1));
  printf("signed int max = %d\n", (int)((unsigned int)~0 >> 1));
  printf("signed long min = %ld\n", -(long)((unsigned long)~0 >> 1));
  printf("signed long max = %ld\n", (long)((unsigned long)~0 >> 1));
  printf("unsigned char max = %u\n", (unsigned char)~0);
  printf("unsigned short max = %u\n", (unsigned short)~0);
  printf("unsigned int max = %u\n", (unsigned int)~0);
  printf("unsigned long max = %lu\n", (unsigned long)~0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0xffffffffffffff81,%rsi
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
mov    $0x7f,%esi
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
mov    $0xffffffffffff8001,%rsi
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
mov    $0x7fff,%esi
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
mov    $0xffffffff80000001,%rsi
call   1030 <printf@plt>
lea    0xef9(%rip),%rdi
mov    $0x7fffffff,%esi
call   1030 <printf@plt>
lea    0xefd(%rip),%rdi
movabs $0x8000000000000001,%rsi
call   1030 <printf@plt>
lea    0xefe(%rip),%rdi
movabs $0x7fffffffffffffff,%rsi
ff ff 7f
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
mov    $0xff,%esi
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
mov    $0xffff,%esi
call   1030 <printf@plt>
lea    0xf0e(%rip),%rdi
mov    $0xffffffff,%esi
call   1030 <printf@plt>
lea    0xf14(%rip),%rdi
mov    $0xffffffffffffffff,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rdi
mov    $0xffffffffffffff81,%rsi
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x7f,%esi
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
mov    $0xffffffffffff8001,%rsi
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
mov    $0x7fff,%esi
call   1030 <printf@plt>
lea    0xefa(%rip),%rdi
mov    $0xffffffff80000001,%rsi
call   1030 <printf@plt>
lea    0xefc(%rip),%rdi
mov    $0x7fffffff,%esi
call   1030 <printf@plt>
movabs $0x7fffffffffffffff,%rbx
ff ff 7f
lea    0x2(%rbx),%rsi
lea    0xef2(%rip),%rdi
call   1030 <printf@plt>
lea    0xefd(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xf05(%rip),%rdi
mov    $0xff,%esi
call   1030 <printf@plt>
lea    0xf0c(%rip),%rdi
mov    $0xffff,%esi
call   1030 <printf@plt>
lea    0xf14(%rip),%rdi
mov    $0xffffffff,%esi
call   1030 <printf@plt>
lea    0xf1a(%rip),%rdi
mov    $0xffffffffffffffff,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"signed char min = %d\0A\00"
@.str.1 = [22 x i8] c"signed char max = %d\0A\00"
@.str.2 = [23 x i8] c"signed short min = %d\0A\00"
@.str.3 = [23 x i8] c"signed short max = %d\0A\00"
@.str.4 = [21 x i8] c"signed int min = %d\0A\00"
@.str.5 = [21 x i8] c"signed int max = %d\0A\00"
@.str.6 = [23 x i8] c"signed long min = %ld\0A\00"
@.str.7 = [23 x i8] c"signed long max = %ld\0A\00"
@.str.8 = [24 x i8] c"unsigned char max = %u\0A\00"
@.str.9 = [25 x i8] c"unsigned short max = %u\0A\00"
@.str.10 = [23 x i8] c"unsigned int max = %u\0A\00"
@.str.11 = [25 x i8] c"unsigned long max = %lu\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i64 -127)
%2 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i64 127)
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i64 -32767)
%4 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i64 32767)
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i64 -2147483647)
%6 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i64 2147483647)
%7 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i64 -9223372036854775807)
%8 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i64 9223372036854775807)
%9 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i64 255)
%10 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i64 65535)
%11 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), i64 4294967295)
%12 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0), i64 -1)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"signed char min = %d\0A\00"
@.str.1 = [22 x i8] c"signed char max = %d\0A\00"
@.str.2 = [23 x i8] c"signed short min = %d\0A\00"
@.str.3 = [23 x i8] c"signed short max = %d\0A\00"
@.str.4 = [21 x i8] c"signed int min = %d\0A\00"
@.str.5 = [21 x i8] c"signed int max = %d\0A\00"
@.str.6 = [23 x i8] c"signed long min = %ld\0A\00"
@.str.7 = [23 x i8] c"signed long max = %ld\0A\00"
@.str.8 = [24 x i8] c"unsigned char max = %u\0A\00"
@.str.9 = [25 x i8] c"unsigned short max = %u\0A\00"
@.str.10 = [23 x i8] c"unsigned int max = %u\0A\00"
@.str.11 = [25 x i8] c"unsigned long max = %lu\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i64 -127)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i64 127)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i64 -32767)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i64 32767)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i64 -2147483647)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i64 2147483647)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i64 -9223372036854775807)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i64 9223372036854775807)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i64 255)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i64 65535)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), i64 4294967295)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0), i64 -1)
ret i32 0
}