#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*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, ...);
int /*<<< orphan*/ stdout;
void rtv_hex_dump(char *tag, unsigned long address, unsigned char *buf,
                  size_t sz, int ascii_decode_bool) {
  unsigned int rows, row, col, i, c;
  unsigned long addr;
  char tmpstr[512];
  char *strp = tmpstr;
  fprintf(stdout, "HEXDUMP: %s\n", tag);
  rows = (sz + 15) / 16;
  for (row = 0; row < rows; row++) {
    addr = address + (row * 16);
    strp += sprintf(strp, "0x%08lx | ", addr);
    for (col = 0; col < 16; col++) {
      i = row * 16 + col;
      if (i < sz) {
        strp += sprintf(strp, "%02x", buf[i]);
      } else {
        strp += sprintf(strp, "  ");
      }
      if ((i & 3) == 3) {
        strp += sprintf(strp, " ");
      }
    }
    if (ascii_decode_bool) {
      strp += sprintf(strp, "  |  ");
      for (col = 0; col < 16; col++) {
        i = row * 16 + col;
        if (i < sz) {
          c = buf[i];
          strp += sprintf(strp, "%c", (c >= ' ' && c <= '~') ? c : '.');
        } else {
          strp += sprintf(strp, " ");
        }
        if ((i & 3) == 3) {
          strp += sprintf(strp, " ");
        }
      }
      fprintf(stdout, "%s |\n", tmpstr);
    } else {
      fprintf(stdout, "%s\n", tmpstr);
    }
    strp = tmpstr;
  }
}


x86 assembly (clang, -O0):
<rtv_hex_dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x260,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
lea    -0x240(%rbp),%rax
mov    %rax,-0x248(%rbp)
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe9f(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x20(%rbp),%rax
add    $0xf,%rax
shr    $0x4,%rax
mov    %eax,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x28(%rbp),%eax
jae    145b <rtv_hex_dump+0x33b>
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
shl    $0x4,%ecx
mov    %ecx,%ecx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x248(%rbp),%rdi
mov    -0x40(%rbp),%rdx
lea    0xe60(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
mov    %eax,%ecx
mov    -0x248(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x248(%rbp)
movl   $0x0,-0x30(%rbp)
cmpl   $0x10,-0x30(%rbp)
jae    12a7 <rtv_hex_dump+0x187>
mov    -0x2c(%rbp),%eax
shl    $0x4,%eax
add    -0x30(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x20(%rbp),%rax
jae    122f <rtv_hex_dump+0x10f>
mov    -0x248(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
movzbl (%rax,%rcx,1),%edx
lea    0xe0b(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
mov    %eax,%ecx
mov    -0x248(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x248(%rbp)
jmp    125a <rtv_hex_dump+0x13a>
mov    -0x248(%rbp),%rdi
lea    0xde3(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
mov    %eax,%ecx
mov    -0x248(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x248(%rbp)
mov    -0x34(%rbp),%eax
and    $0x3,%eax
cmp    $0x3,%eax
jne    1294 <rtv_hex_dump+0x174>
mov    -0x248(%rbp),%rdi
lea    0xdaa(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
mov    %eax,%ecx
mov    -0x248(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x248(%rbp)
jmp    1299 <rtv_hex_dump+0x179>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11d1 <rtv_hex_dump+0xb1>
cmpl   $0x0,-0x24(%rbp)
je     1423 <rtv_hex_dump+0x303>
mov    -0x248(%rbp),%rdi
lea    0xd5e(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
mov    %eax,%ecx
mov    -0x248(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x248(%rbp)
movl   $0x0,-0x30(%rbp)
cmpl   $0x10,-0x30(%rbp)
jae    1402 <rtv_hex_dump+0x2e2>
mov    -0x2c(%rbp),%eax
shl    $0x4,%eax
add    -0x30(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x20(%rbp),%rax
jae    138a <rtv_hex_dump+0x26a>
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
movzbl (%rax,%rcx,1),%eax
mov    %eax,-0x38(%rbp)
mov    -0x248(%rbp),%rax
mov    %rax,-0x250(%rbp)
cmpl   $0x20,-0x38(%rbp)
jb     1344 <rtv_hex_dump+0x224>
cmpl   $0x7e,-0x38(%rbp)
ja     1344 <rtv_hex_dump+0x224>
mov    -0x38(%rbp),%eax
mov    %eax,-0x254(%rbp)
jmp    1354 <rtv_hex_dump+0x234>
mov    $0x2e,%eax
mov    %eax,-0x254(%rbp)
jmp    1354 <rtv_hex_dump+0x234>
mov    -0x250(%rbp),%rdi
mov    -0x254(%rbp),%edx
lea    0xcbb(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
mov    %eax,%ecx
mov    -0x248(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x248(%rbp)
jmp    13b5 <rtv_hex_dump+0x295>
mov    -0x248(%rbp),%rdi
lea    0xc89(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
mov    %eax,%ecx
mov    -0x248(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x248(%rbp)
mov    -0x34(%rbp),%eax
and    $0x3,%eax
cmp    $0x3,%eax
jne    13ef <rtv_hex_dump+0x2cf>
mov    -0x248(%rbp),%rdi
lea    0xc4f(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
mov    %eax,%ecx
mov    -0x248(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x248(%rbp)
jmp    13f4 <rtv_hex_dump+0x2d4>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    12e3 <rtv_hex_dump+0x1c3>
mov    0x2bd7(%rip),%rax
mov    (%rax),%edi
lea    -0x240(%rbp),%rdx
lea    0xc0d(%rip),%rsi
call   1030 <fprintf@plt>
jmp    143f <rtv_hex_dump+0x31f>
mov    0x2bb6(%rip),%rax
mov    (%rax),%edi
lea    -0x240(%rbp),%rdx
lea    0xbcf(%rip),%rsi
call   1030 <fprintf@plt>
lea    -0x240(%rbp),%rax
mov    %rax,-0x248(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    117c <rtv_hex_dump+0x5c>
add    $0x260,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtv_hex_dump>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x228,%rsp
mov    %r8d,0x4(%rsp)
mov    %rcx,%rbx
mov    %rdx,%rbp
mov    %rsi,0x10(%rsp)
mov    %rdi,%rdx
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
lea    0xeac(%rip),%rsi
call   1030 <fprintf@plt>
lea    0xf(%rbx),%rax
shr    $0x4,%rax
test   %eax,%eax
je     12d6 <rtv_hex_dump+0x1b6>
mov    %eax,%eax
mov    %rax,0x8(%rsp)
lea    0x20(%rsp),%r14
xor    %r15d,%r15d
jmp    11b1 <rtv_hex_dump+0x91>
nopw   0x0(%rax,%rax,1)
lea    0xe9c(%rip),%rsi
mov    0x2e52(%rip),%rax
mov    (%rax),%edi
lea    0x20(%rsp),%r14
mov    %r14,%rdx
call   1030 <fprintf@plt>
mov    0x18(%rsp),%r15
add    $0x1,%r15
cmp    0x8(%rsp),%r15
je     12d6 <rtv_hex_dump+0x1b6>
mov    %r15,0x18(%rsp)
shl    $0x4,%r15d
mov    0x10(%rsp),%rax
lea    (%r15,%rax,1),%rdx
mov    %r14,%rdi
lea    0xe40(%rip),%rsi
xor    %eax,%eax
call   1040 <sprintf@plt>
cltq
lea    (%rsp,%rax,1),%r14
add    $0x20,%r14
mov    $0x10,%r12d
mov    %r15,%r13
jmp    11fa <rtv_hex_dump+0xda>
nopl   0x0(%rax)
add    $0x1,%r13
add    $0xffffffffffffffff,%r12
je     1250 <rtv_hex_dump+0x130>
cmp    %rbx,%r13
jae    1220 <rtv_hex_dump+0x100>
movzbl 0x0(%rbp,%r13,1),%edx
mov    %r14,%rdi
lea    0xe09(%rip),%rsi
xor    %eax,%eax
call   1040 <sprintf@plt>
cltq
jmp    1230 <rtv_hex_dump+0x110>
nopw   0x0(%rax,%rax,1)
movb   $0x0,0x2(%r14)
movw   $0x2020,(%r14)
mov    $0x2,%eax
add    %rax,%r14
mov    %r13d,%eax
not    %eax
test   $0x3,%al
jne    11f0 <rtv_hex_dump+0xd0>
movw   $0x20,(%r14)
add    $0x1,%r14
jmp    11f0 <rtv_hex_dump+0xd0>
nopl   0x0(%rax,%rax,1)
lea    0xdb2(%rip),%rsi
cmpl   $0x0,0x4(%rsp)
je     1187 <rtv_hex_dump+0x67>
movw   $0x20,0x4(%r14)
movl   $0x207c2020,(%r14)
add    $0x5,%r14
mov    $0x10,%eax
mov    $0x2e,%esi
jmp    1299 <rtv_hex_dump+0x179>
movw   $0x20,0x1(%r14)
add    $0x2,%r14
add    $0x1,%r15
add    $0xffffffffffffffff,%rax
je     1180 <rtv_hex_dump+0x60>
cmp    %rbx,%r15
jae    12c0 <rtv_hex_dump+0x1a0>
movzbl 0x0(%rbp,%r15,1),%ecx
lea    -0x20(%rcx),%edx
cmp    $0x5f,%dl
cmovae %esi,%ecx
mov    %cl,(%r14)
movb   $0x0,0x1(%r14)
jmp    12c6 <rtv_hex_dump+0x1a6>
nopw   0x0(%rax,%rax,1)
movw   $0x20,(%r14)
mov    %r15d,%ecx
not    %ecx
test   $0x3,%cl
je     1280 <rtv_hex_dump+0x160>
add    $0x1,%r14
jmp    128b <rtv_hex_dump+0x16b>
add    $0x228,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@stdout = global i32 0
@.str = [13 x i8] c"HEXDUMP: %s\0A\00"
@.str.1 = [11 x i8] c"0x%08lx | \00"
@.str.2 = [5 x i8] c"%02x\00"
@.str.3 = [3 x i8] c" \00"
@.str.5 = [6 x i8] c" | \00"
@.str.7 = [6 x i8] c"%s |\0A\00"
@.str.8 = [4 x i8] c"%s\0A\00"
define void @rtv_hex_dump(i8* %0, i64 %1, i8* nocapture %2, i64 %3, i32 %4) {
%6 = alloca [512 x i8]
%7 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%8 = load i32, i32* @stdout
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
%10 = add i64 %3, 15
%11 = lshr i64 %10, 4
%12 = trunc i64 %11 to i32
%13 = icmp eq i32 %12, 0
br i1 %13, label %83, label %14
14: ; preds = %5
%15 = icmp eq i32 %4, 0
%16 = and i64 %11, 4294967295
br label %17
17: ; preds = %14, %77
%18 = phi i64 [ 0, %14 ], [ %81, %77 ]
%19 = shl i64 %18, 4
%20 = and i64 %19, 4294967280
%21 = add i64 %20, %1
%22 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i64 %21)
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 %23
br label %25
25: ; preds = %17, %45
%26 = phi i64 [ 0, %17 ], [ %47, %45 ]
%27 = phi i8* [ %24, %17 ], [ %46, %45 ]
%28 = add nuw nsw i64 %26, %20
%29 = icmp ult i64 %28, %3
br i1 %29, label %30, label %36
30: ; preds = %25
%31 = getelementptr inbounds i8, i8* %2, i64 %28
%32 = load i8, i8* %31
%33 = zext i8 %32 to i32
%34 = call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %27, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %33)
%35 = sext i32 %34 to i64
br label %37
36: ; preds = %25
br label %37
37: ; preds = %36, %30
%38 = phi i64 [ 2, %36 ], [ %35, %30 ]
%39 = getelementptr inbounds i8, i8* %27, i64 %38
%40 = and i64 %28, 3
%41 = icmp eq i64 %40, 3
br i1 %41, label %42, label %45
42: ; preds = %37
%43 = bitcast i8* %39 to i16*
store i16 32, i16* %43
%44 = getelementptr inbounds i8, i8* %39, i64 1
br label %45
45: ; preds = %37, %42
%46 = phi i8* [ %44, %42 ], [ %39, %37 ]
%47 = add nuw nsw i64 %26, 1
%48 = icmp eq i64 %47, 16
br i1 %48, label %49, label %25
49: ; preds = %45
br i1 %15, label %77, label %50
50: ; preds = %49
%51 = getelementptr inbounds i8, i8* %46, i64 5
br label %52
52: ; preds = %50, %73
%53 = phi i64 [ 0, %50 ], [ %75, %73 ]
%54 = phi i8* [ %51, %50 ], [ %74, %73 ]
%55 = add nuw nsw i64 %53, %20
%56 = icmp ult i64 %55, %3
br i1 %56, label %57, label %64
57: ; preds = %52
%58 = getelementptr inbounds i8, i8* %2, i64 %55
%59 = load i8, i8* %58
%60 = add i8 %59, -32
%61 = icmp ult i8 %60, 95
%62 = select i1 %61, i8 %59, i8 46
store i8 %62, i8* %54
%63 = getelementptr i8, i8* %54, i64 1
store i8 0, i8* %63
br label %66
64: ; preds = %52
%65 = bitcast i8* %54 to i16*
store i16 32, i16* %65
br label %66
66: ; preds = %64, %57
%67 = getelementptr inbounds i8, i8* %54, i64 1
%68 = and i64 %55, 3
%69 = icmp eq i64 %68, 3
br i1 %69, label %70, label %73
70: ; preds = %66
%71 = bitcast i8* %67 to i16*
store i16 32, i16* %71
%72 = getelementptr inbounds i8, i8* %54, i64 2
br label %73
73: ; preds = %66, %70
%74 = phi i8* [ %72, %70 ], [ %67, %66 ]
%75 = add nuw nsw i64 %53, 1
%76 = icmp eq i64 %75, 16
br i1 %76, label %77, label %52
77: ; preds = %73, %49
%78 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), %49 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), %73 ]
%79 = load i32, i32* @stdout
%80 = call i32 @fprintf(i32 %79, i8* %78, i8* %7)
%81 = add nuw nsw i64 %18, 1
%82 = icmp eq i64 %81, %16
br i1 %82, label %83, label %17
83: ; preds = %77, %5
ret void
}