#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*/ assert(int);
int translate_j_and_char(int prev_c, int c) {
  assert(prev_c == 'j' || prev_c == 'J');
  switch (c) {
  case 'A':
    return 0x42F;
  case 'O':
    return 0x401;
  case 'U':
    return 0x42E;
  case 'H':
    return 0x419;
  case 'a':
    return (prev_c == 'J') ? 0x42F : 0x44f;
  case 'o':
    return (prev_c == 'J') ? 0x401 : 0x451;
  case 'u':
    return (prev_c == 'J') ? 0x42E : 0x44e;
  case 'h':
    return (prev_c == 'J') ? 0x419 : 0x439;
  case '\'':
    return 0x42C;
  case '`':
    return 0x42A;
  }
  return -1;
}


x86 assembly (clang, -O0):
<translate_j_and_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x1,%al
cmpl   $0x6a,-0x8(%rbp)
mov    %al,-0xd(%rbp)
je     1137 <translate_j_and_char+0x27>
cmpl   $0x4a,-0x8(%rbp)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
movzbl %al,%edi
and    $0x1,%edi
call   1030 <assert@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffd9,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x4e,%eax
ja     1222 <translate_j_and_char+0x112>
mov    -0x18(%rbp),%rax
lea    0xe9b(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x42f,-0x4(%rbp)
jmp    1229 <translate_j_and_char+0x119>
movl   $0x401,-0x4(%rbp)
jmp    1229 <translate_j_and_char+0x119>
movl   $0x42e,-0x4(%rbp)
jmp    1229 <translate_j_and_char+0x119>
movl   $0x419,-0x4(%rbp)
jmp    1229 <translate_j_and_char+0x119>
mov    -0x8(%rbp),%edx
mov    $0x44f,%eax
mov    $0x42f,%ecx
cmp    $0x4a,%edx
cmove  %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1229 <translate_j_and_char+0x119>
mov    -0x8(%rbp),%edx
mov    $0x451,%eax
mov    $0x401,%ecx
cmp    $0x4a,%edx
cmove  %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1229 <translate_j_and_char+0x119>
mov    -0x8(%rbp),%edx
mov    $0x44e,%eax
mov    $0x42e,%ecx
cmp    $0x4a,%edx
cmove  %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1229 <translate_j_and_char+0x119>
mov    -0x8(%rbp),%edx
mov    $0x439,%eax
mov    $0x419,%ecx
cmp    $0x4a,%edx
cmove  %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1229 <translate_j_and_char+0x119>
movl   $0x42c,-0x4(%rbp)
jmp    1229 <translate_j_and_char+0x119>
movl   $0x42a,-0x4(%rbp)
jmp    1229 <translate_j_and_char+0x119>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<translate_j_and_char>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %edi,%eax
and    $0xffffffdf,%eax
xor    %edi,%edi
cmp    $0x4a,%eax
sete   %dil
call   1030 <assert@plt>
add    $0xffffffd9,%ebx
cmp    $0x4e,%ebx
ja     114e <translate_j_and_char+0x3e>
mov    $0x42f,%eax
lea    0xec2(%rip),%rcx
movslq (%rcx,%rbx,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x42c,%eax
jmp    11b7 <translate_j_and_char+0xa7>
mov    $0xffffffff,%eax
jmp    11b7 <translate_j_and_char+0xa7>
mov    $0x419,%eax
jmp    11b7 <translate_j_and_char+0xa7>
mov    $0x401,%eax
jmp    11b7 <translate_j_and_char+0xa7>
mov    $0x42e,%eax
jmp    11b7 <translate_j_and_char+0xa7>
mov    $0x42a,%eax
jmp    11b7 <translate_j_and_char+0xa7>
xor    %eax,%eax
cmp    $0x4a,%ebp
setne  %al
shl    $0x5,%eax
add    $0x42f,%eax
jmp    11b7 <translate_j_and_char+0xa7>
xor    %eax,%eax
cmp    $0x4a,%ebp
setne  %al
shl    $0x5,%eax
or     $0x419,%eax
jmp    11b7 <translate_j_and_char+0xa7>
cmp    $0x4a,%ebp
mov    $0x401,%ecx
mov    $0x451,%eax
cmove  %ecx,%eax
jmp    11b7 <translate_j_and_char+0xa7>
xor    %eax,%eax
cmp    $0x4a,%ebp
setne  %al
shl    $0x5,%eax
add    $0x42e,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @translate_j_and_char(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 106
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i32, i32* %4
%10 = icmp eq i32 %9, 74
br label %11
11: ; preds = %8, %2
%12 = phi i1 [ true, %2 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load i32, i32* %5
switch i32 %15, label %42 [
i32 65, label %16
i32 79, label %17
i32 85, label %18
i32 72, label %19
i32 97, label %20
i32 111, label %25
i32 117, label %30
i32 104, label %35
i32 39, label %40
i32 96, label %41
]
16: ; preds = %11
store i32 1071, i32* %3
br label %43
17: ; preds = %11
store i32 1025, i32* %3
br label %43
18: ; preds = %11
store i32 1070, i32* %3
br label %43
19: ; preds = %11
store i32 1049, i32* %3
br label %43
20: ; preds = %11
%21 = load i32, i32* %4
%22 = icmp eq i32 %21, 74
%23 = zext i1 %22 to i64
%24 = select i1 %22, i32 1071, i32 1103
store i32 %24, i32* %3
br label %43
25: ; preds = %11
%26 = load i32, i32* %4
%27 = icmp eq i32 %26, 74
%28 = zext i1 %27 to i64
%29 = select i1 %27, i32 1025, i32 1105
store i32 %29, i32* %3
br label %43
30: ; preds = %11
%31 = load i32, i32* %4
%32 = icmp eq i32 %31, 74
%33 = zext i1 %32 to i64
%34 = select i1 %32, i32 1070, i32 1102
store i32 %34, i32* %3
br label %43
35: ; preds = %11
%36 = load i32, i32* %4
%37 = icmp eq i32 %36, 74
%38 = zext i1 %37 to i64
%39 = select i1 %37, i32 1049, i32 1081
store i32 %39, i32* %3
br label %43
40: ; preds = %11
store i32 1068, i32* %3
br label %43
41: ; preds = %11
store i32 1066, i32* %3
br label %43
42: ; preds = %11
store i32 -1, i32* %3
br label %43
43: ; preds = %42, %41, %40, %35, %30, %25, %20, %19, %18, %17, %16
%44 = load i32, i32* %3
ret i32 %44
}

LLVM IR (-O2):
define i32 @translate_j_and_char(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 74
%4 = and i32 %0, -33
%5 = icmp eq i32 %4, 74
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
switch i32 %1, label %21 [
i32 65, label %22
i32 79, label %8
i32 85, label %9
i32 72, label %10
i32 97, label %11
i32 111, label %13
i32 117, label %15
i32 104, label %17
i32 39, label %19
i32 96, label %20
]
8: ; preds = %2
br label %22
9: ; preds = %2
br label %22
10: ; preds = %2
br label %22
11: ; preds = %2
%12 = select i1 %3, i32 1071, i32 1103
br label %22
13: ; preds = %2
%14 = select i1 %3, i32 1025, i32 1105
br label %22
15: ; preds = %2
%16 = select i1 %3, i32 1070, i32 1102
br label %22
17: ; preds = %2
%18 = select i1 %3, i32 1049, i32 1081
br label %22
19: ; preds = %2
br label %22
20: ; preds = %2
br label %22
21: ; preds = %2
br label %22
22: ; preds = %2, %21, %20, %19, %17, %15, %13, %11, %10, %9, %8
%23 = phi i32 [ -1, %21 ], [ 1066, %20 ], [ 1068, %19 ], [ %18, %17 ], [ %16, %15 ], [ %14, %13 ], [ %12, %11 ], [ 1049, %10 ], [ 1070, %9 ], [ 1025, %8 ], [ 1071, %2 ]
ret i32 %23
}