#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 *);
void printBWords(char *toPrint[16], int arrLen) {
  int i;
  for (i = 0; i < arrLen; i++) {
    if (toPrint[i][0] == 'b')
      printf("%s\n", toPrint[i]);
  }
}


x86 assembly (clang, -O0):
<printBWords>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1175 <printBWords+0x65>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x62,%eax
jne    1162 <printBWords+0x52>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
jmp    1167 <printBWords+0x57>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printBWords+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printBWords>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    114c <printBWords+0x3c>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
jmp    1139 <printBWords+0x29>
nopl   (%rax)
add    $0x1,%rbx
cmp    %rbx,%r12
je     114c <printBWords+0x3c>
mov    (%r15,%rbx,8),%rsi
cmpb   $0x62,(%rsi)
jne    1130 <printBWords+0x20>
mov    %r14,%rdi
call   1030 <printf@plt>
jmp    1130 <printBWords+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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