#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_9_10_13_13_32_32(const char *text) {
  int pos = 0;
  unsigned int c = next_utf8(text, &pos);
  if (c >= 9 && c <= 10)
    return pos;
  if (c >= 13 && c <= 13)
    return pos;
  if (c >= 32 && c <= 32)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_cl_9_10_13_13_32_32>:
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   $0x9,-0x18(%rbp)
jb     1152 <fn_cl_9_10_13_13_32_32+0x42>
cmpl   $0xa,-0x18(%rbp)
ja     1152 <fn_cl_9_10_13_13_32_32+0x42>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1197 <fn_cl_9_10_13_13_32_32+0x87>
cmpl   $0xd,-0x18(%rbp)
jb     1171 <fn_cl_9_10_13_13_32_32+0x61>
cmpl   $0xd,-0x18(%rbp)
ja     1171 <fn_cl_9_10_13_13_32_32+0x61>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1197 <fn_cl_9_10_13_13_32_32+0x87>
cmpl   $0x20,-0x18(%rbp)
jb     1190 <fn_cl_9_10_13_13_32_32+0x80>
cmpl   $0x20,-0x18(%rbp)
ja     1190 <fn_cl_9_10_13_13_32_32+0x80>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1197 <fn_cl_9_10_13_13_32_32+0x87>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_cl_9_10_13_13_32_32>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
call   1030 <next_utf8@plt>
mov    %eax,%ecx
lea    -0x9(%rcx),%eax
cmp    $0x1,%eax
jbe    113c <fn_cl_9_10_13_13_32_32+0x2c>
cmp    $0x20,%ecx
je     113c <fn_cl_9_10_13_13_32_32+0x2c>
mov    $0xffffffff,%eax
cmp    $0xd,%ecx
jne    1140 <fn_cl_9_10_13_13_32_32+0x30>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fn_cl_9_10_13_13_32_32(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, 9
br i1 %9, label %10, label %15
10: ; preds = %1
%11 = load i32, i32* %5
%12 = icmp ule i32 %11, 10
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = load i32, i32* %4
store i32 %14, i32* %2
br label %32
15: ; preds = %10, %1
%16 = load i32, i32* %5
%17 = icmp uge i32 %16, 13
br i1 %17, label %18, label %23
18: ; preds = %15
%19 = load i32, i32* %5
%20 = icmp ule i32 %19, 13
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = load i32, i32* %4
store i32 %22, i32* %2
br label %32
23: ; preds = %18, %15
%24 = load i32, i32* %5
%25 = icmp uge i32 %24, 32
br i1 %25, label %26, label %31
26: ; preds = %23
%27 = load i32, i32* %5
%28 = icmp ule i32 %27, 32
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = load i32, i32* %4
store i32 %30, i32* %2
br label %32
31: ; preds = %26, %23
store i32 -1, i32* %2
br label %32
32: ; preds = %31, %29, %21, %13
%33 = load i32, i32* %2
ret i32 %33
}

LLVM IR (-O2):
define i32 @fn_cl_9_10_13_13_32_32(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, -9
%6 = icmp ult i32 %5, 2
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i32, i32* %2
br label %14
9: ; preds = %1
switch i32 %4, label %14 [
i32 13, label %10
i32 32, label %12
]
10: ; preds = %9
%11 = load i32, i32* %2
br label %14
12: ; preds = %9
%13 = load i32, i32* %2
br label %14
14: ; preds = %9, %12, %10, %7
%15 = phi i32 [ %8, %7 ], [ %11, %10 ], [ %13, %12 ], [ -1, %9 ]
ret i32 %15
}