void echo(wp) register char **wp;
{
  register i;
  prs("+");
  for (i = 0; wp[i]; i++) {
    if (i)
      prs(" ");
    prs(wp[i]);
  }
  prs("\n");
}


x86 assembly (clang, -O0):
<echo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <prs@plt>
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     117d <echo+0x6d>
cmpl   $0x0,-0xc(%rbp)
je     115c <echo+0x4c>
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <prs@plt>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    $0x0,%al
call   1030 <prs@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1131 <echo+0x21>
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1030 <prs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<echo>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xee2(%rip),%rdi
xor    %eax,%eax
call   1030 <prs@plt>
mov    (%rbx),%rdi
test   %rdi,%rdi
je     116f <echo+0x5f>
xor    %eax,%eax
call   1030 <prs@plt>
cmpq   $0x0,0x8(%rbx)
je     116f <echo+0x5f>
add    $0x10,%rbx
lea    0xebc(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <prs@plt>
mov    -0x8(%rbx),%rdi
xor    %eax,%eax
call   1030 <prs@plt>
cmpq   $0x0,(%rbx)
lea    0x8(%rbx),%rbx
jne    1150 <echo+0x40>
lea    0xe8e(%rip),%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <prs@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"+\00"
@.str.1 = [2 x i8] c" \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @echo(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
store i8** %0, i8*** %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @prs to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %5
5: ; preds = %24, %1
%6 = load i8**, i8*** %2
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8*, i8** %6, i64 %8
%10 = load i8*, i8** %9
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %27
12: ; preds = %5
%13 = load i32, i32* %3
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 (i8*, ...) bitcast (i32 (...)* @prs to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %17
17: ; preds = %15, %12
%18 = load i8**, i8*** %2
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8*, i8** %18, i64 %20
%22 = load i8*, i8** %21
%23 = call i32 (i8*, ...) bitcast (i32 (...)* @prs to i32 (i8*, ...)*)(i8* %22)
br label %24
24: ; preds = %17
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
br label %5
27: ; preds = %5
%28 = call i32 (i8*, ...) bitcast (i32 (...)* @prs to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"+\00"
@.str.1 = [2 x i8] c" \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @echo(i8** nocapture %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @prs to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = load i8*, i8** %0
%4 = icmp eq i8* %3, null
br i1 %4, label %20, label %5
5: ; preds = %1
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @prs to i32 (i8*, ...)*)(i8* %3)
%7 = getelementptr inbounds i8*, i8** %0, i64 1
%8 = load i8*, i8** %7
%9 = icmp eq i8* %8, null
br i1 %9, label %20, label %10
10: ; preds = %5, %10
%11 = phi i64 [ %16, %10 ], [ 1, %5 ]
%12 = phi i8** [ %17, %10 ], [ %7, %5 ]
%13 = tail call i32 (i8*, ...) bitcast (i32 (...)* @prs to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%14 = load i8*, i8** %12
%15 = tail call i32 (i8*, ...) bitcast (i32 (...)* @prs to i32 (i8*, ...)*)(i8* %14)
%16 = add nuw i64 %11, 1
%17 = getelementptr inbounds i8*, i8** %0, i64 %16
%18 = load i8*, i8** %17
%19 = icmp eq i8* %18, null
br i1 %19, label %20, label %10
20: ; preds = %10, %5, %1
%21 = tail call i32 (i8*, ...) bitcast (i32 (...)* @prs to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}