#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_char46(unsigned char p_data[4][6]) {
  unsigned int i, j;
  for (i = 0; i < 4; i++)
    for (j = 0; j < 6; j++) {
      printf("%02x", p_data[i][j]);
      if (j == 5)
        printf("\n");
    }
}


x86 assembly (clang, -O0):
<print_char46>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jae    119f <print_char46+0x8f>
movl   $0x0,-0x10(%rbp)
cmpl   $0x6,-0x10(%rbp)
jae    118c <print_char46+0x7c>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
imul   $0x6,%rcx,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%ecx
movzbl (%rax,%rcx,1),%esi
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x5,-0x10(%rbp)
jne    1179 <print_char46+0x69>
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    117e <print_char46+0x6e>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <print_char46+0x24>
jmp    1191 <print_char46+0x81>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <print_char46+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_char46>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movzbl (%rdi),%esi
lea    0xecf(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl 0x1(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl 0x2(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl 0x3(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl 0x4(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl 0x5(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movzbl 0x6(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl 0x7(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl 0x8(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl 0x9(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl 0xa(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl 0xb(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movzbl 0xc(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl 0xd(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl 0xe(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl 0xf(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl 0x10(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl 0x11(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movzbl 0x12(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl 0x13(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl 0x14(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl 0x15(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl 0x16(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl 0x17(%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%02x\00"
define void @print_char46([6 x i8]* nocapture %0) {
%2 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 0, i64 0
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 0, i64 1
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 0, i64 2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 0, i64 3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %16)
%18 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 0, i64 4
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 0, i64 5
%23 = load i8, i8* %22
%24 = zext i8 %23 to i32
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %24)
%26 = tail call i32 @putchar(i32 10)
%27 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 1, i64 0
%28 = load i8, i8* %27
%29 = zext i8 %28 to i32
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %29)
%31 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 1, i64 1
%32 = load i8, i8* %31
%33 = zext i8 %32 to i32
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %33)
%35 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 1, i64 2
%36 = load i8, i8* %35
%37 = zext i8 %36 to i32
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %37)
%39 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 1, i64 3
%40 = load i8, i8* %39
%41 = zext i8 %40 to i32
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %41)
%43 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 1, i64 4
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %45)
%47 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 1, i64 5
%48 = load i8, i8* %47
%49 = zext i8 %48 to i32
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %49)
%51 = tail call i32 @putchar(i32 10)
%52 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 2, i64 0
%53 = load i8, i8* %52
%54 = zext i8 %53 to i32
%55 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %54)
%56 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 2, i64 1
%57 = load i8, i8* %56
%58 = zext i8 %57 to i32
%59 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %58)
%60 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 2, i64 2
%61 = load i8, i8* %60
%62 = zext i8 %61 to i32
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %62)
%64 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 2, i64 3
%65 = load i8, i8* %64
%66 = zext i8 %65 to i32
%67 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %66)
%68 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 2, i64 4
%69 = load i8, i8* %68
%70 = zext i8 %69 to i32
%71 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %70)
%72 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 2, i64 5
%73 = load i8, i8* %72
%74 = zext i8 %73 to i32
%75 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %74)
%76 = tail call i32 @putchar(i32 10)
%77 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 3, i64 0
%78 = load i8, i8* %77
%79 = zext i8 %78 to i32
%80 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %79)
%81 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 3, i64 1
%82 = load i8, i8* %81
%83 = zext i8 %82 to i32
%84 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %83)
%85 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 3, i64 2
%86 = load i8, i8* %85
%87 = zext i8 %86 to i32
%88 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %87)
%89 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 3, i64 3
%90 = load i8, i8* %89
%91 = zext i8 %90 to i32
%92 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %91)
%93 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 3, i64 4
%94 = load i8, i8* %93
%95 = zext i8 %94 to i32
%96 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %95)
%97 = getelementptr inbounds [6 x i8], [6 x i8]* %0, i64 3, i64 5
%98 = load i8, i8* %97
%99 = zext i8 %98 to i32
%100 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %99)
%101 = tail call i32 @putchar(i32 10)
ret void
}