#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*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
extern void hexdump(FILE *stream, void const *data, unsigned int len) {
  unsigned int i;
  unsigned int r, c;
  if (!stream)
    return;
  if (!data)
    return;
  for (r = 0, i = 0; r < (len / 16 + (len % 16 != 0)); r++, i += 16) {
    fprintf(stream, "%04X:   ", i);
    for (c = i; c < i + 8; c++)
      if (c < len)
        fprintf(stream, "%02X ", ((unsigned char const *)data)[c]);
      else
        fprintf(stream, "   ");
    fprintf(stream, "  ");
    for (c = i + 8; c < i + 16; c++)
      if (c < len)
        fprintf(stream, "%02X ", ((unsigned char const *)data)[c]);
      else
        fprintf(stream, "   ");
    fprintf(stream, "   ");
    for (c = i; c < i + 16; c++)
      if (c < len)
        if (((unsigned char const *)data)[c] >= 32 &&
            ((unsigned char const *)data)[c] < 127)
          fprintf(stream, "%c", ((char const *)data)[c]);
        else
          fprintf(stream, ".");
      else
        fprintf(stream, " ");
    fprintf(stream, "\n");
  }
  fflush(stream);
}


x86 assembly (clang, -O0):
<hexdump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1143 <hexdump+0x23>
jmp    1371 <hexdump+0x251>
cmpq   $0x0,-0x10(%rbp)
jne    1153 <hexdump+0x33>
jmp    1371 <hexdump+0x251>
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x14(%rbp),%ecx
shr    $0x4,%ecx
mov    -0x14(%rbp),%edx
and    $0xf,%edx
cmp    $0x0,%edx
setne  %dl
and    $0x1,%dl
movzbl %dl,%edx
add    %edx,%ecx
cmp    %ecx,%eax
jae    1368 <hexdump+0x248>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%edx
lea    0xe6c(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x18(%rbp),%ecx
add    $0x8,%ecx
cmp    %ecx,%eax
jae    1205 <hexdump+0xe5>
mov    -0x20(%rbp),%eax
cmp    -0x14(%rbp),%eax
jae    11e0 <hexdump+0xc0>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
movzbl (%rax,%rcx,1),%edx
lea    0xe35(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    11f2 <hexdump+0xd2>
mov    -0x8(%rbp),%rdi
lea    0xe1a(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    11f7 <hexdump+0xd7>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11a1 <hexdump+0x81>
mov    -0x8(%rbp),%rdi
lea    0xdf6(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x18(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x18(%rbp),%ecx
add    $0x10,%ecx
cmp    %ecx,%eax
jae    1284 <hexdump+0x164>
mov    -0x20(%rbp),%eax
cmp    -0x14(%rbp),%eax
jae    125f <hexdump+0x13f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
movzbl (%rax,%rcx,1),%edx
lea    0xdb6(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    1271 <hexdump+0x151>
mov    -0x8(%rbp),%rdi
lea    0xd9b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    1276 <hexdump+0x156>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1220 <hexdump+0x100>
mov    -0x8(%rbp),%rdi
lea    0xd76(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x18(%rbp),%ecx
add    $0x10,%ecx
cmp    %ecx,%eax
jae    133f <hexdump+0x21f>
mov    -0x20(%rbp),%eax
cmp    -0x14(%rbp),%eax
jae    131a <hexdump+0x1fa>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
movzbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jl     1303 <hexdump+0x1e3>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
movzbl (%rax,%rcx,1),%eax
cmp    $0x7f,%eax
jge    1303 <hexdump+0x1e3>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
movsbl (%rax,%rcx,1),%edx
lea    0xd18(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    1315 <hexdump+0x1f5>
mov    -0x8(%rbp),%rdi
lea    0xd04(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    132c <hexdump+0x20c>
mov    -0x8(%rbp),%rdi
lea    0xce2(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    1331 <hexdump+0x211>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    129c <hexdump+0x17c>
mov    -0x8(%rbp),%rdi
lea    0xcca(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
add    $0x10,%eax
mov    %eax,-0x18(%rbp)
jmp    1161 <hexdump+0x41>
mov    -0x8(%rbp),%rdi
call   1040 <fflush@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexdump>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
test   %rdi,%rdi
je     1677 <hexdump+0x537>
mov    %rsi,%r14
test   %rsi,%rsi
je     1677 <hexdump+0x537>
mov    %rdi,%rbx
mov    %edx,%eax
shr    $0x4,%eax
xor    %ecx,%ecx
test   $0xf,%dl
setne  %cl
add    %eax,%ecx
mov    %ecx,(%rsp)
je     1686 <hexdump+0x546>
mov    %edx,%r13d
mov    $0x8,%r12d
lea    0xe7b(%rip),%rbp
xor    %r15d,%r15d
xor    %eax,%eax
jmp    11cd <hexdump+0x8d>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0xa,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
mov    0x4(%rsp),%eax
add    $0x1,%eax
add    $0x10,%r12
mov    0x8(%rsp),%r15
cmp    (%rsp),%eax
lea    0xe42(%rip),%rbp
je     1686 <hexdump+0x546>
mov    %eax,0x4(%rsp)
mov    %rbx,%rdi
lea    0xe25(%rip),%rsi
mov    %r15d,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
cmp    %r13,%r15
jae    1200 <hexdump+0xc0>
movzbl (%r14,%r15,1),%edx
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    1219 <hexdump+0xd9>
xchg   %ax,%ax
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xdf4(%rip),%rdi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %r15,%rax
or     $0x1,%rax
cmp    %r13,%rax
jae    1240 <hexdump+0x100>
movzbl (%r14,%rax,1),%edx
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    1259 <hexdump+0x119>
nopl   0x0(%rax)
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xdb4(%rip),%rdi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %r15,%rax
or     $0x2,%rax
cmp    %r13,%rax
jae    1280 <hexdump+0x140>
movzbl (%r14,%rax,1),%edx
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    1299 <hexdump+0x159>
nopl   0x0(%rax)
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xd74(%rip),%rdi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %r15,%rax
or     $0x3,%rax
cmp    %r13,%rax
jae    12c0 <hexdump+0x180>
movzbl (%r14,%rax,1),%edx
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    12d9 <hexdump+0x199>
nopl   0x0(%rax)
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xd34(%rip),%rdi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %r15,%rax
or     $0x4,%rax
cmp    %r13,%rax
jae    1300 <hexdump+0x1c0>
movzbl (%r14,%rax,1),%edx
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    1319 <hexdump+0x1d9>
nopl   0x0(%rax)
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xcf4(%rip),%rdi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %r15,%rax
or     $0x5,%rax
cmp    %r13,%rax
jae    1340 <hexdump+0x200>
movzbl (%r14,%rax,1),%edx
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    1359 <hexdump+0x219>
nopl   0x0(%rax)
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xcb4(%rip),%rdi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %r15,%rax
or     $0x6,%rax
cmp    %r13,%rax
mov    %r12,0x10(%rsp)
jae    1380 <hexdump+0x240>
movzbl (%r14,%rax,1),%edx
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    1399 <hexdump+0x259>
xchg   %ax,%ax
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xc74(%rip),%rdi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %r15,%r12
or     $0x8,%r12
mov    %r15,%rax
or     $0x7,%rax
cmp    %r13,%rax
jae    13c0 <hexdump+0x280>
movzbl (%r14,%rax,1),%edx
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    13d9 <hexdump+0x299>
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xc34(%rip),%rdi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xc1c(%rip),%rdi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0x10(%r15),%rbp
mov    %rbp,0x8(%rsp)
and    $0xfffffff0,%ebp
cmp    %rbp,%r12
mov    0x10(%rsp),%r12
jae    1609 <hexdump+0x4c9>
cmp    %r13,%r12
jae    1430 <hexdump+0x2f0>
movzbl (%r14,%r12,1),%edx
mov    %rbx,%rdi
lea    0xbe9(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    1449 <hexdump+0x309>
nopl   0x0(%rax)
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xbc4(%rip),%rdi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %r12,%rax
or     $0x1,%rax
cmp    %r13,%rax
jae    1470 <hexdump+0x330>
movzbl (%r14,%rax,1),%edx
mov    %rbx,%rdi
lea    0xba5(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    1489 <hexdump+0x349>
nopl   (%rax)
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xb84(%rip),%rdi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %r12,%rax
or     $0x2,%rax
cmp    %r13,%rax
jae    14b0 <hexdump+0x370>
movzbl (%r14,%rax,1),%edx
mov    %rbx,%rdi
lea    0xb65(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    14c9 <hexdump+0x389>
nopl   (%rax)
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xb44(%rip),%rdi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %r12,%rax
or     $0x3,%rax
cmp    %r13,%rax
jae    14f0 <hexdump+0x3b0>
movzbl (%r14,%rax,1),%edx
mov    %rbx,%rdi
lea    0xb25(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    1509 <hexdump+0x3c9>
nopl   (%rax)
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xb04(%rip),%rdi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %r12,%rax
or     $0x4,%rax
cmp    %r13,%rax
jae    1530 <hexdump+0x3f0>
movzbl (%r14,%rax,1),%edx
mov    %rbx,%rdi
lea    0xae5(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    1549 <hexdump+0x409>
nopl   (%rax)
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xac4(%rip),%rdi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %r12,%rax
or     $0x5,%rax
cmp    %r13,%rax
jae    1570 <hexdump+0x430>
movzbl (%r14,%rax,1),%edx
mov    %rbx,%rdi
lea    0xaa5(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    1589 <hexdump+0x449>
nopl   (%rax)
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xa84(%rip),%rdi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %r12,%rax
or     $0x6,%rax
cmp    %r13,%rax
jae    15b0 <hexdump+0x470>
movzbl (%r14,%rax,1),%edx
mov    %rbx,%rdi
lea    0xa65(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    15c9 <hexdump+0x489>
nopl   (%rax)
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xa44(%rip),%rdi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %r12,%rax
or     $0x7,%rax
cmp    %r13,%rax
jae    15f0 <hexdump+0x4b0>
movzbl (%r14,%rax,1),%edx
mov    %rbx,%rdi
lea    0xa25(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    1609 <hexdump+0x4c9>
nopl   (%rax)
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xa04(%rip),%rdi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    $0x3,%esi
mov    $0x1,%edx
lea    0x9eb(%rip),%rdi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    $0xfffffff0,%eax
cmp    %rax,%r15
jne    1655 <hexdump+0x515>
jmp    11a0 <hexdump+0x60>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rsi
call   1030 <fputc@plt>
add    $0x1,%r15
cmp    %rbp,%r15
jae    11a0 <hexdump+0x60>
mov    $0x20,%edi
cmp    %r13,%r15
jae    1640 <hexdump+0x500>
movzbl (%r14,%r15,1),%eax
lea    -0x20(%rax),%ecx
cmp    $0x5f,%cl
mov    $0x2e,%ecx
cmovae %ecx,%eax
movzbl %al,%edi
jmp    1640 <hexdump+0x500>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rbx,%rdi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <fflush@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%04X: \00"
@.str.1 = [6 x i8] c"%02X \00"
@.str.2 = [4 x i8] c" \00"
@.str.3 = [3 x i8] c" \00"
@.str.4 = [3 x i8] c"%c\00"
@.str.5 = [2 x i8] c".\00"
@.str.6 = [2 x i8] c" \00"
@.str.7 = [2 x i8] c"\0A\00"
define void @hexdump(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%10 = load i32*, i32** %4
%11 = icmp ne i32* %10, null
br i1 %11, label %13, label %12
12: ; preds = %3
br label %148
13: ; preds = %3
%14 = load i8*, i8** %5
%15 = icmp ne i8* %14, null
br i1 %15, label %17, label %16
16: ; preds = %13
br label %148
17: ; preds = %13
store i32 0, i32* %8
store i32 0, i32* %7
br label %18
18: ; preds = %140, %17
%19 = load i32, i32* %8
%20 = load i32, i32* %6
%21 = udiv i32 %20, 16
%22 = load i32, i32* %6
%23 = urem i32 %22, 16
%24 = icmp ne i32 %23, 0
%25 = zext i1 %24 to i32
%26 = add i32 %21, %25
%27 = icmp ult i32 %19, %26
br i1 %27, label %28, label %145
28: ; preds = %18
%29 = load i32*, i32** %4
%30 = load i32, i32* %7
%31 = call i32 (i32*, i8*, ...) @fprintf(i32* %29, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %30)
%32 = load i32, i32* %7
store i32 %32, i32* %9
br label %33
33: ; preds = %55, %28
%34 = load i32, i32* %9
%35 = load i32, i32* %7
%36 = add i32 %35, 8
%37 = icmp ult i32 %34, %36
br i1 %37, label %38, label %58
38: ; preds = %33
%39 = load i32, i32* %9
%40 = load i32, i32* %6
%41 = icmp ult i32 %39, %40
br i1 %41, label %42, label %51
42: ; preds = %38
%43 = load i32*, i32** %4
%44 = load i8*, i8** %5
%45 = load i32, i32* %9
%46 = zext i32 %45 to i64
%47 = getelementptr inbounds i8, i8* %44, i64 %46
%48 = load i8, i8* %47
%49 = zext i8 %48 to i32
%50 = call i32 (i32*, i8*, ...) @fprintf(i32* %43, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %49)
br label %54
51: ; preds = %38
%52 = load i32*, i32** %4
%53 = call i32 (i32*, i8*, ...) @fprintf(i32* %52, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %54
54: ; preds = %51, %42
br label %55
55: ; preds = %54
%56 = load i32, i32* %9
%57 = add i32 %56, 1
store i32 %57, i32* %9
br label %33
58: ; preds = %33
%59 = load i32*, i32** %4
%60 = call i32 (i32*, i8*, ...) @fprintf(i32* %59, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%61 = load i32, i32* %7
%62 = add i32 %61, 8
store i32 %62, i32* %9
br label %63
63: ; preds = %85, %58
%64 = load i32, i32* %9
%65 = load i32, i32* %7
%66 = add i32 %65, 16
%67 = icmp ult i32 %64, %66
br i1 %67, label %68, label %88
68: ; preds = %63
%69 = load i32, i32* %9
%70 = load i32, i32* %6
%71 = icmp ult i32 %69, %70
br i1 %71, label %72, label %81
72: ; preds = %68
%73 = load i32*, i32** %4
%74 = load i8*, i8** %5
%75 = load i32, i32* %9
%76 = zext i32 %75 to i64
%77 = getelementptr inbounds i8, i8* %74, i64 %76
%78 = load i8, i8* %77
%79 = zext i8 %78 to i32
%80 = call i32 (i32*, i8*, ...) @fprintf(i32* %73, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %79)
br label %84
81: ; preds = %68
%82 = load i32*, i32** %4
%83 = call i32 (i32*, i8*, ...) @fprintf(i32* %82, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %84
84: ; preds = %81, %72
br label %85
85: ; preds = %84
%86 = load i32, i32* %9
%87 = add i32 %86, 1
store i32 %87, i32* %9
br label %63
88: ; preds = %63
%89 = load i32*, i32** %4
%90 = call i32 (i32*, i8*, ...) @fprintf(i32* %89, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%91 = load i32, i32* %7
store i32 %91, i32* %9
br label %92
92: ; preds = %134, %88
%93 = load i32, i32* %9
%94 = load i32, i32* %7
%95 = add i32 %94, 16
%96 = icmp ult i32 %93, %95
br i1 %96, label %97, label %137
97: ; preds = %92
%98 = load i32, i32* %9
%99 = load i32, i32* %6
%100 = icmp ult i32 %98, %99
br i1 %100, label %101, label %130
101: ; preds = %97
%102 = load i8*, i8** %5
%103 = load i32, i32* %9
%104 = zext i32 %103 to i64
%105 = getelementptr inbounds i8, i8* %102, i64 %104
%106 = load i8, i8* %105
%107 = zext i8 %106 to i32
%108 = icmp sge i32 %107, 32
br i1 %108, label %109, label %126
109: ; preds = %101
%110 = load i8*, i8** %5
%111 = load i32, i32* %9
%112 = zext i32 %111 to i64
%113 = getelementptr inbounds i8, i8* %110, i64 %112
%114 = load i8, i8* %113
%115 = zext i8 %114 to i32
%116 = icmp slt i32 %115, 127
br i1 %116, label %117, label %126
117: ; preds = %109
%118 = load i32*, i32** %4
%119 = load i8*, i8** %5
%120 = load i32, i32* %9
%121 = zext i32 %120 to i64
%122 = getelementptr inbounds i8, i8* %119, i64 %121
%123 = load i8, i8* %122
%124 = sext i8 %123 to i32
%125 = call i32 (i32*, i8*, ...) @fprintf(i32* %118, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %124)
br label %129
126: ; preds = %109, %101
%127 = load i32*, i32** %4
%128 = call i32 (i32*, i8*, ...) @fprintf(i32* %127, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %129
129: ; preds = %126, %117
br label %133
130: ; preds = %97
%131 = load i32*, i32** %4
%132 = call i32 (i32*, i8*, ...) @fprintf(i32* %131, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %133
133: ; preds = %130, %129
br label %134
134: ; preds = %133
%135 = load i32, i32* %9
%136 = add i32 %135, 1
store i32 %136, i32* %9
br label %92
137: ; preds = %92
%138 = load i32*, i32** %4
%139 = call i32 (i32*, i8*, ...) @fprintf(i32* %138, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %140
140: ; preds = %137
%141 = load i32, i32* %8
%142 = add i32 %141, 1
store i32 %142, i32* %8
%143 = load i32, i32* %7
%144 = add i32 %143, 16
store i32 %144, i32* %7
br label %18
145: ; preds = %18
%146 = load i32*, i32** %4
%147 = call i32 @fflush(i32* %146)
br label %148
148: ; preds = %145, %16, %12
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%04X: \00"
@.str.1 = [6 x i8] c"%02X \00"
@.str.2 = [4 x i8] c" \00"
@.str.3 = [3 x i8] c" \00"
define void @hexdump(i32* %0, i8* %1, i32 %2) {
%4 = icmp eq i32* %0, null
%5 = icmp eq i8* %1, null
%6 = or i1 %4, %5
br i1 %6, label %210, label %7
7: ; preds = %3
%8 = lshr i32 %2, 4
%9 = and i32 %2, 15
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i32
%12 = add nuw nsw i32 %8, %11
%13 = icmp eq i32 %12, 0
br i1 %13, label %208, label %14
14: ; preds = %7
%15 = zext i32 %2 to i64
br label %16
16: ; preds = %203, %14
%17 = phi i64 [ 8, %14 ], [ %206, %203 ]
%18 = phi i64 [ 0, %14 ], [ %103, %203 ]
%19 = phi i32 [ 0, %14 ], [ %205, %203 ]
%20 = trunc i64 %18 to i32
%21 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = or i64 %18, 8
%23 = icmp ult i64 %18, %15
br i1 %23, label %24, label %29
24: ; preds = %16
%25 = getelementptr inbounds i8, i8* %1, i64 %18
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %27)
br label %31
29: ; preds = %16
%30 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 3, i64 1, i32* %0)
br label %31
31: ; preds = %24, %29
%32 = or i64 %18, 1
%33 = icmp ult i64 %32, %15
br i1 %33, label %36, label %34
34: ; preds = %31
%35 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 3, i64 1, i32* %0)
br label %41
36: ; preds = %31
%37 = getelementptr inbounds i8, i8* %1, i64 %32
%38 = load i8, i8* %37
%39 = zext i8 %38 to i32
%40 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %39)
br label %41
41: ; preds = %36, %34
%42 = or i64 %18, 2
%43 = icmp ult i64 %42, %15
br i1 %43, label %46, label %44
44: ; preds = %41
%45 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 3, i64 1, i32* %0)
br label %51
46: ; preds = %41
%47 = getelementptr inbounds i8, i8* %1, i64 %42
%48 = load i8, i8* %47
%49 = zext i8 %48 to i32
%50 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %49)
br label %51
51: ; preds = %46, %44
%52 = or i64 %18, 3
%53 = icmp ult i64 %52, %15
br i1 %53, label %56, label %54
54: ; preds = %51
%55 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 3, i64 1, i32* %0)
br label %61
56: ; preds = %51
%57 = getelementptr inbounds i8, i8* %1, i64 %52
%58 = load i8, i8* %57
%59 = zext i8 %58 to i32
%60 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %59)
br label %61
61: ; preds = %56, %54
%62 = or i64 %18, 4
%63 = icmp ult i64 %62, %15
br i1 %63, label %66, label %64
64: ; preds = %61
%65 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 3, i64 1, i32* %0)
br label %71
66: ; preds = %61
%67 = getelementptr inbounds i8, i8* %1, i64 %62
%68 = load i8, i8* %67
%69 = zext i8 %68 to i32
%70 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %69)
br label %71
71: ; preds = %66, %64
%72 = or i64 %18, 5
%73 = icmp ult i64 %72, %15
br i1 %73, label %76, label %74
74: ; preds = %71
%75 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 3, i64 1, i32* %0)
br label %81
76: ; preds = %71
%77 = getelementptr inbounds i8, i8* %1, i64 %72
%78 = load i8, i8* %77
%79 = zext i8 %78 to i32
%80 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %79)
br label %81
81: ; preds = %76, %74
%82 = or i64 %18, 6
%83 = icmp ult i64 %82, %15
br i1 %83, label %86, label %84
84: ; preds = %81
%85 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 3, i64 1, i32* %0)
br label %91
86: ; preds = %81
%87 = getelementptr inbounds i8, i8* %1, i64 %82
%88 = load i8, i8* %87
%89 = zext i8 %88 to i32
%90 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %89)
br label %91
91: ; preds = %86, %84
%92 = or i64 %18, 7
%93 = icmp ult i64 %92, %15
br i1 %93, label %96, label %94
94: ; preds = %91
%95 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 3, i64 1, i32* %0)
br label %101
96: ; preds = %91
%97 = getelementptr inbounds i8, i8* %1, i64 %92
%98 = load i8, i8* %97
%99 = zext i8 %98 to i32
%100 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %99)
br label %101
101: ; preds = %94, %96
%102 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 2, i64 1, i32* %0)
%103 = add nuw nsw i64 %18, 16
%104 = and i64 %103, 4294967280
%105 = icmp ult i64 %22, %104
br i1 %105, label %106, label %185
106: ; preds = %101
%107 = icmp ult i64 %17, %15
br i1 %107, label %108, label %113
108: ; preds = %106
%109 = getelementptr inbounds i8, i8* %1, i64 %17
%110 = load i8, i8* %109
%111 = zext i8 %110 to i32
%112 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %111)
br label %115
113: ; preds = %106
%114 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 3, i64 1, i32* %0)
br label %115
115: ; preds = %108, %113
%116 = or i64 %17, 1
%117 = icmp ult i64 %116, %15
br i1 %117, label %120, label %118
118: ; preds = %115
%119 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 3, i64 1, i32* %0)
br label %125
120: ; preds = %115
%121 = getelementptr inbounds i8, i8* %1, i64 %116
%122 = load i8, i8* %121
%123 = zext i8 %122 to i32
%124 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %123)
br label %125
125: ; preds = %120, %118
%126 = or i64 %17, 2
%127 = icmp ult i64 %126, %15
br i1 %127, label %130, label %128
128: ; preds = %125
%129 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 3, i64 1, i32* %0)
br label %135
130: ; preds = %125
%131 = getelementptr inbounds i8, i8* %1, i64 %126
%132 = load i8, i8* %131
%133 = zext i8 %132 to i32
%134 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %133)
br label %135
135: ; preds = %130, %128
%136 = or i64 %17, 3
%137 = icmp ult i64 %136, %15
br i1 %137, label %140, label %138
138: ; preds = %135
%139 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 3, i64 1, i32* %0)
br label %145
140: ; preds = %135
%141 = getelementptr inbounds i8, i8* %1, i64 %136
%142 = load i8, i8* %141
%143 = zext i8 %142 to i32
%144 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %143)
br label %145
145: ; preds = %140, %138
%146 = or i64 %17, 4
%147 = icmp ult i64 %146, %15
br i1 %147, label %150, label %148
148: ; preds = %145
%149 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 3, i64 1, i32* %0)
br label %155
150: ; preds = %145
%151 = getelementptr inbounds i8, i8* %1, i64 %146
%152 = load i8, i8* %151
%153 = zext i8 %152 to i32
%154 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %153)
br label %155
155: ; preds = %150, %148
%156 = or i64 %17, 5
%157 = icmp ult i64 %156, %15
br i1 %157, label %160, label %158
158: ; preds = %155
%159 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 3, i64 1, i32* %0)
br label %165
160: ; preds = %155
%161 = getelementptr inbounds i8, i8* %1, i64 %156
%162 = load i8, i8* %161
%163 = zext i8 %162 to i32
%164 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %163)
br label %165
165: ; preds = %160, %158
%166 = or i64 %17, 6
%167 = icmp ult i64 %166, %15
br i1 %167, label %170, label %168
168: ; preds = %165
%169 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 3, i64 1, i32* %0)
br label %175
170: ; preds = %165
%171 = getelementptr inbounds i8, i8* %1, i64 %166
%172 = load i8, i8* %171
%173 = zext i8 %172 to i32
%174 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %173)
br label %175
175: ; preds = %170, %168
%176 = or i64 %17, 7
%177 = icmp ult i64 %176, %15
br i1 %177, label %180, label %178
178: ; preds = %175
%179 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 3, i64 1, i32* %0)
br label %185
180: ; preds = %175
%181 = getelementptr inbounds i8, i8* %1, i64 %176
%182 = load i8, i8* %181
%183 = zext i8 %182 to i32
%184 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %183)
br label %185
185: ; preds = %178, %180, %101
%186 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 3, i64 1, i32* %0)
%187 = icmp eq i64 %18, 4294967280
br i1 %187, label %203, label %188
188: ; preds = %185, %198
%189 = phi i64 [ %201, %198 ], [ %18, %185 ]
%190 = icmp ult i64 %189, %15
br i1 %190, label %191, label %198
191: ; preds = %188
%192 = getelementptr inbounds i8, i8* %1, i64 %189
%193 = load i8, i8* %192
%194 = add i8 %193, -32
%195 = icmp ult i8 %194, 95
%196 = select i1 %195, i8 %193, i8 46
%197 = zext i8 %196 to i32
br label %198
198: ; preds = %191, %188
%199 = phi i32 [ 32, %188 ], [ %197, %191 ]
%200 = tail call i32 @fputc(i32 %199, i32* %0)
%201 = add nuw nsw i64 %189, 1
%202 = icmp ult i64 %201, %104
br i1 %202, label %188, label %203
203: ; preds = %198, %185
%204 = tail call i32 @fputc(i32 10, i32* %0)
%205 = add nuw nsw i32 %19, 1
%206 = add nuw nsw i64 %17, 16
%207 = icmp eq i32 %205, %12
br i1 %207, label %208, label %16
208: ; preds = %203, %7
%209 = tail call i32 @fflush(i32* %0)
br label %210
210: ; preds = %3, %208
ret void
}