#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 XorrisO {
  int dummy;
};

/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int Xorriso_cdrskin_uses_stdout(struct XorrisO *xorriso, int argc, char **argv,
                                int flag) {
  int i;
  for (i = 0; i < argc; i++) {
    if (strcmp(argv[i], "dev=-") == 0 ||
        strcmp(argv[i], "dev=stdio:/dev/fd/1") == 0 ||
        strcmp(argv[i], "-dev=-") == 0 ||
        strcmp(argv[i], "-dev=stdio:/dev/fd/1") == 0)
      return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<Xorriso_cdrskin_uses_stdout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11e0 <Xorriso_cdrskin_uses_stdout+0xd0>
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xeb5(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     11c1 <Xorriso_cdrskin_uses_stdout+0xb1>
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe9a(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     11c1 <Xorriso_cdrskin_uses_stdout+0xb1>
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe70(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     11c1 <Xorriso_cdrskin_uses_stdout+0xb1>
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe55(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11cd <Xorriso_cdrskin_uses_stdout+0xbd>
movl   $0x1,-0x4(%rbp)
jmp    11e7 <Xorriso_cdrskin_uses_stdout+0xd7>
jmp    11d2 <Xorriso_cdrskin_uses_stdout+0xc2>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    112d <Xorriso_cdrskin_uses_stdout+0x1d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Xorriso_cdrskin_uses_stdout>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1195 <Xorriso_cdrskin_uses_stdout+0x85>
mov    %rdx,%rbx
mov    %esi,%r13d
xor    %r12d,%r12d
lea    0xed2(%rip),%r14
lea    0xed2(%rip),%r15
mov    $0x1,%ebp
nopl   0x0(%rax,%rax,1)
mov    (%rbx,%r12,8),%rdi
mov    %r14,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1197 <Xorriso_cdrskin_uses_stdout+0x87>
mov    (%rbx,%r12,8),%rdi
mov    %r15,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1197 <Xorriso_cdrskin_uses_stdout+0x87>
mov    (%rbx,%r12,8),%rdi
lea    0xe93(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1197 <Xorriso_cdrskin_uses_stdout+0x87>
mov    (%rbx,%r12,8),%rdi
lea    0xe85(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1197 <Xorriso_cdrskin_uses_stdout+0x87>
add    $0x1,%r12
cmp    %r12,%r13
jne    1140 <Xorriso_cdrskin_uses_stdout+0x30>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.XorrisO = type { i32 }
@.str = [6 x i8] c"dev=-\00"
@.str.1 = [20 x i8] c"dev=stdio:/dev/fd/1\00"
@.str.2 = [7 x i8] c"-dev=-\00"
@.str.3 = [21 x i8] c"-dev=stdio:/dev/fd/1\00"
define i32 @Xorriso_cdrskin_uses_stdout(%struct.XorrisO* %0, i32 %1, i8** %2, i32 %3) {
%5 = alloca i32
%6 = alloca %struct.XorrisO*
%7 = alloca i32
%8 = alloca i8**
%9 = alloca i32
%10 = alloca i32
store %struct.XorrisO* %0, %struct.XorrisO** %6
store i32 %1, i32* %7
store i8** %2, i8*** %8
store i32 %3, i32* %9
store i32 0, i32* %10
br label %11
11: ; preds = %49, %4
%12 = load i32, i32* %10
%13 = load i32, i32* %7
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %52
15: ; preds = %11
%16 = load i8**, i8*** %8
%17 = load i32, i32* %10
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8*, i8** %16, i64 %18
%20 = load i8*, i8** %19
%21 = call i64 @strcmp(i8* %20, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %47, label %23
23: ; preds = %15
%24 = load i8**, i8*** %8
%25 = load i32, i32* %10
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8*, i8** %24, i64 %26
%28 = load i8*, i8** %27
%29 = call i64 @strcmp(i8* %28, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %47, label %31
31: ; preds = %23
%32 = load i8**, i8*** %8
%33 = load i32, i32* %10
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i8*, i8** %32, i64 %34
%36 = load i8*, i8** %35
%37 = call i64 @strcmp(i8* %36, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %47, label %39
39: ; preds = %31
%40 = load i8**, i8*** %8
%41 = load i32, i32* %10
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds i8*, i8** %40, i64 %42
%44 = load i8*, i8** %43
%45 = call i64 @strcmp(i8* %44, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%46 = icmp eq i64 %45, 0
br i1 %46, label %47, label %48
47: ; preds = %39, %31, %23, %15
store i32 1, i32* %5
br label %53
48: ; preds = %39
br label %49
49: ; preds = %48
%50 = load i32, i32* %10
%51 = add nsw i32 %50, 1
store i32 %51, i32* %10
br label %11
52: ; preds = %11
store i32 0, i32* %5
br label %53
53: ; preds = %52, %47
%54 = load i32, i32* %5
ret i32 %54
}

LLVM IR (-O2):
%struct.XorrisO = type { i32 }
@.str = [6 x i8] c"dev=-\00"
@.str.1 = [20 x i8] c"dev=stdio:/dev/fd/1\00"
@.str.2 = [7 x i8] c"-dev=-\00"
@.str.3 = [21 x i8] c"-dev=stdio:/dev/fd/1\00"
define i32 @Xorriso_cdrskin_uses_stdout(%struct.XorrisO* nocapture readnone %0, i32 %1, i8** nocapture %2, i32 %3) {
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %29
6: ; preds = %4
%7 = zext i32 %1 to i64
br label %10
8: ; preds = %24
%9 = icmp eq i64 %28, %7
br i1 %9, label %29, label %10
10: ; preds = %6, %8
%11 = phi i64 [ 0, %6 ], [ %28, %8 ]
%12 = getelementptr inbounds i8*, i8** %2, i64 %11
%13 = load i8*, i8** %12
%14 = tail call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %29, label %16
16: ; preds = %10
%17 = load i8*, i8** %12
%18 = tail call i64 @strcmp(i8* %17, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %29, label %20
20: ; preds = %16
%21 = load i8*, i8** %12
%22 = tail call i64 @strcmp(i8* %21, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %29, label %24
24: ; preds = %20
%25 = load i8*, i8** %12
%26 = tail call i64 @strcmp(i8* %25, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
%28 = add nuw nsw i64 %11, 1
br i1 %27, label %29, label %8
29: ; preds = %24, %20, %16, %10, %8, %4
%30 = phi i32 [ 0, %4 ], [ 0, %8 ], [ 1, %10 ], [ 1, %16 ], [ 1, %20 ], [ 1, %24 ]
ret i32 %30
}