#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 */
scalar_t__ in(int, int, int);
int u8isupperlatini(int n) {
  if (n != 0xD7 && in(n, 0xC0, 0xDE) || in(n, 0x391, 0x3A9))
    return 1;
  if (in(n, 0x100, 0x17D) && n % 2 == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<u8isupperlatini>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0xd7,-0x8(%rbp)
je     1144 <u8isupperlatini+0x34>
mov    -0x8(%rbp),%edi
mov    $0xc0,%esi
mov    $0xde,%edx
call   1030 <in@plt>
cmp    $0x0,%rax
jne    1160 <u8isupperlatini+0x50>
mov    -0x8(%rbp),%edi
mov    $0x391,%esi
mov    $0x3a9,%edx
call   1030 <in@plt>
cmp    $0x0,%rax
je     116c <u8isupperlatini+0x5c>
movl   $0x1,-0x4(%rbp)
jmp    11af <u8isupperlatini+0x9f>
mov    -0x8(%rbp),%edi
mov    $0x100,%esi
mov    $0x17d,%edx
call   1030 <in@plt>
cmp    $0x0,%rax
je     11a8 <u8isupperlatini+0x98>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11a8 <u8isupperlatini+0x98>
movl   $0x1,-0x4(%rbp)
jmp    11af <u8isupperlatini+0x9f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u8isupperlatini>:
push   %rbx
mov    %edi,%ebx
cmp    $0xd7,%edi
je     113b <u8isupperlatini+0x2b>
mov    %ebx,%edi
mov    $0xc0,%esi
mov    $0xde,%edx
call   1030 <in@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     113b <u8isupperlatini+0x2b>
pop    %rbx
ret
mov    %ebx,%edi
mov    $0x391,%esi
mov    $0x3a9,%edx
call   1030 <in@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    1139 <u8isupperlatini+0x29>
mov    %ebx,%edi
mov    $0x100,%esi
mov    $0x17d,%edx
call   1030 <in@plt>
test   %rax,%rax
setne  %al
test   $0x1,%bl
sete   %cl
and    %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @u8isupperlatini(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 215
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = call i64 @in(i32 %7, i32 192, i32 222)
%9 = icmp ne i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %6, %1
%11 = load i32, i32* %3
%12 = call i64 @in(i32 %11, i32 913, i32 937)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %10, %6
store i32 1, i32* %2
br label %25
15: ; preds = %10
%16 = load i32, i32* %3
%17 = call i64 @in(i32 %16, i32 256, i32 381)
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %24
19: ; preds = %15
%20 = load i32, i32* %3
%21 = srem i32 %20, 2
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %19
store i32 1, i32* %2
br label %25
24: ; preds = %19, %15
store i32 0, i32* %2
br label %25
25: ; preds = %24, %23, %14
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @u8isupperlatini(i32 %0) {
%2 = icmp eq i32 %0, 215
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i64 @in(i32 %0, i32 192, i32 222)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %16
6: ; preds = %3, %1
%7 = tail call i64 @in(i32 %0, i32 913, i32 937)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %6
%10 = tail call i64 @in(i32 %0, i32 256, i32 381)
%11 = icmp ne i64 %10, 0
%12 = and i32 %0, 1
%13 = icmp eq i32 %12, 0
%14 = and i1 %13, %11
%15 = zext i1 %14 to i32
br label %16
16: ; preds = %9, %3, %6
%17 = phi i32 [ 1, %6 ], [ 1, %3 ], [ %15, %9 ]
ret i32 %17
}