#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*/ ProcessFilename(char *);
int /*<<< orphan*/ ProcessFiles(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  int i;
  if (argc == 1)
    ProcessFiles(stdin, stdout);
  else {
    for (i = 1; i < argc; ++i)
      ProcessFilename(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)
cmpl   $0x1,-0x8(%rbp)
jne    115c <main+0x3c>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
mov    0x2e88(%rip),%rax
mov    (%rax),%esi
call   1030 <ProcessFiles@plt>
jmp    1193 <main+0x73>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    118e <main+0x6e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <ProcessFilename@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1163 <main+0x43>
jmp    1193 <main+0x73>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x1,%edi
jne    1143 <main+0x23>
mov    0x2eb7(%rip),%rax
mov    (%rax),%edi
mov    0x2e9e(%rip),%rax
mov    (%rax),%esi
call   1030 <ProcessFiles@plt>
jmp    1162 <main+0x42>
jle    1162 <main+0x42>
mov    %rsi,%r14
mov    %edi,%r15d
mov    $0x1,%ebx
mov    (%r14,%rbx,8),%rdi
call   1040 <ProcessFilename@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1150 <main+0x30>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdin = global i32 0
@stdout = global i32 0
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 = icmp eq i32 %7, 1
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i32, i32* @stdin
%11 = load i32, i32* @stdout
%12 = call i32 @ProcessFiles(i32 %10, i32 %11)
br label %29
13: ; preds = %2
store i32 1, i32* %6
br label %14
14: ; preds = %25, %13
%15 = load i32, i32* %6
%16 = load i32, i32* %4
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %28
18: ; preds = %14
%19 = load i8**, i8*** %5
%20 = load i32, i32* %6
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8*, i8** %19, i64 %21
%23 = load i8*, i8** %22
%24 = call i32 @ProcessFilename(i8* %23)
br label %25
25: ; preds = %18
%26 = load i32, i32* %6
%27 = add nsw i32 %26, 1
store i32 %27, i32* %6
br label %14
28: ; preds = %14
br label %29
29: ; preds = %28, %9
ret i32 0
}

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