#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 */
scalar_t__ fread(int *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ print_dec(int);
int /*<<< orphan*/ print_hex(int);
int /*<<< orphan*/ print_tags(int, int);
int /*<<< orphan*/ print_text(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdin;
int main() {
  int b = 0, w, p = 0, t, n, pos = 0;
  pos = 0;
  printf("<html>\n");
  printf("<link rel=stylesheet type=\"text/css\" href=\"colorforth.css\">\n");
  printf("  <style type=\"text/css\">\n");
  printf("  body { margin-right:10%;}\n");
  printf("  div.code {\n");
  printf("    width:100%;\n");
  printf("    padding:0.5em;\n");
  printf("    background-color:black;\n");
  printf("    font-size:xx-large;\n");
  printf("    font-weight:bold;\n");
  printf("    text-transform:lowercase;\n");
  printf("  }\n");
  printf("  code.define { color:red; }\n");
  printf("  code.compile { color:#00ff00; }\n");
  printf("  code.compilehex { color:green; }\n");
  printf("  code.execute { color:yellow; }\n");
  printf("  code.executehex { color:#c0c000; }\n");
  printf("  code.compilemacro { color:#00ffff; }\n");
  printf("  code.variable {color:#ff00ff; }\n");
  printf("  code.text { color:white; }\n");
  printf(
      "  code.textcapitalized { color:white; text-transform:capitalize; }\n");
  printf("  code.textallcaps { color:white; text-transform:uppercase; }\n");
  printf("  code.display_macro { color:#0000FF; }\n");
  printf("  code.compiler_feedback { color:grey; }\n");
  printf("  code.commented_number { color:white; }\n");
  printf("  </style>\n");
  if (fread(&t, 4, 1, stdin) == 0)
    return 0;
  pos = 4;
  while (1) {
    printf("{block %d}\n", b++);
    printf("<div class=code>\n");
    w = 256;
    while (w--) {
      printf("<!-- pos: %d -->", pos);
      switch (t & 0xf) {
      case 0:
        print_text(t & 0xfffffff0);
        break;
      case 2:
      case 5:
        print_tags(p, t & 0x1f);
        if (w == 0)
          break;
        fread(&n, 4, 1, stdin);
        pos += 4;
        w--;
        if (t & 0x10)
          print_hex(n);
        else
          print_dec(n);
        break;
      case 6:
      case 8:
      case 0xf:
        print_tags(p, t & 0x1f);
        if (t & 0x10)
          print_hex(t >> 5);
        else
          print_dec(t >> 5);
        break;
      case 0xc:
        print_tags(p, t & 0xf);
        print_text(t & 0xfffffff0);
        if (w == 0)
          break;
        fread(&t, 4, 1, stdin);
        pos += 4;
        w--;
        print_tags(1, 4);
        print_dec(t);
        break;
      default:
        print_tags(p, t & 0xf);
        print_text(t & 0xfffffff0);
        break;
      }
      p = 1;
      if (fread(&t, 4, 1, stdin) == 0) {
        printf("</code>\n</div>\n");
        goto end;
      }
      pos += 4;
    }
    if (p) {
      printf("</code>\n");
    }
    p = 0;
    printf("</div>\n<hr>\n");
  }
end:
  printf("</html>\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xee4(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xef3(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xef3(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xef6(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xefc(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf0b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf16(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf1f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf30(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf27(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf37(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf4c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf62(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf76(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xf8e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xfa8(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xfbd(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xfcd(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0x1003(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0x1034(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0x104f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0x106b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0x1087(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    0x2cea(%rip),%rax
mov    (%rax),%ecx
lea    -0x14(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <fread@plt>
cmp    $0x0,%rax
jne    1329 <main+0x1c9>
movl   $0x0,-0x4(%rbp)
jmp    158b <main+0x42b>
movl   $0x4,-0x1c(%rbp)
mov    -0x8(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0x1041(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0x103f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x100,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     1544 <main+0x3e4>
mov    -0x1c(%rbp),%esi
lea    0x1025(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    -0x14(%rbp),%eax
and    $0xf,%eax
mov    %rax,-0x28(%rbp)
sub    $0xf,%eax
ja     14dd <main+0x37d>
mov    -0x28(%rbp),%rax
lea    0xc5f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x14(%rbp),%edi
and    $0xfffffff0,%edi
call   1030 <print_text@plt>
jmp    14f6 <main+0x396>
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
and    $0x1f,%esi
call   1080 <print_tags@plt>
cmpl   $0x0,-0xc(%rbp)
jne    13d7 <main+0x277>
jmp    14f6 <main+0x396>
mov    0x2c0a(%rip),%rax
mov    (%rax),%ecx
lea    -0x18(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <fread@plt>
mov    -0x1c(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     1421 <main+0x2c1>
mov    -0x18(%rbp),%edi
call   1070 <print_hex@plt>
jmp    1429 <main+0x2c9>
mov    -0x18(%rbp),%edi
call   1050 <print_dec@plt>
jmp    14f6 <main+0x396>
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
and    $0x1f,%esi
call   1080 <print_tags@plt>
mov    -0x14(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     145b <main+0x2fb>
mov    -0x14(%rbp),%edi
sar    $0x5,%edi
call   1070 <print_hex@plt>
jmp    1466 <main+0x306>
mov    -0x14(%rbp),%edi
sar    $0x5,%edi
call   1050 <print_dec@plt>
jmp    14f6 <main+0x396>
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
and    $0xf,%esi
call   1080 <print_tags@plt>
mov    -0x14(%rbp),%edi
and    $0xfffffff0,%edi
call   1030 <print_text@plt>
cmpl   $0x0,-0xc(%rbp)
jne    1493 <main+0x333>
jmp    14f6 <main+0x396>
mov    0x2b4e(%rip),%rax
mov    (%rax),%ecx
lea    -0x14(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <fread@plt>
mov    -0x1c(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    $0x1,%edi
mov    $0x4,%esi
call   1080 <print_tags@plt>
mov    -0x14(%rbp),%edi
call   1050 <print_dec@plt>
jmp    14f6 <main+0x396>
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
and    $0xf,%esi
call   1080 <print_tags@plt>
mov    -0x14(%rbp),%edi
and    $0xfffffff0,%edi
call   1030 <print_text@plt>
movl   $0x1,-0x10(%rbp)
mov    0x2ae4(%rip),%rax
mov    (%rax),%ecx
lea    -0x14(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <fread@plt>
cmp    $0x0,%rax
jne    1536 <main+0x3d6>
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1576 <main+0x416>
mov    -0x1c(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x1c(%rbp)
jmp    135e <main+0x1fe>
cmpl   $0x0,-0x10(%rbp)
je     155c <main+0x3fc>
lea    0xe6d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x10(%rbp)
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1330 <main+0x1d0>
lea    0xe5b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xf06(%rip),%rdi
call   1040 <puts@plt>
lea    0xf01(%rip),%rdi
call   1040 <puts@plt>
lea    0xf31(%rip),%rdi
call   1040 <puts@plt>
lea    0xe97(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xf31(%rip),%rdi
call   1040 <puts@plt>
lea    0xe9a(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xf24(%rip),%rdi
call   1040 <puts@plt>
lea    0xf2b(%rip),%rdi
call   1040 <puts@plt>
lea    0xf3b(%rip),%rdi
call   1040 <puts@plt>
lea    0xf47(%rip),%rdi
call   1040 <puts@plt>
lea    0xf51(%rip),%rdi
call   1040 <puts@plt>
lea    0xf63(%rip),%rdi
call   1040 <puts@plt>
lea    0xf5b(%rip),%rdi
call   1040 <puts@plt>
lea    0xf6c(%rip),%rdi
call   1040 <puts@plt>
lea    0xf82(%rip),%rdi
call   1040 <puts@plt>
lea    0xf99(%rip),%rdi
call   1040 <puts@plt>
lea    0xfae(%rip),%rdi
call   1040 <puts@plt>
lea    0xfc7(%rip),%rdi
call   1040 <puts@plt>
lea    0xfe2(%rip),%rdi
call   1040 <puts@plt>
lea    0xff8(%rip),%rdi
call   1040 <puts@plt>
lea    0x1009(%rip),%rdi
call   1040 <puts@plt>
lea    0x1040(%rip),%rdi
call   1040 <puts@plt>
lea    0x1072(%rip),%rdi
call   1040 <puts@plt>
lea    0x108e(%rip),%rdi
call   1040 <puts@plt>
lea    0x10ab(%rip),%rdi
call   1040 <puts@plt>
lea    0x10c8(%rip),%rdi
call   1040 <puts@plt>
mov    0x2d27(%rip),%rbp
mov    0x0(%rbp),%ecx
lea    0xc(%rsp),%rdi
mov    $0x4,%ebx
mov    $0x4,%esi
mov    $0x1,%edx
call   1050 <fread@plt>
test   %rax,%rax
je     14e7 <main+0x377>
lea    0xd81(%rip),%rdi
lea    0x1094(%rip),%r12
lea    0xd05(%rip),%r15
xor    %eax,%eax
mov    %eax,%esi
lea    0x1(%rsi),%eax
mov    %eax,0x10(%rsp)
xor    %r14d,%r14d
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r12,%rdi
call   1040 <puts@plt>
mov    $0x100,%r13d
mov    $0xff,%r12d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0xd43(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0xc(%rsp),%esi
mov    %esi,%eax
and    $0xf,%eax
cmp    $0xf,%eax
ja     13d6 <main+0x266>
movslq (%r15,%rax,4),%rcx
add    %r15,%rcx
jmp    *%rcx
and    $0x1f,%esi
mov    %r14d,%edi
call   1090 <print_tags@plt>
mov    0xc(%rsp),%eax
mov    %eax,%edi
sar    $0x5,%edi
test   $0x10,%al
jne    13c8 <main+0x258>
call   1060 <print_dec@plt>
jmp    13ec <main+0x27c>
nopw   0x0(%rax,%rax,1)
and    $0x1f,%esi
mov    %r14d,%edi
call   1090 <print_tags@plt>
test   %r12d,%r12d
je     1480 <main+0x310>
mov    0x0(%rbp),%ecx
lea    0x14(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1050 <fread@plt>
add    $0x4,%ebx
add    $0xfffffffe,%r13d
testb  $0x10,0xc(%rsp)
mov    0x14(%rsp),%edi
jne    1488 <main+0x318>
call   1060 <print_dec@plt>
jmp    13ef <main+0x27f>
call   1080 <print_hex@plt>
jmp    13ec <main+0x27c>
and    $0xfffffff0,%esi
mov    %esi,%edi
jmp    13e7 <main+0x277>
mov    %r14d,%edi
mov    %eax,%esi
call   1090 <print_tags@plt>
mov    0xc(%rsp),%edi
and    $0xfffffff0,%edi
call   1030 <print_text@plt>
mov    %r12d,%r13d
mov    0x0(%rbp),%ecx
lea    0xc(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1050 <fread@plt>
test   %rax,%rax
je     14cf <main+0x35f>
add    $0x4,%ebx
mov    %r13d,%r12d
mov    $0x1,%r14d
sub    $0x1,%r12d
jae    1330 <main+0x1c0>
jmp    14a0 <main+0x330>
mov    %r14d,%edi
mov    $0xc,%esi
call   1090 <print_tags@plt>
mov    0xc(%rsp),%edi
and    $0xfffffff0,%edi
call   1030 <print_text@plt>
test   %r12d,%r12d
je     1480 <main+0x310>
mov    0x0(%rbp),%ecx
lea    0xc(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1050 <fread@plt>
add    $0x4,%ebx
add    $0xfffffffe,%r13d
mov    $0x1,%edi
mov    $0x4,%esi
call   1090 <print_tags@plt>
mov    0xc(%rsp),%edi
call   1060 <print_dec@plt>
jmp    13ef <main+0x27f>
xor    %r13d,%r13d
jmp    13ef <main+0x27f>
call   1080 <print_hex@plt>
jmp    13ef <main+0x27f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0xefe(%rip),%rdi
call   1040 <puts@plt>
lea    0xee6(%rip),%rdi
call   1040 <puts@plt>
lea    0xbaf(%rip),%rdi
lea    0xec2(%rip),%r12
mov    0x10(%rsp),%eax
jmp    12fd <main+0x18d>
lea    0xed7(%rip),%rdi
call   1040 <puts@plt>
lea    0xeda(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"<html>\0A\00"
@.str.1 = [61 x i8] c"<link rel=stylesheet type=\22text/css\22 href=\22colorforth.css\22>\0A\00"
@.str.2 = [27 x i8] c" <style type=\22text/css\22>\0A\00"
@.str.3 = [29 x i8] c" body { margin-right:10%;}\0A\00"
@.str.4 = [14 x i8] c" div.code {\0A\00"
@.str.5 = [17 x i8] c" width:100%;\0A\00"
@.str.6 = [20 x i8] c" padding:0.5em;\0A\00"
@.str.7 = [29 x i8] c" background-color:black;\0A\00"
@.str.8 = [25 x i8] c" font-size:xx-large;\0A\00"
@.str.9 = [23 x i8] c" font-weight:bold;\0A\00"
@.str.10 = [31 x i8] c" text-transform:lowercase;\0A\00"
@.str.11 = [5 x i8] c" }\0A\00"
@.str.12 = [30 x i8] c" code.define { color:red; }\0A\00"
@.str.13 = [35 x i8] c" code.compile { color:ff00; }\0A\00"
@.str.14 = [36 x i8] c" code.compilehex { color:green; }\0A\00"
@.str.15 = [34 x i8] c" code.execute { color:yellow; }\0A\00"
@.str.16 = [38 x i8] c" code.executehex { color:#c0c000; }\0A\00"
@.str.17 = [40 x i8] c" code.compilemacro { color:ffff; }\0A\00"
@.str.18 = [35 x i8] c" code.variable {color:#ff00ff; }\0A\00"
@.str.19 = [30 x i8] c" code.text { color:white; }\0A\00"
@.str.20 = [68 x i8] c" code.textcapitalized { color:white; text-transform:capitalize; }\0A\00"
@.str.21 = [63 x i8] c" code.textallcaps { color:white; text-transform:uppercase; }\0A\00"
@.str.22 = [41 x i8] c" code.display_macro { color:FF; }\0A\00"
@.str.23 = [42 x i8] c" code.compiler_feedback { color:grey; }\0A\00"
@.str.24 = [42 x i8] c" code.commented_number { color:white; }\0A\00"
@.str.25 = [12 x i8] c" </style>\0A\00"
@stdin = global i32 0
@.str.26 = [12 x i8] c"{block %d}\0A\00"
@.str.27 = [18 x i8] c"<div class=code>\0A\00"
@.str.28 = [17 x i8] c"<!-- pos: %d -->\00"
@.str.29 = [16 x i8] c"</code>\0A</div>\0A\00"
@.str.30 = [9 x i8] c"</code>\0A\00"
@.str.31 = [13 x i8] c"</div>\0A<hr>\0A\00"
@.str.32 = [9 x i8] c"</html>\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %4
store i32 0, i32* %7
store i32 0, i32* %7
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.13, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.14, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.15, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.16, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.17, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.18, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.19, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.20, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.21, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.22, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.23, i64 0, i64 0))
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.24, i64 0, i64 0))
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.25, i64 0, i64 0))
%34 = load i32, i32* @stdin
%35 = call i64 @fread(i32* %5, i32 4, i32 1, i32 %34)
%36 = icmp eq i64 %35, 0
br i1 %36, label %37, label %38
37: ; preds = %0
store i32 0, i32* %1
br label %146
38: ; preds = %0
store i32 4, i32* %7
br label %39
39: ; preds = %38, %142
%40 = load i32, i32* %2
%41 = add nsw i32 %40, 1
store i32 %41, i32* %2
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.26, i64 0, i64 0), i32 %40)
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.27, i64 0, i64 0))
store i32 256, i32* %3
br label %44
44: ; preds = %134, %39
%45 = load i32, i32* %3
%46 = add nsw i32 %45, -1
store i32 %46, i32* %3
%47 = icmp ne i32 %45, 0
br i1 %47, label %48, label %137
48: ; preds = %44
%49 = load i32, i32* %7
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.28, i64 0, i64 0), i32 %49)
%51 = load i32, i32* %5
%52 = and i32 %51, 15
switch i32 %52, label %120 [
i32 0, label %53
i32 2, label %57
i32 5, label %57
i32 6, label %82
i32 8, label %82
i32 15, label %82
i32 12, label %99
]
53: ; preds = %48
%54 = load i32, i32* %5
%55 = and i32 %54, -16
%56 = call i32 @print_text(i32 %55)
br label %128
57: ; preds = %48, %48
%58 = load i32, i32* %4
%59 = load i32, i32* %5
%60 = and i32 %59, 31
%61 = call i32 @print_tags(i32 %58, i32 %60)
%62 = load i32, i32* %3
%63 = icmp eq i32 %62, 0
br i1 %63, label %64, label %65
64: ; preds = %57
br label %128
65: ; preds = %57
%66 = load i32, i32* @stdin
%67 = call i64 @fread(i32* %6, i32 4, i32 1, i32 %66)
%68 = load i32, i32* %7
%69 = add nsw i32 %68, 4
store i32 %69, i32* %7
%70 = load i32, i32* %3
%71 = add nsw i32 %70, -1
store i32 %71, i32* %3
%72 = load i32, i32* %5
%73 = and i32 %72, 16
%74 = icmp ne i32 %73, 0
br i1 %74, label %75, label %78
75: ; preds = %65
%76 = load i32, i32* %6
%77 = call i32 @print_hex(i32 %76)
br label %81
78: ; preds = %65
%79 = load i32, i32* %6
%80 = call i32 @print_dec(i32 %79)
br label %81
81: ; preds = %78, %75
br label %128
82: ; preds = %48, %48, %48
%83 = load i32, i32* %4
%84 = load i32, i32* %5
%85 = and i32 %84, 31
%86 = call i32 @print_tags(i32 %83, i32 %85)
%87 = load i32, i32* %5
%88 = and i32 %87, 16
%89 = icmp ne i32 %88, 0
br i1 %89, label %90, label %94
90: ; preds = %82
%91 = load i32, i32* %5
%92 = ashr i32 %91, 5
%93 = call i32 @print_hex(i32 %92)
br label %98
94: ; preds = %82
%95 = load i32, i32* %5
%96 = ashr i32 %95, 5
%97 = call i32 @print_dec(i32 %96)
br label %98
98: ; preds = %94, %90
br label %128
99: ; preds = %48
%100 = load i32, i32* %4
%101 = load i32, i32* %5
%102 = and i32 %101, 15
%103 = call i32 @print_tags(i32 %100, i32 %102)
%104 = load i32, i32* %5
%105 = and i32 %104, -16
%106 = call i32 @print_text(i32 %105)
%107 = load i32, i32* %3
%108 = icmp eq i32 %107, 0
br i1 %108, label %109, label %110
109: ; preds = %99
br label %128
110: ; preds = %99
%111 = load i32, i32* @stdin
%112 = call i64 @fread(i32* %5, i32 4, i32 1, i32 %111)
%113 = load i32, i32* %7
%114 = add nsw i32 %113, 4
store i32 %114, i32* %7
%115 = load i32, i32* %3
%116 = add nsw i32 %115, -1
store i32 %116, i32* %3
%117 = call i32 @print_tags(i32 1, i32 4)
%118 = load i32, i32* %5
%119 = call i32 @print_dec(i32 %118)
br label %128
120: ; preds = %48
%121 = load i32, i32* %4
%122 = load i32, i32* %5
%123 = and i32 %122, 15
%124 = call i32 @print_tags(i32 %121, i32 %123)
%125 = load i32, i32* %5
%126 = and i32 %125, -16
%127 = call i32 @print_text(i32 %126)
br label %128
128: ; preds = %120, %110, %109, %98, %81, %64, %53
store i32 1, i32* %4
%129 = load i32, i32* @stdin
%130 = call i64 @fread(i32* %5, i32 4, i32 1, i32 %129)
%131 = icmp eq i64 %130, 0
br i1 %131, label %132, label %134
132: ; preds = %128
%133 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.29, i64 0, i64 0))
br label %144
134: ; preds = %128
%135 = load i32, i32* %7
%136 = add nsw i32 %135, 4
store i32 %136, i32* %7
br label %44
137: ; preds = %44
%138 = load i32, i32* %4
%139 = icmp ne i32 %138, 0
br i1 %139, label %140, label %142
140: ; preds = %137
%141 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.30, i64 0, i64 0))
br label %142
142: ; preds = %140, %137
store i32 0, i32* %4
%143 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.31, i64 0, i64 0))
br label %39
144: ; preds = %132
%145 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.32, i64 0, i64 0))
store i32 0, i32* %1
br label %146
146: ; preds = %144, %37
%147 = load i32, i32* %1
ret i32 %147
}

LLVM IR (-O2):
@.str.3 = [29 x i8] c" body { margin-right:10%;}\0A\00"
@.str.5 = [17 x i8] c" width:100%;\0A\00"
@stdin = global i32 0
@.str.26 = [12 x i8] c"{block %d}\0A\00"
@.str.28 = [17 x i8] c"<!-- pos: %d -->\00"
@str = [7 x i8] c"<html>\00"
@str.33 = [60 x i8] c"<link rel=stylesheet type=\22text/css\22 href=\22colorforth.css\22>\00"
@str.34 = [26 x i8] c" <style type=\22text/css\22>\00"
@str.35 = [13 x i8] c" div.code {\00"
@str.36 = [19 x i8] c" padding:0.5em;\00"
@str.37 = [28 x i8] c" background-color:black;\00"
@str.38 = [24 x i8] c" font-size:xx-large;\00"
@str.39 = [22 x i8] c" font-weight:bold;\00"
@str.40 = [30 x i8] c" text-transform:lowercase;\00"
@str.41 = [4 x i8] c" }\00"
@str.42 = [29 x i8] c" code.define { color:red; }\00"
@str.43 = [34 x i8] c" code.compile { color:ff00; }\00"
@str.44 = [35 x i8] c" code.compilehex { color:green; }\00"
@str.45 = [33 x i8] c" code.execute { color:yellow; }\00"
@str.46 = [37 x i8] c" code.executehex { color:#c0c000; }\00"
@str.47 = [39 x i8] c" code.compilemacro { color:ffff; }\00"
@str.48 = [34 x i8] c" code.variable {color:#ff00ff; }\00"
@str.49 = [29 x i8] c" code.text { color:white; }\00"
@str.50 = [67 x i8] c" code.textcapitalized { color:white; text-transform:capitalize; }\00"
@str.51 = [62 x i8] c" code.textallcaps { color:white; text-transform:uppercase; }\00"
@str.52 = [40 x i8] c" code.display_macro { color:FF; }\00"
@str.53 = [41 x i8] c" code.compiler_feedback { color:grey; }\00"
@str.54 = [41 x i8] c" code.commented_number { color:white; }\00"
@str.55 = [11 x i8] c" </style>\00"
@str.56 = [17 x i8] c"<div class=code>\00"
@str.57 = [12 x i8] c"</div>\0A<hr>\00"
@str.58 = [8 x i8] c"</code>\00"
@str.59 = [15 x i8] c"</code>\0A</div>\00"
@str.60 = [8 x i8] c"</html>\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.33, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.34, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.35, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.36, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.37, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.38, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.39, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.40, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.41, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.42, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.43, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.44, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.45, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.46, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.47, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.48, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.49, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.50, i64 0, i64 0))
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.51, i64 0, i64 0))
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.52, i64 0, i64 0))
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.53, i64 0, i64 0))
%29 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.54, i64 0, i64 0))
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.55, i64 0, i64 0))
%31 = load i32, i32* @stdin
%32 = call i64 @fread(i32* %1, i32 4, i32 1, i32 %31)
%33 = icmp eq i64 %32, 0
br i1 %33, label %114, label %34
34: ; preds = %0, %111
%35 = phi i32 [ %37, %111 ], [ 0, %0 ]
%36 = phi i32 [ %107, %111 ], [ 4, %0 ]
%37 = add nuw nsw i32 %35, 1
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.26, i64 0, i64 0), i32 %35)
%39 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.56, i64 0, i64 0))
br label %43
40: ; preds = %101
%41 = add nsw i32 %102, -1
%42 = icmp eq i32 %102, 0
br i1 %42, label %111, label %43
43: ; preds = %34, %40
%44 = phi i32 [ 255, %34 ], [ %41, %40 ]
%45 = phi i32 [ %36, %34 ], [ %107, %40 ]
%46 = phi i32 [ 0, %34 ], [ 1, %40 ]
%47 = phi i32 [ 256, %34 ], [ %102, %40 ]
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.28, i64 0, i64 0), i32 %45)
%49 = load i32, i32* %1
%50 = and i32 %49, 15
switch i32 %50, label %96 [
i32 0, label %51
i32 2, label %54
i32 5, label %54
i32 6, label %71
i32 8, label %71
i32 15, label %71
i32 12, label %82
]
51: ; preds = %43
%52 = and i32 %49, -16
%53 = call i32 @print_text(i32 %52)
br label %101
54: ; preds = %43, %43
%55 = and i32 %49, 31
%56 = call i32 @print_tags(i32 %46, i32 %55)
%57 = icmp eq i32 %44, 0
br i1 %57, label %101, label %58
58: ; preds = %54
%59 = load i32, i32* @stdin
%60 = call i64 @fread(i32* %2, i32 4, i32 1, i32 %59)
%61 = add nsw i32 %45, 4
%62 = add nsw i32 %47, -2
%63 = load i32, i32* %1
%64 = and i32 %63, 16
%65 = icmp eq i32 %64, 0
%66 = load i32, i32* %2
br i1 %65, label %69, label %67
67: ; preds = %58
%68 = call i32 @print_hex(i32 %66)
br label %101
69: ; preds = %58
%70 = call i32 @print_dec(i32 %66)
br label %101
71: ; preds = %43, %43, %43
%72 = and i32 %49, 31
%73 = call i32 @print_tags(i32 %46, i32 %72)
%74 = load i32, i32* %1
%75 = and i32 %74, 16
%76 = icmp eq i32 %75, 0
%77 = ashr i32 %74, 5
br i1 %76, label %80, label %78
78: ; preds = %71
%79 = call i32 @print_hex(i32 %77)
br label %101
80: ; preds = %71
%81 = call i32 @print_dec(i32 %77)
br label %101
82: ; preds = %43
%83 = call i32 @print_tags(i32 %46, i32 12)
%84 = load i32, i32* %1
%85 = and i32 %84, -16
%86 = call i32 @print_text(i32 %85)
%87 = icmp eq i32 %44, 0
br i1 %87, label %101, label %88
88: ; preds = %82
%89 = load i32, i32* @stdin
%90 = call i64 @fread(i32* %1, i32 4, i32 1, i32 %89)
%91 = add nsw i32 %45, 4
%92 = add nsw i32 %47, -2
%93 = call i32 @print_tags(i32 1, i32 4)
%94 = load i32, i32* %1
%95 = call i32 @print_dec(i32 %94)
br label %101
96: ; preds = %43
%97 = call i32 @print_tags(i32 %46, i32 %50)
%98 = load i32, i32* %1
%99 = and i32 %98, -16
%100 = call i32 @print_text(i32 %99)
br label %101
101: ; preds = %82, %78, %80, %67, %69, %54, %96, %88, %51
%102 = phi i32 [ %44, %96 ], [ 0, %82 ], [ %92, %88 ], [ %44, %78 ], [ %44, %80 ], [ 0, %54 ], [ %62, %67 ], [ %62, %69 ], [ %44, %51 ]
%103 = phi i32 [ %45, %96 ], [ %45, %82 ], [ %91, %88 ], [ %45, %78 ], [ %45, %80 ], [ %45, %54 ], [ %61, %67 ], [ %61, %69 ], [ %45, %51 ]
%104 = load i32, i32* @stdin
%105 = call i64 @fread(i32* %1, i32 4, i32 1, i32 %104)
%106 = icmp eq i64 %105, 0
%107 = add nsw i32 %103, 4
br i1 %106, label %108, label %40
108: ; preds = %101
%109 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.59, i64 0, i64 0))
%110 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.60, i64 0, i64 0))
br label %114
111: ; preds = %40
%112 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.58, i64 0, i64 0))
%113 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.57, i64 0, i64 0))
br label %34
114: ; preds = %0, %108
ret i32 0
}