#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*/ printf(char *, int);
int /*<<< orphan*/ rop_1w();
int /*<<< orphan*/ rop_2ww();
void rop_wide() {
  int modifOp = argb();
  switch (modifOp) {
  case 0x19:
    rop_1w();
    break;
  case 0x3a:
    rop_1w();
    break;
  case 0x18:
    rop_1w();
    break;
  case 0x39:
    rop_1w();
    break;
  case 0x17:
    rop_1w();
    break;
  case 0x38:
    rop_1w();
    break;
  case 0x84:
    rop_2ww();
    break;
  case 0x15:
    rop_1w();
    break;
  case 0x36:
    rop_1w();
    break;
  case 0x16:
    rop_1w();
    break;
  case 0x37:
    rop_1w();
    break;
  case 0xa9:
    rop_1w();
    break;
  default:
    printf("illegal opcode 0x%02x in wide op\n", modifOp);
    break;
  }
}


x86 assembly (clang, -O0):
<rop_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     1279 <rop_wide+0x139>
jmp    1166 <rop_wide+0x26>
mov    -0x8(%rbp),%eax
sub    $0x16,%eax
je     1291 <rop_wide+0x151>
jmp    1177 <rop_wide+0x37>
mov    -0x8(%rbp),%eax
sub    $0x17,%eax
je     1255 <rop_wide+0x115>
jmp    1188 <rop_wide+0x48>
mov    -0x8(%rbp),%eax
sub    $0x18,%eax
je     123d <rop_wide+0xfd>
jmp    1199 <rop_wide+0x59>
mov    -0x8(%rbp),%eax
sub    $0x19,%eax
je     1225 <rop_wide+0xe5>
jmp    11aa <rop_wide+0x6a>
mov    -0x8(%rbp),%eax
sub    $0x36,%eax
je     1285 <rop_wide+0x145>
jmp    11bb <rop_wide+0x7b>
mov    -0x8(%rbp),%eax
sub    $0x37,%eax
je     129d <rop_wide+0x15d>
jmp    11cc <rop_wide+0x8c>
mov    -0x8(%rbp),%eax
sub    $0x38,%eax
je     1261 <rop_wide+0x121>
jmp    11dd <rop_wide+0x9d>
mov    -0x8(%rbp),%eax
sub    $0x39,%eax
je     1249 <rop_wide+0x109>
jmp    11ee <rop_wide+0xae>
mov    -0x8(%rbp),%eax
sub    $0x3a,%eax
je     1231 <rop_wide+0xf1>
jmp    11ff <rop_wide+0xbf>
mov    -0x8(%rbp),%eax
sub    $0x84,%eax
je     126d <rop_wide+0x12d>
jmp    1212 <rop_wide+0xd2>
mov    -0x8(%rbp),%eax
sub    $0xa9,%eax
je     12a9 <rop_wide+0x169>
jmp    12b5 <rop_wide+0x175>
mov    $0x0,%al
call   1050 <rop_1w@plt>
jmp    12c4 <rop_wide+0x184>
mov    $0x0,%al
call   1050 <rop_1w@plt>
jmp    12c4 <rop_wide+0x184>
mov    $0x0,%al
call   1050 <rop_1w@plt>
jmp    12c4 <rop_wide+0x184>
mov    $0x0,%al
call   1050 <rop_1w@plt>
jmp    12c4 <rop_wide+0x184>
mov    $0x0,%al
call   1050 <rop_1w@plt>
jmp    12c4 <rop_wide+0x184>
mov    $0x0,%al
call   1050 <rop_1w@plt>
jmp    12c4 <rop_wide+0x184>
mov    $0x0,%al
call   1030 <rop_2ww@plt>
jmp    12c4 <rop_wide+0x184>
mov    $0x0,%al
call   1050 <rop_1w@plt>
jmp    12c4 <rop_wide+0x184>
mov    $0x0,%al
call   1050 <rop_1w@plt>
jmp    12c4 <rop_wide+0x184>
mov    $0x0,%al
call   1050 <rop_1w@plt>
jmp    12c4 <rop_wide+0x184>
mov    $0x0,%al
call   1050 <rop_1w@plt>
jmp    12c4 <rop_wide+0x184>
mov    $0x0,%al
call   1050 <rop_1w@plt>
jmp    12c4 <rop_wide+0x184>
mov    -0x4(%rbp),%esi
lea    0xd41(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop_wide>:
push   %rax
xor    %eax,%eax
call   1060 <argb@plt>
lea    -0x15(%rax),%ecx
cmp    $0x25,%ecx
ja     1168 <rop_wide+0x28>
lea    0xea9(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
xor    %eax,%eax
pop    %rcx
jmp    1050 <rop_1w@plt>
cmp    $0x84,%eax
je     1185 <rop_wide+0x45>
cmp    $0xa9,%eax
je     1160 <rop_wide+0x20>
lea    0xf1b(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <rop_2ww@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"illegal opcode 0x%02x in wide op\0A\00"
define void @rop_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 (...) @rop_1w()
br label %31
6: ; preds = %0
%7 = call i32 (...) @rop_1w()
br label %31
8: ; preds = %0
%9 = call i32 (...) @rop_1w()
br label %31
10: ; preds = %0
%11 = call i32 (...) @rop_1w()
br label %31
12: ; preds = %0
%13 = call i32 (...) @rop_1w()
br label %31
14: ; preds = %0
%15 = call i32 (...) @rop_1w()
br label %31
16: ; preds = %0
%17 = call i32 (...) @rop_2ww()
br label %31
18: ; preds = %0
%19 = call i32 (...) @rop_1w()
br label %31
20: ; preds = %0
%21 = call i32 (...) @rop_1w()
br label %31
22: ; preds = %0
%23 = call i32 (...) @rop_1w()
br label %31
24: ; preds = %0
%25 = call i32 (...) @rop_1w()
br label %31
26: ; preds = %0
%27 = call i32 (...) @rop_1w()
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, 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 = [34 x i8] c"illegal opcode 0x%02x in wide op\0A\00"
define void @rop_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 (...) @rop_1w()
br label %28
4: ; preds = %0
%5 = tail call i32 (...) @rop_1w()
br label %28
6: ; preds = %0
%7 = tail call i32 (...) @rop_1w()
br label %28
8: ; preds = %0
%9 = tail call i32 (...) @rop_1w()
br label %28
10: ; preds = %0
%11 = tail call i32 (...) @rop_1w()
br label %28
12: ; preds = %0
%13 = tail call i32 (...) @rop_1w()
br label %28
14: ; preds = %0
%15 = tail call i32 (...) @rop_2ww()
br label %28
16: ; preds = %0
%17 = tail call i32 (...) @rop_1w()
br label %28
18: ; preds = %0
%19 = tail call i32 (...) @rop_1w()
br label %28
20: ; preds = %0
%21 = tail call i32 (...) @rop_1w()
br label %28
22: ; preds = %0
%23 = tail call i32 (...) @rop_1w()
br label %28
24: ; preds = %0
%25 = tail call i32 (...) @rop_1w()
br label %28
26: ; preds = %0
%27 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, 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
}