blkpr(av) register char **av;
{
  for (; *av; av++) {
    shprintf("%s", *av);
    if (av[1])
      shprintf(" ");
  }
}


x86 assembly (clang, -O0):
<blkpr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     1172 <blkpr+0x62>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <shprintf@plt>
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x8(%rax)
je     115c <blkpr+0x4c>
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <shprintf@plt>
jmp    1161 <blkpr+0x51>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <blkpr+0xc>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blkpr>:
push   %r15
push   %r14
push   %rbx
mov    (%rdi),%rsi
test   %rsi,%rsi
je     1166 <blkpr+0x56>
mov    %rdi,%rbx
add    $0x8,%rbx
lea    0xed5(%rip),%r14
lea    0xed1(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <shprintf@plt>
cmpq   $0x0,(%rbx)
je     1166 <blkpr+0x56>
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <shprintf@plt>
mov    (%rbx),%rsi
add    $0x8,%rbx
test   %rsi,%rsi
jne    1140 <blkpr+0x30>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [2 x i8] c" \00"
define i32 @blkpr(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8* [ %13, %11 ], [ %2, %1 ]
%6 = phi i8** [ %8, %11 ], [ %0, %1 ]
%7 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @shprintf to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
%8 = getelementptr inbounds i8*, i8** %6, i64 1
%9 = load i8*, i8** %8
%10 = icmp eq i8* %9, null
br i1 %10, label %15, label %11
11: ; preds = %4
%12 = tail call i32 (i8*, ...) bitcast (i32 (...)* @shprintf to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%13 = load i8*, i8** %8
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %4
15: ; preds = %4, %11, %1
ret i32 undef
}