#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 *strchr(char const *, char);
int Prop_Check(const char *name, const char what) {
  if (*name == what)
    return (1);
  while ((name = strchr(name, '/'))) {
    if (name[1] == what)
      return (1);
    name++;
  }
  return (0);
}


x86 assembly (clang, -O0):
<Prop_Check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    1141 <Prop_Check+0x31>
movl   $0x1,-0x4(%rbp)
jmp    119a <Prop_Check+0x8a>
jmp    1146 <Prop_Check+0x36>
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1193 <Prop_Check+0x83>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    1182 <Prop_Check+0x72>
movl   $0x1,-0x4(%rbp)
jmp    119a <Prop_Check+0x8a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1146 <Prop_Check+0x36>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Prop_Check>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    $0x1,%ebx
cmp    %bpl,(%rdi)
je     1140 <Prop_Check+0x30>
nop
mov    $0x2f,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     113e <Prop_Check+0x2e>
mov    %rax,%rdi
add    $0x1,%rdi
cmp    %bpl,0x1(%rax)
jne    1120 <Prop_Check+0x10>
jmp    1140 <Prop_Check+0x30>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @Prop_Check(i8* %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
%6 = load i8*, i8** %4
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = load i8, i8* %5
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %8, %10
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 1, i32* %3
br label %31
13: ; preds = %2
br label %14
14: ; preds = %27, %13
%15 = load i8*, i8** %4
%16 = call i8* @strchr(i8* %15, i8 signext 47)
store i8* %16, i8** %4
%17 = icmp ne i8* %16, null
br i1 %17, label %18, label %30
18: ; preds = %14
%19 = load i8*, i8** %4
%20 = getelementptr inbounds i8, i8* %19, i64 1
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = load i8, i8* %5
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %22, %24
br i1 %25, label %26, label %27
26: ; preds = %18
store i32 1, i32* %3
br label %31
27: ; preds = %18
%28 = load i8*, i8** %4
%29 = getelementptr inbounds i8, i8* %28, i32 1
store i8* %29, i8** %4
br label %14
30: ; preds = %14
store i32 0, i32* %3
br label %31
31: ; preds = %30, %26, %12
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):
define i32 @Prop_Check(i8* %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, %1
br i1 %4, label %13, label %5
5: ; preds = %2, %9
%6 = phi i8* [ %10, %9 ], [ %0, %2 ]
%7 = tail call i8* @strchr(i8* %6, i8 signext 47)
%8 = icmp eq i8* %7, null
br i1 %8, label %13, label %9
9: ; preds = %5
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, %1
br i1 %12, label %13, label %5
13: ; preds = %5, %9, %2
%14 = phi i32 [ 1, %2 ], [ 0, %5 ], [ 1, %9 ]
ret i32 %14
}