#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*/ touni;
typedef int /*<<< orphan*/ str;
typedef int /*<<< orphan*/ fromuni;
typedef int /*<<< orphan*/ fromstat;

/* Variables and functions */
scalar_t__ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ memset(unsigned short *, int /*<<< orphan*/, int);
int /*<<< orphan*/ print_short_array(unsigned short *, int);
int /*<<< orphan*/ printf(char *, ...);
int sscanf(char *, char *, unsigned int *, unsigned int *);
int /*<<< orphan*/ stdin;
int main(void) {
  char str[160];
  unsigned short touni[256];
  unsigned short fromuni[65536];
  unsigned short fromstat[256];
  int i;
  memset(touni, 0, sizeof(touni));
  memset(fromuni, 0, sizeof(fromuni));
  memset(fromstat, 0, sizeof(fromstat));
  while (fgets(str, sizeof(str), stdin)) {
    unsigned int c, u;
    if ((str[0] == '#') || (2 != sscanf(str, "%x%x", &c, &u)))
      continue;
    if (c > 0xFF || u > 0xFFFF)
      continue;
    touni[c] = u;
    fromuni[u] = c;
  }
  printf("unsigned short cs_to_uni[256]=");
  print_short_array(touni, 4);
  for (i = 0; i <= 0xFF; i++) {
    fromstat[touni[i] >> 8]++;
  }
  for (i = 0; i <= 256; i++) {
    if (fromstat[i]) {
      printf("unsigned char pl%02X[256]=", i);
      print_short_array(fromuni + i * 256, 2);
    }
  }
  printf("unsigned short *uni_to_cs[256]={\n");
  for (i = 0; i <= 255; i++) {
    if (fromstat[i])
      printf("pl%02X", i);
    else
      printf("NULL");
    printf("%s%s", i < 255 ? "," : "", ((i + 1) % 8) ? "" : "\n");
  }
  printf("};\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x204c0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x2b0(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1040 <memset@plt>
lea    -0x202b0(%rbp),%rdi
xor    %esi,%esi
mov    $0x20000,%edx
call   1040 <memset@plt>
lea    -0x204b0(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1040 <memset@plt>
lea    -0xb0(%rbp),%rdi
mov    0x2e3f(%rip),%rax
mov    (%rax),%edx
mov    $0xa0,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
je     125c <main+0x10c>
movsbl -0xb0(%rbp),%eax
cmp    $0x23,%eax
je     11ff <main+0xaf>
lea    -0xb0(%rbp),%rdi
lea    0xe23(%rip),%rsi
lea    -0x204b8(%rbp),%rdx
lea    -0x204bc(%rbp),%rcx
call   1060 <sscanf@plt>
mov    %eax,%ecx
mov    $0x2,%eax
cmp    %ecx,%eax
je     1204 <main+0xb4>
jmp    119b <main+0x4b>
cmpl   $0xff,-0x204b8(%rbp)
ja     1224 <main+0xd4>
cmpl   $0xffff,-0x204bc(%rbp)
jbe    1229 <main+0xd9>
jmp    119b <main+0x4b>
mov    -0x204bc(%rbp),%eax
mov    %ax,%cx
mov    -0x204b8(%rbp),%eax
mov    %cx,-0x2b0(%rbp,%rax,2)
ff
mov    -0x204b8(%rbp),%eax
mov    %ax,%cx
mov    -0x204bc(%rbp),%eax
mov    %cx,-0x202b0(%rbp,%rax,2)
ff
jmp    119b <main+0x4b>
lea    0xda2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x2b0(%rbp),%rdi
mov    $0x4,%esi
call   1070 <print_short_array@plt>
movl   $0x0,-0x204b4(%rbp)
cmpl   $0xff,-0x204b4(%rbp)
jg     12d1 <main+0x181>
movslq -0x204b4(%rbp),%rax
movzwl -0x2b0(%rbp,%rax,2),%eax
ff
sar    $0x8,%eax
cltq
mov    -0x204b0(%rbp,%rax,2),%cx
ff
add    $0x1,%cx
mov    %cx,-0x204b0(%rbp,%rax,2)
ff
mov    -0x204b4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x204b4(%rbp)
jmp    1285 <main+0x135>
movl   $0x0,-0x204b4(%rbp)
cmpl   $0x100,-0x204b4(%rbp)
jg     1351 <main+0x201>
movslq -0x204b4(%rbp),%rax
cmpw   $0x0,-0x204b0(%rbp,%rax,2)
je     1338 <main+0x1e8>
mov    -0x204b4(%rbp),%esi
lea    0xd16(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x202b0(%rbp),%rdi
mov    -0x204b4(%rbp),%eax
shl    $0x8,%eax
cltq
shl    $0x1,%rax
add    %rax,%rdi
mov    $0x2,%esi
call   1070 <print_short_array@plt>
jmp    133d <main+0x1ed>
mov    -0x204b4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x204b4(%rbp)
jmp    12db <main+0x18b>
lea    0xce7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x204b4(%rbp)
cmpl   $0xff,-0x204b4(%rbp)
jg     141e <main+0x2ce>
movslq -0x204b4(%rbp),%rax
cmpw   $0x0,-0x204b0(%rbp,%rax,2)
je     13a8 <main+0x258>
mov    -0x204b4(%rbp),%esi
lea    0xcc5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13b6 <main+0x266>
lea    0xcb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x204b4(%rbp),%ecx
lea    0xcb4(%rip),%rsi
lea    0xca8(%rip),%rax
cmp    $0xff,%ecx
cmovl  %rax,%rsi
mov    -0x204b4(%rbp),%eax
add    $0x1,%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
lea    0xc88(%rip),%rdx
lea    0xc82(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xc6a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x204b4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x204b4(%rbp)
jmp    1369 <main+0x219>
lea    0xc4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x204c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x204b8,%rsp
lea    0x2b0(%rsp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1050 <memset@plt>
lea    0x4b0(%rsp),%rbp
mov    %rbp,%rdi
xor    %esi,%esi
mov    $0x20000,%edx
call   1050 <memset@plt>
lea    0xb0(%rsp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1050 <memset@plt>
mov    0x2e31(%rip),%rbx
mov    (%rbx),%edx
lea    0x10(%rsp),%rdi
mov    $0xa0,%esi
call   1060 <fgets@plt>
test   %rax,%rax
je     124b <main+0xeb>
lea    0x10(%rsp),%r14
lea    0xe27(%rip),%r15
lea    0xc(%rsp),%r12
lea    0x8(%rsp),%r13
jmp    1204 <main+0xa4>
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%rbx),%edx
mov    %r14,%rdi
mov    $0xa0,%esi
call   1060 <fgets@plt>
test   %rax,%rax
je     124b <main+0xeb>
cmpb   $0x23,0x10(%rsp)
je     11f0 <main+0x90>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
call   1070 <sscanf@plt>
cmp    $0x2,%eax
jne    11f0 <main+0x90>
mov    0xc(%rsp),%eax
cmp    $0xff,%rax
ja     11f0 <main+0x90>
mov    0x8(%rsp),%ecx
cmp    $0xffff,%ecx
ja     11f0 <main+0x90>
mov    %cx,0x2b0(%rsp,%rax,2)
mov    %ax,0x4b0(%rsp,%rcx,2)
jmp    11f0 <main+0x90>
lea    0xdb3(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x2b0(%rsp),%rdi
mov    $0x4,%esi
call   1080 <print_short_array@plt>
nopl   (%rax)
mov    0x2b0(%rsp,%rbx,2),%eax
movzbl %ah,%eax
addw   $0x1,0xb0(%rsp,%rax,2)
movzwl 0x2b2(%rsp,%rbx,2),%eax
movzbl %ah,%eax
addw   $0x1,0xb0(%rsp,%rax,2)
add    $0x2,%rbx
cmp    $0x100,%rbx
jne    1270 <main+0x110>
lea    0xd79(%rip),%r14
xor    %ebx,%ebx
jmp    12c4 <main+0x164>
nop
add    $0x1,%rbx
add    $0x200,%rbp
cmp    $0x101,%rbx
je     12ea <main+0x18a>
cmpw   $0x0,0xb0(%rsp,%rbx,2)
je     12b0 <main+0x150>
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x2,%esi
call   1080 <print_short_array@plt>
jmp    12b0 <main+0x150>
lea    0xd63(%rip),%rdi
call   1030 <puts@plt>
lea    0xd53(%rip),%r13
lea    0xd4f(%rip),%rbp
lea    0xd47(%rip),%r14
lea    0xd39(%rip),%r12
lea    0xd26(%rip),%r15
xor    %ebx,%ebx
jmp    135d <main+0x1fd>
nopl   (%rax)
lea    0xd1f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0xff,%rbx
mov    %rbp,%rsi
cmovb  %r13,%rsi
add    $0x1,%rbx
test   $0x7,%bl
mov    %rbp,%rdx
cmove  %r14,%rdx
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x100,%rbx
je     1376 <main+0x216>
cmpw   $0x0,0xb0(%rsp,%rbx,2)
je     1320 <main+0x1c0>
mov    %r15,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    132e <main+0x1ce>
lea    0xcf8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x204b8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [5 x i8] c"%x%x\00"
@.str.1 = [31 x i8] c"unsigned short cs_to_uni[256]=\00"
@.str.2 = [27 x i8] c"unsigned char pl%02X[256]=\00"
@.str.3 = [34 x i8] c"unsigned short *uni_to_cs[256]={\0A\00"
@.str.4 = [7 x i8] c"pl%02X\00"
@.str.5 = [5 x i8] c"NULL\00"
@.str.6 = [5 x i8] c"%s%s\00"
@.str.7 = [2 x i8] c",\00"
@.str.8 = [1 x i8] zeroinitializer
@.str.9 = [2 x i8] c"\0A\00"
@.str.10 = [4 x i8] c"};\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [160 x i8]
%3 = alloca [256 x i16]
%4 = alloca [65536 x i16]
%5 = alloca [256 x i16]
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
%9 = getelementptr inbounds [256 x i16], [256 x i16]* %3, i64 0, i64 0
%10 = call i32 @memset(i16* %9, i32 0, i32 512)
%11 = getelementptr inbounds [65536 x i16], [65536 x i16]* %4, i64 0, i64 0
%12 = call i32 @memset(i16* %11, i32 0, i32 131072)
%13 = getelementptr inbounds [256 x i16], [256 x i16]* %5, i64 0, i64 0
%14 = call i32 @memset(i16* %13, i32 0, i32 512)
br label %15
15: ; preds = %37, %36, %29, %0
%16 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 0
%17 = load i32, i32* @stdin
%18 = call i64 @fgets(i8* %16, i32 160, i32 %17)
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %48
20: ; preds = %15
%21 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 0
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 35
br i1 %24, label %29, label %25
25: ; preds = %20
%26 = getelementptr inbounds [160 x i8], [160 x i8]* %2, i64 0, i64 0
%27 = call i32 @sscanf(i8* %26, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %7, i32* %8)
%28 = icmp ne i32 2, %27
br i1 %28, label %29, label %30
29: ; preds = %25, %20
br label %15
30: ; preds = %25
%31 = load i32, i32* %7
%32 = icmp ugt i32 %31, 255
br i1 %32, label %36, label %33
33: ; preds = %30
%34 = load i32, i32* %8
%35 = icmp ugt i32 %34, 65535
br i1 %35, label %36, label %37
36: ; preds = %33, %30
br label %15
37: ; preds = %33
%38 = load i32, i32* %8
%39 = trunc i32 %38 to i16
%40 = load i32, i32* %7
%41 = zext i32 %40 to i64
%42 = getelementptr inbounds [256 x i16], [256 x i16]* %3, i64 0, i64 %41
store i16 %39, i16* %42
%43 = load i32, i32* %7
%44 = trunc i32 %43 to i16
%45 = load i32, i32* %8
%46 = zext i32 %45 to i64
%47 = getelementptr inbounds [65536 x i16], [65536 x i16]* %4, i64 0, i64 %46
store i16 %44, i16* %47
br label %15
48: ; preds = %15
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%50 = getelementptr inbounds [256 x i16], [256 x i16]* %3, i64 0, i64 0
%51 = call i32 @print_short_array(i16* %50, i32 4)
store i32 0, i32* %6
br label %52
52: ; preds = %66, %48
%53 = load i32, i32* %6
%54 = icmp sle i32 %53, 255
br i1 %54, label %55, label %69
55: ; preds = %52
%56 = load i32, i32* %6
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds [256 x i16], [256 x i16]* %3, i64 0, i64 %57
%59 = load i16, i16* %58
%60 = zext i16 %59 to i32
%61 = ashr i32 %60, 8
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [256 x i16], [256 x i16]* %5, i64 0, i64 %62
%64 = load i16, i16* %63
%65 = add i16 %64, 1
store i16 %65, i16* %63
br label %66
66: ; preds = %55
%67 = load i32, i32* %6
%68 = add nsw i32 %67, 1
store i32 %68, i32* %6
br label %52
69: ; preds = %52
store i32 0, i32* %6
br label %70
70: ; preds = %89, %69
%71 = load i32, i32* %6
%72 = icmp sle i32 %71, 256
br i1 %72, label %73, label %92
73: ; preds = %70
%74 = load i32, i32* %6
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [256 x i16], [256 x i16]* %5, i64 0, i64 %75
%77 = load i16, i16* %76
%78 = icmp ne i16 %77, 0
br i1 %78, label %79, label %88
79: ; preds = %73
%80 = load i32, i32* %6
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %80)
%82 = getelementptr inbounds [65536 x i16], [65536 x i16]* %4, i64 0, i64 0
%83 = load i32, i32* %6
%84 = mul nsw i32 %83, 256
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds i16, i16* %82, i64 %85
%87 = call i32 @print_short_array(i16* %86, i32 2)
br label %88
88: ; preds = %79, %73
br label %89
89: ; preds = %88
%90 = load i32, i32* %6
%91 = add nsw i32 %90, 1
store i32 %91, i32* %6
br label %70
92: ; preds = %70
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %6
br label %94
94: ; preds = %120, %92
%95 = load i32, i32* %6
%96 = icmp sle i32 %95, 255
br i1 %96, label %97, label %123
97: ; preds = %94
%98 = load i32, i32* %6
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds [256 x i16], [256 x i16]* %5, i64 0, i64 %99
%101 = load i16, i16* %100
%102 = icmp ne i16 %101, 0
br i1 %102, label %103, label %106
103: ; preds = %97
%104 = load i32, i32* %6
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %104)
br label %108
106: ; preds = %97
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %108
108: ; preds = %106, %103
%109 = load i32, i32* %6
%110 = icmp slt i32 %109, 255
%111 = zext i1 %110 to i64
%112 = select i1 %110, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.8, i64 0, i64 0)
%113 = load i32, i32* %6
%114 = add nsw i32 %113, 1
%115 = srem i32 %114, 8
%116 = icmp ne i32 %115, 0
%117 = zext i1 %116 to i64
%118 = select i1 %116, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0)
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* %112, i8* %118)
br label %120
120: ; preds = %108
%121 = load i32, i32* %6
%122 = add nsw i32 %121, 1
store i32 %122, i32* %6
br label %94
123: ; preds = %94
%124 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [5 x i8] c"%x%x\00"
@.str.1 = [31 x i8] c"unsigned short cs_to_uni[256]=\00"
@.str.2 = [27 x i8] c"unsigned char pl%02X[256]=\00"
@.str.4 = [7 x i8] c"pl%02X\00"
@.str.5 = [5 x i8] c"NULL\00"
@.str.6 = [5 x i8] c"%s%s\00"
@.str.7 = [2 x i8] c",\00"
@.str.8 = [1 x i8] zeroinitializer
@.str.9 = [2 x i8] c"\0A\00"
@str = [33 x i8] c"unsigned short *uni_to_cs[256]={\00"
@str.11 = [3 x i8] c"};\00"
define i32 @main() {
%1 = alloca [160 x i8]
%2 = alloca [256 x i16]
%3 = alloca [65536 x i16]
%4 = alloca [256 x i16]
%5 = alloca i32
%6 = alloca i32
%7 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 0
%8 = bitcast [256 x i16]* %2 to i8*
%9 = bitcast [65536 x i16]* %3 to i8*
%10 = bitcast [256 x i16]* %4 to i8*
%11 = getelementptr inbounds [256 x i16], [256 x i16]* %2, i64 0, i64 0
%12 = call i32 @memset(i16* %11, i32 0, i32 512)
%13 = getelementptr inbounds [65536 x i16], [65536 x i16]* %3, i64 0, i64 0
%14 = call i32 @memset(i16* %13, i32 0, i32 131072)
%15 = getelementptr inbounds [256 x i16], [256 x i16]* %4, i64 0, i64 0
%16 = call i32 @memset(i16* %15, i32 0, i32 512)
%17 = load i32, i32* @stdin
%18 = call i64 @fgets(i8* %7, i32 160, i32 %17)
%19 = icmp eq i64 %18, 0
br i1 %19, label %46, label %20
20: ; preds = %0
%21 = bitcast i32* %5 to i8*
%22 = bitcast i32* %6 to i8*
br label %23
23: ; preds = %20, %42
%24 = load i8, i8* %7
%25 = icmp eq i8 %24, 35
br i1 %25, label %42, label %26
26: ; preds = %23
%27 = call i32 @sscanf(i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %5, i32* %6)
%28 = icmp eq i32 %27, 2
br i1 %28, label %29, label %42
29: ; preds = %26
%30 = load i32, i32* %5
%31 = icmp ugt i32 %30, 255
%32 = load i32, i32* %6
%33 = icmp ugt i32 %32, 65535
%34 = select i1 %31, i1 true, i1 %33
br i1 %34, label %42, label %35
35: ; preds = %29
%36 = trunc i32 %32 to i16
%37 = zext i32 %30 to i64
%38 = getelementptr inbounds [256 x i16], [256 x i16]* %2, i64 0, i64 %37
store i16 %36, i16* %38
%39 = trunc i32 %30 to i16
%40 = zext i32 %32 to i64
%41 = getelementptr inbounds [65536 x i16], [65536 x i16]* %3, i64 0, i64 %40
store i16 %39, i16* %41
br label %42
42: ; preds = %29, %23, %26, %35
%43 = load i32, i32* @stdin
%44 = call i64 @fgets(i8* %7, i32 160, i32 %43)
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %23
46: ; preds = %42, %0
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%48 = call i32 @print_short_array(i16* %11, i32 4)
br label %49
49: ; preds = %49, %46
%50 = phi i64 [ 0, %46 ], [ %66, %49 ]
%51 = getelementptr inbounds [256 x i16], [256 x i16]* %2, i64 0, i64 %50
%52 = load i16, i16* %51
%53 = lshr i16 %52, 8
%54 = zext i16 %53 to i64
%55 = getelementptr inbounds [256 x i16], [256 x i16]* %4, i64 0, i64 %54
%56 = load i16, i16* %55
%57 = add i16 %56, 1
store i16 %57, i16* %55
%58 = or i64 %50, 1
%59 = getelementptr inbounds [256 x i16], [256 x i16]* %2, i64 0, i64 %58
%60 = load i16, i16* %59
%61 = lshr i16 %60, 8
%62 = zext i16 %61 to i64
%63 = getelementptr inbounds [256 x i16], [256 x i16]* %4, i64 0, i64 %62
%64 = load i16, i16* %63
%65 = add i16 %64, 1
store i16 %65, i16* %63
%66 = add nuw nsw i64 %50, 2
%67 = icmp eq i64 %66, 256
br i1 %67, label %68, label %49
68: ; preds = %49, %79
%69 = phi i64 [ %80, %79 ], [ 0, %49 ]
%70 = getelementptr inbounds [256 x i16], [256 x i16]* %4, i64 0, i64 %69
%71 = load i16, i16* %70
%72 = icmp eq i16 %71, 0
br i1 %72, label %79, label %73
73: ; preds = %68
%74 = trunc i64 %69 to i32
%75 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %74)
%76 = shl nuw nsw i64 %69, 8
%77 = getelementptr inbounds [65536 x i16], [65536 x i16]* %3, i64 0, i64 %76
%78 = call i32 @print_short_array(i16* %77, i32 2)
br label %79
79: ; preds = %68, %73
%80 = add nuw nsw i64 %69, 1
%81 = icmp eq i64 %80, 257
br i1 %81, label %82, label %68
82: ; preds = %79
%83 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
br label %84
84: ; preds = %82, %94
%85 = phi i64 [ 0, %82 ], [ %97, %94 ]
%86 = getelementptr inbounds [256 x i16], [256 x i16]* %4, i64 0, i64 %85
%87 = load i16, i16* %86
%88 = icmp eq i16 %87, 0
br i1 %88, label %92, label %89
89: ; preds = %84
%90 = trunc i64 %85 to i32
%91 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %90)
br label %94
92: ; preds = %84
%93 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %94
94: ; preds = %92, %89
%95 = icmp ult i64 %85, 255
%96 = select i1 %95, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.8, i64 0, i64 0)
%97 = add nuw nsw i64 %85, 1
%98 = and i64 %97, 7
%99 = icmp eq i64 %98, 0
%100 = select i1 %99, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.8, i64 0, i64 0)
%101 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* %96, i8* %100)
%102 = icmp eq i64 %97, 256
br i1 %102, label %103, label %84
103: ; preds = %94
%104 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.11, i64 0, i64 0))
ret i32 0
}