#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*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ putc(char, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  for (int i = 1; i < argc; i++) {
    if (i != 1) {
      putc(' ', stdout);
    }
    fputs(argv[i], stdout);
  }
  putc('\n', stdout);
  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)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    118e <main+0x6e>
cmpl   $0x1,-0x14(%rbp)
je     1166 <main+0x46>
mov    0x2e86(%rip),%rax
mov    (%rax),%esi
mov    $0x20,%edi
call   1040 <putc@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    0x2e67(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
mov    0x2e4b(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1040 <putc@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
cmp    $0x2,%edi
jl     1182 <main+0x62>
mov    %rsi,%r12
mov    %edi,%r14d
mov    0x8(%rsi),%rdi
mov    0x2ea2(%rip),%r15
mov    (%r15),%esi
call   1030 <fputs@plt>
cmp    $0x2,%r14d
je     1182 <main+0x62>
mov    %r14d,%ebp
mov    $0x2,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%r15),%esi
mov    $0x20,%edi
call   1040 <putc@plt>
mov    (%r12,%rbx,8),%rdi
mov    (%r15),%esi
call   1030 <fputs@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1160 <main+0x40>
mov    0x2e57(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1040 <putc@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
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 i32, i32* %6
%13 = icmp ne i32 %12, 1
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = load i32, i32* @stdout
%16 = call i32 @putc(i8 signext 32, i32 %15)
br label %17
17: ; preds = %14, %11
%18 = load i8**, i8*** %5
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8*, i8** %18, i64 %20
%22 = load i8*, i8** %21
%23 = load i32, i32* @stdout
%24 = call i32 @fputs(i8* %22, i32 %23)
br label %25
25: ; preds = %17
%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* @stdout
%30 = call i32 @putc(i8 signext 10, i32 %29)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = zext i32 %0 to i64
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = load i32, i32* @stdout
%9 = tail call i32 @fputs(i8* %7, i32 %8)
%10 = icmp eq i32 %0, 2
br i1 %10, label %11, label %14
11: ; preds = %14, %4, %2
%12 = load i32, i32* @stdout
%13 = tail call i32 @putc(i8 signext 10, i32 %12)
ret i32 0
14: ; preds = %4, %14
%15 = phi i64 [ %22, %14 ], [ 2, %4 ]
%16 = load i32, i32* @stdout
%17 = tail call i32 @putc(i8 signext 32, i32 %16)
%18 = getelementptr inbounds i8*, i8** %1, i64 %15
%19 = load i8*, i8** %18
%20 = load i32, i32* @stdout
%21 = tail call i32 @fputs(i8* %19, i32 %20)
%22 = add nuw nsw i64 %15, 1
%23 = icmp eq i64 %22, %5
br i1 %23, label %11, label %14
}