#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 const *, int /*<<< orphan*/);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ strcmp(char const *, char *);
int main(int argc, const char *argv[]) {
  (void)argc;
  int nl = 0;
  if (*++argv && !strcmp(*argv, "-n")) {
    ++argv;
    nl = 1;
  }
  while (*argv) {
    fputs(*argv, stdout);
    if (*++argv) {
      putchar(' ');
    }
  }
  if (!nl) {
    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,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
cmpq   $0x0,0x8(%rax)
je     1196 <main+0x66>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe8b(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    1196 <main+0x66>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
jmp    119b <main+0x6b>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     11e7 <main+0xb7>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    0x2e29(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
cmpq   $0x0,0x8(%rax)
je     11e2 <main+0xb2>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    119b <main+0x6b>
cmpl   $0x0,-0x14(%rbp)
jne    11fb <main+0xcb>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    0x8(%rsi),%rdi
test   %rdi,%rdi
je     11aa <main+0x7a>
mov    %rsi,%rbx
lea    0x8(%rsi),%rbp
lea    0xeb5(%rip),%rsi
call   1050 <strcmp@plt>
mov    %eax,%r14d
lea    0x10(%rbx),%rax
xor    %ecx,%ecx
test   %r14d,%r14d
sete   %cl
cmove  %rax,%rbp
mov    0x8(%rbx,%rcx,8),%rdi
test   %rdi,%rdi
je     11a5 <main+0x75>
add    $0x8,%rbp
mov    0x2e68(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%esi
call   1040 <fputs@plt>
cmpq   $0x0,0x0(%rbp)
je     11a5 <main+0x75>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    0x0(%rbp),%rdi
add    $0x8,%rbp
test   %rdi,%rdi
jne    1180 <main+0x50>
test   %r14d,%r14d
je     11b4 <main+0x84>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

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