#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*/ errx(int, char *);
scalar_t__ isalnum(char);
scalar_t__ ispunct(char);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ sprintf(char *, char *, ...);
void hexdump_memory(unsigned char *buf, size_t byte_count) {
  unsigned long byte_offset_start = 0;
  if (byte_count % 16)
    errx(1, "hexdump_memory called with non-full line");
  for (unsigned long byte_offset = byte_offset_start;
       byte_offset < byte_offset_start + byte_count; byte_offset += 16) {
    char line[1000];
    char *linep = line;
    linep += sprintf(linep, "%08lx  ", byte_offset);
    for (int i = 0; i < 16; i++) {
      linep += sprintf(linep, "%02hhx ", (unsigned char)buf[byte_offset + i]);
    }
    linep += sprintf(linep, " |");
    for (int i = 0; i < 16; i++) {
      char c = buf[byte_offset + i];
      if (isalnum(c) || ispunct(c) || c == ' ') {
        *(linep++) = c;
      } else {
        *(linep++) = '.';
      }
    }
    linep += sprintf(linep, "|");
    puts(line);
  }
}


x86 assembly (clang, -O0):
<hexdump_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x430,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
and    $0xf,%rax
cmp    $0x0,%rax
je     118e <hexdump_memory+0x3e>
mov    $0x1,%edi
lea    0xe77(%rip),%rsi
call   1040 <errx@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
add    -0x10(%rbp),%rcx
cmp    %rcx,%rax
jae    1388 <hexdump_memory+0x238>
lea    -0x410(%rbp),%rax
mov    %rax,-0x418(%rbp)
mov    -0x418(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    0xe5e(%rip),%rsi
mov    $0x0,%al
call   1070 <sprintf@plt>
mov    %eax,%ecx
mov    -0x418(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x418(%rbp)
movl   $0x0,-0x41c(%rbp)
cmpl   $0x10,-0x41c(%rbp)
jge    1254 <hexdump_memory+0x104>
mov    -0x418(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movslq -0x41c(%rbp),%rdx
add    %rdx,%rcx
movzbl (%rax,%rcx,1),%edx
lea    0xe0e(%rip),%rsi
mov    $0x0,%al
call   1070 <sprintf@plt>
mov    %eax,%ecx
mov    -0x418(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x418(%rbp)
mov    -0x41c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x41c(%rbp)
jmp    11f2 <hexdump_memory+0xa2>
mov    -0x418(%rbp),%rdi
lea    0xdd7(%rip),%rsi
mov    $0x0,%al
call   1070 <sprintf@plt>
mov    %eax,%ecx
mov    -0x418(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x418(%rbp)
movl   $0x0,-0x420(%rbp)
cmpl   $0x10,-0x420(%rbp)
jge    1340 <hexdump_memory+0x1f0>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movslq -0x420(%rbp),%rdx
add    %rdx,%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x421(%rbp)
movsbl -0x421(%rbp),%edi
call   1050 <isalnum@plt>
cmp    $0x0,%rax
jne    12ed <hexdump_memory+0x19d>
movsbl -0x421(%rbp),%edi
call   1060 <ispunct@plt>
cmp    $0x0,%rax
jne    12ed <hexdump_memory+0x19d>
movsbl -0x421(%rbp),%eax
cmp    $0x20,%eax
jne    130f <hexdump_memory+0x1bf>
mov    -0x421(%rbp),%cl
mov    -0x418(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x418(%rbp)
mov    %cl,(%rax)
jmp    1327 <hexdump_memory+0x1d7>
mov    -0x418(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x418(%rbp)
movb   $0x2e,(%rax)
jmp    132c <hexdump_memory+0x1dc>
mov    -0x420(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x420(%rbp)
jmp    1289 <hexdump_memory+0x139>
mov    -0x418(%rbp),%rdi
lea    0xcec(%rip),%rsi
mov    $0x0,%al
call   1070 <sprintf@plt>
mov    %eax,%ecx
mov    -0x418(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x418(%rbp)
lea    -0x410(%rbp),%rdi
call   1030 <puts@plt>
mov    -0x20(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x20(%rbp)
jmp    1196 <hexdump_memory+0x46>
add    $0x430,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexdump_memory>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x468,%rsp
mov    %rsi,%rbx
mov    %rdi,(%rsp)
test   $0xf,%bl
je     1180 <hexdump_memory+0x30>
lea    0xe8c(%rip),%rsi
mov    $0x1,%edi
call   1040 <errx@plt>
jmp    1189 <hexdump_memory+0x39>
test   %rbx,%rbx
je     14da <hexdump_memory+0x38a>
lea    0x80(%rsp),%rbp
mov    (%rsp),%r12
xor    %r14d,%r14d
mov    %rbx,0x8(%rsp)
jmp    11ce <hexdump_memory+0x7e>
nop
movw   $0x7c,0x0(%rbp,%r13,1)
lea    0x80(%rsp),%rbp
mov    %rbp,%rdi
call   1030 <puts@plt>
add    $0x10,%r14
add    $0x10,%r12
mov    0x8(%rsp),%rbx
cmp    %rbx,%r14
jae    14da <hexdump_memory+0x38a>
mov    %rbp,%rdi
lea    0xe51(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1070 <sprintf@plt>
movslq %eax,%r13
lea    (%rsp,%r13,1),%r15
add    $0x80,%r15
mov    (%rsp),%rbp
movzbl 0x0(%rbp,%r14,1),%edx
mov    %r15,%rdi
lea    0xe2d(%rip),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <sprintf@plt>
cltq
mov    %rax,0x78(%rsp)
add    %rax,%r15
mov    %r14,%rax
or     $0x1,%rax
movzbl 0x0(%rbp,%rax,1),%edx
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <sprintf@plt>
cltq
mov    %rax,0x70(%rsp)
add    %rax,%r15
mov    %r14,%rax
or     $0x2,%rax
movzbl 0x0(%rbp,%rax,1),%edx
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <sprintf@plt>
cltq
mov    %rax,0x68(%rsp)
add    %rax,%r15
mov    %r14,%rax
or     $0x3,%rax
movzbl 0x0(%rbp,%rax,1),%edx
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <sprintf@plt>
cltq
mov    %rax,0x60(%rsp)
add    %rax,%r15
mov    %r14,%rax
or     $0x4,%rax
movzbl 0x0(%rbp,%rax,1),%edx
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <sprintf@plt>
cltq
mov    %rax,0x58(%rsp)
add    %rax,%r15
mov    %r14,%rax
or     $0x5,%rax
movzbl 0x0(%rbp,%rax,1),%edx
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <sprintf@plt>
cltq
mov    %rax,0x50(%rsp)
add    %rax,%r15
mov    %r14,%rax
or     $0x6,%rax
movzbl 0x0(%rbp,%rax,1),%edx
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <sprintf@plt>
cltq
mov    %rax,0x48(%rsp)
add    %rax,%r15
mov    %r14,%rax
or     $0x7,%rax
movzbl 0x0(%rbp,%rax,1),%edx
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <sprintf@plt>
cltq
mov    %rax,0x40(%rsp)
add    %rax,%r15
mov    %r14,%rax
or     $0x8,%rax
movzbl 0x0(%rbp,%rax,1),%edx
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <sprintf@plt>
cltq
mov    %rax,0x38(%rsp)
add    %rax,%r15
mov    %r14,%rax
or     $0x9,%rax
movzbl 0x0(%rbp,%rax,1),%edx
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <sprintf@plt>
cltq
mov    %rax,0x30(%rsp)
add    %rax,%r15
mov    %r14,%rax
or     $0xa,%rax
movzbl 0x0(%rbp,%rax,1),%edx
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <sprintf@plt>
cltq
mov    %rax,0x28(%rsp)
add    %rax,%r15
mov    %r14,%rax
or     $0xb,%rax
movzbl 0x0(%rbp,%rax,1),%edx
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <sprintf@plt>
cltq
mov    %rax,0x20(%rsp)
add    %rax,%r15
mov    %r14,%rax
or     $0xc,%rax
movzbl 0x0(%rbp,%rax,1),%edx
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <sprintf@plt>
cltq
mov    %rax,0x18(%rsp)
add    %rax,%r15
mov    %r14,%rax
or     $0xd,%rax
movzbl 0x0(%rbp,%rax,1),%edx
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <sprintf@plt>
cltq
mov    %rax,0x10(%rsp)
add    %rax,%r15
mov    %r14,%rax
or     $0xe,%rax
movzbl 0x0(%rbp,%rax,1),%edx
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <sprintf@plt>
movslq %eax,%rbx
add    %rbx,%r15
mov    %r14,%rax
or     $0xf,%rax
movzbl 0x0(%rbp,%rax,1),%edx
mov    %r15,%rdi
lea    0xc1d(%rip),%rsi
xor    %eax,%eax
call   1070 <sprintf@plt>
cltq
movw   $0x7c20,(%rax,%r15,1)
movb   $0x0,0x2(%rax,%r15,1)
add    %rax,%r13
add    %rbx,%r13
add    0x10(%rsp),%r13
add    0x18(%rsp),%r13
add    0x20(%rsp),%r13
add    0x28(%rsp),%r13
add    0x30(%rsp),%r13
add    0x38(%rsp),%r13
add    0x40(%rsp),%r13
add    0x48(%rsp),%r13
add    0x50(%rsp),%r13
add    0x58(%rsp),%r13
add    0x60(%rsp),%r13
add    0x68(%rsp),%r13
add    0x70(%rsp),%r13
add    0x78(%rsp),%r13
lea    0x82(%rsp),%rax
add    %rax,%r13
xor    %ebp,%ebp
jmp    14ad <hexdump_memory+0x35d>
cs nopw 0x0(%rax,%rax,1)
nop
cmp    $0x20,%r15b
cmove  %ecx,%edx
mov    %edx,%r15d
mov    %r15b,0x0(%r13,%rbp,1)
add    $0x1,%rbp
cmp    $0x10,%rbp
je     11a0 <hexdump_memory+0x50>
movzbl (%r12,%rbp,1),%r15d
movsbl %r15b,%ebx
mov    %ebx,%edi
call   1050 <isalnum@plt>
test   %rax,%rax
jne    149a <hexdump_memory+0x34a>
mov    %ebx,%edi
call   1060 <ispunct@plt>
movzbl %bl,%ecx
mov    %ecx,%edx
test   %rax,%rax
jne    1490 <hexdump_memory+0x340>
mov    $0x2e,%edx
jmp    1490 <hexdump_memory+0x340>
add    $0x468,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [41 x i8] c"hexdump_memory called with non-full line\00"
@.str.1 = [8 x i8] c"%08lx \00"
@.str.2 = [8 x i8] c"%02hhx \00"
@.str.3 = [3 x i8] c" |\00"
@.str.4 = [2 x i8] c"|\00"
define void @hexdump_memory(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca [1000 x i8]
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8
store i8* %0, i8** %3
store i64 %1, i64* %4
store i64 0, i64* %5
%12 = load i64, i64* %4
%13 = urem i64 %12, 16
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = call i32 @errx(i32 1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %15, %2
%18 = load i64, i64* %5
store i64 %18, i64* %6
br label %19
19: ; preds = %100, %17
%20 = load i64, i64* %6
%21 = load i64, i64* %5
%22 = load i64, i64* %4
%23 = add i64 %21, %22
%24 = icmp ult i64 %20, %23
br i1 %24, label %25, label %103
25: ; preds = %19
%26 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
store i8* %26, i8** %8
%27 = load i8*, i8** %8
%28 = load i64, i64* %6
%29 = call i32 (i8*, i8*, ...) @sprintf(i8* %27, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i64 %28)
%30 = load i8*, i8** %8
%31 = sext i32 %29 to i64
%32 = getelementptr inbounds i8, i8* %30, i64 %31
store i8* %32, i8** %8
store i32 0, i32* %9
br label %33
33: ; preds = %50, %25
%34 = load i32, i32* %9
%35 = icmp slt i32 %34, 16
br i1 %35, label %36, label %53
36: ; preds = %33
%37 = load i8*, i8** %8
%38 = load i8*, i8** %3
%39 = load i64, i64* %6
%40 = load i32, i32* %9
%41 = sext i32 %40 to i64
%42 = add i64 %39, %41
%43 = getelementptr inbounds i8, i8* %38, i64 %42
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = call i32 (i8*, i8*, ...) @sprintf(i8* %37, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %45)
%47 = load i8*, i8** %8
%48 = sext i32 %46 to i64
%49 = getelementptr inbounds i8, i8* %47, i64 %48
store i8* %49, i8** %8
br label %50
50: ; preds = %36
%51 = load i32, i32* %9
%52 = add nsw i32 %51, 1
store i32 %52, i32* %9
br label %33
53: ; preds = %33
%54 = load i8*, i8** %8
%55 = call i32 (i8*, i8*, ...) @sprintf(i8* %54, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%56 = load i8*, i8** %8
%57 = sext i32 %55 to i64
%58 = getelementptr inbounds i8, i8* %56, i64 %57
store i8* %58, i8** %8
store i32 0, i32* %10
br label %59
59: ; preds = %89, %53
%60 = load i32, i32* %10
%61 = icmp slt i32 %60, 16
br i1 %61, label %62, label %92
62: ; preds = %59
%63 = load i8*, i8** %3
%64 = load i64, i64* %6
%65 = load i32, i32* %10
%66 = sext i32 %65 to i64
%67 = add i64 %64, %66
%68 = getelementptr inbounds i8, i8* %63, i64 %67
%69 = load i8, i8* %68
store i8 %69, i8* %11
%70 = load i8, i8* %11
%71 = call i64 @isalnum(i8 signext %70)
%72 = icmp ne i64 %71, 0
br i1 %72, label %81, label %73
73: ; preds = %62
%74 = load i8, i8* %11
%75 = call i64 @ispunct(i8 signext %74)
%76 = icmp ne i64 %75, 0
br i1 %76, label %81, label %77
77: ; preds = %73
%78 = load i8, i8* %11
%79 = sext i8 %78 to i32
%80 = icmp eq i32 %79, 32
br i1 %80, label %81, label %85
81: ; preds = %77, %73, %62
%82 = load i8, i8* %11
%83 = load i8*, i8** %8
%84 = getelementptr inbounds i8, i8* %83, i32 1
store i8* %84, i8** %8
store i8 %82, i8* %83
br label %88
85: ; preds = %77
%86 = load i8*, i8** %8
%87 = getelementptr inbounds i8, i8* %86, i32 1
store i8* %87, i8** %8
store i8 46, i8* %86
br label %88
88: ; preds = %85, %81
br label %89
89: ; preds = %88
%90 = load i32, i32* %10
%91 = add nsw i32 %90, 1
store i32 %91, i32* %10
br label %59
92: ; preds = %59
%93 = load i8*, i8** %8
%94 = call i32 (i8*, i8*, ...) @sprintf(i8* %93, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%95 = load i8*, i8** %8
%96 = sext i32 %94 to i64
%97 = getelementptr inbounds i8, i8* %95, i64 %96
store i8* %97, i8** %8
%98 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%99 = call i32 @puts(i8* %98)
br label %100
100: ; preds = %92
%101 = load i64, i64* %6
%102 = add i64 %101, 16
store i64 %102, i64* %6
br label %19
103: ; preds = %19
ret void
}

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