#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 */
typedef int uint16_t;

/* Variables and functions */
int __attribute((always_)) jisx0213_added_in_2004_p(uint16_t val) {
  switch (val >> 8) {
  case 0x2e:
    return val == 0x2e21;
  case 0x2f:
    return val == 0x2f7e;
  case 0x4f:
    return val == 0x4f54 || val == 0x4f7e;
  case 0x74:
    return val == 0x7427;
  case 0x7e:
    return val >= 0x7e7a && val <= 0x7e7e;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x8,%eax
mov    %eax,-0xc(%rbp)
sub    $0x2e,%eax
je     1162 <jisx0213_added_in_2004_p+0x62>
jmp    111e <jisx0213_added_in_2004_p+0x1e>
mov    -0xc(%rbp),%eax
sub    $0x2f,%eax
je     1179 <jisx0213_added_in_2004_p+0x79>
jmp    112f <jisx0213_added_in_2004_p+0x2f>
mov    -0xc(%rbp),%eax
sub    $0x4f,%eax
je     1190 <jisx0213_added_in_2004_p+0x90>
jmp    1140 <jisx0213_added_in_2004_p+0x40>
mov    -0xc(%rbp),%eax
sub    $0x74,%eax
je     11bf <jisx0213_added_in_2004_p+0xbf>
jmp    1151 <jisx0213_added_in_2004_p+0x51>
mov    -0xc(%rbp),%eax
sub    $0x7e,%eax
je     11d6 <jisx0213_added_in_2004_p+0xd6>
jmp    1205 <jisx0213_added_in_2004_p+0x105>
cmpl   $0x2e21,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    120c <jisx0213_added_in_2004_p+0x10c>
cmpl   $0x2f7e,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    120c <jisx0213_added_in_2004_p+0x10c>
mov    $0x1,%al
cmpl   $0x4f54,-0x8(%rbp)
mov    %al,-0xd(%rbp)
je     11af <jisx0213_added_in_2004_p+0xaf>
cmpl   $0x4f7e,-0x8(%rbp)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    120c <jisx0213_added_in_2004_p+0x10c>
cmpl   $0x7427,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    120c <jisx0213_added_in_2004_p+0x10c>
xor    %eax,%eax
cmpl   $0x7e7a,-0x8(%rbp)
mov    %al,-0xe(%rbp)
jl     11f5 <jisx0213_added_in_2004_p+0xf5>
cmpl   $0x7e7e,-0x8(%rbp)
setle  %al
mov    %al,-0xe(%rbp)
mov    -0xe(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    120c <jisx0213_added_in_2004_p+0x10c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    %edi,%ecx
sar    $0x8,%ecx
xor    %eax,%eax
cmp    $0x4e,%ecx
jle    112b <jisx0213_added_in_2004_p+0x2b>
cmp    $0x4f,%ecx
je     113d <jisx0213_added_in_2004_p+0x3d>
cmp    $0x74,%ecx
je     1155 <jisx0213_added_in_2004_p+0x55>
cmp    $0x7e,%ecx
jne    1166 <jisx0213_added_in_2004_p+0x66>
add    $0xffff8186,%edi
cmp    $0x5,%edi
setb   %al
movzbl %al,%eax
ret
cmp    $0x2e,%ecx
je     115d <jisx0213_added_in_2004_p+0x5d>
cmp    $0x2f,%ecx
jne    1166 <jisx0213_added_in_2004_p+0x66>
cmp    $0x2f7e,%edi
jmp    1163 <jisx0213_added_in_2004_p+0x63>
cmp    $0x4f54,%edi
sete   %cl
cmp    $0x4f7e,%edi
sete   %al
or     %cl,%al
movzbl %al,%eax
ret
cmp    $0x7427,%edi
jmp    1163 <jisx0213_added_in_2004_p+0x63>
cmp    $0x2e21,%edi
sete   %al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @jisx0213_added_in_2004_p(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = ashr i32 %4, 8
switch i32 %5, label %36 [
i32 46, label %6
i32 47, label %10
i32 79, label %14
i32 116, label %23
i32 126, label %27
]
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 11809
%9 = zext i1 %8 to i32
store i32 %9, i32* %2
br label %37
10: ; preds = %1
%11 = load i32, i32* %3
%12 = icmp eq i32 %11, 12158
%13 = zext i1 %12 to i32
store i32 %13, i32* %2
br label %37
14: ; preds = %1
%15 = load i32, i32* %3
%16 = icmp eq i32 %15, 20308
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = load i32, i32* %3
%19 = icmp eq i32 %18, 20350
br label %20
20: ; preds = %17, %14
%21 = phi i1 [ true, %14 ], [ %19, %17 ]
%22 = zext i1 %21 to i32
store i32 %22, i32* %2
br label %37
23: ; preds = %1
%24 = load i32, i32* %3
%25 = icmp eq i32 %24, 29735
%26 = zext i1 %25 to i32
store i32 %26, i32* %2
br label %37
27: ; preds = %1
%28 = load i32, i32* %3
%29 = icmp sge i32 %28, 32378
br i1 %29, label %30, label %33
30: ; preds = %27
%31 = load i32, i32* %3
%32 = icmp sle i32 %31, 32382
br label %33
33: ; preds = %30, %27
%34 = phi i1 [ false, %27 ], [ %32, %30 ]
%35 = zext i1 %34 to i32
store i32 %35, i32* %2
br label %37
36: ; preds = %1
store i32 0, i32* %2
br label %37
37: ; preds = %36, %33, %23, %20, %10, %6
%38 = load i32, i32* %2
ret i32 %38
}

LLVM IR (-O2):
define i32 @jisx0213_added_in_2004_p(i32 %0) {
%2 = ashr i32 %0, 8
switch i32 %2, label %16 [
i32 46, label %3
i32 47, label %5
i32 79, label %7
i32 116, label %11
i32 126, label %13
]
3: ; preds = %1
%4 = icmp eq i32 %0, 11809
br label %16
5: ; preds = %1
%6 = icmp eq i32 %0, 12158
br label %16
7: ; preds = %1
%8 = icmp eq i32 %0, 20308
%9 = icmp eq i32 %0, 20350
%10 = or i1 %8, %9
br label %16
11: ; preds = %1
%12 = icmp eq i32 %0, 29735
br label %16
13: ; preds = %1
%14 = add i32 %0, -32378
%15 = icmp ult i32 %14, 5
br label %16
16: ; preds = %1, %13, %11, %7, %5, %3
%17 = phi i1 [ %15, %13 ], [ %12, %11 ], [ %10, %7 ], [ %6, %5 ], [ %4, %3 ], [ false, %1 ]
%18 = zext i1 %17 to i32
ret i32 %18
}