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


x86 assembly (clang, -O0):
<exportfs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5b,%eax
jne    116b <exportfs+0x3b>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <exportfs_ipv6@plt>
mov    %eax,-0x18(%rbp)
jmp    117e <exportfs+0x4e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1050 <exportfs_generic@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     119d <exportfs+0x6d>
mov    -0x8(%rbp),%rdx
mov    $0x200,%edi
lea    0xe68(%rip),%rsi
call   1040 <xlog@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

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