#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 EXIT_FAILURE;
int EXIT_SUCCESS;
int process_file(char const *);
int process_options(int, char const **);
int main(int argc, const char **argv) {
  int optcnt = process_options(argc, argv);
  int rc = 0;
  while (optcnt < argc) {
    rc |= process_file(argv[optcnt++]);
  }
  return (rc == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}


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   1030 <process_options@plt>
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    117e <main+0x5e>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x14(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <process_file@plt>
or     -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    114c <main+0x2c>
cmpl   $0x0,-0x18(%rbp)
jne    1199 <main+0x79>
mov    0x2e49(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
jmp    11a5 <main+0x85>
mov    0x2e40(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %edi,%r15d
call   1030 <process_options@plt>
cmp    %r15d,%eax
jge    1171 <main+0x51>
movslq %eax,%rcx
lea    (%r14,%rcx,8),%r14
sub    %eax,%r15d
xor    %ebx,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14,%rbx,8),%rdi
call   1040 <process_file@plt>
or     %eax,%ebp
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1150 <main+0x30>
test   %ebp,%ebp
je     1171 <main+0x51>
mov    0x2e71(%rip),%rax
jmp    1178 <main+0x58>
mov    0x2e60(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

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