#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*/ abort();
int /*<<< orphan*/ check_vect();
int condition_reduction(int *, int);
int main(void) {
  int a[27] = {11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1,  2,  3, 4,
               5,  6,  7,  8,  9,  10, 21, 22, 23, 24, 25, 26, 27};
  check_vect();
  int ret = condition_reduction(a, 46);
  if (ret != 27 + 96)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xea3(%rip),%rsi
mov    $0x6c,%edx
call   1050 <memcpy@plt>
mov    $0x0,%al
call   1040 <check_vect@plt>
lea    -0x70(%rbp),%rdi
mov    $0x2e,%esi
call   1060 <condition_reduction@plt>
mov    %eax,-0x74(%rbp)
cmpl   $0x7b,-0x74(%rbp)
je     1190 <main+0x50>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x78,%rsp
movups 0xf21(%rip),%xmm0
movups %xmm0,0x5c(%rsp)
movaps 0xf09(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xeed(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xed1(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xeb5(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xe99(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe7d(%rip),%xmm0
movaps %xmm0,(%rsp)
xor    %eax,%eax
call   1040 <check_vect@plt>
mov    %rsp,%rdi
mov    $0x2e,%esi
call   1050 <condition_reduction@plt>
cmp    $0x7b,%eax
jne    11a7 <main+0x77>
xor    %eax,%eax
add    $0x78,%rsp
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@__const.main.a = [27 x i32] [i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27]
define i32 @main() {
%1 = alloca i32
%2 = alloca [27 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [27 x i32]* %2 to i8*
%5 = call i32 (...) @check_vect()
%6 = getelementptr inbounds [27 x i32], [27 x i32]* %2, i64 0, i64 0
%7 = call i32 @condition_reduction(i32* %6, i32 46)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = icmp ne i32 %8, 123
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [27 x i32] [i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27]
define i32 @main() {
%1 = alloca [27 x i32]
%2 = bitcast [27 x i32]* %1 to i8*
%3 = tail call i32 (...) @check_vect()
%4 = getelementptr inbounds [27 x i32], [27 x i32]* %1, i64 0, i64 0
%5 = call i32 @condition_reduction(i32* %4, i32 46)
%6 = icmp eq i32 %5, 123
br i1 %6, label %9, label %7
7: ; preds = %0
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %0
ret i32 0
}