#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 *);
int statFile(char *);
int main(int argc, char **argv) {
  int i;
  int rc = 0;
  for (i = 1; i < argc; i++) {
    rc |= statFile(argv[i]);
    if ((argc - i) > 1)
      printf("\n");
  }
  return rc;
}


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,-0x18(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1195 <main+0x75>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <statFile@plt>
or     -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x14(%rbp),%eax
cmp    $0x1,%eax
jle    1182 <main+0x62>
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
jmp    1187 <main+0x67>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1144 <main+0x24>
mov    -0x18(%rbp),%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
xor    %r13d,%r13d
cmp    $0x2,%edi
jl     117c <main+0x5c>
mov    %rsi,%r14
mov    %edi,%ebp
mov    %edi,%r12d
add    $0xffffffff,%ebp
xor    %r13d,%r13d
mov    $0x1,%ebx
jmp    115f <main+0x3f>
nopl   0x0(%rax,%rax,1)
or     %r15d,%r13d
add    $0x1,%rbx
add    $0xffffffff,%ebp
cmp    %rbx,%r12
je     117c <main+0x5c>
mov    (%r14,%rbx,8),%rdi
call   1040 <statFile@plt>
mov    %eax,%r15d
cmp    $0x2,%ebp
jl     1150 <main+0x30>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1150 <main+0x30>
mov    %r13d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
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
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
store i32 1, i32* %6
br label %8
8: ; preds = %28, %2
%9 = load i32, i32* %6
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %31
12: ; preds = %8
%13 = load i8**, i8*** %5
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = call i32 @statFile(i8* %17)
%19 = load i32, i32* %7
%20 = or i32 %19, %18
store i32 %20, i32* %7
%21 = load i32, i32* %4
%22 = load i32, i32* %6
%23 = sub nsw i32 %21, %22
%24 = icmp sgt i32 %23, 1
br i1 %24, label %25, label %27
25: ; preds = %12
%26 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %27
27: ; preds = %25, %12
br label %28
28: ; preds = %27
%29 = load i32, i32* %6
%30 = add nsw i32 %29, 1
store i32 %30, i32* %6
br label %8
31: ; preds = %8
%32 = load i32, i32* %7
ret i32 %32
}

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