#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();
void test_reductions_bool(void) {
  const int n = 1000;
  int i;
  int array[n];
  int cmp_val;
  for (i = 0; i < n; i++)
    array[i] = i;
  cmp_val = 5;
  {
    int res, vres;
    res = (1);
#pragma acc parallel num_gangs(ng) copy(res)

#pragma acc loop gang reduction(&& : res)
    for (i = 0; i < n; i++)
      res = res && ((cmp_val > array[i]));
    vres = (1);
    for (i = 0; i < n; i++)
      vres = vres && ((cmp_val > array[i]));
    if (res != vres)
      abort();
  };
  {
    int res, vres;
    res = (0);
#pragma acc parallel num_gangs(ng) copy(res)

#pragma acc loop gang reduction(|| : res)
    for (i = 0; i < n; i++)
      res = res || ((cmp_val > array[i]));
    vres = (0);
    for (i = 0; i < n; i++)
      vres = vres || ((cmp_val > array[i]));
    if (res != vres)
      abort();
  };
  {
    int res, vres;
    res = (1);
#pragma acc parallel num_workers(nw) copy(res)

#pragma acc loop worker reduction(&& : res)
    for (i = 0; i < n; i++)
      res = res && ((cmp_val > array[i]));
    vres = (1);
    for (i = 0; i < n; i++)
      vres = vres && ((cmp_val > array[i]));
    if (res != vres)
      abort();
  };
  {
    int res, vres;
    res = (0);
#pragma acc parallel num_workers(nw) copy(res)

#pragma acc loop worker reduction(|| : res)
    for (i = 0; i < n; i++)
      res = res || ((cmp_val > array[i]));
    vres = (0);
    for (i = 0; i < n; i++)
      vres = vres || ((cmp_val > array[i]));
    if (res != vres)
      abort();
  };
  {
    int res, vres;
    res = (1);
#pragma acc parallel vector_length(vl) copy(res)

#pragma acc loop vector reduction(&& : res)
    for (i = 0; i < n; i++)
      res = res && ((cmp_val > array[i]));
    vres = (1);
    for (i = 0; i < n; i++)
      vres = vres && ((cmp_val > array[i]));
    if (res != vres)
      abort();
  };
  {
    int res, vres;
    res = (0);
#pragma acc parallel vector_length(vl) copy(res)

#pragma acc loop vector reduction(|| : res)
    for (i = 0; i < n; i++)
      res = res || ((cmp_val > array[i]));
    vres = (0);
    for (i = 0; i < n; i++)
      vres = vres || ((cmp_val > array[i]));
    if (res != vres)
      abort();
  };
  {
    int res, vres;
    res = (1);
#pragma acc parallel num_gangs(ng) num_workers(nw) vector_length(vl) copy(res)

#pragma acc loop gang worker vector reduction(&& : res)
    for (i = 0; i < n; i++)
      res = res && ((cmp_val > array[i]));
    vres = (1);
    for (i = 0; i < n; i++)
      vres = vres && ((cmp_val > array[i]));
    if (res != vres)
      abort();
  };
  {
    int res, vres;
    res = (0);
#pragma acc parallel num_gangs(ng) num_workers(nw) vector_length(vl) copy(res)

#pragma acc loop gang worker vector reduction(|| : res)
    for (i = 0; i < n; i++)
      res = res || ((cmp_val > array[i]));
    vres = (0);
    for (i = 0; i < n; i++)
      vres = vres || ((cmp_val > array[i]));
    if (res != vres)
      abort();
  };
}


x86 assembly (clang, -O0):
<test_reductions_bool>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1010,%rsp
movl   $0x3e8,-0x4(%rbp)
mov    %rsp,%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1159 <test_reductions_bool+0x49>
mov    -0x8(%rbp),%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0x1000(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1130 <test_reductions_bool+0x20>
movl   $0x5,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    11c0 <test_reductions_bool+0xb0>
xor    %eax,%eax
cmpl   $0x0,-0x18(%rbp)
mov    %al,-0x1001(%rbp)
je     11a4 <test_reductions_bool+0x94>
mov    -0x14(%rbp),%eax
movslq -0x8(%rbp),%rcx
cmp    -0x1000(%rbp,%rcx,4),%eax
setg   %al
mov    %al,-0x1001(%rbp)
mov    -0x1001(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    116e <test_reductions_bool+0x5e>
movl   $0x1,-0x1c(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1220 <test_reductions_bool+0x110>
xor    %eax,%eax
cmpl   $0x0,-0x1c(%rbp)
mov    %al,-0x1002(%rbp)
je     1204 <test_reductions_bool+0xf4>
mov    -0x14(%rbp),%eax
movslq -0x8(%rbp),%rcx
cmp    -0x1000(%rbp,%rcx,4),%eax
setg   %al
mov    %al,-0x1002(%rbp)
mov    -0x1002(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11ce <test_reductions_bool+0xbe>
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
je     1233 <test_reductions_bool+0x123>
mov    $0x0,%al
call   1030 <abort@plt>
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1293 <test_reductions_bool+0x183>
mov    $0x1,%al
cmpl   $0x0,-0x20(%rbp)
mov    %al,-0x1003(%rbp)
jne    1277 <test_reductions_bool+0x167>
mov    -0x14(%rbp),%eax
movslq -0x8(%rbp),%rcx
cmp    -0x1000(%rbp,%rcx,4),%eax
setg   %al
mov    %al,-0x1003(%rbp)
mov    -0x1003(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1241 <test_reductions_bool+0x131>
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    12f3 <test_reductions_bool+0x1e3>
mov    $0x1,%al
cmpl   $0x0,-0x24(%rbp)
mov    %al,-0x1004(%rbp)
jne    12d7 <test_reductions_bool+0x1c7>
mov    -0x14(%rbp),%eax
movslq -0x8(%rbp),%rcx
cmp    -0x1000(%rbp,%rcx,4),%eax
setg   %al
mov    %al,-0x1004(%rbp)
mov    -0x1004(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12a1 <test_reductions_bool+0x191>
mov    -0x20(%rbp),%eax
cmp    -0x24(%rbp),%eax
je     1306 <test_reductions_bool+0x1f6>
mov    $0x0,%al
call   1030 <abort@plt>
movl   $0x1,-0x28(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1366 <test_reductions_bool+0x256>
xor    %eax,%eax
cmpl   $0x0,-0x28(%rbp)
mov    %al,-0x1005(%rbp)
je     134a <test_reductions_bool+0x23a>
mov    -0x14(%rbp),%eax
movslq -0x8(%rbp),%rcx
cmp    -0x1000(%rbp,%rcx,4),%eax
setg   %al
mov    %al,-0x1005(%rbp)
mov    -0x1005(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1314 <test_reductions_bool+0x204>
movl   $0x1,-0x2c(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    13c6 <test_reductions_bool+0x2b6>
xor    %eax,%eax
cmpl   $0x0,-0x2c(%rbp)
mov    %al,-0x1006(%rbp)
je     13aa <test_reductions_bool+0x29a>
mov    -0x14(%rbp),%eax
movslq -0x8(%rbp),%rcx
cmp    -0x1000(%rbp,%rcx,4),%eax
setg   %al
mov    %al,-0x1006(%rbp)
mov    -0x1006(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1374 <test_reductions_bool+0x264>
mov    -0x28(%rbp),%eax
cmp    -0x2c(%rbp),%eax
je     13d9 <test_reductions_bool+0x2c9>
mov    $0x0,%al
call   1030 <abort@plt>
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1439 <test_reductions_bool+0x329>
mov    $0x1,%al
cmpl   $0x0,-0x30(%rbp)
mov    %al,-0x1007(%rbp)
jne    141d <test_reductions_bool+0x30d>
mov    -0x14(%rbp),%eax
movslq -0x8(%rbp),%rcx
cmp    -0x1000(%rbp,%rcx,4),%eax
setg   %al
mov    %al,-0x1007(%rbp)
mov    -0x1007(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x30(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    13e7 <test_reductions_bool+0x2d7>
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1499 <test_reductions_bool+0x389>
mov    $0x1,%al
cmpl   $0x0,-0x34(%rbp)
mov    %al,-0x1008(%rbp)
jne    147d <test_reductions_bool+0x36d>
mov    -0x14(%rbp),%eax
movslq -0x8(%rbp),%rcx
cmp    -0x1000(%rbp,%rcx,4),%eax
setg   %al
mov    %al,-0x1008(%rbp)
mov    -0x1008(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1447 <test_reductions_bool+0x337>
mov    -0x30(%rbp),%eax
cmp    -0x34(%rbp),%eax
je     14ac <test_reductions_bool+0x39c>
mov    $0x0,%al
call   1030 <abort@plt>
movl   $0x1,-0x38(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    150c <test_reductions_bool+0x3fc>
xor    %eax,%eax
cmpl   $0x0,-0x38(%rbp)
mov    %al,-0x1009(%rbp)
je     14f0 <test_reductions_bool+0x3e0>
mov    -0x14(%rbp),%eax
movslq -0x8(%rbp),%rcx
cmp    -0x1000(%rbp,%rcx,4),%eax
setg   %al
mov    %al,-0x1009(%rbp)
mov    -0x1009(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x38(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    14ba <test_reductions_bool+0x3aa>
movl   $0x1,-0x3c(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    156c <test_reductions_bool+0x45c>
xor    %eax,%eax
cmpl   $0x0,-0x3c(%rbp)
mov    %al,-0x100a(%rbp)
je     1550 <test_reductions_bool+0x440>
mov    -0x14(%rbp),%eax
movslq -0x8(%rbp),%rcx
cmp    -0x1000(%rbp,%rcx,4),%eax
setg   %al
mov    %al,-0x100a(%rbp)
mov    -0x100a(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    151a <test_reductions_bool+0x40a>
mov    -0x38(%rbp),%eax
cmp    -0x3c(%rbp),%eax
je     157f <test_reductions_bool+0x46f>
mov    $0x0,%al
call   1030 <abort@plt>
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    15df <test_reductions_bool+0x4cf>
mov    $0x1,%al
cmpl   $0x0,-0x40(%rbp)
mov    %al,-0x100b(%rbp)
jne    15c3 <test_reductions_bool+0x4b3>
mov    -0x14(%rbp),%eax
movslq -0x8(%rbp),%rcx
cmp    -0x1000(%rbp,%rcx,4),%eax
setg   %al
mov    %al,-0x100b(%rbp)
mov    -0x100b(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x40(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    158d <test_reductions_bool+0x47d>
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    163f <test_reductions_bool+0x52f>
mov    $0x1,%al
cmpl   $0x0,-0x44(%rbp)
mov    %al,-0x100c(%rbp)
jne    1623 <test_reductions_bool+0x513>
mov    -0x14(%rbp),%eax
movslq -0x8(%rbp),%rcx
cmp    -0x1000(%rbp,%rcx,4),%eax
setg   %al
mov    %al,-0x100c(%rbp)
mov    -0x100c(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x44(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    15ed <test_reductions_bool+0x4dd>
mov    -0x40(%rbp),%eax
cmp    -0x44(%rbp),%eax
je     1652 <test_reductions_bool+0x542>
mov    $0x0,%al
call   1030 <abort@plt>
movl   $0x1,-0x48(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    16b2 <test_reductions_bool+0x5a2>
xor    %eax,%eax
cmpl   $0x0,-0x48(%rbp)
mov    %al,-0x100d(%rbp)
je     1696 <test_reductions_bool+0x586>
mov    -0x14(%rbp),%eax
movslq -0x8(%rbp),%rcx
cmp    -0x1000(%rbp,%rcx,4),%eax
setg   %al
mov    %al,-0x100d(%rbp)
mov    -0x100d(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x48(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1660 <test_reductions_bool+0x550>
movl   $0x1,-0x4c(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1712 <test_reductions_bool+0x602>
xor    %eax,%eax
cmpl   $0x0,-0x4c(%rbp)
mov    %al,-0x100e(%rbp)
je     16f6 <test_reductions_bool+0x5e6>
mov    -0x14(%rbp),%eax
movslq -0x8(%rbp),%rcx
cmp    -0x1000(%rbp,%rcx,4),%eax
setg   %al
mov    %al,-0x100e(%rbp)
mov    -0x100e(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    16c0 <test_reductions_bool+0x5b0>
mov    -0x48(%rbp),%eax
cmp    -0x4c(%rbp),%eax
je     1725 <test_reductions_bool+0x615>
mov    $0x0,%al
call   1030 <abort@plt>
movl   $0x0,-0x50(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1785 <test_reductions_bool+0x675>
mov    $0x1,%al
cmpl   $0x0,-0x50(%rbp)
mov    %al,-0x100f(%rbp)
jne    1769 <test_reductions_bool+0x659>
mov    -0x14(%rbp),%eax
movslq -0x8(%rbp),%rcx
cmp    -0x1000(%rbp,%rcx,4),%eax
setg   %al
mov    %al,-0x100f(%rbp)
mov    -0x100f(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x50(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1733 <test_reductions_bool+0x623>
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    17e5 <test_reductions_bool+0x6d5>
mov    $0x1,%al
cmpl   $0x0,-0x54(%rbp)
mov    %al,-0x1010(%rbp)
jne    17c9 <test_reductions_bool+0x6b9>
mov    -0x14(%rbp),%eax
movslq -0x8(%rbp),%rcx
cmp    -0x1000(%rbp,%rcx,4),%eax
setg   %al
mov    %al,-0x1010(%rbp)
mov    -0x1010(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x54(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1793 <test_reductions_bool+0x683>
mov    -0x50(%rbp),%eax
cmp    -0x54(%rbp),%eax
je     17f8 <test_reductions_bool+0x6e8>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
add    $0x1010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_reductions_bool>:
sub    $0xfa8,%rsp
movdqa 0xee1(%rip),%xmm0
xor    %eax,%eax
movdqa 0xee6(%rip),%xmm8
movdqa 0xeed(%rip),%xmm9
movdqa 0xef4(%rip),%xmm10
movdqa 0xefb(%rip),%xmm11
movdqa 0xf02(%rip),%xmm12
movdqa 0xf0a(%rip),%xmm6
movdqa 0xf12(%rip),%xmm7
movdqa 0xf1a(%rip),%xmm1
movdqa 0xf22(%rip),%xmm2
movdqa 0xf2a(%rip),%xmm3
cs nopw 0x0(%rax,%rax,1)
movdqa %xmm0,%xmm4
paddd  %xmm8,%xmm4
movdqa %xmm0,(%rsp,%rax,4)
movdqa %xmm4,0x10(%rsp,%rax,4)
movdqa %xmm0,%xmm4
paddd  %xmm9,%xmm4
movdqa %xmm0,%xmm5
paddd  %xmm10,%xmm5
movdqa %xmm4,0x20(%rsp,%rax,4)
movdqa %xmm5,0x30(%rsp,%rax,4)
movdqa %xmm0,%xmm4
paddd  %xmm11,%xmm4
movdqa %xmm0,%xmm5
paddd  %xmm12,%xmm5
movdqa %xmm4,0x40(%rsp,%rax,4)
movdqa %xmm5,0x50(%rsp,%rax,4)
movdqa %xmm0,%xmm4
paddd  %xmm6,%xmm4
movdqa %xmm0,%xmm5
paddd  %xmm7,%xmm5
movdqa %xmm4,0x60(%rsp,%rax,4)
movdqa %xmm5,0x70(%rsp,%rax,4)
movdqa %xmm0,%xmm4
paddd  %xmm1,%xmm4
movdqa %xmm0,%xmm5
paddd  %xmm2,%xmm5
movdqa %xmm4,0x80(%rsp,%rax,4)
movdqa %xmm5,0x90(%rsp,%rax,4)
add    $0x28,%rax
paddd  %xmm3,%xmm0
cmp    $0x3e8,%rax
jne    1180 <test_reductions_bool+0x70>
mov    $0x1,%eax
mov    $0x1,%ecx
jmp    1242 <test_reductions_bool+0x132>
xchg   %ax,%ax
xor    %eax,%eax
movzbl %al,%eax
add    $0x2,%rcx
cmp    $0x3e9,%rcx
je     1256 <test_reductions_bool+0x146>
test   %eax,%eax
je     1230 <test_reductions_bool+0x120>
cmpl   $0x4,-0x4(%rsp,%rcx,4)
jg     1230 <test_reductions_bool+0x120>
cmpl   $0x5,(%rsp,%rcx,4)
setl   %al
jmp    1232 <test_reductions_bool+0x122>
mov    $0x1,%edx
mov    $0x1,%ecx
jmp    1282 <test_reductions_bool+0x172>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %edx,%edx
movzbl %dl,%edx
add    $0x2,%rcx
cmp    $0x3e9,%rcx
je     1296 <test_reductions_bool+0x186>
test   %edx,%edx
je     1270 <test_reductions_bool+0x160>
cmpl   $0x4,-0x4(%rsp,%rcx,4)
jg     1270 <test_reductions_bool+0x160>
cmpl   $0x5,(%rsp,%rcx,4)
setl   %dl
jmp    1272 <test_reductions_bool+0x162>
xor    %edx,%eax
jne    15e2 <test_reductions_bool+0x4d2>
xor    %esi,%esi
mov    $0x1,%ecx
jmp    12c0 <test_reductions_bool+0x1b0>
nopw   0x0(%rax,%rax,1)
movzbl %dl,%esi
add    $0x2,%rcx
cmp    $0x3e9,%rcx
je     12d6 <test_reductions_bool+0x1c6>
mov    $0x1,%dl
test   %esi,%esi
jne    12b0 <test_reductions_bool+0x1a0>
cmpl   $0x5,-0x4(%rsp,%rcx,4)
jl     12b0 <test_reductions_bool+0x1a0>
cmpl   $0x5,(%rsp,%rcx,4)
setl   %dl
jmp    12b0 <test_reductions_bool+0x1a0>
xor    %edx,%edx
mov    $0x1,%ecx
jmp    12f0 <test_reductions_bool+0x1e0>
nop
movzbl %al,%edx
add    $0x2,%rcx
cmp    $0x3e9,%rcx
je     1306 <test_reductions_bool+0x1f6>
mov    $0x1,%al
test   %edx,%edx
jne    12e0 <test_reductions_bool+0x1d0>
cmpl   $0x5,-0x4(%rsp,%rcx,4)
jl     12e0 <test_reductions_bool+0x1d0>
cmpl   $0x5,(%rsp,%rcx,4)
setl   %al
jmp    12e0 <test_reductions_bool+0x1d0>
xor    %edx,%esi
jne    15e2 <test_reductions_bool+0x4d2>
mov    $0x1,%eax
mov    $0x1,%ecx
jmp    1332 <test_reductions_bool+0x222>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
movzbl %al,%eax
add    $0x2,%rcx
cmp    $0x3e9,%rcx
je     1346 <test_reductions_bool+0x236>
test   %eax,%eax
je     1320 <test_reductions_bool+0x210>
cmpl   $0x4,-0x4(%rsp,%rcx,4)
jg     1320 <test_reductions_bool+0x210>
cmpl   $0x5,(%rsp,%rcx,4)
setl   %al
jmp    1322 <test_reductions_bool+0x212>
mov    $0x1,%edx
mov    $0x1,%ecx
jmp    1372 <test_reductions_bool+0x262>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %edx,%edx
movzbl %dl,%edx
add    $0x2,%rcx
cmp    $0x3e9,%rcx
je     1386 <test_reductions_bool+0x276>
test   %edx,%edx
je     1360 <test_reductions_bool+0x250>
cmpl   $0x4,-0x4(%rsp,%rcx,4)
jg     1360 <test_reductions_bool+0x250>
cmpl   $0x5,(%rsp,%rcx,4)
setl   %dl
jmp    1362 <test_reductions_bool+0x252>
xor    %edx,%eax
jne    15e2 <test_reductions_bool+0x4d2>
xor    %esi,%esi
mov    $0x1,%ecx
jmp    13b0 <test_reductions_bool+0x2a0>
nopw   0x0(%rax,%rax,1)
movzbl %dl,%esi
add    $0x2,%rcx
cmp    $0x3e9,%rcx
je     13c6 <test_reductions_bool+0x2b6>
mov    $0x1,%dl
test   %esi,%esi
jne    13a0 <test_reductions_bool+0x290>
cmpl   $0x5,-0x4(%rsp,%rcx,4)
jl     13a0 <test_reductions_bool+0x290>
cmpl   $0x5,(%rsp,%rcx,4)
setl   %dl
jmp    13a0 <test_reductions_bool+0x290>
xor    %edx,%edx
mov    $0x1,%ecx
jmp    13e0 <test_reductions_bool+0x2d0>
nop
movzbl %al,%edx
add    $0x2,%rcx
cmp    $0x3e9,%rcx
je     13f6 <test_reductions_bool+0x2e6>
mov    $0x1,%al
test   %edx,%edx
jne    13d0 <test_reductions_bool+0x2c0>
cmpl   $0x5,-0x4(%rsp,%rcx,4)
jl     13d0 <test_reductions_bool+0x2c0>
cmpl   $0x5,(%rsp,%rcx,4)
setl   %al
jmp    13d0 <test_reductions_bool+0x2c0>
xor    %edx,%esi
jne    15e2 <test_reductions_bool+0x4d2>
mov    $0x1,%eax
mov    $0x1,%ecx
jmp    1422 <test_reductions_bool+0x312>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
movzbl %al,%eax
add    $0x2,%rcx
cmp    $0x3e9,%rcx
je     1436 <test_reductions_bool+0x326>
test   %eax,%eax
je     1410 <test_reductions_bool+0x300>
cmpl   $0x4,-0x4(%rsp,%rcx,4)
jg     1410 <test_reductions_bool+0x300>
cmpl   $0x5,(%rsp,%rcx,4)
setl   %al
jmp    1412 <test_reductions_bool+0x302>
mov    $0x1,%edx
mov    $0x1,%ecx
jmp    1462 <test_reductions_bool+0x352>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %edx,%edx
movzbl %dl,%edx
add    $0x2,%rcx
cmp    $0x3e9,%rcx
je     1476 <test_reductions_bool+0x366>
test   %edx,%edx
je     1450 <test_reductions_bool+0x340>
cmpl   $0x4,-0x4(%rsp,%rcx,4)
jg     1450 <test_reductions_bool+0x340>
cmpl   $0x5,(%rsp,%rcx,4)
setl   %dl
jmp    1452 <test_reductions_bool+0x342>
xor    %edx,%eax
jne    15e2 <test_reductions_bool+0x4d2>
xor    %esi,%esi
mov    $0x1,%ecx
jmp    14a0 <test_reductions_bool+0x390>
nopw   0x0(%rax,%rax,1)
movzbl %dl,%esi
add    $0x2,%rcx
cmp    $0x3e9,%rcx
je     14b6 <test_reductions_bool+0x3a6>
mov    $0x1,%dl
test   %esi,%esi
jne    1490 <test_reductions_bool+0x380>
cmpl   $0x5,-0x4(%rsp,%rcx,4)
jl     1490 <test_reductions_bool+0x380>
cmpl   $0x5,(%rsp,%rcx,4)
setl   %dl
jmp    1490 <test_reductions_bool+0x380>
xor    %edx,%edx
mov    $0x1,%ecx
jmp    14d0 <test_reductions_bool+0x3c0>
nop
movzbl %al,%edx
add    $0x2,%rcx
cmp    $0x3e9,%rcx
je     14e6 <test_reductions_bool+0x3d6>
mov    $0x1,%al
test   %edx,%edx
jne    14c0 <test_reductions_bool+0x3b0>
cmpl   $0x5,-0x4(%rsp,%rcx,4)
jl     14c0 <test_reductions_bool+0x3b0>
cmpl   $0x5,(%rsp,%rcx,4)
setl   %al
jmp    14c0 <test_reductions_bool+0x3b0>
xor    %edx,%esi
jne    15e2 <test_reductions_bool+0x4d2>
mov    $0x1,%eax
mov    $0x1,%ecx
jmp    1512 <test_reductions_bool+0x402>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
movzbl %al,%eax
add    $0x2,%rcx
cmp    $0x3e9,%rcx
je     1526 <test_reductions_bool+0x416>
test   %eax,%eax
je     1500 <test_reductions_bool+0x3f0>
cmpl   $0x4,-0x4(%rsp,%rcx,4)
jg     1500 <test_reductions_bool+0x3f0>
cmpl   $0x5,(%rsp,%rcx,4)
setl   %al
jmp    1502 <test_reductions_bool+0x3f2>
mov    $0x1,%edx
mov    $0x1,%ecx
jmp    1552 <test_reductions_bool+0x442>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %edx,%edx
movzbl %dl,%edx
add    $0x2,%rcx
cmp    $0x3e9,%rcx
je     1566 <test_reductions_bool+0x456>
test   %edx,%edx
je     1540 <test_reductions_bool+0x430>
cmpl   $0x4,-0x4(%rsp,%rcx,4)
jg     1540 <test_reductions_bool+0x430>
cmpl   $0x5,(%rsp,%rcx,4)
setl   %dl
jmp    1542 <test_reductions_bool+0x432>
xor    %edx,%eax
jne    15e2 <test_reductions_bool+0x4d2>
xor    %edx,%edx
mov    $0x1,%ecx
jmp    1590 <test_reductions_bool+0x480>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl %al,%edx
add    $0x2,%rcx
cmp    $0x3e9,%rcx
je     15a6 <test_reductions_bool+0x496>
mov    $0x1,%al
test   %edx,%edx
jne    1580 <test_reductions_bool+0x470>
cmpl   $0x5,-0x4(%rsp,%rcx,4)
jl     1580 <test_reductions_bool+0x470>
cmpl   $0x5,(%rsp,%rcx,4)
setl   %al
jmp    1580 <test_reductions_bool+0x470>
xor    %esi,%esi
mov    $0x1,%ecx
jmp    15c0 <test_reductions_bool+0x4b0>
nop
movzbl %dl,%esi
add    $0x2,%rcx
cmp    $0x3e9,%rcx
je     15d6 <test_reductions_bool+0x4c6>
mov    $0x1,%dl
test   %esi,%esi
jne    15b0 <test_reductions_bool+0x4a0>
cmpl   $0x5,-0x4(%rsp,%rcx,4)
jl     15b0 <test_reductions_bool+0x4a0>
cmpl   $0x5,(%rsp,%rcx,4)
setl   %dl
jmp    15b0 <test_reductions_bool+0x4a0>
cmp    %dl,%al
jne    15e2 <test_reductions_bool+0x4d2>
add    $0xfa8,%rsp
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @test_reductions_bool() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
store i32 1000, i32* %1
%21 = call i8* @llvm.stacksave()
store i8* %21, i8** %3
%22 = alloca i32, i64 1000
store i32 0, i32* %2
br label %23
23: ; preds = %31, %0
%24 = load i32, i32* %2
%25 = icmp slt i32 %24, 1000
br i1 %25, label %26, label %34
26: ; preds = %23
%27 = load i32, i32* %2
%28 = load i32, i32* %2
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i32, i32* %22, i64 %29
store i32 %27, i32* %30
br label %31
31: ; preds = %26
%32 = load i32, i32* %2
%33 = add nsw i32 %32, 1
store i32 %33, i32* %2
br label %23
34: ; preds = %23
store i32 5, i32* %4
store i32 1, i32* %5
store i32 0, i32* %2
br label %35
35: ; preds = %51, %34
%36 = load i32, i32* %2
%37 = icmp slt i32 %36, 1000
br i1 %37, label %38, label %54
38: ; preds = %35
%39 = load i32, i32* %5
%40 = icmp ne i32 %39, 0
br i1 %40, label %41, label %48
41: ; preds = %38
%42 = load i32, i32* %4
%43 = load i32, i32* %2
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i32, i32* %22, i64 %44
%46 = load i32, i32* %45
%47 = icmp sgt i32 %42, %46
br label %48
48: ; preds = %41, %38
%49 = phi i1 [ false, %38 ], [ %47, %41 ]
%50 = zext i1 %49 to i32
store i32 %50, i32* %5
br label %51
51: ; preds = %48
%52 = load i32, i32* %2
%53 = add nsw i32 %52, 1
store i32 %53, i32* %2
br label %35
54: ; preds = %35
store i32 1, i32* %6
store i32 0, i32* %2
br label %55
55: ; preds = %71, %54
%56 = load i32, i32* %2
%57 = icmp slt i32 %56, 1000
br i1 %57, label %58, label %74
58: ; preds = %55
%59 = load i32, i32* %6
%60 = icmp ne i32 %59, 0
br i1 %60, label %61, label %68
61: ; preds = %58
%62 = load i32, i32* %4
%63 = load i32, i32* %2
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i32, i32* %22, i64 %64
%66 = load i32, i32* %65
%67 = icmp sgt i32 %62, %66
br label %68
68: ; preds = %61, %58
%69 = phi i1 [ false, %58 ], [ %67, %61 ]
%70 = zext i1 %69 to i32
store i32 %70, i32* %6
br label %71
71: ; preds = %68
%72 = load i32, i32* %2
%73 = add nsw i32 %72, 1
store i32 %73, i32* %2
br label %55
74: ; preds = %55
%75 = load i32, i32* %5
%76 = load i32, i32* %6
%77 = icmp ne i32 %75, %76
br i1 %77, label %78, label %80
78: ; preds = %74
%79 = call i32 (...) @abort()
unreachable
80: ; preds = %74
store i32 0, i32* %7
store i32 0, i32* %2
br label %81
81: ; preds = %97, %80
%82 = load i32, i32* %2
%83 = icmp slt i32 %82, 1000
br i1 %83, label %84, label %100
84: ; preds = %81
%85 = load i32, i32* %7
%86 = icmp ne i32 %85, 0
br i1 %86, label %94, label %87
87: ; preds = %84
%88 = load i32, i32* %4
%89 = load i32, i32* %2
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds i32, i32* %22, i64 %90
%92 = load i32, i32* %91
%93 = icmp sgt i32 %88, %92
br label %94
94: ; preds = %87, %84
%95 = phi i1 [ true, %84 ], [ %93, %87 ]
%96 = zext i1 %95 to i32
store i32 %96, i32* %7
br label %97
97: ; preds = %94
%98 = load i32, i32* %2
%99 = add nsw i32 %98, 1
store i32 %99, i32* %2
br label %81
100: ; preds = %81
store i32 0, i32* %8
store i32 0, i32* %2
br label %101
101: ; preds = %117, %100
%102 = load i32, i32* %2
%103 = icmp slt i32 %102, 1000
br i1 %103, label %104, label %120
104: ; preds = %101
%105 = load i32, i32* %8
%106 = icmp ne i32 %105, 0
br i1 %106, label %114, label %107
107: ; preds = %104
%108 = load i32, i32* %4
%109 = load i32, i32* %2
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds i32, i32* %22, i64 %110
%112 = load i32, i32* %111
%113 = icmp sgt i32 %108, %112
br label %114
114: ; preds = %107, %104
%115 = phi i1 [ true, %104 ], [ %113, %107 ]
%116 = zext i1 %115 to i32
store i32 %116, i32* %8
br label %117
117: ; preds = %114
%118 = load i32, i32* %2
%119 = add nsw i32 %118, 1
store i32 %119, i32* %2
br label %101
120: ; preds = %101
%121 = load i32, i32* %7
%122 = load i32, i32* %8
%123 = icmp ne i32 %121, %122
br i1 %123, label %124, label %126
124: ; preds = %120
%125 = call i32 (...) @abort()
unreachable
126: ; preds = %120
store i32 1, i32* %9
store i32 0, i32* %2
br label %127
127: ; preds = %143, %126
%128 = load i32, i32* %2
%129 = icmp slt i32 %128, 1000
br i1 %129, label %130, label %146
130: ; preds = %127
%131 = load i32, i32* %9
%132 = icmp ne i32 %131, 0
br i1 %132, label %133, label %140
133: ; preds = %130
%134 = load i32, i32* %4
%135 = load i32, i32* %2
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds i32, i32* %22, i64 %136
%138 = load i32, i32* %137
%139 = icmp sgt i32 %134, %138
br label %140
140: ; preds = %133, %130
%141 = phi i1 [ false, %130 ], [ %139, %133 ]
%142 = zext i1 %141 to i32
store i32 %142, i32* %9
br label %143
143: ; preds = %140
%144 = load i32, i32* %2
%145 = add nsw i32 %144, 1
store i32 %145, i32* %2
br label %127
146: ; preds = %127
store i32 1, i32* %10
store i32 0, i32* %2
br label %147
147: ; preds = %163, %146
%148 = load i32, i32* %2
%149 = icmp slt i32 %148, 1000
br i1 %149, label %150, label %166
150: ; preds = %147
%151 = load i32, i32* %10
%152 = icmp ne i32 %151, 0
br i1 %152, label %153, label %160
153: ; preds = %150
%154 = load i32, i32* %4
%155 = load i32, i32* %2
%156 = sext i32 %155 to i64
%157 = getelementptr inbounds i32, i32* %22, i64 %156
%158 = load i32, i32* %157
%159 = icmp sgt i32 %154, %158
br label %160
160: ; preds = %153, %150
%161 = phi i1 [ false, %150 ], [ %159, %153 ]
%162 = zext i1 %161 to i32
store i32 %162, i32* %10
br label %163
163: ; preds = %160
%164 = load i32, i32* %2
%165 = add nsw i32 %164, 1
store i32 %165, i32* %2
br label %147
166: ; preds = %147
%167 = load i32, i32* %9
%168 = load i32, i32* %10
%169 = icmp ne i32 %167, %168
br i1 %169, label %170, label %172
170: ; preds = %166
%171 = call i32 (...) @abort()
unreachable
172: ; preds = %166
store i32 0, i32* %11
store i32 0, i32* %2
br label %173
173: ; preds = %189, %172
%174 = load i32, i32* %2
%175 = icmp slt i32 %174, 1000
br i1 %175, label %176, label %192
176: ; preds = %173
%177 = load i32, i32* %11
%178 = icmp ne i32 %177, 0
br i1 %178, label %186, label %179
179: ; preds = %176
%180 = load i32, i32* %4
%181 = load i32, i32* %2
%182 = sext i32 %181 to i64
%183 = getelementptr inbounds i32, i32* %22, i64 %182
%184 = load i32, i32* %183
%185 = icmp sgt i32 %180, %184
br label %186
186: ; preds = %179, %176
%187 = phi i1 [ true, %176 ], [ %185, %179 ]
%188 = zext i1 %187 to i32
store i32 %188, i32* %11
br label %189
189: ; preds = %186
%190 = load i32, i32* %2
%191 = add nsw i32 %190, 1
store i32 %191, i32* %2
br label %173
192: ; preds = %173
store i32 0, i32* %12
store i32 0, i32* %2
br label %193
193: ; preds = %209, %192
%194 = load i32, i32* %2
%195 = icmp slt i32 %194, 1000
br i1 %195, label %196, label %212
196: ; preds = %193
%197 = load i32, i32* %12
%198 = icmp ne i32 %197, 0
br i1 %198, label %206, label %199
199: ; preds = %196
%200 = load i32, i32* %4
%201 = load i32, i32* %2
%202 = sext i32 %201 to i64
%203 = getelementptr inbounds i32, i32* %22, i64 %202
%204 = load i32, i32* %203
%205 = icmp sgt i32 %200, %204
br label %206
206: ; preds = %199, %196
%207 = phi i1 [ true, %196 ], [ %205, %199 ]
%208 = zext i1 %207 to i32
store i32 %208, i32* %12
br label %209
209: ; preds = %206
%210 = load i32, i32* %2
%211 = add nsw i32 %210, 1
store i32 %211, i32* %2
br label %193
212: ; preds = %193
%213 = load i32, i32* %11
%214 = load i32, i32* %12
%215 = icmp ne i32 %213, %214
br i1 %215, label %216, label %218
216: ; preds = %212
%217 = call i32 (...) @abort()
unreachable
218: ; preds = %212
store i32 1, i32* %13
store i32 0, i32* %2
br label %219
219: ; preds = %235, %218
%220 = load i32, i32* %2
%221 = icmp slt i32 %220, 1000
br i1 %221, label %222, label %238
222: ; preds = %219
%223 = load i32, i32* %13
%224 = icmp ne i32 %223, 0
br i1 %224, label %225, label %232
225: ; preds = %222
%226 = load i32, i32* %4
%227 = load i32, i32* %2
%228 = sext i32 %227 to i64
%229 = getelementptr inbounds i32, i32* %22, i64 %228
%230 = load i32, i32* %229
%231 = icmp sgt i32 %226, %230
br label %232
232: ; preds = %225, %222
%233 = phi i1 [ false, %222 ], [ %231, %225 ]
%234 = zext i1 %233 to i32
store i32 %234, i32* %13
br label %235
235: ; preds = %232
%236 = load i32, i32* %2
%237 = add nsw i32 %236, 1
store i32 %237, i32* %2
br label %219
238: ; preds = %219
store i32 1, i32* %14
store i32 0, i32* %2
br label %239
239: ; preds = %255, %238
%240 = load i32, i32* %2
%241 = icmp slt i32 %240, 1000
br i1 %241, label %242, label %258
242: ; preds = %239
%243 = load i32, i32* %14
%244 = icmp ne i32 %243, 0
br i1 %244, label %245, label %252
245: ; preds = %242
%246 = load i32, i32* %4
%247 = load i32, i32* %2
%248 = sext i32 %247 to i64
%249 = getelementptr inbounds i32, i32* %22, i64 %248
%250 = load i32, i32* %249
%251 = icmp sgt i32 %246, %250
br label %252
252: ; preds = %245, %242
%253 = phi i1 [ false, %242 ], [ %251, %245 ]
%254 = zext i1 %253 to i32
store i32 %254, i32* %14
br label %255
255: ; preds = %252
%256 = load i32, i32* %2
%257 = add nsw i32 %256, 1
store i32 %257, i32* %2
br label %239
258: ; preds = %239
%259 = load i32, i32* %13
%260 = load i32, i32* %14
%261 = icmp ne i32 %259, %260
br i1 %261, label %262, label %264
262: ; preds = %258
%263 = call i32 (...) @abort()
unreachable
264: ; preds = %258
store i32 0, i32* %15
store i32 0, i32* %2
br label %265
265: ; preds = %281, %264
%266 = load i32, i32* %2
%267 = icmp slt i32 %266, 1000
br i1 %267, label %268, label %284
268: ; preds = %265
%269 = load i32, i32* %15
%270 = icmp ne i32 %269, 0
br i1 %270, label %278, label %271
271: ; preds = %268
%272 = load i32, i32* %4
%273 = load i32, i32* %2
%274 = sext i32 %273 to i64
%275 = getelementptr inbounds i32, i32* %22, i64 %274
%276 = load i32, i32* %275
%277 = icmp sgt i32 %272, %276
br label %278
278: ; preds = %271, %268
%279 = phi i1 [ true, %268 ], [ %277, %271 ]
%280 = zext i1 %279 to i32
store i32 %280, i32* %15
br label %281
281: ; preds = %278
%282 = load i32, i32* %2
%283 = add nsw i32 %282, 1
store i32 %283, i32* %2
br label %265
284: ; preds = %265
store i32 0, i32* %16
store i32 0, i32* %2
br label %285
285: ; preds = %301, %284
%286 = load i32, i32* %2
%287 = icmp slt i32 %286, 1000
br i1 %287, label %288, label %304
288: ; preds = %285
%289 = load i32, i32* %16
%290 = icmp ne i32 %289, 0
br i1 %290, label %298, label %291
291: ; preds = %288
%292 = load i32, i32* %4
%293 = load i32, i32* %2
%294 = sext i32 %293 to i64
%295 = getelementptr inbounds i32, i32* %22, i64 %294
%296 = load i32, i32* %295
%297 = icmp sgt i32 %292, %296
br label %298
298: ; preds = %291, %288
%299 = phi i1 [ true, %288 ], [ %297, %291 ]
%300 = zext i1 %299 to i32
store i32 %300, i32* %16
br label %301
301: ; preds = %298
%302 = load i32, i32* %2
%303 = add nsw i32 %302, 1
store i32 %303, i32* %2
br label %285
304: ; preds = %285
%305 = load i32, i32* %15
%306 = load i32, i32* %16
%307 = icmp ne i32 %305, %306
br i1 %307, label %308, label %310
308: ; preds = %304
%309 = call i32 (...) @abort()
unreachable
310: ; preds = %304
store i32 1, i32* %17
store i32 0, i32* %2
br label %311
311: ; preds = %327, %310
%312 = load i32, i32* %2
%313 = icmp slt i32 %312, 1000
br i1 %313, label %314, label %330
314: ; preds = %311
%315 = load i32, i32* %17
%316 = icmp ne i32 %315, 0
br i1 %316, label %317, label %324
317: ; preds = %314
%318 = load i32, i32* %4
%319 = load i32, i32* %2
%320 = sext i32 %319 to i64
%321 = getelementptr inbounds i32, i32* %22, i64 %320
%322 = load i32, i32* %321
%323 = icmp sgt i32 %318, %322
br label %324
324: ; preds = %317, %314
%325 = phi i1 [ false, %314 ], [ %323, %317 ]
%326 = zext i1 %325 to i32
store i32 %326, i32* %17
br label %327
327: ; preds = %324
%328 = load i32, i32* %2
%329 = add nsw i32 %328, 1
store i32 %329, i32* %2
br label %311
330: ; preds = %311
store i32 1, i32* %18
store i32 0, i32* %2
br label %331
331: ; preds = %347, %330
%332 = load i32, i32* %2
%333 = icmp slt i32 %332, 1000
br i1 %333, label %334, label %350
334: ; preds = %331
%335 = load i32, i32* %18
%336 = icmp ne i32 %335, 0
br i1 %336, label %337, label %344
337: ; preds = %334
%338 = load i32, i32* %4
%339 = load i32, i32* %2
%340 = sext i32 %339 to i64
%341 = getelementptr inbounds i32, i32* %22, i64 %340
%342 = load i32, i32* %341
%343 = icmp sgt i32 %338, %342
br label %344
344: ; preds = %337, %334
%345 = phi i1 [ false, %334 ], [ %343, %337 ]
%346 = zext i1 %345 to i32
store i32 %346, i32* %18
br label %347
347: ; preds = %344
%348 = load i32, i32* %2
%349 = add nsw i32 %348, 1
store i32 %349, i32* %2
br label %331
350: ; preds = %331
%351 = load i32, i32* %17
%352 = load i32, i32* %18
%353 = icmp ne i32 %351, %352
br i1 %353, label %354, label %356
354: ; preds = %350
%355 = call i32 (...) @abort()
unreachable
356: ; preds = %350
store i32 0, i32* %19
store i32 0, i32* %2
br label %357
357: ; preds = %373, %356
%358 = load i32, i32* %2
%359 = icmp slt i32 %358, 1000
br i1 %359, label %360, label %376
360: ; preds = %357
%361 = load i32, i32* %19
%362 = icmp ne i32 %361, 0
br i1 %362, label %370, label %363
363: ; preds = %360
%364 = load i32, i32* %4
%365 = load i32, i32* %2
%366 = sext i32 %365 to i64
%367 = getelementptr inbounds i32, i32* %22, i64 %366
%368 = load i32, i32* %367
%369 = icmp sgt i32 %364, %368
br label %370
370: ; preds = %363, %360
%371 = phi i1 [ true, %360 ], [ %369, %363 ]
%372 = zext i1 %371 to i32
store i32 %372, i32* %19
br label %373
373: ; preds = %370
%374 = load i32, i32* %2
%375 = add nsw i32 %374, 1
store i32 %375, i32* %2
br label %357
376: ; preds = %357
store i32 0, i32* %20
store i32 0, i32* %2
br label %377
377: ; preds = %393, %376
%378 = load i32, i32* %2
%379 = icmp slt i32 %378, 1000
br i1 %379, label %380, label %396
380: ; preds = %377
%381 = load i32, i32* %20
%382 = icmp ne i32 %381, 0
br i1 %382, label %390, label %383
383: ; preds = %380
%384 = load i32, i32* %4
%385 = load i32, i32* %2
%386 = sext i32 %385 to i64
%387 = getelementptr inbounds i32, i32* %22, i64 %386
%388 = load i32, i32* %387
%389 = icmp sgt i32 %384, %388
br label %390
390: ; preds = %383, %380
%391 = phi i1 [ true, %380 ], [ %389, %383 ]
%392 = zext i1 %391 to i32
store i32 %392, i32* %20
br label %393
393: ; preds = %390
%394 = load i32, i32* %2
%395 = add nsw i32 %394, 1
store i32 %395, i32* %2
br label %377
396: ; preds = %377
%397 = load i32, i32* %19
%398 = load i32, i32* %20
%399 = icmp ne i32 %397, %398
br i1 %399, label %400, label %402
400: ; preds = %396
%401 = call i32 (...) @abort()
unreachable
402: ; preds = %396
%403 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
define void @test_reductions_bool() {
%1 = alloca [1000 x i32]
br label %2
2: ; preds = %2, %0
%3 = phi i64 [ 0, %0 ], [ %38, %2 ]
%4 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %0 ], [ %39, %2 ]
%5 = add <4 x i32> %4, <i32 4, i32 4, i32 4, i32 4>
%6 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %3
%7 = bitcast i32* %6 to <4 x i32>*
store <4 x i32> %4, <4 x i32>* %7
%8 = getelementptr inbounds i32, i32* %6, i64 4
%9 = bitcast i32* %8 to <4 x i32>*
store <4 x i32> %5, <4 x i32>* %9
%10 = add nuw nsw i64 %3, 8
%11 = add <4 x i32> %4, <i32 8, i32 8, i32 8, i32 8>
%12 = add <4 x i32> %4, <i32 12, i32 12, i32 12, i32 12>
%13 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %10
%14 = bitcast i32* %13 to <4 x i32>*
store <4 x i32> %11, <4 x i32>* %14
%15 = getelementptr inbounds i32, i32* %13, i64 4
%16 = bitcast i32* %15 to <4 x i32>*
store <4 x i32> %12, <4 x i32>* %16
%17 = add nuw nsw i64 %3, 16
%18 = add <4 x i32> %4, <i32 16, i32 16, i32 16, i32 16>
%19 = add <4 x i32> %4, <i32 20, i32 20, i32 20, i32 20>
%20 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %17
%21 = bitcast i32* %20 to <4 x i32>*
store <4 x i32> %18, <4 x i32>* %21
%22 = getelementptr inbounds i32, i32* %20, i64 4
%23 = bitcast i32* %22 to <4 x i32>*
store <4 x i32> %19, <4 x i32>* %23
%24 = add nuw nsw i64 %3, 24
%25 = add <4 x i32> %4, <i32 24, i32 24, i32 24, i32 24>
%26 = add <4 x i32> %4, <i32 28, i32 28, i32 28, i32 28>
%27 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %24
%28 = bitcast i32* %27 to <4 x i32>*
store <4 x i32> %25, <4 x i32>* %28
%29 = getelementptr inbounds i32, i32* %27, i64 4
%30 = bitcast i32* %29 to <4 x i32>*
store <4 x i32> %26, <4 x i32>* %30
%31 = add nuw nsw i64 %3, 32
%32 = add <4 x i32> %4, <i32 32, i32 32, i32 32, i32 32>
%33 = add <4 x i32> %4, <i32 36, i32 36, i32 36, i32 36>
%34 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %31
%35 = bitcast i32* %34 to <4 x i32>*
store <4 x i32> %32, <4 x i32>* %35
%36 = getelementptr inbounds i32, i32* %34, i64 4
%37 = bitcast i32* %36 to <4 x i32>*
store <4 x i32> %33, <4 x i32>* %37
%38 = add nuw nsw i64 %3, 40
%39 = add <4 x i32> %4, <i32 40, i32 40, i32 40, i32 40>
%40 = icmp eq i64 %38, 1000
br i1 %40, label %41, label %2
41: ; preds = %2, %54
%42 = phi i64 [ %57, %54 ], [ 0, %2 ]
%43 = phi i32 [ %56, %54 ], [ 1, %2 ]
%44 = icmp eq i32 %43, 0
br i1 %44, label %54, label %45
45: ; preds = %41
%46 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %42
%47 = load i32, i32* %46
%48 = icmp slt i32 %47, 5
br i1 %48, label %49, label %54
49: ; preds = %45
%50 = or i64 %42, 1
%51 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %50
%52 = load i32, i32* %51
%53 = icmp slt i32 %52, 5
br label %54
54: ; preds = %41, %49, %45
%55 = phi i1 [ false, %45 ], [ %53, %49 ], [ false, %41 ]
%56 = zext i1 %55 to i32
%57 = add nuw nsw i64 %42, 2
%58 = icmp eq i64 %57, 1000
br i1 %58, label %59, label %41
59: ; preds = %54, %72
%60 = phi i64 [ %75, %72 ], [ 0, %54 ]
%61 = phi i32 [ %74, %72 ], [ 1, %54 ]
%62 = icmp eq i32 %61, 0
br i1 %62, label %72, label %63
63: ; preds = %59
%64 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %60
%65 = load i32, i32* %64
%66 = icmp slt i32 %65, 5
br i1 %66, label %67, label %72
67: ; preds = %63
%68 = or i64 %60, 1
%69 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %68
%70 = load i32, i32* %69
%71 = icmp slt i32 %70, 5
br label %72
72: ; preds = %59, %67, %63
%73 = phi i1 [ false, %63 ], [ %71, %67 ], [ false, %59 ]
%74 = zext i1 %73 to i32
%75 = add nuw nsw i64 %60, 2
%76 = icmp eq i64 %75, 1000
br i1 %76, label %77, label %59
77: ; preds = %72
%78 = xor i1 %55, %73
br i1 %78, label %79, label %81
79: ; preds = %77
%80 = tail call i32 (...) @abort()
unreachable
81: ; preds = %77, %94
%82 = phi i64 [ %97, %94 ], [ 0, %77 ]
%83 = phi i32 [ %96, %94 ], [ 0, %77 ]
%84 = icmp eq i32 %83, 0
br i1 %84, label %85, label %94
85: ; preds = %81
%86 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %82
%87 = load i32, i32* %86
%88 = icmp slt i32 %87, 5
br i1 %88, label %94, label %89
89: ; preds = %85
%90 = or i64 %82, 1
%91 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %90
%92 = load i32, i32* %91
%93 = icmp slt i32 %92, 5
br label %94
94: ; preds = %81, %89, %85
%95 = phi i1 [ true, %85 ], [ %93, %89 ], [ true, %81 ]
%96 = zext i1 %95 to i32
%97 = add nuw nsw i64 %82, 2
%98 = icmp eq i64 %97, 1000
br i1 %98, label %99, label %81
99: ; preds = %94, %112
%100 = phi i64 [ %115, %112 ], [ 0, %94 ]
%101 = phi i32 [ %114, %112 ], [ 0, %94 ]
%102 = icmp eq i32 %101, 0
br i1 %102, label %103, label %112
103: ; preds = %99
%104 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %100
%105 = load i32, i32* %104
%106 = icmp slt i32 %105, 5
br i1 %106, label %112, label %107
107: ; preds = %103
%108 = or i64 %100, 1
%109 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %108
%110 = load i32, i32* %109
%111 = icmp slt i32 %110, 5
br label %112
112: ; preds = %99, %107, %103
%113 = phi i1 [ true, %103 ], [ %111, %107 ], [ true, %99 ]
%114 = zext i1 %113 to i32
%115 = add nuw nsw i64 %100, 2
%116 = icmp eq i64 %115, 1000
br i1 %116, label %117, label %99
117: ; preds = %112
%118 = xor i1 %95, %113
br i1 %118, label %119, label %121
119: ; preds = %117
%120 = tail call i32 (...) @abort()
unreachable
121: ; preds = %117, %134
%122 = phi i64 [ %137, %134 ], [ 0, %117 ]
%123 = phi i32 [ %136, %134 ], [ 1, %117 ]
%124 = icmp eq i32 %123, 0
br i1 %124, label %134, label %125
125: ; preds = %121
%126 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %122
%127 = load i32, i32* %126
%128 = icmp slt i32 %127, 5
br i1 %128, label %129, label %134
129: ; preds = %125
%130 = or i64 %122, 1
%131 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %130
%132 = load i32, i32* %131
%133 = icmp slt i32 %132, 5
br label %134
134: ; preds = %121, %129, %125
%135 = phi i1 [ false, %125 ], [ %133, %129 ], [ false, %121 ]
%136 = zext i1 %135 to i32
%137 = add nuw nsw i64 %122, 2
%138 = icmp eq i64 %137, 1000
br i1 %138, label %139, label %121
139: ; preds = %134, %152
%140 = phi i64 [ %155, %152 ], [ 0, %134 ]
%141 = phi i32 [ %154, %152 ], [ 1, %134 ]
%142 = icmp eq i32 %141, 0
br i1 %142, label %152, label %143
143: ; preds = %139
%144 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %140
%145 = load i32, i32* %144
%146 = icmp slt i32 %145, 5
br i1 %146, label %147, label %152
147: ; preds = %143
%148 = or i64 %140, 1
%149 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %148
%150 = load i32, i32* %149
%151 = icmp slt i32 %150, 5
br label %152
152: ; preds = %139, %147, %143
%153 = phi i1 [ false, %143 ], [ %151, %147 ], [ false, %139 ]
%154 = zext i1 %153 to i32
%155 = add nuw nsw i64 %140, 2
%156 = icmp eq i64 %155, 1000
br i1 %156, label %157, label %139
157: ; preds = %152
%158 = xor i1 %135, %153
br i1 %158, label %159, label %161
159: ; preds = %157
%160 = tail call i32 (...) @abort()
unreachable
161: ; preds = %157, %174
%162 = phi i64 [ %177, %174 ], [ 0, %157 ]
%163 = phi i32 [ %176, %174 ], [ 0, %157 ]
%164 = icmp eq i32 %163, 0
br i1 %164, label %165, label %174
165: ; preds = %161
%166 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %162
%167 = load i32, i32* %166
%168 = icmp slt i32 %167, 5
br i1 %168, label %174, label %169
169: ; preds = %165
%170 = or i64 %162, 1
%171 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %170
%172 = load i32, i32* %171
%173 = icmp slt i32 %172, 5
br label %174
174: ; preds = %161, %169, %165
%175 = phi i1 [ true, %165 ], [ %173, %169 ], [ true, %161 ]
%176 = zext i1 %175 to i32
%177 = add nuw nsw i64 %162, 2
%178 = icmp eq i64 %177, 1000
br i1 %178, label %179, label %161
179: ; preds = %174, %192
%180 = phi i64 [ %195, %192 ], [ 0, %174 ]
%181 = phi i32 [ %194, %192 ], [ 0, %174 ]
%182 = icmp eq i32 %181, 0
br i1 %182, label %183, label %192
183: ; preds = %179
%184 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %180
%185 = load i32, i32* %184
%186 = icmp slt i32 %185, 5
br i1 %186, label %192, label %187
187: ; preds = %183
%188 = or i64 %180, 1
%189 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %188
%190 = load i32, i32* %189
%191 = icmp slt i32 %190, 5
br label %192
192: ; preds = %179, %187, %183
%193 = phi i1 [ true, %183 ], [ %191, %187 ], [ true, %179 ]
%194 = zext i1 %193 to i32
%195 = add nuw nsw i64 %180, 2
%196 = icmp eq i64 %195, 1000
br i1 %196, label %197, label %179
197: ; preds = %192
%198 = xor i1 %175, %193
br i1 %198, label %199, label %201
199: ; preds = %197
%200 = tail call i32 (...) @abort()
unreachable
201: ; preds = %197, %214
%202 = phi i64 [ %217, %214 ], [ 0, %197 ]
%203 = phi i32 [ %216, %214 ], [ 1, %197 ]
%204 = icmp eq i32 %203, 0
br i1 %204, label %214, label %205
205: ; preds = %201
%206 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %202
%207 = load i32, i32* %206
%208 = icmp slt i32 %207, 5
br i1 %208, label %209, label %214
209: ; preds = %205
%210 = or i64 %202, 1
%211 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %210
%212 = load i32, i32* %211
%213 = icmp slt i32 %212, 5
br label %214
214: ; preds = %201, %209, %205
%215 = phi i1 [ false, %205 ], [ %213, %209 ], [ false, %201 ]
%216 = zext i1 %215 to i32
%217 = add nuw nsw i64 %202, 2
%218 = icmp eq i64 %217, 1000
br i1 %218, label %219, label %201
219: ; preds = %214, %232
%220 = phi i64 [ %235, %232 ], [ 0, %214 ]
%221 = phi i32 [ %234, %232 ], [ 1, %214 ]
%222 = icmp eq i32 %221, 0
br i1 %222, label %232, label %223
223: ; preds = %219
%224 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %220
%225 = load i32, i32* %224
%226 = icmp slt i32 %225, 5
br i1 %226, label %227, label %232
227: ; preds = %223
%228 = or i64 %220, 1
%229 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %228
%230 = load i32, i32* %229
%231 = icmp slt i32 %230, 5
br label %232
232: ; preds = %219, %227, %223
%233 = phi i1 [ false, %223 ], [ %231, %227 ], [ false, %219 ]
%234 = zext i1 %233 to i32
%235 = add nuw nsw i64 %220, 2
%236 = icmp eq i64 %235, 1000
br i1 %236, label %237, label %219
237: ; preds = %232
%238 = xor i1 %215, %233
br i1 %238, label %239, label %241
239: ; preds = %237
%240 = tail call i32 (...) @abort()
unreachable
241: ; preds = %237, %254
%242 = phi i64 [ %257, %254 ], [ 0, %237 ]
%243 = phi i32 [ %256, %254 ], [ 0, %237 ]
%244 = icmp eq i32 %243, 0
br i1 %244, label %245, label %254
245: ; preds = %241
%246 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %242
%247 = load i32, i32* %246
%248 = icmp slt i32 %247, 5
br i1 %248, label %254, label %249
249: ; preds = %245
%250 = or i64 %242, 1
%251 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %250
%252 = load i32, i32* %251
%253 = icmp slt i32 %252, 5
br label %254
254: ; preds = %241, %249, %245
%255 = phi i1 [ true, %245 ], [ %253, %249 ], [ true, %241 ]
%256 = zext i1 %255 to i32
%257 = add nuw nsw i64 %242, 2
%258 = icmp eq i64 %257, 1000
br i1 %258, label %259, label %241
259: ; preds = %254, %272
%260 = phi i64 [ %275, %272 ], [ 0, %254 ]
%261 = phi i32 [ %274, %272 ], [ 0, %254 ]
%262 = icmp eq i32 %261, 0
br i1 %262, label %263, label %272
263: ; preds = %259
%264 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %260
%265 = load i32, i32* %264
%266 = icmp slt i32 %265, 5
br i1 %266, label %272, label %267
267: ; preds = %263
%268 = or i64 %260, 1
%269 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %268
%270 = load i32, i32* %269
%271 = icmp slt i32 %270, 5
br label %272
272: ; preds = %259, %267, %263
%273 = phi i1 [ true, %263 ], [ %271, %267 ], [ true, %259 ]
%274 = zext i1 %273 to i32
%275 = add nuw nsw i64 %260, 2
%276 = icmp eq i64 %275, 1000
br i1 %276, label %277, label %259
277: ; preds = %272
%278 = xor i1 %255, %273
br i1 %278, label %279, label %281
279: ; preds = %277
%280 = tail call i32 (...) @abort()
unreachable
281: ; preds = %277, %294
%282 = phi i64 [ %297, %294 ], [ 0, %277 ]
%283 = phi i32 [ %296, %294 ], [ 1, %277 ]
%284 = icmp eq i32 %283, 0
br i1 %284, label %294, label %285
285: ; preds = %281
%286 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %282
%287 = load i32, i32* %286
%288 = icmp slt i32 %287, 5
br i1 %288, label %289, label %294
289: ; preds = %285
%290 = or i64 %282, 1
%291 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %290
%292 = load i32, i32* %291
%293 = icmp slt i32 %292, 5
br label %294
294: ; preds = %281, %289, %285
%295 = phi i1 [ false, %285 ], [ %293, %289 ], [ false, %281 ]
%296 = zext i1 %295 to i32
%297 = add nuw nsw i64 %282, 2
%298 = icmp eq i64 %297, 1000
br i1 %298, label %299, label %281
299: ; preds = %294, %312
%300 = phi i64 [ %315, %312 ], [ 0, %294 ]
%301 = phi i32 [ %314, %312 ], [ 1, %294 ]
%302 = icmp eq i32 %301, 0
br i1 %302, label %312, label %303
303: ; preds = %299
%304 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %300
%305 = load i32, i32* %304
%306 = icmp slt i32 %305, 5
br i1 %306, label %307, label %312
307: ; preds = %303
%308 = or i64 %300, 1
%309 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %308
%310 = load i32, i32* %309
%311 = icmp slt i32 %310, 5
br label %312
312: ; preds = %299, %307, %303
%313 = phi i1 [ false, %303 ], [ %311, %307 ], [ false, %299 ]
%314 = zext i1 %313 to i32
%315 = add nuw nsw i64 %300, 2
%316 = icmp eq i64 %315, 1000
br i1 %316, label %317, label %299
317: ; preds = %312
%318 = xor i1 %295, %313
br i1 %318, label %319, label %321
319: ; preds = %317
%320 = tail call i32 (...) @abort()
unreachable
321: ; preds = %317, %334
%322 = phi i64 [ %337, %334 ], [ 0, %317 ]
%323 = phi i32 [ %336, %334 ], [ 0, %317 ]
%324 = icmp eq i32 %323, 0
br i1 %324, label %325, label %334
325: ; preds = %321
%326 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %322
%327 = load i32, i32* %326
%328 = icmp slt i32 %327, 5
br i1 %328, label %334, label %329
329: ; preds = %325
%330 = or i64 %322, 1
%331 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %330
%332 = load i32, i32* %331
%333 = icmp slt i32 %332, 5
br label %334
334: ; preds = %321, %329, %325
%335 = phi i1 [ true, %325 ], [ %333, %329 ], [ true, %321 ]
%336 = zext i1 %335 to i32
%337 = add nuw nsw i64 %322, 2
%338 = icmp eq i64 %337, 1000
br i1 %338, label %339, label %321
339: ; preds = %334, %352
%340 = phi i64 [ %355, %352 ], [ 0, %334 ]
%341 = phi i32 [ %354, %352 ], [ 0, %334 ]
%342 = icmp eq i32 %341, 0
br i1 %342, label %343, label %352
343: ; preds = %339
%344 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %340
%345 = load i32, i32* %344
%346 = icmp slt i32 %345, 5
br i1 %346, label %352, label %347
347: ; preds = %343
%348 = or i64 %340, 1
%349 = getelementptr inbounds [1000 x i32], [1000 x i32]* %1, i64 0, i64 %348
%350 = load i32, i32* %349
%351 = icmp slt i32 %350, 5
br label %352
352: ; preds = %339, %347, %343
%353 = phi i1 [ true, %343 ], [ %351, %347 ], [ true, %339 ]
%354 = zext i1 %353 to i32
%355 = add nuw nsw i64 %340, 2
%356 = icmp eq i64 %355, 1000
br i1 %356, label %357, label %339
357: ; preds = %352
%358 = xor i1 %335, %353
br i1 %358, label %359, label %361
359: ; preds = %357
%360 = tail call i32 (...) @abort()
unreachable
361: ; preds = %357
ret void
}