#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*/ enumerate(char *);
int getopt(int, char **, char *);
int /*<<< orphan*/ usage(char **);
int main(int argc, char **argv) {
  extern int optind;
  int i;
  while ((i = getopt(argc, argv, "")) != -1) {
    usage(argv);
  }
  if (optind >= argc) {
    usage(argv);
  }
  for (i = optind; i < argc; i++) {
    enumerate(argv[i]);
  }
  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)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xeac(%rip),%rdx
call   1050 <getopt@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
je     1173 <main+0x43>
mov    -0x10(%rbp),%rdi
call   1040 <usage@plt>
jmp    1146 <main+0x16>
mov    0x2e66(%rip),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jl     118e <main+0x5e>
mov    -0x10(%rbp),%rdi
call   1040 <usage@plt>
mov    0x2e4b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11c5 <main+0x95>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <enumerate@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    119a <main+0x6a>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %edi,%r14d
lea    0xebe(%rip),%rdx
call   1050 <getopt@plt>
cmp    $0xffffffff,%eax
je     117b <main+0x4b>
lea    0xead(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
call   1040 <usage@plt>
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1050 <getopt@plt>
cmp    $0xffffffff,%eax
jne    1160 <main+0x30>
mov    0x2e5e(%rip),%r15
mov    (%r15),%eax
cmp    %r14d,%eax
jl     1195 <main+0x65>
mov    %rbx,%rdi
call   1040 <usage@plt>
mov    (%r15),%eax
cmp    %r14d,%eax
jge    11c2 <main+0x92>
movslq %eax,%rcx
lea    (%rbx,%rcx,8),%r15
sub    %eax,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rdi
call   1030 <enumerate@plt>
add    $0x1,%rbx
cmp    %ebx,%r14d
jne    11b0 <main+0x80>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@optind = external global i32
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
br label %7
7: ; preds = %12, %2
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i32 @getopt(i32 %8, i8** %9, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store i32 %10, i32* %6
%11 = icmp ne i32 %10, -1
br i1 %11, label %12, label %15
12: ; preds = %7
%13 = load i8**, i8*** %5
%14 = call i32 @usage(i8** %13)
br label %7
15: ; preds = %7
%16 = load i32, i32* @optind
%17 = load i32, i32* %4
%18 = icmp sge i32 %16, %17
br i1 %18, label %19, label %22
19: ; preds = %15
%20 = load i8**, i8*** %5
%21 = call i32 @usage(i8** %20)
br label %22
22: ; preds = %19, %15
%23 = load i32, i32* @optind
store i32 %23, i32* %6
br label %24
24: ; preds = %35, %22
%25 = load i32, i32* %6
%26 = load i32, i32* %4
%27 = icmp slt i32 %25, %26
br i1 %27, label %28, label %38
28: ; preds = %24
%29 = load i8**, i8*** %5
%30 = load i32, i32* %6
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8*, i8** %29, i64 %31
%33 = load i8*, i8** %32
%34 = call i32 @enumerate(i8* %33)
br label %35
35: ; preds = %28
%36 = load i32, i32* %6
%37 = add nsw i32 %36, 1
store i32 %37, i32* %6
br label %24
38: ; preds = %24
ret i32 0
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@optind = external global i32
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, -1
br i1 %4, label %9, label %5
5: ; preds = %2, %5
%6 = tail call i32 @usage(i8** %1)
%7 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %5
9: ; preds = %5, %2
%10 = load i32, i32* @optind
%11 = icmp slt i32 %10, %0
br i1 %11, label %15, label %12
12: ; preds = %9
%13 = tail call i32 @usage(i8** %1)
%14 = load i32, i32* @optind
br label %15
15: ; preds = %12, %9
%16 = phi i32 [ %14, %12 ], [ %10, %9 ]
%17 = icmp slt i32 %16, %0
br i1 %17, label %18, label %28
18: ; preds = %15
%19 = sext i32 %16 to i64
br label %20
20: ; preds = %18, %20
%21 = phi i64 [ %19, %18 ], [ %25, %20 ]
%22 = getelementptr inbounds i8*, i8** %1, i64 %21
%23 = load i8*, i8** %22
%24 = tail call i32 @enumerate(i8* %23)
%25 = add nsw i64 %21, 1
%26 = trunc i64 %25 to i32
%27 = icmp eq i32 %26, %0
br i1 %27, label %28, label %20
28: ; preds = %20, %15
ret i32 0
}