#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 *);
main() {
  unsigned int c = 3;
  unsigned int x = 0x0003;
  switch (c & x) {
  case 3:
    printf("Hello!  \t");
  case 2:
    printf("Welcome \t");
  case 1:
    printf("to All  \t");
  default:
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %eax,-0x10(%rbp)
sub    $0x1,%eax
je     1180 <main+0x70>
jmp    1146 <main+0x36>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     1174 <main+0x64>
jmp    1157 <main+0x47>
mov    -0x10(%rbp),%eax
sub    $0x3,%eax
jne    118c <main+0x7c>
jmp    1168 <main+0x58>
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xed6(%rip),%rdi
call   1040 <printf@plt>
lea    0xed4(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Hello! \09\00"
@.str.1 = [10 x i8] c"Welcome \09\00"
@.str.2 = [10 x i8] c"to All \09\00"
@.str.3 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 3, i32* %2
store i32 3, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = and i32 %4, %5
switch i32 %6, label %13 [
i32 3, label %7
i32 2, label %9
i32 1, label %11
]
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %0, %7
%10 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %0, %9
%12 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %13
13: ; preds = %0, %11
%14 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %15
15: ; preds = %13
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
@.str = [10 x i8] c"Hello! \09\00"
@.str.1 = [10 x i8] c"Welcome \09\00"
@.str.2 = [10 x i8] c"to All \09\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @putchar(i32 10)
ret i32 0
}