#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 *, char *);
int /*<<< orphan*/ puts(char *);
int main(int argc, char *argv[]) {
  if (argc > 1) {
    int i;
    while (1)
      for (i = 1; i < argc; i++)
        printf("%s%s", argv[i], (i == argc - 1) ? "\n" : " ");
  } else
    while (1)
      puts("y");
  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)
jle    11a0 <main+0x80>
jmp    1145 <main+0x25>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    119b <main+0x7b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
lea    0xe93(%rip),%rdx
lea    0xe8a(%rip),%rax
cmp    %edi,%ecx
cmove  %rax,%rdx
lea    0xe78(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114c <main+0x2c>
jmp    1145 <main+0x25>
jmp    11a5 <main+0x85>
lea    0xe5d(%rip),%rdi
call   1030 <puts@plt>
jmp    11a5 <main+0x85>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x1,%edi
jle    1195 <main+0x75>
mov    %rsi,%r12
lea    -0x1(%rdi),%edx
mov    %edi,%ebx
lea    0xec6(%rip),%rbp
lea    0xec1(%rip),%r14
lea    0xeb3(%rip),%r15
mov    %rdx,(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%r13d
cs nopw 0x0(%rax,%rax,1)
mov    (%r12,%r13,8),%rsi
cmp    %r13,%rdx
mov    %r14,%rdx
cmove  %rbp,%rdx
mov    %r15,%rdi
call   1040 <printf@plt>
mov    (%rsp),%rdx
add    $0x1,%r13
cmp    %r13,%rbx
jne    1170 <main+0x50>
jmp    1160 <main+0x40>
lea    0xe6d(%rip),%rbx
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1030 <puts@plt>
jmp    11a0 <main+0x80>

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

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