#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 */
scalar_t__ INT_MAX;
scalar_t__ INT_MIN;
scalar_t__ LONG_MAX;
scalar_t__ LONG_MIN;
scalar_t__ SCHAR_MAX;
scalar_t__ SCHAR_MIN;
scalar_t__ SHRT_MAX;
scalar_t__ SHRT_MIN;
int /*<<< orphan*/ printf(char *, long, long);
int main() {
  printf("unsigned char:  %u - %u\n", (unsigned char)0x0U,
         (unsigned char)~0x0U);
  printf("unsigned short: %hu - %hu\n", (unsigned short)0x0U,
         (unsigned short)~0x0U);
  printf("unsigned int:   %u - %u\n", (unsigned int)0x0U, (unsigned int)~0x0U);
  printf("unsigned long:  %lu - %lu\n", (unsigned long)0x0UL,
         (unsigned long)~0x0UL);
  printf("  signed char:  %d - %d\n", (signed char)SCHAR_MIN,
         (signed char)SCHAR_MAX);
  printf("  signed short: %hd - %hd\n", (signed short)SHRT_MIN,
         (signed short)SHRT_MAX);
  printf("  signed int:   %d - %d\n", (signed int)INT_MIN, (signed int)INT_MAX);
  printf("  signed long:  %ld - %ld\n", (signed long)LONG_MIN,
         (signed long)LONG_MAX);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xff,%edx
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xffff,%edx
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xffffffff,%edx
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xffffffffffffffff,%rdx
call   1030 <printf@plt>
mov    0x2e57(%rip),%rax
mov    (%rax),%rax
movsbq %al,%rsi
mov    0x2e41(%rip),%rax
mov    (%rax),%rax
movsbq %al,%rdx
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e17(%rip),%rax
mov    (%rax),%rax
movswq %ax,%rsi
mov    0x2e01(%rip),%rax
mov    (%rax),%rax
movswq %ax,%rdx
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e17(%rip),%rax
mov    (%rax),%rax
movslq %eax,%rsi
mov    0x2e1a(%rip),%rax
mov    (%rax),%rax
movslq %eax,%rdx
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    0x2df9(%rip),%rax
mov    (%rax),%rsi
mov    0x2dc7(%rip),%rax
mov    (%rax),%rdx
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xff,%edx
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
mov    $0xffff,%edx
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
mov    $0xffffffff,%edx
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xefc(%rip),%rdi
xor    %esi,%esi
mov    $0xffffffffffffffff,%rdx
call   1030 <printf@plt>
mov    0x2e62(%rip),%rax
movsbq (%rax),%rsi
mov    0x2e4f(%rip),%rax
movsbq (%rax),%rdx
lea    0xeec(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e28(%rip),%rax
movswq (%rax),%rsi
mov    0x2e15(%rip),%rax
movswq (%rax),%rdx
lea    0xee3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e2e(%rip),%rax
movslq (%rax),%rsi
mov    0x2e34(%rip),%rax
movslq (%rax),%rdx
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e16(%rip),%rax
mov    (%rax),%rsi
mov    0x2de4(%rip),%rax
mov    (%rax),%rdx
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"unsigned char: %u - %u\0A\00"
@.str.1 = [27 x i8] c"unsigned short: %hu - %hu\0A\00"
@.str.2 = [25 x i8] c"unsigned int: %u - %u\0A\00"
@.str.3 = [27 x i8] c"unsigned long: %lu - %lu\0A\00"
@.str.4 = [25 x i8] c" signed char: %d - %d\0A\00"
@SCHAR_MIN = global i64 0
@SCHAR_MAX = global i64 0
@.str.5 = [27 x i8] c" signed short: %hd - %hd\0A\00"
@SHRT_MIN = global i64 0
@SHRT_MAX = global i64 0
@.str.6 = [25 x i8] c" signed int: %d - %d\0A\00"
@INT_MIN = global i64 0
@INT_MAX = global i64 0
@.str.7 = [27 x i8] c" signed long: %ld - %ld\0A\00"
@LONG_MIN = global i64 0
@LONG_MAX = global i64 0
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i64 0, i64 255)
%2 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i64 0, i64 65535)
%3 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i64 0, i64 4294967295)
%4 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i64 0, i64 -1)
%5 = load i64, i64* @SCHAR_MIN
%6 = trunc i64 %5 to i8
%7 = sext i8 %6 to i64
%8 = load i64, i64* @SCHAR_MAX
%9 = trunc i64 %8 to i8
%10 = sext i8 %9 to i64
%11 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i64 %7, i64 %10)
%12 = load i64, i64* @SHRT_MIN
%13 = trunc i64 %12 to i16
%14 = sext i16 %13 to i64
%15 = load i64, i64* @SHRT_MAX
%16 = trunc i64 %15 to i16
%17 = sext i16 %16 to i64
%18 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), i64 %14, i64 %17)
%19 = load i64, i64* @INT_MIN
%20 = trunc i64 %19 to i32
%21 = sext i32 %20 to i64
%22 = load i64, i64* @INT_MAX
%23 = trunc i64 %22 to i32
%24 = sext i32 %23 to i64
%25 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i64 %21, i64 %24)
%26 = load i64, i64* @LONG_MIN
%27 = load i64, i64* @LONG_MAX
%28 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0), i64 %26, i64 %27)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"unsigned char: %u - %u\0A\00"
@.str.1 = [27 x i8] c"unsigned short: %hu - %hu\0A\00"
@.str.2 = [25 x i8] c"unsigned int: %u - %u\0A\00"
@.str.3 = [27 x i8] c"unsigned long: %lu - %lu\0A\00"
@.str.4 = [25 x i8] c" signed char: %d - %d\0A\00"
@SCHAR_MIN = global i64 0
@SCHAR_MAX = global i64 0
@.str.5 = [27 x i8] c" signed short: %hd - %hd\0A\00"
@SHRT_MIN = global i64 0
@SHRT_MAX = global i64 0
@.str.6 = [25 x i8] c" signed int: %d - %d\0A\00"
@INT_MIN = global i64 0
@INT_MAX = global i64 0
@.str.7 = [27 x i8] c" signed long: %ld - %ld\0A\00"
@LONG_MIN = global i64 0
@LONG_MAX = global i64 0
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i64 0, i64 255)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i64 0, i64 65535)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i64 0, i64 4294967295)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i64 0, i64 -1)
%5 = load i64, i64* @SCHAR_MIN
%6 = shl i64 %5, 56
%7 = ashr exact i64 %6, 56
%8 = load i64, i64* @SCHAR_MAX
%9 = shl i64 %8, 56
%10 = ashr exact i64 %9, 56
%11 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i64 %7, i64 %10)
%12 = load i64, i64* @SHRT_MIN
%13 = shl i64 %12, 48
%14 = ashr exact i64 %13, 48
%15 = load i64, i64* @SHRT_MAX
%16 = shl i64 %15, 48
%17 = ashr exact i64 %16, 48
%18 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), i64 %14, i64 %17)
%19 = load i64, i64* @INT_MIN
%20 = shl i64 %19, 32
%21 = ashr exact i64 %20, 32
%22 = load i64, i64* @INT_MAX
%23 = shl i64 %22, 32
%24 = ashr exact i64 %23, 32
%25 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i64 %21, i64 %24)
%26 = load i64, i64* @LONG_MIN
%27 = load i64, i64* @LONG_MAX
%28 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0), i64 %26, i64 %27)
ret i32 0
}