#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 unexportfs_generic(char *, int);
int unexportfs_ipv6(char *, int);
int /*<<< orphan*/ xlog(int, char *, char *);
void unexportfs(char *arg, int verbose) {
  int failed;
  if (*arg == '[')
    failed = unexportfs_ipv6(arg, verbose);
  else
    failed = unexportfs_generic(arg, verbose);
  if (failed)
    xlog(0x0200, "Invalid export syntax: %s", arg);
}


x86 assembly (clang, -O0):
<unexportfs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5b,%eax
jne    1163 <unexportfs+0x33>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <unexportfs_ipv6@plt>
mov    %eax,-0x10(%rbp)
jmp    1172 <unexportfs+0x42>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <unexportfs_generic@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1191 <unexportfs+0x61>
mov    -0x8(%rbp),%rdx
mov    $0x200,%edi
lea    0xe74(%rip),%rsi
call   1050 <xlog@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unexportfs>:
push   %rbx
mov    %rdi,%rbx
cmpb   $0x5b,(%rdi)
jne    115a <unexportfs+0x2a>
mov    %rbx,%rdi
call   1040 <unexportfs_ipv6@plt>
test   %eax,%eax
je     1166 <unexportfs+0x36>
lea    0xeb4(%rip),%rsi
mov    $0x200,%edi
mov    %rbx,%rdx
pop    %rbx
jmp    1050 <xlog@plt>
mov    %rbx,%rdi
call   1030 <unexportfs_generic@plt>
test   %eax,%eax
jne    1145 <unexportfs+0x15>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Invalid export syntax: %s\00"
define void @unexportfs(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 91
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i8*, i8** %3
%12 = load i32, i32* %4
%13 = call i32 @unexportfs_ipv6(i8* %11, i32 %12)
store i32 %13, i32* %5
br label %18
14: ; preds = %2
%15 = load i8*, i8** %3
%16 = load i32, i32* %4
%17 = call i32 @unexportfs_generic(i8* %15, i32 %16)
store i32 %17, i32* %5
br label %18
18: ; preds = %14, %10
%19 = load i32, i32* %5
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = load i8*, i8** %3
%23 = call i32 @xlog(i32 512, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %22)
br label %24
24: ; preds = %21, %18
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Invalid export syntax: %s\00"
define void @unexportfs(i8* %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 91
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @unexportfs_ipv6(i8* %0, i32 %1)
br label %9
7: ; preds = %2
%8 = tail call i32 @unexportfs_generic(i8* %0, i32 %1)
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ %6, %5 ], [ %8, %7 ]
%11 = icmp eq i32 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %9
%13 = tail call i32 @xlog(i32 512, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %14
14: ; preds = %12, %9
ret void
}