#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 */
struct mntent {
  int mnt_freq;
  int mnt_passno;
  void *mnt_opts;
  void *mnt_type;
  void *mnt_dir;
  void *mnt_fsname;
};

/* Variables and functions */
int /*<<< orphan*/ hasmntopt(struct mntent *, char *);
int /*<<< orphan*/ printf(char *, char *, char *);
void *strdupa(char *);
int main(void) {
  int result = 0;
  struct mntent mef;
  mef.mnt_fsname = strdupa("/dev/sdf6");
  mef.mnt_dir = strdupa("/some dir");
  mef.mnt_type = strdupa("ext3");
  mef.mnt_opts = strdupa("opt1,opt2,noopt=6,rw,norw,brw");
  mef.mnt_freq = 1;
  mef.mnt_passno = 2;
  if (!!hasmntopt(&mef, ("opt1")) != (1)) {
    printf("Option %s was %sfound\n", ("opt1"), (1) ? "not " : "");
    result = 1;
  }
  if (!!hasmntopt(&mef, ("opt2")) != (1)) {
    printf("Option %s was %sfound\n", ("opt2"), (1) ? "not " : "");
    result = 1;
  }
  if (!!hasmntopt(&mef, ("noopt")) != (1)) {
    printf("Option %s was %sfound\n", ("noopt"), (1) ? "not " : "");
    result = 1;
  }
  if (!!hasmntopt(&mef, ("rw")) != (1)) {
    printf("Option %s was %sfound\n", ("rw"), (1) ? "not " : "");
    result = 1;
  }
  if (!!hasmntopt(&mef, ("norw")) != (1)) {
    printf("Option %s was %sfound\n", ("norw"), (1) ? "not " : "");
    result = 1;
  }
  if (!!hasmntopt(&mef, ("brw")) != (1)) {
    printf("Option %s was %sfound\n", ("brw"), (1) ? "not " : "");
    result = 1;
  }
  if (!!hasmntopt(&mef, ("opt")) != (0)) {
    printf("Option %s was %sfound\n", ("opt"), (0) ? "not " : "");
    result = 1;
  }
  if (!!hasmntopt(&mef, ("oopt")) != (0)) {
    printf("Option %s was %sfound\n", ("oopt"), (0) ? "not " : "");
    result = 1;
  }
  if (!!hasmntopt(&mef, ("w")) != (0)) {
    printf("Option %s was %sfound\n", ("w"), (0) ? "not " : "");
    result = 1;
  }
  if (!!hasmntopt(&mef, ("r")) != (0)) {
    printf("Option %s was %sfound\n", ("r"), (0) ? "not " : "");
    result = 1;
  }
  if (!!hasmntopt(&mef, ("br")) != (0)) {
    printf("Option %s was %sfound\n", ("br"), (0) ? "not " : "");
    result = 1;
  }
  if (!!hasmntopt(&mef, ("nor")) != (0)) {
    printf("Option %s was %sfound\n", ("nor"), (0) ? "not " : "");
    result = 1;
  }
  if (!!hasmntopt(&mef, ("or")) != (0)) {
    printf("Option %s was %sfound\n", ("or"), (0) ? "not " : "");
    result = 1;
  }
  return result;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xeb3(%rip),%rdi
call   1040 <strdupa@plt>
mov    %rax,-0x10(%rbp)
lea    0xead(%rip),%rdi
call   1040 <strdupa@plt>
mov    %rax,-0x18(%rbp)
lea    0xea7(%rip),%rdi
call   1040 <strdupa@plt>
mov    %rax,-0x20(%rbp)
lea    0xe9c(%rip),%rdi
call   1040 <strdupa@plt>
mov    %rax,-0x28(%rbp)
movl   $0x1,-0x30(%rbp)
movl   $0x2,-0x2c(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xe98(%rip),%rsi
call   1050 <hasmntopt@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x1,%eax
je     11dd <main+0xad>
lea    0xe79(%rip),%rdi
lea    0xe6d(%rip),%rsi
lea    0xe82(%rip),%rdx
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xe70(%rip),%rsi
call   1050 <hasmntopt@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x1,%eax
je     1226 <main+0xf6>
lea    0xe30(%rip),%rdi
lea    0xe45(%rip),%rsi
lea    0xe39(%rip),%rdx
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xe2c(%rip),%rsi
call   1050 <hasmntopt@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x1,%eax
je     126f <main+0x13f>
lea    0xde7(%rip),%rdi
lea    0xe01(%rip),%rsi
lea    0xdf0(%rip),%rdx
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xdba(%rip),%rsi
call   1050 <hasmntopt@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x1,%eax
je     12b8 <main+0x188>
lea    0xd9e(%rip),%rdi
lea    0xd8f(%rip),%rsi
lea    0xda7(%rip),%rdx
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xda0(%rip),%rsi
call   1050 <hasmntopt@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x1,%eax
je     1301 <main+0x1d1>
lea    0xd55(%rip),%rdi
lea    0xd75(%rip),%rsi
lea    0xd5e(%rip),%rdx
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xd27(%rip),%rsi
call   1050 <hasmntopt@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x1,%eax
je     134a <main+0x21a>
lea    0xd0c(%rip),%rdi
lea    0xcfc(%rip),%rsi
lea    0xd15(%rip),%rdx
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xd0a(%rip),%rsi
call   1050 <hasmntopt@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
je     1393 <main+0x263>
lea    0xcc3(%rip),%rdi
lea    0xcdf(%rip),%rsi
lea    0xccb(%rip),%rdx
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xcc0(%rip),%rsi
call   1050 <hasmntopt@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
je     13dc <main+0x2ac>
lea    0xc7a(%rip),%rdi
lea    0xc95(%rip),%rsi
lea    0xc82(%rip),%rdx
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xc4e(%rip),%rsi
call   1050 <hasmntopt@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
je     1425 <main+0x2f5>
lea    0xc31(%rip),%rdi
lea    0xc23(%rip),%rsi
lea    0xc39(%rip),%rdx
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xc39(%rip),%rsi
call   1050 <hasmntopt@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
je     146e <main+0x33e>
lea    0xbe8(%rip),%rdi
lea    0xc0e(%rip),%rsi
lea    0xbf0(%rip),%rdx
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xbef(%rip),%rsi
call   1050 <hasmntopt@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
je     14b7 <main+0x387>
lea    0xb9f(%rip),%rdi
lea    0xbc4(%rip),%rsi
lea    0xba7(%rip),%rdx
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xba9(%rip),%rsi
call   1050 <hasmntopt@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
je     1500 <main+0x3d0>
lea    0xb56(%rip),%rdi
lea    0xb7e(%rip),%rsi
lea    0xb5e(%rip),%rdx
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xb61(%rip),%rsi
call   1050 <hasmntopt@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
je     1549 <main+0x419>
lea    0xb0d(%rip),%rdi
lea    0xb36(%rip),%rsi
lea    0xb15(%rip),%rdx
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xec4(%rip),%rdi
call   1040 <strdupa@plt>
mov    %rax,0x28(%rsp)
lea    0xebd(%rip),%rdi
call   1040 <strdupa@plt>
mov    %rax,0x20(%rsp)
lea    0xeb6(%rip),%rdi
call   1040 <strdupa@plt>
mov    %rax,0x18(%rsp)
lea    0xeaa(%rip),%rdi
call   1040 <strdupa@plt>
mov    %rax,0x10(%rsp)
movabs $0x200000001,%rax
mov    %rax,0x8(%rsp)
lea    0xea8(%rip),%rsi
lea    0x8(%rsp),%rdi
call   1050 <hasmntopt@plt>
xor    %ebx,%ebx
test   %eax,%eax
jne    11be <main+0x8e>
lea    0xe96(%rip),%rdi
lea    0xe8a(%rip),%rsi
lea    0xe9f(%rip),%rdx
call   1030 <printf@plt>
mov    $0x1,%ebx
lea    0xe93(%rip),%rsi
lea    0x8(%rsp),%rdi
call   1050 <hasmntopt@plt>
test   %eax,%eax
jne    11f2 <main+0xc2>
lea    0xe62(%rip),%rdi
lea    0xe77(%rip),%rsi
lea    0xe6b(%rip),%rdx
call   1030 <printf@plt>
mov    $0x1,%ebx
lea    0xe64(%rip),%rsi
lea    0x8(%rsp),%rdi
call   1050 <hasmntopt@plt>
test   %eax,%eax
jne    1226 <main+0xf6>
lea    0xe2e(%rip),%rdi
lea    0xe48(%rip),%rsi
lea    0xe37(%rip),%rdx
call   1030 <printf@plt>
mov    $0x1,%ebx
lea    0xe07(%rip),%rsi
lea    0x8(%rsp),%rdi
call   1050 <hasmntopt@plt>
test   %eax,%eax
jne    125a <main+0x12a>
lea    0xdfa(%rip),%rdi
lea    0xdeb(%rip),%rsi
lea    0xe03(%rip),%rdx
call   1030 <printf@plt>
mov    $0x1,%ebx
lea    0xe02(%rip),%rsi
lea    0x8(%rsp),%rdi
call   1050 <hasmntopt@plt>
test   %eax,%eax
jne    128e <main+0x15e>
lea    0xdc6(%rip),%rdi
lea    0xde6(%rip),%rsi
lea    0xdcf(%rip),%rdx
call   1030 <printf@plt>
mov    $0x1,%ebx
lea    0xd9e(%rip),%rsi
lea    0x8(%rsp),%rdi
call   1050 <hasmntopt@plt>
test   %eax,%eax
jne    12c2 <main+0x192>
lea    0xd92(%rip),%rdi
lea    0xd82(%rip),%rsi
lea    0xd9b(%rip),%rdx
call   1030 <printf@plt>
mov    $0x1,%ebx
lea    0xd96(%rip),%rsi
lea    0x8(%rsp),%rdi
call   1050 <hasmntopt@plt>
test   %eax,%eax
je     12f6 <main+0x1c6>
lea    0xd5e(%rip),%rdi
lea    0xd7a(%rip),%rsi
lea    0xd66(%rip),%rdx
call   1030 <printf@plt>
mov    $0x1,%ebx
lea    0xd61(%rip),%rsi
lea    0x8(%rsp),%rdi
call   1050 <hasmntopt@plt>
test   %eax,%eax
je     132a <main+0x1fa>
lea    0xd2a(%rip),%rdi
lea    0xd45(%rip),%rsi
lea    0xd32(%rip),%rdx
call   1030 <printf@plt>
mov    $0x1,%ebx
lea    0xd04(%rip),%rsi
lea    0x8(%rsp),%rdi
call   1050 <hasmntopt@plt>
test   %eax,%eax
je     135e <main+0x22e>
lea    0xcf6(%rip),%rdi
lea    0xce8(%rip),%rsi
lea    0xcfe(%rip),%rdx
call   1030 <printf@plt>
mov    $0x1,%ebx
lea    0xd04(%rip),%rsi
lea    0x8(%rsp),%rdi
call   1050 <hasmntopt@plt>
test   %eax,%eax
je     1392 <main+0x262>
lea    0xcc2(%rip),%rdi
lea    0xce8(%rip),%rsi
lea    0xcca(%rip),%rdx
call   1030 <printf@plt>
mov    $0x1,%ebx
lea    0xccf(%rip),%rsi
lea    0x8(%rsp),%rdi
call   1050 <hasmntopt@plt>
test   %eax,%eax
je     13c6 <main+0x296>
lea    0xc8e(%rip),%rdi
lea    0xcb3(%rip),%rsi
lea    0xc96(%rip),%rdx
call   1030 <printf@plt>
mov    $0x1,%ebx
lea    0xc9e(%rip),%rsi
lea    0x8(%rsp),%rdi
call   1050 <hasmntopt@plt>
test   %eax,%eax
je     13fa <main+0x2ca>
lea    0xc5a(%rip),%rdi
lea    0xc82(%rip),%rsi
lea    0xc62(%rip),%rdx
call   1030 <printf@plt>
mov    $0x1,%ebx
lea    0xc6b(%rip),%rsi
lea    0x8(%rsp),%rdi
call   1050 <hasmntopt@plt>
test   %eax,%eax
je     142e <main+0x2fe>
lea    0xc26(%rip),%rdi
lea    0xc4f(%rip),%rsi
lea    0xc2e(%rip),%rdx
call   1030 <printf@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.mntent = type { i32, i32, i8*, i8*, i8*, i8* }
@.str = [10 x i8] c"/dev/sdf6\00"
@.str.1 = [10 x i8] c"/some dir\00"
@.str.2 = [5 x i8] c"ext3\00"
@.str.3 = [30 x i8] c"opt1,opt2,noopt=6,rw,norw,brw\00"
@.str.4 = [5 x i8] c"opt1\00"
@.str.5 = [23 x i8] c"Option %s was %sfound\0A\00"
@.str.6 = [5 x i8] c"not \00"
@.str.7 = [5 x i8] c"opt2\00"
@.str.8 = [6 x i8] c"noopt\00"
@.str.9 = [3 x i8] c"rw\00"
@.str.10 = [5 x i8] c"norw\00"
@.str.11 = [4 x i8] c"brw\00"
@.str.12 = [4 x i8] c"opt\00"
@.str.13 = [1 x i8] zeroinitializer
@.str.14 = [5 x i8] c"oopt\00"
@.str.15 = [2 x i8] c"w\00"
@.str.16 = [2 x i8] c"r\00"
@.str.17 = [3 x i8] c"br\00"
@.str.18 = [4 x i8] c"nor\00"
@.str.19 = [3 x i8] c"or\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca %struct.mntent
store i32 0, i32* %1
store i32 0, i32* %2
%4 = call i8* @strdupa(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds %struct.mntent, %struct.mntent* %3, i32 0, i32 5
store i8* %4, i8** %5
%6 = call i8* @strdupa(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%7 = getelementptr inbounds %struct.mntent, %struct.mntent* %3, i32 0, i32 4
store i8* %6, i8** %7
%8 = call i8* @strdupa(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%9 = getelementptr inbounds %struct.mntent, %struct.mntent* %3, i32 0, i32 3
store i8* %8, i8** %9
%10 = call i8* @strdupa(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%11 = getelementptr inbounds %struct.mntent, %struct.mntent* %3, i32 0, i32 2
store i8* %10, i8** %11
%12 = getelementptr inbounds %struct.mntent, %struct.mntent* %3, i32 0, i32 0
store i32 1, i32* %12
%13 = getelementptr inbounds %struct.mntent, %struct.mntent* %3, i32 0, i32 1
store i32 2, i32* %13
%14 = call i32 @hasmntopt(%struct.mntent* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%15 = icmp ne i32 %14, 0
%16 = xor i1 %15, true
%17 = xor i1 %16, true
%18 = zext i1 %17 to i32
%19 = icmp ne i32 %18, 1
br i1 %19, label %20, label %22
20: ; preds = %0
%21 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
store i32 1, i32* %2
br label %22
22: ; preds = %20, %0
%23 = call i32 @hasmntopt(%struct.mntent* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%24 = icmp ne i32 %23, 0
%25 = xor i1 %24, true
%26 = xor i1 %25, true
%27 = zext i1 %26 to i32
%28 = icmp ne i32 %27, 1
br i1 %28, label %29, label %31
29: ; preds = %22
%30 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
store i32 1, i32* %2
br label %31
31: ; preds = %29, %22
%32 = call i32 @hasmntopt(%struct.mntent* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%33 = icmp ne i32 %32, 0
%34 = xor i1 %33, true
%35 = xor i1 %34, true
%36 = zext i1 %35 to i32
%37 = icmp ne i32 %36, 1
br i1 %37, label %38, label %40
38: ; preds = %31
%39 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
store i32 1, i32* %2
br label %40
40: ; preds = %38, %31
%41 = call i32 @hasmntopt(%struct.mntent* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%42 = icmp ne i32 %41, 0
%43 = xor i1 %42, true
%44 = xor i1 %43, true
%45 = zext i1 %44 to i32
%46 = icmp ne i32 %45, 1
br i1 %46, label %47, label %49
47: ; preds = %40
%48 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
store i32 1, i32* %2
br label %49
49: ; preds = %47, %40
%50 = call i32 @hasmntopt(%struct.mntent* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%51 = icmp ne i32 %50, 0
%52 = xor i1 %51, true
%53 = xor i1 %52, true
%54 = zext i1 %53 to i32
%55 = icmp ne i32 %54, 1
br i1 %55, label %56, label %58
56: ; preds = %49
%57 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
store i32 1, i32* %2
br label %58
58: ; preds = %56, %49
%59 = call i32 @hasmntopt(%struct.mntent* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
%60 = icmp ne i32 %59, 0
%61 = xor i1 %60, true
%62 = xor i1 %61, true
%63 = zext i1 %62 to i32
%64 = icmp ne i32 %63, 1
br i1 %64, label %65, label %67
65: ; preds = %58
%66 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
store i32 1, i32* %2
br label %67
67: ; preds = %65, %58
%68 = call i32 @hasmntopt(%struct.mntent* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
%69 = icmp ne i32 %68, 0
%70 = xor i1 %69, true
%71 = xor i1 %70, true
%72 = zext i1 %71 to i32
%73 = icmp ne i32 %72, 0
br i1 %73, label %74, label %76
74: ; preds = %67
%75 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i64 0, i64 0))
store i32 1, i32* %2
br label %76
76: ; preds = %74, %67
%77 = call i32 @hasmntopt(%struct.mntent* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0))
%78 = icmp ne i32 %77, 0
%79 = xor i1 %78, true
%80 = xor i1 %79, true
%81 = zext i1 %80 to i32
%82 = icmp ne i32 %81, 0
br i1 %82, label %83, label %85
83: ; preds = %76
%84 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i64 0, i64 0))
store i32 1, i32* %2
br label %85
85: ; preds = %83, %76
%86 = call i32 @hasmntopt(%struct.mntent* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
%87 = icmp ne i32 %86, 0
%88 = xor i1 %87, true
%89 = xor i1 %88, true
%90 = zext i1 %89 to i32
%91 = icmp ne i32 %90, 0
br i1 %91, label %92, label %94
92: ; preds = %85
%93 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i64 0, i64 0))
store i32 1, i32* %2
br label %94
94: ; preds = %92, %85
%95 = call i32 @hasmntopt(%struct.mntent* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%96 = icmp ne i32 %95, 0
%97 = xor i1 %96, true
%98 = xor i1 %97, true
%99 = zext i1 %98 to i32
%100 = icmp ne i32 %99, 0
br i1 %100, label %101, label %103
101: ; preds = %94
%102 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i64 0, i64 0))
store i32 1, i32* %2
br label %103
103: ; preds = %101, %94
%104 = call i32 @hasmntopt(%struct.mntent* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0))
%105 = icmp ne i32 %104, 0
%106 = xor i1 %105, true
%107 = xor i1 %106, true
%108 = zext i1 %107 to i32
%109 = icmp ne i32 %108, 0
br i1 %109, label %110, label %112
110: ; preds = %103
%111 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i64 0, i64 0))
store i32 1, i32* %2
br label %112
112: ; preds = %110, %103
%113 = call i32 @hasmntopt(%struct.mntent* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0))
%114 = icmp ne i32 %113, 0
%115 = xor i1 %114, true
%116 = xor i1 %115, true
%117 = zext i1 %116 to i32
%118 = icmp ne i32 %117, 0
br i1 %118, label %119, label %121
119: ; preds = %112
%120 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i64 0, i64 0))
store i32 1, i32* %2
br label %121
121: ; preds = %119, %112
%122 = call i32 @hasmntopt(%struct.mntent* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0))
%123 = icmp ne i32 %122, 0
%124 = xor i1 %123, true
%125 = xor i1 %124, true
%126 = zext i1 %125 to i32
%127 = icmp ne i32 %126, 0
br i1 %127, label %128, label %130
128: ; preds = %121
%129 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i64 0, i64 0))
store i32 1, i32* %2
br label %130
130: ; preds = %128, %121
%131 = load i32, i32* %2
ret i32 %131
}

LLVM IR (-O2):
%struct.mntent = type { i32, i32, i8*, i8*, i8*, i8* }
@.str = [10 x i8] c"/dev/sdf6\00"
@.str.1 = [10 x i8] c"/some dir\00"
@.str.2 = [5 x i8] c"ext3\00"
@.str.3 = [30 x i8] c"opt1,opt2,noopt=6,rw,norw,brw\00"
@.str.4 = [5 x i8] c"opt1\00"
@.str.5 = [23 x i8] c"Option %s was %sfound\0A\00"
@.str.6 = [5 x i8] c"not \00"
@.str.7 = [5 x i8] c"opt2\00"
@.str.8 = [6 x i8] c"noopt\00"
@.str.9 = [3 x i8] c"rw\00"
@.str.10 = [5 x i8] c"norw\00"
@.str.11 = [4 x i8] c"brw\00"
@.str.12 = [4 x i8] c"opt\00"
@.str.13 = [1 x i8] zeroinitializer
@.str.14 = [5 x i8] c"oopt\00"
@.str.15 = [2 x i8] c"w\00"
@.str.16 = [2 x i8] c"r\00"
@.str.17 = [3 x i8] c"br\00"
@.str.18 = [4 x i8] c"nor\00"
@.str.19 = [3 x i8] c"or\00"
define i32 @main() {
%1 = alloca %struct.mntent
%2 = bitcast %struct.mntent* %1 to i8*
%3 = tail call i8* @strdupa(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds %struct.mntent, %struct.mntent* %1, i64 0, i32 5
store i8* %3, i8** %4
%5 = tail call i8* @strdupa(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%6 = getelementptr inbounds %struct.mntent, %struct.mntent* %1, i64 0, i32 4
store i8* %5, i8** %6
%7 = tail call i8* @strdupa(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%8 = getelementptr inbounds %struct.mntent, %struct.mntent* %1, i64 0, i32 3
store i8* %7, i8** %8
%9 = tail call i8* @strdupa(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%10 = getelementptr inbounds %struct.mntent, %struct.mntent* %1, i64 0, i32 2
store i8* %9, i8** %10
%11 = getelementptr inbounds %struct.mntent, %struct.mntent* %1, i64 0, i32 0
store i32 1, i32* %11
%12 = getelementptr inbounds %struct.mntent, %struct.mntent* %1, i64 0, i32 1
store i32 2, i32* %12
%13 = call i32 @hasmntopt(%struct.mntent* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %0
%16 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %17
17: ; preds = %15, %0
%18 = phi i32 [ 1, %15 ], [ 0, %0 ]
%19 = call i32 @hasmntopt(%struct.mntent* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %23
23: ; preds = %21, %17
%24 = phi i32 [ 1, %21 ], [ %18, %17 ]
%25 = call i32 @hasmntopt(%struct.mntent* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %23
%28 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %29
29: ; preds = %27, %23
%30 = phi i32 [ 1, %27 ], [ %24, %23 ]
%31 = call i32 @hasmntopt(%struct.mntent* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %29
%34 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %35
35: ; preds = %33, %29
%36 = phi i32 [ 1, %33 ], [ %30, %29 ]
%37 = call i32 @hasmntopt(%struct.mntent* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %35
%40 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %41
41: ; preds = %39, %35
%42 = phi i32 [ 1, %39 ], [ %36, %35 ]
%43 = call i32 @hasmntopt(%struct.mntent* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
%44 = icmp eq i32 %43, 0
br i1 %44, label %45, label %47
45: ; preds = %41
%46 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %47
47: ; preds = %45, %41
%48 = phi i32 [ 1, %45 ], [ %42, %41 ]
%49 = call i32 @hasmntopt(%struct.mntent* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
%50 = icmp eq i32 %49, 0
br i1 %50, label %53, label %51
51: ; preds = %47
%52 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i64 0, i64 0))
br label %53
53: ; preds = %51, %47
%54 = phi i32 [ 1, %51 ], [ %48, %47 ]
%55 = call i32 @hasmntopt(%struct.mntent* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0))
%56 = icmp eq i32 %55, 0
br i1 %56, label %59, label %57
57: ; preds = %53
%58 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i64 0, i64 0))
br label %59
59: ; preds = %57, %53
%60 = phi i32 [ 1, %57 ], [ %54, %53 ]
%61 = call i32 @hasmntopt(%struct.mntent* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
%62 = icmp eq i32 %61, 0
br i1 %62, label %65, label %63
63: ; preds = %59
%64 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i64 0, i64 0))
br label %65
65: ; preds = %63, %59
%66 = phi i32 [ 1, %63 ], [ %60, %59 ]
%67 = call i32 @hasmntopt(%struct.mntent* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%68 = icmp eq i32 %67, 0
br i1 %68, label %71, label %69
69: ; preds = %65
%70 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i64 0, i64 0))
br label %71
71: ; preds = %69, %65
%72 = phi i32 [ 1, %69 ], [ %66, %65 ]
%73 = call i32 @hasmntopt(%struct.mntent* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0))
%74 = icmp eq i32 %73, 0
br i1 %74, label %77, label %75
75: ; preds = %71
%76 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i64 0, i64 0))
br label %77
77: ; preds = %75, %71
%78 = phi i32 [ 1, %75 ], [ %72, %71 ]
%79 = call i32 @hasmntopt(%struct.mntent* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0))
%80 = icmp eq i32 %79, 0
br i1 %80, label %83, label %81
81: ; preds = %77
%82 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i64 0, i64 0))
br label %83
83: ; preds = %81, %77
%84 = phi i32 [ 1, %81 ], [ %78, %77 ]
%85 = call i32 @hasmntopt(%struct.mntent* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0))
%86 = icmp eq i32 %85, 0
br i1 %86, label %89, label %87
87: ; preds = %83
%88 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.13, i64 0, i64 0))
br label %89
89: ; preds = %87, %83
%90 = phi i32 [ 1, %87 ], [ %84, %83 ]
ret i32 %90
}