#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 *, char *);
int main(int argc, char **argv) {
  int i = 1;
  if (argc <= 0 || argc > 8)
    return -1;
  while (i < argc)
    printf("%s ", 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)
movl   $0x1,-0x14(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1141 <main+0x31>
cmpl   $0x8,-0x8(%rbp)
jle    114d <main+0x3d>
movl   $0xffffffff,-0x4(%rbp)
jmp    118c <main+0x7c>
jmp    1152 <main+0x42>
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1185 <main+0x75>
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),%rsi
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
jmp    1152 <main+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
lea    -0x9(%rdi),%eax
mov    $0xffffffff,%r14d
cmp    $0xfffffff8,%eax
jb     1155 <main+0x45>
xor    %r14d,%r14d
cmp    $0x2,%edi
jb     1155 <main+0x45>
mov    %rsi,%r12
mov    %edi,%ebp
mov    $0x1,%ebx
lea    0xec1(%rip),%r15
nop
mov    (%r12,%rbx,8),%rsi
add    $0x1,%rbx
mov    %r15,%rdi
call   1030 <printf@plt>
cmp    %rbx,%rbp
jne    1140 <main+0x30>
mov    %r14d,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s \00"
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
store i32 1, i32* %6
%7 = load i32, i32* %4
%8 = icmp sle i32 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = load i32, i32* %4
%11 = icmp sgt i32 %10, 8
br i1 %11, label %12, label %13
12: ; preds = %9, %2
store i32 -1, i32* %3
br label %27
13: ; preds = %9
br label %14
14: ; preds = %18, %13
%15 = load i32, i32* %6
%16 = load i32, i32* %4
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %26
18: ; preds = %14
%19 = load i8**, i8*** %5
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %6
%22 = sext i32 %20 to i64
%23 = getelementptr inbounds i8*, i8** %19, i64 %22
%24 = load i8*, i8** %23
%25 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %24)
br label %14
26: ; preds = %14
store i32 0, i32* %3
br label %27
27: ; preds = %26, %12
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = add i32 %0, -9
%4 = icmp ult i32 %3, -8
br i1 %4, label %16, label %5
5: ; preds = %2
%6 = icmp ugt i32 %0, 1
br i1 %6, label %7, label %16
7: ; preds = %5
%8 = zext i32 %0 to i64
br label %9
9: ; preds = %7, %9
%10 = phi i64 [ 1, %7 ], [ %11, %9 ]
%11 = add nuw nsw i64 %10, 1
%12 = getelementptr inbounds i8*, i8** %1, i64 %10
%13 = load i8*, i8** %12
%14 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = icmp eq i64 %11, %8
br i1 %15, label %16, label %9
16: ; preds = %9, %5, %2
%17 = phi i32 [ -1, %2 ], [ 0, %5 ], [ 0, %9 ]
ret i32 %17
}