#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__ strchr(char const *, char);
int /*<<< orphan*/ strcmp(char const *, char *);
int /*<<< orphan*/ strncmp(char const *, char *, int);
int remote_mount(const char *device, const char *type) {
  return ((strchr(device, ':') != 0) ||
          (!strcmp(type, "smbfs") && device[0] == '/' && device[1] == '/') ||
          (!strncmp(type, "nfs", 3)) || (!strcmp(type, "autofs")) ||
          (!strcmp(type, "gfs")) || (!strcmp(type, "none")));
}


x86 assembly (clang, -O0):
<remote_mount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3a,%esi
call   1040 <strchr@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
jne    121f <remote_mount+0xef>
mov    -0x10(%rbp),%rdi
lea    0xe95(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    119f <remote_mount+0x6f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    119f <remote_mount+0x6f>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%ecx
mov    $0x1,%al
cmp    $0x2f,%ecx
mov    %al,-0x11(%rbp)
je     121f <remote_mount+0xef>
mov    -0x10(%rbp),%rdi
lea    0xe5c(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     121f <remote_mount+0xef>
mov    -0x10(%rbp),%rdi
lea    0xe3b(%rip),%rsi
call   1050 <strcmp@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     121f <remote_mount+0xef>
mov    -0x10(%rbp),%rdi
lea    0xe22(%rip),%rsi
call   1050 <strcmp@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     121f <remote_mount+0xef>
mov    -0x10(%rbp),%rdi
lea    0xe06(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remote_mount>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rbp
mov    $0x3a,%esi
call   1040 <strchr@plt>
mov    $0x1,%r14d
test   %rax,%rax
je     1157 <remote_mount+0x27>
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
lea    0xea2(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
jne    1176 <remote_mount+0x46>
cmpb   $0x2f,0x0(%rbp)
jne    1176 <remote_mount+0x46>
cmpb   $0x2f,0x1(%rbp)
je     114f <remote_mount+0x1f>
lea    0xe89(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     114f <remote_mount+0x1f>
lea    0xe75(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
je     114f <remote_mount+0x1f>
lea    0xe69(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
je     114f <remote_mount+0x1f>
lea    0xe5a(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
xor    %r14d,%r14d
test   %eax,%eax
sete   %r14b
jmp    114f <remote_mount+0x1f>

LLVM IR (-O0):
@.str = [6 x i8] c"smbfs\00"
@.str.1 = [4 x i8] c"nfs\00"
@.str.2 = [7 x i8] c"autofs\00"
@.str.3 = [4 x i8] c"gfs\00"
@.str.4 = [5 x i8] c"none\00"
define i32 @remote_mount(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i64 @strchr(i8* %5, i8 signext 58)
%7 = icmp ne i64 %6, 0
br i1 %7, label %41, label %8
8: ; preds = %2
%9 = load i8*, i8** %4
%10 = call i32 @strcmp(i8* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%11 = icmp ne i32 %10, 0
br i1 %11, label %24, label %12
12: ; preds = %8
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i64 0
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 47
br i1 %17, label %18, label %24
18: ; preds = %12
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i64 1
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 47
br i1 %23, label %41, label %24
24: ; preds = %18, %12, %8
%25 = load i8*, i8** %4
%26 = call i32 @strncmp(i8* %25, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %41
28: ; preds = %24
%29 = load i8*, i8** %4
%30 = call i32 @strcmp(i8* %29, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%31 = icmp ne i32 %30, 0
br i1 %31, label %32, label %41
32: ; preds = %28
%33 = load i8*, i8** %4
%34 = call i32 @strcmp(i8* %33, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%35 = icmp ne i32 %34, 0
br i1 %35, label %36, label %41
36: ; preds = %32
%37 = load i8*, i8** %4
%38 = call i32 @strcmp(i8* %37, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%39 = icmp ne i32 %38, 0
%40 = xor i1 %39, true
br label %41
41: ; preds = %36, %32, %28, %24, %18, %2
%42 = phi i1 [ true, %32 ], [ true, %28 ], [ true, %24 ], [ true, %18 ], [ true, %2 ], [ %40, %36 ]
%43 = zext i1 %42 to i32
ret i32 %43
}

LLVM IR (-O2):
@.str = [6 x i8] c"smbfs\00"
@.str.1 = [4 x i8] c"nfs\00"
@.str.2 = [7 x i8] c"autofs\00"
@.str.3 = [4 x i8] c"gfs\00"
@.str.4 = [5 x i8] c"none\00"
define i32 @remote_mount(i8* %0, i8* %1) {
%3 = tail call i64 @strchr(i8* %0, i8 signext 58)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %28
5: ; preds = %2
%6 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %5
%9 = load i8, i8* %0
%10 = icmp eq i8 %9, 47
br i1 %10, label %11, label %15
11: ; preds = %8
%12 = getelementptr inbounds i8, i8* %0, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 47
br i1 %14, label %28, label %15
15: ; preds = %11, %8, %5
%16 = tail call i32 @strncmp(i8* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%17 = icmp eq i32 %16, 0
br i1 %17, label %28, label %18
18: ; preds = %15
%19 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%20 = icmp eq i32 %19, 0
br i1 %20, label %28, label %21
21: ; preds = %18
%22 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%23 = icmp eq i32 %22, 0
br i1 %23, label %28, label %24
24: ; preds = %21
%25 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%26 = icmp eq i32 %25, 0
%27 = zext i1 %26 to i32
br label %28
28: ; preds = %24, %21, %18, %15, %11, %2
%29 = phi i32 [ 1, %21 ], [ 1, %18 ], [ 1, %15 ], [ 1, %11 ], [ 1, %2 ], [ %27, %24 ]
ret i32 %29
}