#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*/ fatal_error(char *);
int imm_op_to_op(int opcode) {
  switch (opcode) {
  case 273:
    return (270);
  case 274:
    return (275);
  case 278:
    return (277);
  case 476:
    return (475);
  case 557:
    return (556);
  case 509:
    return (508);
  case 510:
    return (511);
  case 394:
    return (399);
  case 408:
    return (275);
  case 506:
    return (507);
  case 514:
    return (515);
  case 516:
    return (517);
  default:
    fatal_error("Can't convert immediate op to op\n");
    return (0);
  }
}


x86 assembly (clang, -O0):
<imm_op_to_op>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x111,%eax
je     1202 <imm_op_to_op+0xf2>
jmp    1131 <imm_op_to_op+0x21>
mov    -0xc(%rbp),%eax
sub    $0x112,%eax
je     120e <imm_op_to_op+0xfe>
jmp    1144 <imm_op_to_op+0x34>
mov    -0xc(%rbp),%eax
sub    $0x116,%eax
je     121a <imm_op_to_op+0x10a>
jmp    1157 <imm_op_to_op+0x47>
mov    -0xc(%rbp),%eax
sub    $0x18a,%eax
je     1256 <imm_op_to_op+0x146>
jmp    116a <imm_op_to_op+0x5a>
mov    -0xc(%rbp),%eax
sub    $0x198,%eax
je     1262 <imm_op_to_op+0x152>
jmp    117d <imm_op_to_op+0x6d>
mov    -0xc(%rbp),%eax
sub    $0x1dc,%eax
je     1226 <imm_op_to_op+0x116>
jmp    1190 <imm_op_to_op+0x80>
mov    -0xc(%rbp),%eax
sub    $0x1fa,%eax
je     126e <imm_op_to_op+0x15e>
jmp    11a3 <imm_op_to_op+0x93>
mov    -0xc(%rbp),%eax
sub    $0x1fd,%eax
je     123e <imm_op_to_op+0x12e>
jmp    11b6 <imm_op_to_op+0xa6>
mov    -0xc(%rbp),%eax
sub    $0x1fe,%eax
je     124a <imm_op_to_op+0x13a>
jmp    11c9 <imm_op_to_op+0xb9>
mov    -0xc(%rbp),%eax
sub    $0x202,%eax
je     127a <imm_op_to_op+0x16a>
jmp    11dc <imm_op_to_op+0xcc>
mov    -0xc(%rbp),%eax
sub    $0x204,%eax
je     1286 <imm_op_to_op+0x176>
jmp    11ef <imm_op_to_op+0xdf>
mov    -0xc(%rbp),%eax
sub    $0x22d,%eax
je     1232 <imm_op_to_op+0x122>
jmp    1292 <imm_op_to_op+0x182>
movl   $0x10e,-0x4(%rbp)
jmp    12a5 <imm_op_to_op+0x195>
movl   $0x113,-0x4(%rbp)
jmp    12a5 <imm_op_to_op+0x195>
movl   $0x115,-0x4(%rbp)
jmp    12a5 <imm_op_to_op+0x195>
movl   $0x1db,-0x4(%rbp)
jmp    12a5 <imm_op_to_op+0x195>
movl   $0x22c,-0x4(%rbp)
jmp    12a5 <imm_op_to_op+0x195>
movl   $0x1fc,-0x4(%rbp)
jmp    12a5 <imm_op_to_op+0x195>
movl   $0x1ff,-0x4(%rbp)
jmp    12a5 <imm_op_to_op+0x195>
movl   $0x18f,-0x4(%rbp)
jmp    12a5 <imm_op_to_op+0x195>
movl   $0x113,-0x4(%rbp)
jmp    12a5 <imm_op_to_op+0x195>
movl   $0x1fb,-0x4(%rbp)
jmp    12a5 <imm_op_to_op+0x195>
movl   $0x203,-0x4(%rbp)
jmp    12a5 <imm_op_to_op+0x195>
movl   $0x205,-0x4(%rbp)
jmp    12a5 <imm_op_to_op+0x195>
lea    0xd67(%rip),%rdi
call   1030 <fatal_error@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imm_op_to_op>:
push   %rax
cmp    $0x197,%edi
jg     1138 <imm_op_to_op+0x28>
cmp    $0x115,%edi
jg     115a <imm_op_to_op+0x4a>
mov    $0x10e,%eax
cmp    $0x111,%edi
je     11a4 <imm_op_to_op+0x94>
cmp    $0x112,%edi
je     1188 <imm_op_to_op+0x78>
jmp    1196 <imm_op_to_op+0x86>
lea    -0x1fa(%rdi),%eax
cmp    $0x33,%eax
ja     1171 <imm_op_to_op+0x61>
lea    0xeb6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x1fb,%eax
pop    %rcx
ret
cmp    $0x116,%edi
je     118f <imm_op_to_op+0x7f>
cmp    $0x18a,%edi
jne    1196 <imm_op_to_op+0x86>
mov    $0x18f,%eax
pop    %rcx
ret
cmp    $0x198,%edi
je     1188 <imm_op_to_op+0x78>
cmp    $0x1dc,%edi
jne    1196 <imm_op_to_op+0x86>
mov    $0x1db,%eax
pop    %rcx
ret
mov    $0x113,%eax
pop    %rcx
ret
mov    $0x115,%eax
pop    %rcx
ret
lea    0xf33(%rip),%rdi
call   1030 <fatal_error@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    $0x1fc,%eax
pop    %rcx
ret
mov    $0x1ff,%eax
pop    %rcx
ret
mov    $0x203,%eax
pop    %rcx
ret
mov    $0x205,%eax
pop    %rcx
ret
mov    $0x22c,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"Can't convert immediate op to op\0A\00"
define i32 @imm_op_to_op(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %17 [
i32 273, label %5
i32 274, label %6
i32 278, label %7
i32 476, label %8
i32 557, label %9
i32 509, label %10
i32 510, label %11
i32 394, label %12
i32 408, label %13
i32 506, label %14
i32 514, label %15
i32 516, label %16
]
5: ; preds = %1
store i32 270, i32* %2
br label %19
6: ; preds = %1
store i32 275, i32* %2
br label %19
7: ; preds = %1
store i32 277, i32* %2
br label %19
8: ; preds = %1
store i32 475, i32* %2
br label %19
9: ; preds = %1
store i32 556, i32* %2
br label %19
10: ; preds = %1
store i32 508, i32* %2
br label %19
11: ; preds = %1
store i32 511, i32* %2
br label %19
12: ; preds = %1
store i32 399, i32* %2
br label %19
13: ; preds = %1
store i32 275, i32* %2
br label %19
14: ; preds = %1
store i32 507, i32* %2
br label %19
15: ; preds = %1
store i32 515, i32* %2
br label %19
16: ; preds = %1
store i32 517, i32* %2
br label %19
17: ; preds = %1
%18 = call i32 @fatal_error(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %19
19: ; preds = %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
@.str = [34 x i8] c"Can't convert immediate op to op\0A\00"
define i32 @imm_op_to_op(i32 %0) {
switch i32 %0, label %13 [
i32 273, label %15
i32 274, label %2
i32 278, label %3
i32 476, label %4
i32 557, label %5
i32 509, label %6
i32 510, label %7
i32 394, label %8
i32 408, label %9
i32 506, label %10
i32 514, label %11
i32 516, label %12
]
2: ; preds = %1
br label %15
3: ; preds = %1
br label %15
4: ; preds = %1
br label %15
5: ; preds = %1
br label %15
6: ; preds = %1
br label %15
7: ; preds = %1
br label %15
8: ; preds = %1
br label %15
9: ; preds = %1
br label %15
10: ; preds = %1
br label %15
11: ; preds = %1
br label %15
12: ; preds = %1
br label %15
13: ; preds = %1
%14 = tail call i32 @fatal_error(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %1, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%16 = phi i32 [ 0, %13 ], [ 517, %12 ], [ 515, %11 ], [ 507, %10 ], [ 275, %9 ], [ 399, %8 ], [ 511, %7 ], [ 508, %6 ], [ 556, %5 ], [ 475, %4 ], [ 277, %3 ], [ 275, %2 ], [ 270, %1 ]
ret i32 %16
}