#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 const *);
int /*<<< orphan*/ putchar(char);
scalar_t__ strcmp(char const *, char *);
int main(int argc, const char *argv[]) {
  bool nflag;
  argv++;
  if ((*argv) && (strcmp(*argv, "-n") == 0)) {
    nflag = true;
    argv++;
  } else {
    nflag = false;
  }
  while (*argv) {
    printf("%s", *argv);
    argv++;
    if (*argv) {
      putchar(' ');
    }
  }
  if (nflag == false) {
    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)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     1195 <main+0x65>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe92(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1195 <main+0x65>
movl   $0x1,-0x14(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    119c <main+0x6c>
movl   $0x0,-0x14(%rbp)
jmp    11a1 <main+0x71>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     11eb <main+0xbb>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe46(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     11e6 <main+0xb6>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    11a1 <main+0x71>
cmpl   $0x0,-0x14(%rbp)
jne    11ff <main+0xcf>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    0x8(%rsi),%rdi
test   %rdi,%rdi
je     11a9 <main+0x79>
mov    %rsi,%r15
lea    0x8(%rsi),%rbx
lea    0xeb4(%rip),%rsi
call   1050 <strcmp@plt>
mov    %rax,%r14
lea    0x10(%r15),%rax
xor    %ecx,%ecx
test   %r14,%r14
sete   %cl
cmove  %rax,%rbx
mov    0x8(%r15,%rcx,8),%rsi
test   %rsi,%rsi
je     11a4 <main+0x74>
add    $0x8,%rbx
lea    0xe8a(%rip),%r15
nopl   0x0(%rax)
mov    %r15,%rdi
call   1040 <printf@plt>
cmpq   $0x0,(%rbx)
je     11a4 <main+0x74>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    (%rbx),%rsi
add    $0x8,%rbx
test   %rsi,%rsi
jne    1180 <main+0x50>
test   %r14,%r14
je     11b3 <main+0x83>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"-n\00"
@.str.1 = [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 = icmp eq i8* %4, null
br i1 %5, label %26, label %6
6: ; preds = %2
%7 = tail call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
%9 = getelementptr inbounds i8*, i8** %1, i64 2
%10 = select i1 %8, i8** %9, i8** %3
%11 = load i8*, i8** %10
%12 = icmp eq i8* %11, null
br i1 %12, label %25, label %13
13: ; preds = %6, %21
%14 = phi i8* [ %23, %21 ], [ %11, %6 ]
%15 = phi i8** [ %17, %21 ], [ %10, %6 ]
%16 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %14)
%17 = getelementptr inbounds i8*, i8** %15, i64 1
%18 = load i8*, i8** %17
%19 = icmp eq i8* %18, null
br i1 %19, label %20, label %21
20: ; preds = %13
br i1 %8, label %28, label %26
21: ; preds = %13
%22 = tail call i32 @putchar(i8 signext 32)
%23 = load i8*, i8** %17
%24 = icmp eq i8* %23, null
br i1 %24, label %25, label %13
25: ; preds = %21, %6
br i1 %8, label %28, label %26
26: ; preds = %2, %20, %25
%27 = tail call i32 @putchar(i8 signext 10)
br label %28
28: ; preds = %20, %26, %25
ret i32 0
}