#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 *, ...);
void print_char_codes(char char_codes[(256)][(16)]) {
  int i;
  for (i = 0; i < (256); i++)
    if (char_codes[i][0] != '\0')
      printf("%c - %s\n", i, char_codes[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<print_char_codes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x100,-0xc(%rbp)
jge    117e <print_char_codes+0x6e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     116b <print_char_codes+0x5b>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rdx
movslq -0xc(%rbp),%rax
shl    $0x4,%rax
add    %rax,%rdx
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1170 <print_char_codes+0x60>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <print_char_codes+0x13>
lea    0xe82(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_char_codes>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
lea    0xed1(%rip),%r14
xor    %ebx,%ebx
jmp    1151 <print_char_codes+0x31>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rbx
add    $0x10,%r15
cmp    $0x100,%rbx
je     1168 <print_char_codes+0x48>
cmpb   $0x0,(%r15)
je     1140 <print_char_codes+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1140 <print_char_codes+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

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