#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 *, ...);
int main(int argc, char **argv) {
  if (argc == 1) {
    while (1) {
      printf("y\n");
    }
  } else if (argc > 1) {
    int count;
    while (1) {
      for (count = 1; count < argc; count++) {
        if (count == argc - 1) {
          printf("%s", argv[count]);
        } else {
          printf("%s ", argv[count]);
        }
      }
      printf("\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    1148 <main+0x38>
jmp    1135 <main+0x25>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1135 <main+0x25>
cmpl   $0x1,-0x8(%rbp)
jle    11da <main+0xca>
jmp    1157 <main+0x47>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11c7 <main+0xb7>
mov    -0x14(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    119a <main+0x8a>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b4 <main+0xa4>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe59(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b9 <main+0xa9>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    115e <main+0x4e>
lea    0xe33(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1157 <main+0x47>
jmp    11df <main+0xcf>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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    0xec0(%rip),%rbx
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1040 <puts@plt>
jmp    1150 <main+0x20>
jle    11af <main+0x7f>
mov    %rsi,%r14
lea    -0x1(%rdi),%r15d
mov    %edi,%ebx
mov    $0x1,%ebp
lea    0xe8f(%rip),%r12
lea    0xe8b(%rip),%r13
nopl   0x0(%rax,%rax,1)
cmp    %r15,%rbp
mov    %r13,%rdi
cmove  %r12,%rdi
mov    (%r14,%rbp,8),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbp
cmp    %rbx,%rbp
jne    1180 <main+0x50>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x1,%ebp
jmp    1180 <main+0x50>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"y\0A\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [4 x i8] c"%s \00"
@.str.3 = [2 x i8] c"\0A\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 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %10
12: ; preds = %2
%13 = load i32, i32* %4
%14 = icmp sgt i32 %13, 1
br i1 %14, label %15, label %46
15: ; preds = %12
br label %16
16: ; preds = %15, %44
store i32 1, i32* %6
br label %17
17: ; preds = %41, %16
%18 = load i32, i32* %6
%19 = load i32, i32* %4
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %44
21: ; preds = %17
%22 = load i32, i32* %6
%23 = load i32, i32* %4
%24 = sub nsw i32 %23, 1
%25 = icmp eq i32 %22, %24
br i1 %25, label %26, label %33
26: ; preds = %21
%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 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %31)
br label %40
33: ; preds = %21
%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 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 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 %17
44: ; preds = %17
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %16
46: ; preds = %12
br label %47
47: ; preds = %46
ret i32 0
}

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