#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*/ Ws(char *);
int /*<<< orphan*/ wrdddddrrrr(int);
int Winst1(int i, int code) {
  switch ((code >> 10) & 3) {
  case 0:
    Ws("cpse  ");
    break;
  case 1:
    Ws("cp    ");
    break;
  case 2:
    Ws("sub   ");
    break;
  case 3:
    Ws("adc   ");
    break;
  }
  wrdddddrrrr(code);
  return 0;
}


x86 assembly (clang, -O0):
<Winst1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shr    $0xa,%eax
and    $0x3,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x3,%eax
ja     1199 <Winst1+0x79>
mov    -0x10(%rbp),%rax
lea    0xeaf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xeaf(%rip),%rdi
call   1030 <Ws@plt>
jmp    1199 <Winst1+0x79>
lea    0xea5(%rip),%rdi
call   1030 <Ws@plt>
jmp    1199 <Winst1+0x79>
lea    0xe9b(%rip),%rdi
call   1030 <Ws@plt>
jmp    1199 <Winst1+0x79>
lea    0xe91(%rip),%rdi
call   1030 <Ws@plt>
mov    -0x8(%rbp),%edi
call   1040 <wrdddddrrrr@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Winst1>:
push   %rbx
mov    %esi,%ebx
mov    %esi,%eax
shr    $0xa,%eax
and    $0x3,%eax
lea    0xeea(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
call   1030 <Ws@plt>
mov    %ebx,%edi
call   1040 <wrdddddrrrr@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"cpse \00"
@.str.1 = [7 x i8] c"cp \00"
@.str.2 = [7 x i8] c"sub \00"
@.str.3 = [7 x i8] c"adc \00"
define i32 @Winst1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 10
%7 = and i32 %6, 3
switch i32 %7, label %16 [
i32 0, label %8
i32 1, label %10
i32 2, label %12
i32 3, label %14
]
8: ; preds = %2
%9 = call i32 @Ws(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %16
10: ; preds = %2
%11 = call i32 @Ws(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %16
12: ; preds = %2
%13 = call i32 @Ws(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %16
14: ; preds = %2
%15 = call i32 @Ws(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %16
16: ; preds = %2, %14, %12, %10, %8
%17 = load i32, i32* %4
%18 = call i32 @wrdddddrrrr(i32 %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"cpse \00"
@.str.1 = [7 x i8] c"cp \00"
@.str.2 = [7 x i8] c"sub \00"
@.str.3 = [7 x i8] c"adc \00"
@reltable.Winst1 = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str to i64), i64 ptrtoint ([4 x i32]* @reltable.Winst1 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.1 to i64), i64 ptrtoint ([4 x i32]* @reltable.Winst1 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.2 to i64), i64 ptrtoint ([4 x i32]* @reltable.Winst1 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.3 to i64), i64 ptrtoint ([4 x i32]* @reltable.Winst1 to i64)) to i32)]
define i32 @Winst1(i32 %0, i32 %1) {
%3 = lshr i32 %1, 10
%4 = and i32 %3, 3
%5 = zext i32 %4 to i64
%6 = shl i64 %5, 2
%7 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.Winst1 to i8*), i64 %6)
%8 = tail call i32 @Ws(i8* %7)
%9 = tail call i32 @wrdddddrrrr(i32 %1)
ret i32 0
}