#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*/ puts(char *);
int main() {
  int k;
  unsigned i;
  unsigned long l;
  unsigned short s;
  for (i = 1, k = 0; i; i <<= 1, k++)
    ;
  if (k == 32) {
    puts("unsigned");
    return 0;
  }
  for (l = 1, k = 0; l; l <<= 1, k++)
    ;
  if (k == 32) {
    puts("unsigned long");
    return 0;
  }
  for (s = 1, k = 0; s; s <<= 1, k++)
    ;
  if (k == 32) {
    puts("unsigned short");
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1153 <main+0x43>
jmp    113c <main+0x2c>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
cmpl   $0x20,-0x8(%rbp)
jne    1175 <main+0x65>
lea    0xe9c(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
jmp    122f <main+0x11f>
movq   $0x1,-0x18(%rbp)
movl   $0x0,-0x8(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     11ae <main+0x9e>
jmp    1194 <main+0x84>
mov    -0x18(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1184 <main+0x74>
cmpl   $0x20,-0x8(%rbp)
jne    11d0 <main+0xc0>
lea    0xe4a(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
jmp    122f <main+0x11f>
movw   $0x1,-0x1a(%rbp)
movl   $0x0,-0x8(%rbp)
cmpw   $0x0,-0x1a(%rbp)
je     1206 <main+0xf6>
jmp    11ed <main+0xdd>
movzwl -0x1a(%rbp),%eax
shl    $0x1,%eax
mov    %ax,-0x1a(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11dd <main+0xcd>
cmpl   $0x20,-0x8(%rbp)
jne    1228 <main+0x118>
lea    0xe00(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
jmp    122f <main+0x11f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"unsigned\00"
@.str.1 = [14 x i8] c"unsigned long\00"
@.str.2 = [15 x i8] c"unsigned short\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i64
%5 = alloca i16
store i32 0, i32* %1
store i32 1, i32* %3
store i32 0, i32* %2
br label %6
6: ; preds = %10, %0
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %6
br label %10
10: ; preds = %9
%11 = load i32, i32* %3
%12 = shl i32 %11, 1
store i32 %12, i32* %3
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %6
15: ; preds = %6
%16 = load i32, i32* %2
%17 = icmp eq i32 %16, 32
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
br label %53
20: ; preds = %15
store i64 1, i64* %4
store i32 0, i32* %2
br label %21
21: ; preds = %25, %20
%22 = load i64, i64* %4
%23 = icmp ne i64 %22, 0
br i1 %23, label %24, label %30
24: ; preds = %21
br label %25
25: ; preds = %24
%26 = load i64, i64* %4
%27 = shl i64 %26, 1
store i64 %27, i64* %4
%28 = load i32, i32* %2
%29 = add nsw i32 %28, 1
store i32 %29, i32* %2
br label %21
30: ; preds = %21
%31 = load i32, i32* %2
%32 = icmp eq i32 %31, 32
br i1 %32, label %33, label %35
33: ; preds = %30
%34 = call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %53
35: ; preds = %30
store i16 1, i16* %5
store i32 0, i32* %2
br label %36
36: ; preds = %40, %35
%37 = load i16, i16* %5
%38 = icmp ne i16 %37, 0
br i1 %38, label %39, label %47
39: ; preds = %36
br label %40
40: ; preds = %39
%41 = load i16, i16* %5
%42 = zext i16 %41 to i32
%43 = shl i32 %42, 1
%44 = trunc i32 %43 to i16
store i16 %44, i16* %5
%45 = load i32, i32* %2
%46 = add nsw i32 %45, 1
store i32 %46, i32* %2
br label %36
47: ; preds = %36
%48 = load i32, i32* %2
%49 = icmp eq i32 %48, 32
br i1 %49, label %50, label %52
50: ; preds = %47
%51 = call i32 @puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %1
br label %53
52: ; preds = %47
store i32 1, i32* %1
br label %53
53: ; preds = %52, %50, %33, %18
%54 = load i32, i32* %1
ret i32 %54
}

LLVM IR (-O2):
@.str = [9 x i8] c"unsigned\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}