#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 *, char);
int main(int argc, char *argv[]) {
  int i;
  for (i = 1; i < argc; i++) {
    printf("%s%c", argv[i], i + 1 < argc ? ' ' : '\n');
  }
}


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)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    117a <main+0x6a>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x14(%rbp),%edx
add    $0x1,%edx
mov    -0x8(%rbp),%edi
mov    $0xa,%eax
mov    $0x20,%ecx
cmp    %edi,%edx
cmovl  %ecx,%eax
lea    0xe9c(%rip),%rdi
movsbl %al,%edx
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
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
jl     116a <main+0x5a>
mov    %rsi,%r15
mov    %edi,%r12d
mov    $0x1,%r13d
sub    %r12,%r13
mov    $0x2,%ebx
mov    $0x20,%ebp
lea    0xec0(%rip),%r14
mov    -0x8(%r15,%rbx,8),%rsi
cmp    %r12,%rbx
mov    $0xa,%edx
cmovb  %ebp,%edx
mov    %r14,%rdi
call   1030 <printf@plt>
lea    (%rbx,%r13,1),%rax
add    $0x1,%rax
add    $0x1,%rbx
cmp    $0x2,%rax
jne    1140 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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