#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 /*<<< orphan*/ printf(char *, ...);
void mymain(int n, int e, int E, const char **strings, int nstrings) {
  int j;
  printf("option -n = %s\n", ((n) ? "YES" : "NO"));
  printf("option -e = %s\n", ((e) ? "YES" : "NO"));
  printf("option -E = %s\n", ((E) ? "YES" : "NO"));
  for (j = 0; j < nstrings; j++)
    printf("%s ", strings[j]);
  printf("\n");
}


x86 assembly (clang, -O0):
<mymain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xee1(%rip),%rsi
lea    0xed6(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%ecx
lea    0xebb(%rip),%rsi
lea    0xeb0(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%ecx
lea    0xe95(%rip),%rsi
lea    0xe8a(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    11d6 <mymain+0xc6>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11a2 <mymain+0x92>
lea    0xe58(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mymain>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8d,%r15d
mov    %rcx,%r13
mov    %edx,%r14d
mov    %esi,%r12d
test   %edi,%edi
lea    0xed4(%rip),%rbx
lea    0xec9(%rip),%rbp
mov    %rbp,%rsi
cmove  %rbx,%rsi
lea    0xeab(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   %r12d,%r12d
mov    %rbp,%rsi
cmove  %rbx,%rsi
lea    0xeaa(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   %r14d,%r14d
cmove  %rbx,%rbp
lea    0xea5(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
test   %r15d,%r15d
jle    11b8 <mymain+0x98>
mov    %r15d,%ebx
lea    0xe9c(%rip),%r14
xor    %ebp,%ebp
nopl   (%rax)
mov    0x0(%r13,%rbp,8),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    11a0 <mymain+0x80>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"option -n = %s\0A\00"
@.str.1 = [4 x i8] c"YES\00"
@.str.2 = [3 x i8] c"NO\00"
@.str.3 = [16 x i8] c"option -e = %s\0A\00"
@.str.4 = [16 x i8] c"option -E = %s\0A\00"
@.str.5 = [4 x i8] c"%s \00"
@.str.6 = [2 x i8] c"\0A\00"
define void @mymain(i32 %0, i32 %1, i32 %2, i8** %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8**
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8** %3, i8*** %9
store i32 %4, i32* %10
%12 = load i32, i32* %6
%13 = icmp ne i32 %12, 0
%14 = zext i1 %13 to i64
%15 = select i1 %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %15)
%17 = load i32, i32* %7
%18 = icmp ne i32 %17, 0
%19 = zext i1 %18 to i64
%20 = select i1 %18, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0)
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %20)
%22 = load i32, i32* %8
%23 = icmp ne i32 %22, 0
%24 = zext i1 %23 to i64
%25 = select i1 %23, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0)
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8* %25)
store i32 0, i32* %11
br label %27
27: ; preds = %38, %5
%28 = load i32, i32* %11
%29 = load i32, i32* %10
%30 = icmp slt i32 %28, %29
br i1 %30, label %31, label %41
31: ; preds = %27
%32 = load i8**, i8*** %9
%33 = load i32, i32* %11
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i8*, i8** %32, i64 %34
%36 = load i8*, i8** %35
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %36)
br label %38
38: ; preds = %31
%39 = load i32, i32* %11
%40 = add nsw i32 %39, 1
store i32 %40, i32* %11
br label %27
41: ; preds = %27
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"option -n = %s\0A\00"
@.str.1 = [4 x i8] c"YES\00"
@.str.2 = [3 x i8] c"NO\00"
@.str.3 = [16 x i8] c"option -e = %s\0A\00"
@.str.4 = [16 x i8] c"option -E = %s\0A\00"
@.str.5 = [4 x i8] c"%s \00"
define void @mymain(i32 %0, i32 %1, i32 %2, i8** nocapture %3, i32 %4) {
%6 = icmp eq i32 %0, 0
%7 = select i1 %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = icmp eq i32 %1, 0
%10 = select i1 %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %10)
%12 = icmp eq i32 %2, 0
%13 = select i1 %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8* %13)
%15 = icmp sgt i32 %4, 0
br i1 %15, label %16, label %25
16: ; preds = %5
%17 = zext i32 %4 to i64
br label %18
18: ; preds = %16, %18
%19 = phi i64 [ 0, %16 ], [ %23, %18 ]
%20 = getelementptr inbounds i8*, i8** %3, i64 %19
%21 = load i8*, i8** %20
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %21)
%23 = add nuw nsw i64 %19, 1
%24 = icmp eq i64 %23, %17
br i1 %24, label %25, label %18
25: ; preds = %18, %5
%26 = tail call i32 @putchar(i32 10)
ret void
}