#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ sscanf(char *, char *, ...);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  char inbuf[256];
  int i, j;
  unsigned page;
  unsigned unichar;
  int pagecount[256] = {256 * 0};
  int onepage = 0;
  int pageno = 0;
  int html = 0;
  int links = 0;
  void mkftable();
  size_t strlen();
  if (argc > 1 && argv[1][0] == '-') {
    switch (argv[1][1]) {
    case 'p':
      sscanf(&argv[1][2], "%x", &pageno);
      if (pageno >= 0 && pageno <= 255)
        onepage = 1;
      break;
    case 'h':
      html = 1;
      break;
    case 'l':
      links = 1;
      html = 1;
      break;
    }
  }
  if (!onepage) {
    pagecount[0xfd] = 32;
    pagecount[0xff] = 2;
  }
  while (fgets(inbuf, 256 - 1, stdin) != NULL) {
    sscanf(inbuf, "%X", &unichar);
    page = unichar >> 8;
    if (onepage) {
      if (page == pageno) {
        pagecount[unichar & 0xff]++;
      }
    } else {
      if (unichar < 0xfdd0 || (unichar > 0xfdef && unichar < 0xfffe))
        pagecount[page]++;
    }
  }
  if (html) {
    mkftable(pagecount, links);
  } else {
    fprintf(
        stdout,
        "   0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F\n");
    for (i = 0; i < 0x10; i++) {
      fprintf(stdout, "%X ", i);
      for (j = 0; j < 0x10; j++) {
        if (onepage) {
          if (pagecount[i * 16 + j])
            fprintf(stdout, " *  ");
          else
            fprintf(stdout, " .  ");
        } else {
          fprintf(stdout, "%3X ", pagecount[i * 16 + j]);
        }
      }
      fprintf(stdout, "\n");
    }
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x540,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x520(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1040 <memset@plt>
movl   $0x0,-0x524(%rbp)
movl   $0x0,-0x528(%rbp)
movl   $0x0,-0x52c(%rbp)
movl   $0x0,-0x530(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    128f <main+0x12f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    128f <main+0x12f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x1(%rax),%eax
mov    %eax,-0x534(%rbp)
sub    $0x68,%eax
je     1267 <main+0x107>
jmp    11f2 <main+0x92>
mov    -0x534(%rbp),%eax
sub    $0x6c,%eax
je     1276 <main+0x116>
jmp    1206 <main+0xa6>
mov    -0x534(%rbp),%eax
sub    $0x70,%eax
jne    128a <main+0x12a>
jmp    121a <main+0xba>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
add    $0x2,%rdi
lea    0xdd3(%rip),%rsi
lea    -0x528(%rbp),%rdx
mov    $0x0,%al
call   1070 <sscanf@plt>
cmpl   $0x0,-0x528(%rbp)
jl     1262 <main+0x102>
cmpl   $0xff,-0x528(%rbp)
jg     1262 <main+0x102>
movl   $0x1,-0x524(%rbp)
jmp    128a <main+0x12a>
movl   $0x1,-0x52c(%rbp)
jmp    128a <main+0x12a>
movl   $0x1,-0x530(%rbp)
movl   $0x1,-0x52c(%rbp)
jmp    128f <main+0x12f>
cmpl   $0x0,-0x524(%rbp)
jne    12b0 <main+0x150>
movl   $0x20,-0x12c(%rbp)
movl   $0x2,-0x124(%rbp)
jmp    12b5 <main+0x155>
lea    -0x110(%rbp),%rdi
mov    0x2d25(%rip),%rax
mov    (%rax),%edx
mov    $0xff,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
je     1397 <main+0x237>
lea    -0x110(%rbp),%rdi
lea    0xd1c(%rip),%rsi
lea    -0x120(%rbp),%rdx
mov    $0x0,%al
call   1070 <sscanf@plt>
mov    -0x120(%rbp),%eax
shr    $0x8,%eax
mov    %eax,-0x11c(%rbp)
cmpl   $0x0,-0x524(%rbp)
je     1346 <main+0x1e6>
mov    -0x11c(%rbp),%eax
cmp    -0x528(%rbp),%eax
jne    1341 <main+0x1e1>
mov    -0x120(%rbp),%eax
and    $0xff,%eax
mov    %eax,%eax
mov    -0x520(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x520(%rbp,%rax,4)
jmp    1392 <main+0x232>
cmpl   $0xfdd0,-0x120(%rbp)
jb     1376 <main+0x216>
cmpl   $0xfdef,-0x120(%rbp)
jbe    138d <main+0x22d>
cmpl   $0xfffe,-0x120(%rbp)
jae    138d <main+0x22d>
mov    -0x11c(%rbp),%eax
mov    -0x520(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x520(%rbp,%rax,4)
jmp    1392 <main+0x232>
jmp    12b5 <main+0x155>
cmpl   $0x0,-0x52c(%rbp)
je     13bd <main+0x25d>
lea    -0x520(%rbp),%rdi
mov    -0x530(%rbp),%esi
mov    $0x0,%al
call   1030 <mkftable@plt>
jmp    14fb <main+0x39b>
mov    0x2c14(%rip),%rax
mov    (%rax),%edi
lea    0xc39(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x114(%rbp)
cmpl   $0x10,-0x114(%rbp)
jge    14f6 <main+0x396>
mov    0x2be6(%rip),%rax
mov    (%rax),%edi
mov    -0x114(%rbp),%edx
lea    0xc47(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x118(%rbp)
cmpl   $0x10,-0x118(%rbp)
jge    14cb <main+0x36b>
cmpl   $0x0,-0x524(%rbp)
je     1483 <main+0x323>
mov    -0x114(%rbp),%eax
shl    $0x4,%eax
add    -0x118(%rbp),%eax
cltq
cmpl   $0x0,-0x520(%rbp,%rax,4)
je     1467 <main+0x307>
mov    0x2b86(%rip),%rax
mov    (%rax),%edi
lea    0xbf1(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    147e <main+0x31e>
mov    0x2b6a(%rip),%rax
mov    (%rax),%edi
lea    0xbda(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    14b2 <main+0x352>
mov    0x2b4e(%rip),%rax
mov    (%rax),%edi
mov    -0x114(%rbp),%eax
shl    $0x4,%eax
add    -0x118(%rbp),%eax
cltq
mov    -0x520(%rbp,%rax,4),%edx
lea    0xbab(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    14b7 <main+0x357>
mov    -0x118(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x118(%rbp)
jmp    1412 <main+0x2b2>
mov    0x2b06(%rip),%rax
mov    (%rax),%edi
lea    0xb6b(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x114(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x114(%rbp)
jmp    13de <main+0x27e>
jmp    14fb <main+0x39b>
xor    %edi,%edi
call   1080 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x518,%rsp
mov    %rsi,%r15
mov    %edi,%ebp
lea    0x110(%rsp),%rbx
xor    %r14d,%r14d
mov    $0x400,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
movl   $0x0,(%rsp)
mov    $0x1,%cl
cmp    $0x2,%ebp
jl     11f2 <main+0x92>
mov    0x8(%r15),%rdi
cmpb   $0x2d,(%rdi)
jne    11f2 <main+0x92>
movsbl 0x1(%rdi),%eax
cmp    $0x70,%eax
je     11bf <main+0x5f>
cmp    $0x6c,%eax
je     11ea <main+0x8a>
cmp    $0x68,%eax
jne    11f2 <main+0x92>
xor    %r14d,%r14d
jmp    11f0 <main+0x90>
add    $0x2,%rdi
lea    0xe36(%rip),%rsi
xor    %r14d,%r14d
mov    %rsp,%rdx
xor    %eax,%eax
call   1070 <sscanf@plt>
mov    $0x1,%cl
cmpl   $0x100,(%rsp)
mov    $0x0,%r15d
jae    11f2 <main+0x92>
jmp    120b <main+0xab>
mov    $0x1,%r14d
xor    %ecx,%ecx
movl   $0x20,0x504(%rsp)
movl   $0x2,0x50c(%rsp)
mov    $0x1,%r15b
mov    %ecx,0x8(%rsp)
mov    %r14d,0x4(%rsp)
mov    0x2dcd(%rip),%r14
mov    (%r14),%edx
lea    0x10(%rsp),%rdi
mov    $0xff,%esi
call   1050 <fgets@plt>
test   %rax,%rax
jne    12f5 <main+0x195>
cmpb   $0x0,0x8(%rsp)
je     137a <main+0x21a>
mov    0x2d90(%rip),%r12
mov    (%r12),%edi
lea    0xdb3(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xdf5(%rip),%rbp
xor    %r14d,%r14d
jmp    1294 <main+0x134>
cs nopw 0x0(%rax,%rax,1)
mov    (%r12),%edi
lea    0xdcb(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
add    $0x1,%r14
add    $0x40,%rbx
cmp    $0x10,%r14
je     138d <main+0x22d>
mov    (%r12),%edi
lea    0xda9(%rip),%rsi
mov    %r14d,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
xor    %r13d,%r13d
jmp    12cc <main+0x16c>
xchg   %ax,%ax
mov    (%r12),%edi
mov    (%rbx,%r13,4),%edx
mov    %rbp,%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
add    $0x1,%r13
cmp    $0x10,%r13
je     1270 <main+0x110>
test   %r15b,%r15b
jne    12b0 <main+0x150>
cmpl   $0x0,(%rbx,%r13,4)
mov    (%r12),%edi
je     12e5 <main+0x185>
lea    0xd69(%rip),%rsi
jmp    12ec <main+0x18c>
lea    0xd65(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    12c2 <main+0x162>
lea    0xd07(%rip),%r13
lea    0x10(%rsp),%rbp
lea    0xc(%rsp),%r12
jmp    1333 <main+0x1d3>
nopl   0x0(%rax,%rax,1)
mov    %eax,%eax
addl   $0x1,0x110(%rsp,%rax,4)
01
mov    (%r14),%edx
mov    %rbp,%rdi
mov    $0xff,%esi
call   1050 <fgets@plt>
test   %rax,%rax
je     1236 <main+0xd6>
mov    %rbp,%rdi
mov    %r13,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1070 <sscanf@plt>
mov    0xc(%rsp),%ecx
mov    %ecx,%eax
shr    $0x8,%eax
test   %r15b,%r15b
je     1370 <main+0x210>
cmp    $0xfdd0,%ecx
jb     1310 <main+0x1b0>
add    $0xffff0210,%ecx
cmp    $0x20d,%ecx
ja     131a <main+0x1ba>
jmp    1310 <main+0x1b0>
nopl   0x0(%rax)
cmp    (%rsp),%eax
jne    131a <main+0x1ba>
movzbl %cl,%eax
jmp    1310 <main+0x1b0>
lea    0x110(%rsp),%rdi
mov    0x4(%rsp),%esi
xor    %eax,%eax
call   1030 <mkftable@plt>
xor    %edi,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%x\00"
@stdin = global i32 0
@.str.1 = [3 x i8] c"%X\00"
@stdout = global i32 0
@.str.2 = [66 x i8] c" 0 1 2 3 4 5 6 7 8 9 A B C D E F\0A\00"
@.str.3 = [4 x i8] c"%X \00"
@.str.4 = [5 x i8] c" * \00"
@.str.5 = [5 x i8] c" . \00"
@.str.6 = [5 x i8] c"%3X \00"
@.str.7 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [256 x i8]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca [256 x i32]
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = bitcast [256 x i32]* %11 to i8*
store i32 0, i32* %12
store i32 0, i32* %13
store i32 0, i32* %14
store i32 0, i32* %15
%17 = load i32, i32* %4
%18 = icmp sgt i32 %17, 1
br i1 %18, label %19, label %50
19: ; preds = %2
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 1
%22 = load i8*, i8** %21
%23 = getelementptr inbounds i8, i8* %22, i64 0
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 45
br i1 %26, label %27, label %50
27: ; preds = %19
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 1
%30 = load i8*, i8** %29
%31 = getelementptr inbounds i8, i8* %30, i64 1
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
switch i32 %33, label %49 [
i32 112, label %34
i32 104, label %47
i32 108, label %48
]
34: ; preds = %27
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 1
%37 = load i8*, i8** %36
%38 = getelementptr inbounds i8, i8* %37, i64 2
%39 = call i32 (i8*, i8*, ...) @sscanf(i8* %38, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %13)
%40 = load i32, i32* %13
%41 = icmp sge i32 %40, 0
br i1 %41, label %42, label %46
42: ; preds = %34
%43 = load i32, i32* %13
%44 = icmp sle i32 %43, 255
br i1 %44, label %45, label %46
45: ; preds = %42
store i32 1, i32* %12
br label %46
46: ; preds = %45, %42, %34
br label %49
47: ; preds = %27
store i32 1, i32* %14
br label %49
48: ; preds = %27
store i32 1, i32* %15
store i32 1, i32* %14
br label %49
49: ; preds = %27, %48, %47, %46
br label %50
50: ; preds = %49, %19, %2
%51 = load i32, i32* %12
%52 = icmp ne i32 %51, 0
br i1 %52, label %56, label %53
53: ; preds = %50
%54 = getelementptr inbounds [256 x i32], [256 x i32]* %11, i64 0, i64 253
store i32 32, i32* %54
%55 = getelementptr inbounds [256 x i32], [256 x i32]* %11, i64 0, i64 255
store i32 2, i32* %55
br label %56
56: ; preds = %53, %50
br label %57
57: ; preds = %97, %56
%58 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%59 = load i32, i32* @stdin
%60 = call i32* @fgets(i8* %58, i32 255, i32 %59)
%61 = icmp ne i32* %60, null
br i1 %61, label %62, label %98
62: ; preds = %57
%63 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%64 = call i32 (i8*, i8*, ...) @sscanf(i8* %63, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %10)
%65 = load i32, i32* %10
%66 = lshr i32 %65, 8
store i32 %66, i32* %9
%67 = load i32, i32* %12
%68 = icmp ne i32 %67, 0
br i1 %68, label %69, label %81
69: ; preds = %62
%70 = load i32, i32* %9
%71 = load i32, i32* %13
%72 = icmp eq i32 %70, %71
br i1 %72, label %73, label %80
73: ; preds = %69
%74 = load i32, i32* %10
%75 = and i32 %74, 255
%76 = zext i32 %75 to i64
%77 = getelementptr inbounds [256 x i32], [256 x i32]* %11, i64 0, i64 %76
%78 = load i32, i32* %77
%79 = add nsw i32 %78, 1
store i32 %79, i32* %77
br label %80
80: ; preds = %73, %69
br label %97
81: ; preds = %62
%82 = load i32, i32* %10
%83 = icmp ult i32 %82, 64976
br i1 %83, label %90, label %84
84: ; preds = %81
%85 = load i32, i32* %10
%86 = icmp ugt i32 %85, 65007
br i1 %86, label %87, label %96
87: ; preds = %84
%88 = load i32, i32* %10
%89 = icmp ult i32 %88, 65534
br i1 %89, label %90, label %96
90: ; preds = %87, %81
%91 = load i32, i32* %9
%92 = zext i32 %91 to i64
%93 = getelementptr inbounds [256 x i32], [256 x i32]* %11, i64 0, i64 %92
%94 = load i32, i32* %93
%95 = add nsw i32 %94, 1
store i32 %95, i32* %93
br label %96
96: ; preds = %90, %87, %84
br label %97
97: ; preds = %96, %80
br label %57
98: ; preds = %57
%99 = load i32, i32* %14
%100 = icmp ne i32 %99, 0
br i1 %100, label %101, label %104
101: ; preds = %98
%102 = getelementptr inbounds [256 x i32], [256 x i32]* %11, i64 0, i64 0
%103 = load i32, i32* %15
br label %157
104: ; preds = %98
%105 = load i32, i32* @stdout
%106 = call i32 (i32, i8*, ...) @fprintf(i32 %105, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %7
br label %107
107: ; preds = %153, %104
%108 = load i32, i32* %7
%109 = icmp slt i32 %108, 16
br i1 %109, label %110, label %156
110: ; preds = %107
%111 = load i32, i32* @stdout
%112 = load i32, i32* %7
%113 = call i32 (i32, i8*, ...) @fprintf(i32 %111, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %112)
store i32 0, i32* %8
br label %114
114: ; preds = %147, %110
%115 = load i32, i32* %8
%116 = icmp slt i32 %115, 16
br i1 %116, label %117, label %150
117: ; preds = %114
%118 = load i32, i32* %12
%119 = icmp ne i32 %118, 0
br i1 %119, label %120, label %136
120: ; preds = %117
%121 = load i32, i32* %7
%122 = mul nsw i32 %121, 16
%123 = load i32, i32* %8
%124 = add nsw i32 %122, %123
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds [256 x i32], [256 x i32]* %11, i64 0, i64 %125
%127 = load i32, i32* %126
%128 = icmp ne i32 %127, 0
br i1 %128, label %129, label %132
129: ; preds = %120
%130 = load i32, i32* @stdout
%131 = call i32 (i32, i8*, ...) @fprintf(i32 %130, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br label %135
132: ; preds = %120
%133 = load i32, i32* @stdout
%134 = call i32 (i32, i8*, ...) @fprintf(i32 %133, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %135
135: ; preds = %132, %129
br label %146
136: ; preds = %117
%137 = load i32, i32* @stdout
%138 = load i32, i32* %7
%139 = mul nsw i32 %138, 16
%140 = load i32, i32* %8
%141 = add nsw i32 %139, %140
%142 = sext i32 %141 to i64
%143 = getelementptr inbounds [256 x i32], [256 x i32]* %11, i64 0, i64 %142
%144 = load i32, i32* %143
%145 = call i32 (i32, i8*, ...) @fprintf(i32 %137, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %144)
br label %146
146: ; preds = %136, %135
br label %147
147: ; preds = %146
%148 = load i32, i32* %8
%149 = add nsw i32 %148, 1
store i32 %149, i32* %8
br label %114
150: ; preds = %114
%151 = load i32, i32* @stdout
%152 = call i32 (i32, i8*, ...) @fprintf(i32 %151, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %153
153: ; preds = %150
%154 = load i32, i32* %7
%155 = add nsw i32 %154, 1
store i32 %155, i32* %7
br label %107
156: ; preds = %107
br label %157
157: ; preds = %156, %101
%158 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [3 x i8] c"%x\00"
@stdin = global i32 0
@.str.1 = [3 x i8] c"%X\00"
@stdout = global i32 0
@.str.2 = [66 x i8] c" 0 1 2 3 4 5 6 7 8 9 A B C D E F\0A\00"
@.str.3 = [4 x i8] c"%X \00"
@.str.4 = [5 x i8] c" * \00"
@.str.5 = [5 x i8] c" . \00"
@.str.6 = [5 x i8] c"%3X \00"
@.str.7 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [256 x i8]
%4 = alloca i32
%5 = alloca [256 x i32]
%6 = alloca i32
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%8 = bitcast i32* %4 to i8*
%9 = bitcast [256 x i32]* %5 to i8*
%10 = bitcast i32* %6 to i8*
store i32 0, i32* %6
%11 = icmp sgt i32 %0, 1
br i1 %11, label %12, label %28
12: ; preds = %2
%13 = getelementptr inbounds i8*, i8** %1, i64 1
%14 = load i8*, i8** %13
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 45
br i1 %16, label %17, label %28
17: ; preds = %12
%18 = getelementptr inbounds i8, i8* %14, i64 1
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
switch i32 %20, label %28 [
i32 112, label %23
i32 104, label %21
i32 108, label %22
]
21: ; preds = %17
br label %28
22: ; preds = %17
br label %28
23: ; preds = %17
%24 = getelementptr inbounds i8, i8* %14, i64 2
%25 = call i32 (i8*, i8*, ...) @sscanf(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
%26 = load i32, i32* %6
%27 = icmp ugt i32 %26, 255
br i1 %27, label %28, label %33
28: ; preds = %2, %12, %17, %22, %21, %23
%29 = phi i32 [ 0, %23 ], [ 0, %2 ], [ 0, %12 ], [ 0, %17 ], [ 1, %22 ], [ 0, %21 ]
%30 = phi i1 [ true, %23 ], [ true, %2 ], [ true, %12 ], [ true, %17 ], [ false, %22 ], [ false, %21 ]
%31 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 253
store i32 32, i32* %31
%32 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 255
store i32 2, i32* %32
br label %33
33: ; preds = %28, %23
%34 = phi i32 [ %29, %28 ], [ 0, %23 ]
%35 = phi i1 [ %30, %28 ], [ true, %23 ]
%36 = phi i1 [ true, %28 ], [ false, %23 ]
%37 = load i32, i32* @stdin
%38 = call i32* @fgets(i8* %7, i32 255, i32 %37)
%39 = icmp eq i32* %38, null
br i1 %39, label %64, label %40
40: ; preds = %33, %60
%41 = call i32 (i8*, i8*, ...) @sscanf(i8* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%42 = load i32, i32* %4
%43 = lshr i32 %42, 8
br i1 %36, label %49, label %44
44: ; preds = %40
%45 = load i32, i32* %6
%46 = icmp eq i32 %43, %45
br i1 %46, label %47, label %60
47: ; preds = %44
%48 = and i32 %42, 255
br label %54
49: ; preds = %40
%50 = icmp ult i32 %42, 64976
%51 = add i32 %42, -65008
%52 = icmp ult i32 %51, 526
%53 = or i1 %50, %52
br i1 %53, label %54, label %60
54: ; preds = %49, %47
%55 = phi i32 [ %48, %47 ], [ %43, %49 ]
%56 = zext i32 %55 to i64
%57 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 %56
%58 = load i32, i32* %57
%59 = add nsw i32 %58, 1
store i32 %59, i32* %57
br label %60
60: ; preds = %54, %49, %44
%61 = load i32, i32* @stdin
%62 = call i32* @fgets(i8* %7, i32 255, i32 %61)
%63 = icmp eq i32* %62, null
br i1 %63, label %64, label %40
64: ; preds = %60, %33
br i1 %35, label %67, label %65
65: ; preds = %64
%66 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 0
br label %102
67: ; preds = %64
%68 = load i32, i32* @stdout
%69 = call i32 (i32, i8*, ...) @fprintf(i32 %68, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0))
br label %70
70: ; preds = %67, %97
%71 = phi i64 [ 0, %67 ], [ %100, %97 ]
%72 = load i32, i32* @stdout
%73 = trunc i64 %71 to i32
%74 = call i32 (i32, i8*, ...) @fprintf(i32 %72, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %73)
%75 = shl nsw i64 %71, 4
br label %76
76: ; preds = %70, %94
%77 = phi i64 [ 0, %70 ], [ %95, %94 ]
br i1 %36, label %88, label %78
78: ; preds = %76
%79 = add nuw nsw i64 %77, %75
%80 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 %79
%81 = load i32, i32* %80
%82 = icmp eq i32 %81, 0
%83 = load i32, i32* @stdout
br i1 %82, label %86, label %84
84: ; preds = %78
%85 = call i32 (i32, i8*, ...) @fprintf(i32 %83, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br label %94
86: ; preds = %78
%87 = call i32 (i32, i8*, ...) @fprintf(i32 %83, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %94
88: ; preds = %76
%89 = load i32, i32* @stdout
%90 = add nuw nsw i64 %77, %75
%91 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 %90
%92 = load i32, i32* %91
%93 = call i32 (i32, i8*, ...) @fprintf(i32 %89, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %92)
br label %94
94: ; preds = %88, %86, %84
%95 = add nuw nsw i64 %77, 1
%96 = icmp eq i64 %95, 16
br i1 %96, label %97, label %76
97: ; preds = %94
%98 = load i32, i32* @stdout
%99 = call i32 (i32, i8*, ...) @fprintf(i32 %98, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%100 = add nuw nsw i64 %71, 1
%101 = icmp eq i64 %100, 16
br i1 %101, label %102, label %70
102: ; preds = %97, %65
%103 = call i32 @exit(i32 0)
unreachable
}