#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*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int main(void) {
  int i, j, pl;
  FILE *gbk = fopen("hz-gb2312.html", "w");
  if (!gbk)
    return 1;
  fputs("<html lang=zh-cn>\n <head>\n  <meta http-equiv=\"Content-Type\" "
        "content=\"text/html;charset=hz-gb-2312\">\n  <title>HZ</title>\n"
        "  <style>.unused { background: #ccc; }"
        " .special { background: #eee; } table { float: left; }</style>\n"
        " </head>\n <body>\n"
        "  <table><caption>ASCII/CNS-Roman</caption>\n"
        "   <tr><th>  ",
        gbk);
  for (i = 0; i < 16; i++) {
    fprintf(gbk, "<th>%X", i);
  }
  for (i = 32; i < 128; i++) {
    if (0 == (i & 0x0F)) {
      fprintf(gbk, "\n   <tr><th>%02X", i);
    }
    if ((char)'~' == i) {
      fputs("<td class=special>~~", gbk);
    } else {
      fprintf(gbk, "<td%s>%c", (127 == i) ? " class=unused" : "", (char)i);
    }
  }
  fputs("\n  </table>\n", gbk);
  for (i = 0x21; i < 0x7E; i++) {
    fprintf(gbk,
            "  <table><caption>Multibyte: HZ (Lead %X)</caption>\n   <tr><th> ",
            i);
    for (j = 0; j < 16; j++) {
      fprintf(gbk, "<th>%X", j);
    }
    for (j = 0x20; j < 0x80; j++) {
      if (0 == (j & 0x0F)) {
        fprintf(gbk, "\n   <tr><th>%02X", j);
      }
      if (0x20 == j || j > 0x7E) {
        fputs("<td class=unused>&nbsp;", gbk);
      } else {
        fprintf(gbk, "<td>~{%c%c~}", (char)i, (char)j);
      }
    }
    fputs("\n  </table>\n", gbk);
  }
  fputs("\n </body>\n</html>\n", gbk);
  fclose(gbk);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    0xeb2(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    117d <main+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    13a3 <main+0x263>
mov    -0x18(%rbp),%rsi
lea    0xe89(%rip),%rdi
call   1040 <fputs@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x10,-0x8(%rbp)
jge    11c1 <main+0x81>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%edx
lea    0xf8d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1194 <main+0x54>
movl   $0x20,-0x8(%rbp)
cmpl   $0x80,-0x8(%rbp)
jge    1264 <main+0x124>
mov    -0x8(%rbp),%ecx
and    $0xf,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    11fa <main+0xba>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%edx
lea    0xf4d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x7e,%eax
cmp    -0x8(%rbp),%eax
jne    121d <main+0xdd>
mov    -0x18(%rbp),%rsi
lea    0xf3e(%rip),%rdi
call   1040 <fputs@plt>
jmp    1251 <main+0x111>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%esi
mov    $0x7f,%ecx
lea    0xf59(%rip),%rdx
lea    0xf38(%rip),%rax
cmp    %esi,%ecx
cmove  %rax,%rdx
mov    -0x8(%rbp),%eax
movsbl %al,%ecx
lea    0xf1c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1256 <main+0x116>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11c8 <main+0x88>
mov    -0x18(%rbp),%rsi
lea    0xf0e(%rip),%rdi
call   1040 <fputs@plt>
movl   $0x21,-0x8(%rbp)
cmpl   $0x7e,-0x8(%rbp)
jge    1383 <main+0x243>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%edx
lea    0xef7(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jge    12ce <main+0x18e>
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xe80(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12a1 <main+0x161>
movl   $0x20,-0xc(%rbp)
cmpl   $0x80,-0xc(%rbp)
jge    1365 <main+0x225>
mov    -0xc(%rbp),%ecx
and    $0xf,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    1307 <main+0x1c7>
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xe40(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x20,%eax
cmp    -0xc(%rbp),%eax
je     131f <main+0x1df>
cmpl   $0x7e,-0xc(%rbp)
jle    1334 <main+0x1f4>
mov    -0x18(%rbp),%rsi
lea    0xea1(%rip),%rdi
call   1040 <fputs@plt>
jmp    1352 <main+0x212>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%eax
movsbl %al,%edx
mov    -0xc(%rbp),%eax
movsbl %al,%ecx
lea    0xe98(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1357 <main+0x217>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12d5 <main+0x195>
mov    -0x18(%rbp),%rsi
lea    0xe0d(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    127b <main+0x13b>
mov    -0x18(%rbp),%rsi
lea    0xe62(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xeae(%rip),%rdi
lea    0xeb6(%rip),%rsi
call   1050 <fopen@plt>
test   %rax,%rax
je     1576 <main+0x436>
mov    %rax,%rbx
lea    0xea0(%rip),%rdi
mov    $0x127,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1060 <fwrite@plt>
lea    0xfaf(%rip),%rbp
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x5,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x6,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x7,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x8,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x9,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0xa,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0xb,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0xc,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0xd,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0xe,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0xf,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    $0x20,%ebp
lea    0xe9e(%rip),%r15
lea    0xeb5(%rip),%r13
lea    0xec8(%rip),%r14
lea    0xe9e(%rip),%r12
jmp    12f4 <main+0x1b4>
nopw   0x0(%rax,%rax,1)
cmp    $0x7f,%ebp
mov    %r14,%rdx
cmove  %r13,%rdx
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %ebp,%ecx
xor    %eax,%eax
call   1040 <fprintf@plt>
add    $0x1,%ebp
cmp    $0x80,%ebp
je     133f <main+0x1ff>
test   $0xf,%bpl
je     1310 <main+0x1d0>
cmp    $0x7e,%ebp
jne    12d0 <main+0x190>
jmp    1328 <main+0x1e8>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
lea    0xe26(%rip),%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
cmp    $0x7e,%ebp
jne    12d0 <main+0x190>
mov    $0x14,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
jmp    12e9 <main+0x1a9>
lea    0xe37(%rip),%rdi
mov    $0xc,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    $0x21,%r14d
lea    0xddb(%rip),%rbp
lea    0xe77(%rip),%r15
jmp    1397 <main+0x257>
xchg   %ax,%ax
mov    $0xc,%esi
mov    $0x1,%edx
lea    0xdfc(%rip),%rdi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
add    $0x1,%r14d
cmp    $0x7e,%r14d
je     1551 <main+0x411>
mov    %rbx,%rdi
lea    0xde9(%rip),%rsi
mov    %r14d,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%r12
lea    0xd81(%rip),%rbp
mov    %rbp,%rsi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x5,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x6,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x7,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x8,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x9,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0xa,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0xb,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0xc,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0xd,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0xe,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r12,%rbp
mov    $0xf,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
movsbl %r14b,%r13d
mov    $0x20,%r12d
jmp    151a <main+0x3da>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x17,%esi
mov    $0x1,%edx
lea    0xcca(%rip),%rdi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
add    $0x1,%r12d
cmp    $0x80,%r12d
je     1370 <main+0x230>
test   $0xf,%r12b
jne    1530 <main+0x3f0>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r12d,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
cmp    $0x20,%r12d
je     14f0 <main+0x3b0>
cmp    $0x7f,%r12d
jae    14f0 <main+0x3b0>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r13d,%edx
mov    %r12d,%ecx
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    1509 <main+0x3c9>
lea    0xc98(%rip),%rdi
mov    $0x12,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
jmp    157b <main+0x43b>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"hz-gb2312.html\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [296 x i8] c"<html lang=zh-cn>\0A <head>\0A <meta http-equiv=\22Content-Type\22 content=\22text/html;charset=hz-gb-2312\22>\0A <title>HZ</title>\0A <style>.unused { background: #ccc; } .special { background: #eee; } table { float: left; }</style>\0A </head>\0A <body>\0A <table><caption>ASCII/CNS-Roman</caption>\0A <tr><th> \00"
@.str.3 = [7 x i8] c"<th>%X\00"
@.str.4 = [17 x i8] c"\0A <tr><th>%02X\00"
@.str.5 = [21 x i8] c"<td class=special>~~\00"
@.str.6 = [9 x i8] c"<td%s>%c\00"
@.str.7 = [14 x i8] c" class=unused\00"
@.str.8 = [1 x i8] zeroinitializer
@.str.9 = [13 x i8] c"\0A </table>\0A\00"
@.str.10 = [65 x i8] c" <table><caption>Multibyte: HZ (Lead %X)</caption>\0A <tr><th> \00"
@.str.11 = [24 x i8] c"<td class=unused>&nbsp;\00"
@.str.12 = [13 x i8] c"<td>~{%c%c~}\00"
@.str.13 = [19 x i8] c"\0A </body>\0A</html>\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 0, i32* %1
%6 = call i32* @fopen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %6, i32** %5
%7 = load i32*, i32** %5
%8 = icmp ne i32* %7, null
br i1 %8, label %10, label %9
9: ; preds = %0
store i32 1, i32* %1
br label %120
10: ; preds = %0
%11 = load i32*, i32** %5
%12 = call i32 @fputs(i8* getelementptr inbounds ([296 x i8], [296 x i8]* @.str.2, i64 0, i64 0), i32* %11)
store i32 0, i32* %2
br label %13
13: ; preds = %20, %10
%14 = load i32, i32* %2
%15 = icmp slt i32 %14, 16
br i1 %15, label %16, label %23
16: ; preds = %13
%17 = load i32*, i32** %5
%18 = load i32, i32* %2
%19 = call i32 (i32*, i8*, ...) @fprintf(i32* %17, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %18)
br label %20
20: ; preds = %16
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 1
store i32 %22, i32* %2
br label %13
23: ; preds = %13
store i32 32, i32* %2
br label %24
24: ; preds = %52, %23
%25 = load i32, i32* %2
%26 = icmp slt i32 %25, 128
br i1 %26, label %27, label %55
27: ; preds = %24
%28 = load i32, i32* %2
%29 = and i32 %28, 15
%30 = icmp eq i32 0, %29
br i1 %30, label %31, label %35
31: ; preds = %27
%32 = load i32*, i32** %5
%33 = load i32, i32* %2
%34 = call i32 (i32*, i8*, ...) @fprintf(i32* %32, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %33)
br label %35
35: ; preds = %31, %27
%36 = load i32, i32* %2
%37 = icmp eq i32 126, %36
br i1 %37, label %38, label %41
38: ; preds = %35
%39 = load i32*, i32** %5
%40 = call i32 @fputs(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i32* %39)
br label %51
41: ; preds = %35
%42 = load i32*, i32** %5
%43 = load i32, i32* %2
%44 = icmp eq i32 127, %43
%45 = zext i1 %44 to i64
%46 = select i1 %44, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.8, i64 0, i64 0)
%47 = load i32, i32* %2
%48 = trunc i32 %47 to i8
%49 = sext i8 %48 to i32
%50 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i8* %46, i32 %49)
br label %51
51: ; preds = %41, %38
br label %52
52: ; preds = %51
%53 = load i32, i32* %2
%54 = add nsw i32 %53, 1
store i32 %54, i32* %2
br label %24
55: ; preds = %24
%56 = load i32*, i32** %5
%57 = call i32 @fputs(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i32* %56)
store i32 33, i32* %2
br label %58
58: ; preds = %112, %55
%59 = load i32, i32* %2
%60 = icmp slt i32 %59, 126
br i1 %60, label %61, label %115
61: ; preds = %58
%62 = load i32*, i32** %5
%63 = load i32, i32* %2
%64 = call i32 (i32*, i8*, ...) @fprintf(i32* %62, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.10, i64 0, i64 0), i32 %63)
store i32 0, i32* %3
br label %65
65: ; preds = %72, %61
%66 = load i32, i32* %3
%67 = icmp slt i32 %66, 16
br i1 %67, label %68, label %75
68: ; preds = %65
%69 = load i32*, i32** %5
%70 = load i32, i32* %3
%71 = call i32 (i32*, i8*, ...) @fprintf(i32* %69, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %70)
br label %72
72: ; preds = %68
%73 = load i32, i32* %3
%74 = add nsw i32 %73, 1
store i32 %74, i32* %3
br label %65
75: ; preds = %65
store i32 32, i32* %3
br label %76
76: ; preds = %106, %75
%77 = load i32, i32* %3
%78 = icmp slt i32 %77, 128
br i1 %78, label %79, label %109
79: ; preds = %76
%80 = load i32, i32* %3
%81 = and i32 %80, 15
%82 = icmp eq i32 0, %81
br i1 %82, label %83, label %87
83: ; preds = %79
%84 = load i32*, i32** %5
%85 = load i32, i32* %3
%86 = call i32 (i32*, i8*, ...) @fprintf(i32* %84, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %85)
br label %87
87: ; preds = %83, %79
%88 = load i32, i32* %3
%89 = icmp eq i32 32, %88
br i1 %89, label %93, label %90
90: ; preds = %87
%91 = load i32, i32* %3
%92 = icmp sgt i32 %91, 126
br i1 %92, label %93, label %96
93: ; preds = %90, %87
%94 = load i32*, i32** %5
%95 = call i32 @fputs(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0), i32* %94)
br label %105
96: ; preds = %90
%97 = load i32*, i32** %5
%98 = load i32, i32* %2
%99 = trunc i32 %98 to i8
%100 = sext i8 %99 to i32
%101 = load i32, i32* %3
%102 = trunc i32 %101 to i8
%103 = sext i8 %102 to i32
%104 = call i32 (i32*, i8*, ...) @fprintf(i32* %97, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.12, i64 0, i64 0), i32 %100, i32 %103)
br label %105
105: ; preds = %96, %93
br label %106
106: ; preds = %105
%107 = load i32, i32* %3
%108 = add nsw i32 %107, 1
store i32 %108, i32* %3
br label %76
109: ; preds = %76
%110 = load i32*, i32** %5
%111 = call i32 @fputs(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i32* %110)
br label %112
112: ; preds = %109
%113 = load i32, i32* %2
%114 = add nsw i32 %113, 1
store i32 %114, i32* %2
br label %58
115: ; preds = %58
%116 = load i32*, i32** %5
%117 = call i32 @fputs(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i64 0, i64 0), i32* %116)
%118 = load i32*, i32** %5
%119 = call i32 @fclose(i32* %118)
store i32 0, i32* %1
br label %120
120: ; preds = %115, %9
%121 = load i32, i32* %1
ret i32 %121
}

LLVM IR (-O2):
@.str = [15 x i8] c"hz-gb2312.html\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [296 x i8] c"<html lang=zh-cn>\0A <head>\0A <meta http-equiv=\22Content-Type\22 content=\22text/html;charset=hz-gb-2312\22>\0A <title>HZ</title>\0A <style>.unused { background: #ccc; } .special { background: #eee; } table { float: left; }</style>\0A </head>\0A <body>\0A <table><caption>ASCII/CNS-Roman</caption>\0A <tr><th> \00"
@.str.3 = [7 x i8] c"<th>%X\00"
@.str.4 = [17 x i8] c"\0A <tr><th>%02X\00"
@.str.5 = [21 x i8] c"<td class=special>~~\00"
@.str.6 = [9 x i8] c"<td%s>%c\00"
@.str.7 = [14 x i8] c" class=unused\00"
@.str.8 = [1 x i8] zeroinitializer
@.str.9 = [13 x i8] c"\0A </table>\0A\00"
@.str.10 = [65 x i8] c" <table><caption>Multibyte: HZ (Lead %X)</caption>\0A <tr><th> \00"
@.str.11 = [24 x i8] c"<td class=unused>&nbsp;\00"
@.str.12 = [13 x i8] c"<td>~{%c%c~}\00"
@.str.13 = [19 x i8] c"\0A </body>\0A</html>\0A\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32* %1, null
br i1 %2, label %85, label %3
3: ; preds = %0
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([296 x i8], [296 x i8]* @.str.2, i64 0, i64 0), i64 295, i64 1, i32* %1)
%5 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 0)
%6 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 1)
%7 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 2)
%8 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 3)
%9 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 4)
%10 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 5)
%11 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 6)
%12 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 7)
%13 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 8)
%14 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 9)
%15 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 10)
%16 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 11)
%17 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 12)
%18 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 13)
%19 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 14)
%20 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 15)
br label %21
21: ; preds = %3, %35
%22 = phi i32 [ %36, %35 ], [ 32, %3 ]
%23 = and i32 %22, 15
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %21
%26 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %22)
br label %27
27: ; preds = %25, %21
%28 = icmp eq i32 %22, 126
br i1 %28, label %29, label %31
29: ; preds = %27
%30 = tail call i64 @fwrite(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i64 20, i64 1, i32* %1)
br label %35
31: ; preds = %27
%32 = icmp eq i32 %22, 127
%33 = select i1 %32, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.8, i64 0, i64 0)
%34 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i8* %33, i32 %22)
br label %35
35: ; preds = %29, %31
%36 = add nuw nsw i32 %22, 1
%37 = icmp eq i32 %36, 128
br i1 %37, label %38, label %21
38: ; preds = %35
%39 = tail call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i64 12, i64 1, i32* %1)
br label %40
40: ; preds = %38, %78
%41 = phi i32 [ 33, %38 ], [ %80, %78 ]
%42 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.10, i64 0, i64 0), i32 %41)
%43 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 0)
%44 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 1)
%45 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 2)
%46 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 3)
%47 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 4)
%48 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 5)
%49 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 6)
%50 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 7)
%51 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 8)
%52 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 9)
%53 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 10)
%54 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 11)
%55 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 12)
%56 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 13)
%57 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 14)
%58 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 15)
%59 = shl i32 %41, 24
%60 = ashr exact i32 %59, 24
br label %61
61: ; preds = %40, %75
%62 = phi i32 [ 32, %40 ], [ %76, %75 ]
%63 = and i32 %62, 15
%64 = icmp eq i32 %63, 0
br i1 %64, label %65, label %67
65: ; preds = %61
%66 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %62)
br label %67
67: ; preds = %65, %61
%68 = icmp eq i32 %62, 32
%69 = icmp ugt i32 %62, 126
%70 = or i1 %68, %69
br i1 %70, label %71, label %73
71: ; preds = %67
%72 = tail call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0), i64 23, i64 1, i32* %1)
br label %75
73: ; preds = %67
%74 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.12, i64 0, i64 0), i32 %60, i32 %62)
br label %75
75: ; preds = %71, %73
%76 = add nuw nsw i32 %62, 1
%77 = icmp eq i32 %76, 128
br i1 %77, label %78, label %61
78: ; preds = %75
%79 = tail call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i64 12, i64 1, i32* %1)
%80 = add nuw nsw i32 %41, 1
%81 = icmp eq i32 %80, 126
br i1 %81, label %82, label %40
82: ; preds = %78
%83 = tail call i64 @fwrite(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i64 0, i64 0), i64 18, i64 1, i32* %1)
%84 = tail call i32 @fclose(i32* %1)
br label %85
85: ; preds = %0, %82
%86 = phi i32 [ 0, %82 ], [ 1, %0 ]
ret i32 %86
}