#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 *);
scalar_t__ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  printf("Argumentos:\n");
  if (argc == 0) {
    printf("    ninguno\n");
  } else {
    int argumento_k = 0, argumento_l = 0, argumento_n = 0, i = 0;
    for (i = 0; i < argc; i++) {
      if (strcmp(argv[i], "-k") == 0)
        argumento_k = 1;
      if (strcmp(argv[i], "-l") == 0)
        argumento_l = 1;
      if (strcmp(argv[i], "-n") == 0)
        argumento_n = 1;
    }
    if (argumento_k) {
      printf("    -k\n");
    }
    if (argumento_l) {
      printf("    -l\n");
    }
    if (argumento_n) {
      printf("    -n\n");
    }
  }
  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)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    115d <main+0x3d>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
jmp    1261 <main+0x141>
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    121a <main+0xfa>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe7b(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11b5 <main+0x95>
movl   $0x1,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe55(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11de <main+0xbe>
movl   $0x1,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe2f(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1207 <main+0xe7>
movl   $0x1,-0x1c(%rbp)
jmp    120c <main+0xec>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1180 <main+0x60>
cmpl   $0x0,-0x14(%rbp)
je     1230 <main+0x110>
lea    0xdf8(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x18(%rbp)
je     1246 <main+0x126>
lea    0xdea(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x1c(%rbp)
je     125c <main+0x13c>
lea    0xddc(%rip),%rdi
call   1030 <printf@plt>
jmp    1261 <main+0x141>
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
mov    %rsi,%r13
mov    %edi,%ebp
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
test   %ebp,%ebp
je     11e0 <main+0xc0>
jle    11ec <main+0xcc>
mov    %ebp,%eax
mov    %rax,(%rsp)
xor    %r15d,%r15d
mov    $0x1,%r12d
xor    %ebp,%ebp
xor    %ebx,%ebx
xor    %r14d,%r14d
mov    0x0(%r13,%r15,8),%rdi
lea    0xeb2(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
cmove  %r12d,%r14d
mov    0x0(%r13,%r15,8),%rdi
lea    0xe93(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
cmove  %r12d,%ebx
mov    0x0(%r13,%r15,8),%rdi
lea    0xe74(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
cmove  %r12d,%ebp
add    $0x1,%r15
cmp    %r15,(%rsp)
jne    1160 <main+0x40>
test   %r14d,%r14d
je     11c3 <main+0xa3>
lea    0xe5c(%rip),%rdi
call   1030 <puts@plt>
test   %ebx,%ebx
je     11d3 <main+0xb3>
lea    0xe45(%rip),%rdi
call   1030 <puts@plt>
test   %ebp,%ebp
je     11ec <main+0xcc>
lea    0xe2e(%rip),%rdi
jmp    11e7 <main+0xc7>
lea    0xe3a(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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