#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 */
char *strstr(char *, char *);
int isUrl(char *s) {
  char *t;
  t = strstr(s, "://");
  if (!t)
    return 0;
  while (s != t) {
    if (!(*s >= 'A' && *s <= 'z'))
      return 0;
    s++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<isUrl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strstr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1147 <isUrl+0x37>
movl   $0x0,-0x4(%rbp)
jmp    119e <isUrl+0x8e>
jmp    114c <isUrl+0x3c>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     1197 <isUrl+0x87>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     117a <isUrl+0x6a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7a,%eax
jle    1186 <isUrl+0x76>
movl   $0x0,-0x4(%rbp)
jmp    119e <isUrl+0x8e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    114c <isUrl+0x3c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isUrl>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strstr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1149 <isUrl+0x39>
cmp    %rbx,%rcx
je     1144 <isUrl+0x34>
nop
movzbl (%rbx),%edx
add    $0xbf,%dl
cmp    $0x3a,%dl
jae    1149 <isUrl+0x39>
add    $0x1,%rbx
cmp    %rcx,%rbx
jne    1130 <isUrl+0x20>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"://\00"
define i32 @isUrl(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @strstr(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %10, label %9
9: ; preds = %1
store i32 0, i32* %2
br label %30
10: ; preds = %1
br label %11
11: ; preds = %26, %10
%12 = load i8*, i8** %3
%13 = load i8*, i8** %4
%14 = icmp ne i8* %12, %13
br i1 %14, label %15, label %29
15: ; preds = %11
%16 = load i8*, i8** %3
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp sge i32 %18, 65
br i1 %19, label %20, label %25
20: ; preds = %15
%21 = load i8*, i8** %3
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp sle i32 %23, 122
br i1 %24, label %26, label %25
25: ; preds = %20, %15
store i32 0, i32* %2
br label %30
26: ; preds = %20
%27 = load i8*, i8** %3
%28 = getelementptr inbounds i8, i8* %27, i32 1
store i8* %28, i8** %3
br label %11
29: ; preds = %11
store i32 1, i32* %2
br label %30
30: ; preds = %29, %25, %9
%31 = load i32, i32* %2
ret i32 %31
}

LLVM IR (-O2):
@.str = [4 x i8] c"://\00"
define i32 @isUrl(i8* %0) {
%2 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i8* %2, null
br i1 %3, label %14, label %4
4: ; preds = %1
%5 = icmp eq i8* %2, %0
br i1 %5, label %14, label %8
6: ; preds = %8
%7 = icmp eq i8* %13, %2
br i1 %7, label %14, label %8
8: ; preds = %4, %6
%9 = phi i8* [ %13, %6 ], [ %0, %4 ]
%10 = load i8, i8* %9
%11 = add i8 %10, -65
%12 = icmp ult i8 %11, 58
%13 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %12, label %6, label %14
14: ; preds = %8, %6, %4, %1
%15 = phi i32 [ 0, %1 ], [ 1, %4 ], [ 0, %8 ], [ 1, %6 ]
ret i32 %15
}