#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 uint8_t;

/* Variables and functions */
scalar_t__ isalnum(int);
int /*<<< orphan*/ iscntrl(int);
scalar_t__ isprint(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ putchar(char);
void memdump(void *buf, int nr_bytes, int prefix_white) {
  uint8_t *p;
  int i;
  int j;
  p = (uint8_t *)buf;
  if ((buf == NULL) || (nr_bytes <= 0)) {
    return;
  }
  for (j = 0; j < prefix_white; j++) {
    printf(" ");
  }
  printf("%08p: ", p);
  for (i = 0; i < nr_bytes; i++) {
    printf("%02x ", p[i] & 0xFFu);
    if ((i % 8) == 7) {
      printf("  ");
      for (j = i - 7; j <= i; j++) {
        if (!iscntrl(p[j]) && isprint(p[j])) {
          putchar(p[j]);
        } else if (p[j] == '\t') {
          printf("t");
        } else if (p[j] == '\r') {
          printf("r");
        } else if (p[j] == '\n') {
          printf("n");
        } else {
          putchar('.');
        }
      }
      printf("\n");
      if (i != nr_bytes - 1) {
        for (j = 0; j < prefix_white; j++) {
          printf(" ");
        }
        printf("%08p: ", p + i + 1);
      }
    }
  }
  if ((i % 8) != 0) {
    printf("    ");
    for (j = i / 8 * 8; j < i; j++) {
      if (isalnum(p[j])) {
        putchar(p[j]);
      } else if (p[j] == '\t') {
        printf("\\t");
      } else if (p[j] == '\r') {
        printf("\\r");
      } else if (p[j] == '\n') {
        printf("\\n");
      } else {
        putchar('.');
      }
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<memdump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     117f <memdump+0x2f>
cmpl   $0x0,-0xc(%rbp)
jg     1184 <memdump+0x34>
jmp    14b5 <memdump+0x365>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11b3 <memdump+0x63>
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    118b <memdump+0x3b>
mov    -0x18(%rbp),%rsi
lea    0xe42(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    139b <memdump+0x24b>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
and    $0xff,%esi
lea    0xe17(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x1c(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
cmp    $0x7,%edx
jne    1388 <memdump+0x238>
lea    0xdff(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x1c(%rbp),%eax
sub    $0x7,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     1314 <memdump+0x1c4>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1040 <iscntrl@plt>
cmp    $0x0,%eax
jne    1279 <memdump+0x129>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1070 <isprint@plt>
cmp    $0x0,%rax
je     1279 <memdump+0x129>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
movsbl %al,%edi
call   1030 <putchar@plt>
jmp    1301 <memdump+0x1b1>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
cmpl   $0x9,(%rax,%rcx,4)
jne    129e <memdump+0x14e>
lea    0xd83(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    12fc <memdump+0x1ac>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
cmpl   $0xd,(%rax,%rcx,4)
jne    12c3 <memdump+0x173>
lea    0xd61(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    12f7 <memdump+0x1a7>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
cmpl   $0xa,(%rax,%rcx,4)
jne    12e8 <memdump+0x198>
lea    0xd3f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    12f2 <memdump+0x1a2>
mov    $0x2e,%edi
call   1030 <putchar@plt>
jmp    12f7 <memdump+0x1a7>
jmp    12fc <memdump+0x1ac>
jmp    1301 <memdump+0x1b1>
jmp    1306 <memdump+0x1b6>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1222 <memdump+0xd2>
lea    0xcf2(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x1c(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
je     1383 <memdump+0x233>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1362 <memdump+0x212>
lea    0xcc5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    133a <memdump+0x1ea>
mov    -0x18(%rbp),%rsi
movslq -0x1c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
add    $0x4,%rsi
lea    0xc84(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1388 <memdump+0x238>
jmp    138d <memdump+0x23d>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11cc <memdump+0x7c>
mov    -0x1c(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     14b5 <memdump+0x365>
lea    0xc59(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x1c(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
shl    $0x3,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    14a7 <memdump+0x357>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1060 <isalnum@plt>
cmp    $0x0,%rax
je     140c <memdump+0x2bc>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
movsbl %al,%edi
call   1030 <putchar@plt>
jmp    1494 <memdump+0x344>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
cmpl   $0x9,(%rax,%rcx,4)
jne    1431 <memdump+0x2e1>
lea    0xbef(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    148f <memdump+0x33f>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
cmpl   $0xd,(%rax,%rcx,4)
jne    1456 <memdump+0x306>
lea    0xbcd(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    148a <memdump+0x33a>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
cmpl   $0xa,(%rax,%rcx,4)
jne    147b <memdump+0x32b>
lea    0xbab(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1485 <memdump+0x335>
mov    $0x2e,%edi
call   1030 <putchar@plt>
jmp    148a <memdump+0x33a>
jmp    148f <memdump+0x33f>
jmp    1494 <memdump+0x344>
jmp    1499 <memdump+0x349>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    13ce <memdump+0x27e>
lea    0xb5f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memdump>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
test   %rdi,%rdi
je     1344 <memdump+0x1f4>
mov    %esi,%r14d
test   %esi,%esi
jle    1344 <memdump+0x1f4>
mov    %edx,%r15d
mov    %rdi,%rbx
test   %edx,%edx
jle    11aa <memdump+0x5a>
mov    %r15d,%ebp
nop
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    1180 <memdump+0x30>
lea    0xe6a(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r14d,%r14d
jg     11bb <memdump+0x6b>
jmp    1344 <memdump+0x1f4>
lea    0xe4f(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15d,0xc(%rsp)
lea    -0x1(%r14),%eax
mov    %rax,0x20(%rsp)
mov    %r14,0x10(%rsp)
mov    %r14d,%r15d
lea    -0x1c(%rbx),%r12
xor    %ebp,%ebp
mov    %r15,0x18(%rsp)
jmp    1209 <memdump+0xb9>
xchg   %ax,%ax
add    $0x4,%r13
lea    0xe15(%rip),%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rbx
add    $0x1,%rbp
add    $0x4,%r12
cmp    %r15,%rbp
je     12f4 <memdump+0x1a4>
movzbl (%rbx,%rbp,4),%esi
lea    0xdf3(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %ebp,%eax
not    %eax
test   $0x7,%al
jne    11f8 <memdump+0xa8>
lea    (%rbx,%rbp,4),%r13
lea    0xde1(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %r15d,%r15d
jmp    124f <memdump+0xff>
mov    $0x2e,%edi
nop
call   1030 <putchar@plt>
add    $0x1,%r15
cmp    $0x8,%r15
je     12b0 <memdump+0x160>
mov    (%r12,%r15,4),%r14d
mov    %r14d,%edi
call   1040 <iscntrl@plt>
test   %eax,%eax
je     1280 <memdump+0x130>
cmp    $0xd,%r14d
je     1297 <memdump+0x147>
cmp    $0xa,%r14d
je     129e <memdump+0x14e>
cmp    $0x9,%r14d
jne    123a <memdump+0xea>
mov    $0x74,%edi
jmp    1240 <memdump+0xf0>
nopl   0x0(%rax,%rax,1)
mov    %r14d,%edi
call   1070 <isprint@plt>
mov    (%r12,%r15,4),%r14d
test   %rax,%rax
je     125f <memdump+0x10f>
movsbl %r14b,%edi
jmp    1240 <memdump+0xf0>
mov    $0x72,%edi
jmp    1240 <memdump+0xf0>
mov    $0x6e,%edi
jmp    1240 <memdump+0xf0>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
cmp    0x20(%rsp),%rbp
mov    0x18(%rsp),%r15
je     11f8 <memdump+0xa8>
mov    %rbx,%r14
cmpl   $0x0,0xc(%rsp)
jle    11e0 <memdump+0x90>
mov    0xc(%rsp),%ebx
nopl   0x0(%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    12e0 <memdump+0x190>
jmp    11e0 <memdump+0x90>
mov    0x10(%rsp),%r14
test   $0x7,%r14b
je     1344 <memdump+0x1f4>
lea    0xd07(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14d,%eax
and    $0x7ffffff8,%eax
cmp    %r14d,%eax
jae    13a0 <memdump+0x250>
mov    %r14d,%ebp
and    $0xfffffff8,%ebp
mov    %ebp,%r13d
add    %r14d,%r13d
sub    %eax,%r13d
lea    0xce1(%rip),%r14
lea    0xcdd(%rip),%r12
lea    0xcd0(%rip),%r15
jmp    1366 <memdump+0x216>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r13
je     13a0 <memdump+0x250>
mov    (%rbx,%rbp,4),%edi
call   1060 <isalnum@plt>
mov    (%rbx,%rbp,4),%ecx
test   %rax,%rax
je     1380 <memdump+0x230>
movsbl %cl,%edi
call   1030 <putchar@plt>
jmp    135d <memdump+0x20d>
cmp    $0xd,%ecx
je     1394 <memdump+0x244>
cmp    $0xa,%ecx
je     1353 <memdump+0x203>
cmp    $0x9,%ecx
jne    1399 <memdump+0x249>
mov    %r15,%rdi
jmp    1356 <memdump+0x206>
mov    %r14,%rdi
jmp    1356 <memdump+0x206>
mov    $0x2e,%edi
jmp    1379 <memdump+0x229>
mov    $0xa,%edi
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str.1 = [7 x i8] c"%08p: \00"
@.str.2 = [6 x i8] c"%02x \00"
@.str.3 = [3 x i8] c" \00"
@.str.8 = [5 x i8] c" \00"
@.str.9 = [3 x i8] c"\\t\00"
@.str.10 = [3 x i8] c"\\r\00"
@.str.11 = [3 x i8] c"\\n\00"
define void @memdump(i8* %0, i32 %1, i32 %2) {
%4 = bitcast i8* %0 to i32*
%5 = icmp eq i8* %0, null
%6 = icmp slt i32 %1, 1
%7 = or i1 %5, %6
br i1 %7, label %117, label %8
8: ; preds = %3
%9 = icmp sgt i32 %2, 0
br i1 %9, label %12, label %10
10: ; preds = %8
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %20
12: ; preds = %8, %12
%13 = phi i32 [ %15, %12 ], [ 0, %8 ]
%14 = tail call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 32)
%15 = add nuw nsw i32 %13, 1
%16 = icmp eq i32 %15, %2
br i1 %16, label %17, label %12
17: ; preds = %12
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%19 = icmp sgt i32 %1, 0
br i1 %19, label %20, label %117
20: ; preds = %10, %17
%21 = add nsw i32 %1, -1
%22 = zext i32 %21 to i64
%23 = zext i32 %1 to i64
br label %24
24: ; preds = %20, %74
%25 = phi i64 [ 0, %20 ], [ %75, %74 ]
%26 = phi i64 [ 1, %20 ], [ %77, %74 ]
%27 = phi i64 [ -7, %20 ], [ %76, %74 ]
%28 = getelementptr inbounds i32, i32* %4, i64 %25
%29 = load i32, i32* %28
%30 = and i32 %29, 255
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %30)
%32 = and i64 %25, 7
%33 = icmp eq i64 %32, 7
br i1 %33, label %34, label %74
34: ; preds = %24
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %36
36: ; preds = %34, %59
%37 = phi i64 [ %27, %34 ], [ %60, %59 ]
%38 = getelementptr inbounds i32, i32* %4, i64 %37
%39 = load i32, i32* %38
%40 = tail call i32 @iscntrl(i32 %39)
%41 = icmp eq i32 %40, 0
br i1 %41, label %42, label %49
42: ; preds = %36
%43 = tail call i64 @isprint(i32 %39)
%44 = icmp eq i64 %43, 0
%45 = load i32, i32* %38
br i1 %44, label %49, label %46
46: ; preds = %42
%47 = trunc i32 %45 to i8
%48 = tail call i32 @putchar(i8 signext %47)
br label %59
49: ; preds = %42, %36
%50 = phi i32 [ %39, %36 ], [ %45, %42 ]
switch i32 %50, label %57 [
i32 9, label %51
i32 13, label %53
i32 10, label %55
]
51: ; preds = %49
%52 = tail call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 116)
br label %59
53: ; preds = %49
%54 = tail call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 114)
br label %59
55: ; preds = %49
%56 = tail call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 110)
br label %59
57: ; preds = %49
%58 = tail call i32 @putchar(i8 signext 46)
br label %59
59: ; preds = %46, %53, %57, %55, %51
%60 = add nsw i64 %37, 1
%61 = icmp eq i64 %60, %26
br i1 %61, label %62, label %36
62: ; preds = %59
%63 = tail call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 10)
%64 = icmp eq i64 %25, %22
br i1 %64, label %74, label %65
65: ; preds = %62
br i1 %9, label %66, label %71
66: ; preds = %65, %66
%67 = phi i32 [ %69, %66 ], [ 0, %65 ]
%68 = tail call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 32)
%69 = add nuw nsw i32 %67, 1
%70 = icmp eq i32 %69, %2
br i1 %70, label %71, label %66
71: ; preds = %66, %65
%72 = getelementptr inbounds i32, i32* %28, i64 1
%73 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %72)
br label %74
74: ; preds = %24, %71, %62
%75 = add nuw nsw i64 %25, 1
%76 = add nsw i64 %27, 1
%77 = add nuw nsw i64 %26, 1
%78 = icmp eq i64 %75, %23
br i1 %78, label %79, label %24
79: ; preds = %74
%80 = and i32 %1, 7
%81 = icmp eq i32 %80, 0
br i1 %81, label %117, label %82
82: ; preds = %79
%83 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%84 = and i32 %1, 2147483640
%85 = icmp ult i32 %84, %1
br i1 %85, label %86, label %115
86: ; preds = %82
%87 = and i32 %1, -8
%88 = zext i32 %87 to i64
%89 = and i32 %1, -8
%90 = add i32 %89, %1
%91 = sub i32 %90, %84
%92 = zext i32 %91 to i64
br label %93
93: ; preds = %86, %112
%94 = phi i64 [ %88, %86 ], [ %113, %112 ]
%95 = getelementptr inbounds i32, i32* %4, i64 %94
%96 = load i32, i32* %95
%97 = tail call i64 @isalnum(i32 %96)
%98 = icmp eq i64 %97, 0
%99 = load i32, i32* %95
br i1 %98, label %103, label %100
100: ; preds = %93
%101 = trunc i32 %99 to i8
%102 = tail call i32 @putchar(i8 signext %101)
br label %112
103: ; preds = %93
switch i32 %99, label %110 [
i32 9, label %104
i32 13, label %106
i32 10, label %108
]
104: ; preds = %103
%105 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
br label %112
106: ; preds = %103
%107 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
br label %112
108: ; preds = %103
%109 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
br label %112
110: ; preds = %103
%111 = tail call i32 @putchar(i8 signext 46)
br label %112
112: ; preds = %100, %106, %110, %108, %104
%113 = add nuw nsw i64 %94, 1
%114 = icmp eq i64 %113, %92
br i1 %114, label %115, label %93
115: ; preds = %112, %82
%116 = tail call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 10)
br label %117
117: ; preds = %17, %79, %115, %3
ret void
}