#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*/ help(int, char const **);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ read_file(char const *);
int main(int argc, const char **argv) {
  int i;
  help(argc, argv);
  for (i = 1; i < argc; i++) {
    if (i > 1)
      printf("\n");
    read_file(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
call   1050 <help@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    119a <main+0x6a>
cmpl   $0x1,-0x14(%rbp)
jle    117b <main+0x4b>
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <read_file@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1159 <main+0x29>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %edi,%ebp
call   1050 <help@plt>
cmp    $0x2,%ebp
jl     117c <main+0x4c>
mov    0x8(%r14),%rdi
call   1040 <read_file@plt>
cmp    $0x2,%ebp
je     117c <main+0x4c>
mov    %ebp,%ebp
mov    $0x2,%ebx
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%r14,%rbx,8),%rdi
call   1040 <read_file@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1160 <main+0x30>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\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
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = call i32 @help(i32 %7, i8** %8)
store i32 1, i32* %6
br label %10
10: ; preds = %26, %2
%11 = load i32, i32* %6
%12 = load i32, i32* %4
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %29
14: ; preds = %10
%15 = load i32, i32* %6
%16 = icmp sgt i32 %15, 1
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %19
19: ; preds = %17, %14
%20 = load i8**, i8*** %5
%21 = load i32, i32* %6
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8*, i8** %20, i64 %22
%24 = load i8*, i8** %23
%25 = call i32 @read_file(i8* %24)
br label %26
26: ; preds = %19
%27 = load i32, i32* %6
%28 = add nsw i32 %27, 1
store i32 %28, i32* %6
br label %10
29: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @help(i32 %0, i8** %1)
%4 = icmp sgt i32 %0, 1
br i1 %4, label %5, label %19
5: ; preds = %2
%6 = zext i32 %0 to i64
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @read_file(i8* %8)
%10 = icmp eq i32 %0, 2
br i1 %10, label %19, label %11
11: ; preds = %5, %11
%12 = phi i64 [ %17, %11 ], [ 2, %5 ]
%13 = tail call i32 @putchar(i32 10)
%14 = getelementptr inbounds i8*, i8** %1, i64 %12
%15 = load i8*, i8** %14
%16 = tail call i32 @read_file(i8* %15)
%17 = add nuw nsw i64 %12, 1
%18 = icmp eq i64 %17, %6
br i1 %18, label %19, label %11
19: ; preds = %11, %5, %2
ret i32 0
}