#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 uint8_t;
typedef int uint16_t;
typedef int int16_t;

/* Variables and functions */
int /*<<< orphan*/ assertTrue(char *, int);
int /*<<< orphan*/ printf(char *, int, ...);
void test_uint16() {
  int16_t chars[4];
  chars[0] = 325;
  chars[1] = 32767;
  chars[2] = 0xFFFF;
  chars[3] = 0x1000;
  uint8_t *pb = &chars[0];
  int i;
  for (i = 0; i < 8; ++i) {
    printf("pb[%d] = %x\n", i, pb[i]);
  }
  assertTrue("pb[0] == 0x45", pb[0] == 0x45);
  ;
  assertTrue("pb[1] == 0x01", pb[1] == 0x01);
  ;
  assertTrue("pb[2] == 0xff", pb[2] == 0xff);
  ;
  assertTrue("pb[3] == 0x7f", pb[3] == 0x7f);
  ;
  assertTrue("pb[4] == 0xff", pb[4] == 0xff);
  ;
  assertTrue("pb[5] == 0xff", pb[5] == 0xff);
  ;
  assertTrue("pb[6] == 0x00", pb[6] == 0x00);
  ;
  assertTrue("pb[7] == 0x10", pb[7] == 0x10);
  ;
  pb[0] = 0xCC;
  pb[3] = 0x00;
  assertTrue("chars[0] == 0x01CC", chars[0] == 0x01CC);
  ;
  assertTrue("chars[1] == 0x00FF", chars[1] == 0x00FF);
  ;
  uint8_t bytes[8] = {0xbb, 0xfe, 0xff, 0x7f, 0x00, 0x80, 0x80, 0x00};
  uint16_t *pc = &bytes[0];
  for (i = 0; i < 4; ++i) {
    printf("pc[%d] = %x\n", i, pc[i]);
  }
  assertTrue("pc[0] == 0xfebb", pc[0] == 0xfebb);
  ;
  assertTrue("pc[1] == 0x7fff", pc[1] == 0x7fff);
  ;
  assertTrue("pc[2] == 0x8000", pc[2] == 0x8000);
  ;
  assertTrue("pc[3] == 0x0080", pc[3] == 0x0080);
  ;
  pc[0] = 0xCAFE;
  pc[1] = 0xD0EB;
  printf("b[0] == %x\n", bytes[0]);
  printf("b[2] == %x\n", bytes[1]);
  printf("b[2] == %x\n", bytes[2]);
  printf("b[3] == %x\n", bytes[3]);
  assertTrue("bytes[0] == 0xFE", bytes[0] == 0xFE);
  ;
  assertTrue("bytes[1] == 0xCA", bytes[1] == 0xCA);
  ;
  assertTrue("bytes[2] == 0xEB", bytes[2] == 0xEB);
  ;
  assertTrue("bytes[3] == 0xD0", bytes[3] == 0xD0);
  ;
}


x86 assembly (clang, -O0):
<test_uint16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x145,-0x10(%rbp)
movl   $0x7fff,-0xc(%rbp)
movl   $0xffff,-0x8(%rbp)
movl   $0x1000,-0x4(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x8,-0x1c(%rbp)
jge    1187 <test_uint16+0x67>
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1153 <test_uint16+0x33>
mov    -0x18(%rbp),%rax
cmpl   $0x45,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe70(%rip),%rdi
call   1040 <assertTrue@plt>
mov    -0x18(%rbp),%rax
cmpl   $0x1,0x4(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe62(%rip),%rdi
call   1040 <assertTrue@plt>
mov    -0x18(%rbp),%rax
cmpl   $0xff,0x8(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe51(%rip),%rdi
call   1040 <assertTrue@plt>
mov    -0x18(%rbp),%rax
cmpl   $0x7f,0xc(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe43(%rip),%rdi
call   1040 <assertTrue@plt>
mov    -0x18(%rbp),%rax
cmpl   $0xff,0x10(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe32(%rip),%rdi
call   1040 <assertTrue@plt>
mov    -0x18(%rbp),%rax
cmpl   $0xff,0x14(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe21(%rip),%rdi
call   1040 <assertTrue@plt>
mov    -0x18(%rbp),%rax
cmpl   $0x0,0x18(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe13(%rip),%rdi
call   1040 <assertTrue@plt>
mov    -0x18(%rbp),%rax
cmpl   $0x10,0x1c(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe05(%rip),%rdi
call   1040 <assertTrue@plt>
mov    -0x18(%rbp),%rax
movl   $0xcc,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x0,0xc(%rax)
cmpl   $0x1cc,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xde3(%rip),%rdi
call   1040 <assertTrue@plt>
cmpl   $0xff,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xddb(%rip),%rdi
call   1040 <assertTrue@plt>
mov    0xe9f(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xe9c(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xe99(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe96(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x4,-0x1c(%rbp)
jge    1329 <test_uint16+0x209>
mov    -0x1c(%rbp),%esi
mov    -0x48(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xd8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12f5 <test_uint16+0x1d5>
mov    -0x48(%rbp),%rax
cmpl   $0xfebb,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xd6e(%rip),%rdi
call   1040 <assertTrue@plt>
mov    -0x48(%rbp),%rax
cmpl   $0x7fff,0x4(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xd5f(%rip),%rdi
call   1040 <assertTrue@plt>
mov    -0x48(%rbp),%rax
cmpl   $0x8000,0x8(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xd50(%rip),%rdi
call   1040 <assertTrue@plt>
mov    -0x48(%rbp),%rax
cmpl   $0x80,0xc(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xd41(%rip),%rdi
call   1040 <assertTrue@plt>
mov    -0x48(%rbp),%rax
movl   $0xcafe,(%rax)
mov    -0x48(%rbp),%rax
movl   $0xd0eb,0x4(%rax)
mov    -0x40(%rbp),%esi
lea    0xd2d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x3c(%rbp),%esi
lea    0xd28(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%esi
lea    0xd17(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%esi
lea    0xd12(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0xfe,-0x40(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xd01(%rip),%rdi
call   1040 <assertTrue@plt>
cmpl   $0xca,-0x3c(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xcf7(%rip),%rdi
call   1040 <assertTrue@plt>
cmpl   $0xeb,-0x38(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xced(%rip),%rdi
call   1040 <assertTrue@plt>
cmpl   $0xd0,-0x34(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xce3(%rip),%rdi
call   1040 <assertTrue@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_uint16>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x145,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x7fff,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0xffff,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x1000,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe55(%rip),%rdi
xor    %esi,%esi
call   1040 <assertTrue@plt>
lea    0xe55(%rip),%rdi
xor    %esi,%esi
call   1040 <assertTrue@plt>
lea    0xe55(%rip),%rdi
xor    %esi,%esi
call   1040 <assertTrue@plt>
lea    0xe55(%rip),%rdi
xor    %esi,%esi
call   1040 <assertTrue@plt>
lea    0xe55(%rip),%rdi
call   1040 <assertTrue@plt>
lea    0xe57(%rip),%rdi
call   1040 <assertTrue@plt>
lea    0xe59(%rip),%rdi
call   1040 <assertTrue@plt>
lea    0xe5b(%rip),%rdi
call   1040 <assertTrue@plt>
lea    0xe5d(%rip),%rdi
xor    %esi,%esi
call   1040 <assertTrue@plt>
lea    0xe62(%rip),%rdi
xor    %esi,%esi
call   1040 <assertTrue@plt>
lea    0xe67(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xbb,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0xfe,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0xff,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x7f,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe20(%rip),%rdi
xor    %esi,%esi
call   1040 <assertTrue@plt>
lea    0xe22(%rip),%rdi
xor    %esi,%esi
call   1040 <assertTrue@plt>
lea    0xe24(%rip),%rdi
xor    %esi,%esi
call   1040 <assertTrue@plt>
lea    0xe26(%rip),%rdi
xor    %esi,%esi
call   1040 <assertTrue@plt>
lea    0xe28(%rip),%rdi
mov    $0xcafe,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe21(%rip),%rbx
mov    %rbx,%rdi
mov    $0xd0eb,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xff,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe08(%rip),%rdi
mov    $0x7f,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe01(%rip),%rdi
xor    %esi,%esi
call   1040 <assertTrue@plt>
lea    0xe04(%rip),%rdi
xor    %esi,%esi
call   1040 <assertTrue@plt>
lea    0xe07(%rip),%rdi
xor    %esi,%esi
call   1040 <assertTrue@plt>
lea    0xe0a(%rip),%rdi
xor    %esi,%esi
pop    %rbx
jmp    1040 <assertTrue@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"pb[%d] = %x\0A\00"
@.str.1 = [14 x i8] c"pb[0] == 0x45\00"
@.str.2 = [14 x i8] c"pb[1] == 0x01\00"
@.str.3 = [14 x i8] c"pb[2] == 0xff\00"
@.str.4 = [14 x i8] c"pb[3] == 0x7f\00"
@.str.5 = [14 x i8] c"pb[4] == 0xff\00"
@.str.6 = [14 x i8] c"pb[5] == 0xff\00"
@.str.7 = [14 x i8] c"pb[6] == 0x00\00"
@.str.8 = [14 x i8] c"pb[7] == 0x10\00"
@.str.9 = [19 x i8] c"chars[0] == 0x01CC\00"
@.str.10 = [19 x i8] c"chars[1] == 0x00FF\00"
@__const.test_uint16.bytes = [8 x i32] [i32 187, i32 254, i32 255, i32 127, i32 0, i32 128, i32 128, i32 0]
@.str.11 = [13 x i8] c"pc[%d] = %x\0A\00"
@.str.12 = [16 x i8] c"pc[0] == 0xfebb\00"
@.str.13 = [16 x i8] c"pc[1] == 0x7fff\00"
@.str.14 = [16 x i8] c"pc[2] == 0x8000\00"
@.str.15 = [16 x i8] c"pc[3] == 0x0080\00"
@.str.16 = [12 x i8] c"b[0] == %x\0A\00"
@.str.17 = [12 x i8] c"b[2] == %x\0A\00"
@.str.18 = [12 x i8] c"b[3] == %x\0A\00"
@.str.19 = [17 x i8] c"bytes[0] == 0xFE\00"
@.str.20 = [17 x i8] c"bytes[1] == 0xCA\00"
@.str.21 = [17 x i8] c"bytes[2] == 0xEB\00"
@.str.22 = [17 x i8] c"bytes[3] == 0xD0\00"
define void @test_uint16() {
%1 = alloca [4 x i32]
%2 = alloca i32*
%3 = alloca i32
%4 = alloca [8 x i32]
%5 = alloca i32*
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
store i32 325, i32* %6
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 1
store i32 32767, i32* %7
%8 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 2
store i32 65535, i32* %8
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 3
store i32 4096, i32* %9
%10 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
store i32* %10, i32** %2
store i32 0, i32* %3
br label %11
11: ; preds = %22, %0
%12 = load i32, i32* %3
%13 = icmp slt i32 %12, 8
br i1 %13, label %14, label %25
14: ; preds = %11
%15 = load i32, i32* %3
%16 = load i32*, i32** %2
%17 = load i32, i32* %3
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %16, i64 %18
%20 = load i32, i32* %19
%21 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %20)
br label %22
22: ; preds = %14
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
br label %11
25: ; preds = %11
%26 = load i32*, i32** %2
%27 = getelementptr inbounds i32, i32* %26, i64 0
%28 = load i32, i32* %27
%29 = icmp eq i32 %28, 69
%30 = zext i1 %29 to i32
%31 = call i32 @assertTrue(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %30)
%32 = load i32*, i32** %2
%33 = getelementptr inbounds i32, i32* %32, i64 1
%34 = load i32, i32* %33
%35 = icmp eq i32 %34, 1
%36 = zext i1 %35 to i32
%37 = call i32 @assertTrue(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %36)
%38 = load i32*, i32** %2
%39 = getelementptr inbounds i32, i32* %38, i64 2
%40 = load i32, i32* %39
%41 = icmp eq i32 %40, 255
%42 = zext i1 %41 to i32
%43 = call i32 @assertTrue(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 %42)
%44 = load i32*, i32** %2
%45 = getelementptr inbounds i32, i32* %44, i64 3
%46 = load i32, i32* %45
%47 = icmp eq i32 %46, 127
%48 = zext i1 %47 to i32
%49 = call i32 @assertTrue(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %48)
%50 = load i32*, i32** %2
%51 = getelementptr inbounds i32, i32* %50, i64 4
%52 = load i32, i32* %51
%53 = icmp eq i32 %52, 255
%54 = zext i1 %53 to i32
%55 = call i32 @assertTrue(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %54)
%56 = load i32*, i32** %2
%57 = getelementptr inbounds i32, i32* %56, i64 5
%58 = load i32, i32* %57
%59 = icmp eq i32 %58, 255
%60 = zext i1 %59 to i32
%61 = call i32 @assertTrue(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %60)
%62 = load i32*, i32** %2
%63 = getelementptr inbounds i32, i32* %62, i64 6
%64 = load i32, i32* %63
%65 = icmp eq i32 %64, 0
%66 = zext i1 %65 to i32
%67 = call i32 @assertTrue(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i32 %66)
%68 = load i32*, i32** %2
%69 = getelementptr inbounds i32, i32* %68, i64 7
%70 = load i32, i32* %69
%71 = icmp eq i32 %70, 16
%72 = zext i1 %71 to i32
%73 = call i32 @assertTrue(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 %72)
%74 = load i32*, i32** %2
%75 = getelementptr inbounds i32, i32* %74, i64 0
store i32 204, i32* %75
%76 = load i32*, i32** %2
%77 = getelementptr inbounds i32, i32* %76, i64 3
store i32 0, i32* %77
%78 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%79 = load i32, i32* %78
%80 = icmp eq i32 %79, 460
%81 = zext i1 %80 to i32
%82 = call i32 @assertTrue(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i32 %81)
%83 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 1
%84 = load i32, i32* %83
%85 = icmp eq i32 %84, 255
%86 = zext i1 %85 to i32
%87 = call i32 @assertTrue(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), i32 %86)
%88 = bitcast [8 x i32]* %4 to i8*
%89 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 0
store i32* %89, i32** %5
store i32 0, i32* %3
br label %90
90: ; preds = %101, %25
%91 = load i32, i32* %3
%92 = icmp slt i32 %91, 4
br i1 %92, label %93, label %104
93: ; preds = %90
%94 = load i32, i32* %3
%95 = load i32*, i32** %5
%96 = load i32, i32* %3
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds i32, i32* %95, i64 %97
%99 = load i32, i32* %98
%100 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i32 %94, i32 %99)
br label %101
101: ; preds = %93
%102 = load i32, i32* %3
%103 = add nsw i32 %102, 1
store i32 %103, i32* %3
br label %90
104: ; preds = %90
%105 = load i32*, i32** %5
%106 = getelementptr inbounds i32, i32* %105, i64 0
%107 = load i32, i32* %106
%108 = icmp eq i32 %107, 65211
%109 = zext i1 %108 to i32
%110 = call i32 @assertTrue(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0), i32 %109)
%111 = load i32*, i32** %5
%112 = getelementptr inbounds i32, i32* %111, i64 1
%113 = load i32, i32* %112
%114 = icmp eq i32 %113, 32767
%115 = zext i1 %114 to i32
%116 = call i32 @assertTrue(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i32 %115)
%117 = load i32*, i32** %5
%118 = getelementptr inbounds i32, i32* %117, i64 2
%119 = load i32, i32* %118
%120 = icmp eq i32 %119, 32768
%121 = zext i1 %120 to i32
%122 = call i32 @assertTrue(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.14, i64 0, i64 0), i32 %121)
%123 = load i32*, i32** %5
%124 = getelementptr inbounds i32, i32* %123, i64 3
%125 = load i32, i32* %124
%126 = icmp eq i32 %125, 128
%127 = zext i1 %126 to i32
%128 = call i32 @assertTrue(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), i32 %127)
%129 = load i32*, i32** %5
%130 = getelementptr inbounds i32, i32* %129, i64 0
store i32 51966, i32* %130
%131 = load i32*, i32** %5
%132 = getelementptr inbounds i32, i32* %131, i64 1
store i32 53483, i32* %132
%133 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 0
%134 = load i32, i32* %133
%135 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.16, i64 0, i64 0), i32 %134)
%136 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 1
%137 = load i32, i32* %136
%138 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.17, i64 0, i64 0), i32 %137)
%139 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 2
%140 = load i32, i32* %139
%141 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.17, i64 0, i64 0), i32 %140)
%142 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 3
%143 = load i32, i32* %142
%144 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 %143)
%145 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 0
%146 = load i32, i32* %145
%147 = icmp eq i32 %146, 254
%148 = zext i1 %147 to i32
%149 = call i32 @assertTrue(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), i32 %148)
%150 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 1
%151 = load i32, i32* %150
%152 = icmp eq i32 %151, 202
%153 = zext i1 %152 to i32
%154 = call i32 @assertTrue(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.20, i64 0, i64 0), i32 %153)
%155 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 2
%156 = load i32, i32* %155
%157 = icmp eq i32 %156, 235
%158 = zext i1 %157 to i32
%159 = call i32 @assertTrue(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.21, i64 0, i64 0), i32 %158)
%160 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 3
%161 = load i32, i32* %160
%162 = icmp eq i32 %161, 208
%163 = zext i1 %162 to i32
%164 = call i32 @assertTrue(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.22, i64 0, i64 0), i32 %163)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"pb[%d] = %x\0A\00"
@.str.1 = [14 x i8] c"pb[0] == 0x45\00"
@.str.2 = [14 x i8] c"pb[1] == 0x01\00"
@.str.3 = [14 x i8] c"pb[2] == 0xff\00"
@.str.4 = [14 x i8] c"pb[3] == 0x7f\00"
@.str.5 = [14 x i8] c"pb[4] == 0xff\00"
@.str.6 = [14 x i8] c"pb[5] == 0xff\00"
@.str.7 = [14 x i8] c"pb[6] == 0x00\00"
@.str.8 = [14 x i8] c"pb[7] == 0x10\00"
@.str.9 = [19 x i8] c"chars[0] == 0x01CC\00"
@.str.10 = [19 x i8] c"chars[1] == 0x00FF\00"
@.str.11 = [13 x i8] c"pc[%d] = %x\0A\00"
@.str.12 = [16 x i8] c"pc[0] == 0xfebb\00"
@.str.13 = [16 x i8] c"pc[1] == 0x7fff\00"
@.str.14 = [16 x i8] c"pc[2] == 0x8000\00"
@.str.15 = [16 x i8] c"pc[3] == 0x0080\00"
@.str.16 = [12 x i8] c"b[0] == %x\0A\00"
@.str.17 = [12 x i8] c"b[2] == %x\0A\00"
@.str.18 = [12 x i8] c"b[3] == %x\0A\00"
@.str.19 = [17 x i8] c"bytes[0] == 0xFE\00"
@.str.20 = [17 x i8] c"bytes[1] == 0xCA\00"
@.str.21 = [17 x i8] c"bytes[2] == 0xEB\00"
@.str.22 = [17 x i8] c"bytes[3] == 0xD0\00"
define void @test_uint16() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 0, i32 325)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 1, i32 32767)
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 2, i32 65535)
%4 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 3, i32 4096)
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 4, i32 poison)
%6 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 5, i32 poison)
%7 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 6, i32 poison)
%8 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 7, i32 poison)
%9 = tail call i32 @assertTrue(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 0)
%10 = tail call i32 @assertTrue(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 0)
%11 = tail call i32 @assertTrue(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 0)
%12 = tail call i32 @assertTrue(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 0)
%13 = tail call i32 @assertTrue(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 poison)
%14 = tail call i32 @assertTrue(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 poison)
%15 = tail call i32 @assertTrue(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i32 poison)
%16 = tail call i32 @assertTrue(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i32 poison)
%17 = tail call i32 @assertTrue(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i32 0)
%18 = tail call i32 @assertTrue(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), i32 0)
%19 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i32 0, i32 187)
%20 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i32 1, i32 254)
%21 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i32 2, i32 255)
%22 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i32 3, i32 127)
%23 = tail call i32 @assertTrue(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0), i32 0)
%24 = tail call i32 @assertTrue(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i32 0)
%25 = tail call i32 @assertTrue(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.14, i64 0, i64 0), i32 0)
%26 = tail call i32 @assertTrue(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), i32 0)
%27 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.16, i64 0, i64 0), i32 51966)
%28 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.17, i64 0, i64 0), i32 53483)
%29 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.17, i64 0, i64 0), i32 255)
%30 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 127)
%31 = tail call i32 @assertTrue(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), i32 0)
%32 = tail call i32 @assertTrue(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.20, i64 0, i64 0), i32 0)
%33 = tail call i32 @assertTrue(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.21, i64 0, i64 0), i32 0)
%34 = tail call i32 @assertTrue(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.22, i64 0, i64 0), i32 0)
ret void
}