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


x86 assembly (clang, -O0):
<fn_cl_43_43_45_46_48_57_65_91_97_122>:
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   $0x2b,-0x18(%rbp)
jb     1152 <fn_cl_43_43_45_46_48_57_65_91_97_122+0x42>
cmpl   $0x2b,-0x18(%rbp)
ja     1152 <fn_cl_43_43_45_46_48_57_65_91_97_122+0x42>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11d5 <fn_cl_43_43_45_46_48_57_65_91_97_122+0xc5>
cmpl   $0x2d,-0x18(%rbp)
jb     1171 <fn_cl_43_43_45_46_48_57_65_91_97_122+0x61>
cmpl   $0x2e,-0x18(%rbp)
ja     1171 <fn_cl_43_43_45_46_48_57_65_91_97_122+0x61>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11d5 <fn_cl_43_43_45_46_48_57_65_91_97_122+0xc5>
cmpl   $0x30,-0x18(%rbp)
jb     1190 <fn_cl_43_43_45_46_48_57_65_91_97_122+0x80>
cmpl   $0x39,-0x18(%rbp)
ja     1190 <fn_cl_43_43_45_46_48_57_65_91_97_122+0x80>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11d5 <fn_cl_43_43_45_46_48_57_65_91_97_122+0xc5>
cmpl   $0x41,-0x18(%rbp)
jb     11af <fn_cl_43_43_45_46_48_57_65_91_97_122+0x9f>
cmpl   $0x5b,-0x18(%rbp)
ja     11af <fn_cl_43_43_45_46_48_57_65_91_97_122+0x9f>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11d5 <fn_cl_43_43_45_46_48_57_65_91_97_122+0xc5>
cmpl   $0x61,-0x18(%rbp)
jb     11ce <fn_cl_43_43_45_46_48_57_65_91_97_122+0xbe>
cmpl   $0x7a,-0x18(%rbp)
ja     11ce <fn_cl_43_43_45_46_48_57_65_91_97_122+0xbe>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11d5 <fn_cl_43_43_45_46_48_57_65_91_97_122+0xc5>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_cl_43_43_45_46_48_57_65_91_97_122>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
call   1030 <next_utf8@plt>
cmp    $0x2b,%eax
je     114d <fn_cl_43_43_45_46_48_57_65_91_97_122+0x3d>
lea    -0x2d(%rax),%ecx
cmp    $0x1,%ecx
jbe    114d <fn_cl_43_43_45_46_48_57_65_91_97_122+0x3d>
lea    -0x30(%rax),%ecx
cmp    $0x9,%ecx
jbe    114d <fn_cl_43_43_45_46_48_57_65_91_97_122+0x3d>
lea    -0x41(%rax),%ecx
cmp    $0x1a,%ecx
jbe    114d <fn_cl_43_43_45_46_48_57_65_91_97_122+0x3d>
add    $0xffffff9f,%eax
mov    $0xffffffff,%ecx
cmp    $0x1a,%eax
jae    1151 <fn_cl_43_43_45_46_48_57_65_91_97_122+0x41>
mov    0x4(%rsp),%ecx
mov    %ecx,%eax
pop    %rcx
ret

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

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