#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 *);
int printchr16(unsigned char c[16][2]) {
  int i, j, k;
  for (i = 0; i < 16; i++) {
    for (j = 0; j < 2; j++) {
      for (k = 0; k < 8; k++) {
        if (c[i][j] & (0x80 >> k)) {
          printf(" ");
        } else {
          printf("z");
        }
      }
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<printchr16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jge    11da <printchr16+0xca>
movl   $0x0,-0x10(%rbp)
cmpl   $0x2,-0x10(%rbp)
jge    11c0 <printchr16+0xb0>
movl   $0x0,-0x14(%rbp)
cmpl   $0x8,-0x14(%rbp)
jge    11ad <printchr16+0x9d>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x1,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x14(%rbp),%ecx
mov    $0x80,%edx
sar    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     118e <printchr16+0x7e>
lea    0xe7c(%rip),%rdi
call   1030 <printf@plt>
jmp    119a <printchr16+0x8a>
lea    0xe6d(%rip),%rdi
call   1030 <printf@plt>
jmp    119f <printchr16+0x8f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1145 <printchr16+0x35>
jmp    11b2 <printchr16+0xa2>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <printchr16+0x24>
lea    0xe3d(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <printchr16+0x13>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printchr16>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
xor    %ebx,%ebx
mov    $0x7a,%ebp
xchg   %ax,%ax
cmpb   $0x0,(%r14,%rbx,2)
mov    $0x20,%edi
cmovns %ebp,%edi
call   1030 <putchar@plt>
testb  $0x40,(%r14,%rbx,2)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
testb  $0x20,(%r14,%rbx,2)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
testb  $0x10,(%r14,%rbx,2)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
testb  $0x8,(%r14,%rbx,2)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
testb  $0x4,(%r14,%rbx,2)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
testb  $0x2,(%r14,%rbx,2)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
testb  $0x1,(%r14,%rbx,2)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
cmpb   $0x0,0x1(%r14,%rbx,2)
mov    $0x20,%edi
cmovns %ebp,%edi
call   1030 <putchar@plt>
testb  $0x40,0x1(%r14,%rbx,2)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
testb  $0x20,0x1(%r14,%rbx,2)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
testb  $0x10,0x1(%r14,%rbx,2)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
testb  $0x8,0x1(%r14,%rbx,2)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
testb  $0x4,0x1(%r14,%rbx,2)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
testb  $0x2,0x1(%r14,%rbx,2)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
testb  $0x1,0x1(%r14,%rbx,2)
mov    $0x20,%edi
cmove  %ebp,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    $0x10,%rbx
jne    1120 <printchr16+0x10>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [2 x i8] c"z\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @printchr16([2 x i8]* %0) {
%2 = alloca [2 x i8]*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store [2 x i8]* %0, [2 x i8]** %2
store i32 0, i32* %3
br label %6
6: ; preds = %45, %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 16
br i1 %8, label %9, label %48
9: ; preds = %6
store i32 0, i32* %4
br label %10
10: ; preds = %40, %9
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 2
br i1 %12, label %13, label %43
13: ; preds = %10
store i32 0, i32* %5
br label %14
14: ; preds = %36, %13
%15 = load i32, i32* %5
%16 = icmp slt i32 %15, 8
br i1 %16, label %17, label %39
17: ; preds = %14
%18 = load [2 x i8]*, [2 x i8]** %2
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [2 x i8], [2 x i8]* %18, i64 %20
%22 = load i32, i32* %4
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [2 x i8], [2 x i8]* %21, i64 0, i64 %23
%25 = load i8, i8* %24
%26 = zext i8 %25 to i32
%27 = load i32, i32* %5
%28 = ashr i32 128, %27
%29 = and i32 %26, %28
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %17
%32 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %35
33: ; preds = %17
%34 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %35
35: ; preds = %33, %31
br label %36
36: ; preds = %35
%37 = load i32, i32* %5
%38 = add nsw i32 %37, 1
store i32 %38, i32* %5
br label %14
39: ; preds = %14
br label %40
40: ; preds = %39
%41 = load i32, i32* %4
%42 = add nsw i32 %41, 1
store i32 %42, i32* %4
br label %10
43: ; preds = %10
%44 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %45
45: ; preds = %43
%46 = load i32, i32* %3
%47 = add nsw i32 %46, 1
store i32 %47, i32* %3
br label %6
48: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @printchr16([2 x i8]* nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %85, %2 ]
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %0, i64 %3, i64 0
%5 = load i8, i8* %4
%6 = icmp sgt i8 %5, -1
%7 = select i1 %6, i32 122, i32 32
%8 = tail call i32 @putchar(i32 %7)
%9 = load i8, i8* %4
%10 = and i8 %9, 64
%11 = icmp eq i8 %10, 0
%12 = select i1 %11, i32 122, i32 32
%13 = tail call i32 @putchar(i32 %12)
%14 = load i8, i8* %4
%15 = and i8 %14, 32
%16 = icmp eq i8 %15, 0
%17 = select i1 %16, i32 122, i32 32
%18 = tail call i32 @putchar(i32 %17)
%19 = load i8, i8* %4
%20 = and i8 %19, 16
%21 = icmp eq i8 %20, 0
%22 = select i1 %21, i32 122, i32 32
%23 = tail call i32 @putchar(i32 %22)
%24 = load i8, i8* %4
%25 = and i8 %24, 8
%26 = icmp eq i8 %25, 0
%27 = select i1 %26, i32 122, i32 32
%28 = tail call i32 @putchar(i32 %27)
%29 = load i8, i8* %4
%30 = and i8 %29, 4
%31 = icmp eq i8 %30, 0
%32 = select i1 %31, i32 122, i32 32
%33 = tail call i32 @putchar(i32 %32)
%34 = load i8, i8* %4
%35 = and i8 %34, 2
%36 = icmp eq i8 %35, 0
%37 = select i1 %36, i32 122, i32 32
%38 = tail call i32 @putchar(i32 %37)
%39 = load i8, i8* %4
%40 = and i8 %39, 1
%41 = icmp eq i8 %40, 0
%42 = select i1 %41, i32 122, i32 32
%43 = tail call i32 @putchar(i32 %42)
%44 = getelementptr inbounds [2 x i8], [2 x i8]* %0, i64 %3, i64 1
%45 = load i8, i8* %44
%46 = icmp sgt i8 %45, -1
%47 = select i1 %46, i32 122, i32 32
%48 = tail call i32 @putchar(i32 %47)
%49 = load i8, i8* %44
%50 = and i8 %49, 64
%51 = icmp eq i8 %50, 0
%52 = select i1 %51, i32 122, i32 32
%53 = tail call i32 @putchar(i32 %52)
%54 = load i8, i8* %44
%55 = and i8 %54, 32
%56 = icmp eq i8 %55, 0
%57 = select i1 %56, i32 122, i32 32
%58 = tail call i32 @putchar(i32 %57)
%59 = load i8, i8* %44
%60 = and i8 %59, 16
%61 = icmp eq i8 %60, 0
%62 = select i1 %61, i32 122, i32 32
%63 = tail call i32 @putchar(i32 %62)
%64 = load i8, i8* %44
%65 = and i8 %64, 8
%66 = icmp eq i8 %65, 0
%67 = select i1 %66, i32 122, i32 32
%68 = tail call i32 @putchar(i32 %67)
%69 = load i8, i8* %44
%70 = and i8 %69, 4
%71 = icmp eq i8 %70, 0
%72 = select i1 %71, i32 122, i32 32
%73 = tail call i32 @putchar(i32 %72)
%74 = load i8, i8* %44
%75 = and i8 %74, 2
%76 = icmp eq i8 %75, 0
%77 = select i1 %76, i32 122, i32 32
%78 = tail call i32 @putchar(i32 %77)
%79 = load i8, i8* %44
%80 = and i8 %79, 1
%81 = icmp eq i8 %80, 0
%82 = select i1 %81, i32 122, i32 32
%83 = tail call i32 @putchar(i32 %82)
%84 = tail call i32 @putchar(i32 10)
%85 = add nuw nsw i64 %3, 1
%86 = icmp eq i64 %85, 16
br i1 %86, label %87, label %2
87: ; preds = %2
ret i32 0
}