#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*/ do_one_argument(char *);
int /*<<< orphan*/ parse_command_line(int, char **, int *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  int first_non_opt_arg;
  int argi;
  parse_command_line(argc, argv, &first_non_opt_arg);
  if (first_non_opt_arg == argc)
    do_one_argument(".");
  else
    for (argi = first_non_opt_arg; argi < argc; argi++) {
      do_one_argument(argv[argi]);
      if (argi < argc - 1)
        printf("\n");
    }
  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
lea    -0x14(%rbp),%rdx
call   1040 <parse_command_line@plt>
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1173 <main+0x43>
lea    0xe97(%rip),%rdi
call   1050 <do_one_argument@plt>
jmp    11cb <main+0x9b>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11c6 <main+0x96>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <do_one_argument@plt>
mov    -0x18(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    11b3 <main+0x83>
lea    0xe54(%rip),%rdi
call   1030 <printf@plt>
jmp    11b8 <main+0x88>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1179 <main+0x49>
jmp    11cb <main+0x9b>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %edi,%r15d
lea    0x4(%rsp),%rdx
call   1040 <parse_command_line@plt>
movslq 0x4(%rsp),%rbx
cmp    %r15d,%ebx
jne    1160 <main+0x30>
lea    0xea7(%rip),%rdi
call   1050 <do_one_argument@plt>
jmp    11a4 <main+0x74>
cmp    %r15d,%ebx
jge    11a4 <main+0x74>
lea    -0x1(%r15),%eax
movslq %eax,%r12
sub    %ebx,%r15d
jmp    118a <main+0x5a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
add    $0xffffffff,%r15d
je     11a4 <main+0x74>
mov    (%r14,%rbx,8),%rdi
call   1050 <do_one_argument@plt>
cmp    %r12,%rbx
jge    1180 <main+0x50>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1180 <main+0x50>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @parse_command_line(i32 %0, i8** %1, i32* %3)
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, %0
br i1 %7, label %14, label %8
8: ; preds = %2
%9 = icmp slt i32 %6, %0
br i1 %9, label %10, label %28
10: ; preds = %8
%11 = add nsw i32 %0, -1
%12 = sext i32 %6 to i64
%13 = sext i32 %11 to i64
br label %16
14: ; preds = %2
%15 = call i32 @do_one_argument(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %28
16: ; preds = %10, %24
%17 = phi i64 [ %12, %10 ], [ %25, %24 ]
%18 = getelementptr inbounds i8*, i8** %1, i64 %17
%19 = load i8*, i8** %18
%20 = call i32 @do_one_argument(i8* %19)
%21 = icmp slt i64 %17, %13
br i1 %21, label %22, label %24
22: ; preds = %16
%23 = call i32 @putchar(i32 10)
br label %24
24: ; preds = %16, %22
%25 = add nsw i64 %17, 1
%26 = trunc i64 %25 to i32
%27 = icmp eq i32 %26, %0
br i1 %27, label %28, label %16
28: ; preds = %24, %8, %14
ret i32 0
}