#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 *b5 = fopen("big5-table.html", "w");
  if (!b5)
    return 1;
  fputs("<html lang=zh-tw>\n <head>\n  <meta http-equiv=\"Content-Type\" "
        "content=\"text/html;charset=big5\">\n  <title>Big5</title>\n"
        "  <style>.unused { background: #ccc; }"
        " table { float: left; }</style>\n"
        " </head>\n <body>\n"
        "  <table><caption>ASCII/CNS-Roman</caption>\n"
        "   <tr><th>  ",
        b5);
  for (i = 0; i < 16; i++) {
    fprintf(b5, "<th>%X", i);
  }
  for (i = 32; i < 128; i++) {
    if (0 == (i & 0x0F)) {
      fprintf(b5, "\n   <tr><th>%02X", i);
    }
    fprintf(b5, "<td%s>%c", (127 == i) ? " class=unused" : "", (char)i);
  }
  fputs("\n  </table>\n", b5);
  for (i = 0xA1; i <= 0xFE; i++) {
    if (0xA0 == i) {
      i = 0xE0;
    }
    fprintf(
        b5,
        "  <table><caption>Multibyte: Big5 (Lead %X)</caption>\n   <tr><th> ",
        i);
    for (j = 0; j < 16; j++) {
      fprintf(b5, "<th>%X", j);
    }
    for (j = 0x40; j < 0x100; j++) {
      if (0x80 == j) {
        j = 0xA0;
      }
      if (0 == (j & 0x0F)) {
        fprintf(b5, "\n   <tr><th>%02X", j);
      }
      if (0x7F == j || 0xA0 == j || j > 0xFE) {
        fputs("<td class=unused>&nbsp;", b5);
      } else {
        fprintf(b5, "<td>%c%c", (char)i, (char)j);
      }
    }
    fputs("\n  </table>\n", b5);
  }
  fputs("\n </body>\n</html>\n", b5);
  fclose(b5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    0xeb3(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    117d <main+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    13b9 <main+0x279>
mov    -0x18(%rbp),%rsi
lea    0xe8a(%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    0xf6b(%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    123c <main+0xfc>
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    0xf2b(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%esi
mov    $0x7f,%ecx
lea    0xf45(%rip),%rdx
lea    0xf24(%rip),%rax
cmp    %esi,%ecx
cmove  %rax,%rdx
mov    -0x8(%rbp),%eax
movsbl %al,%ecx
lea    0xf08(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11c8 <main+0x88>
mov    -0x18(%rbp),%rsi
lea    0xeff(%rip),%rdi
call   1040 <fputs@plt>
movl   $0xa1,-0x8(%rbp)
cmpl   $0xfe,-0x8(%rbp)
jg     1399 <main+0x259>
mov    $0xa0,%eax
cmp    -0x8(%rbp),%eax
jne    1275 <main+0x135>
movl   $0xe0,-0x8(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%edx
lea    0xed0(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jge    12be <main+0x17e>
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xe6e(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1291 <main+0x151>
movl   $0x40,-0xc(%rbp)
cmpl   $0x100,-0xc(%rbp)
jge    137b <main+0x23b>
mov    $0x80,%eax
cmp    -0xc(%rbp),%eax
jne    12e7 <main+0x1a7>
movl   $0xa0,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0xf,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    130c <main+0x1cc>
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xe19(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x7f,%eax
cmp    -0xc(%rbp),%eax
je     1335 <main+0x1f5>
mov    $0xa0,%eax
cmp    -0xc(%rbp),%eax
je     1335 <main+0x1f5>
cmpl   $0xfe,-0xc(%rbp)
jle    134a <main+0x20a>
mov    -0x18(%rbp),%rsi
lea    0xe56(%rip),%rdi
call   1040 <fputs@plt>
jmp    1368 <main+0x228>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%eax
movsbl %al,%edx
mov    -0xc(%rbp),%eax
movsbl %al,%ecx
lea    0xe4d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    136d <main+0x22d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12c5 <main+0x185>
mov    -0x18(%rbp),%rsi
lea    0xdc0(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1253 <main+0x113>
mov    -0x18(%rbp),%rsi
lea    0xe13(%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    0xeb7(%rip),%rsi
call   1050 <fopen@plt>
test   %rax,%rax
je     1567 <main+0x427>
mov    %rax,%rbx
lea    0xea1(%rip),%rdi
mov    $0x104,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1060 <fwrite@plt>
lea    0xf8d(%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    0xe6b(%rip),%r14
lea    0xe7e(%rip),%r12
lea    0xe91(%rip),%r13
lea    0xe67(%rip),%r15
jmp    12f4 <main+0x1b4>
nopw   0x0(%rax,%rax,1)
cmp    $0x7f,%ebp
mov    %r13,%rdx
cmove  %r12,%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %ebp,%ecx
xor    %eax,%eax
call   1040 <fprintf@plt>
add    $0x1,%ebp
cmp    $0x80,%ebp
je     130b <main+0x1cb>
test   $0xf,%bpl
jne    12d0 <main+0x190>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    12d0 <main+0x190>
lea    0xe34(%rip),%rdi
mov    $0xc,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    $0xa1,%r15d
mov    $0xa0,%r13d
lea    0xe5f(%rip),%r14
jmp    136d <main+0x22d>
nopl   0x0(%rax)
mov    $0xc,%esi
mov    $0x1,%edx
lea    0xdf5(%rip),%rdi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0x1(%r15),%eax
cmp    $0xfe,%r15d
mov    %eax,%r15d
jge    1542 <main+0x402>
cmp    $0xa0,%r15d
mov    $0xe0,%eax
cmove  %eax,%r15d
mov    %rbx,%rdi
lea    0xdcc(%rip),%rsi
mov    %r15d,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %rbx,%rdi
lea    0xd7c(%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    $0xf,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
movsbl %r15b,%r12d
mov    $0x40,%ebp
jmp    14e6 <main+0x3a6>
mov    $0x17,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0x1(%rbp),%eax
cmp    $0xff,%ebp
mov    %eax,%ebp
jge    1340 <main+0x200>
cmp    $0x80,%ebp
cmove  %r13d,%ebp
test   $0xf,%bpl
je     1500 <main+0x3c0>
cmp    $0xfe,%ebp
jg     14c0 <main+0x380>
jmp    151b <main+0x3db>
mov    %rbx,%rdi
lea    0xc14(%rip),%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
cmp    $0xfe,%ebp
jg     14c0 <main+0x380>
cmp    $0xa0,%ebp
je     14c0 <main+0x380>
cmp    $0x7f,%ebp
je     14c0 <main+0x380>
movsbl %bpl,%ecx
mov    %rbx,%rdi
lea    0xc78(%rip),%rsi
mov    %r12d,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    14d5 <main+0x395>
lea    0xc6e(%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    156c <main+0x42c>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"big5-table.html\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [261 x i8] c"<html lang=zh-tw>\0A <head>\0A <meta http-equiv=\22Content-Type\22 content=\22text/html;charset=big5\22>\0A <title>Big5</title>\0A <style>.unused { background: #ccc; } 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 = [9 x i8] c"<td%s>%c\00"
@.str.6 = [14 x i8] c" class=unused\00"
@.str.7 = [1 x i8] zeroinitializer
@.str.8 = [13 x i8] c"\0A </table>\0A\00"
@.str.9 = [67 x i8] c" <table><caption>Multibyte: Big5 (Lead %X)</caption>\0A <tr><th> \00"
@.str.10 = [24 x i8] c"<td class=unused>&nbsp;\00"
@.str.11 = [9 x i8] c"<td>%c%c\00"
@.str.12 = [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 ([16 x i8], [16 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 %124
10: ; preds = %0
%11 = load i32*, i32** %5
%12 = call i32 @fputs(i8* getelementptr inbounds ([261 x i8], [261 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 = %45, %23
%25 = load i32, i32* %2
%26 = icmp slt i32 %25, 128
br i1 %26, label %27, label %48
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** %5
%37 = load i32, i32* %2
%38 = icmp eq i32 127, %37
%39 = zext i1 %38 to i64
%40 = select i1 %38, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.7, i64 0, i64 0)
%41 = load i32, i32* %2
%42 = trunc i32 %41 to i8
%43 = sext i8 %42 to i32
%44 = call i32 (i32*, i8*, ...) @fprintf(i32* %36, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* %40, i32 %43)
br label %45
45: ; preds = %35
%46 = load i32, i32* %2
%47 = add nsw i32 %46, 1
store i32 %47, i32* %2
br label %24
48: ; preds = %24
%49 = load i32*, i32** %5
%50 = call i32 @fputs(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i32* %49)
store i32 161, i32* %2
br label %51
51: ; preds = %116, %48
%52 = load i32, i32* %2
%53 = icmp sle i32 %52, 254
br i1 %53, label %54, label %119
54: ; preds = %51
%55 = load i32, i32* %2
%56 = icmp eq i32 160, %55
br i1 %56, label %57, label %58
57: ; preds = %54
store i32 224, i32* %2
br label %58
58: ; preds = %57, %54
%59 = load i32*, i32** %5
%60 = load i32, i32* %2
%61 = call i32 (i32*, i8*, ...) @fprintf(i32* %59, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.9, i64 0, i64 0), i32 %60)
store i32 0, i32* %3
br label %62
62: ; preds = %69, %58
%63 = load i32, i32* %3
%64 = icmp slt i32 %63, 16
br i1 %64, label %65, label %72
65: ; preds = %62
%66 = load i32*, i32** %5
%67 = load i32, i32* %3
%68 = call i32 (i32*, i8*, ...) @fprintf(i32* %66, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %67)
br label %69
69: ; preds = %65
%70 = load i32, i32* %3
%71 = add nsw i32 %70, 1
store i32 %71, i32* %3
br label %62
72: ; preds = %62
store i32 64, i32* %3
br label %73
73: ; preds = %110, %72
%74 = load i32, i32* %3
%75 = icmp slt i32 %74, 256
br i1 %75, label %76, label %113
76: ; preds = %73
%77 = load i32, i32* %3
%78 = icmp eq i32 128, %77
br i1 %78, label %79, label %80
79: ; preds = %76
store i32 160, i32* %3
br label %80
80: ; preds = %79, %76
%81 = load i32, i32* %3
%82 = and i32 %81, 15
%83 = icmp eq i32 0, %82
br i1 %83, label %84, label %88
84: ; preds = %80
%85 = load i32*, i32** %5
%86 = load i32, i32* %3
%87 = call i32 (i32*, i8*, ...) @fprintf(i32* %85, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %86)
br label %88
88: ; preds = %84, %80
%89 = load i32, i32* %3
%90 = icmp eq i32 127, %89
br i1 %90, label %97, label %91
91: ; preds = %88
%92 = load i32, i32* %3
%93 = icmp eq i32 160, %92
br i1 %93, label %97, label %94
94: ; preds = %91
%95 = load i32, i32* %3
%96 = icmp sgt i32 %95, 254
br i1 %96, label %97, label %100
97: ; preds = %94, %91, %88
%98 = load i32*, i32** %5
%99 = call i32 @fputs(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0), i32* %98)
br label %109
100: ; preds = %94
%101 = load i32*, i32** %5
%102 = load i32, i32* %2
%103 = trunc i32 %102 to i8
%104 = sext i8 %103 to i32
%105 = load i32, i32* %3
%106 = trunc i32 %105 to i8
%107 = sext i8 %106 to i32
%108 = call i32 (i32*, i8*, ...) @fprintf(i32* %101, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i32 %104, i32 %107)
br label %109
109: ; preds = %100, %97
br label %110
110: ; preds = %109
%111 = load i32, i32* %3
%112 = add nsw i32 %111, 1
store i32 %112, i32* %3
br label %73
113: ; preds = %73
%114 = load i32*, i32** %5
%115 = call i32 @fputs(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i32* %114)
br label %116
116: ; preds = %113
%117 = load i32, i32* %2
%118 = add nsw i32 %117, 1
store i32 %118, i32* %2
br label %51
119: ; preds = %51
%120 = load i32*, i32** %5
%121 = call i32 @fputs(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), i32* %120)
%122 = load i32*, i32** %5
%123 = call i32 @fclose(i32* %122)
store i32 0, i32* %1
br label %124
124: ; preds = %119, %9
%125 = load i32, i32* %1
ret i32 %125
}

LLVM IR (-O2):
@.str = [16 x i8] c"big5-table.html\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [261 x i8] c"<html lang=zh-tw>\0A <head>\0A <meta http-equiv=\22Content-Type\22 content=\22text/html;charset=big5\22>\0A <title>Big5</title>\0A <style>.unused { background: #ccc; } 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 = [9 x i8] c"<td%s>%c\00"
@.str.6 = [14 x i8] c" class=unused\00"
@.str.7 = [1 x i8] zeroinitializer
@.str.8 = [13 x i8] c"\0A </table>\0A\00"
@.str.9 = [67 x i8] c" <table><caption>Multibyte: Big5 (Lead %X)</caption>\0A <tr><th> \00"
@.str.10 = [24 x i8] c"<td class=unused>&nbsp;\00"
@.str.11 = [9 x i8] c"<td>%c%c\00"
@.str.12 = [19 x i8] c"\0A </body>\0A</html>\0A\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([16 x i8], [16 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 %86, label %3
3: ; preds = %0
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([261 x i8], [261 x i8]* @.str.2, i64 0, i64 0), i64 260, 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, %27
%22 = phi i32 [ %31, %27 ], [ 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, 127
%29 = select i1 %28, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.7, i64 0, i64 0)
%30 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* %29, i32 %22)
%31 = add nuw nsw i32 %22, 1
%32 = icmp eq i32 %31, 128
br i1 %32, label %33, label %21
33: ; preds = %27
%34 = tail call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i64 12, i64 1, i32* %1)
br label %35
35: ; preds = %33, %79
%36 = phi i32 [ 161, %33 ], [ %81, %79 ]
%37 = icmp eq i32 %36, 160
%38 = select i1 %37, i32 224, i32 %36
%39 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.9, i64 0, i64 0), i32 %38)
%40 = 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)
%41 = 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)
%42 = 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)
%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 3)
%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 4)
%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 5)
%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 6)
%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 7)
%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 8)
%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 9)
%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 10)
%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 11)
%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 12)
%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 13)
%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 14)
%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 15)
%56 = shl i32 %38, 24
%57 = ashr exact i32 %56, 24
br label %58
58: ; preds = %35, %76
%59 = phi i32 [ 64, %35 ], [ %77, %76 ]
%60 = icmp eq i32 %59, 128
%61 = select i1 %60, i32 160, i32 %59
%62 = and i32 %61, 15
%63 = icmp eq i32 %62, 0
br i1 %63, label %64, label %66
64: ; preds = %58
%65 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %61)
br label %66
66: ; preds = %64, %58
%67 = freeze i32 %61
%68 = icmp sgt i32 %67, 254
br i1 %68, label %70, label %69
69: ; preds = %66
switch i32 %67, label %72 [
i32 160, label %70
i32 127, label %70
]
70: ; preds = %69, %69, %66
%71 = tail call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0), i64 23, i64 1, i32* %1)
br label %76
72: ; preds = %69
%73 = shl i32 %67, 24
%74 = ashr exact i32 %73, 24
%75 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i32 %57, i32 %74)
br label %76
76: ; preds = %70, %72
%77 = add nsw i32 %67, 1
%78 = icmp slt i32 %67, 255
br i1 %78, label %58, label %79
79: ; preds = %76
%80 = tail call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i64 12, i64 1, i32* %1)
%81 = add nsw i32 %38, 1
%82 = icmp slt i32 %38, 254
br i1 %82, label %35, label %83
83: ; preds = %79
%84 = tail call i64 @fwrite(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), i64 18, i64 1, i32* %1)
%85 = tail call i32 @fclose(i32* %1)
br label %86
86: ; preds = %0, %83
%87 = phi i32 [ 0, %83 ], [ 1, %0 ]
ret i32 %87
}