int main(int argc, char *argv[]) {
  char *yes[] = {(void *)0, "y", (void *)0};
  if (argc == 1) {
    argc = 2;
    argv = yes;
  }
  for (;;) {
    for (int i = 1; i < argc; ++i) {
      write_stdout(argv[i]);
      if (i < argc - 1)
        write(1, " ", 1);
    }
    write(1, "\n", 1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2cc3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2cc0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2cbd(%rip),%rax
mov    %rax,-0x20(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1170 <main+0x50>
movl   $0x2,-0x8(%rbp)
lea    -0x30(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1175 <main+0x55>
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11d4 <main+0xb4>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    $0x0,%al
call   1040 <write_stdout@plt>
mov    -0x34(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    11c1 <main+0xa1>
mov    $0x1,%edx
lea    0xe4a(%rip),%rsi
mov    %edx,%edi
mov    $0x0,%al
call   1030 <write@plt>
jmp    11c6 <main+0xa6>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    117c <main+0x5c>
mov    $0x1,%edx
lea    0xe24(%rip),%rsi
mov    %edx,%edi
mov    $0x0,%al
call   1030 <write@plt>
jmp    1175 <main+0x55>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    0x2cdb(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0x2cbf(%rip),%xmm0
cmp    $0x1,%edi
mov    $0x2,%r13d
cmovne %edi,%r13d
movaps %xmm0,(%rsp)
mov    %rsp,%r12
cmovne %rsi,%r12
lea    -0x1(%r13),%eax
movslq %eax,%rbx
lea    0xe9b(%rip),%r15
lea    0xe96(%rip),%r14
jmp    1184 <main+0x64>
mov    $0x1,%edi
mov    %r14,%rsi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <write@plt>
cmp    $0x2,%r13d
jl     1170 <main+0x50>
mov    $0x1,%ebp
jmp    11a9 <main+0x89>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    %rbp,%r13
je     1170 <main+0x50>
mov    (%r12,%rbp,8),%rdi
xor    %eax,%eax
call   1040 <write_stdout@plt>
cmp    %rbx,%rbp
jge    11a0 <main+0x80>
mov    $0x1,%edi
mov    %r15,%rsi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <write@plt>
jmp    11a0 <main+0x80>

LLVM IR (-O0):
@.str = [2 x i8] c"y\00"
@__const.main.yes = [3 x i8*] [i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i8* null]
@.str.1 = [2 x i8] c" \00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [3 x i8*]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [3 x i8*]* %6 to i8*
%9 = load i32, i32* %4
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %13
11: ; preds = %2
store i32 2, i32* %4
%12 = getelementptr inbounds [3 x i8*], [3 x i8*]* %6, i64 0, i64 0
store i8** %12, i8*** %5
br label %13
13: ; preds = %11, %2
br label %14
14: ; preds = %36, %13
store i32 1, i32* %7
br label %15
15: ; preds = %33, %14
%16 = load i32, i32* %7
%17 = load i32, i32* %4
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %36
19: ; preds = %15
%20 = load i8**, i8*** %5
%21 = load i32, i32* %7
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8*, i8** %20, i64 %22
%24 = load i8*, i8** %23
%25 = call i32 (i8*, ...) bitcast (i32 (...)* @write_stdout to i32 (i8*, ...)*)(i8* %24)
%26 = load i32, i32* %7
%27 = load i32, i32* %4
%28 = sub nsw i32 %27, 1
%29 = icmp slt i32 %26, %28
br i1 %29, label %30, label %32
30: ; preds = %19
%31 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %32
32: ; preds = %30, %19
br label %33
33: ; preds = %32
%34 = load i32, i32* %7
%35 = add nsw i32 %34, 1
store i32 %35, i32* %7
br label %15
36: ; preds = %15
%37 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 1)
br label %14
}

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