#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 */
int fn_cl_33_33_36_36_38_44_46_46_48_57_59_59_58_126_61_61_65_91_95_95_97_122(
    char const *);
int fn_qtg_1_4294967295_cl_33_33_36_36_38_44_46_46_48_57_59_59_58_126_61_61_65_91_95_95_97_122(
    const char *text) {
  int pos = 0, p = 0, count = 0;
  while (
      (p = fn_cl_33_33_36_36_38_44_46_46_48_57_59_59_58_126_61_61_65_91_95_95_97_122(
           text + pos)) != -1) {
    pos += p;
    count++;
  }
  if (count >= 1)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_qtg_1_4294967295_cl_33_33_36_36_38_44_46_46_48_57_59_59_58_126_61_61_65_91_95_95_97_122>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
movslq -0x14(%rbp),%rax
add    %rax,%rdi
call   1030 <fn_cl_33_33_36_36_38_44_46_46_48_57_59_59_58_126_61_61_65_91_95_95_97_122@plt>
mov    %eax,-0x18(%rbp)
cmp    $0xffffffff,%eax
je     1164 <fn_qtg_1_4294967295_cl_33_33_36_36_38_44_46_46_48_57_59_59_58_126_61_61_65_91_95_95_97_122+0x54>
mov    -0x18(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1131 <fn_qtg_1_4294967295_cl_33_33_36_36_38_44_46_46_48_57_59_59_58_126_61_61_65_91_95_95_97_122+0x21>
cmpl   $0x1,-0x1c(%rbp)
jl     1179 <fn_qtg_1_4294967295_cl_33_33_36_36_38_44_46_46_48_57_59_59_58_126_61_61_65_91_95_95_97_122+0x69>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1180 <fn_qtg_1_4294967295_cl_33_33_36_36_38_44_46_46_48_57_59_59_58_126_61_61_65_91_95_95_97_122+0x70>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_qtg_1_4294967295_cl_33_33_36_36_38_44_46_46_48_57_59_59_58_126_61_61_65_91_95_95_97_122>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <fn_cl_33_33_36_36_38_44_46_46_48_57_59_59_58_126_61_61_65_91_95_95_97_122@plt>
cmp    $0xffffffff,%eax
je     1144 <fn_qtg_1_4294967295_cl_33_33_36_36_38_44_46_46_48_57_59_59_58_126_61_61_65_91_95_95_97_122+0x34>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    %eax,%ebp
movslq %ebp,%rdi
add    %rbx,%rdi
call   1030 <fn_cl_33_33_36_36_38_44_46_46_48_57_59_59_58_126_61_61_65_91_95_95_97_122@plt>
cmp    $0xffffffff,%eax
jne    1130 <fn_qtg_1_4294967295_cl_33_33_36_36_38_44_46_46_48_57_59_59_58_126_61_61_65_91_95_95_97_122+0x20>
jmp    1149 <fn_qtg_1_4294967295_cl_33_33_36_36_38_44_46_46_48_57_59_59_58_126_61_61_65_91_95_95_97_122+0x39>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fn_qtg_1_4294967295_cl_33_33_36_36_38_44_46_46_48_57_59_59_58_126_61_61_65_91_95_95_97_122(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
br label %7
7: ; preds = %14, %1
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = call i32 @fn_cl_33_33_36_36_38_44_46_46_48_57_59_59_58_126_61_61_65_91_95_95_97_122(i8* %11)
store i32 %12, i32* %5
%13 = icmp ne i32 %12, -1
br i1 %13, label %14, label %20
14: ; preds = %7
%15 = load i32, i32* %5
%16 = load i32, i32* %4
%17 = add nsw i32 %16, %15
store i32 %17, i32* %4
%18 = load i32, i32* %6
%19 = add nsw i32 %18, 1
store i32 %19, i32* %6
br label %7
20: ; preds = %7
%21 = load i32, i32* %6
%22 = icmp sge i32 %21, 1
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = load i32, i32* %4
store i32 %24, i32* %2
br label %26
25: ; preds = %20
store i32 -1, i32* %2
br label %26
26: ; preds = %25, %23
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @fn_qtg_1_4294967295_cl_33_33_36_36_38_44_46_46_48_57_59_59_58_126_61_61_65_91_95_95_97_122(i8* %0) {
%2 = tail call i32 @fn_cl_33_33_36_36_38_44_46_46_48_57_59_59_58_126_61_61_65_91_95_95_97_122(i8* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %10, %4 ], [ %2, %1 ]
%6 = phi i32 [ %7, %4 ], [ 0, %1 ]
%7 = add nsw i32 %5, %6
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = tail call i32 @fn_cl_33_33_36_36_38_44_46_46_48_57_59_59_58_126_61_61_65_91_95_95_97_122(i8* %9)
%11 = icmp eq i32 %10, -1
br i1 %11, label %12, label %4
12: ; preds = %4, %1
%13 = phi i32 [ -1, %1 ], [ %7, %4 ]
ret i32 %13
}