#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int, int);
void printChar(FILE *out, int arrayLetters[], int size) {
  for (int i = 0; i < size; i++) {
    if (arrayLetters[i] > 0) {
      fprintf(out, "%c %d\n", i + 97, arrayLetters[i]);
    }
  }
}


x86 assembly (clang, -O0):
<printChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    117c <printChar+0x6c>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    1169 <printChar+0x59>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%edx
add    $0x61,%edx
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
jmp    116e <printChar+0x5e>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112a <printChar+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printChar>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
test   %edx,%edx
jle    1161 <printChar+0x51>
mov    %rsi,%r12
mov    %rdi,%r14
mov    %edx,%r13d
xor    %ebx,%ebx
lea    0xed1(%rip),%r15
jmp    1149 <printChar+0x39>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    %rbx,%r13
je     1161 <printChar+0x51>
mov    (%r12,%rbx,4),%ecx
test   %ecx,%ecx
jle    1140 <printChar+0x30>
lea    0x61(%rbx),%edx
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <fprintf@plt>
jmp    1140 <printChar+0x30>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

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