#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 /*<<< orphan*/ assert(int);
int barcode(int *);
int /*<<< orphan*/ printf(char *);
void test(void) {
  int t[12] = {0, 7, 9, 4, 0, 0, 8, 0, 4, 5, 0, 1};
  int u[12] = {0, 2, 4, 0, 0, 0, 1, 6, 2, 8, 6, 0};
  int v[12] = {0, 1, 1, 1, 1, 0, 8, 5, 6, 8, 0, 7};
  int w[12] = {0, 5, 1, 0, 0, 0, 1, 3, 8, 1, 0, 1};
  int x[12] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
  assert(barcode(t));
  assert(!barcode(u));
  assert(barcode(v));
  assert(barcode(w));
  assert(barcode(x));
  printf("All tests passed\n");
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
lea    -0x30(%rbp),%rdi
lea    0xe9a(%rip),%rsi
mov    $0x30,%edx
call   1060 <memcpy@plt>
lea    -0x60(%rbp),%rdi
lea    0xeb5(%rip),%rsi
mov    $0x30,%edx
call   1060 <memcpy@plt>
lea    -0x90(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x30,%edx
call   1060 <memcpy@plt>
lea    -0xc0(%rbp),%rdi
lea    0xee5(%rip),%rsi
mov    $0x30,%edx
call   1060 <memcpy@plt>
lea    -0xf0(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1040 <memset@plt>
lea    -0x30(%rbp),%rdi
call   1070 <barcode@plt>
mov    %eax,%edi
call   1050 <assert@plt>
lea    -0x60(%rbp),%rdi
call   1070 <barcode@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0x90(%rbp),%rdi
call   1070 <barcode@plt>
mov    %eax,%edi
call   1050 <assert@plt>
lea    -0xc0(%rbp),%rdi
call   1070 <barcode@plt>
mov    %eax,%edi
call   1050 <assert@plt>
lea    -0xf0(%rbp),%rdi
call   1070 <barcode@plt>
mov    %eax,%edi
call   1050 <assert@plt>
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
sub    $0xf8,%rsp
movaps 0xee2(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0xec3(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps 0xea4(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0xec6(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xea7(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xee8(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xead(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xef1(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xed5(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xeb9(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0xc0(%rsp),%rdi
call   1050 <barcode@plt>
mov    %eax,%edi
call   1040 <assert@plt>
lea    0x90(%rsp),%rdi
call   1050 <barcode@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
lea    0x60(%rsp),%rdi
call   1050 <barcode@plt>
mov    %eax,%edi
call   1040 <assert@plt>
lea    0x30(%rsp),%rdi
call   1050 <barcode@plt>
mov    %eax,%edi
call   1040 <assert@plt>
mov    %rsp,%rdi
call   1050 <barcode@plt>
mov    %eax,%edi
call   1040 <assert@plt>
lea    0xe6d(%rip),%rdi
call   1030 <puts@plt>
add    $0xf8,%rsp
ret

LLVM IR (-O0):
@__const.test.t = [12 x i32] [i32 0, i32 7, i32 9, i32 4, i32 0, i32 0, i32 8, i32 0, i32 4, i32 5, i32 0, i32 1]
@__const.test.u = [12 x i32] [i32 0, i32 2, i32 4, i32 0, i32 0, i32 0, i32 1, i32 6, i32 2, i32 8, i32 6, i32 0]
@__const.test.v = [12 x i32] [i32 0, i32 1, i32 1, i32 1, i32 1, i32 0, i32 8, i32 5, i32 6, i32 8, i32 0, i32 7]
@__const.test.w = [12 x i32] [i32 0, i32 5, i32 1, i32 0, i32 0, i32 0, i32 1, i32 3, i32 8, i32 1, i32 0, i32 1]
@.str = [18 x i8] c"All tests passed\0A\00"
define void @test() {
%1 = alloca [12 x i32]
%2 = alloca [12 x i32]
%3 = alloca [12 x i32]
%4 = alloca [12 x i32]
%5 = alloca [12 x i32]
%6 = bitcast [12 x i32]* %1 to i8*
%7 = bitcast [12 x i32]* %2 to i8*
%8 = bitcast [12 x i32]* %3 to i8*
%9 = bitcast [12 x i32]* %4 to i8*
%10 = bitcast [12 x i32]* %5 to i8*
%11 = getelementptr inbounds [12 x i32], [12 x i32]* %1, i64 0, i64 0
%12 = call i32 @barcode(i32* %11)
%13 = call i32 @assert(i32 %12)
%14 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 0
%15 = call i32 @barcode(i32* %14)
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
%20 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%21 = call i32 @barcode(i32* %20)
%22 = call i32 @assert(i32 %21)
%23 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 0
%24 = call i32 @barcode(i32* %23)
%25 = call i32 @assert(i32 %24)
%26 = getelementptr inbounds [12 x i32], [12 x i32]* %5, i64 0, i64 0
%27 = call i32 @barcode(i32* %26)
%28 = call i32 @assert(i32 %27)
%29 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__const.test.t = [12 x i32] [i32 0, i32 7, i32 9, i32 4, i32 0, i32 0, i32 8, i32 0, i32 4, i32 5, i32 0, i32 1]
@__const.test.u = [12 x i32] [i32 0, i32 2, i32 4, i32 0, i32 0, i32 0, i32 1, i32 6, i32 2, i32 8, i32 6, i32 0]
@__const.test.v = [12 x i32] [i32 0, i32 1, i32 1, i32 1, i32 1, i32 0, i32 8, i32 5, i32 6, i32 8, i32 0, i32 7]
@__const.test.w = [12 x i32] [i32 0, i32 5, i32 1, i32 0, i32 0, i32 0, i32 1, i32 3, i32 8, i32 1, i32 0, i32 1]
@str = [17 x i8] c"All tests passed\00"
define void @test() {
%1 = alloca [12 x i32]
%2 = alloca [12 x i32]
%3 = alloca [12 x i32]
%4 = alloca [12 x i32]
%5 = alloca [12 x i32]
%6 = bitcast [12 x i32]* %1 to i8*
%7 = bitcast [12 x i32]* %2 to i8*
%8 = bitcast [12 x i32]* %3 to i8*
%9 = bitcast [12 x i32]* %4 to i8*
%10 = bitcast [12 x i32]* %5 to i8*
%11 = getelementptr inbounds [12 x i32], [12 x i32]* %1, i64 0, i64 0
%12 = call i32 @barcode(i32* %11)
%13 = call i32 @assert(i32 %12)
%14 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 0
%15 = call i32 @barcode(i32* %14)
%16 = icmp eq i32 %15, 0
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%20 = call i32 @barcode(i32* %19)
%21 = call i32 @assert(i32 %20)
%22 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 0
%23 = call i32 @barcode(i32* %22)
%24 = call i32 @assert(i32 %23)
%25 = getelementptr inbounds [12 x i32], [12 x i32]* %5, i64 0, i64 0
%26 = call i32 @barcode(i32* %25)
%27 = call i32 @assert(i32 %26)
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}