#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);
int /*<<< orphan*/ puts(char *);
int main(int argc, char **argv) {
  if (argc == 1) {
    while (1) {
      puts("y");
    }
  } else {
    while (1) {
      for (int i = 1; i < argc; i++) {
        printf("%s", argv[i]);
        if (argc - i > 1) {
          putchar(' ');
        }
      }
      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)
cmpl   $0x1,-0x8(%rbp)
jne    1166 <main+0x36>
jmp    1155 <main+0x25>
lea    0xea4(%rip),%rdi
call   1040 <puts@plt>
jmp    1155 <main+0x25>
jmp    116b <main+0x3b>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11c2 <main+0x92>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe71(%rip),%rdi
call   1050 <printf@plt>
mov    -0x8(%rbp),%eax
sub    -0x14(%rbp),%eax
cmp    $0x1,%eax
jle    11af <main+0x7f>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    11b4 <main+0x84>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1172 <main+0x42>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    116b <main+0x3b>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x1,%edi
jne    115a <main+0x2a>
lea    0xeb9(%rip),%rbx
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1040 <puts@plt>
jmp    1150 <main+0x20>
mov    %rsi,%r12
mov    %edi,%r14d
mov    %edi,%ebx
lea    -0x1(%r14),%eax
mov    %eax,0x4(%rsp)
lea    0xe91(%rip),%r15
jmp    118a <main+0x5a>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
cmp    $0x2,%r14d
jl     1180 <main+0x50>
mov    $0x1,%ebp
mov    0x4(%rsp),%r13d
jmp    11ad <main+0x7d>
nopl   0x0(%rax)
add    $0x1,%rbp
add    $0xffffffff,%r13d
cmp    %rbp,%rbx
je     1180 <main+0x50>
mov    (%r12,%rbp,8),%rsi
mov    %r15,%rdi
call   1050 <printf@plt>
cmp    $0x2,%r13d
jl     11a0 <main+0x70>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    11a0 <main+0x70>

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

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