#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 /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fgetc(int /*<<< orphan*/ *);
int is_iso_8859_15(FILE *fp) {
  int byte;
  while (1) {
    byte = fgetc(fp);
    if (byte == EOF)
      return 1;
    if (byte >= 0x7F && byte <= 0x9F)
      return 0;
    if (((byte) <= 0x08 || ((byte) >= 0x0E && (byte) <= 0x1F)))
      return 0;
  }
}


x86 assembly (clang, -O0):
<is_iso_8859_15>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2eb6(%rip),%rcx
cmp    (%rcx),%eax
jne    1146 <is_iso_8859_15+0x36>
movl   $0x1,-0x4(%rbp)
jmp    1198 <is_iso_8859_15+0x88>
cmpl   $0x7f,-0x14(%rbp)
jl     1169 <is_iso_8859_15+0x59>
cmpl   $0x9f,-0x14(%rbp)
jg     1169 <is_iso_8859_15+0x59>
movl   $0x0,-0x4(%rbp)
jmp    1198 <is_iso_8859_15+0x88>
cmpl   $0x8,-0x14(%rbp)
jle    1187 <is_iso_8859_15+0x77>
cmpl   $0xe,-0x14(%rbp)
jl     1193 <is_iso_8859_15+0x83>
cmpl   $0x1f,-0x14(%rbp)
jg     1193 <is_iso_8859_15+0x83>
movl   $0x0,-0x4(%rbp)
jmp    1198 <is_iso_8859_15+0x88>
jmp    111c <is_iso_8859_15+0xc>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_iso_8859_15>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eca(%rip),%r14
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <fgetc@plt>
cmp    (%r14),%eax
je     1148 <is_iso_8859_15+0x38>
mov    %eax,%ecx
lea    -0x7f(%rcx),%edx
xor    %eax,%eax
cmp    $0x21,%edx
jb     114d <is_iso_8859_15+0x3d>
cmp    $0x9,%ecx
jl     114d <is_iso_8859_15+0x3d>
add    $0xfffffff2,%ecx
cmp    $0x11,%ecx
ja     1120 <is_iso_8859_15+0x10>
jmp    114d <is_iso_8859_15+0x3d>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @is_iso_8859_15(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
br label %5
5: ; preds = %1, %29
%6 = load i32*, i32** %3
%7 = call i32 @fgetc(i32* %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = load i32, i32* @EOF
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %5
store i32 1, i32* %2
br label %30
12: ; preds = %5
%13 = load i32, i32* %4
%14 = icmp sge i32 %13, 127
br i1 %14, label %15, label %19
15: ; preds = %12
%16 = load i32, i32* %4
%17 = icmp sle i32 %16, 159
br i1 %17, label %18, label %19
18: ; preds = %15
store i32 0, i32* %2
br label %30
19: ; preds = %15, %12
%20 = load i32, i32* %4
%21 = icmp sle i32 %20, 8
br i1 %21, label %28, label %22
22: ; preds = %19
%23 = load i32, i32* %4
%24 = icmp sge i32 %23, 14
br i1 %24, label %25, label %29
25: ; preds = %22
%26 = load i32, i32* %4
%27 = icmp sle i32 %26, 31
br i1 %27, label %28, label %29
28: ; preds = %25, %19
store i32 0, i32* %2
br label %30
29: ; preds = %25, %22
br label %5
30: ; preds = %28, %18, %11
%31 = load i32, i32* %2
ret i32 %31
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @is_iso_8859_15(i32* nocapture %0) {
br label %2
2: ; preds = %9, %1
%3 = tail call i32 @fgetc(i32* %0)
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %14, label %6
6: ; preds = %2
%7 = add i32 %3, -127
%8 = icmp ult i32 %7, 33
br i1 %8, label %14, label %9
9: ; preds = %6
%10 = icmp slt i32 %3, 9
%11 = add i32 %3, -14
%12 = icmp ult i32 %11, 18
%13 = or i1 %10, %12
br i1 %13, label %14, label %2
14: ; preds = %9, %6, %2
%15 = phi i32 [ 1, %2 ], [ 0, %6 ], [ 0, %9 ]
ret i32 %15
}