#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*/ char2bits(char, int *);
int /*<<< orphan*/ format1_line_type0();
int /*<<< orphan*/ format1_line_type1();
int /*<<< orphan*/ format2_line_type1(char *);
int /*<<< orphan*/ format2_line_type2();
int /*<<< orphan*/ format2_line_type3();
int /*<<< orphan*/ format3_line_type1();
int /*<<< orphan*/ format3_line_type2();
int /*<<< orphan*/ format3_line_type3();
int /*<<< orphan*/ format3_line_type4();
int /*<<< orphan*/ printf(char *, ...);
int strlen(char *);
void print_string_as_binary(char *hexstr, int start_bit, int end_bit) {
  int b, i;
  char *s;
  int nibble_bits[4];
  int hex_bits[64];
  char hex_digits[16];
  for (i = 0; i < 16; i++) {
    hex_digits[i] = ' ';
  }
  b = 64;
  i = 16;
  s = hexstr + strlen(hexstr);
  while ((s != hexstr) && (i >= 0)) {
    s--;
    i--;
    hex_digits[i] = *s;
    nibble_bits[0] = 0;
    nibble_bits[1] = 0;
    nibble_bits[2] = 0;
    nibble_bits[3] = 0;
    char2bits(*s, nibble_bits);
    hex_bits[--b] = nibble_bits[3];
    hex_bits[--b] = nibble_bits[2];
    hex_bits[--b] = nibble_bits[1];
    hex_bits[--b] = nibble_bits[0];
  }
  printf("\n\n\n");
  format1_line_type0();
  format1_line_type1();
  for (b = 0; b < 64; b++) {
    if (b == start_bit) {
      printf("<mark><font color=\"red\">");
    }
    printf("%d", hex_bits[b]);
    if (b == end_bit) {
      printf("</font></mark>");
    }
  }
  printf("\n\n\n");
  format2_line_type1(hex_digits);
  format2_line_type2();
  for (b = 0; b < 64; b++) {
    if (b == start_bit) {
      printf("<mark><font color=\"red\">");
    }
    printf("%d", hex_bits[b]);
    if (b == end_bit) {
      printf("</font></mark>");
    }
    if (((b + 1) % 4) == 0) {
      printf(" ");
    }
  }
  printf("(nibble value in binary)\n");
  format2_line_type3();
  printf("\n\n\n");
  format3_line_type1();
  format3_line_type2();
  format3_line_type3();
  format3_line_type4();
  for (b = 0; b < 64; b++) {
    if (b == start_bit) {
      printf(" <mark><font color=\"red\">%d", hex_bits[b]);
    } else {
      printf(" %d", hex_bits[b]);
    }
    if (b == end_bit) {
      printf("</font></mark>");
    }
  }
  printf("\n");
  format3_line_type4();
  format3_line_type3();
  format3_line_type2();
  format3_line_type1();
}


x86 assembly (clang, -O0):
<print_string_as_binary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x10,-0x18(%rbp)
jge    1200 <print_string_as_binary+0x40>
movslq -0x18(%rbp),%rax
movb   $0x20,-0x140(%rbp,%rax,1)
20
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11dc <print_string_as_binary+0x1c>
movl   $0x40,-0x14(%rbp)
movl   $0x10,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x148(%rbp)
mov    -0x8(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x148(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
xor    %eax,%eax
cmp    -0x8(%rbp),%rcx
mov    %al,-0x149(%rbp)
je     1258 <print_string_as_binary+0x98>
cmpl   $0x0,-0x18(%rbp)
setge  %al
mov    %al,-0x149(%rbp)
mov    -0x149(%rbp),%al
test   $0x1,%al
jne    126b <print_string_as_binary+0xab>
jmp    1318 <print_string_as_binary+0x158>
mov    -0x20(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%cl
movslq -0x18(%rbp),%rax
mov    %cl,-0x140(%rbp,%rax,1)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%al
lea    -0x30(%rbp),%rsi
movsbl %al,%edi
call   10e0 <char2bits@plt>
mov    -0x24(%rbp),%ecx
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
cltq
mov    %ecx,-0x130(%rbp,%rax,4)
mov    -0x28(%rbp),%ecx
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
cltq
mov    %ecx,-0x130(%rbp,%rax,4)
mov    -0x2c(%rbp),%ecx
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
cltq
mov    %ecx,-0x130(%rbp,%rax,4)
mov    -0x30(%rbp),%ecx
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
cltq
mov    %ecx,-0x130(%rbp,%rax,4)
jmp    1235 <print_string_as_binary+0x75>
lea    0xce1(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    $0x0,%al
call   1090 <format1_line_type0@plt>
mov    $0x0,%al
call   1030 <format1_line_type1@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x40,-0x14(%rbp)
jge    13a5 <print_string_as_binary+0x1e5>
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    135f <print_string_as_binary+0x19f>
lea    0xcac(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movslq -0x14(%rbp),%rax
mov    -0x130(%rbp,%rax,4),%esi
lea    0xcf4(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    1392 <print_string_as_binary+0x1d2>
lea    0xc92(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    1397 <print_string_as_binary+0x1d7>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    133b <print_string_as_binary+0x17b>
lea    0xc54(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    -0x140(%rbp),%rdi
call   10b0 <format2_line_type1@plt>
mov    $0x0,%al
call   1040 <format2_line_type2@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x40,-0x14(%rbp)
jge    145c <print_string_as_binary+0x29c>
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    13f1 <print_string_as_binary+0x231>
lea    0xc1a(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
movslq -0x14(%rbp),%rax
mov    -0x130(%rbp,%rax,4),%esi
lea    0xc62(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    1424 <print_string_as_binary+0x264>
lea    0xc00(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1449 <print_string_as_binary+0x289>
lea    0xbea(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    144e <print_string_as_binary+0x28e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    13cd <print_string_as_binary+0x20d>
lea    0xbcb(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    $0x0,%al
call   10a0 <format2_line_type3@plt>
lea    0xb88(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    $0x0,%al
call   1060 <format3_line_type1@plt>
mov    $0x0,%al
call   10c0 <format3_line_type2@plt>
mov    $0x0,%al
call   1050 <format3_line_type3@plt>
mov    $0x0,%al
call   10d0 <format3_line_type4@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x40,-0x14(%rbp)
jge    151c <print_string_as_binary+0x35c>
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    14d6 <print_string_as_binary+0x316>
movslq -0x14(%rbp),%rax
mov    -0x130(%rbp,%rax,4),%esi
lea    0xb7e(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    14ef <print_string_as_binary+0x32f>
movslq -0x14(%rbp),%rax
mov    -0x130(%rbp,%rax,4),%esi
lea    0xb7c(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    1509 <print_string_as_binary+0x349>
lea    0xb1b(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    150e <print_string_as_binary+0x34e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    14a2 <print_string_as_binary+0x2e2>
lea    0xadf(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    $0x0,%al
call   10d0 <format3_line_type4@plt>
mov    $0x0,%al
call   1050 <format3_line_type3@plt>
mov    $0x0,%al
call   10c0 <format3_line_type2@plt>
mov    $0x0,%al
call   1060 <format3_line_type1@plt>
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_string_as_binary>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x138,%rsp
mov    %edx,0xc(%rsp)
mov    %esi,%r15d
mov    %rdi,%r12
movaps 0xdfe(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
call   1090 <strlen@plt>
test   %eax,%eax
je     127a <print_string_as_binary+0x9a>
cltq
lea    0x120(%rsp),%rbp
mov    $0x1,%ebx
sub    %rax,%rbx
lea    (%rax,%r12,1),%r13
add    $0xffffffffffffffff,%r13
xor    %r14d,%r14d
lea    0x20(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl 0x0(%r13,%r14,1),%edi
mov    %dil,0x1f(%rsp,%r14,1)
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
mov    %r12,%rsi
call   1100 <char2bits@plt>
movaps 0x20(%rsp),%xmm0
movaps %xmm0,0x0(%rbp)
cmp    %r14,%rbx
je     127a <print_string_as_binary+0x9a>
add    $0xfffffffffffffff0,%rbp
lea    -0x1(%r14),%rax
cmp    $0xfffffffffffffff0,%r14
mov    %rax,%r14
jne    1240 <print_string_as_binary+0x60>
lea    0xe00(%rip),%rdi
call   1060 <puts@plt>
xor    %eax,%eax
call   10b0 <format1_line_type0@plt>
xor    %eax,%eax
call   1030 <format1_line_type1@plt>
mov    %r15d,%r15d
mov    0xc(%rsp),%r13d
lea    0xd7d(%rip),%r14
lea    0xdbb(%rip),%r12
lea    0xd88(%rip),%rbx
xor    %ebp,%ebp
jmp    12ca <print_string_as_binary+0xea>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rbp
cmp    $0x40,%rbp
je     12f8 <print_string_as_binary+0x118>
cmp    %rbp,%r15
jne    12d9 <print_string_as_binary+0xf9>
mov    %r14,%rdi
xor    %eax,%eax
call   10a0 <printf@plt>
mov    0x30(%rsp,%rbp,4),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   10a0 <printf@plt>
cmp    %rbp,%r13
jne    12c0 <print_string_as_binary+0xe0>
mov    %rbx,%rdi
xor    %eax,%eax
call   10a0 <printf@plt>
jmp    12c0 <print_string_as_binary+0xe0>
lea    0xd82(%rip),%rdi
call   1060 <puts@plt>
lea    0x10(%rsp),%rdi
call   10d0 <format2_line_type1@plt>
xor    %eax,%eax
call   1050 <format2_line_type2@plt>
mov    %r13,%rbp
neg    %rbp
mov    %r15,%rbx
neg    %rbx
mov    $0x1,%r14d
jmp    1340 <print_string_as_binary+0x160>
nopl   0x0(%rax)
test   $0x3,%r14b
je     1390 <print_string_as_binary+0x1b0>
add    $0x1,%r14
cmp    $0x41,%r14
je     139c <print_string_as_binary+0x1bc>
lea    (%r14,%rbp,1),%r12
lea    (%rbx,%r14,1),%rax
cmp    $0x1,%rax
jne    135c <print_string_as_binary+0x17c>
lea    0xccb(%rip),%rdi
xor    %eax,%eax
call   10a0 <printf@plt>
mov    0x2c(%rsp,%r14,4),%esi
lea    0xcfd(%rip),%rdi
xor    %eax,%eax
call   10a0 <printf@plt>
cmp    $0x1,%r12
jne    1330 <print_string_as_binary+0x150>
lea    0xcbd(%rip),%rdi
xor    %eax,%eax
call   10a0 <printf@plt>
jmp    1330 <print_string_as_binary+0x150>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x20,%edi
call   1040 <putchar@plt>
jmp    1336 <print_string_as_binary+0x156>
lea    0xcc5(%rip),%rdi
call   1060 <puts@plt>
xor    %eax,%eax
call   10c0 <format2_line_type3@plt>
lea    0xccb(%rip),%rdi
call   1060 <puts@plt>
xor    %eax,%eax
call   1080 <format3_line_type1@plt>
xor    %eax,%eax
call   10e0 <format3_line_type2@plt>
xor    %eax,%eax
call   1070 <format3_line_type3@plt>
xor    %eax,%eax
call   10f0 <format3_line_type4@plt>
lea    (%rsp,%r15,4),%rbx
add    $0x30,%rbx
shl    $0x2,%r13
shl    $0x2,%r15
lea    0xc5a(%rip),%r12
lea    0xc6f(%rip),%rbp
xor    %r14d,%r14d
jmp    140d <print_string_as_binary+0x22d>
nopw   0x0(%rax,%rax,1)
add    $0x4,%r14
cmp    $0x100,%r14
je     143e <print_string_as_binary+0x25e>
cmp    %r14,%r15
lea    0x30(%rsp,%r14,1),%rax
cmove  %rbx,%rax
mov    %rbp,%rdi
cmove  %r12,%rdi
mov    (%rax),%esi
xor    %eax,%eax
call   10a0 <printf@plt>
cmp    %r14,%r13
jne    1400 <print_string_as_binary+0x220>
lea    0xc04(%rip),%rdi
xor    %eax,%eax
call   10a0 <printf@plt>
jmp    1400 <print_string_as_binary+0x220>
mov    $0xa,%edi
call   1040 <putchar@plt>
xor    %eax,%eax
call   10f0 <format3_line_type4@plt>
xor    %eax,%eax
call   1070 <format3_line_type3@plt>
xor    %eax,%eax
call   10e0 <format3_line_type2@plt>
xor    %eax,%eax
call   1080 <format3_line_type1@plt>
add    $0x138,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str.1 = [25 x i8] c"<mark><font color=\22red\22>\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [15 x i8] c"</font></mark>\00"
@.str.6 = [28 x i8] c" <mark><font color=\22red\22>%d\00"
@.str.7 = [4 x i8] c" %d\00"
@str.10 = [25 x i8] c"(nibble value in binary)\00"
@str.11 = [3 x i8] c"\0A\0A\00"
define void @print_string_as_binary(i8* %0, i32 %1, i32 %2) {
%4 = alloca <4 x i32>
%5 = alloca [64 x i32]
%6 = alloca [16 x i8]
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%8 = bitcast <4 x i32>* %4 to i8*
%9 = bitcast [64 x i32]* %5 to i8*
%10 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%11 = tail call i32 @strlen(i8* %0)
%12 = icmp eq i32 %11, 0
br i1 %12, label %34, label %13
13: ; preds = %3
%14 = sext i32 %11 to i64
%15 = getelementptr inbounds i8, i8* %0, i64 %14
%16 = getelementptr inbounds <4 x i32>, <4 x i32>* %4, i64 0, i64 0
%17 = bitcast <4 x i32>* %4 to i8*
br label %18
18: ; preds = %13, %18
%19 = phi i64 [ 64, %13 ], [ %28, %18 ]
%20 = phi i64 [ 16, %13 ], [ %23, %18 ]
%21 = phi i8* [ %15, %13 ], [ %22, %18 ]
%22 = getelementptr inbounds i8, i8* %21, i64 -1
%23 = add nsw i64 %20, -1
%24 = load i8, i8* %22
%25 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 %23
store i8 %24, i8* %25
%26 = call i32 @char2bits(i8 signext %24, i32* %16)
%27 = load <4 x i32>, <4 x i32>* %4
%28 = add nsw i64 %19, -4
%29 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 %28
%30 = bitcast i32* %29 to <4 x i32>*
store <4 x i32> %27, <4 x i32>* %30
%31 = icmp ne i8* %22, %0
%32 = icmp ne i64 %20, 0
%33 = select i1 %31, i1 %32, i1 false
br i1 %33, label %18, label %34
34: ; preds = %18, %3
%35 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.11, i64 0, i64 0))
%36 = call i32 (...) @format1_line_type0()
%37 = call i32 (...) @format1_line_type1()
%38 = zext i32 %1 to i64
%39 = zext i32 %2 to i64
br label %40
40: ; preds = %34, %52
%41 = phi i64 [ 0, %34 ], [ %53, %52 ]
%42 = icmp eq i64 %41, %38
br i1 %42, label %43, label %45
43: ; preds = %40
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
br label %45
45: ; preds = %43, %40
%46 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 %41
%47 = load i32, i32* %46
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %47)
%49 = icmp eq i64 %41, %39
br i1 %49, label %50, label %52
50: ; preds = %45
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
br label %52
52: ; preds = %45, %50
%53 = add nuw nsw i64 %41, 1
%54 = icmp eq i64 %53, 64
br i1 %54, label %55, label %40
55: ; preds = %52
%56 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.11, i64 0, i64 0))
%57 = call i32 @format2_line_type1(i8* %10)
%58 = call i32 (...) @format2_line_type2()
br label %59
59: ; preds = %55, %77
%60 = phi i64 [ 0, %55 ], [ %72, %77 ]
%61 = icmp eq i64 %60, %38
br i1 %61, label %62, label %64
62: ; preds = %59
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
br label %64
64: ; preds = %62, %59
%65 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 %60
%66 = load i32, i32* %65
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %66)
%68 = icmp eq i64 %60, %39
br i1 %68, label %69, label %71
69: ; preds = %64
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
br label %71
71: ; preds = %69, %64
%72 = add nuw nsw i64 %60, 1
%73 = and i64 %72, 3
%74 = icmp eq i64 %73, 0
br i1 %74, label %75, label %77
75: ; preds = %71
%76 = call i32 @putchar(i32 32)
br label %77
77: ; preds = %71, %75
%78 = icmp eq i64 %72, 64
br i1 %78, label %79, label %59
79: ; preds = %77
%80 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.10, i64 0, i64 0))
%81 = call i32 (...) @format2_line_type3()
%82 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.11, i64 0, i64 0))
%83 = call i32 (...) @format3_line_type1()
%84 = call i32 (...) @format3_line_type2()
%85 = call i32 (...) @format3_line_type3()
%86 = call i32 (...) @format3_line_type4()
%87 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 %38
br label %88
88: ; preds = %79, %99
%89 = phi i64 [ 0, %79 ], [ %100, %99 ]
%90 = icmp eq i64 %89, %38
%91 = getelementptr inbounds [64 x i32], [64 x i32]* %5, i64 0, i64 %89
%92 = select i1 %90, i32* %87, i32* %91
%93 = select i1 %90, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0)
%94 = load i32, i32* %92
%95 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %93, i32 %94)
%96 = icmp eq i64 %89, %39
br i1 %96, label %97, label %99
97: ; preds = %88
%98 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
br label %99
99: ; preds = %88, %97
%100 = add nuw nsw i64 %89, 1
%101 = icmp eq i64 %100, 64
br i1 %101, label %102, label %88
102: ; preds = %99
%103 = call i32 @putchar(i32 10)
%104 = call i32 (...) @format3_line_type4()
%105 = call i32 (...) @format3_line_type3()
%106 = call i32 (...) @format3_line_type2()
%107 = call i32 (...) @format3_line_type1()
ret void
}