#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*/ direct_mode(char *);
int /*<<< orphan*/ direct_mode2(char *);
int /*<<< orphan*/ interactive();
scalar_t__ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  int c = 0;
  for (c = 1; c < argc; c++) {
    if ((strcmp(argv[c], "-l") == 0) && (argc > c + 1)) {
      direct_mode(argv[c + 1]);
    }
    if ((strcmp(argv[c], "-n") == 0) && (argc > c + 1)) {
      direct_mode2(argv[c + 1]);
    }
  }
  interactive();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1215 <main+0xd5>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe7d(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11b9 <main+0x79>
mov    -0x8(%rbp),%eax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jle    11b9 <main+0x79>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <direct_mode@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe37(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1202 <main+0xc2>
mov    -0x8(%rbp),%eax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jle    1202 <main+0xc2>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <direct_mode2@plt>
jmp    1207 <main+0xc7>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1164 <main+0x24>
mov    $0x0,%al
call   1040 <interactive@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jl     11e2 <main+0xa2>
mov    %rsi,%rbx
mov    %edi,%r12d
mov    $0x1,%r13d
sub    %r12,%r13
mov    $0x2,%ebp
lea    0xe91(%rip),%r14
lea    0xe8d(%rip),%r15
jmp    1195 <main+0x55>
nopl   0x0(%rax,%rax,1)
lea    0x1(,%rbp,1),%rax
add    %r13,%rax
add    $0x1,%rbp
cmp    $0x2,%rax
je     11e2 <main+0xa2>
mov    -0x8(%rbx,%rbp,8),%rdi
mov    %r14,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
jne    11c0 <main+0x80>
cmp    %r12,%rbp
jae    11c0 <main+0x80>
mov    (%rbx,%rbp,8),%rdi
call   1050 <direct_mode@plt>
cs nopw 0x0(%rax,%rax,1)
nop
mov    -0x8(%rbx,%rbp,8),%rdi
mov    %r15,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
jne    1180 <main+0x40>
cmp    %r12,%rbp
jae    1180 <main+0x40>
mov    (%rbx,%rbp,8),%rdi
call   1060 <direct_mode2@plt>
jmp    1180 <main+0x40>
xor    %eax,%eax
call   1040 <interactive@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"-l\00"
@.str.1 = [3 x i8] c"-n\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %33
4: ; preds = %2
%5 = zext i32 %0 to i64
%6 = zext i32 %0 to i64
br label %7
7: ; preds = %4, %31
%8 = phi i64 [ 1, %4 ], [ %24, %31 ]
%9 = getelementptr inbounds i8*, i8** %1, i64 %8
%10 = load i8*, i8** %9
%11 = tail call i64 @strcmp(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %20
13: ; preds = %7
%14 = add nuw nsw i64 %8, 1
%15 = icmp ult i64 %14, %5
br i1 %15, label %16, label %20
16: ; preds = %13
%17 = getelementptr inbounds i8*, i8** %1, i64 %14
%18 = load i8*, i8** %17
%19 = tail call i32 @direct_mode(i8* %18)
br label %20
20: ; preds = %16, %13, %7
%21 = load i8*, i8** %9
%22 = tail call i64 @strcmp(i8* %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
%24 = add nuw nsw i64 %8, 1
%25 = icmp ult i64 %24, %5
%26 = select i1 %23, i1 %25, i1 false
br i1 %26, label %27, label %31
27: ; preds = %20
%28 = getelementptr inbounds i8*, i8** %1, i64 %24
%29 = load i8*, i8** %28
%30 = tail call i32 @direct_mode2(i8* %29)
br label %31
31: ; preds = %20, %27
%32 = icmp eq i64 %24, %6
br i1 %32, label %33, label %7
33: ; preds = %31, %2
%34 = tail call i32 (...) @interactive()
ret i32 0
}