#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 dump_stat(char *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  if (argc < 2) {
    fputs("missing argument\n", stderr);
    return 1;
  }
  int final_rc = 0;
  for (int i = 1; i < argc; i++) {
    final_rc |= dump_stat(argv[i]);
    if (i < argc - 1)
      puts("");
  }
  return final_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)
cmpl   $0x2,-0x8(%rbp)
jge    1171 <main+0x41>
mov    0x2e89(%rip),%rax
mov    (%rax),%esi
lea    0xea0(%rip),%rdi
call   1050 <fputs@plt>
movl   $0x1,-0x4(%rbp)
jmp    11d8 <main+0xa8>
movl   $0x0,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11d2 <main+0xa2>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <dump_stat@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    11bf <main+0x8f>
lea    0xe57(%rip),%rdi
call   1040 <puts@plt>
jmp    11c4 <main+0x94>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    117f <main+0x4f>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%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
cmp    $0x2,%edi
jge    116b <main+0x3b>
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
lea    0xeb0(%rip),%rdi
call   1050 <fputs@plt>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rsi,%r14
lea    -0x1(%rdi),%r15d
mov    %edi,%r12d
xor    %ebp,%ebp
mov    $0x1,%ebx
jmp    118c <main+0x5c>
xchg   %ax,%ax
or     %r13d,%ebp
add    $0x1,%rbx
cmp    %rbx,%r12
je     115a <main+0x2a>
mov    (%r14,%rbx,8),%rdi
call   1030 <dump_stat@plt>
mov    %eax,%r13d
cmp    %r15,%rbx
jae    1180 <main+0x50>
mov    $0xa,%edi
call   1040 <putchar@plt>
jmp    1180 <main+0x50>

LLVM IR (-O0):
@.str = [18 x i8] c"missing argument\0A\00"
@stderr = global i32 0
@.str.1 = [1 x i8] zeroinitializer
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 = icmp slt i32 %8, 2
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = call i32 @fputs(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %11)
store i32 1, i32* %3
br label %39
13: ; preds = %2
store i32 0, i32* %6
store i32 1, i32* %7
br label %14
14: ; preds = %34, %13
%15 = load i32, i32* %7
%16 = load i32, i32* %4
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %37
18: ; preds = %14
%19 = load i8**, i8*** %5
%20 = load i32, i32* %7
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8*, i8** %19, i64 %21
%23 = load i8*, i8** %22
%24 = call i32 @dump_stat(i8* %23)
%25 = load i32, i32* %6
%26 = or i32 %25, %24
store i32 %26, i32* %6
%27 = load i32, i32* %7
%28 = load i32, i32* %4
%29 = sub nsw i32 %28, 1
%30 = icmp slt i32 %27, %29
br i1 %30, label %31, label %33
31: ; preds = %18
%32 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %33
33: ; preds = %31, %18
br label %34
34: ; preds = %33
%35 = load i32, i32* %7
%36 = add nsw i32 %35, 1
store i32 %36, i32* %7
br label %14
37: ; preds = %14
%38 = load i32, i32* %6
store i32 %38, i32* %3
br label %39
39: ; preds = %37, %10
%40 = load i32, i32* %3
ret i32 %40
}

LLVM IR (-O2):
@.str = [18 x i8] c"missing argument\0A\00"
@stderr = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = add nsw i32 %0, -1
%6 = zext i32 %5 to i64
%7 = zext i32 %0 to i64
br label %11
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = tail call i32 @fputs(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %24
11: ; preds = %4, %21
%12 = phi i64 [ 1, %4 ], [ %22, %21 ]
%13 = phi i32 [ 0, %4 ], [ %17, %21 ]
%14 = getelementptr inbounds i8*, i8** %1, i64 %12
%15 = load i8*, i8** %14
%16 = tail call i32 @dump_stat(i8* %15)
%17 = or i32 %16, %13
%18 = icmp ult i64 %12, %6
br i1 %18, label %19, label %21
19: ; preds = %11
%20 = tail call i32 @putchar(i32 10)
br label %21
21: ; preds = %11, %19
%22 = add nuw nsw i64 %12, 1
%23 = icmp eq i64 %22, %7
br i1 %23, label %24, label %11
24: ; preds = %21, %8
%25 = phi i32 [ 1, %8 ], [ %17, %21 ]
ret i32 %25
}