#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 isfileaddr(char *name) {
  char *cp;
  if (*name == '+')
    return (1);
  for (cp = name; *cp != '\0'; cp++) {
    if (*cp == '!' || *cp == '%' || *cp == '@')
      return (0);
    if (*cp == '/')
      return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<isfileaddr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
jne    1124 <isfileaddr+0x24>
movl   $0x1,-0x4(%rbp)
jmp    11b1 <isfileaddr+0xb1>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     11aa <isfileaddr+0xaa>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x21,%eax
je     116c <isfileaddr+0x6c>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x25,%eax
je     116c <isfileaddr+0x6c>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x40,%eax
jne    1178 <isfileaddr+0x78>
movl   $0x0,-0x4(%rbp)
jmp    11b1 <isfileaddr+0xb1>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1194 <isfileaddr+0x94>
movl   $0x1,-0x4(%rbp)
jmp    11b1 <isfileaddr+0xb1>
jmp    1199 <isfileaddr+0x99>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    112c <isfileaddr+0x2c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isfileaddr>:
mov    (%rdi),%dl
mov    $0x1,%eax
cmp    $0x2b,%dl
je     1143 <isfileaddr+0x43>
add    $0x1,%rdi
lea    0xee9(%rip),%rcx
jmp    112b <isfileaddr+0x2b>
nopl   0x0(%rax)
test   %dl,%dl
je     1141 <isfileaddr+0x41>
movzbl (%rdi),%edx
add    $0x1,%rdi
lea    -0x21(%rdx),%esi
cmp    $0x1f,%sil
ja     1120 <isfileaddr+0x20>
movzbl %sil,%edx
movslq (%rcx,%rdx,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isfileaddr(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 43
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 1, i32* %2
br label %44
10: ; preds = %1
%11 = load i8*, i8** %3
store i8* %11, i8** %4
br label %12
12: ; preds = %40, %10
%13 = load i8*, i8** %4
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %43
17: ; preds = %12
%18 = load i8*, i8** %4
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 33
br i1 %21, label %32, label %22
22: ; preds = %17
%23 = load i8*, i8** %4
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 37
br i1 %26, label %32, label %27
27: ; preds = %22
%28 = load i8*, i8** %4
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = icmp eq i32 %30, 64
br i1 %31, label %32, label %33
32: ; preds = %27, %22, %17
store i32 0, i32* %2
br label %44
33: ; preds = %27
%34 = load i8*, i8** %4
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = icmp eq i32 %36, 47
br i1 %37, label %38, label %39
38: ; preds = %33
store i32 1, i32* %2
br label %44
39: ; preds = %33
br label %40
40: ; preds = %39
%41 = load i8*, i8** %4
%42 = getelementptr inbounds i8, i8* %41, i32 1
store i8* %42, i8** %4
br label %12
43: ; preds = %12
store i32 0, i32* %2
br label %44
44: ; preds = %43, %38, %32, %9
%45 = load i32, i32* %2
ret i32 %45
}

LLVM IR (-O2):
define i32 @isfileaddr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 43
br i1 %3, label %11, label %4
4: ; preds = %1, %7
%5 = phi i8 [ %9, %7 ], [ %2, %1 ]
%6 = phi i8* [ %8, %7 ], [ %0, %1 ]
switch i8 %5, label %7 [
i8 0, label %10
i8 33, label %10
i8 37, label %10
i8 64, label %10
i8 47, label %11
]
7: ; preds = %4
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
br label %4
10: ; preds = %4, %4, %4, %4
br label %11
11: ; preds = %4, %10, %1
%12 = phi i32 [ 1, %1 ], [ 0, %10 ], [ 1, %4 ]
ret i32 %12
}