#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, long);
int main(int argc, char *argv[]) {
  char c = 1;
  unsigned char c2 = 1;
  short si = 1;
  unsigned short si2 = 1;
  int i = 1;
  unsigned int i2 = 1;
  long l = 1L;
  unsigned long l2 = 1L;
  while (c >= 0) {
    c <<= 1;
    c2 <<= 1;
  }
  while (si >= 0) {
    si <<= 1;
    si2 <<= 1;
  }
  while (i >= 0) {
    i <<= 1;
    i2 <<= 1;
  }
  while (l >= 0) {
    l <<= 1;
    l2 <<= 1;
  }
  printf("char: Max: %u, Min: %d\n", c2, c);
  printf("short: Max: %u, Min: %d\n", si2, si);
  printf("int: Max: %u, Min: %d\n", i2, i);
  printf("long: Max: %lu, Min: %ld\n", l2, l);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x1,-0x11(%rbp)
movb   $0x1,-0x12(%rbp)
movw   $0x1,-0x14(%rbp)
movw   $0x1,-0x16(%rbp)
movl   $0x1,-0x1c(%rbp)
movl   $0x1,-0x20(%rbp)
movq   $0x1,-0x28(%rbp)
movq   $0x1,-0x30(%rbp)
movsbl -0x11(%rbp),%eax
cmp    $0x0,%eax
jl     117e <main+0x6e>
movsbl -0x11(%rbp),%eax
shl    $0x1,%eax
mov    %al,-0x11(%rbp)
movzbl -0x12(%rbp),%eax
shl    $0x1,%eax
mov    %al,-0x12(%rbp)
jmp    1158 <main+0x48>
jmp    1183 <main+0x73>
movswl -0x14(%rbp),%eax
cmp    $0x0,%eax
jl     11ab <main+0x9b>
movswl -0x14(%rbp),%eax
shl    $0x1,%eax
mov    %ax,-0x14(%rbp)
movzwl -0x16(%rbp),%eax
shl    $0x1,%eax
mov    %ax,-0x16(%rbp)
jmp    1183 <main+0x73>
jmp    11b0 <main+0xa0>
cmpl   $0x0,-0x1c(%rbp)
jl     11d1 <main+0xc1>
mov    -0x1c(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x20(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11b0 <main+0xa0>
jmp    11d6 <main+0xc6>
cmpq   $0x0,-0x28(%rbp)
jl     11fe <main+0xee>
mov    -0x28(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x28(%rbp)
mov    -0x30(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    11d6 <main+0xc6>
movzbl -0x12(%rbp),%eax
mov    %eax,%esi
movsbq -0x11(%rbp),%rdx
lea    0xdf0(%rip),%rdi
call   1030 <printf@plt>
movzwl -0x16(%rbp),%eax
mov    %eax,%esi
movswq -0x14(%rbp),%rdx
lea    0xdf1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
mov    %eax,%esi
movslq -0x1c(%rbp),%rdx
lea    0xdf5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rdx
lea    0xdf8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x80,%esi
mov    $0xffffffffffffff80,%rdx
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
mov    $0x8000,%esi
mov    $0xffffffffffff8000,%rdx
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
mov    $0x80000000,%esi
mov    $0xffffffff80000000,%rdx
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
movabs $0x8000000000000000,%rdx
mov    %rdx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"char: Max: %u, Min: %d\0A\00"
@.str.1 = [25 x i8] c"short: Max: %u, Min: %d\0A\00"
@.str.2 = [23 x i8] c"int: Max: %u, Min: %d\0A\00"
@.str.3 = [26 x i8] c"long: Max: %lu, Min: %ld\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
%7 = alloca i8
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i64
%13 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8 1, i8* %6
store i8 1, i8* %7
store i16 1, i16* %8
store i16 1, i16* %9
store i32 1, i32* %10
store i32 1, i32* %11
store i64 1, i64* %12
store i64 1, i64* %13
br label %14
14: ; preds = %18, %2
%15 = load i8, i8* %6
%16 = sext i8 %15 to i32
%17 = icmp sge i32 %16, 0
br i1 %17, label %18, label %27
18: ; preds = %14
%19 = load i8, i8* %6
%20 = sext i8 %19 to i32
%21 = shl i32 %20, 1
%22 = trunc i32 %21 to i8
store i8 %22, i8* %6
%23 = load i8, i8* %7
%24 = zext i8 %23 to i32
%25 = shl i32 %24, 1
%26 = trunc i32 %25 to i8
store i8 %26, i8* %7
br label %14
27: ; preds = %14
br label %28
28: ; preds = %32, %27
%29 = load i16, i16* %8
%30 = sext i16 %29 to i32
%31 = icmp sge i32 %30, 0
br i1 %31, label %32, label %41
32: ; preds = %28
%33 = load i16, i16* %8
%34 = sext i16 %33 to i32
%35 = shl i32 %34, 1
%36 = trunc i32 %35 to i16
store i16 %36, i16* %8
%37 = load i16, i16* %9
%38 = zext i16 %37 to i32
%39 = shl i32 %38, 1
%40 = trunc i32 %39 to i16
store i16 %40, i16* %9
br label %28
41: ; preds = %28
br label %42
42: ; preds = %45, %41
%43 = load i32, i32* %10
%44 = icmp sge i32 %43, 0
br i1 %44, label %45, label %50
45: ; preds = %42
%46 = load i32, i32* %10
%47 = shl i32 %46, 1
store i32 %47, i32* %10
%48 = load i32, i32* %11
%49 = shl i32 %48, 1
store i32 %49, i32* %11
br label %42
50: ; preds = %42
br label %51
51: ; preds = %54, %50
%52 = load i64, i64* %12
%53 = icmp sge i64 %52, 0
br i1 %53, label %54, label %59
54: ; preds = %51
%55 = load i64, i64* %12
%56 = shl i64 %55, 1
store i64 %56, i64* %12
%57 = load i64, i64* %13
%58 = shl i64 %57, 1
store i64 %58, i64* %13
br label %51
59: ; preds = %51
%60 = load i8, i8* %7
%61 = zext i8 %60 to i64
%62 = load i8, i8* %6
%63 = sext i8 %62 to i64
%64 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i64 %61, i64 %63)
%65 = load i16, i16* %9
%66 = zext i16 %65 to i64
%67 = load i16, i16* %8
%68 = sext i16 %67 to i64
%69 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i64 %66, i64 %68)
%70 = load i32, i32* %11
%71 = zext i32 %70 to i64
%72 = load i32, i32* %10
%73 = sext i32 %72 to i64
%74 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i64 %71, i64 %73)
%75 = load i64, i64* %13
%76 = load i64, i64* %12
%77 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i64 %75, i64 %76)
%78 = load i32, i32* %3
ret i32 %78
}

LLVM IR (-O2):
@.str = [24 x i8] c"char: Max: %u, Min: %d\0A\00"
@.str.1 = [25 x i8] c"short: Max: %u, Min: %d\0A\00"
@.str.2 = [23 x i8] c"int: Max: %u, Min: %d\0A\00"
@.str.3 = [26 x i8] c"long: Max: %lu, Min: %ld\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i64 128, i64 -128)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i64 32768, i64 -32768)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i64 2147483648, i64 -2147483648)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i64 -9223372036854775808, i64 -9223372036854775808)
ret i32 0
}