#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;

/* Variables and functions */
int /*<<< orphan*/ add_CRC(int *, int, int);
int /*<<< orphan*/ doit(int *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  uint8_t buf[512];
  buf[0] = 0x05;
  buf[1] = 0x01;
  buf[2] = 0x00;
  buf[3] = 0x99;
  buf[4] = 0x00;
  buf[5] = 0x55;
  add_CRC(buf, 8, 0xFFFF);
  printf("\nExample 0x01 ---------------------\n\n");
  doit(buf);
  buf[0] = 0x05;
  buf[1] = 0x02;
  buf[2] = 0x00;
  buf[3] = 0xC4;
  buf[4] = 0x00;
  buf[5] = 0x16;
  add_CRC(buf, 8, 0xFFFF);
  printf("\nExample 0x02 ---------------------\n\n");
  doit(buf);
  buf[0] = 0x05;
  buf[1] = 0x03;
  buf[2] = 0x00;
  buf[3] = 0x10;
  buf[4] = 0x00;
  buf[5] = 0x05;
  add_CRC(buf, 8, 0xFFFF);
  printf("\nExample 0x03 ---------------------\n\n");
  doit(buf);
  buf[0] = 0x05;
  buf[1] = 0x04;
  buf[2] = 0x00;
  buf[3] = 0x12;
  buf[4] = 0x00;
  buf[5] = 0x06;
  add_CRC(buf, 8, 0xFFFF);
  printf("\nExample 0x04 ---------------------\n\n");
  doit(buf);
  buf[0] = 0x05;
  buf[1] = 0x05;
  buf[2] = 0x00;
  buf[3] = 0xAC;
  buf[4] = 0xFF;
  buf[5] = 0x00;
  add_CRC(buf, 8, 0xFFFF);
  printf("\nExample 0x05 ---------------------\n\n");
  doit(buf);
  buf[0] = 0x05;
  buf[1] = 0x06;
  buf[2] = 0x00;
  buf[3] = 0x01;
  buf[4] = 0x00;
  buf[5] = 0x03;
  add_CRC(buf, 8, 0xFFFF);
  printf("\nExample 0x06 ---------------------\n\n");
  doit(buf);
  buf[0] = 0x05;
  buf[1] = 0x0F;
  buf[2] = 0x00;
  buf[3] = 0x13;
  buf[4] = 0x00;
  buf[5] = 0x0A;
  buf[6] = 0x02;
  buf[7] = 0x55;
  buf[8] = 0x55;
  add_CRC(buf, 11, 0xFFFF);
  printf("\nExample 0x0F ---------------------\n\n");
  doit(buf);
  buf[0] = 0x05;
  buf[1] = 0x10;
  buf[2] = 0x00;
  buf[3] = 0x01;
  buf[4] = 0x00;
  buf[5] = 0x02;
  buf[6] = 0x04;
  buf[7] = 0x0A;
  buf[8] = 0x0B;
  buf[9] = 0x01;
  buf[10] = 0x02;
  add_CRC(buf, 13, 0xFFFF);
  printf("\nExample 0x10 ---------------------\n\n");
  doit(buf);
  buf[0] = 0x05;
  buf[1] = 0x0A;
  buf[2] = 0x00;
  buf[3] = 0x01;
  buf[4] = 0x00;
  buf[5] = 0x03;
  add_CRC(buf, 8, 0xFFFF);
  printf("\nExample 0x0A bad opcode  ---------------------\n\n");
  doit(buf);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x810,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x5,-0x810(%rbp)
movl   $0x1,-0x80c(%rbp)
movl   $0x0,-0x808(%rbp)
movl   $0x99,-0x804(%rbp)
movl   $0x0,-0x800(%rbp)
movl   $0x55,-0x7fc(%rbp)
lea    -0x810(%rbp),%rdi
mov    $0x8,%esi
mov    $0xffff,%edx
call   1050 <add_CRC@plt>
lea    0xe5e(%rip),%rdi
call   1030 <printf@plt>
lea    -0x810(%rbp),%rdi
call   1040 <doit@plt>
movl   $0x5,-0x810(%rbp)
movl   $0x2,-0x80c(%rbp)
movl   $0x0,-0x808(%rbp)
movl   $0xc4,-0x804(%rbp)
movl   $0x0,-0x800(%rbp)
movl   $0x16,-0x7fc(%rbp)
lea    -0x810(%rbp),%rdi
mov    $0x8,%esi
mov    $0xffff,%edx
call   1050 <add_CRC@plt>
lea    0xe1a(%rip),%rdi
call   1030 <printf@plt>
lea    -0x810(%rbp),%rdi
call   1040 <doit@plt>
movl   $0x5,-0x810(%rbp)
movl   $0x3,-0x80c(%rbp)
movl   $0x0,-0x808(%rbp)
movl   $0x10,-0x804(%rbp)
movl   $0x0,-0x800(%rbp)
movl   $0x5,-0x7fc(%rbp)
lea    -0x810(%rbp),%rdi
mov    $0x8,%esi
mov    $0xffff,%edx
call   1050 <add_CRC@plt>
lea    0xdd6(%rip),%rdi
call   1030 <printf@plt>
lea    -0x810(%rbp),%rdi
call   1040 <doit@plt>
movl   $0x5,-0x810(%rbp)
movl   $0x4,-0x80c(%rbp)
movl   $0x0,-0x808(%rbp)
movl   $0x12,-0x804(%rbp)
movl   $0x0,-0x800(%rbp)
movl   $0x6,-0x7fc(%rbp)
lea    -0x810(%rbp),%rdi
mov    $0x8,%esi
mov    $0xffff,%edx
call   1050 <add_CRC@plt>
lea    0xd92(%rip),%rdi
call   1030 <printf@plt>
lea    -0x810(%rbp),%rdi
call   1040 <doit@plt>
movl   $0x5,-0x810(%rbp)
movl   $0x5,-0x80c(%rbp)
movl   $0x0,-0x808(%rbp)
movl   $0xac,-0x804(%rbp)
movl   $0xff,-0x800(%rbp)
movl   $0x0,-0x7fc(%rbp)
lea    -0x810(%rbp),%rdi
mov    $0x8,%esi
mov    $0xffff,%edx
call   1050 <add_CRC@plt>
lea    0xd4e(%rip),%rdi
call   1030 <printf@plt>
lea    -0x810(%rbp),%rdi
call   1040 <doit@plt>
movl   $0x5,-0x810(%rbp)
movl   $0x6,-0x80c(%rbp)
movl   $0x0,-0x808(%rbp)
movl   $0x1,-0x804(%rbp)
movl   $0x0,-0x800(%rbp)
movl   $0x3,-0x7fc(%rbp)
lea    -0x810(%rbp),%rdi
mov    $0x8,%esi
mov    $0xffff,%edx
call   1050 <add_CRC@plt>
lea    0xd0a(%rip),%rdi
call   1030 <printf@plt>
lea    -0x810(%rbp),%rdi
call   1040 <doit@plt>
movl   $0x5,-0x810(%rbp)
movl   $0xf,-0x80c(%rbp)
movl   $0x0,-0x808(%rbp)
movl   $0x13,-0x804(%rbp)
movl   $0x0,-0x800(%rbp)
movl   $0xa,-0x7fc(%rbp)
movl   $0x2,-0x7f8(%rbp)
movl   $0x55,-0x7f4(%rbp)
movl   $0x55,-0x7f0(%rbp)
lea    -0x810(%rbp),%rdi
mov    $0xb,%esi
mov    $0xffff,%edx
call   1050 <add_CRC@plt>
lea    0xca8(%rip),%rdi
call   1030 <printf@plt>
lea    -0x810(%rbp),%rdi
call   1040 <doit@plt>
movl   $0x5,-0x810(%rbp)
movl   $0x10,-0x80c(%rbp)
movl   $0x0,-0x808(%rbp)
movl   $0x1,-0x804(%rbp)
movl   $0x0,-0x800(%rbp)
movl   $0x2,-0x7fc(%rbp)
movl   $0x4,-0x7f8(%rbp)
movl   $0xa,-0x7f4(%rbp)
movl   $0xb,-0x7f0(%rbp)
movl   $0x1,-0x7ec(%rbp)
movl   $0x2,-0x7e8(%rbp)
lea    -0x810(%rbp),%rdi
mov    $0xd,%esi
mov    $0xffff,%edx
call   1050 <add_CRC@plt>
lea    0xc32(%rip),%rdi
call   1030 <printf@plt>
lea    -0x810(%rbp),%rdi
call   1040 <doit@plt>
movl   $0x5,-0x810(%rbp)
movl   $0xa,-0x80c(%rbp)
movl   $0x0,-0x808(%rbp)
movl   $0x1,-0x804(%rbp)
movl   $0x0,-0x800(%rbp)
movl   $0x3,-0x7fc(%rbp)
lea    -0x810(%rbp),%rdi
mov    $0x8,%esi
mov    $0xffff,%edx
call   1050 <add_CRC@plt>
lea    0xbee(%rip),%rdi
call   1030 <printf@plt>
lea    -0x810(%rbp),%rdi
call   1040 <doit@plt>
xor    %eax,%eax
add    $0x810,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x808,%rsp
movaps 0xebf(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x5500000000,%rax
mov    %rax,0x10(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0xffff,%edx
call   1050 <add_CRC@plt>
lea    0xf40(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <doit@plt>
movaps 0xe8c(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x1600000000,%rax
mov    %rax,0x10(%rsp)
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0xffff,%edx
call   1050 <add_CRC@plt>
lea    0xf25(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <doit@plt>
movaps 0xe5c(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x500000000,%rax
mov    %rax,0x10(%rsp)
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0xffff,%edx
call   1050 <add_CRC@plt>
lea    0xf0a(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <doit@plt>
movaps 0xe2c(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x600000000,%rax
mov    %rax,0x10(%rsp)
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0xffff,%edx
call   1050 <add_CRC@plt>
lea    0xeef(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <doit@plt>
movaps 0xdfc(%rip),%xmm0
movaps %xmm0,(%rsp)
movq   $0xff,0x10(%rsp)
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0xffff,%edx
call   1050 <add_CRC@plt>
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <doit@plt>
movaps 0xdd2(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x300000000,%r14
mov    %r14,0x10(%rsp)
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0xffff,%edx
call   1050 <add_CRC@plt>
lea    0xebf(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <doit@plt>
movaps 0xda2(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xda7(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movl   $0x55,0x20(%rsp)
mov    %rbx,%rdi
mov    $0xb,%esi
mov    $0xffff,%edx
call   1050 <add_CRC@plt>
lea    0xe9f(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <doit@plt>
movaps 0xd7d(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xd82(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movabs $0x10000000b,%rax
mov    %rax,0x20(%rsp)
movl   $0x2,0x28(%rsp)
mov    %rbx,%rdi
mov    $0xd,%esi
mov    $0xffff,%edx
call   1050 <add_CRC@plt>
lea    0xe70(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <doit@plt>
movaps 0xd49(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %r14,0x10(%rsp)
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0xffff,%edx
call   1050 <add_CRC@plt>
lea    0xe5f(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <doit@plt>
xor    %eax,%eax
add    $0x808,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [38 x i8] c"\0AExample 0x01 ---------------------\0A\0A\00"
@.str.1 = [38 x i8] c"\0AExample 0x02 ---------------------\0A\0A\00"
@.str.2 = [38 x i8] c"\0AExample 0x03 ---------------------\0A\0A\00"
@.str.3 = [38 x i8] c"\0AExample 0x04 ---------------------\0A\0A\00"
@.str.4 = [38 x i8] c"\0AExample 0x05 ---------------------\0A\0A\00"
@.str.5 = [38 x i8] c"\0AExample 0x06 ---------------------\0A\0A\00"
@.str.6 = [38 x i8] c"\0AExample 0x0F ---------------------\0A\0A\00"
@.str.7 = [38 x i8] c"\0AExample 0x10 ---------------------\0A\0A\00"
@.str.8 = [50 x i8] c"\0AExample 0x0A bad opcode ---------------------\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [512 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
store i32 5, i32* %7
%8 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 1
store i32 1, i32* %8
%9 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 2
store i32 0, i32* %9
%10 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 3
store i32 153, i32* %10
%11 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 4
store i32 0, i32* %11
%12 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 5
store i32 85, i32* %12
%13 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
%14 = call i32 @add_CRC(i32* %13, i32 8, i32 65535)
%15 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%16 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
%17 = call i32 @doit(i32* %16)
%18 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
store i32 5, i32* %18
%19 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 1
store i32 2, i32* %19
%20 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 2
store i32 0, i32* %20
%21 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 3
store i32 196, i32* %21
%22 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 4
store i32 0, i32* %22
%23 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 5
store i32 22, i32* %23
%24 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
%25 = call i32 @add_CRC(i32* %24, i32 8, i32 65535)
%26 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%27 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
%28 = call i32 @doit(i32* %27)
%29 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
store i32 5, i32* %29
%30 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 1
store i32 3, i32* %30
%31 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 2
store i32 0, i32* %31
%32 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 3
store i32 16, i32* %32
%33 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 4
store i32 0, i32* %33
%34 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 5
store i32 5, i32* %34
%35 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
%36 = call i32 @add_CRC(i32* %35, i32 8, i32 65535)
%37 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%38 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
%39 = call i32 @doit(i32* %38)
%40 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
store i32 5, i32* %40
%41 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 1
store i32 4, i32* %41
%42 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 2
store i32 0, i32* %42
%43 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 3
store i32 18, i32* %43
%44 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 4
store i32 0, i32* %44
%45 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 5
store i32 6, i32* %45
%46 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
%47 = call i32 @add_CRC(i32* %46, i32 8, i32 65535)
%48 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0))
%49 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
%50 = call i32 @doit(i32* %49)
%51 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
store i32 5, i32* %51
%52 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 1
store i32 5, i32* %52
%53 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 2
store i32 0, i32* %53
%54 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 3
store i32 172, i32* %54
%55 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 4
store i32 255, i32* %55
%56 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 5
store i32 0, i32* %56
%57 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
%58 = call i32 @add_CRC(i32* %57, i32 8, i32 65535)
%59 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0))
%60 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
%61 = call i32 @doit(i32* %60)
%62 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
store i32 5, i32* %62
%63 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 1
store i32 6, i32* %63
%64 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 2
store i32 0, i32* %64
%65 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 3
store i32 1, i32* %65
%66 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 4
store i32 0, i32* %66
%67 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 5
store i32 3, i32* %67
%68 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
%69 = call i32 @add_CRC(i32* %68, i32 8, i32 65535)
%70 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0))
%71 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
%72 = call i32 @doit(i32* %71)
%73 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
store i32 5, i32* %73
%74 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 1
store i32 15, i32* %74
%75 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 2
store i32 0, i32* %75
%76 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 3
store i32 19, i32* %76
%77 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 4
store i32 0, i32* %77
%78 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 5
store i32 10, i32* %78
%79 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 6
store i32 2, i32* %79
%80 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 7
store i32 85, i32* %80
%81 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 8
store i32 85, i32* %81
%82 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
%83 = call i32 @add_CRC(i32* %82, i32 11, i32 65535)
%84 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0))
%85 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
%86 = call i32 @doit(i32* %85)
%87 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
store i32 5, i32* %87
%88 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 1
store i32 16, i32* %88
%89 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 2
store i32 0, i32* %89
%90 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 3
store i32 1, i32* %90
%91 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 4
store i32 0, i32* %91
%92 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 5
store i32 2, i32* %92
%93 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 6
store i32 4, i32* %93
%94 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 7
store i32 10, i32* %94
%95 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 8
store i32 11, i32* %95
%96 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 9
store i32 1, i32* %96
%97 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 10
store i32 2, i32* %97
%98 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
%99 = call i32 @add_CRC(i32* %98, i32 13, i32 65535)
%100 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.7, i64 0, i64 0))
%101 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
%102 = call i32 @doit(i32* %101)
%103 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
store i32 5, i32* %103
%104 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 1
store i32 10, i32* %104
%105 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 2
store i32 0, i32* %105
%106 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 3
store i32 1, i32* %106
%107 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 4
store i32 0, i32* %107
%108 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 5
store i32 3, i32* %108
%109 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
%110 = call i32 @add_CRC(i32* %109, i32 8, i32 65535)
%111 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.8, i64 0, i64 0))
%112 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
%113 = call i32 @doit(i32* %112)
ret i32 0
}

LLVM IR (-O2):
@str = [37 x i8] c"\0AExample 0x01 ---------------------\0A\00"
@str.9 = [37 x i8] c"\0AExample 0x02 ---------------------\0A\00"
@str.10 = [37 x i8] c"\0AExample 0x03 ---------------------\0A\00"
@str.11 = [37 x i8] c"\0AExample 0x04 ---------------------\0A\00"
@str.12 = [37 x i8] c"\0AExample 0x05 ---------------------\0A\00"
@str.13 = [37 x i8] c"\0AExample 0x06 ---------------------\0A\00"
@str.14 = [37 x i8] c"\0AExample 0x0F ---------------------\0A\00"
@str.15 = [37 x i8] c"\0AExample 0x10 ---------------------\0A\00"
@str.16 = [49 x i8] c"\0AExample 0x0A bad opcode ---------------------\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [512 x i32]
%4 = bitcast [512 x i32]* %3 to i8*
%5 = getelementptr inbounds [512 x i32], [512 x i32]* %3, i64 0, i64 0
%6 = bitcast [512 x i32]* %3 to <4 x i32>*
store <4 x i32> <i32 5, i32 1, i32 0, i32 153>, <4 x i32>* %6
%7 = getelementptr inbounds [512 x i32], [512 x i32]* %3, i64 0, i64 4
store i32 0, i32* %7
%8 = getelementptr inbounds [512 x i32], [512 x i32]* %3, i64 0, i64 5
store i32 85, i32* %8
%9 = call i32 @add_CRC(i32* %5, i32 8, i32 65535)
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%11 = call i32 @doit(i32* %5)
%12 = bitcast [512 x i32]* %3 to <4 x i32>*
store <4 x i32> <i32 5, i32 2, i32 0, i32 196>, <4 x i32>* %12
store i32 0, i32* %7
store i32 22, i32* %8
%13 = call i32 @add_CRC(i32* %5, i32 8, i32 65535)
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.9, i64 0, i64 0))
%15 = call i32 @doit(i32* %5)
%16 = bitcast [512 x i32]* %3 to <4 x i32>*
store <4 x i32> <i32 5, i32 3, i32 0, i32 16>, <4 x i32>* %16
store i32 0, i32* %7
store i32 5, i32* %8
%17 = call i32 @add_CRC(i32* %5, i32 8, i32 65535)
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.10, i64 0, i64 0))
%19 = call i32 @doit(i32* %5)
%20 = bitcast [512 x i32]* %3 to <4 x i32>*
store <4 x i32> <i32 5, i32 4, i32 0, i32 18>, <4 x i32>* %20
store i32 0, i32* %7
store i32 6, i32* %8
%21 = call i32 @add_CRC(i32* %5, i32 8, i32 65535)
%22 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.11, i64 0, i64 0))
%23 = call i32 @doit(i32* %5)
%24 = bitcast [512 x i32]* %3 to <4 x i32>*
store <4 x i32> <i32 5, i32 5, i32 0, i32 172>, <4 x i32>* %24
store i32 255, i32* %7
store i32 0, i32* %8
%25 = call i32 @add_CRC(i32* %5, i32 8, i32 65535)
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.12, i64 0, i64 0))
%27 = call i32 @doit(i32* %5)
%28 = bitcast [512 x i32]* %3 to <4 x i32>*
store <4 x i32> <i32 5, i32 6, i32 0, i32 1>, <4 x i32>* %28
store i32 0, i32* %7
store i32 3, i32* %8
%29 = call i32 @add_CRC(i32* %5, i32 8, i32 65535)
%30 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.13, i64 0, i64 0))
%31 = call i32 @doit(i32* %5)
%32 = bitcast [512 x i32]* %3 to <4 x i32>*
store <4 x i32> <i32 5, i32 15, i32 0, i32 19>, <4 x i32>* %32
%33 = bitcast i32* %7 to <4 x i32>*
store <4 x i32> <i32 0, i32 10, i32 2, i32 85>, <4 x i32>* %33
%34 = getelementptr inbounds [512 x i32], [512 x i32]* %3, i64 0, i64 8
store i32 85, i32* %34
%35 = call i32 @add_CRC(i32* %5, i32 11, i32 65535)
%36 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.14, i64 0, i64 0))
%37 = call i32 @doit(i32* %5)
%38 = bitcast [512 x i32]* %3 to <4 x i32>*
store <4 x i32> <i32 5, i32 16, i32 0, i32 1>, <4 x i32>* %38
%39 = bitcast i32* %7 to <4 x i32>*
store <4 x i32> <i32 0, i32 2, i32 4, i32 10>, <4 x i32>* %39
store i32 11, i32* %34
%40 = getelementptr inbounds [512 x i32], [512 x i32]* %3, i64 0, i64 9
store i32 1, i32* %40
%41 = getelementptr inbounds [512 x i32], [512 x i32]* %3, i64 0, i64 10
store i32 2, i32* %41
%42 = call i32 @add_CRC(i32* %5, i32 13, i32 65535)
%43 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.15, i64 0, i64 0))
%44 = call i32 @doit(i32* %5)
%45 = bitcast [512 x i32]* %3 to <4 x i32>*
store <4 x i32> <i32 5, i32 10, i32 0, i32 1>, <4 x i32>* %45
store i32 0, i32* %7
store i32 3, i32* %8
%46 = call i32 @add_CRC(i32* %5, i32 8, i32 65535)
%47 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.16, i64 0, i64 0))
%48 = call i32 @doit(i32* %5)
ret i32 0
}