#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 */
unsigned int next_utf8(char const *, int *);
int fn_cl_1_9_11_12_14_4294967295(const char *text) {
  int pos = 0;
  unsigned int c = next_utf8(text, &pos);
  if (c >= 1 && c <= 9)
    return pos;
  if (c >= 11 && c <= 12)
    return pos;
  if (c >= 14 && c <= 4294967295)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_cl_1_9_11_12_14_4294967295>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <next_utf8@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x1,-0x18(%rbp)
jb     1152 <fn_cl_1_9_11_12_14_4294967295+0x42>
cmpl   $0x9,-0x18(%rbp)
ja     1152 <fn_cl_1_9_11_12_14_4294967295+0x42>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    119e <fn_cl_1_9_11_12_14_4294967295+0x8e>
cmpl   $0xb,-0x18(%rbp)
jb     1171 <fn_cl_1_9_11_12_14_4294967295+0x61>
cmpl   $0xc,-0x18(%rbp)
ja     1171 <fn_cl_1_9_11_12_14_4294967295+0x61>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    119e <fn_cl_1_9_11_12_14_4294967295+0x8e>
cmpl   $0xe,-0x18(%rbp)
jb     1197 <fn_cl_1_9_11_12_14_4294967295+0x87>
mov    -0x18(%rbp),%eax
mov    $0xffffffff,%ecx
cmp    %rcx,%rax
jg     1197 <fn_cl_1_9_11_12_14_4294967295+0x87>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    119e <fn_cl_1_9_11_12_14_4294967295+0x8e>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_cl_1_9_11_12_14_4294967295>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
call   1030 <next_utf8@plt>
mov    %eax,%ecx
lea    -0x1(%rcx),%eax
cmp    $0x8,%eax
jbe    113f <fn_cl_1_9_11_12_14_4294967295+0x2f>
lea    -0xb(%rcx),%eax
cmp    $0x1,%eax
jbe    113f <fn_cl_1_9_11_12_14_4294967295+0x2f>
mov    $0xffffffff,%eax
cmp    $0xe,%ecx
jb     1143 <fn_cl_1_9_11_12_14_4294967295+0x33>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fn_cl_1_9_11_12_14_4294967295(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
%6 = load i8*, i8** %3
%7 = call i32 @next_utf8(i8* %6, i32* %4)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = icmp uge i32 %8, 1
br i1 %9, label %10, label %15
10: ; preds = %1
%11 = load i32, i32* %5
%12 = icmp ule i32 %11, 9
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = load i32, i32* %4
store i32 %14, i32* %2
br label %33
15: ; preds = %10, %1
%16 = load i32, i32* %5
%17 = icmp uge i32 %16, 11
br i1 %17, label %18, label %23
18: ; preds = %15
%19 = load i32, i32* %5
%20 = icmp ule i32 %19, 12
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = load i32, i32* %4
store i32 %22, i32* %2
br label %33
23: ; preds = %18, %15
%24 = load i32, i32* %5
%25 = icmp uge i32 %24, 14
br i1 %25, label %26, label %32
26: ; preds = %23
%27 = load i32, i32* %5
%28 = zext i32 %27 to i64
%29 = icmp sle i64 %28, 4294967295
br i1 %29, label %30, label %32
30: ; preds = %26
%31 = load i32, i32* %4
store i32 %31, i32* %2
br label %33
32: ; preds = %26, %23
store i32 -1, i32* %2
br label %33
33: ; preds = %32, %30, %21, %13
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
define i32 @fn_cl_1_9_11_12_14_4294967295(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @next_utf8(i8* %0, i32* %2)
%5 = add i32 %4, -1
%6 = icmp ult i32 %5, 9
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i32, i32* %2
br label %18
9: ; preds = %1
%10 = add i32 %4, -11
%11 = icmp ult i32 %10, 2
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = load i32, i32* %2
br label %18
14: ; preds = %9
%15 = icmp ugt i32 %4, 13
%16 = load i32, i32* %2
%17 = select i1 %15, i32 %16, i32 -1
br label %18
18: ; preds = %14, %12, %7
%19 = phi i32 [ %8, %7 ], [ %13, %12 ], [ %17, %14 ]
ret i32 %19
}