#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 */
scalar_t__ path_valid_virtual(char const *);
void *strchr(char const *, char);
int __av_path_local(const char *path) {
  if (strchr(path, '#') == ((void *)0)) {
    if (strchr(path, ':') == ((void *)0))
      return 1;
    else if (path_valid_virtual(path))
      return 0;
    else
      return 1;
  } else
    return 0;
}


x86 assembly (clang, -O0):
<__av_path_local>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x23,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
jne    1193 <__av_path_local+0x73>
mov    -0x10(%rbp),%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
jne    1168 <__av_path_local+0x48>
movl   $0x1,-0x4(%rbp)
jmp    119a <__av_path_local+0x7a>
mov    -0x10(%rbp),%rdi
call   1040 <path_valid_virtual@plt>
cmp    $0x0,%rax
je     1187 <__av_path_local+0x67>
movl   $0x0,-0x4(%rbp)
jmp    119a <__av_path_local+0x7a>
movl   $0x1,-0x4(%rbp)
jmp    119a <__av_path_local+0x7a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__av_path_local>:
push   %rbx
mov    %rdi,%rbx
mov    $0x23,%esi
call   1030 <strchr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     113a <__av_path_local+0x1a>
pop    %rbx
ret
mov    %rbx,%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1161 <__av_path_local+0x41>
mov    %rbx,%rdi
call   1040 <path_valid_virtual@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @__av_path_local(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i8* @strchr(i8* %4, i8 signext 35)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %18
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = call i8* @strchr(i8* %8, i8 signext 58)
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %19
12: ; preds = %7
%13 = load i8*, i8** %3
%14 = call i64 @path_valid_virtual(i8* %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %12
store i32 0, i32* %2
br label %19
17: ; preds = %12
store i32 1, i32* %2
br label %19
18: ; preds = %1
store i32 0, i32* %2
br label %19
19: ; preds = %18, %17, %16, %11
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @__av_path_local(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 35)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 58)
%6 = icmp eq i8* %5, null
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = tail call i64 @path_valid_virtual(i8* %0)
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %1, %7, %4
%12 = phi i32 [ 1, %4 ], [ %10, %7 ], [ 0, %1 ]
ret i32 %12
}