#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 argb();
int /*<<< orphan*/ opw_1(char *);
int /*<<< orphan*/ opw_2(char *);
int /*<<< orphan*/ printf(char *, int);
void op_wide() {
  int modifOp = argb();
  switch (modifOp) {
  case 0x19:
    opw_1("aload");
    break;
  case 0x3a:
    opw_1("astore");
    break;
  case 0x18:
    opw_1("dload");
    break;
  case 0x39:
    opw_1("dstore");
    break;
  case 0x17:
    opw_1("fload");
    break;
  case 0x38:
    opw_1("fstore");
    break;
  case 0x84:
    opw_2("iinc");
    break;
  case 0x15:
    opw_1("iload");
    break;
  case 0x36:
    opw_1("istore");
    break;
  case 0x16:
    opw_1("lload");
    break;
  case 0x37:
    opw_1("lstore");
    break;
  case 0xa9:
    opw_1("ret");
    break;
  default:
    printf("illegal opcode 0x%02x in wide op\n", modifOp);
    break;
  }
}


x86 assembly (clang, -O0):
<op_wide>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1060 <argb@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x15,%eax
je     129c <op_wide+0x15c>
jmp    1166 <op_wide+0x26>
mov    -0x8(%rbp),%eax
sub    $0x16,%eax
je     12be <op_wide+0x17e>
jmp    1177 <op_wide+0x37>
mov    -0x8(%rbp),%eax
sub    $0x17,%eax
je     1269 <op_wide+0x129>
jmp    1188 <op_wide+0x48>
mov    -0x8(%rbp),%eax
sub    $0x18,%eax
je     1247 <op_wide+0x107>
jmp    1199 <op_wide+0x59>
mov    -0x8(%rbp),%eax
sub    $0x19,%eax
je     1225 <op_wide+0xe5>
jmp    11aa <op_wide+0x6a>
mov    -0x8(%rbp),%eax
sub    $0x36,%eax
je     12ad <op_wide+0x16d>
jmp    11bb <op_wide+0x7b>
mov    -0x8(%rbp),%eax
sub    $0x37,%eax
je     12cf <op_wide+0x18f>
jmp    11cc <op_wide+0x8c>
mov    -0x8(%rbp),%eax
sub    $0x38,%eax
je     127a <op_wide+0x13a>
jmp    11dd <op_wide+0x9d>
mov    -0x8(%rbp),%eax
sub    $0x39,%eax
je     1258 <op_wide+0x118>
jmp    11ee <op_wide+0xae>
mov    -0x8(%rbp),%eax
sub    $0x3a,%eax
je     1236 <op_wide+0xf6>
jmp    11ff <op_wide+0xbf>
mov    -0x8(%rbp),%eax
sub    $0x84,%eax
je     128b <op_wide+0x14b>
jmp    1212 <op_wide+0xd2>
mov    -0x8(%rbp),%eax
sub    $0xa9,%eax
je     12e0 <op_wide+0x1a0>
jmp    12f1 <op_wide+0x1b1>
lea    0xdd4(%rip),%rdi
call   1050 <opw_1@plt>
jmp    1300 <op_wide+0x1c0>
lea    0xdc9(%rip),%rdi
call   1050 <opw_1@plt>
jmp    1300 <op_wide+0x1c0>
lea    0xdbf(%rip),%rdi
call   1050 <opw_1@plt>
jmp    1300 <op_wide+0x1c0>
lea    0xdb4(%rip),%rdi
call   1050 <opw_1@plt>
jmp    1300 <op_wide+0x1c0>
lea    0xdaa(%rip),%rdi
call   1050 <opw_1@plt>
jmp    1300 <op_wide+0x1c0>
lea    0xd9f(%rip),%rdi
call   1050 <opw_1@plt>
jmp    1300 <op_wide+0x1c0>
lea    0xd95(%rip),%rdi
call   1030 <opw_2@plt>
jmp    1300 <op_wide+0x1c0>
lea    0xd89(%rip),%rdi
call   1050 <opw_1@plt>
jmp    1300 <op_wide+0x1c0>
lea    0xd7e(%rip),%rdi
call   1050 <opw_1@plt>
jmp    1300 <op_wide+0x1c0>
lea    0xd74(%rip),%rdi
call   1050 <opw_1@plt>
jmp    1300 <op_wide+0x1c0>
lea    0xd69(%rip),%rdi
call   1050 <opw_1@plt>
jmp    1300 <op_wide+0x1c0>
lea    0xd5f(%rip),%rdi
call   1050 <opw_1@plt>
jmp    1300 <op_wide+0x1c0>
mov    -0x4(%rbp),%esi
lea    0xd4f(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_wide>:
push   %rax
xor    %eax,%eax
call   1060 <argb@plt>
lea    -0x15(%rax),%ecx
cmp    $0x25,%ecx
ja     116d <op_wide+0x2d>
lea    0xea9(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0xf5d(%rip),%rdi
pop    %rax
jmp    1050 <opw_1@plt>
cmp    $0x84,%eax
je     1210 <op_wide+0xd0>
cmp    $0xa9,%eax
jne    118c <op_wide+0x4c>
lea    0xf58(%rip),%rdi
pop    %rax
jmp    1050 <opw_1@plt>
lea    0xf4f(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <printf@plt>
lea    0xf2f(%rip),%rdi
pop    %rax
jmp    1050 <opw_1@plt>
lea    0xf03(%rip),%rdi
pop    %rax
jmp    1050 <opw_1@plt>
lea    0xee9(%rip),%rdi
pop    %rax
jmp    1050 <opw_1@plt>
lea    0xecf(%rip),%rdi
pop    %rax
jmp    1050 <opw_1@plt>
lea    0xef4(%rip),%rdi
pop    %rax
jmp    1050 <opw_1@plt>
lea    0xef4(%rip),%rdi
pop    %rax
jmp    1050 <opw_1@plt>
lea    0xec8(%rip),%rdi
pop    %rax
jmp    1050 <opw_1@plt>
lea    0xeae(%rip),%rdi
pop    %rax
jmp    1050 <opw_1@plt>
lea    0xe94(%rip),%rdi
pop    %rax
jmp    1050 <opw_1@plt>
lea    0xea8(%rip),%rdi
pop    %rax
jmp    1030 <opw_2@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"aload\00"
@.str.1 = [7 x i8] c"astore\00"
@.str.2 = [6 x i8] c"dload\00"
@.str.3 = [7 x i8] c"dstore\00"
@.str.4 = [6 x i8] c"fload\00"
@.str.5 = [7 x i8] c"fstore\00"
@.str.6 = [5 x i8] c"iinc\00"
@.str.7 = [6 x i8] c"iload\00"
@.str.8 = [7 x i8] c"istore\00"
@.str.9 = [6 x i8] c"lload\00"
@.str.10 = [7 x i8] c"lstore\00"
@.str.11 = [4 x i8] c"ret\00"
@.str.12 = [34 x i8] c"illegal opcode 0x%02x in wide op\0A\00"
define void @op_wide() {
%1 = alloca i32
%2 = call i32 (...) @argb()
store i32 %2, i32* %1
%3 = load i32, i32* %1
switch i32 %3, label %28 [
i32 25, label %4
i32 58, label %6
i32 24, label %8
i32 57, label %10
i32 23, label %12
i32 56, label %14
i32 132, label %16
i32 21, label %18
i32 54, label %20
i32 22, label %22
i32 55, label %24
i32 169, label %26
]
4: ; preds = %0
%5 = call i32 @opw_1(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %31
6: ; preds = %0
%7 = call i32 @opw_1(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %31
8: ; preds = %0
%9 = call i32 @opw_1(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %31
10: ; preds = %0
%11 = call i32 @opw_1(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %31
12: ; preds = %0
%13 = call i32 @opw_1(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %31
14: ; preds = %0
%15 = call i32 @opw_1(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %31
16: ; preds = %0
%17 = call i32 @opw_2(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %31
18: ; preds = %0
%19 = call i32 @opw_1(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %31
20: ; preds = %0
%21 = call i32 @opw_1(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %31
22: ; preds = %0
%23 = call i32 @opw_1(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
br label %31
24: ; preds = %0
%25 = call i32 @opw_1(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
br label %31
26: ; preds = %0
%27 = call i32 @opw_1(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
br label %31
28: ; preds = %0
%29 = load i32, i32* %1
%30 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.12, i64 0, i64 0), i32 %29)
br label %31
31: ; preds = %28, %26, %24, %22, %20, %18, %16, %14, %12, %10, %8, %6, %4
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"aload\00"
@.str.1 = [7 x i8] c"astore\00"
@.str.2 = [6 x i8] c"dload\00"
@.str.3 = [7 x i8] c"dstore\00"
@.str.4 = [6 x i8] c"fload\00"
@.str.5 = [7 x i8] c"fstore\00"
@.str.6 = [5 x i8] c"iinc\00"
@.str.7 = [6 x i8] c"iload\00"
@.str.8 = [7 x i8] c"istore\00"
@.str.9 = [6 x i8] c"lload\00"
@.str.10 = [7 x i8] c"lstore\00"
@.str.11 = [4 x i8] c"ret\00"
@.str.12 = [34 x i8] c"illegal opcode 0x%02x in wide op\0A\00"
define void @op_wide() {
%1 = tail call i32 (...) @argb()
switch i32 %1, label %26 [
i32 25, label %2
i32 58, label %4
i32 24, label %6
i32 57, label %8
i32 23, label %10
i32 56, label %12
i32 132, label %14
i32 21, label %16
i32 54, label %18
i32 22, label %20
i32 55, label %22
i32 169, label %24
]
2: ; preds = %0
%3 = tail call i32 @opw_1(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %28
4: ; preds = %0
%5 = tail call i32 @opw_1(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %28
6: ; preds = %0
%7 = tail call i32 @opw_1(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %28
8: ; preds = %0
%9 = tail call i32 @opw_1(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %28
10: ; preds = %0
%11 = tail call i32 @opw_1(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %28
12: ; preds = %0
%13 = tail call i32 @opw_1(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %28
14: ; preds = %0
%15 = tail call i32 @opw_2(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %28
16: ; preds = %0
%17 = tail call i32 @opw_1(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %28
18: ; preds = %0
%19 = tail call i32 @opw_1(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %28
20: ; preds = %0
%21 = tail call i32 @opw_1(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
br label %28
22: ; preds = %0
%23 = tail call i32 @opw_1(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
br label %28
24: ; preds = %0
%25 = tail call i32 @opw_1(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
br label %28
26: ; preds = %0
%27 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.12, i64 0, i64 0), i32 %1)
br label %28
28: ; preds = %26, %24, %22, %20, %18, %16, %14, %12, %10, %8, %6, %4, %2
ret void
}