#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*/ err7;
typedef int /*<<< orphan*/ err6;
typedef int /*<<< orphan*/ err5;
typedef int /*<<< orphan*/ err4;
typedef int /*<<< orphan*/ err3;
typedef int /*<<< orphan*/ err2;
typedef int /*<<< orphan*/ err1;

/* Variables and functions */
int /*<<< orphan*/ sg_print_sense(char *, unsigned char *, int, int);
int main() {
  unsigned char err1[] = {
      0x72, 0x5, 0x4, 0x1, 0,    0, 0, 32, 0x2,  0x6,  0,    0,    0xc8, 0x0,
      0x3,  0,   0,   0xa, 0x80, 0, 1, 2,  3,    4,    0xaa, 0xbb, 0xcc, 0xdd,
      1,    0xa, 0,   0,   1,    2, 3, 4,  0xaa, 0xbb, 0xcc, 0xdd};
  unsigned char err2[] = {
      0x72, 0x3, 0x4, 0x1, 0,    0, 0, 32, 0x2,  0x6,  0,    0,    0xc8, 0x0,
      0x3,  0,   0,   0xa, 0x80, 0, 1, 2,  3,    4,    0xaa, 0xbb, 0xcc, 0xdd,
      1,    0xa, 0,   0,   1,    2, 3, 4,  0xaa, 0xbb, 0xcc, 0xdd};
  unsigned char err3[] = {0x72, 0x0, 0x4, 0x1, 0,    0,   0,   8,
                          0x2,  0x6, 0,   0,   0xc8, 0x0, 0x3, 0};
  unsigned char err4[] = {0x73, 0xa, 0x4, 0x1,  0,    0,   0,   22,
                          0x2,  0x6, 0,   0,    0xc8, 0x0, 0x3, 0,
                          0x3,  0x2, 0,   0x55, 0x5,  0x2, 0,   0x20,
                          0x85, 0x4, 0,   0x20, 0x33, 0x44};
  unsigned char err5[] = {
      0xf1, 0, (0xf0 | 0x5), 0x11, 0x22, 0x33, 0x44, 0xa, 0x0, 0x0,
      0,    0, 0x4,          0x1,  0,    0xcf, 0,    5,
  };
  unsigned char err6[] = {0x72, 0x0,  0x4,  0x1,  0,    0,    0,    14,
                          0x9,  0xc,  1,    0,    0x11, 0x22, 0x66, 0x33,
                          0x77, 0x44, 0x88, 0x55, 0x1,  0x2};
  unsigned char err7[] = {0xf1, 0,   0xe5, 0x11, 0x22, 0x33, 0x44, 0xa, 0x0,
                          0x0,  0x0, 0x0,  0x24, 0x1,  0xbb, 0xc9, 0x0, 0x2};
  sg_print_sense("err1 test", err1, sizeof(err1), 1);
  sg_print_sense("\nerr2 test", err2, sizeof(err2), 1);
  sg_print_sense("\nerr3 test", err3, sizeof(err3), 1);
  sg_print_sense("\nerr4 test", err4, sizeof(err4), 1);
  sg_print_sense("\nerr5 test", err5, sizeof(err5), 1);
  sg_print_sense("\nerr6 test", err6, sizeof(err6), 1);
  sg_print_sense("\nerr7 test", err7, sizeof(err7), 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xec3(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x60(%rbp),%rdi
lea    0xede(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
mov    0xf7d(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xf7a(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xee7(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0xee1(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xed9(%rip),%eax
mov    %eax,-0x78(%rbp)
mov    0xed3(%rip),%ax
mov    %ax,-0x74(%rbp)
mov    0xecc(%rip),%rax
mov    %rax,-0xb0(%rbp)
mov    0xec6(%rip),%rax
mov    %rax,-0xa8(%rbp)
mov    0xec0(%rip),%ax
mov    %ax,-0xa0(%rbp)
mov    0xec2(%rip),%rax
mov    %rax,-0xd0(%rbp)
mov    0xebc(%rip),%rax
mov    %rax,-0xc8(%rbp)
mov    0xeb7(%rip),%eax
mov    %eax,-0xc0(%rbp)
mov    0xeae(%rip),%ax
mov    %ax,-0xbc(%rbp)
mov    0xeac(%rip),%rax
mov    %rax,-0xf0(%rbp)
mov    0xea6(%rip),%rax
mov    %rax,-0xe8(%rbp)
mov    0xea0(%rip),%ax
mov    %ax,-0xe0(%rbp)
lea    -0x30(%rbp),%rsi
lea    0xeae(%rip),%rdi
mov    $0x28,%edx
mov    $0x1,%ecx
call   1030 <sg_print_sense@plt>
lea    -0x60(%rbp),%rsi
lea    0xe9e(%rip),%rdi
mov    $0x28,%edx
mov    $0x1,%ecx
call   1030 <sg_print_sense@plt>
lea    -0x70(%rbp),%rsi
lea    0xe8f(%rip),%rdi
mov    $0x10,%edx
mov    $0x1,%ecx
call   1030 <sg_print_sense@plt>
lea    -0x90(%rbp),%rsi
lea    0xe7d(%rip),%rdi
mov    $0x1e,%edx
mov    $0x1,%ecx
call   1030 <sg_print_sense@plt>
lea    -0xb0(%rbp),%rsi
lea    0xe6b(%rip),%rdi
mov    $0x12,%edx
mov    $0x1,%ecx
call   1030 <sg_print_sense@plt>
lea    -0xd0(%rbp),%rsi
lea    0xe59(%rip),%rdi
mov    $0x16,%edx
mov    $0x1,%ecx
call   1030 <sg_print_sense@plt>
lea    -0xf0(%rbp),%rsi
lea    0xe47(%rip),%rdi
mov    $0x12,%edx
mov    $0x1,%ecx
call   1030 <sg_print_sense@plt>
xor    %eax,%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0xe8,%rsp
movaps 0xef2(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps 0xed3(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movabs $0xddccbbaa04030201,%rax
bb cc dd
mov    %rax,0xe0(%rsp)
movaps 0xef2(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xed3(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
mov    %rax,0xb0(%rsp)
movaps 0xf6c(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movups 0xeee(%rip),%xmm0
movups %xmm0,0x7e(%rsp)
movaps 0xed4(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xee8(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movw   $0x500,0x30(%rsp)
movabs $0x201558844773366,%rax
55 01 02
mov    %rax,0x4e(%rsp)
movaps 0xee6(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xefa(%rip),%xmm0
movaps %xmm0,(%rsp)
movw   $0x200,0x10(%rsp)
lea    0xf18(%rip),%rdi
lea    0xc0(%rsp),%rsi
mov    $0x28,%edx
mov    $0x1,%ecx
call   1030 <sg_print_sense@plt>
lea    0xf04(%rip),%rdi
lea    0x90(%rsp),%rsi
mov    $0x28,%edx
mov    $0x1,%ecx
call   1030 <sg_print_sense@plt>
lea    0xef1(%rip),%rdi
lea    0x60(%rsp),%rsi
mov    $0x10,%edx
mov    $0x1,%ecx
call   1030 <sg_print_sense@plt>
lea    0xee1(%rip),%rdi
lea    0x70(%rsp),%rsi
mov    $0x1e,%edx
mov    $0x1,%ecx
call   1030 <sg_print_sense@plt>
lea    0xed1(%rip),%rdi
lea    0x20(%rsp),%rsi
mov    $0x12,%edx
mov    $0x1,%ecx
call   1030 <sg_print_sense@plt>
lea    0xec1(%rip),%rdi
lea    0x40(%rsp),%rsi
mov    $0x16,%edx
mov    $0x1,%ecx
call   1030 <sg_print_sense@plt>
lea    0xeb1(%rip),%rdi
mov    %rsp,%rsi
mov    $0x12,%edx
mov    $0x1,%ecx
call   1030 <sg_print_sense@plt>
xor    %eax,%eax
add    $0xe8,%rsp
ret

LLVM IR (-O0):
@__const.main.err1 = [40 x i8] c"r\05\04\01\00\00\00 \02\06\00\00\C8\00\03\00\00\0A\80\00\01\02\03\04\AA\BB\CC\DD\01\0A\00\00\01\02\03\04\AA\BB\CC\DD"
@__const.main.err2 = [40 x i8] c"r\03\04\01\00\00\00 \02\06\00\00\C8\00\03\00\00\0A\80\00\01\02\03\04\AA\BB\CC\DD\01\0A\00\00\01\02\03\04\AA\BB\CC\DD"
@__const.main.err3 = [16 x i8] c"r\00\04\01\00\00\00\08\02\06\00\00\C8\00\03\00"
@__const.main.err4 = [30 x i8] c"s\0A\04\01\00\00\00\16\02\06\00\00\C8\00\03\00\03\02\00U\05\02\00 \85\04\00 3D"
@__const.main.err5 = [18 x i8] c"\F1\00\F5\11\223D\0A\00\00\00\00\04\01\00\CF\00\05"
@__const.main.err6 = [22 x i8] c"r\00\04\01\00\00\00\0E\09\0C\01\00\11\22f3wD\88U\01\02"
@__const.main.err7 = [18 x i8] c"\F1\00\E5\11\223D\0A\00\00\00\00$\01\BB\C9\00\02"
@.str = [10 x i8] c"err1 test\00"
@.str.1 = [11 x i8] c"\0Aerr2 test\00"
@.str.2 = [11 x i8] c"\0Aerr3 test\00"
@.str.3 = [11 x i8] c"\0Aerr4 test\00"
@.str.4 = [11 x i8] c"\0Aerr5 test\00"
@.str.5 = [11 x i8] c"\0Aerr6 test\00"
@.str.6 = [11 x i8] c"\0Aerr7 test\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [40 x i8]
%3 = alloca [40 x i8]
%4 = alloca [16 x i8]
%5 = alloca [30 x i8]
%6 = alloca [18 x i8]
%7 = alloca [22 x i8]
%8 = alloca [18 x i8]
store i32 0, i32* %1
%9 = bitcast [40 x i8]* %2 to i8*
%10 = bitcast [40 x i8]* %3 to i8*
%11 = bitcast [16 x i8]* %4 to i8*
%12 = bitcast [30 x i8]* %5 to i8*
%13 = bitcast [18 x i8]* %6 to i8*
%14 = bitcast [22 x i8]* %7 to i8*
%15 = bitcast [18 x i8]* %8 to i8*
%16 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%17 = call i32 @sg_print_sense(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %16, i32 40, i32 1)
%18 = getelementptr inbounds [40 x i8], [40 x i8]* %3, i64 0, i64 0
%19 = call i32 @sg_print_sense(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %18, i32 40, i32 1)
%20 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%21 = call i32 @sg_print_sense(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %20, i32 16, i32 1)
%22 = getelementptr inbounds [30 x i8], [30 x i8]* %5, i64 0, i64 0
%23 = call i32 @sg_print_sense(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* %22, i32 30, i32 1)
%24 = getelementptr inbounds [18 x i8], [18 x i8]* %6, i64 0, i64 0
%25 = call i32 @sg_print_sense(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* %24, i32 18, i32 1)
%26 = getelementptr inbounds [22 x i8], [22 x i8]* %7, i64 0, i64 0
%27 = call i32 @sg_print_sense(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* %26, i32 22, i32 1)
%28 = getelementptr inbounds [18 x i8], [18 x i8]* %8, i64 0, i64 0
%29 = call i32 @sg_print_sense(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i8* %28, i32 18, i32 1)
ret i32 0
}

LLVM IR (-O2):
@__const.main.err1 = [40 x i8] c"r\05\04\01\00\00\00 \02\06\00\00\C8\00\03\00\00\0A\80\00\01\02\03\04\AA\BB\CC\DD\01\0A\00\00\01\02\03\04\AA\BB\CC\DD"
@__const.main.err2 = [40 x i8] c"r\03\04\01\00\00\00 \02\06\00\00\C8\00\03\00\00\0A\80\00\01\02\03\04\AA\BB\CC\DD\01\0A\00\00\01\02\03\04\AA\BB\CC\DD"
@__const.main.err3 = [16 x i8] c"r\00\04\01\00\00\00\08\02\06\00\00\C8\00\03\00"
@__const.main.err4 = [30 x i8] c"s\0A\04\01\00\00\00\16\02\06\00\00\C8\00\03\00\03\02\00U\05\02\00 \85\04\00 3D"
@__const.main.err5 = [18 x i8] c"\F1\00\F5\11\223D\0A\00\00\00\00\04\01\00\CF\00\05"
@__const.main.err6 = [22 x i8] c"r\00\04\01\00\00\00\0E\09\0C\01\00\11\22f3wD\88U\01\02"
@__const.main.err7 = [18 x i8] c"\F1\00\E5\11\223D\0A\00\00\00\00$\01\BB\C9\00\02"
@.str = [10 x i8] c"err1 test\00"
@.str.1 = [11 x i8] c"\0Aerr2 test\00"
@.str.2 = [11 x i8] c"\0Aerr3 test\00"
@.str.3 = [11 x i8] c"\0Aerr4 test\00"
@.str.4 = [11 x i8] c"\0Aerr5 test\00"
@.str.5 = [11 x i8] c"\0Aerr6 test\00"
@.str.6 = [11 x i8] c"\0Aerr7 test\00"
define i32 @main() {
%1 = alloca [40 x i8]
%2 = alloca [40 x i8]
%3 = alloca [16 x i8]
%4 = alloca [30 x i8]
%5 = alloca [18 x i8]
%6 = alloca [22 x i8]
%7 = alloca [18 x i8]
%8 = getelementptr inbounds [40 x i8], [40 x i8]* %1, i64 0, i64 0
%9 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%10 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%11 = getelementptr inbounds [30 x i8], [30 x i8]* %4, i64 0, i64 0
%12 = getelementptr inbounds [18 x i8], [18 x i8]* %5, i64 0, i64 0
%13 = getelementptr inbounds [22 x i8], [22 x i8]* %6, i64 0, i64 0
%14 = getelementptr inbounds [18 x i8], [18 x i8]* %7, i64 0, i64 0
%15 = call i32 @sg_print_sense(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %8, i32 40, i32 1)
%16 = call i32 @sg_print_sense(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %9, i32 40, i32 1)
%17 = call i32 @sg_print_sense(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %10, i32 16, i32 1)
%18 = call i32 @sg_print_sense(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* %11, i32 30, i32 1)
%19 = call i32 @sg_print_sense(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* %12, i32 18, i32 1)
%20 = call i32 @sg_print_sense(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* %13, i32 22, i32 1)
%21 = call i32 @sg_print_sense(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i8* %14, i32 18, i32 1)
ret i32 0
}