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

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

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

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

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

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

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

#pragma acc loop gang worker vector reduction(min : res)
    for (i = 0; i < n; i++)
      res = (((res) < ((array[i]))) ? (res) : ((array[i])));
    vres = (n + 1);
    for (i = 0; i < n; i++)
      vres = (((vres) < ((array[i]))) ? (vres) : ((array[i])));
    if (res != vres)
      abort();
  };
  {
    double 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(max : res)
    for (i = 0; i < n; i++)
      res = (((res) > ((array[i]))) ? (res) : ((array[i])));
    vres = (-1);
    for (i = 0; i < n; i++)
      vres = (((vres) > ((array[i]))) ? (vres) : ((array[i])));
    if (res != vres)
      abort();
  };
}


x86 assembly (clang, -O0):
<test_reductions_minmax>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2050,%rsp
movl   $0x3e8,-0x4(%rbp)
mov    %rsp,%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    115d <test_reductions_minmax+0x4d>
cvtsi2sdl -0x8(%rbp),%xmm0
movslq -0x8(%rbp),%rax
movsd  %xmm0,-0x1fd0(%rbp,%rax,8)
ff ff
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1130 <test_reductions_minmax+0x20>
movsd  0xe9b(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    11dc <test_reductions_minmax+0xcc>
movsd  -0x18(%rbp),%xmm1
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
ucomisd %xmm1,%xmm0
jbe    11ac <test_reductions_minmax+0x9c>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x1fd8(%rbp)
ff
jmp    11c1 <test_reductions_minmax+0xb1>
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x1fd8(%rbp)
ff
movsd  -0x1fd8(%rbp),%xmm0
ff
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1171 <test_reductions_minmax+0x61>
movsd  0xe1c(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    125b <test_reductions_minmax+0x14b>
movsd  -0x20(%rbp),%xmm1
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
ucomisd %xmm1,%xmm0
jbe    122b <test_reductions_minmax+0x11b>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x1fe0(%rbp)
ff
jmp    1240 <test_reductions_minmax+0x130>
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x1fe0(%rbp)
ff
movsd  -0x1fe0(%rbp),%xmm0
ff
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11f0 <test_reductions_minmax+0xe0>
movsd  -0x18(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jne    1276 <test_reductions_minmax+0x166>
jp     1276 <test_reductions_minmax+0x166>
jmp    127d <test_reductions_minmax+0x16d>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  0xd83(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    12f8 <test_reductions_minmax+0x1e8>
movsd  -0x28(%rbp),%xmm0
movslq -0x8(%rbp),%rax
ucomisd -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
jbe    12c8 <test_reductions_minmax+0x1b8>
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x1fe8(%rbp)
ff
jmp    12dd <test_reductions_minmax+0x1cd>
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x1fe8(%rbp)
ff
movsd  -0x1fe8(%rbp),%xmm0
ff
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1291 <test_reductions_minmax+0x181>
movsd  0xd08(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1373 <test_reductions_minmax+0x263>
movsd  -0x30(%rbp),%xmm0
movslq -0x8(%rbp),%rax
ucomisd -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
jbe    1343 <test_reductions_minmax+0x233>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x1ff0(%rbp)
ff
jmp    1358 <test_reductions_minmax+0x248>
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x1ff0(%rbp)
ff
movsd  -0x1ff0(%rbp),%xmm0
ff
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    130c <test_reductions_minmax+0x1fc>
movsd  -0x28(%rbp),%xmm0
ucomisd -0x30(%rbp),%xmm0
jne    138e <test_reductions_minmax+0x27e>
jp     138e <test_reductions_minmax+0x27e>
jmp    1395 <test_reductions_minmax+0x285>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  0xc63(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1414 <test_reductions_minmax+0x304>
movsd  -0x38(%rbp),%xmm1
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
ucomisd %xmm1,%xmm0
jbe    13e4 <test_reductions_minmax+0x2d4>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x1ff8(%rbp)
ff
jmp    13f9 <test_reductions_minmax+0x2e9>
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x1ff8(%rbp)
ff
movsd  -0x1ff8(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    13a9 <test_reductions_minmax+0x299>
movsd  0xbe4(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1493 <test_reductions_minmax+0x383>
movsd  -0x40(%rbp),%xmm1
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
ucomisd %xmm1,%xmm0
jbe    1463 <test_reductions_minmax+0x353>
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x2000(%rbp)
ff
jmp    1478 <test_reductions_minmax+0x368>
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x2000(%rbp)
ff
movsd  -0x2000(%rbp),%xmm0
ff
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1428 <test_reductions_minmax+0x318>
movsd  -0x38(%rbp),%xmm0
ucomisd -0x40(%rbp),%xmm0
jne    14ae <test_reductions_minmax+0x39e>
jp     14ae <test_reductions_minmax+0x39e>
jmp    14b5 <test_reductions_minmax+0x3a5>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  0xb4b(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1530 <test_reductions_minmax+0x420>
movsd  -0x48(%rbp),%xmm0
movslq -0x8(%rbp),%rax
ucomisd -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
jbe    1500 <test_reductions_minmax+0x3f0>
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x2008(%rbp)
ff
jmp    1515 <test_reductions_minmax+0x405>
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x2008(%rbp)
ff
movsd  -0x2008(%rbp),%xmm0
ff
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    14c9 <test_reductions_minmax+0x3b9>
movsd  0xad0(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    15ab <test_reductions_minmax+0x49b>
movsd  -0x50(%rbp),%xmm0
movslq -0x8(%rbp),%rax
ucomisd -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
jbe    157b <test_reductions_minmax+0x46b>
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x2010(%rbp)
ff
jmp    1590 <test_reductions_minmax+0x480>
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x2010(%rbp)
ff
movsd  -0x2010(%rbp),%xmm0
ff
movsd  %xmm0,-0x50(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1544 <test_reductions_minmax+0x434>
movsd  -0x48(%rbp),%xmm0
ucomisd -0x50(%rbp),%xmm0
jne    15c6 <test_reductions_minmax+0x4b6>
jp     15c6 <test_reductions_minmax+0x4b6>
jmp    15cd <test_reductions_minmax+0x4bd>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  0xa2b(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    164c <test_reductions_minmax+0x53c>
movsd  -0x58(%rbp),%xmm1
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
ucomisd %xmm1,%xmm0
jbe    161c <test_reductions_minmax+0x50c>
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x2018(%rbp)
ff
jmp    1631 <test_reductions_minmax+0x521>
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x2018(%rbp)
ff
movsd  -0x2018(%rbp),%xmm0
ff
movsd  %xmm0,-0x58(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    15e1 <test_reductions_minmax+0x4d1>
movsd  0x9ac(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    16cb <test_reductions_minmax+0x5bb>
movsd  -0x60(%rbp),%xmm1
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
ucomisd %xmm1,%xmm0
jbe    169b <test_reductions_minmax+0x58b>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x2020(%rbp)
ff
jmp    16b0 <test_reductions_minmax+0x5a0>
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x2020(%rbp)
ff
movsd  -0x2020(%rbp),%xmm0
ff
movsd  %xmm0,-0x60(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1660 <test_reductions_minmax+0x550>
movsd  -0x58(%rbp),%xmm0
ucomisd -0x60(%rbp),%xmm0
jne    16e6 <test_reductions_minmax+0x5d6>
jp     16e6 <test_reductions_minmax+0x5d6>
jmp    16ed <test_reductions_minmax+0x5dd>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  0x913(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1768 <test_reductions_minmax+0x658>
movsd  -0x68(%rbp),%xmm0
movslq -0x8(%rbp),%rax
ucomisd -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
jbe    1738 <test_reductions_minmax+0x628>
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x2028(%rbp)
ff
jmp    174d <test_reductions_minmax+0x63d>
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x2028(%rbp)
ff
movsd  -0x2028(%rbp),%xmm0
ff
movsd  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1701 <test_reductions_minmax+0x5f1>
movsd  0x898(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    17e3 <test_reductions_minmax+0x6d3>
movsd  -0x70(%rbp),%xmm0
movslq -0x8(%rbp),%rax
ucomisd -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
jbe    17b3 <test_reductions_minmax+0x6a3>
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x2030(%rbp)
ff
jmp    17c8 <test_reductions_minmax+0x6b8>
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x2030(%rbp)
ff
movsd  -0x2030(%rbp),%xmm0
ff
movsd  %xmm0,-0x70(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    177c <test_reductions_minmax+0x66c>
movsd  -0x68(%rbp),%xmm0
ucomisd -0x70(%rbp),%xmm0
jne    17fe <test_reductions_minmax+0x6ee>
jp     17fe <test_reductions_minmax+0x6ee>
jmp    1805 <test_reductions_minmax+0x6f5>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  0x7f3(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1884 <test_reductions_minmax+0x774>
movsd  -0x78(%rbp),%xmm1
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
ucomisd %xmm1,%xmm0
jbe    1854 <test_reductions_minmax+0x744>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x2038(%rbp)
ff
jmp    1869 <test_reductions_minmax+0x759>
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x2038(%rbp)
ff
movsd  -0x2038(%rbp),%xmm0
ff
movsd  %xmm0,-0x78(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1819 <test_reductions_minmax+0x709>
movsd  0x774(%rip),%xmm0
movsd  %xmm0,-0x80(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1903 <test_reductions_minmax+0x7f3>
movsd  -0x80(%rbp),%xmm1
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
ucomisd %xmm1,%xmm0
jbe    18d3 <test_reductions_minmax+0x7c3>
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x2040(%rbp)
ff
jmp    18e8 <test_reductions_minmax+0x7d8>
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x2040(%rbp)
ff
movsd  -0x2040(%rbp),%xmm0
ff
movsd  %xmm0,-0x80(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1898 <test_reductions_minmax+0x788>
movsd  -0x78(%rbp),%xmm0
ucomisd -0x80(%rbp),%xmm0
jne    191e <test_reductions_minmax+0x80e>
jp     191e <test_reductions_minmax+0x80e>
jmp    1925 <test_reductions_minmax+0x815>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  0x6db(%rip),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    19ac <test_reductions_minmax+0x89c>
movsd  -0x88(%rbp),%xmm0
ff
movslq -0x8(%rbp),%rax
ucomisd -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
jbe    1979 <test_reductions_minmax+0x869>
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x2048(%rbp)
ff
jmp    198e <test_reductions_minmax+0x87e>
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x2048(%rbp)
ff
movsd  -0x2048(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    193c <test_reductions_minmax+0x82c>
movsd  0x654(%rip),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1a33 <test_reductions_minmax+0x923>
movsd  -0x90(%rbp),%xmm0
ff
movslq -0x8(%rbp),%rax
ucomisd -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
jbe    1a00 <test_reductions_minmax+0x8f0>
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x2050(%rbp)
ff
jmp    1a15 <test_reductions_minmax+0x905>
movslq -0x8(%rbp),%rax
movsd  -0x1fd0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x2050(%rbp)
ff
movsd  -0x2050(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    19c3 <test_reductions_minmax+0x8b3>
movsd  -0x88(%rbp),%xmm0
ff
ucomisd -0x90(%rbp),%xmm0
ff
jne    1a54 <test_reductions_minmax+0x944>
jp     1a54 <test_reductions_minmax+0x944>
jmp    1a5b <test_reductions_minmax+0x94b>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
add    $0x2050,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_reductions_minmax>:
sub    $0x1f48,%rsp
movdqa 0xee1(%rip),%xmm0
mov    $0x6,%eax
movdqa 0xee4(%rip),%xmm1
movdqa 0xeec(%rip),%xmm2
movdqa 0xef4(%rip),%xmm3
movdqa 0xefc(%rip),%xmm4
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movdqa %xmm0,%xmm5
cvtdq2pd %xmm0,%xmm6
paddd  %xmm1,%xmm5
cvtdq2pd %xmm5,%xmm5
movaps %xmm6,-0x30(%rsp,%rax,8)
movaps %xmm5,-0x20(%rsp,%rax,8)
movdqa %xmm0,%xmm5
paddd  %xmm2,%xmm5
movdqa %xmm0,%xmm6
cvtdq2pd %xmm5,%xmm5
paddd  %xmm3,%xmm6
cvtdq2pd %xmm6,%xmm6
movaps %xmm5,-0x10(%rsp,%rax,8)
movaps %xmm6,(%rsp,%rax,8)
paddd  %xmm4,%xmm0
add    $0x8,%rax
cmp    $0x3ee,%rax
jne    1150 <test_reductions_minmax+0x40>
movsd  0xead(%rip),%xmm0
mov    $0x4,%eax
nopl   0x0(%rax,%rax,1)
minsd  -0x20(%rsp,%rax,8),%xmm0
minsd  -0x18(%rsp,%rax,8),%xmm0
minsd  -0x10(%rsp,%rax,8),%xmm0
minsd  -0x8(%rsp,%rax,8),%xmm0
minsd  (%rsp,%rax,8),%xmm0
add    $0x5,%rax
cmp    $0x3ec,%rax
jne    11b0 <test_reductions_minmax+0xa0>
movsd  0xe6f(%rip),%xmm1
mov    $0x4,%eax
cs nopw 0x0(%rax,%rax,1)
minsd  -0x20(%rsp,%rax,8),%xmm1
minsd  -0x18(%rsp,%rax,8),%xmm1
minsd  -0x10(%rsp,%rax,8),%xmm1
minsd  -0x8(%rsp,%rax,8),%xmm1
minsd  (%rsp,%rax,8),%xmm1
add    $0x5,%rax
cmp    $0x3ec,%rax
jne    11f0 <test_reductions_minmax+0xe0>
ucomisd %xmm1,%xmm0
jne    1619 <test_reductions_minmax+0x509>
jp     1619 <test_reductions_minmax+0x509>
movsd  0xe27(%rip),%xmm0
mov    $0x4,%eax
cs nopw 0x0(%rax,%rax,1)
maxsd  -0x20(%rsp,%rax,8),%xmm0
maxsd  -0x18(%rsp,%rax,8),%xmm0
maxsd  -0x10(%rsp,%rax,8),%xmm0
maxsd  -0x8(%rsp,%rax,8),%xmm0
maxsd  (%rsp,%rax,8),%xmm0
add    $0x5,%rax
cmp    $0x3ec,%rax
jne    1240 <test_reductions_minmax+0x130>
movsd  0xde7(%rip),%xmm1
mov    $0x4,%eax
cs nopw 0x0(%rax,%rax,1)
maxsd  -0x20(%rsp,%rax,8),%xmm1
maxsd  -0x18(%rsp,%rax,8),%xmm1
maxsd  -0x10(%rsp,%rax,8),%xmm1
maxsd  -0x8(%rsp,%rax,8),%xmm1
maxsd  (%rsp,%rax,8),%xmm1
add    $0x5,%rax
cmp    $0x3ec,%rax
jne    1280 <test_reductions_minmax+0x170>
ucomisd %xmm1,%xmm0
jne    1619 <test_reductions_minmax+0x509>
jp     1619 <test_reductions_minmax+0x509>
movsd  0xd8f(%rip),%xmm0
mov    $0x4,%eax
cs nopw 0x0(%rax,%rax,1)
minsd  -0x20(%rsp,%rax,8),%xmm0
minsd  -0x18(%rsp,%rax,8),%xmm0
minsd  -0x10(%rsp,%rax,8),%xmm0
minsd  -0x8(%rsp,%rax,8),%xmm0
minsd  (%rsp,%rax,8),%xmm0
add    $0x5,%rax
cmp    $0x3ec,%rax
jne    12d0 <test_reductions_minmax+0x1c0>
movsd  0xd4f(%rip),%xmm1
mov    $0x4,%eax
cs nopw 0x0(%rax,%rax,1)
minsd  -0x20(%rsp,%rax,8),%xmm1
minsd  -0x18(%rsp,%rax,8),%xmm1
minsd  -0x10(%rsp,%rax,8),%xmm1
minsd  -0x8(%rsp,%rax,8),%xmm1
minsd  (%rsp,%rax,8),%xmm1
add    $0x5,%rax
cmp    $0x3ec,%rax
jne    1310 <test_reductions_minmax+0x200>
ucomisd %xmm1,%xmm0
jne    1619 <test_reductions_minmax+0x509>
jp     1619 <test_reductions_minmax+0x509>
movsd  0xd07(%rip),%xmm0
mov    $0x4,%eax
cs nopw 0x0(%rax,%rax,1)
maxsd  -0x20(%rsp,%rax,8),%xmm0
maxsd  -0x18(%rsp,%rax,8),%xmm0
maxsd  -0x10(%rsp,%rax,8),%xmm0
maxsd  -0x8(%rsp,%rax,8),%xmm0
maxsd  (%rsp,%rax,8),%xmm0
add    $0x5,%rax
cmp    $0x3ec,%rax
jne    1360 <test_reductions_minmax+0x250>
movsd  0xcc7(%rip),%xmm1
mov    $0x4,%eax
cs nopw 0x0(%rax,%rax,1)
maxsd  -0x20(%rsp,%rax,8),%xmm1
maxsd  -0x18(%rsp,%rax,8),%xmm1
maxsd  -0x10(%rsp,%rax,8),%xmm1
maxsd  -0x8(%rsp,%rax,8),%xmm1
maxsd  (%rsp,%rax,8),%xmm1
add    $0x5,%rax
cmp    $0x3ec,%rax
jne    13a0 <test_reductions_minmax+0x290>
ucomisd %xmm1,%xmm0
jne    1619 <test_reductions_minmax+0x509>
jp     1619 <test_reductions_minmax+0x509>
movsd  0xc6f(%rip),%xmm0
mov    $0x4,%eax
cs nopw 0x0(%rax,%rax,1)
minsd  -0x20(%rsp,%rax,8),%xmm0
minsd  -0x18(%rsp,%rax,8),%xmm0
minsd  -0x10(%rsp,%rax,8),%xmm0
minsd  -0x8(%rsp,%rax,8),%xmm0
minsd  (%rsp,%rax,8),%xmm0
add    $0x5,%rax
cmp    $0x3ec,%rax
jne    13f0 <test_reductions_minmax+0x2e0>
movsd  0xc2f(%rip),%xmm1
mov    $0x4,%eax
cs nopw 0x0(%rax,%rax,1)
minsd  -0x20(%rsp,%rax,8),%xmm1
minsd  -0x18(%rsp,%rax,8),%xmm1
minsd  -0x10(%rsp,%rax,8),%xmm1
minsd  -0x8(%rsp,%rax,8),%xmm1
minsd  (%rsp,%rax,8),%xmm1
add    $0x5,%rax
cmp    $0x3ec,%rax
jne    1430 <test_reductions_minmax+0x320>
ucomisd %xmm1,%xmm0
jne    1619 <test_reductions_minmax+0x509>
jp     1619 <test_reductions_minmax+0x509>
movsd  0xbe7(%rip),%xmm0
mov    $0x4,%eax
cs nopw 0x0(%rax,%rax,1)
maxsd  -0x20(%rsp,%rax,8),%xmm0
maxsd  -0x18(%rsp,%rax,8),%xmm0
maxsd  -0x10(%rsp,%rax,8),%xmm0
maxsd  -0x8(%rsp,%rax,8),%xmm0
maxsd  (%rsp,%rax,8),%xmm0
add    $0x5,%rax
cmp    $0x3ec,%rax
jne    1480 <test_reductions_minmax+0x370>
movsd  0xba7(%rip),%xmm1
mov    $0x4,%eax
cs nopw 0x0(%rax,%rax,1)
maxsd  -0x20(%rsp,%rax,8),%xmm1
maxsd  -0x18(%rsp,%rax,8),%xmm1
maxsd  -0x10(%rsp,%rax,8),%xmm1
maxsd  -0x8(%rsp,%rax,8),%xmm1
maxsd  (%rsp,%rax,8),%xmm1
add    $0x5,%rax
cmp    $0x3ec,%rax
jne    14c0 <test_reductions_minmax+0x3b0>
ucomisd %xmm1,%xmm0
jne    1619 <test_reductions_minmax+0x509>
jp     1619 <test_reductions_minmax+0x509>
movsd  0xb4f(%rip),%xmm0
mov    $0x4,%eax
cs nopw 0x0(%rax,%rax,1)
minsd  -0x20(%rsp,%rax,8),%xmm0
minsd  -0x18(%rsp,%rax,8),%xmm0
minsd  -0x10(%rsp,%rax,8),%xmm0
minsd  -0x8(%rsp,%rax,8),%xmm0
minsd  (%rsp,%rax,8),%xmm0
add    $0x5,%rax
cmp    $0x3ec,%rax
jne    1510 <test_reductions_minmax+0x400>
movsd  0xb0f(%rip),%xmm1
mov    $0x4,%eax
cs nopw 0x0(%rax,%rax,1)
minsd  -0x20(%rsp,%rax,8),%xmm1
minsd  -0x18(%rsp,%rax,8),%xmm1
minsd  -0x10(%rsp,%rax,8),%xmm1
minsd  -0x8(%rsp,%rax,8),%xmm1
minsd  (%rsp,%rax,8),%xmm1
add    $0x5,%rax
cmp    $0x3ec,%rax
jne    1550 <test_reductions_minmax+0x440>
ucomisd %xmm1,%xmm0
jne    1619 <test_reductions_minmax+0x509>
jp     1619 <test_reductions_minmax+0x509>
movsd  0xac7(%rip),%xmm0
mov    $0x4,%eax
cs nopw 0x0(%rax,%rax,1)
maxsd  -0x20(%rsp,%rax,8),%xmm0
maxsd  -0x18(%rsp,%rax,8),%xmm0
maxsd  -0x10(%rsp,%rax,8),%xmm0
maxsd  -0x8(%rsp,%rax,8),%xmm0
maxsd  (%rsp,%rax,8),%xmm0
add    $0x5,%rax
cmp    $0x3ec,%rax
jne    15a0 <test_reductions_minmax+0x490>
movsd  0xa87(%rip),%xmm1
mov    $0x4,%eax
cs nopw 0x0(%rax,%rax,1)
maxsd  -0x20(%rsp,%rax,8),%xmm1
maxsd  -0x18(%rsp,%rax,8),%xmm1
maxsd  -0x10(%rsp,%rax,8),%xmm1
maxsd  -0x8(%rsp,%rax,8),%xmm1
maxsd  (%rsp,%rax,8),%xmm1
add    $0x5,%rax
cmp    $0x3ec,%rax
jne    15e0 <test_reductions_minmax+0x4d0>
ucomisd %xmm1,%xmm0
jne    1619 <test_reductions_minmax+0x509>
jp     1619 <test_reductions_minmax+0x509>
add    $0x1f48,%rsp
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define void @test_reductions_minmax() {
%1 = alloca [1000 x double]
br label %2
2: ; preds = %2, %0
%3 = phi i64 [ 0, %0 ], [ %21, %2 ]
%4 = phi <2 x i32> [ <i32 0, i32 1>, %0 ], [ %22, %2 ]
%5 = add <2 x i32> %4, <i32 2, i32 2>
%6 = sitofp <2 x i32> %4 to <2 x double>
%7 = sitofp <2 x i32> %5 to <2 x double>
%8 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %3
%9 = bitcast double* %8 to <2 x double>*
store <2 x double> %6, <2 x double>* %9
%10 = getelementptr inbounds double, double* %8, i64 2
%11 = bitcast double* %10 to <2 x double>*
store <2 x double> %7, <2 x double>* %11
%12 = or i64 %3, 4
%13 = add <2 x i32> %4, <i32 4, i32 4>
%14 = add <2 x i32> %4, <i32 6, i32 6>
%15 = sitofp <2 x i32> %13 to <2 x double>
%16 = sitofp <2 x i32> %14 to <2 x double>
%17 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %12
%18 = bitcast double* %17 to <2 x double>*
store <2 x double> %15, <2 x double>* %18
%19 = getelementptr inbounds double, double* %17, i64 2
%20 = bitcast double* %19 to <2 x double>*
store <2 x double> %16, <2 x double>* %20
%21 = add nuw nsw i64 %3, 8
%22 = add <2 x i32> %4, <i32 8, i32 8>
%23 = icmp eq i64 %21, 1000
br i1 %23, label %24, label %2
24: ; preds = %2, %24
%25 = phi i64 [ %51, %24 ], [ 0, %2 ]
%26 = phi double [ %50, %24 ], [ 1.001000e+03, %2 ]
%27 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %25
%28 = load double, double* %27
%29 = fcmp olt double %26, %28
%30 = select i1 %29, double %26, double %28
%31 = add nuw nsw i64 %25, 1
%32 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %31
%33 = load double, double* %32
%34 = fcmp olt double %30, %33
%35 = select i1 %34, double %30, double %33
%36 = add nuw nsw i64 %25, 2
%37 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %36
%38 = load double, double* %37
%39 = fcmp olt double %35, %38
%40 = select i1 %39, double %35, double %38
%41 = add nuw nsw i64 %25, 3
%42 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %41
%43 = load double, double* %42
%44 = fcmp olt double %40, %43
%45 = select i1 %44, double %40, double %43
%46 = add nuw nsw i64 %25, 4
%47 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %46
%48 = load double, double* %47
%49 = fcmp olt double %45, %48
%50 = select i1 %49, double %45, double %48
%51 = add nuw nsw i64 %25, 5
%52 = icmp eq i64 %51, 1000
br i1 %52, label %53, label %24
53: ; preds = %24, %53
%54 = phi i64 [ %80, %53 ], [ 0, %24 ]
%55 = phi double [ %79, %53 ], [ 1.001000e+03, %24 ]
%56 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %54
%57 = load double, double* %56
%58 = fcmp olt double %55, %57
%59 = select i1 %58, double %55, double %57
%60 = add nuw nsw i64 %54, 1
%61 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %60
%62 = load double, double* %61
%63 = fcmp olt double %59, %62
%64 = select i1 %63, double %59, double %62
%65 = add nuw nsw i64 %54, 2
%66 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %65
%67 = load double, double* %66
%68 = fcmp olt double %64, %67
%69 = select i1 %68, double %64, double %67
%70 = add nuw nsw i64 %54, 3
%71 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %70
%72 = load double, double* %71
%73 = fcmp olt double %69, %72
%74 = select i1 %73, double %69, double %72
%75 = add nuw nsw i64 %54, 4
%76 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %75
%77 = load double, double* %76
%78 = fcmp olt double %74, %77
%79 = select i1 %78, double %74, double %77
%80 = add nuw nsw i64 %54, 5
%81 = icmp eq i64 %80, 1000
br i1 %81, label %82, label %53
82: ; preds = %53
%83 = fcmp une double %50, %79
br i1 %83, label %84, label %86
84: ; preds = %82
%85 = tail call i32 (...) @abort()
unreachable
86: ; preds = %82, %86
%87 = phi i64 [ %113, %86 ], [ 0, %82 ]
%88 = phi double [ %112, %86 ], [ -1.000000e+00, %82 ]
%89 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %87
%90 = load double, double* %89
%91 = fcmp ogt double %88, %90
%92 = select i1 %91, double %88, double %90
%93 = add nuw nsw i64 %87, 1
%94 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %93
%95 = load double, double* %94
%96 = fcmp ogt double %92, %95
%97 = select i1 %96, double %92, double %95
%98 = add nuw nsw i64 %87, 2
%99 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %98
%100 = load double, double* %99
%101 = fcmp ogt double %97, %100
%102 = select i1 %101, double %97, double %100
%103 = add nuw nsw i64 %87, 3
%104 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %103
%105 = load double, double* %104
%106 = fcmp ogt double %102, %105
%107 = select i1 %106, double %102, double %105
%108 = add nuw nsw i64 %87, 4
%109 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %108
%110 = load double, double* %109
%111 = fcmp ogt double %107, %110
%112 = select i1 %111, double %107, double %110
%113 = add nuw nsw i64 %87, 5
%114 = icmp eq i64 %113, 1000
br i1 %114, label %115, label %86
115: ; preds = %86, %115
%116 = phi i64 [ %142, %115 ], [ 0, %86 ]
%117 = phi double [ %141, %115 ], [ -1.000000e+00, %86 ]
%118 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %116
%119 = load double, double* %118
%120 = fcmp ogt double %117, %119
%121 = select i1 %120, double %117, double %119
%122 = add nuw nsw i64 %116, 1
%123 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %122
%124 = load double, double* %123
%125 = fcmp ogt double %121, %124
%126 = select i1 %125, double %121, double %124
%127 = add nuw nsw i64 %116, 2
%128 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %127
%129 = load double, double* %128
%130 = fcmp ogt double %126, %129
%131 = select i1 %130, double %126, double %129
%132 = add nuw nsw i64 %116, 3
%133 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %132
%134 = load double, double* %133
%135 = fcmp ogt double %131, %134
%136 = select i1 %135, double %131, double %134
%137 = add nuw nsw i64 %116, 4
%138 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %137
%139 = load double, double* %138
%140 = fcmp ogt double %136, %139
%141 = select i1 %140, double %136, double %139
%142 = add nuw nsw i64 %116, 5
%143 = icmp eq i64 %142, 1000
br i1 %143, label %144, label %115
144: ; preds = %115
%145 = fcmp une double %112, %141
br i1 %145, label %146, label %148
146: ; preds = %144
%147 = tail call i32 (...) @abort()
unreachable
148: ; preds = %144, %148
%149 = phi i64 [ %175, %148 ], [ 0, %144 ]
%150 = phi double [ %174, %148 ], [ 1.001000e+03, %144 ]
%151 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %149
%152 = load double, double* %151
%153 = fcmp olt double %150, %152
%154 = select i1 %153, double %150, double %152
%155 = add nuw nsw i64 %149, 1
%156 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %155
%157 = load double, double* %156
%158 = fcmp olt double %154, %157
%159 = select i1 %158, double %154, double %157
%160 = add nuw nsw i64 %149, 2
%161 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %160
%162 = load double, double* %161
%163 = fcmp olt double %159, %162
%164 = select i1 %163, double %159, double %162
%165 = add nuw nsw i64 %149, 3
%166 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %165
%167 = load double, double* %166
%168 = fcmp olt double %164, %167
%169 = select i1 %168, double %164, double %167
%170 = add nuw nsw i64 %149, 4
%171 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %170
%172 = load double, double* %171
%173 = fcmp olt double %169, %172
%174 = select i1 %173, double %169, double %172
%175 = add nuw nsw i64 %149, 5
%176 = icmp eq i64 %175, 1000
br i1 %176, label %177, label %148
177: ; preds = %148, %177
%178 = phi i64 [ %204, %177 ], [ 0, %148 ]
%179 = phi double [ %203, %177 ], [ 1.001000e+03, %148 ]
%180 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %178
%181 = load double, double* %180
%182 = fcmp olt double %179, %181
%183 = select i1 %182, double %179, double %181
%184 = add nuw nsw i64 %178, 1
%185 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %184
%186 = load double, double* %185
%187 = fcmp olt double %183, %186
%188 = select i1 %187, double %183, double %186
%189 = add nuw nsw i64 %178, 2
%190 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %189
%191 = load double, double* %190
%192 = fcmp olt double %188, %191
%193 = select i1 %192, double %188, double %191
%194 = add nuw nsw i64 %178, 3
%195 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %194
%196 = load double, double* %195
%197 = fcmp olt double %193, %196
%198 = select i1 %197, double %193, double %196
%199 = add nuw nsw i64 %178, 4
%200 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %199
%201 = load double, double* %200
%202 = fcmp olt double %198, %201
%203 = select i1 %202, double %198, double %201
%204 = add nuw nsw i64 %178, 5
%205 = icmp eq i64 %204, 1000
br i1 %205, label %206, label %177
206: ; preds = %177
%207 = fcmp une double %174, %203
br i1 %207, label %208, label %210
208: ; preds = %206
%209 = tail call i32 (...) @abort()
unreachable
210: ; preds = %206, %210
%211 = phi i64 [ %237, %210 ], [ 0, %206 ]
%212 = phi double [ %236, %210 ], [ -1.000000e+00, %206 ]
%213 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %211
%214 = load double, double* %213
%215 = fcmp ogt double %212, %214
%216 = select i1 %215, double %212, double %214
%217 = add nuw nsw i64 %211, 1
%218 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %217
%219 = load double, double* %218
%220 = fcmp ogt double %216, %219
%221 = select i1 %220, double %216, double %219
%222 = add nuw nsw i64 %211, 2
%223 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %222
%224 = load double, double* %223
%225 = fcmp ogt double %221, %224
%226 = select i1 %225, double %221, double %224
%227 = add nuw nsw i64 %211, 3
%228 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %227
%229 = load double, double* %228
%230 = fcmp ogt double %226, %229
%231 = select i1 %230, double %226, double %229
%232 = add nuw nsw i64 %211, 4
%233 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %232
%234 = load double, double* %233
%235 = fcmp ogt double %231, %234
%236 = select i1 %235, double %231, double %234
%237 = add nuw nsw i64 %211, 5
%238 = icmp eq i64 %237, 1000
br i1 %238, label %239, label %210
239: ; preds = %210, %239
%240 = phi i64 [ %266, %239 ], [ 0, %210 ]
%241 = phi double [ %265, %239 ], [ -1.000000e+00, %210 ]
%242 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %240
%243 = load double, double* %242
%244 = fcmp ogt double %241, %243
%245 = select i1 %244, double %241, double %243
%246 = add nuw nsw i64 %240, 1
%247 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %246
%248 = load double, double* %247
%249 = fcmp ogt double %245, %248
%250 = select i1 %249, double %245, double %248
%251 = add nuw nsw i64 %240, 2
%252 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %251
%253 = load double, double* %252
%254 = fcmp ogt double %250, %253
%255 = select i1 %254, double %250, double %253
%256 = add nuw nsw i64 %240, 3
%257 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %256
%258 = load double, double* %257
%259 = fcmp ogt double %255, %258
%260 = select i1 %259, double %255, double %258
%261 = add nuw nsw i64 %240, 4
%262 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %261
%263 = load double, double* %262
%264 = fcmp ogt double %260, %263
%265 = select i1 %264, double %260, double %263
%266 = add nuw nsw i64 %240, 5
%267 = icmp eq i64 %266, 1000
br i1 %267, label %268, label %239
268: ; preds = %239
%269 = fcmp une double %236, %265
br i1 %269, label %270, label %272
270: ; preds = %268
%271 = tail call i32 (...) @abort()
unreachable
272: ; preds = %268, %272
%273 = phi i64 [ %299, %272 ], [ 0, %268 ]
%274 = phi double [ %298, %272 ], [ 1.001000e+03, %268 ]
%275 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %273
%276 = load double, double* %275
%277 = fcmp olt double %274, %276
%278 = select i1 %277, double %274, double %276
%279 = add nuw nsw i64 %273, 1
%280 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %279
%281 = load double, double* %280
%282 = fcmp olt double %278, %281
%283 = select i1 %282, double %278, double %281
%284 = add nuw nsw i64 %273, 2
%285 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %284
%286 = load double, double* %285
%287 = fcmp olt double %283, %286
%288 = select i1 %287, double %283, double %286
%289 = add nuw nsw i64 %273, 3
%290 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %289
%291 = load double, double* %290
%292 = fcmp olt double %288, %291
%293 = select i1 %292, double %288, double %291
%294 = add nuw nsw i64 %273, 4
%295 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %294
%296 = load double, double* %295
%297 = fcmp olt double %293, %296
%298 = select i1 %297, double %293, double %296
%299 = add nuw nsw i64 %273, 5
%300 = icmp eq i64 %299, 1000
br i1 %300, label %301, label %272
301: ; preds = %272, %301
%302 = phi i64 [ %328, %301 ], [ 0, %272 ]
%303 = phi double [ %327, %301 ], [ 1.001000e+03, %272 ]
%304 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %302
%305 = load double, double* %304
%306 = fcmp olt double %303, %305
%307 = select i1 %306, double %303, double %305
%308 = add nuw nsw i64 %302, 1
%309 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %308
%310 = load double, double* %309
%311 = fcmp olt double %307, %310
%312 = select i1 %311, double %307, double %310
%313 = add nuw nsw i64 %302, 2
%314 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %313
%315 = load double, double* %314
%316 = fcmp olt double %312, %315
%317 = select i1 %316, double %312, double %315
%318 = add nuw nsw i64 %302, 3
%319 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %318
%320 = load double, double* %319
%321 = fcmp olt double %317, %320
%322 = select i1 %321, double %317, double %320
%323 = add nuw nsw i64 %302, 4
%324 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %323
%325 = load double, double* %324
%326 = fcmp olt double %322, %325
%327 = select i1 %326, double %322, double %325
%328 = add nuw nsw i64 %302, 5
%329 = icmp eq i64 %328, 1000
br i1 %329, label %330, label %301
330: ; preds = %301
%331 = fcmp une double %298, %327
br i1 %331, label %332, label %334
332: ; preds = %330
%333 = tail call i32 (...) @abort()
unreachable
334: ; preds = %330, %334
%335 = phi i64 [ %361, %334 ], [ 0, %330 ]
%336 = phi double [ %360, %334 ], [ -1.000000e+00, %330 ]
%337 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %335
%338 = load double, double* %337
%339 = fcmp ogt double %336, %338
%340 = select i1 %339, double %336, double %338
%341 = add nuw nsw i64 %335, 1
%342 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %341
%343 = load double, double* %342
%344 = fcmp ogt double %340, %343
%345 = select i1 %344, double %340, double %343
%346 = add nuw nsw i64 %335, 2
%347 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %346
%348 = load double, double* %347
%349 = fcmp ogt double %345, %348
%350 = select i1 %349, double %345, double %348
%351 = add nuw nsw i64 %335, 3
%352 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %351
%353 = load double, double* %352
%354 = fcmp ogt double %350, %353
%355 = select i1 %354, double %350, double %353
%356 = add nuw nsw i64 %335, 4
%357 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %356
%358 = load double, double* %357
%359 = fcmp ogt double %355, %358
%360 = select i1 %359, double %355, double %358
%361 = add nuw nsw i64 %335, 5
%362 = icmp eq i64 %361, 1000
br i1 %362, label %363, label %334
363: ; preds = %334, %363
%364 = phi i64 [ %390, %363 ], [ 0, %334 ]
%365 = phi double [ %389, %363 ], [ -1.000000e+00, %334 ]
%366 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %364
%367 = load double, double* %366
%368 = fcmp ogt double %365, %367
%369 = select i1 %368, double %365, double %367
%370 = add nuw nsw i64 %364, 1
%371 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %370
%372 = load double, double* %371
%373 = fcmp ogt double %369, %372
%374 = select i1 %373, double %369, double %372
%375 = add nuw nsw i64 %364, 2
%376 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %375
%377 = load double, double* %376
%378 = fcmp ogt double %374, %377
%379 = select i1 %378, double %374, double %377
%380 = add nuw nsw i64 %364, 3
%381 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %380
%382 = load double, double* %381
%383 = fcmp ogt double %379, %382
%384 = select i1 %383, double %379, double %382
%385 = add nuw nsw i64 %364, 4
%386 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %385
%387 = load double, double* %386
%388 = fcmp ogt double %384, %387
%389 = select i1 %388, double %384, double %387
%390 = add nuw nsw i64 %364, 5
%391 = icmp eq i64 %390, 1000
br i1 %391, label %392, label %363
392: ; preds = %363
%393 = fcmp une double %360, %389
br i1 %393, label %394, label %396
394: ; preds = %392
%395 = tail call i32 (...) @abort()
unreachable
396: ; preds = %392, %396
%397 = phi i64 [ %423, %396 ], [ 0, %392 ]
%398 = phi double [ %422, %396 ], [ 1.001000e+03, %392 ]
%399 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %397
%400 = load double, double* %399
%401 = fcmp olt double %398, %400
%402 = select i1 %401, double %398, double %400
%403 = add nuw nsw i64 %397, 1
%404 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %403
%405 = load double, double* %404
%406 = fcmp olt double %402, %405
%407 = select i1 %406, double %402, double %405
%408 = add nuw nsw i64 %397, 2
%409 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %408
%410 = load double, double* %409
%411 = fcmp olt double %407, %410
%412 = select i1 %411, double %407, double %410
%413 = add nuw nsw i64 %397, 3
%414 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %413
%415 = load double, double* %414
%416 = fcmp olt double %412, %415
%417 = select i1 %416, double %412, double %415
%418 = add nuw nsw i64 %397, 4
%419 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %418
%420 = load double, double* %419
%421 = fcmp olt double %417, %420
%422 = select i1 %421, double %417, double %420
%423 = add nuw nsw i64 %397, 5
%424 = icmp eq i64 %423, 1000
br i1 %424, label %425, label %396
425: ; preds = %396, %425
%426 = phi i64 [ %452, %425 ], [ 0, %396 ]
%427 = phi double [ %451, %425 ], [ 1.001000e+03, %396 ]
%428 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %426
%429 = load double, double* %428
%430 = fcmp olt double %427, %429
%431 = select i1 %430, double %427, double %429
%432 = add nuw nsw i64 %426, 1
%433 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %432
%434 = load double, double* %433
%435 = fcmp olt double %431, %434
%436 = select i1 %435, double %431, double %434
%437 = add nuw nsw i64 %426, 2
%438 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %437
%439 = load double, double* %438
%440 = fcmp olt double %436, %439
%441 = select i1 %440, double %436, double %439
%442 = add nuw nsw i64 %426, 3
%443 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %442
%444 = load double, double* %443
%445 = fcmp olt double %441, %444
%446 = select i1 %445, double %441, double %444
%447 = add nuw nsw i64 %426, 4
%448 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %447
%449 = load double, double* %448
%450 = fcmp olt double %446, %449
%451 = select i1 %450, double %446, double %449
%452 = add nuw nsw i64 %426, 5
%453 = icmp eq i64 %452, 1000
br i1 %453, label %454, label %425
454: ; preds = %425
%455 = fcmp une double %422, %451
br i1 %455, label %456, label %458
456: ; preds = %454
%457 = tail call i32 (...) @abort()
unreachable
458: ; preds = %454, %458
%459 = phi i64 [ %485, %458 ], [ 0, %454 ]
%460 = phi double [ %484, %458 ], [ -1.000000e+00, %454 ]
%461 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %459
%462 = load double, double* %461
%463 = fcmp ogt double %460, %462
%464 = select i1 %463, double %460, double %462
%465 = add nuw nsw i64 %459, 1
%466 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %465
%467 = load double, double* %466
%468 = fcmp ogt double %464, %467
%469 = select i1 %468, double %464, double %467
%470 = add nuw nsw i64 %459, 2
%471 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %470
%472 = load double, double* %471
%473 = fcmp ogt double %469, %472
%474 = select i1 %473, double %469, double %472
%475 = add nuw nsw i64 %459, 3
%476 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %475
%477 = load double, double* %476
%478 = fcmp ogt double %474, %477
%479 = select i1 %478, double %474, double %477
%480 = add nuw nsw i64 %459, 4
%481 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %480
%482 = load double, double* %481
%483 = fcmp ogt double %479, %482
%484 = select i1 %483, double %479, double %482
%485 = add nuw nsw i64 %459, 5
%486 = icmp eq i64 %485, 1000
br i1 %486, label %487, label %458
487: ; preds = %458, %487
%488 = phi i64 [ %514, %487 ], [ 0, %458 ]
%489 = phi double [ %513, %487 ], [ -1.000000e+00, %458 ]
%490 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %488
%491 = load double, double* %490
%492 = fcmp ogt double %489, %491
%493 = select i1 %492, double %489, double %491
%494 = add nuw nsw i64 %488, 1
%495 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %494
%496 = load double, double* %495
%497 = fcmp ogt double %493, %496
%498 = select i1 %497, double %493, double %496
%499 = add nuw nsw i64 %488, 2
%500 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %499
%501 = load double, double* %500
%502 = fcmp ogt double %498, %501
%503 = select i1 %502, double %498, double %501
%504 = add nuw nsw i64 %488, 3
%505 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %504
%506 = load double, double* %505
%507 = fcmp ogt double %503, %506
%508 = select i1 %507, double %503, double %506
%509 = add nuw nsw i64 %488, 4
%510 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %509
%511 = load double, double* %510
%512 = fcmp ogt double %508, %511
%513 = select i1 %512, double %508, double %511
%514 = add nuw nsw i64 %488, 5
%515 = icmp eq i64 %514, 1000
br i1 %515, label %516, label %487
516: ; preds = %487
%517 = fcmp une double %484, %513
br i1 %517, label %518, label %520
518: ; preds = %516
%519 = tail call i32 (...) @abort()
unreachable
520: ; preds = %516
ret void
}