int wycc_type_dealias(int typ) {
  if (typ == 9) {
    return 1;
  };
  if (typ == 20) {
    return 1;
  };
  if (typ == 10) {
    return 2;
  };
  if (typ == 11) {
    return 2;
  };
  if (typ == 21) {
    return 2;
  };
  if (typ == 3) {
    return 2;
  };
  if (typ == 18) {
    return 18;
  };
  if (typ == 25) {
    return 18;
  };
  return typ;
}


x86 assembly (clang, -O0):
<wycc_type_dealias>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
jne    111d <wycc_type_dealias+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    11bd <wycc_type_dealias+0xbd>
cmpl   $0x14,-0x8(%rbp)
jne    1133 <wycc_type_dealias+0x33>
movl   $0x1,-0x4(%rbp)
jmp    11bd <wycc_type_dealias+0xbd>
cmpl   $0xa,-0x8(%rbp)
jne    1149 <wycc_type_dealias+0x49>
movl   $0x2,-0x4(%rbp)
jmp    11bd <wycc_type_dealias+0xbd>
cmpl   $0xb,-0x8(%rbp)
jne    115f <wycc_type_dealias+0x5f>
movl   $0x2,-0x4(%rbp)
jmp    11bd <wycc_type_dealias+0xbd>
cmpl   $0x15,-0x8(%rbp)
jne    1175 <wycc_type_dealias+0x75>
movl   $0x2,-0x4(%rbp)
jmp    11bd <wycc_type_dealias+0xbd>
cmpl   $0x3,-0x8(%rbp)
jne    118b <wycc_type_dealias+0x8b>
movl   $0x2,-0x4(%rbp)
jmp    11bd <wycc_type_dealias+0xbd>
cmpl   $0x12,-0x8(%rbp)
jne    11a1 <wycc_type_dealias+0xa1>
movl   $0x12,-0x4(%rbp)
jmp    11bd <wycc_type_dealias+0xbd>
cmpl   $0x19,-0x8(%rbp)
jne    11b7 <wycc_type_dealias+0xb7>
movl   $0x12,-0x4(%rbp)
jmp    11bd <wycc_type_dealias+0xbd>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wycc_type_dealias>:
lea    -0x3(%rdi),%ecx
cmp    $0x16,%ecx
ja     1129 <wycc_type_dealias+0x29>
mov    $0x1,%eax
lea    0xeec(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0x2,%eax
ret
mov    $0x12,%eax
ret
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @wycc_type_dealias(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 9
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %37
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 20
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 1, i32* %2
br label %37
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 10
br i1 %13, label %14, label %15
14: ; preds = %11
store i32 2, i32* %2
br label %37
15: ; preds = %11
%16 = load i32, i32* %3
%17 = icmp eq i32 %16, 11
br i1 %17, label %18, label %19
18: ; preds = %15
store i32 2, i32* %2
br label %37
19: ; preds = %15
%20 = load i32, i32* %3
%21 = icmp eq i32 %20, 21
br i1 %21, label %22, label %23
22: ; preds = %19
store i32 2, i32* %2
br label %37
23: ; preds = %19
%24 = load i32, i32* %3
%25 = icmp eq i32 %24, 3
br i1 %25, label %26, label %27
26: ; preds = %23
store i32 2, i32* %2
br label %37
27: ; preds = %23
%28 = load i32, i32* %3
%29 = icmp eq i32 %28, 18
br i1 %29, label %30, label %31
30: ; preds = %27
store i32 18, i32* %2
br label %37
31: ; preds = %27
%32 = load i32, i32* %3
%33 = icmp eq i32 %32, 25
br i1 %33, label %34, label %35
34: ; preds = %31
store i32 18, i32* %2
br label %37
35: ; preds = %31
%36 = load i32, i32* %3
store i32 %36, i32* %2
br label %37
37: ; preds = %35, %34, %30, %26, %22, %18, %14, %10, %6
%38 = load i32, i32* %2
ret i32 %38
}

LLVM IR (-O2):
define i32 @wycc_type_dealias(i32 %0) {
switch i32 %0, label %8 [
i32 9, label %9
i32 20, label %9
i32 10, label %2
i32 11, label %3
i32 21, label %4
i32 3, label %5
i32 18, label %6
i32 25, label %7
]
2: ; preds = %1
br label %9
3: ; preds = %1
br label %9
4: ; preds = %1
br label %9
5: ; preds = %1
br label %9
6: ; preds = %1
br label %9
7: ; preds = %1
br label %9
8: ; preds = %1
br label %9
9: ; preds = %1, %1, %8, %7, %6, %5, %4, %3, %2
%10 = phi i32 [ 2, %2 ], [ 2, %3 ], [ 2, %4 ], [ 2, %5 ], [ 18, %6 ], [ 18, %7 ], [ %0, %8 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %10
}