#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_48_57_65_70_91_91_97_102(const char *text) {
  int pos = 0;
  unsigned int c = next_utf8(text, &pos);
  if (c >= 48 && c <= 57)
    return pos;
  if (c >= 65 && c <= 70)
    return pos;
  if (c >= 91 && c <= 91)
    return pos;
  if (c >= 97 && c <= 102)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_cl_48_57_65_70_91_91_97_102>:
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   $0x30,-0x18(%rbp)
jb     1152 <fn_cl_48_57_65_70_91_91_97_102+0x42>
cmpl   $0x39,-0x18(%rbp)
ja     1152 <fn_cl_48_57_65_70_91_91_97_102+0x42>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11b6 <fn_cl_48_57_65_70_91_91_97_102+0xa6>
cmpl   $0x41,-0x18(%rbp)
jb     1171 <fn_cl_48_57_65_70_91_91_97_102+0x61>
cmpl   $0x46,-0x18(%rbp)
ja     1171 <fn_cl_48_57_65_70_91_91_97_102+0x61>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11b6 <fn_cl_48_57_65_70_91_91_97_102+0xa6>
cmpl   $0x5b,-0x18(%rbp)
jb     1190 <fn_cl_48_57_65_70_91_91_97_102+0x80>
cmpl   $0x5b,-0x18(%rbp)
ja     1190 <fn_cl_48_57_65_70_91_91_97_102+0x80>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11b6 <fn_cl_48_57_65_70_91_91_97_102+0xa6>
cmpl   $0x61,-0x18(%rbp)
jb     11af <fn_cl_48_57_65_70_91_91_97_102+0x9f>
cmpl   $0x66,-0x18(%rbp)
ja     11af <fn_cl_48_57_65_70_91_91_97_102+0x9f>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11b6 <fn_cl_48_57_65_70_91_91_97_102+0xa6>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_cl_48_57_65_70_91_91_97_102>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
call   1030 <next_utf8@plt>
lea    -0x30(%rax),%ecx
cmp    $0x9,%ecx
jbe    1145 <fn_cl_48_57_65_70_91_91_97_102+0x35>
lea    -0x41(%rax),%ecx
cmp    $0x5,%ecx
jbe    1145 <fn_cl_48_57_65_70_91_91_97_102+0x35>
cmp    $0x5b,%eax
je     1145 <fn_cl_48_57_65_70_91_91_97_102+0x35>
add    $0xffffff9f,%eax
mov    $0xffffffff,%ecx
cmp    $0x6,%eax
jae    1149 <fn_cl_48_57_65_70_91_91_97_102+0x39>
mov    0x4(%rsp),%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fn_cl_48_57_65_70_91_91_97_102(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, 48
br i1 %9, label %10, label %15
10: ; preds = %1
%11 = load i32, i32* %5
%12 = icmp ule i32 %11, 57
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = load i32, i32* %4
store i32 %14, i32* %2
br label %40
15: ; preds = %10, %1
%16 = load i32, i32* %5
%17 = icmp uge i32 %16, 65
br i1 %17, label %18, label %23
18: ; preds = %15
%19 = load i32, i32* %5
%20 = icmp ule i32 %19, 70
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = load i32, i32* %4
store i32 %22, i32* %2
br label %40
23: ; preds = %18, %15
%24 = load i32, i32* %5
%25 = icmp uge i32 %24, 91
br i1 %25, label %26, label %31
26: ; preds = %23
%27 = load i32, i32* %5
%28 = icmp ule i32 %27, 91
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = load i32, i32* %4
store i32 %30, i32* %2
br label %40
31: ; preds = %26, %23
%32 = load i32, i32* %5
%33 = icmp uge i32 %32, 97
br i1 %33, label %34, label %39
34: ; preds = %31
%35 = load i32, i32* %5
%36 = icmp ule i32 %35, 102
br i1 %36, label %37, label %39
37: ; preds = %34
%38 = load i32, i32* %4
store i32 %38, i32* %2
br label %40
39: ; preds = %34, %31
store i32 -1, i32* %2
br label %40
40: ; preds = %39, %37, %29, %21, %13
%41 = load i32, i32* %2
ret i32 %41
}

LLVM IR (-O2):
define i32 @fn_cl_48_57_65_70_91_91_97_102(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, -48
%6 = icmp ult i32 %5, 10
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i32, i32* %2
br label %23
9: ; preds = %1
%10 = add i32 %4, -65
%11 = icmp ult i32 %10, 6
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = load i32, i32* %2
br label %23
14: ; preds = %9
%15 = icmp eq i32 %4, 91
br i1 %15, label %16, label %18
16: ; preds = %14
%17 = load i32, i32* %2
br label %23
18: ; preds = %14
%19 = add i32 %4, -97
%20 = icmp ult i32 %19, 6
%21 = load i32, i32* %2
%22 = select i1 %20, i32 %21, i32 -1
br label %23
23: ; preds = %18, %16, %12, %7
%24 = phi i32 [ %8, %7 ], [ %13, %12 ], [ %17, %16 ], [ %22, %18 ]
ret i32 %24
}