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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
scalar_t__ is_delimeter(char);
int is_keyword(char *);
int /*<<< orphan*/ print_char_html(char);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ set_mode(int, int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int main(int _argc, char **_argv) {
  FILE *in, *out;
  char c;
  int mode;
  char buf[80];
  int bufidx = 0;
  int progress = 1;
  int echo;
  int saved_mode;
  int kw;
  char tmpc;
  char prevc;
  if (_argc < 2) {
    fprintf(stderr, "USAGE: c2html <file>\n");
    return 1;
  }
  if ((in = fopen(_argv[1], "rt")) == NULL) {
    fprintf(stderr, "Cannot open input file.\n");
    return 1;
  }
  fprintf(stdout, "<pre>");
  mode = 0;
  while (!feof(in) && progress) {
    echo = 1;
    prevc = c;
    c = fgetc(in);
    if (c == '/' && (mode < 20)) {
      saved_mode = mode;
      mode = 20;
    }
    switch (mode) {
    case 20:
      echo = 0;
      mode = 21;
      break;
    case 21:
      if (c == '/') {
        if (saved_mode == 2) {
          set_mode(0, 6);
        }
        mode = 22;
        set_mode(1, 4);
      } else if (c == '*') {
        if (saved_mode == 2) {
          set_mode(0, 6);
        }
        mode = 23;
        set_mode(1, 2);
      } else {
        mode = saved_mode;
      }
      printf("/");
      break;
    case 22:
      if (c == '\n') {
        set_mode(0, 4);
      }
      break;
    case 23:
      if (c == '*') {
        mode = 24;
      }
      break;
    case 24:
      if (c == '/') {
        mode = 1;
        fprintf(stdout, "/");
        echo = 0;
        set_mode(0, 2);
      } else
        mode = 23;
      break;
    case 0:
      if (c == '#') {
        mode = 2;
        set_mode(1, 6);
        break;
      } else if (c == ' ')
        break;
      mode = 1;
    case 1:
      if (c == '"' && prevc != 0x27 && prevc != '\\') {
        set_mode(1, 8);
        mode = 25;
      }
      break;
    case 25:
      if (c == '"' && prevc != '\\') {
        print_char_html('"');
        set_mode(0, 8);
        echo = 0;
        mode = 1;
      }
      break;
    case 2:
      if (c == '\n') {
        set_mode(0, 6);
      }
      break;
    }
    if (echo && (mode == 1 || (mode != 1 && bufidx))) {
      buf[bufidx++] = c;
      buf[bufidx] = 0;
      if (is_delimeter(c)) {
        kw = 0;
        if (bufidx > 2) {
          kw = is_keyword(buf);
        }
        if (kw) {
          set_mode(1, 0);
        }
        tmpc = buf[bufidx - 1];
        buf[bufidx - 1] = 0;
        fprintf(stdout, "%s", buf);
        if (kw) {
          set_mode(0, 0);
        }
        print_char_html(tmpc);
        bufidx = 0;
        buf[0] = 0;
      }
    } else if (echo)
      print_char_html(c);
    if (c == '\n' && mode != 23) {
      mode = 0;
    }
  }
  fclose(in);
  fprintf(stdout, "</pre>\n");
  fprintf(stdout, "<!-- == Generated by CHTM convertor -->\n");
  fprintf(stdout,
          "<!-- == CopyRight (C) 1999, Dmitry Obukhov, dso@usa.net -->\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x84(%rbp)
movl   $0x1,-0x88(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    11fa <main+0x5a>
mov    0x2e02(%rip),%rax
mov    (%rax),%edi
lea    0xe81(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    16f0 <main+0x550>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe75(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    123f <main+0x9f>
mov    0x2dbd(%rip),%rax
mov    (%rax),%edi
lea    0xe55(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    16f0 <main+0x550>
mov    0x2d92(%rip),%rax
mov    (%rax),%edi
lea    0xe4b(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   1090 <feof@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x97(%rbp)
jne    1289 <main+0xe9>
cmpl   $0x0,-0x88(%rbp)
setne  %al
mov    %al,-0x97(%rbp)
mov    -0x97(%rbp),%al
test   $0x1,%al
jne    129c <main+0xfc>
jmp    169b <main+0x4fb>
movl   $0x1,-0x8c(%rbp)
mov    -0x21(%rbp),%al
mov    %al,-0x96(%rbp)
mov    -0x18(%rbp),%rdi
call   1070 <fgetc@plt>
mov    %al,-0x21(%rbp)
movsbl -0x21(%rbp),%eax
cmp    $0x2f,%eax
jne    12e2 <main+0x142>
cmpl   $0x14,-0x28(%rbp)
jge    12e2 <main+0x142>
mov    -0x28(%rbp),%eax
mov    %eax,-0x90(%rbp)
movl   $0x14,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    %rax,-0xa0(%rbp)
sub    $0x19,%rax
ja     1542 <main+0x3a2>
mov    -0xa0(%rbp),%rax
lea    0xcfc(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x8c(%rbp)
movl   $0x15,-0x28(%rbp)
jmp    1542 <main+0x3a2>
movsbl -0x21(%rbp),%eax
cmp    $0x2f,%eax
jne    1364 <main+0x1c4>
cmpl   $0x2,-0x90(%rbp)
jne    1349 <main+0x1a9>
xor    %edi,%edi
mov    $0x6,%esi
call   1050 <set_mode@plt>
movl   $0x16,-0x28(%rbp)
mov    $0x1,%edi
mov    $0x4,%esi
call   1050 <set_mode@plt>
jmp    13b3 <main+0x213>
movsbl -0x21(%rbp),%eax
cmp    $0x2a,%eax
jne    13a5 <main+0x205>
cmpl   $0x2,-0x90(%rbp)
jne    138a <main+0x1ea>
xor    %edi,%edi
mov    $0x6,%esi
call   1050 <set_mode@plt>
movl   $0x17,-0x28(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
call   1050 <set_mode@plt>
jmp    13ae <main+0x20e>
mov    -0x90(%rbp),%eax
mov    %eax,-0x28(%rbp)
jmp    13b3 <main+0x213>
lea    0xce6(%rip),%rdi
call   1060 <printf@plt>
jmp    1542 <main+0x3a2>
movsbl -0x21(%rbp),%eax
cmp    $0xa,%eax
jne    13dd <main+0x23d>
xor    %edi,%edi
mov    $0x4,%esi
call   1050 <set_mode@plt>
jmp    1542 <main+0x3a2>
movsbl -0x21(%rbp),%eax
cmp    $0x2a,%eax
jne    13f6 <main+0x256>
movl   $0x18,-0x28(%rbp)
jmp    1542 <main+0x3a2>
movsbl -0x21(%rbp),%eax
cmp    $0x2f,%eax
jne    1441 <main+0x2a1>
movl   $0x1,-0x28(%rbp)
mov    0x2bc2(%rip),%rax
mov    (%rax),%edi
lea    0xc81(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x0,-0x8c(%rbp)
xor    %edi,%edi
mov    $0x2,%esi
call   1050 <set_mode@plt>
jmp    1448 <main+0x2a8>
movl   $0x17,-0x28(%rbp)
jmp    1542 <main+0x3a2>
movsbl -0x21(%rbp),%eax
cmp    $0x23,%eax
jne    1475 <main+0x2d5>
movl   $0x2,-0x28(%rbp)
mov    $0x1,%edi
mov    $0x6,%esi
call   1050 <set_mode@plt>
jmp    1542 <main+0x3a2>
movsbl -0x21(%rbp),%eax
cmp    $0x20,%eax
jne    1487 <main+0x2e7>
jmp    1542 <main+0x3a2>
jmp    148c <main+0x2ec>
movl   $0x1,-0x28(%rbp)
movsbl -0x21(%rbp),%eax
cmp    $0x22,%eax
jne    14d6 <main+0x336>
movsbl -0x96(%rbp),%eax
cmp    $0x27,%eax
je     14d6 <main+0x336>
movsbl -0x96(%rbp),%eax
cmp    $0x5c,%eax
je     14d6 <main+0x336>
mov    $0x1,%edi
mov    $0x8,%esi
call   1050 <set_mode@plt>
movl   $0x19,-0x28(%rbp)
jmp    1542 <main+0x3a2>
movsbl -0x21(%rbp),%eax
cmp    $0x22,%eax
jne    151f <main+0x37f>
movsbl -0x96(%rbp),%eax
cmp    $0x5c,%eax
je     151f <main+0x37f>
mov    $0x22,%edi
call   10b0 <print_char_html@plt>
xor    %edi,%edi
mov    $0x8,%esi
call   1050 <set_mode@plt>
movl   $0x0,-0x8c(%rbp)
movl   $0x1,-0x28(%rbp)
jmp    1542 <main+0x3a2>
movsbl -0x21(%rbp),%eax
cmp    $0xa,%eax
jne    153d <main+0x39d>
xor    %edi,%edi
mov    $0x6,%esi
call   1050 <set_mode@plt>
jmp    1542 <main+0x3a2>
cmpl   $0x0,-0x8c(%rbp)
je     165d <main+0x4bd>
cmpl   $0x1,-0x28(%rbp)
je     1570 <main+0x3d0>
cmpl   $0x1,-0x28(%rbp)
je     165d <main+0x4bd>
cmpl   $0x0,-0x84(%rbp)
je     165d <main+0x4bd>
mov    -0x21(%rbp),%cl
mov    -0x84(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x84(%rbp)
cltq
mov    %cl,-0x80(%rbp,%rax,1)
movslq -0x84(%rbp),%rax
movb   $0x0,-0x80(%rbp,%rax,1)
movsbl -0x21(%rbp),%edi
call   10c0 <is_delimeter@plt>
cmp    $0x0,%rax
je     1658 <main+0x4b8>
movl   $0x0,-0x94(%rbp)
cmpl   $0x2,-0x84(%rbp)
jle    15cf <main+0x42f>
lea    -0x80(%rbp),%rdi
call   1030 <is_keyword@plt>
mov    %eax,-0x94(%rbp)
cmpl   $0x0,-0x94(%rbp)
je     15e8 <main+0x448>
mov    $0x1,%edi
xor    %esi,%esi
call   1050 <set_mode@plt>
mov    -0x84(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x80(%rbp,%rax,1),%al
mov    %al,-0x95(%rbp)
mov    -0x84(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,-0x80(%rbp,%rax,1)
mov    0x29c4(%rip),%rax
mov    (%rax),%edi
lea    -0x80(%rbp),%rdx
lea    0xa81(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
cmpl   $0x0,-0x94(%rbp)
je     163e <main+0x49e>
xor    %esi,%esi
mov    %esi,%edi
call   1050 <set_mode@plt>
movsbl -0x95(%rbp),%edi
call   10b0 <print_char_html@plt>
movl   $0x0,-0x84(%rbp)
movb   $0x0,-0x80(%rbp)
jmp    1678 <main+0x4d8>
cmpl   $0x0,-0x8c(%rbp)
je     1673 <main+0x4d3>
movsbl -0x21(%rbp),%edi
call   10b0 <print_char_html@plt>
jmp    1678 <main+0x4d8>
movsbl -0x21(%rbp),%eax
cmp    $0xa,%eax
jne    1696 <main+0x4f6>
cmpl   $0x17,-0x28(%rbp)
je     1696 <main+0x4f6>
movl   $0x0,-0x28(%rbp)
jmp    125d <main+0xbd>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
mov    0x292d(%rip),%rax
mov    (%rax),%edi
lea    0x9f1(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    0x2916(%rip),%rax
mov    (%rax),%edi
lea    0x9e2(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    0x28ff(%rip),%rax
mov    (%rax),%edi
lea    0x9f4(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
cmp    $0x1,%edi
jg     11c8 <main+0x28>
mov    0x2e26(%rip),%rax
mov    (%rax),%edi
lea    0xea5(%rip),%rsi
jmp    1256 <main+0xb6>
mov    0x8(%rsi),%rdi
lea    0xeab(%rip),%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
je     1246 <main+0xa6>
mov    %rax,%rbx
mov    0x2df1(%rip),%rax
mov    (%rax),%edi
lea    0xeaa(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    %rbx,%rdi
call   1090 <feof@plt>
test   %eax,%eax
je     1271 <main+0xd1>
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    0x2dc6(%rip),%rbx
mov    (%rbx),%edi
lea    0xe8a(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    (%rbx),%edi
lea    0xe82(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    (%rbx),%edi
lea    0xe9b(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
xor    %eax,%eax
jmp    1262 <main+0xc2>
mov    0x2d93(%rip),%rax
mov    (%rax),%edi
lea    0xe2b(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0x1,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %ebp,%ebp
movl   $0x0,(%rsp)
mov    %rbx,0x8(%rsp)
jmp    12d1 <main+0x131>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl %r15b,%edi
call   10b0 <print_char_html@plt>
movb   $0x0,0x10(%rsp)
movl   $0x0,(%rsp)
cmp    $0x17,%r12d
mov    %r12d,%ebp
mov    $0x0,%eax
cmovne %eax,%ebp
cmp    $0xa,%r14b
cmovne %r12d,%ebp
mov    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1090 <feof@plt>
test   %eax,%eax
jne    1203 <main+0x63>
mov    %r14d,%r15d
mov    %rbx,%rdi
call   1070 <fgetc@plt>
mov    %eax,%r14d
cmp    $0x2f,%al
sete   %al
cmp    $0x14,%ebp
setl   %cl
test   %cl,%al
mov    %ebp,%r13d
mov    $0x14,%eax
cmovne %eax,%r13d
mov    0x4(%rsp),%eax
cmovne %ebp,%eax
mov    %eax,0x4(%rsp)
cmp    $0x19,%r13d
ja     14e0 <main+0x340>
mov    $0x15,%r12d
lea    0xce6(%rip),%rcx
movslq (%rcx,%r13,4),%rax
add    %rcx,%rax
jmp    *%rax
cmp    $0x20,%r14b
je     1504 <main+0x364>
cmp    $0x22,%r14b
je     1377 <main+0x1d7>
mov    $0x1,%r12d
cmp    $0x23,%r14b
jne    1513 <main+0x373>
mov    $0x1,%edi
mov    $0x6,%esi
call   1060 <set_mode@plt>
mov    $0x2,%r13d
cmp    $0x1,%r13d
jne    14e6 <main+0x346>
jmp    1510 <main+0x370>
mov    $0x1,%r12d
cmp    $0x22,%r14b
jne    1513 <main+0x373>
mov    $0x1,%r12d
cmp    $0x27,%r15b
je     1513 <main+0x373>
cmp    $0x5c,%r15b
je     1513 <main+0x373>
mov    $0x1,%edi
mov    $0x8,%esi
call   1060 <set_mode@plt>
mov    $0x19,%r13d
cmp    $0x1,%r13d
jne    14e6 <main+0x346>
jmp    1510 <main+0x370>
mov    $0x2,%r13d
cmp    $0xa,%r14b
jne    14e0 <main+0x340>
xor    %edi,%edi
mov    $0x6,%esi
jmp    13e5 <main+0x245>
mov    $0x16,%r13d
cmp    $0xa,%r14b
jne    14e0 <main+0x340>
xor    %edi,%edi
mov    $0x4,%esi
call   1060 <set_mode@plt>
cmp    $0x1,%r13d
jne    14e6 <main+0x346>
jmp    1510 <main+0x370>
xor    %r13d,%r13d
cmp    $0x2a,%r14b
sete   %r13b
add    $0x17,%r13d
cmp    $0x1,%r13d
jne    14e6 <main+0x346>
jmp    1510 <main+0x370>
mov    $0x17,%r13d
cmp    $0x2f,%r14b
jne    14e0 <main+0x340>
mov    0x2baa(%rip),%rax
mov    (%rax),%edi
lea    0xc69(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
xor    %edi,%edi
mov    $0x2,%esi
jmp    149c <main+0x2fc>
cmp    $0x2f,%r14b
jne    14ac <main+0x30c>
mov    $0x16,%r13d
mov    $0x4,%ebp
cmpl   $0x2,0x4(%rsp)
jne    146b <main+0x2cb>
xor    %edi,%edi
mov    $0x6,%esi
call   1060 <set_mode@plt>
mov    $0x1,%edi
mov    %ebp,%esi
call   1060 <set_mode@plt>
jmp    14cd <main+0x32d>
mov    $0x19,%r13d
cmp    $0x22,%r14b
jne    14e0 <main+0x340>
cmp    $0x5c,%r15b
je     14e0 <main+0x340>
mov    $0x22,%edi
call   10b0 <print_char_html@plt>
xor    %edi,%edi
mov    $0x8,%esi
call   1060 <set_mode@plt>
mov    $0x1,%r12d
jmp    12a5 <main+0x105>
mov    0x4(%rsp),%eax
mov    %eax,%r13d
cmp    $0x2a,%r14b
jne    14cd <main+0x32d>
mov    $0x17,%r13d
mov    $0x2,%ebp
cmpl   $0x2,0x4(%rsp)
je     145f <main+0x2bf>
jmp    146b <main+0x2cb>
mov    $0x2f,%edi
call   1030 <putchar@plt>
nopw   0x0(%rax,%rax,1)
cmp    $0x1,%r13d
je     1510 <main+0x370>
cmpl   $0x0,(%rsp)
jne    1510 <main+0x370>
movsbl %r14b,%edi
call   10b0 <print_char_html@plt>
movl   $0x0,(%rsp)
mov    %r13d,%r12d
jmp    12a5 <main+0x105>
xor    %r13d,%r13d
cmp    $0x1,%r13d
jne    14e6 <main+0x346>
nopl   (%rax)
mov    %r13d,%r12d
mov    (%rsp),%ebp
movslq %ebp,%rbx
mov    %r14b,0x10(%rsp,%rbx,1)
movb   $0x0,0x11(%rsp,%rbx,1)
movsbl %r14b,%edi
call   10c0 <is_delimeter@plt>
test   %rax,%rax
je     1594 <main+0x3f4>
mov    $0x1,%r13b
cmp    $0x2,%ebp
jl     1556 <main+0x3b6>
lea    0x10(%rsp),%rdi
call   1040 <is_keyword@plt>
test   %eax,%eax
je     1556 <main+0x3b6>
xor    %r13d,%r13d
mov    $0x1,%edi
xor    %esi,%esi
call   1060 <set_mode@plt>
movzbl 0x10(%rsp,%rbx,1),%r15d
movb   $0x0,0x10(%rsp,%rbx,1)
mov    0x2a70(%rip),%rax
mov    (%rax),%edi
lea    0xb31(%rip),%rsi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
test   %r13b,%r13b
jne    1290 <main+0xf0>
xor    %edi,%edi
xor    %esi,%esi
call   1060 <set_mode@plt>
jmp    1290 <main+0xf0>
add    $0x1,%rbx
mov    %ebx,%eax
mov    %ebx,(%rsp)
jmp    12a5 <main+0x105>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"USAGE: c2html <file>\0A\00"
@.str.1 = [3 x i8] c"rt\00"
@.str.2 = [25 x i8] c"Cannot open input file.\0A\00"
@stdout = global i32 0
@.str.3 = [6 x i8] c"<pre>\00"
@.str.4 = [2 x i8] c"/\00"
@.str.5 = [3 x i8] c"%s\00"
@.str.6 = [8 x i8] c"</pre>\0A\00"
@.str.7 = [41 x i8] c"<!-- == Generated by CHTM convertor -->\0A\00"
@.str.8 = [61 x i8] c"<!-- == CopyRight (C) 1999, Dmitry Obukhov, dso@usa.net -->\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [80 x i8]
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%5 = icmp slt i32 %0, 2
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = tail call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %131
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = tail call i32* @fopen(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp eq i32* %12, null
br i1 %13, label %14, label %17
14: ; preds = %9
%15 = load i32, i32* @stderr
%16 = tail call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
br label %131
17: ; preds = %9
%18 = load i32, i32* @stdout
%19 = tail call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%20 = call i32 @feof(i32* %12)
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %123
22: ; preds = %17, %114
%23 = phi i8 [ %27, %114 ], [ undef, %17 ]
%24 = phi i32 [ %32, %114 ], [ undef, %17 ]
%25 = phi i32 [ %120, %114 ], [ 0, %17 ]
%26 = phi i32 [ %116, %114 ], [ 0, %17 ]
%27 = call signext i8 @fgetc(i32* %12)
%28 = icmp eq i8 %27, 47
%29 = icmp slt i32 %25, 20
%30 = select i1 %28, i1 %29, i1 false
%31 = select i1 %30, i32 20, i32 %25
%32 = select i1 %30, i32 %25, i32 %24
switch i32 %31, label %82 [
i32 20, label %114
i32 21, label %33
i32 22, label %51
i32 23, label %55
i32 24, label %58
i32 0, label %63
i32 1, label %66
i32 25, label %71
i32 2, label %78
]
33: ; preds = %22
br i1 %28, label %34, label %36
34: ; preds = %33
%35 = icmp eq i32 %32, 2
br i1 %35, label %40, label %44
36: ; preds = %33
%37 = icmp eq i8 %27, 42
br i1 %37, label %38, label %48
38: ; preds = %36
%39 = icmp eq i32 %32, 2
br i1 %39, label %40, label %44
40: ; preds = %38, %34
%41 = phi i32 [ 4, %34 ], [ 2, %38 ]
%42 = phi i32 [ 22, %34 ], [ 23, %38 ]
%43 = call i32 @set_mode(i32 0, i32 6)
br label %44
44: ; preds = %40, %38, %34
%45 = phi i32 [ 4, %34 ], [ 2, %38 ], [ %41, %40 ]
%46 = phi i32 [ 22, %34 ], [ 23, %38 ], [ %42, %40 ]
%47 = call i32 @set_mode(i32 1, i32 %45)
br label %48
48: ; preds = %44, %36
%49 = phi i32 [ %32, %36 ], [ %46, %44 ]
%50 = call i32 @putchar(i32 47)
br label %82
51: ; preds = %22
%52 = icmp eq i8 %27, 10
br i1 %52, label %53, label %82
53: ; preds = %51
%54 = call i32 @set_mode(i32 0, i32 4)
br label %82
55: ; preds = %22
%56 = icmp eq i8 %27, 42
%57 = select i1 %56, i32 24, i32 23
br label %82
58: ; preds = %22
br i1 %28, label %59, label %82
59: ; preds = %58
%60 = load i32, i32* @stdout
%61 = call i32 (i32, i8*, ...) @fprintf(i32 %60, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%62 = call i32 @set_mode(i32 0, i32 2)
br label %114
63: ; preds = %22
switch i8 %27, label %87 [
i8 35, label %64
i8 32, label %82
i8 34, label %68
]
64: ; preds = %63
%65 = call i32 @set_mode(i32 1, i32 6)
br label %82
66: ; preds = %22
%67 = icmp eq i8 %27, 34
br i1 %67, label %68, label %87
68: ; preds = %63, %66
switch i8 %23, label %69 [
i8 92, label %87
i8 39, label %87
]
69: ; preds = %68
%70 = call i32 @set_mode(i32 1, i32 8)
br label %82
71: ; preds = %22
%72 = icmp eq i8 %27, 34
%73 = icmp ne i8 %23, 92
%74 = select i1 %72, i1 %73, i1 false
br i1 %74, label %75, label %82
75: ; preds = %71
%76 = call i32 @print_char_html(i8 signext 34)
%77 = call i32 @set_mode(i32 0, i32 8)
br label %114
78: ; preds = %22
%79 = icmp eq i8 %27, 10
br i1 %79, label %80, label %82
80: ; preds = %78
%81 = call i32 @set_mode(i32 0, i32 6)
br label %82
82: ; preds = %22, %80, %78, %71, %69, %64, %53, %51, %48, %55, %58, %63
%83 = phi i32 [ 0, %63 ], [ 23, %58 ], [ %57, %55 ], [ %49, %48 ], [ 22, %51 ], [ 22, %53 ], [ 2, %64 ], [ 25, %69 ], [ 25, %71 ], [ 2, %78 ], [ 2, %80 ], [ %31, %22 ]
%84 = icmp ne i32 %83, 1
%85 = icmp eq i32 %26, 0
%86 = select i1 %84, i1 %85, i1 false
br i1 %86, label %112, label %87
87: ; preds = %66, %63, %68, %68, %82
%88 = phi i32 [ %83, %82 ], [ 1, %68 ], [ 1, %68 ], [ 1, %63 ], [ 1, %66 ]
%89 = add nsw i32 %26, 1
%90 = sext i32 %26 to i64
%91 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 %90
store i8 %27, i8* %91
%92 = sext i32 %89 to i64
%93 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 %92
store i8 0, i8* %93
%94 = call i64 @is_delimeter(i8 signext %27)
%95 = icmp eq i64 %94, 0
br i1 %95, label %114, label %96
96: ; preds = %87
%97 = icmp sgt i32 %26, 1
br i1 %97, label %98, label %103
98: ; preds = %96
%99 = call i32 @is_keyword(i8* %4)
%100 = icmp eq i32 %99, 0
br i1 %100, label %103, label %101
101: ; preds = %98
%102 = call i32 @set_mode(i32 1, i32 0)
br label %103
103: ; preds = %96, %101, %98
%104 = phi i1 [ false, %101 ], [ true, %98 ], [ true, %96 ]
%105 = load i8, i8* %91
store i8 0, i8* %91
%106 = load i32, i32* @stdout
%107 = call i32 (i32, i8*, ...) @fprintf(i32 %106, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %4)
br i1 %104, label %110, label %108
108: ; preds = %103
%109 = call i32 @set_mode(i32 0, i32 0)
br label %110
110: ; preds = %108, %103
%111 = call i32 @print_char_html(i8 signext %105)
store i8 0, i8* %4
br label %114
112: ; preds = %82
%113 = call i32 @print_char_html(i8 signext %27)
br label %114
114: ; preds = %22, %59, %75, %112, %87, %110
%115 = phi i32 [ %88, %110 ], [ %88, %87 ], [ %83, %112 ], [ 1, %75 ], [ 1, %59 ], [ 21, %22 ]
%116 = phi i32 [ 0, %110 ], [ %89, %87 ], [ 0, %112 ], [ %26, %75 ], [ %26, %59 ], [ %26, %22 ]
%117 = icmp eq i8 %27, 10
%118 = icmp ne i32 %115, 23
%119 = select i1 %117, i1 %118, i1 false
%120 = select i1 %119, i32 0, i32 %115
%121 = call i32 @feof(i32* %12)
%122 = icmp eq i32 %121, 0
br i1 %122, label %22, label %123
123: ; preds = %114, %17
%124 = call i32 @fclose(i32* %12)
%125 = load i32, i32* @stdout
%126 = call i32 (i32, i8*, ...) @fprintf(i32 %125, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%127 = load i32, i32* @stdout
%128 = call i32 (i32, i8*, ...) @fprintf(i32 %127, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0))
%129 = load i32, i32* @stdout
%130 = call i32 (i32, i8*, ...) @fprintf(i32 %129, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.8, i64 0, i64 0))
br label %131
131: ; preds = %123, %14, %6
%132 = phi i32 [ 1, %6 ], [ 1, %14 ], [ 0, %123 ]
ret i32 %132
}