#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*/ assert(int /*<<< orphan*/ *);
unsigned int zipIntSize(unsigned char encoding) {
  switch (encoding) {
  case 0xfe:
    return 1;
  case (0xc0 | 0 << 4):
    return 2;
  case (0xc0 | 3 << 4):
    return 3;
  case (0xc0 | 1 << 4):
    return 4;
  case (0xc0 | 2 << 4):
    return 8;
  default:
    return 0;
  }
  assert(NULL);
  return 0;
}


x86 assembly (clang, -O0):
<zipIntSize>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0xc0,%eax
je     1179 <zipIntSize+0x79>
jmp    1121 <zipIntSize+0x21>
mov    -0xc(%rbp),%eax
sub    $0xd0,%eax
je     1191 <zipIntSize+0x91>
jmp    1134 <zipIntSize+0x34>
mov    -0xc(%rbp),%eax
sub    $0xe0,%eax
je     119d <zipIntSize+0x9d>
jmp    1147 <zipIntSize+0x47>
mov    -0xc(%rbp),%eax
sub    $0xf0,%eax
je     1185 <zipIntSize+0x85>
jmp    115a <zipIntSize+0x5a>
mov    -0xc(%rbp),%eax
sub    $0xfe,%eax
jne    11a9 <zipIntSize+0xa9>
jmp    116d <zipIntSize+0x6d>
movl   $0x1,-0x4(%rbp)
jmp    11b0 <zipIntSize+0xb0>
movl   $0x2,-0x4(%rbp)
jmp    11b0 <zipIntSize+0xb0>
movl   $0x3,-0x4(%rbp)
jmp    11b0 <zipIntSize+0xb0>
movl   $0x4,-0x4(%rbp)
jmp    11b0 <zipIntSize+0xb0>
movl   $0x8,-0x4(%rbp)
jmp    11b0 <zipIntSize+0xb0>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zipIntSize>:
cmp    $0xdf,%dil
jle    111e <zipIntSize+0x1e>
cmp    $0xe0,%dil
je     1130 <zipIntSize+0x30>
cmp    $0xf0,%dil
je     1136 <zipIntSize+0x36>
mov    $0x1,%eax
cmp    $0xfe,%dil
jne    1142 <zipIntSize+0x42>
ret
cmp    $0xc0,%dil
je     113c <zipIntSize+0x3c>
cmp    $0xd0,%dil
jne    1142 <zipIntSize+0x42>
mov    $0x4,%eax
ret
mov    $0x8,%eax
ret
mov    $0x3,%eax
ret
mov    $0x2,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @zipIntSize(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
switch i32 %5, label %11 [
i32 254, label %6
i32 192, label %7
i32 240, label %8
i32 208, label %9
i32 224, label %10
]
6: ; preds = %1
store i32 1, i32* %2
br label %12
7: ; preds = %1
store i32 2, i32* %2
br label %12
8: ; preds = %1
store i32 3, i32* %2
br label %12
9: ; preds = %1
store i32 4, i32* %2
br label %12
10: ; preds = %1
store i32 8, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %10, %9, %8, %7, %6
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @zipIntSize(i8 zeroext %0) {
switch i8 %0, label %6 [
i8 -2, label %7
i8 -64, label %2
i8 -16, label %3
i8 -48, label %4
i8 -32, label %5
]
2: ; preds = %1
br label %7
3: ; preds = %1
br label %7
4: ; preds = %1
br label %7
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %1, %6, %5, %4, %3, %2
%8 = phi i32 [ 0, %6 ], [ 8, %5 ], [ 4, %4 ], [ 3, %3 ], [ 2, %2 ], [ 1, %1 ]
ret i32 %8
}