#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 EXIT_SUCCESS;
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  int i = 1;
  if (i < argc) {
    (void)fputs(argv[i++], stdout);
  }
  for (; i < argc; ++i) {
    (void)putchar(' ');
    (void)fputs(argv[i], stdout);
  }
  (void)putchar('\n');
  return EXIT_SUCCESS;
}


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    116d <main+0x4d>
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),%rdi
mov    0x2e7a(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
jmp    1172 <main+0x52>
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11b0 <main+0x90>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    0x2e45(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1172 <main+0x52>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2e17(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r15
mov    %edi,%r14d
mov    $0x1,%eax
cmp    $0x2,%edi
jl     114e <main+0x2e>
mov    0x8(%r15),%rdi
mov    0x2e9e(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
mov    $0x2,%eax
cmp    %r14d,%eax
jge    117f <main+0x5f>
mov    %eax,%ebp
mov    %r14d,%ebx
mov    0x2e81(%rip),%r14
nop
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    (%r15,%rbp,8),%rdi
mov    (%r14),%esi
call   1040 <fputs@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1160 <main+0x40>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2e48(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
@EXIT_SUCCESS = 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
%7 = load i32, i32* %6
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %19
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = load i32, i32* %6
%13 = add nsw i32 %12, 1
store i32 %13, i32* %6
%14 = sext i32 %12 to i64
%15 = getelementptr inbounds i8*, i8** %11, i64 %14
%16 = load i8*, i8** %15
%17 = load i32, i32* @stdout
%18 = call i32 @fputs(i8* %16, i32 %17)
br label %19
19: ; preds = %10, %2
br label %20
20: ; preds = %33, %19
%21 = load i32, i32* %6
%22 = load i32, i32* %4
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %36
24: ; preds = %20
%25 = call i32 @putchar(i8 signext 32)
%26 = load i8**, i8*** %5
%27 = load i32, i32* %6
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8*, i8** %26, i64 %28
%30 = load i8*, i8** %29
%31 = load i32, i32* @stdout
%32 = call i32 @fputs(i8* %30, i32 %31)
br label %33
33: ; preds = %24
%34 = load i32, i32* %6
%35 = add nsw i32 %34, 1
store i32 %35, i32* %6
br label %20
36: ; preds = %20
%37 = call i32 @putchar(i8 signext 10)
%38 = load i32, i32* @EXIT_SUCCESS
ret i32 %38
}

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