#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*/ buff;

/* Variables and functions */
int /*<<< orphan*/ memset(char *, char, int);
int my_snprintf(char *, int, char *, int);
int /*<<< orphan*/ printf(char const *, char *);
void dStrHex(const char *str, int len, int no_ascii) {
  const char *p = str;
  const char *formatstr;
  unsigned char c;
  char buff[82];
  int a = 0;
  const int bpstart = 5;
  const int cpstart = 60;
  int cpos = cpstart;
  int bpos = bpstart;
  int i, k, blen;
  if (len <= 0)
    return;
  blen = (int)sizeof(buff);
  formatstr = (0 == no_ascii) ? "%.76s\n" : "%.56s\n";
  memset(buff, ' ', 80);
  buff[80] = '\0';
  if (no_ascii < 0) {
    for (k = 0; k < len; k++) {
      c = *p++;
      bpos += 3;
      if (bpos == (bpstart + (9 * 3)))
        bpos++;
      my_snprintf(&buff[bpos], blen - bpos, "%.2x", (int)(unsigned char)c);
      buff[bpos + 2] = ' ';
      if ((k > 0) && (0 == ((k + 1) % 16))) {
        printf(formatstr, buff);
        bpos = bpstart;
        memset(buff, ' ', 80);
      }
    }
    if (bpos > bpstart) {
      buff[bpos + 2] = '\0';
      printf("%s\n", buff);
    }
    return;
  }
  k = my_snprintf(buff + 1, blen - 1, "%.2x", a);
  buff[k + 1] = ' ';
  for (i = 0; i < len; i++) {
    c = *p++;
    bpos += 3;
    if (bpos == (bpstart + (9 * 3)))
      bpos++;
    my_snprintf(&buff[bpos], blen - bpos, "%.2x", (int)(unsigned char)c);
    buff[bpos + 2] = ' ';
    if (no_ascii)
      buff[cpos++] = ' ';
    else {
      if ((c < ' ') || (c >= 0x7f))
        c = '.';
      buff[cpos++] = c;
    }
    if (cpos > (cpstart + 15)) {
      printf(formatstr, buff);
      bpos = bpstart;
      cpos = cpstart;
      a += 16;
      memset(buff, ' ', 80);
      k = my_snprintf(buff + 1, blen - 1, "%.2x", a);
      buff[k + 1] = ' ';
    }
  }
  if (cpos > cpstart) {
    buff[cpos] = '\0';
    printf("%s\n", buff);
  }
}


x86 assembly (clang, -O0):
<dStrHex>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x84(%rbp)
movl   $0x5,-0x88(%rbp)
movl   $0x3c,-0x8c(%rbp)
movl   $0x3c,-0x90(%rbp)
movl   $0x5,-0x94(%rbp)
cmpl   $0x0,-0xc(%rbp)
jg     118e <dStrHex+0x5e>
jmp    14fa <dStrHex+0x3ca>
movl   $0x52,-0xa0(%rbp)
mov    -0x10(%rbp),%esi
xor    %edx,%edx
lea    0xe63(%rip),%rax
lea    0xe55(%rip),%rcx
cmp    %esi,%edx
cmove  %rcx,%rax
mov    %rax,-0x20(%rbp)
lea    -0x80(%rbp),%rdi
mov    $0x20,%esi
mov    $0x50,%edx
call   1040 <memset@plt>
movb   $0x0,-0x30(%rbp)
cmpl   $0x0,-0x10(%rbp)
jge    1305 <dStrHex+0x1d5>
movl   $0x0,-0x9c(%rbp)
mov    -0x9c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12d3 <dStrHex+0x1a3>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%al
mov    %al,-0x21(%rbp)
mov    -0x94(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x94(%rbp)
cmpl   $0x20,-0x94(%rbp)
jne    122e <dStrHex+0xfe>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
movslq -0x94(%rbp),%rax
lea    -0x80(%rbp),%rdi
add    %rax,%rdi
mov    -0xa0(%rbp),%esi
sub    -0x94(%rbp),%esi
movzbl -0x21(%rbp),%ecx
lea    0xdbb(%rip),%rdx
call   1050 <my_snprintf@plt>
mov    -0x94(%rbp),%eax
add    $0x2,%eax
cltq
movb   $0x20,-0x80(%rbp,%rax,1)
cmpl   $0x0,-0x9c(%rbp)
jle    12ba <dStrHex+0x18a>
mov    -0x9c(%rbp),%eax
add    $0x1,%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
xor    %eax,%eax
cmp    %edx,%eax
jne    12ba <dStrHex+0x18a>
mov    -0x20(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   1030 <printf@plt>
movl   $0x5,-0x94(%rbp)
lea    -0x80(%rbp),%rdi
mov    $0x20,%esi
mov    $0x50,%edx
call   1040 <memset@plt>
jmp    12bf <dStrHex+0x18f>
mov    -0x9c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c(%rbp)
jmp    11e0 <dStrHex+0xb0>
cmpl   $0x5,-0x94(%rbp)
jle    1300 <dStrHex+0x1d0>
mov    -0x94(%rbp),%eax
add    $0x2,%eax
cltq
movb   $0x0,-0x80(%rbp,%rax,1)
lea    -0x80(%rbp),%rsi
lea    0xd18(%rip),%rdi
call   1030 <printf@plt>
jmp    14fa <dStrHex+0x3ca>
lea    -0x80(%rbp),%rdi
add    $0x1,%rdi
mov    -0xa0(%rbp),%esi
sub    $0x1,%esi
mov    -0x84(%rbp),%ecx
lea    0xceb(%rip),%rdx
call   1050 <my_snprintf@plt>
mov    %eax,-0x9c(%rbp)
mov    -0x9c(%rbp),%eax
add    $0x1,%eax
cltq
movb   $0x20,-0x80(%rbp,%rax,1)
movl   $0x0,-0x98(%rbp)
mov    -0x98(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    14d1 <dStrHex+0x3a1>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%al
mov    %al,-0x21(%rbp)
mov    -0x94(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x94(%rbp)
cmpl   $0x20,-0x94(%rbp)
jne    1396 <dStrHex+0x266>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
movslq -0x94(%rbp),%rax
lea    -0x80(%rbp),%rdi
add    %rax,%rdi
mov    -0xa0(%rbp),%esi
sub    -0x94(%rbp),%esi
movzbl -0x21(%rbp),%ecx
lea    0xc53(%rip),%rdx
call   1050 <my_snprintf@plt>
mov    -0x94(%rbp),%eax
add    $0x2,%eax
cltq
movb   $0x20,-0x80(%rbp,%rax,1)
cmpl   $0x0,-0x10(%rbp)
je     13f7 <dStrHex+0x2c7>
mov    -0x90(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x90(%rbp)
cltq
movb   $0x20,-0x80(%rbp,%rax,1)
jmp    142f <dStrHex+0x2ff>
movzbl -0x21(%rbp),%eax
cmp    $0x20,%eax
jl     1411 <dStrHex+0x2e1>
movzbl -0x21(%rbp),%eax
cmp    $0x7f,%eax
jl     1415 <dStrHex+0x2e5>
movb   $0x2e,-0x21(%rbp)
mov    -0x21(%rbp),%cl
mov    -0x90(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x90(%rbp)
cltq
mov    %cl,-0x80(%rbp,%rax,1)
cmpl   $0x4b,-0x90(%rbp)
jle    14b8 <dStrHex+0x388>
mov    -0x20(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   1030 <printf@plt>
movl   $0x5,-0x94(%rbp)
movl   $0x3c,-0x90(%rbp)
mov    -0x84(%rbp),%eax
add    $0x10,%eax
mov    %eax,-0x84(%rbp)
lea    -0x80(%rbp),%rdi
mov    $0x20,%esi
mov    $0x50,%edx
call   1040 <memset@plt>
lea    -0x80(%rbp),%rdi
add    $0x1,%rdi
mov    -0xa0(%rbp),%esi
sub    $0x1,%esi
mov    -0x84(%rbp),%ecx
lea    0xb71(%rip),%rdx
call   1050 <my_snprintf@plt>
mov    %eax,-0x9c(%rbp)
mov    -0x9c(%rbp),%eax
add    $0x1,%eax
cltq
movb   $0x20,-0x80(%rbp,%rax,1)
jmp    14bd <dStrHex+0x38d>
mov    -0x98(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x98(%rbp)
jmp    1348 <dStrHex+0x218>
cmpl   $0x3c,-0x90(%rbp)
jle    14fa <dStrHex+0x3ca>
movslq -0x90(%rbp),%rax
movb   $0x0,-0x80(%rbp,%rax,1)
lea    -0x80(%rbp),%rsi
lea    0xb1e(%rip),%rdi
call   1030 <printf@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dStrHex>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rdi,0x10(%rsp)
test   %esi,%esi
jle    13ab <dStrHex+0x27b>
mov    %edx,%r15d
mov    %esi,%r14d
lea    0xea5(%rip),%rbp
lea    0xea5(%rip),%rbx
lea    0x30(%rsp),%r12
mov    %r12,%rdi
mov    $0x20,%esi
mov    $0x50,%edx
call   1040 <memset@plt>
movb   $0x0,0x80(%rsp)
test   %r15d,%r15d
cmove  %rbp,%rbx
mov    %rbx,0x20(%rsp)
js     12c1 <dStrHex+0x191>
mov    %r15d,0x1c(%rsp)
lea    0x31(%rsp),%rdi
lea    0xe6a(%rip),%rbx
xor    %r13d,%r13d
mov    $0x51,%esi
mov    %rbx,%rdx
xor    %ecx,%ecx
call   1050 <my_snprintf@plt>
cltq
movb   $0x20,0x1(%rax,%r12,1)
mov    %r14d,%eax
mov    %rax,0x28(%rsp)
mov    $0x3c,%r15d
mov    $0x5,%r12d
movl   $0x0,0xc(%rsp)
jmp    1242 <dStrHex+0x112>
nopl   0x0(%rax)
mov    0x20(%rsp),%rdi
lea    0x30(%rsp),%r14
mov    %r14,%rsi
call   1030 <printf@plt>
mov    0xc(%rsp),%ebp
add    $0x10,%ebp
mov    %r14,%rdi
mov    $0x20,%esi
mov    $0x50,%edx
call   1040 <memset@plt>
lea    0x31(%rsp),%rdi
mov    $0x51,%esi
mov    %rbx,%rdx
mov    %ebp,0xc(%rsp)
mov    %ebp,%ecx
call   1050 <my_snprintf@plt>
cltq
movb   $0x20,0x1(%rax,%r14,1)
mov    $0x5,%r12d
mov    $0x3c,%r15d
add    $0x1,%r13
cmp    %r13d,0x28(%rsp)
je     12b2 <dStrHex+0x182>
mov    0x10(%rsp),%rax
movzbl (%rax,%r13,1),%ebp
add    $0x3,%r12d
cmp    $0x20,%r12d
mov    $0x21,%eax
cmove  %eax,%r12d
movslq %r12d,%r14
lea    (%rsp,%r14,1),%rdi
add    $0x30,%rdi
mov    $0x52,%esi
sub    %r14d,%esi
mov    %rbx,%rdx
mov    %ebp,%ecx
call   1050 <my_snprintf@plt>
lea    -0x7f(%rbp),%eax
cmp    $0xa1,%al
mov    $0x2e,%eax
cmovb  %eax,%ebp
cmpl   $0x0,0x1c(%rsp)
mov    $0x20,%eax
cmovne %eax,%ebp
movb   $0x20,0x32(%rsp,%r14,1)
movslq %r15d,%rax
mov    %bpl,0x30(%rsp,%rax,1)
cmp    $0x4b,%r15d
jge    11e0 <dStrHex+0xb0>
add    $0x1,%r15d
jmp    1237 <dStrHex+0x107>
cmp    $0x3d,%r15d
jge    1392 <dStrHex+0x262>
jmp    13ab <dStrHex+0x27b>
mov    0x10(%rsp),%rax
movzbl (%rax),%ecx
lea    0x38(%rsp),%rdi
lea    0xd39(%rip),%rdx
mov    $0x4a,%esi
call   1050 <my_snprintf@plt>
movb   $0x20,0x3a(%rsp)
mov    $0x8,%r15d
cmp    $0x1,%r14d
je     138e <dStrHex+0x25e>
add    $0xffffffff,%r14d
mov    $0x8,%r15d
xor    %ebx,%ebx
mov    $0x21,%ebp
lea    0xd02(%rip),%r13
jmp    1319 <dStrHex+0x1e9>
xchg   %ax,%ax
add    $0x1,%rbx
cmp    %ebx,%r14d
je     1388 <dStrHex+0x258>
mov    0x10(%rsp),%rax
movzbl 0x1(%rax,%rbx,1),%ecx
add    $0x3,%r15d
cmp    $0x20,%r15d
cmove  %ebp,%r15d
movslq %r15d,%r12
lea    (%rsp,%r12,1),%rdi
add    $0x30,%rdi
mov    $0x52,%esi
sub    %r12d,%esi
mov    %r13,%rdx
call   1050 <my_snprintf@plt>
movb   $0x20,0x32(%rsp,%r12,1)
lea    0x2(%rbx),%eax
test   $0xf,%al
jne    1310 <dStrHex+0x1e0>
mov    0x20(%rsp),%rdi
lea    0x30(%rsp),%rbp
mov    %rbp,%rsi
call   1030 <printf@plt>
mov    %rbp,%rdi
mov    $0x21,%ebp
mov    $0x20,%esi
mov    $0x50,%edx
call   1040 <memset@plt>
mov    $0x5,%r15d
jmp    1310 <dStrHex+0x1e0>
cmp    $0x6,%r15d
jl     13ab <dStrHex+0x27b>
add    $0x2,%r15d
mov    %r15d,%eax
movb   $0x0,0x30(%rsp,%rax,1)
lea    0xc72(%rip),%rdi
lea    0x30(%rsp),%rsi
call   1030 <printf@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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