#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*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int x = 257;
  int aa, bb, cc;
  int a = ((char)1) << 9;
  char b = ((char)1) << 9;
  int c = 1 << ((char)257);
  unsigned long long d = 1 << 33;
  unsigned long long e = ((unsigned long long)1) << 33;
  int f = 1 << 64;
  int g = 1 << -1;
  printf("a=%d, b=%d, c=%d, d=%d:%u, e=%d:%u, f=%d, g=%d\n", a, b, c,
         (int)(d >> 32), (unsigned int)d, (int)(e >> 32), (unsigned int)e, f,
         g);
  aa = ((unsigned long long)0x200000000LL) >> 33;
  bb = ((unsigned long long)0x200000000LL) >> 65;
  cc = 3 >> -1;
  printf("aa=%d, bb=%d, cc=%d\n", aa, bb, cc);
  if (a != 512) {
    printf("Error %d\n", (int)2);
    exit(2);
  };
  if (b != 0) {
    printf("Error %d\n", (int)3);
    exit(3);
  };
  if (c != 2) {
    printf("Error %d\n", (int)4);
    exit(4);
  };
  if (d != 0) {
    printf("Error %d\n", (int)5);
    exit(5);
  };
  if (e != ((unsigned long long)0x200000000)) {
    printf("Error %d\n", (int)6);
    exit(6);
  };
  if (f != 0) {
    printf("Error %d\n", (int)7);
    exit(7);
  };
  if (g != 0) {
    printf("Error %d\n", (int)8);
    exit(8);
  };
  if (aa != 1) {
    printf("Error %d\n", (int)9);
    exit(9);
  };
  if (bb != 0) {
    printf("Error %d\n", (int)10);
    exit(10);
  };
  if (cc != 6) {
    printf("Error %d\n", (int)11);
    exit(11);
  };
  {
    printf("Success\n");
    exit(0);
  };
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x58,%rsp
movl   $0x0,-0xc(%rbp)
movl   $0x101,-0x10(%rbp)
movl   $0x200,-0x20(%rbp)
movb   $0x0,-0x21(%rbp)
movl   $0x2,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
movabs $0x200000000,%rax
mov    %rax,-0x38(%rbp)
mov    %eax,-0x3c(%rbp)
mov    %eax,-0x40(%rbp)
mov    -0x20(%rbp),%esi
movsbl -0x21(%rbp),%edx
mov    -0x28(%rbp),%ecx
mov    -0x30(%rbp),%rax
shr    $0x20,%rax
mov    %eax,%r8d
mov    -0x30(%rbp),%rax
mov    %eax,%r9d
mov    -0x38(%rbp),%rax
shr    $0x20,%rax
mov    %eax,%ebx
mov    -0x38(%rbp),%rax
mov    %eax,%r11d
mov    -0x3c(%rbp),%r10d
mov    -0x40(%rbp),%eax
lea    0xe64(%rip),%rdi
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x14(%rbp)
mov    %eax,-0x18(%rbp)
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
lea    0xe5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x200,-0x20(%rbp)
je     1202 <main+0xe2>
lea    0xe59(%rip),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>
movsbl -0x21(%rbp),%eax
cmp    $0x0,%eax
je     122c <main+0x10c>
lea    0xe2f(%rip),%rdi
mov    $0x3,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x3,%edi
call   1040 <exit@plt>
cmpl   $0x2,-0x28(%rbp)
je     1253 <main+0x133>
lea    0xe08(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x4,%edi
call   1040 <exit@plt>
cmpq   $0x0,-0x30(%rbp)
je     127b <main+0x15b>
lea    0xde0(%rip),%rdi
mov    $0x5,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x5,%edi
call   1040 <exit@plt>
movabs $0x200000000,%rax
cmp    %rax,-0x38(%rbp)
je     12ac <main+0x18c>
lea    0xdaf(%rip),%rdi
mov    $0x6,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x6,%edi
call   1040 <exit@plt>
cmpl   $0x0,-0x3c(%rbp)
je     12d3 <main+0x1b3>
lea    0xd88(%rip),%rdi
mov    $0x7,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x7,%edi
call   1040 <exit@plt>
cmpl   $0x0,-0x40(%rbp)
je     12fa <main+0x1da>
lea    0xd61(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x8,%edi
call   1040 <exit@plt>
cmpl   $0x1,-0x14(%rbp)
je     1321 <main+0x201>
lea    0xd3a(%rip),%rdi
mov    $0x9,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x9,%edi
call   1040 <exit@plt>
cmpl   $0x0,-0x18(%rbp)
je     1348 <main+0x228>
lea    0xd13(%rip),%rdi
mov    $0xa,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xa,%edi
call   1040 <exit@plt>
cmpl   $0x6,-0x1c(%rbp)
je     136f <main+0x24f>
lea    0xcec(%rip),%rdi
mov    $0xb,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xb,%edi
call   1040 <exit@plt>
lea    0xcd9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
mov    $0x200,%esi
xor    %edx,%edx
mov    $0x2,%ecx
xor    %eax,%eax
push   $0x0
push   $0x2
call   1040 <printf@plt>
add    $0x20,%rsp
lea    0xed2(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed4(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"a=%d, b=%d, c=%d, d=%d:%u, e=%d:%u, f=%d, g=%d\0A\00"
@.str.1 = [21 x i8] c"aa=%d, bb=%d, cc=%d\0A\00"
@.str.2 = [10 x i8] c"Error %d\0A\00"
@.str.3 = [9 x i8] c"Success\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8
%8 = alloca i32
%9 = alloca i64
%10 = alloca i64
%11 = alloca i32
%12 = alloca i32
store i32 0, i32* %1
store i32 257, i32* %2
store i32 512, i32* %6
store i8 0, i8* %7
store i32 2, i32* %8
store i64 poison, i64* %9
store i64 8589934592, i64* %10
store i32 poison, i32* %11
store i32 poison, i32* %12
%13 = load i32, i32* %6
%14 = load i8, i8* %7
%15 = sext i8 %14 to i32
%16 = load i32, i32* %8
%17 = load i64, i64* %9
%18 = lshr i64 %17, 32
%19 = trunc i64 %18 to i32
%20 = load i64, i64* %9
%21 = trunc i64 %20 to i32
%22 = load i64, i64* %10
%23 = lshr i64 %22, 32
%24 = trunc i64 %23 to i32
%25 = load i64, i64* %10
%26 = trunc i64 %25 to i32
%27 = load i32, i32* %11
%28 = load i32, i32* %12
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %15, i32 %16, i32 %19, i32 %21, i32 %24, i32 %26, i32 %27, i32 %28)
store i32 1, i32* %3
store i32 poison, i32* %4
store i32 poison, i32* %5
%30 = load i32, i32* %3
%31 = load i32, i32* %4
%32 = load i32, i32* %5
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %30, i32 %31, i32 %32)
%34 = load i32, i32* %6
%35 = icmp ne i32 %34, 512
br i1 %35, label %36, label %39
36: ; preds = %0
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 2)
%38 = call i32 @exit(i32 2)
unreachable
39: ; preds = %0
%40 = load i8, i8* %7
%41 = sext i8 %40 to i32
%42 = icmp ne i32 %41, 0
br i1 %42, label %43, label %46
43: ; preds = %39
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 3)
%45 = call i32 @exit(i32 3)
unreachable
46: ; preds = %39
%47 = load i32, i32* %8
%48 = icmp ne i32 %47, 2
br i1 %48, label %49, label %52
49: ; preds = %46
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 4)
%51 = call i32 @exit(i32 4)
unreachable
52: ; preds = %46
%53 = load i64, i64* %9
%54 = icmp ne i64 %53, 0
br i1 %54, label %55, label %58
55: ; preds = %52
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 5)
%57 = call i32 @exit(i32 5)
unreachable
58: ; preds = %52
%59 = load i64, i64* %10
%60 = icmp ne i64 %59, 8589934592
br i1 %60, label %61, label %64
61: ; preds = %58
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 6)
%63 = call i32 @exit(i32 6)
unreachable
64: ; preds = %58
%65 = load i32, i32* %11
%66 = icmp ne i32 %65, 0
br i1 %66, label %67, label %70
67: ; preds = %64
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 7)
%69 = call i32 @exit(i32 7)
unreachable
70: ; preds = %64
%71 = load i32, i32* %12
%72 = icmp ne i32 %71, 0
br i1 %72, label %73, label %76
73: ; preds = %70
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 8)
%75 = call i32 @exit(i32 8)
unreachable
76: ; preds = %70
%77 = load i32, i32* %3
%78 = icmp ne i32 %77, 1
br i1 %78, label %79, label %82
79: ; preds = %76
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 9)
%81 = call i32 @exit(i32 9)
unreachable
82: ; preds = %76
%83 = load i32, i32* %4
%84 = icmp ne i32 %83, 0
br i1 %84, label %85, label %88
85: ; preds = %82
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 10)
%87 = call i32 @exit(i32 10)
unreachable
88: ; preds = %82
%89 = load i32, i32* %5
%90 = icmp ne i32 %89, 6
br i1 %90, label %91, label %94
91: ; preds = %88
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 11)
%93 = call i32 @exit(i32 11)
unreachable
94: ; preds = %88
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%96 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [48 x i8] c"a=%d, b=%d, c=%d, d=%d:%u, e=%d:%u, f=%d, g=%d\0A\00"
@.str.1 = [21 x i8] c"aa=%d, bb=%d, cc=%d\0A\00"
@str = [8 x i8] c"Success\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 512, i32 0, i32 2, i32 poison, i32 poison, i32 2, i32 0, i32 poison, i32 poison)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 poison, i32 poison)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}