#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*/ array4;
typedef int /*<<< orphan*/ array3;
typedef int /*<<< orphan*/ array2;
typedef int /*<<< orphan*/ array1;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int element_odd_times(int *, int);
int main() {
  int array1[] = {12, 3, 4, 4, 3, 1, 1};
  int len1 = sizeof(array1) / sizeof(*array1);
  assert(12 == element_odd_times(array1, len1));
  int array2[] = {12, 12, 12, 3, 4, 4, 3, 1, 1};
  int len2 = sizeof(array2) / sizeof(*array2);
  assert(12 == element_odd_times(array2, len2));
  int array3[] = {-12, -12, -12, -3, -4, -4, -3, -1, -1};
  int len3 = sizeof(array3) / sizeof(*array3);
  assert(-12 == element_odd_times(array3, len3));
  int array4[] = {12};
  int len4 = sizeof(array4) / sizeof(*array4);
  assert(12 == element_odd_times(array4, len4));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb4(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xeaf(%rip),%eax
mov    %eax,-0x8(%rbp)
movl   $0x7,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1050 <element_odd_times@plt>
mov    %eax,%ecx
mov    $0xc,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
lea    -0x50(%rbp),%rdi
lea    0xe80(%rip),%rsi
mov    $0x24,%edx
call   1040 <memcpy@plt>
movl   $0x9,-0x54(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x54(%rbp),%esi
call   1050 <element_odd_times@plt>
mov    %eax,%ecx
mov    $0xc,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
lea    -0x80(%rbp),%rdi
lea    0xe72(%rip),%rsi
mov    $0x24,%edx
call   1040 <memcpy@plt>
movl   $0x9,-0x84(%rbp)
lea    -0x80(%rbp),%rdi
mov    -0x84(%rbp),%esi
call   1050 <element_odd_times@plt>
mov    %eax,%ecx
mov    $0xfffffff4,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0xe57(%rip),%eax
mov    %eax,-0x88(%rbp)
movl   $0x1,-0x8c(%rbp)
lea    -0x88(%rbp),%rdi
mov    -0x8c(%rbp),%esi
call   1050 <element_odd_times@plt>
mov    %eax,%ecx
mov    $0xc,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x98,%rsp
movups 0xede(%rip),%xmm0
movups %xmm0,0x7c(%rsp)
movaps 0xec6(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
lea    0x70(%rsp),%rdi
mov    $0x7,%esi
call   1040 <element_odd_times@plt>
xor    %edi,%edi
cmp    $0xc,%eax
sete   %dil
call   1030 <assert@plt>
mov    0xede(%rip),%eax
mov    %eax,0x60(%rsp)
movaps 0xec3(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xea7(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
lea    0x40(%rsp),%rdi
mov    $0x9,%esi
call   1040 <element_odd_times@plt>
xor    %edi,%edi
cmp    $0xc,%eax
sete   %dil
call   1030 <assert@plt>
mov    0xecf(%rip),%eax
mov    %eax,0x30(%rsp)
movaps 0xeb4(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xe98(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0x10(%rsp),%rdi
mov    $0x9,%esi
call   1040 <element_odd_times@plt>
xor    %edi,%edi
cmp    $0xfffffff4,%eax
sete   %dil
call   1030 <assert@plt>
movl   $0xc,0xc(%rsp)
lea    0xc(%rsp),%rdi
mov    $0x1,%esi
call   1040 <element_odd_times@plt>
xor    %edi,%edi
cmp    $0xc,%eax
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x98,%rsp
ret

LLVM IR (-O0):
@__const.main.array1 = [7 x i32] [i32 12, i32 3, i32 4, i32 4, i32 3, i32 1, i32 1]
@__const.main.array2 = [9 x i32] [i32 12, i32 12, i32 12, i32 3, i32 4, i32 4, i32 3, i32 1, i32 1]
@__const.main.array3 = [9 x i32] [i32 -12, i32 -12, i32 -12, i32 -3, i32 -4, i32 -4, i32 -3, i32 -1, i32 -1]
@__const.main.array4 = [1 x i32] [i32 12]
define i32 @main() {
%1 = alloca i32
%2 = alloca [7 x i32]
%3 = alloca i32
%4 = alloca [9 x i32]
%5 = alloca i32
%6 = alloca [9 x i32]
%7 = alloca i32
%8 = alloca [1 x i32]
%9 = alloca i32
store i32 0, i32* %1
%10 = bitcast [7 x i32]* %2 to i8*
store i32 7, i32* %3
%11 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 0
%12 = load i32, i32* %3
%13 = call i32 @element_odd_times(i32* %11, i32 %12)
%14 = icmp eq i32 12, %13
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = bitcast [9 x i32]* %4 to i8*
store i32 9, i32* %5
%18 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 0
%19 = load i32, i32* %5
%20 = call i32 @element_odd_times(i32* %18, i32 %19)
%21 = icmp eq i32 12, %20
%22 = zext i1 %21 to i32
%23 = call i32 @assert(i32 %22)
%24 = bitcast [9 x i32]* %6 to i8*
store i32 9, i32* %7
%25 = getelementptr inbounds [9 x i32], [9 x i32]* %6, i64 0, i64 0
%26 = load i32, i32* %7
%27 = call i32 @element_odd_times(i32* %25, i32 %26)
%28 = icmp eq i32 -12, %27
%29 = zext i1 %28 to i32
%30 = call i32 @assert(i32 %29)
%31 = bitcast [1 x i32]* %8 to i8*
store i32 1, i32* %9
%32 = getelementptr inbounds [1 x i32], [1 x i32]* %8, i64 0, i64 0
%33 = load i32, i32* %9
%34 = call i32 @element_odd_times(i32* %32, i32 %33)
%35 = icmp eq i32 12, %34
%36 = zext i1 %35 to i32
%37 = call i32 @assert(i32 %36)
ret i32 0
}

LLVM IR (-O2):
@__const.main.array1 = [7 x i32] [i32 12, i32 3, i32 4, i32 4, i32 3, i32 1, i32 1]
@__const.main.array2 = [9 x i32] [i32 12, i32 12, i32 12, i32 3, i32 4, i32 4, i32 3, i32 1, i32 1]
@__const.main.array3 = [9 x i32] [i32 -12, i32 -12, i32 -12, i32 -3, i32 -4, i32 -4, i32 -3, i32 -1, i32 -1]
define i32 @main() {
%1 = alloca [7 x i32]
%2 = alloca [9 x i32]
%3 = alloca [9 x i32]
%4 = alloca [1 x i32]
%5 = bitcast [7 x i32]* %1 to i8*
%6 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 0
%7 = call i32 @element_odd_times(i32* %6, i32 7)
%8 = icmp eq i32 %7, 12
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = bitcast [9 x i32]* %2 to i8*
%12 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 0, i64 0
%13 = call i32 @element_odd_times(i32* %12, i32 9)
%14 = icmp eq i32 %13, 12
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = bitcast [9 x i32]* %3 to i8*
%18 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 0
%19 = call i32 @element_odd_times(i32* %18, i32 9)
%20 = icmp eq i32 %19, -12
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
%23 = bitcast [1 x i32]* %4 to i8*
%24 = getelementptr inbounds [1 x i32], [1 x i32]* %4, i64 0, i64 0
store i32 12, i32* %24
%25 = call i32 @element_odd_times(i32* %24, i32 1)
%26 = icmp eq i32 %25, 12
%27 = zext i1 %26 to i32
%28 = call i32 @assert(i32 %27)
ret i32 0
}