big(x) unsigned x;
{
  switch (x & 0x6000000) {
  case -1:
  case -2:
  case 0x0000000:
    printf("x = 0x%x\n", x);
    break;
  case 0x2000000:
    printf("x = 0x%x\n", x);
    break;
  case 0x4000000:
    printf("x = 0x%x\n", x);
    break;
  default:
    printf("x = 0x%x (default)\n", x);
    break;
  }
}


x86 assembly (clang, -O0):
<big>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x6000000,%eax
mov    %eax,-0xc(%rbp)
or     $0x2,%eax
sub    $0x3,%eax
jb     115d <big+0x4d>
jmp    1137 <big+0x27>
mov    -0xc(%rbp),%eax
sub    $0x2000000,%eax
je     1173 <big+0x63>
jmp    114a <big+0x3a>
mov    -0xc(%rbp),%eax
sub    $0x4000000,%eax
je     1189 <big+0x79>
jmp    119f <big+0x8f>
mov    -0x8(%rbp),%esi
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b0 <big+0xa0>
mov    -0x8(%rbp),%esi
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b0 <big+0xa0>
mov    -0x8(%rbp),%esi
lea    0xe6d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b0 <big+0xa0>
mov    -0x8(%rbp),%esi
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<big>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
mov    %esi,%eax
and    $0x6000000,%eax
je     1137 <big+0x27>
cmp    $0x2000000,%eax
je     1137 <big+0x27>
cmp    $0x4000000,%eax
je     1137 <big+0x27>
lea    0xed3(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"x = 0x%x\0A\00"
@.str.1 = [20 x i8] c"x = 0x%x (default)\0A\00"
define i32 @big(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, 100663296
switch i32 %5, label %15 [
i32 -1, label %6
i32 -2, label %6
i32 0, label %6
i32 33554432, label %9
i32 67108864, label %12
]
6: ; preds = %1, %1, %1
%7 = load i32, i32* %3
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %18
9: ; preds = %1
%10 = load i32, i32* %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %18
12: ; preds = %1
%13 = load i32, i32* %3
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %13)
br label %18
15: ; preds = %1
%16 = load i32, i32* %3
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %15, %12, %9, %6
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@.str = [10 x i8] c"x = 0x%x\0A\00"
@.str.1 = [20 x i8] c"x = 0x%x (default)\0A\00"
define i32 @big(i32 %0) {
%2 = and i32 %0, 100663296
switch i32 %2, label %3 [
i32 67108864, label %4
i32 33554432, label %4
i32 0, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %3
%5 = phi i8* [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), %3 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), %1 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), %1 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), %1 ]
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %5, i32 %0)
ret i32 undef
}