#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*/ memset(char *, char, int);
int /*<<< orphan*/ snprintf(char *, int, char *, ...);
int /*<<< orphan*/ strlcat(char *, char *, int);
int /*<<< orphan*/ strlcpy(char *, char *, int);
size_t strlen(char *);
int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u),
                       void *u, const char *s, int len, int indent) {
  int ret = 0;
  char buf[288 + 1], tmp[20], str[128 + 1];
  int i, j, rows, trc;
  unsigned char ch;
  int dump_width;
  trc = 0;
  for (; (len > 0) && ((s[len - 1] == ' ') || (s[len - 1] == '\0')); len--)
    trc++;
  if (indent < 0)
    indent = 0;
  if (indent) {
    if (indent > 128)
      indent = 128;
    memset(str, ' ', indent);
  }
  str[indent] = '\0';
  dump_width = (16 - ((indent - (indent > 6 ? 6 : indent) + 3) / 4));
  rows = (len / dump_width);
  if ((rows * dump_width) < len)
    rows++;
  for (i = 0; i < rows; i++) {
    buf[0] = '\0';
    strlcpy(buf, str, sizeof buf);
    snprintf(tmp, sizeof tmp, "%04x - ", i * dump_width);
    strlcat(buf, tmp, sizeof buf);
    for (j = 0; j < dump_width; j++) {
      if (((i * dump_width) + j) >= len) {
        strlcat(buf, "   ", sizeof buf);
      } else {
        ch = ((unsigned char)*(s + i * dump_width + j)) & 0xff;
        snprintf(tmp, sizeof tmp, "%02x%c", ch, j == 7 ? '-' : ' ');
        strlcat(buf, tmp, sizeof buf);
      }
    }
    strlcat(buf, "  ", sizeof buf);
    for (j = 0; j < dump_width; j++) {
      if (((i * dump_width) + j) >= len)
        break;
      ch = ((unsigned char)*(s + i * dump_width + j)) & 0xff;
      snprintf(tmp, sizeof tmp, "%c", ((ch >= ' ') && (ch <= '~')) ? ch : '.');
      strlcat(buf, tmp, sizeof buf);
    }
    strlcat(buf, "\n", sizeof buf);
    ret += cb((void *)buf, strlen(buf), u);
  }
  if (trc > 0) {
    snprintf(buf, sizeof buf, "%s%04x - <SPACES/NULS>\n", str, len + trc);
    ret += cb((void *)buf, strlen(buf), u);
  }
  return (ret);
}


x86 assembly (clang, -O0):
<BIO_dump_indent_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x260,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x210(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x1c(%rbp)
mov    %al,-0x219(%rbp)
jle    11dc <BIO_dump_indent_cb+0x8c>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x21a(%rbp)
je     11d0 <BIO_dump_indent_cb+0x80>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x21a(%rbp)
mov    -0x21a(%rbp),%al
mov    %al,-0x219(%rbp)
mov    -0x219(%rbp),%al
test   $0x1,%al
jne    11ef <BIO_dump_indent_cb+0x9f>
jmp    120c <BIO_dump_indent_cb+0xbc>
mov    -0x210(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x210(%rbp)
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    117f <BIO_dump_indent_cb+0x2f>
cmpl   $0x0,-0x20(%rbp)
jge    121d <BIO_dump_indent_cb+0xcd>
movl   $0x0,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
je     124f <BIO_dump_indent_cb+0xff>
cmpl   $0x80,-0x20(%rbp)
jle    123b <BIO_dump_indent_cb+0xeb>
movl   $0x80,-0x20(%rbp)
lea    -0x200(%rbp),%rdi
mov    -0x20(%rbp),%edx
mov    $0x20,%esi
call   1060 <memset@plt>
movslq -0x20(%rbp),%rax
movb   $0x0,-0x200(%rbp,%rax,1)
mov    -0x20(%rbp),%eax
mov    %eax,-0x220(%rbp)
cmpl   $0x6,-0x20(%rbp)
jle    127e <BIO_dump_indent_cb+0x12e>
mov    $0x6,%eax
mov    %eax,-0x224(%rbp)
jmp    1287 <BIO_dump_indent_cb+0x137>
mov    -0x20(%rbp),%eax
mov    %eax,-0x224(%rbp)
mov    -0x220(%rbp),%eax
mov    -0x224(%rbp),%ecx
sub    %ecx,%eax
add    $0x3,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    $0x10,%eax
sub    %ecx,%eax
mov    %eax,-0x218(%rbp)
mov    -0x1c(%rbp),%eax
cltd
idivl  -0x218(%rbp)
mov    %eax,-0x20c(%rbp)
mov    -0x20c(%rbp),%eax
imul   -0x218(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    12e4 <BIO_dump_indent_cb+0x194>
mov    -0x20c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20c(%rbp)
movl   $0x0,-0x204(%rbp)
mov    -0x204(%rbp),%eax
cmp    -0x20c(%rbp),%eax
jge    15d6 <BIO_dump_indent_cb+0x486>
movb   $0x0,-0x150(%rbp)
lea    -0x150(%rbp),%rdi
lea    -0x200(%rbp),%rsi
mov    $0x121,%edx
call   1070 <strlcpy@plt>
lea    -0x170(%rbp),%rdi
mov    -0x204(%rbp),%ecx
imul   -0x218(%rbp),%ecx
mov    $0x14,%esi
lea    0xcc1(%rip),%rdx
mov    $0x0,%al
call   1050 <snprintf@plt>
lea    -0x150(%rbp),%rdi
lea    -0x170(%rbp),%rsi
mov    $0x121,%edx
call   1030 <strlcat@plt>
movl   $0x0,-0x208(%rbp)
mov    -0x208(%rbp),%eax
cmp    -0x218(%rbp),%eax
jge    144a <BIO_dump_indent_cb+0x2fa>
mov    -0x204(%rbp),%eax
imul   -0x218(%rbp),%eax
add    -0x208(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jl     13b3 <BIO_dump_indent_cb+0x263>
lea    -0x150(%rbp),%rdi
lea    0xc64(%rip),%rsi
mov    $0x121,%edx
call   1030 <strlcat@plt>
jmp    1431 <BIO_dump_indent_cb+0x2e1>
mov    -0x18(%rbp),%rax
mov    -0x204(%rbp),%ecx
imul   -0x218(%rbp),%ecx
movslq %ecx,%rcx
add    %rcx,%rax
movslq -0x208(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%eax
mov    %al,-0x211(%rbp)
lea    -0x170(%rbp),%rdi
movzbl -0x211(%rbp),%ecx
mov    -0x208(%rbp),%edx
mov    $0x20,%r8d
mov    $0x2d,%eax
cmp    $0x7,%edx
cmove  %eax,%r8d
mov    $0x14,%esi
lea    0xbfa(%rip),%rdx
mov    $0x0,%al
call   1050 <snprintf@plt>
lea    -0x150(%rbp),%rdi
lea    -0x170(%rbp),%rsi
mov    $0x121,%edx
call   1030 <strlcat@plt>
jmp    1436 <BIO_dump_indent_cb+0x2e6>
mov    -0x208(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x208(%rbp)
jmp    1368 <BIO_dump_indent_cb+0x218>
lea    -0x150(%rbp),%rdi
lea    0xbb1(%rip),%rsi
mov    $0x121,%edx
call   1030 <strlcat@plt>
movl   $0x0,-0x208(%rbp)
mov    -0x208(%rbp),%eax
cmp    -0x218(%rbp),%eax
jge    1568 <BIO_dump_indent_cb+0x418>
mov    -0x204(%rbp),%eax
imul   -0x218(%rbp),%eax
add    -0x208(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jl     149f <BIO_dump_indent_cb+0x34f>
jmp    1568 <BIO_dump_indent_cb+0x418>
mov    -0x18(%rbp),%rax
mov    -0x204(%rbp),%ecx
imul   -0x218(%rbp),%ecx
movslq %ecx,%rcx
add    %rcx,%rax
movslq -0x208(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%eax
mov    %al,-0x211(%rbp)
lea    -0x170(%rbp),%rax
mov    %rax,-0x230(%rbp)
movzbl -0x211(%rbp),%eax
cmp    $0x20,%eax
jl     150c <BIO_dump_indent_cb+0x3bc>
movzbl -0x211(%rbp),%eax
cmp    $0x7e,%eax
jg     150c <BIO_dump_indent_cb+0x3bc>
movzbl -0x211(%rbp),%eax
mov    %eax,-0x234(%rbp)
jmp    151c <BIO_dump_indent_cb+0x3cc>
mov    $0x2e,%eax
mov    %eax,-0x234(%rbp)
jmp    151c <BIO_dump_indent_cb+0x3cc>
mov    -0x230(%rbp),%rdi
mov    -0x234(%rbp),%ecx
mov    $0x14,%esi
lea    0xadb(%rip),%rdx
mov    $0x0,%al
call   1050 <snprintf@plt>
lea    -0x150(%rbp),%rdi
lea    -0x170(%rbp),%rsi
mov    $0x121,%edx
call   1030 <strlcat@plt>
mov    -0x208(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x208(%rbp)
jmp    146c <BIO_dump_indent_cb+0x31c>
lea    -0x150(%rbp),%rdi
lea    0xab3(%rip),%rsi
mov    $0x121,%edx
call   1030 <strlcat@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x240(%rbp)
lea    -0x150(%rbp),%rax
mov    %rax,-0x248(%rbp)
lea    -0x150(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x248(%rbp),%rdi
mov    %rax,%rsi
mov    -0x240(%rbp),%rax
mov    -0x10(%rbp),%rdx
call   *%rax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x204(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x204(%rbp)
jmp    12ee <BIO_dump_indent_cb+0x19e>
cmpl   $0x0,-0x210(%rbp)
jle    1651 <BIO_dump_indent_cb+0x501>
lea    -0x150(%rbp),%rdi
lea    -0x200(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
add    -0x210(%rbp),%r8d
mov    $0x121,%esi
lea    0xa0b(%rip),%rdx
mov    $0x0,%al
call   1050 <snprintf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x250(%rbp)
lea    -0x150(%rbp),%rax
mov    %rax,-0x258(%rbp)
lea    -0x150(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x258(%rbp),%rdi
mov    %rax,%rsi
mov    -0x250(%rbp),%rax
mov    -0x10(%rbp),%rdx
call   *%rax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x260,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BIO_dump_indent_cb>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x238,%rsp
mov    %ecx,%ebp
mov    %rdx,%r13
mov    %rsi,0x18(%rsp)
mov    %rdi,0x20(%rsp)
xor    %eax,%eax
test   %ecx,%ecx
jle    119b <BIO_dump_indent_cb+0x4b>
mov    %ebp,%ecx
add    $0xffffffffffffffff,%rcx
xor    %esi,%esi
xchg   %ax,%ax
mov    %ecx,%edx
testb  $0xdf,0x0(%r13,%rdx,1)
jne    119f <BIO_dump_indent_cb+0x4f>
add    $0x1,%esi
add    $0xffffffffffffffff,%rcx
cmp    %esi,%ebp
jne    1180 <BIO_dump_indent_cb+0x30>
mov    %ebp,%esi
xor    %ebp,%ebp
jmp    11a1 <BIO_dump_indent_cb+0x51>
xor    %esi,%esi
jmp    11a1 <BIO_dump_indent_cb+0x51>
sub    %esi,%ebp
mov    %esi,0x10(%rsp)
test   %r8d,%r8d
cmovg  %r8d,%eax
jle    11f5 <BIO_dump_indent_cb+0xa5>
cmp    $0x80,%eax
mov    $0x80,%ebx
cmovb  %eax,%ebx
lea    0x80(%rsp),%rdi
mov    $0x20,%esi
mov    %ebx,%edx
call   1060 <memset@plt>
movb   $0x0,0x80(%rsp,%rbx,1)
cmp    $0x5,%ebx
jbe    11fd <BIO_dump_indent_cb+0xad>
add    $0xfd,%bl
mov    %ebx,%eax
sar    $0x7,%al
shr    $0x6,%al
add    %bl,%al
sar    $0x2,%al
mov    $0x10,%cl
sub    %al,%cl
movsbl %cl,%esi
jmp    1202 <BIO_dump_indent_cb+0xb2>
movb   $0x0,0x80(%rsp)
mov    $0x10,%esi
mov    %ebp,%eax
cltd
idiv   %esi
mov    %eax,%edx
imul   %esi,%edx
xor    %ecx,%ecx
cmp    %ebp,%edx
setl   %cl
add    %eax,%ecx
test   %ecx,%ecx
jle    144a <BIO_dump_indent_cb+0x2fa>
movslq %esi,%rbx
mov    %ebp,%r15d
movslq %ebp,%rdx
mov    %rdx,0x40(%rsp)
mov    %ecx,%ecx
mov    %rcx,0x48(%rsp)
mov    %esi,%ecx
mov    %rcx,0x38(%rsp)
lea    0x110(%rsp),%rbp
lea    0x60(%rsp),%r14
xor    %r12d,%r12d
xor    %edx,%edx
xor    %ecx,%ecx
mov    %esi,0xc(%rsp)
mov    %rbx,0x30(%rsp)
jmp    12cb <BIO_dump_indent_cb+0x17b>
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
lea    0xd9f(%rip),%rsi
mov    $0x121,%edx
call   1030 <strlcat@plt>
mov    0x28(%rsp),%r13
mov    %rbp,%rdi
lea    0xda6(%rip),%rsi
mov    $0x121,%edx
call   1030 <strlcat@plt>
mov    %rbp,%rdi
call   1040 <strlen@plt>
mov    %rbp,%rdi
mov    %rax,%rsi
mov    0x18(%rsp),%rdx
call   *0x20(%rsp)
mov    0x14(%rsp),%ecx
add    %eax,%ecx
mov    0x58(%rsp),%rdx
add    $0x1,%rdx
add    0x38(%rsp),%r12
mov    0x30(%rsp),%rbx
add    %rbx,%r13
cmp    0x48(%rsp),%rdx
je     144f <BIO_dump_indent_cb+0x2ff>
mov    %r13,0x28(%rsp)
mov    %ecx,0x14(%rsp)
movb   $0x0,0x110(%rsp)
mov    %rbp,%rdi
lea    0x80(%rsp),%rsi
mov    %rdx,%r13
mov    $0x121,%edx
call   1070 <strlcpy@plt>
mov    %r13,0x58(%rsp)
imul   %rbx,%r13
mov    %rbp,%rbx
mov    %r14,%rdi
mov    $0x14,%esi
lea    0xcf1(%rip),%rdx
mov    %r13d,%ecx
xor    %eax,%eax
call   1050 <snprintf@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
mov    $0x121,%edx
call   1030 <strlcat@plt>
cmpl   $0x0,0xc(%rsp)
jle    1260 <BIO_dump_indent_cb+0x110>
mov    %r13,0x50(%rsp)
mov    0x28(%rsp),%rbx
xor    %r13d,%r13d
jmp    1399 <BIO_dump_indent_cb+0x249>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rbx,%r13,1),%ecx
cmp    $0x7,%r13
mov    $0x20,%r8d
mov    $0x2d,%eax
cmove  %eax,%r8d
mov    %r14,%rdi
mov    $0x14,%esi
lea    0xc95(%rip),%rdx
xor    %eax,%eax
call   1050 <snprintf@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
mov    $0x121,%edx
call   1030 <strlcat@plt>
add    $0x1,%r13
cmp    %r13,0x38(%rsp)
je     13b0 <BIO_dump_indent_cb+0x260>
lea    (%r12,%r13,1),%eax
cmp    %r15d,%eax
jl     1350 <BIO_dump_indent_cb+0x200>
mov    %rbp,%rdi
lea    0xc5c(%rip),%rsi
jmp    1384 <BIO_dump_indent_cb+0x234>
xchg   %ax,%ax
mov    %rbp,%rdi
lea    0xc4f(%rip),%rsi
mov    $0x121,%edx
call   1030 <strlcat@plt>
cmpl   $0x0,0xc(%rsp)
mov    %rbx,%r13
jle    1279 <BIO_dump_indent_cb+0x129>
mov    0x50(%rsp),%rax
cmp    0x40(%rsp),%rax
jge    1279 <BIO_dump_indent_cb+0x129>
mov    $0x1,%ebx
nopw   0x0(%rax,%rax,1)
movzbl -0x1(%r13,%rbx,1),%eax
lea    -0x20(%rax),%ecx
cmp    $0x5f,%cl
mov    $0x2e,%ecx
cmovae %ecx,%eax
movzbl %al,%ecx
mov    %r14,%rdi
mov    $0x14,%esi
lea    0xbfa(%rip),%rdx
xor    %eax,%eax
call   1050 <snprintf@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
mov    $0x121,%edx
call   1030 <strlcat@plt>
cmp    0x30(%rsp),%rbx
jge    1279 <BIO_dump_indent_cb+0x129>
lea    (%r12,%rbx,1),%eax
add    $0x1,%rbx
cmp    %r15d,%eax
jl     13f0 <BIO_dump_indent_cb+0x2a0>
jmp    1279 <BIO_dump_indent_cb+0x129>
mov    %ebp,%r15d
xor    %ecx,%ecx
mov    0x10(%rsp),%eax
test   %eax,%eax
je     14a2 <BIO_dump_indent_cb+0x352>
add    %eax,%r15d
lea    0xbb2(%rip),%rdx
lea    0x110(%rsp),%rbx
mov    %ecx,%r14d
lea    0x80(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x121,%esi
mov    %r15d,%r8d
xor    %eax,%eax
call   1050 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
mov    0x18(%rsp),%rdx
call   *0x20(%rsp)
mov    %r14d,%ecx
add    %eax,%ecx
mov    %ecx,%eax
add    $0x238,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%04x - \00"
@.str.1 = [4 x i8] c" \00"
@.str.2 = [7 x i8] c"%02x%c\00"
@.str.3 = [3 x i8] c" \00"
@.str.4 = [3 x i8] c"%c\00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [24 x i8] c"%s%04x - <SPACES/NULS>\0A\00"
define i32 @BIO_dump_indent_cb(i32 (i8*, i64, i8*)* %0, i8* %1, i8* %2, i32 %3, i32 %4) {
%6 = alloca i32 (i8*, i64, i8*)*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca [289 x i8]
%13 = alloca [20 x i8]
%14 = alloca [129 x i8]
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i8
%20 = alloca i32
store i32 (i8*, i64, i8*)* %0, i32 (i8*, i64, i8*)** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
store i32 0, i32* %11
store i32 0, i32* %18
br label %21
21: ; preds = %49, %5
%22 = load i32, i32* %9
%23 = icmp sgt i32 %22, 0
br i1 %23, label %24, label %44
24: ; preds = %21
%25 = load i8*, i8** %8
%26 = load i32, i32* %9
%27 = sub nsw i32 %26, 1
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8, i8* %25, i64 %28
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 32
br i1 %32, label %42, label %33
33: ; preds = %24
%34 = load i8*, i8** %8
%35 = load i32, i32* %9
%36 = sub nsw i32 %35, 1
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i8, i8* %34, i64 %37
%39 = load i8, i8* %38
%40 = sext i8 %39 to i32
%41 = icmp eq i32 %40, 0
br label %42
42: ; preds = %33, %24
%43 = phi i1 [ true, %24 ], [ %41, %33 ]
br label %44
44: ; preds = %42, %21
%45 = phi i1 [ false, %21 ], [ %43, %42 ]
br i1 %45, label %46, label %52
46: ; preds = %44
%47 = load i32, i32* %18
%48 = add nsw i32 %47, 1
store i32 %48, i32* %18
br label %49
49: ; preds = %46
%50 = load i32, i32* %9
%51 = add nsw i32 %50, -1
store i32 %51, i32* %9
br label %21
52: ; preds = %44
%53 = load i32, i32* %10
%54 = icmp slt i32 %53, 0
br i1 %54, label %55, label %56
55: ; preds = %52
store i32 0, i32* %10
br label %56
56: ; preds = %55, %52
%57 = load i32, i32* %10
%58 = icmp ne i32 %57, 0
br i1 %58, label %59, label %67
59: ; preds = %56
%60 = load i32, i32* %10
%61 = icmp sgt i32 %60, 128
br i1 %61, label %62, label %63
62: ; preds = %59
store i32 128, i32* %10
br label %63
63: ; preds = %62, %59
%64 = getelementptr inbounds [129 x i8], [129 x i8]* %14, i64 0, i64 0
%65 = load i32, i32* %10
%66 = call i32 @memset(i8* %64, i8 signext 32, i32 %65)
br label %67
67: ; preds = %63, %56
%68 = load i32, i32* %10
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [129 x i8], [129 x i8]* %14, i64 0, i64 %69
store i8 0, i8* %70
%71 = load i32, i32* %10
%72 = load i32, i32* %10
%73 = icmp sgt i32 %72, 6
br i1 %73, label %74, label %75
74: ; preds = %67
br label %77
75: ; preds = %67
%76 = load i32, i32* %10
br label %77
77: ; preds = %75, %74
%78 = phi i32 [ 6, %74 ], [ %76, %75 ]
%79 = sub nsw i32 %71, %78
%80 = add nsw i32 %79, 3
%81 = sdiv i32 %80, 4
%82 = sub nsw i32 16, %81
store i32 %82, i32* %20
%83 = load i32, i32* %9
%84 = load i32, i32* %20
%85 = sdiv i32 %83, %84
store i32 %85, i32* %17
%86 = load i32, i32* %17
%87 = load i32, i32* %20
%88 = mul nsw i32 %86, %87
%89 = load i32, i32* %9
%90 = icmp slt i32 %88, %89
br i1 %90, label %91, label %94
91: ; preds = %77
%92 = load i32, i32* %17
%93 = add nsw i32 %92, 1
store i32 %93, i32* %17
br label %94
94: ; preds = %91, %77
store i32 0, i32* %15
br label %95
95: ; preds = %218, %94
%96 = load i32, i32* %15
%97 = load i32, i32* %17
%98 = icmp slt i32 %96, %97
br i1 %98, label %99, label %221
99: ; preds = %95
%100 = getelementptr inbounds [289 x i8], [289 x i8]* %12, i64 0, i64 0
store i8 0, i8* %100
%101 = getelementptr inbounds [289 x i8], [289 x i8]* %12, i64 0, i64 0
%102 = getelementptr inbounds [129 x i8], [129 x i8]* %14, i64 0, i64 0
%103 = call i32 @strlcpy(i8* %101, i8* %102, i32 289)
%104 = getelementptr inbounds [20 x i8], [20 x i8]* %13, i64 0, i64 0
%105 = load i32, i32* %15
%106 = load i32, i32* %20
%107 = mul nsw i32 %105, %106
%108 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %104, i32 20, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %107)
%109 = getelementptr inbounds [289 x i8], [289 x i8]* %12, i64 0, i64 0
%110 = getelementptr inbounds [20 x i8], [20 x i8]* %13, i64 0, i64 0
%111 = call i32 @strlcat(i8* %109, i8* %110, i32 289)
store i32 0, i32* %16
br label %112
112: ; preds = %153, %99
%113 = load i32, i32* %16
%114 = load i32, i32* %20
%115 = icmp slt i32 %113, %114
br i1 %115, label %116, label %156
116: ; preds = %112
%117 = load i32, i32* %15
%118 = load i32, i32* %20
%119 = mul nsw i32 %117, %118
%120 = load i32, i32* %16
%121 = add nsw i32 %119, %120
%122 = load i32, i32* %9
%123 = icmp sge i32 %121, %122
br i1 %123, label %124, label %127
124: ; preds = %116
%125 = getelementptr inbounds [289 x i8], [289 x i8]* %12, i64 0, i64 0
%126 = call i32 @strlcat(i8* %125, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 289)
br label %152
127: ; preds = %116
%128 = load i8*, i8** %8
%129 = load i32, i32* %15
%130 = load i32, i32* %20
%131 = mul nsw i32 %129, %130
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds i8, i8* %128, i64 %132
%134 = load i32, i32* %16
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds i8, i8* %133, i64 %135
%137 = load i8, i8* %136
%138 = zext i8 %137 to i32
%139 = and i32 %138, 255
%140 = trunc i32 %139 to i8
store i8 %140, i8* %19
%141 = getelementptr inbounds [20 x i8], [20 x i8]* %13, i64 0, i64 0
%142 = load i8, i8* %19
%143 = zext i8 %142 to i32
%144 = load i32, i32* %16
%145 = icmp eq i32 %144, 7
%146 = zext i1 %145 to i64
%147 = select i1 %145, i32 45, i32 32
%148 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %141, i32 20, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %143, i32 %147)
%149 = getelementptr inbounds [289 x i8], [289 x i8]* %12, i64 0, i64 0
%150 = getelementptr inbounds [20 x i8], [20 x i8]* %13, i64 0, i64 0
%151 = call i32 @strlcat(i8* %149, i8* %150, i32 289)
br label %152
152: ; preds = %127, %124
br label %153
153: ; preds = %152
%154 = load i32, i32* %16
%155 = add nsw i32 %154, 1
store i32 %155, i32* %16
br label %112
156: ; preds = %112
%157 = getelementptr inbounds [289 x i8], [289 x i8]* %12, i64 0, i64 0
%158 = call i32 @strlcat(i8* %157, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 289)
store i32 0, i32* %16
br label %159
159: ; preds = %204, %156
%160 = load i32, i32* %16
%161 = load i32, i32* %20
%162 = icmp slt i32 %160, %161
br i1 %162, label %163, label %207
163: ; preds = %159
%164 = load i32, i32* %15
%165 = load i32, i32* %20
%166 = mul nsw i32 %164, %165
%167 = load i32, i32* %16
%168 = add nsw i32 %166, %167
%169 = load i32, i32* %9
%170 = icmp sge i32 %168, %169
br i1 %170, label %171, label %172
171: ; preds = %163
br label %207
172: ; preds = %163
%173 = load i8*, i8** %8
%174 = load i32, i32* %15
%175 = load i32, i32* %20
%176 = mul nsw i32 %174, %175
%177 = sext i32 %176 to i64
%178 = getelementptr inbounds i8, i8* %173, i64 %177
%179 = load i32, i32* %16
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds i8, i8* %178, i64 %180
%182 = load i8, i8* %181
%183 = zext i8 %182 to i32
%184 = and i32 %183, 255
%185 = trunc i32 %184 to i8
store i8 %185, i8* %19
%186 = getelementptr inbounds [20 x i8], [20 x i8]* %13, i64 0, i64 0
%187 = load i8, i8* %19
%188 = zext i8 %187 to i32
%189 = icmp sge i32 %188, 32
br i1 %189, label %190, label %197
190: ; preds = %172
%191 = load i8, i8* %19
%192 = zext i8 %191 to i32
%193 = icmp sle i32 %192, 126
br i1 %193, label %194, label %197
194: ; preds = %190
%195 = load i8, i8* %19
%196 = zext i8 %195 to i32
br label %198
197: ; preds = %190, %172
br label %198
198: ; preds = %197, %194
%199 = phi i32 [ %196, %194 ], [ 46, %197 ]
%200 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %186, i32 20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %199)
%201 = getelementptr inbounds [289 x i8], [289 x i8]* %12, i64 0, i64 0
%202 = getelementptr inbounds [20 x i8], [20 x i8]* %13, i64 0, i64 0
%203 = call i32 @strlcat(i8* %201, i8* %202, i32 289)
br label %204
204: ; preds = %198
%205 = load i32, i32* %16
%206 = add nsw i32 %205, 1
store i32 %206, i32* %16
br label %159
207: ; preds = %171, %159
%208 = getelementptr inbounds [289 x i8], [289 x i8]* %12, i64 0, i64 0
%209 = call i32 @strlcat(i8* %208, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i32 289)
%210 = load i32 (i8*, i64, i8*)*, i32 (i8*, i64, i8*)** %6
%211 = getelementptr inbounds [289 x i8], [289 x i8]* %12, i64 0, i64 0
%212 = getelementptr inbounds [289 x i8], [289 x i8]* %12, i64 0, i64 0
%213 = call i64 @strlen(i8* %212)
%214 = load i8*, i8** %7
%215 = call i32 %210(i8* %211, i64 %213, i8* %214)
%216 = load i32, i32* %11
%217 = add nsw i32 %216, %215
store i32 %217, i32* %11
br label %218
218: ; preds = %207
%219 = load i32, i32* %15
%220 = add nsw i32 %219, 1
store i32 %220, i32* %15
br label %95
221: ; preds = %95
%222 = load i32, i32* %18
%223 = icmp sgt i32 %222, 0
br i1 %223, label %224, label %239
224: ; preds = %221
%225 = getelementptr inbounds [289 x i8], [289 x i8]* %12, i64 0, i64 0
%226 = getelementptr inbounds [129 x i8], [129 x i8]* %14, i64 0, i64 0
%227 = load i32, i32* %9
%228 = load i32, i32* %18
%229 = add nsw i32 %227, %228
%230 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %225, i32 289, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i8* %226, i32 %229)
%231 = load i32 (i8*, i64, i8*)*, i32 (i8*, i64, i8*)** %6
%232 = getelementptr inbounds [289 x i8], [289 x i8]* %12, i64 0, i64 0
%233 = getelementptr inbounds [289 x i8], [289 x i8]* %12, i64 0, i64 0
%234 = call i64 @strlen(i8* %233)
%235 = load i8*, i8** %7
%236 = call i32 %231(i8* %232, i64 %234, i8* %235)
%237 = load i32, i32* %11
%238 = add nsw i32 %237, %236
store i32 %238, i32* %11
br label %239
239: ; preds = %224, %221
%240 = load i32, i32* %11
ret i32 %240
}

LLVM IR (-O2):
@.str = [8 x i8] c"%04x - \00"
@.str.1 = [4 x i8] c" \00"
@.str.2 = [7 x i8] c"%02x%c\00"
@.str.3 = [3 x i8] c" \00"
@.str.4 = [3 x i8] c"%c\00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [24 x i8] c"%s%04x - <SPACES/NULS>\0A\00"
define i32 @BIO_dump_indent_cb(i32 (i8*, i64, i8*)* nocapture %0, i8* %1, i8* nocapture %2, i32 %3, i32 %4) {
%6 = alloca [289 x i8]
%7 = alloca [20 x i8]
%8 = alloca [129 x i8]
%9 = getelementptr inbounds [289 x i8], [289 x i8]* %6, i64 0, i64 0
%10 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%11 = getelementptr inbounds [129 x i8], [129 x i8]* %8, i64 0, i64 0
%12 = icmp sgt i32 %3, 0
br i1 %12, label %13, label %27
13: ; preds = %5
%14 = zext i32 %3 to i64
br label %15
15: ; preds = %13, %22
%16 = phi i64 [ %14, %13 ], [ %18, %22 ]
%17 = phi i32 [ 0, %13 ], [ %23, %22 ]
%18 = add nsw i64 %16, -1
%19 = and i64 %18, 4294967295
%20 = getelementptr inbounds i8, i8* %2, i64 %19
%21 = load i8, i8* %20
switch i8 %21, label %25 [
i8 32, label %22
i8 0, label %22
]
22: ; preds = %15, %15
%23 = add nuw nsw i32 %17, 1
%24 = icmp eq i32 %23, %3
br i1 %24, label %27, label %15
25: ; preds = %15
%26 = trunc i64 %16 to i32
br label %27
27: ; preds = %22, %25, %5
%28 = phi i32 [ 0, %5 ], [ %17, %25 ], [ %3, %22 ]
%29 = phi i32 [ %3, %5 ], [ %26, %25 ], [ 0, %22 ]
%30 = icmp sgt i32 %4, 0
%31 = select i1 %30, i32 %4, i32 0
br i1 %30, label %33, label %32
32: ; preds = %27
store i8 0, i8* %11
br label %45
33: ; preds = %27
%34 = icmp ult i32 %31, 128
%35 = select i1 %34, i32 %31, i32 128
%36 = call i32 @memset(i8* %11, i8 signext 32, i32 %35)
%37 = zext i32 %35 to i64
%38 = getelementptr inbounds [129 x i8], [129 x i8]* %8, i64 0, i64 %37
store i8 0, i8* %38
%39 = icmp ult i32 %35, 6
%40 = trunc i32 %35 to i8
%41 = add i8 %40, -3
%42 = sdiv i8 %41, -4
%43 = add nsw i8 %42, 16
%44 = sext i8 %43 to i32
br i1 %39, label %45, label %46
45: ; preds = %32, %33
br label %46
46: ; preds = %33, %45
%47 = phi i32 [ 16, %45 ], [ %44, %33 ]
%48 = sdiv i32 %29, %47
%49 = mul nsw i32 %48, %47
%50 = icmp slt i32 %49, %29
%51 = zext i1 %50 to i32
%52 = add i32 %48, %51
%53 = icmp sgt i32 %52, 0
br i1 %53, label %54, label %121
54: ; preds = %46
%55 = icmp sgt i32 %47, 0
%56 = sext i32 %47 to i64
%57 = sext i32 %29 to i64
%58 = zext i32 %52 to i64
%59 = zext i32 %47 to i64
br label %60
60: ; preds = %54, %114
%61 = phi i64 [ 0, %54 ], [ %119, %114 ]
%62 = phi i32 [ 0, %54 ], [ %118, %114 ]
%63 = trunc i64 %61 to i32
store i8 0, i8* %9
%64 = call i32 @strlcpy(i8* %9, i8* %11, i32 289)
%65 = mul nsw i64 %61, %56
%66 = mul nsw i32 %47, %63
%67 = trunc i64 %65 to i32
%68 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %10, i32 20, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %67)
%69 = call i32 @strlcat(i8* %9, i8* %10, i32 289)
br i1 %55, label %72, label %70
70: ; preds = %60
%71 = call i32 @strlcat(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 289)
br label %114
72: ; preds = %60
%73 = getelementptr inbounds i8, i8* %2, i64 %65
br label %74
74: ; preds = %72, %89
%75 = phi i64 [ 0, %72 ], [ %90, %89 ]
%76 = trunc i64 %75 to i32
%77 = add nsw i32 %66, %76
%78 = icmp slt i32 %77, %29
br i1 %78, label %81, label %79
79: ; preds = %74
%80 = call i32 @strlcat(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 289)
br label %89
81: ; preds = %74
%82 = getelementptr inbounds i8, i8* %73, i64 %75
%83 = load i8, i8* %82
%84 = zext i8 %83 to i32
%85 = icmp eq i64 %75, 7
%86 = select i1 %85, i32 45, i32 32
%87 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %10, i32 20, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %84, i32 %86)
%88 = call i32 @strlcat(i8* %9, i8* %10, i32 289)
br label %89
89: ; preds = %79, %81
%90 = add nuw nsw i64 %75, 1
%91 = icmp eq i64 %90, %59
br i1 %91, label %92, label %74
92: ; preds = %89
%93 = call i32 @strlcat(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 289)
%94 = icmp slt i64 %65, %57
%95 = select i1 %55, i1 %94, i1 false
br i1 %95, label %96, label %114
96: ; preds = %92
%97 = getelementptr inbounds i8, i8* %2, i64 %65
br label %98
98: ; preds = %96, %98
%99 = phi i64 [ 0, %96 ], [ %108, %98 ]
%100 = getelementptr inbounds i8, i8* %97, i64 %99
%101 = load i8, i8* %100
%102 = add i8 %101, -32
%103 = icmp ult i8 %102, 95
%104 = select i1 %103, i8 %101, i8 46
%105 = zext i8 %104 to i32
%106 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %10, i32 20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %105)
%107 = call i32 @strlcat(i8* %9, i8* %10, i32 289)
%108 = add nuw nsw i64 %99, 1
%109 = trunc i64 %108 to i32
%110 = icmp slt i64 %108, %56
%111 = add nsw i32 %66, %109
%112 = icmp slt i32 %111, %29
%113 = select i1 %110, i1 %112, i1 false
br i1 %113, label %98, label %114
114: ; preds = %98, %70, %92
%115 = call i32 @strlcat(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i32 289)
%116 = call i64 @strlen(i8* %9)
%117 = call i32 %0(i8* %9, i64 %116, i8* %1)
%118 = add nsw i32 %117, %62
%119 = add nuw nsw i64 %61, 1
%120 = icmp eq i64 %119, %58
br i1 %120, label %121, label %60
121: ; preds = %114, %46
%122 = phi i32 [ 0, %46 ], [ %118, %114 ]
%123 = icmp eq i32 %28, 0
br i1 %123, label %130, label %124
124: ; preds = %121
%125 = add nsw i32 %29, %28
%126 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %9, i32 289, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i8* %11, i32 %125)
%127 = call i64 @strlen(i8* %9)
%128 = call i32 %0(i8* %9, i64 %127, i8* %1)
%129 = add nsw i32 %128, %122
br label %130
130: ; preds = %124, %121
%131 = phi i32 [ %129, %124 ], [ %122, %121 ]
ret i32 %131
}