#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 me_decode16(unsigned short);
unsigned short me_encode(char);
scalar_t__ me_valid(unsigned short);
int print_bin(unsigned short);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  char text[1024] = "Hello World!";
  char output[1024] = "";
  char *p = text;
  unsigned short data[1024];
  int N = 0, i = 0;
  printf("%04x %04x %04x %04x\n", print_bin(me_encode(0)),
         print_bin(me_encode(1)), print_bin(me_encode(2)),
         print_bin(me_encode(0xFF)));
  printf("%d %d %d %d\n", (int)me_valid(me_encode(0)),
         (int)me_valid(me_encode(1)), (int)me_valid(me_encode(2)),
         (int)me_valid(me_encode(0xFF)));
  printf("%d %d %d %d\n", (int)me_decode16(me_encode(0)),
         (int)me_decode16(me_encode(1)), (int)me_decode16(me_encode(2)),
         (int)me_decode16(me_encode(0xFF)));
  while (*p) {
    data[N] = me_encode(*p);
    printf("%c,%04X,%d,%02x,%02x,", *p, (int)data[i], (int)me_valid(data[i]),
           (int)*p, (int)me_decode16(data[i]));
    print_bin(data[i]);
    N++;
    p++;
  }
  printf("\n");
  for (i = 0; i < N; i++) {
    printf("%c", me_decode16(data[i]));
  }
  text[i] = '\0';
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1060,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x410(%rbp),%rdi
lea    0xe70(%rip),%rsi
mov    $0x400,%edx
call   1060 <memcpy@plt>
lea    -0x810(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1040 <memset@plt>
lea    -0x410(%rbp),%rax
mov    %rax,-0x818(%rbp)
movl   $0x0,-0x1024(%rbp)
movl   $0x0,-0x1028(%rbp)
xor    %edi,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1080 <print_bin@plt>
mov    %eax,-0x104c(%rbp)
mov    $0x1,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1080 <print_bin@plt>
mov    %eax,-0x1048(%rbp)
mov    $0x2,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1080 <print_bin@plt>
mov    %eax,-0x1044(%rbp)
mov    $0xffffffff,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1080 <print_bin@plt>
mov    -0x104c(%rbp),%esi
mov    -0x1048(%rbp),%edx
mov    -0x1044(%rbp),%ecx
mov    %eax,%r8d
lea    0x11be(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1070 <me_valid@plt>
mov    %eax,-0x1040(%rbp)
mov    $0x1,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1070 <me_valid@plt>
mov    %eax,-0x103c(%rbp)
mov    $0x2,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1070 <me_valid@plt>
mov    %eax,-0x1038(%rbp)
mov    $0xffffffff,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1070 <me_valid@plt>
mov    -0x1040(%rbp),%esi
mov    -0x103c(%rbp),%edx
mov    -0x1038(%rbp),%ecx
mov    %eax,%r8d
lea    0x1159(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1090 <me_decode16@plt>
mov    %eax,-0x1034(%rbp)
mov    $0x1,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1090 <me_decode16@plt>
mov    %eax,-0x1030(%rbp)
mov    $0x2,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1090 <me_decode16@plt>
mov    %eax,-0x102c(%rbp)
mov    $0xffffffff,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1090 <me_decode16@plt>
mov    -0x1034(%rbp),%esi
mov    -0x1030(%rbp),%edx
mov    -0x102c(%rbp),%ecx
mov    %eax,%r8d
lea    0x10df(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x818(%rbp),%rax
cmpb   $0x0,(%rax)
je     1435 <main+0x2c5>
mov    -0x818(%rbp),%rax
movsbl (%rax),%edi
call   1050 <me_encode@plt>
mov    %ax,%cx
movslq -0x1024(%rbp),%rax
mov    %cx,-0x1020(%rbp,%rax,2)
ff
mov    -0x818(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x105c(%rbp)
movslq -0x1028(%rbp),%rax
movzwl -0x1020(%rbp,%rax,2),%eax
ff
mov    %eax,-0x1058(%rbp)
movslq -0x1028(%rbp),%rax
movzwl -0x1020(%rbp,%rax,2),%edi
ff
call   1070 <me_valid@plt>
mov    %eax,-0x1054(%rbp)
mov    -0x818(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x1050(%rbp)
movslq -0x1028(%rbp),%rax
movzwl -0x1020(%rbp,%rax,2),%edi
ff
call   1090 <me_decode16@plt>
mov    -0x105c(%rbp),%esi
mov    -0x1058(%rbp),%edx
mov    -0x1054(%rbp),%ecx
mov    -0x1050(%rbp),%r8d
mov    %eax,%r9d
lea    0x102e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x1028(%rbp),%rax
movzwl -0x1020(%rbp,%rax,2),%edi
ff
call   1080 <print_bin@plt>
mov    -0x1024(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1024(%rbp)
mov    -0x818(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x818(%rbp)
jmp    133d <main+0x1cd>
lea    0xfe4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x1028(%rbp)
mov    -0x1028(%rbp),%eax
cmp    -0x1024(%rbp),%eax
jge    1497 <main+0x327>
movslq -0x1028(%rbp),%rax
movzwl -0x1020(%rbp,%rax,2),%edi
ff
call   1090 <me_decode16@plt>
mov    %eax,%esi
lea    0xfbc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1028(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1028(%rbp)
jmp    144d <main+0x2dd>
movslq -0x1028(%rbp),%rax
movb   $0x0,-0x410(%rbp,%rax,1)
lea    0xf73(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x1060,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc08,%rsp
lea    0xe78(%rip),%rsi
mov    %rsp,%rdi
mov    $0x400,%edx
call   1060 <memcpy@plt>
xor    %edi,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1080 <print_bin@plt>
mov    %eax,%r14d
mov    $0x1,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1080 <print_bin@plt>
mov    %eax,%ebp
mov    $0x2,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1080 <print_bin@plt>
mov    %eax,%ebx
mov    $0xffffffff,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1080 <print_bin@plt>
lea    0x1218(%rip),%rdi
mov    %r14d,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1070 <me_valid@plt>
mov    %rax,%r15
mov    $0x1,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1070 <me_valid@plt>
mov    %rax,%rbx
mov    $0x2,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1070 <me_valid@plt>
mov    %rax,%rbp
mov    $0xffffffff,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1070 <me_valid@plt>
lea    0x11c7(%rip),%r14
mov    %r14,%rdi
mov    %r15d,%esi
mov    %ebx,%edx
mov    %ebp,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1090 <me_decode16@plt>
mov    %eax,%r15d
mov    $0x1,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1090 <me_decode16@plt>
mov    %eax,%ebx
mov    $0x2,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1090 <me_decode16@plt>
mov    %eax,%ebp
mov    $0xffffffff,%edi
call   1050 <me_encode@plt>
movzwl %ax,%edi
call   1090 <me_decode16@plt>
mov    %r14,%rdi
mov    %r15d,%esi
mov    %ebx,%edx
mov    %ebp,%ecx
mov    %eax,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x48,%al
lea    0x1157(%rip),%r14
xor    %ebx,%ebx
nopl   (%rax)
movsbl %al,%edi
call   1050 <me_encode@plt>
mov    %ax,0x400(%rsp,%rbx,2)
movsbl (%rsp,%rbx,1),%r15d
movzwl 0x400(%rsp),%ebp
mov    %ebp,%edi
call   1070 <me_valid@plt>
mov    %rax,%r12
movsbl (%rsp,%rbx,1),%r13d
mov    %ebp,%edi
call   1090 <me_decode16@plt>
mov    %r14,%rdi
mov    %r15d,%esi
mov    %ebp,%edx
mov    %r12d,%ecx
mov    %r13d,%r8d
mov    %eax,%r9d
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%edi
call   1080 <print_bin@plt>
movzbl 0x1(%rsp,%rbx,1),%eax
add    $0x1,%rbx
test   %al,%al
jne    12d0 <main+0x160>
mov    $0xa,%edi
call   1030 <putchar@plt>
test   %ebx,%ebx
je     137d <main+0x20d>
mov    %ebp,%edi
call   1090 <me_decode16@plt>
mov    %eax,%edi
call   1030 <putchar@plt>
cmp    $0x1,%ebx
je     137d <main+0x20d>
mov    %ebx,%ebx
mov    $0x1,%ebp
nopw   0x0(%rax,%rax,1)
movzwl 0x400(%rsp,%rbp,2),%edi
call   1090 <me_decode16@plt>
mov    %eax,%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1360 <main+0x1f0>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0xc08,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.text = [1024 x i8] c"Hello World!\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [21 x i8] c"%04x %04x %04x %04x\0A\00"
@.str.1 = [13 x i8] c"%d %d %d %d\0A\00"
@.str.2 = [22 x i8] c"%c,%04X,%d,%02x,%02x,\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1024 x i8]
%3 = alloca [1024 x i8]
%4 = alloca i8*
%5 = alloca [1024 x i16]
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = bitcast [1024 x i8]* %2 to i8*
%9 = bitcast [1024 x i8]* %3 to i8*
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
store i8* %10, i8** %4
store i32 0, i32* %6
store i32 0, i32* %7
%11 = call zeroext i16 @me_encode(i8 signext 0)
%12 = call i32 @print_bin(i16 zeroext %11)
%13 = call zeroext i16 @me_encode(i8 signext 1)
%14 = call i32 @print_bin(i16 zeroext %13)
%15 = call zeroext i16 @me_encode(i8 signext 2)
%16 = call i32 @print_bin(i16 zeroext %15)
%17 = call zeroext i16 @me_encode(i8 signext -1)
%18 = call i32 @print_bin(i16 zeroext %17)
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %14, i32 %16, i32 %18)
%20 = call zeroext i16 @me_encode(i8 signext 0)
%21 = call i64 @me_valid(i16 zeroext %20)
%22 = trunc i64 %21 to i32
%23 = call zeroext i16 @me_encode(i8 signext 1)
%24 = call i64 @me_valid(i16 zeroext %23)
%25 = trunc i64 %24 to i32
%26 = call zeroext i16 @me_encode(i8 signext 2)
%27 = call i64 @me_valid(i16 zeroext %26)
%28 = trunc i64 %27 to i32
%29 = call zeroext i16 @me_encode(i8 signext -1)
%30 = call i64 @me_valid(i16 zeroext %29)
%31 = trunc i64 %30 to i32
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %22, i32 %25, i32 %28, i32 %31)
%33 = call zeroext i16 @me_encode(i8 signext 0)
%34 = call i32 @me_decode16(i16 zeroext %33)
%35 = call zeroext i16 @me_encode(i8 signext 1)
%36 = call i32 @me_decode16(i16 zeroext %35)
%37 = call zeroext i16 @me_encode(i8 signext 2)
%38 = call i32 @me_decode16(i16 zeroext %37)
%39 = call zeroext i16 @me_encode(i8 signext -1)
%40 = call i32 @me_decode16(i16 zeroext %39)
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %34, i32 %36, i32 %38, i32 %40)
br label %42
42: ; preds = %46, %0
%43 = load i8*, i8** %4
%44 = load i8, i8* %43
%45 = icmp ne i8 %44, 0
br i1 %45, label %46, label %85
46: ; preds = %42
%47 = load i8*, i8** %4
%48 = load i8, i8* %47
%49 = call zeroext i16 @me_encode(i8 signext %48)
%50 = load i32, i32* %6
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [1024 x i16], [1024 x i16]* %5, i64 0, i64 %51
store i16 %49, i16* %52
%53 = load i8*, i8** %4
%54 = load i8, i8* %53
%55 = sext i8 %54 to i32
%56 = load i32, i32* %7
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds [1024 x i16], [1024 x i16]* %5, i64 0, i64 %57
%59 = load i16, i16* %58
%60 = zext i16 %59 to i32
%61 = load i32, i32* %7
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [1024 x i16], [1024 x i16]* %5, i64 0, i64 %62
%64 = load i16, i16* %63
%65 = call i64 @me_valid(i16 zeroext %64)
%66 = trunc i64 %65 to i32
%67 = load i8*, i8** %4
%68 = load i8, i8* %67
%69 = sext i8 %68 to i32
%70 = load i32, i32* %7
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [1024 x i16], [1024 x i16]* %5, i64 0, i64 %71
%73 = load i16, i16* %72
%74 = call i32 @me_decode16(i16 zeroext %73)
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %55, i32 %60, i32 %66, i32 %69, i32 %74)
%76 = load i32, i32* %7
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [1024 x i16], [1024 x i16]* %5, i64 0, i64 %77
%79 = load i16, i16* %78
%80 = call i32 @print_bin(i16 zeroext %79)
%81 = load i32, i32* %6
%82 = add nsw i32 %81, 1
store i32 %82, i32* %6
%83 = load i8*, i8** %4
%84 = getelementptr inbounds i8, i8* %83, i32 1
store i8* %84, i8** %4
br label %42
85: ; preds = %42
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %7
br label %87
87: ; preds = %98, %85
%88 = load i32, i32* %7
%89 = load i32, i32* %6
%90 = icmp slt i32 %88, %89
br i1 %90, label %91, label %101
91: ; preds = %87
%92 = load i32, i32* %7
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds [1024 x i16], [1024 x i16]* %5, i64 0, i64 %93
%95 = load i16, i16* %94
%96 = call i32 @me_decode16(i16 zeroext %95)
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %96)
br label %98
98: ; preds = %91
%99 = load i32, i32* %7
%100 = add nsw i32 %99, 1
store i32 %100, i32* %7
br label %87
101: ; preds = %87
%102 = load i32, i32* %7
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %103
store i8 0, i8* %104
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@__const.main.text = [1024 x i8] c"Hello World!\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [21 x i8] c"%04x %04x %04x %04x\0A\00"
@.str.1 = [13 x i8] c"%d %d %d %d\0A\00"
@.str.2 = [22 x i8] c"%c,%04X,%d,%02x,%02x,\00"
define i32 @main() {
%1 = alloca [1024 x i8]
%2 = alloca [1024 x i16]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%4 = bitcast [1024 x i16]* %2 to i8*
%5 = tail call zeroext i16 @me_encode(i8 signext 0)
%6 = tail call i32 @print_bin(i16 zeroext %5)
%7 = tail call zeroext i16 @me_encode(i8 signext 1)
%8 = tail call i32 @print_bin(i16 zeroext %7)
%9 = tail call zeroext i16 @me_encode(i8 signext 2)
%10 = tail call i32 @print_bin(i16 zeroext %9)
%11 = tail call zeroext i16 @me_encode(i8 signext -1)
%12 = tail call i32 @print_bin(i16 zeroext %11)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %8, i32 %10, i32 %12)
%14 = tail call zeroext i16 @me_encode(i8 signext 0)
%15 = tail call i64 @me_valid(i16 zeroext %14)
%16 = trunc i64 %15 to i32
%17 = tail call zeroext i16 @me_encode(i8 signext 1)
%18 = tail call i64 @me_valid(i16 zeroext %17)
%19 = trunc i64 %18 to i32
%20 = tail call zeroext i16 @me_encode(i8 signext 2)
%21 = tail call i64 @me_valid(i16 zeroext %20)
%22 = trunc i64 %21 to i32
%23 = tail call zeroext i16 @me_encode(i8 signext -1)
%24 = tail call i64 @me_valid(i16 zeroext %23)
%25 = trunc i64 %24 to i32
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %16, i32 %19, i32 %22, i32 %25)
%27 = tail call zeroext i16 @me_encode(i8 signext 0)
%28 = tail call i32 @me_decode16(i16 zeroext %27)
%29 = tail call zeroext i16 @me_encode(i8 signext 1)
%30 = tail call i32 @me_decode16(i16 zeroext %29)
%31 = tail call zeroext i16 @me_encode(i8 signext 2)
%32 = tail call i32 @me_decode16(i16 zeroext %31)
%33 = tail call zeroext i16 @me_encode(i8 signext -1)
%34 = tail call i32 @me_decode16(i16 zeroext %33)
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %28, i32 %30, i32 %32, i32 %34)
%36 = getelementptr inbounds [1024 x i16], [1024 x i16]* %2, i64 0, i64 0
br label %37
37: ; preds = %0, %37
%38 = phi i64 [ 0, %0 ], [ %54, %37 ]
%39 = phi i8 [ 72, %0 ], [ %56, %37 ]
%40 = phi i8* [ %3, %0 ], [ %55, %37 ]
%41 = tail call zeroext i16 @me_encode(i8 signext %39)
%42 = getelementptr inbounds [1024 x i16], [1024 x i16]* %2, i64 0, i64 %38
store i16 %41, i16* %42
%43 = load i8, i8* %40
%44 = sext i8 %43 to i32
%45 = load i16, i16* %36
%46 = zext i16 %45 to i32
%47 = tail call i64 @me_valid(i16 zeroext %45)
%48 = trunc i64 %47 to i32
%49 = load i8, i8* %40
%50 = sext i8 %49 to i32
%51 = tail call i32 @me_decode16(i16 zeroext %45)
%52 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %44, i32 %46, i32 %48, i32 %50, i32 %51)
%53 = tail call i32 @print_bin(i16 zeroext %45)
%54 = add nuw i64 %38, 1
%55 = getelementptr inbounds i8, i8* %40, i64 1
%56 = load i8, i8* %55
%57 = icmp eq i8 %56, 0
br i1 %57, label %58, label %37
58: ; preds = %37
%59 = trunc i64 %54 to i32
%60 = tail call i32 @putchar(i32 10)
%61 = icmp eq i32 %59, 0
br i1 %61, label %75, label %62
62: ; preds = %58
%63 = and i64 %54, 4294967295
%64 = tail call i32 @me_decode16(i16 zeroext %45)
%65 = tail call i32 @putchar(i32 %64)
%66 = icmp eq i64 %63, 1
br i1 %66, label %75, label %67
67: ; preds = %62, %67
%68 = phi i64 [ %73, %67 ], [ 1, %62 ]
%69 = getelementptr inbounds [1024 x i16], [1024 x i16]* %2, i64 0, i64 %68
%70 = load i16, i16* %69
%71 = tail call i32 @me_decode16(i16 zeroext %70)
%72 = tail call i32 @putchar(i32 %71)
%73 = add nuw nsw i64 %68, 1
%74 = icmp eq i64 %73, %63
br i1 %74, label %75, label %67
75: ; preds = %67, %62, %58
%76 = tail call i32 @putchar(i32 10)
ret i32 0
}