#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*/ abort();
__attribute__((unused)) int invert_pred(int pred) {
  switch (pred) {
  default:
    abort();
  case 32:
    return 33;
  case 33:
    return 32;
  case 34:
    return 37;
  case 36:
    return 35;
  case 35:
    return 36;
  case 37:
    return 34;
  case 38:
    return 41;
  case 40:
    return 39;
  case 39:
    return 40;
  case 41:
    return 38;
  case 1:
    return 14;
  case 6:
    return 9;
  case 2:
    return 13;
  case 4:
    return 11;
  case 3:
    return 12;
  case 5:
    return 10;
  case 9:
    return 6;
  case 14:
    return 1;
  case 10:
    return 5;
  case 12:
    return 3;
  case 11:
    return 4;
  case 13:
    return 2;
  case 7:
    return 8;
  case 8:
    return 7;
  case 15:
    return 0;
  case 0:
    return 15;
  }
}


x86 assembly (clang, -O0):
<invert_pred>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x29,%rax
ja     1140 <invert_pred+0x30>
mov    -0x10(%rbp),%rax
lea    0xec9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   1030 <abort@plt>
movl   $0x21,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0x20,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0x25,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0x23,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0x24,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0x22,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0x29,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0x27,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0x28,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0x26,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0xe,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0x9,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0xd,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0xb,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0xc,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0xa,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0x6,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0x1,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0x5,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0x3,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0x4,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0x2,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0x8,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0x7,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0x0,-0x4(%rbp)
jmp    127a <invert_pred+0x16a>
movl   $0xf,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invert_pred>:
push   %rax
cmp    $0x2a,%edi
jae    1135 <invert_pred+0x25>
movabs $0x3ff0000ffff,%rax
bt     %rdi,%rax
jae    1135 <invert_pred+0x25>
movslq %edi,%rax
lea    0xed0(%rip),%rcx
mov    (%rcx,%rax,4),%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
@switch.table.invert_pred = [42 x i32] [i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0, i32 33, i32 33, i32 33, i32 33, i32 33, i32 33, i32 33, i32 33, i32 33, i32 33, i32 33, i32 33, i32 33, i32 33, i32 33, i32 33, i32 33, i32 32, i32 37, i32 36, i32 35, i32 34, i32 41, i32 40, i32 39, i32 38]
define i32 @invert_pred(i32 %0) {
%2 = icmp ult i32 %0, 42
br i1 %2, label %5, label %3
3: ; preds = %5, %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = zext i32 %0 to i64
%7 = lshr i64 4393751609343, %6
%8 = and i64 %7, 1
%9 = icmp eq i64 %8, 0
br i1 %9, label %3, label %10
10: ; preds = %5
%11 = sext i32 %0 to i64
%12 = getelementptr inbounds [42 x i32], [42 x i32]* @switch.table.invert_pred, i64 0, i64 %11
%13 = load i32, i32* %12
ret i32 %13
}