#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();
unsigned int condition_reduction(unsigned int *, int, unsigned int *);
int main(void) {
  unsigned int a[37] = {31, 32, 33, 34, 35, 36, 37, 1,  2,  3,  4,  5,  6,
                        7,  8,  9,  10, 21, 22, 23, 24, 25, 26, 27, 28, 29,
                        30, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20};
  unsigned int b[37] = {11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
                        24, 25, 26, 27, 28, 29, 30, 1,  2,  3,  4,  5,  6,
                        7,  8,  9,  10, 31, 32, 33, 34, 35, 36, 37};
  unsigned int ret = condition_reduction(a, 16, b);
  if (ret != 13)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xa0(%rbp),%rdi
lea    0xeb0(%rip),%rsi
mov    $0x94,%edx
call   1040 <memcpy@plt>
lea    -0x140(%rbp),%rdi
lea    0xf38(%rip),%rsi
mov    $0x94,%edx
call   1040 <memcpy@plt>
lea    -0xa0(%rbp),%rdi
lea    -0x140(%rbp),%rdx
mov    $0x10,%esi
call   1050 <condition_reduction@plt>
mov    %eax,-0x144(%rbp)
cmpl   $0xd,-0x144(%rbp)
je     11a4 <main+0x74>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x138,%rsp
lea    0xebf(%rip),%rsi
lea    0xa0(%rsp),%r14
mov    $0x94,%edx
mov    %r14,%rdi
call   1040 <memcpy@plt>
lea    0xf43(%rip),%rsi
mov    %rsp,%rbx
mov    $0x94,%edx
mov    %rbx,%rdi
call   1040 <memcpy@plt>
mov    %r14,%rdi
mov    $0x10,%esi
mov    %rbx,%rdx
call   1050 <condition_reduction@plt>
cmp    $0xd,%eax
jne    118f <main+0x5f>
xor    %eax,%eax
add    $0x138,%rsp
pop    %rbx
pop    %r14
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@__const.main.a = [37 x i32] [i32 31, i32 32, i32 33, i32 34, i32 35, i32 36, i32 37, 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, i32 28, i32 29, i32 30, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20]
@__const.main.b = [37 x i32] [i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 31, i32 32, i32 33, i32 34, i32 35, i32 36, i32 37]
define i32 @main() {
%1 = alloca i32
%2 = alloca [37 x i32]
%3 = alloca [37 x i32]
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [37 x i32]* %2 to i8*
%6 = bitcast [37 x i32]* %3 to i8*
%7 = getelementptr inbounds [37 x i32], [37 x i32]* %2, i64 0, i64 0
%8 = getelementptr inbounds [37 x i32], [37 x i32]* %3, i64 0, i64 0
%9 = call i32 @condition_reduction(i32* %7, i32 16, i32* %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = icmp ne i32 %10, 13
br i1 %11, label %12, label %14
12: ; preds = %0
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [37 x i32] [i32 31, i32 32, i32 33, i32 34, i32 35, i32 36, i32 37, 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, i32 28, i32 29, i32 30, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20]
@__const.main.b = [37 x i32] [i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 31, i32 32, i32 33, i32 34, i32 35, i32 36, i32 37]
define i32 @main() {
%1 = alloca [37 x i32]
%2 = alloca [37 x i32]
%3 = bitcast [37 x i32]* %1 to i8*
%4 = bitcast [37 x i32]* %2 to i8*
%5 = getelementptr inbounds [37 x i32], [37 x i32]* %1, i64 0, i64 0
%6 = getelementptr inbounds [37 x i32], [37 x i32]* %2, i64 0, i64 0
%7 = call i32 @condition_reduction(i32* %5, i32 16, i32* %6)
%8 = icmp eq i32 %7, 13
br i1 %8, label %11, label %9
9: ; preds = %0
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %0
ret i32 0
}