#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 /*<<< orphan*/ putchar(char);
scalar_t__ strcmp(char *, char *);
int main(int argc, char **argv) {
  int x, nflag = 0;
  if (strcmp(argv[1], "-n") == 0) {
    nflag = 1;
    argv += 1;
    argc -= 1;
  }
  for (x = 1; x < argc; ++x) {
    if (x > 1) {
      printf(" %s", argv[x]);
    } else {
      printf("%s", argv[x]);
    }
  }
  if (!nflag) {
    putchar('\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)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xea4(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1187 <main+0x57>
movl   $0x1,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11ec <main+0xbc>
cmpl   $0x1,-0x14(%rbp)
jle    11c1 <main+0x91>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe4c(%rip),%rdi
call   1040 <printf@plt>
jmp    11d9 <main+0xa9>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe30(%rip),%rdi
call   1040 <printf@plt>
jmp    11de <main+0xae>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    118e <main+0x5e>
cmpl   $0x0,-0x18(%rbp)
jne    1200 <main+0xd0>
mov    $0xa,%edi
call   1030 <putchar@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
mov    %rsi,%rbp
mov    %edi,%r15d
lea    0x8(%rsi),%r12
mov    0x8(%rsi),%rdi
lea    0xeb3(%rip),%rsi
call   1050 <strcmp@plt>
mov    %rax,%r14
xor    %eax,%eax
test   %r14,%r14
sete   %al
cmovne %rbp,%r12
sub    %eax,%r15d
cmp    $0x2,%r15d
jl     11a5 <main+0x75>
mov    0x8(%r12),%rsi
lea    0xe8e(%rip),%rdi
call   1040 <printf@plt>
cmp    $0x2,%r15d
je     11a5 <main+0x75>
mov    %r15d,%ebp
mov    $0x2,%ebx
lea    0xe73(%rip),%r15
mov    (%r12,%rbx,8),%rsi
mov    %r15,%rdi
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1190 <main+0x60>
test   %r14,%r14
je     11b4 <main+0x84>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

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