#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 fabs(double);
int gsw_indx(double *, int, double);
void gsw_add_barrier(double *input_data, double lon, double lat,
                     double long_grid, double lat_grid, double dlong_grid,
                     double dlat_grid, double *output_data) {
  int above_line[4];
  int k, nmean, above_line0, kk;
  double longs_pan[6] = {260.0, 272.59, 276.50, 278.65, 280.73, 292.0},
         lats_pan[6] = {19.55, 13.97, 9.6, 8.1, 9.33, 3.4};
  double r, lats_line, data_mean;
  k = gsw_indx(longs_pan, 6, lon);
  r = (lon - longs_pan[k]) / (longs_pan[k + 1] - longs_pan[k]);
  lats_line = lats_pan[k] + r * (lats_pan[k + 1] - lats_pan[k]);
  above_line0 = (lats_line <= lat);
  k = gsw_indx(longs_pan, 6, long_grid);
  r = (long_grid - longs_pan[k]) / (longs_pan[k + 1] - longs_pan[k]);
  lats_line = lats_pan[k] + r * (lats_pan[k + 1] - lats_pan[k]);
  above_line[0] = (lats_line <= lat_grid);
  above_line[3] = (lats_line <= lat_grid + dlat_grid);
  k = gsw_indx(longs_pan, 6, long_grid + dlong_grid);
  r = (long_grid + dlong_grid - longs_pan[k]) /
      (longs_pan[k + 1] - longs_pan[k]);
  lats_line = lats_pan[k] + r * (lats_pan[k + 1] - lats_pan[k]);
  above_line[1] = (lats_line <= lat_grid);
  above_line[2] = (lats_line <= lat_grid + dlat_grid);
  nmean = 0;
  data_mean = 0.0;
  for (kk = 0; kk < 4; kk++) {
    if ((fabs(input_data[kk]) <= 100.0) && above_line0 == above_line[kk]) {
      nmean = nmean + 1;
      data_mean = data_mean + input_data[kk];
    }
  }
  if (nmean == 0)
    data_mean = 0.0;
  else
    data_mean = data_mean / nmean;
  for (kk = 0; kk < 4; kk++) {
    if ((fabs(input_data[kk]) >= 1e10) || above_line0 != above_line[kk])
      output_data[kk] = data_mean;
    else
      output_data[kk] = input_data[kk];
  }
  return;
}


x86 assembly (clang, -O0):
<gsw_add_barrier>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
movsd  %xmm5,-0x38(%rbp)
mov    %rsi,-0x40(%rbp)
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1030 <memset@plt>
movsd  0xedc(%rip),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xec4(%rip),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xeac(%rip),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xe97(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xe82(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xe6d(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
lea    -0xc0(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1030 <memset@plt>
movsd  0xe45(%rip),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  0xe2d(%rip),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  0xe15(%rip),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0xdfd(%rip),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  0xde5(%rip),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0xdcd(%rip),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
lea    -0x90(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
mov    $0x6,%esi
call   1050 <gsw_indx@plt>
mov    %eax,-0x54(%rbp)
movsd  -0x10(%rbp),%xmm0
movslq -0x54(%rbp),%rax
subsd  -0x90(%rbp,%rax,8),%xmm0
ff ff
mov    -0x54(%rbp),%eax
add    $0x1,%eax
cltq
movsd  -0x90(%rbp,%rax,8),%xmm1
ff ff
movslq -0x54(%rbp),%rax
subsd  -0x90(%rbp,%rax,8),%xmm1
ff ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movslq -0x54(%rbp),%rax
movsd  -0xc0(%rbp,%rax,8),%xmm1
ff ff
movsd  -0xc8(%rbp),%xmm0
ff
mov    -0x54(%rbp),%eax
add    $0x1,%eax
cltq
movsd  -0xc0(%rbp,%rax,8),%xmm2
ff ff
movslq -0x54(%rbp),%rax
subsd  -0xc0(%rbp,%rax,8),%xmm2
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xd0(%rbp),%xmm1
ff
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x5c(%rbp)
lea    -0x90(%rbp),%rdi
movsd  -0x20(%rbp),%xmm0
mov    $0x6,%esi
call   1050 <gsw_indx@plt>
mov    %eax,-0x54(%rbp)
movsd  -0x20(%rbp),%xmm0
movslq -0x54(%rbp),%rax
subsd  -0x90(%rbp,%rax,8),%xmm0
ff ff
mov    -0x54(%rbp),%eax
add    $0x1,%eax
cltq
movsd  -0x90(%rbp,%rax,8),%xmm1
ff ff
movslq -0x54(%rbp),%rax
subsd  -0x90(%rbp,%rax,8),%xmm1
ff ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movslq -0x54(%rbp),%rax
movsd  -0xc0(%rbp,%rax,8),%xmm1
ff ff
movsd  -0xc8(%rbp),%xmm0
ff
mov    -0x54(%rbp),%eax
add    $0x1,%eax
cltq
movsd  -0xc0(%rbp,%rax,8),%xmm2
ff ff
movslq -0x54(%rbp),%rax
subsd  -0xc0(%rbp,%rax,8),%xmm2
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xd0(%rbp),%xmm1
ff
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x50(%rbp)
movsd  -0xd0(%rbp),%xmm1
ff
movsd  -0x28(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x44(%rbp)
lea    -0x90(%rbp),%rdi
movsd  -0x20(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
mov    $0x6,%esi
call   1050 <gsw_indx@plt>
mov    %eax,-0x54(%rbp)
movsd  -0x20(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
movslq -0x54(%rbp),%rax
subsd  -0x90(%rbp,%rax,8),%xmm0
ff ff
mov    -0x54(%rbp),%eax
add    $0x1,%eax
cltq
movsd  -0x90(%rbp,%rax,8),%xmm1
ff ff
movslq -0x54(%rbp),%rax
subsd  -0x90(%rbp,%rax,8),%xmm1
ff ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movslq -0x54(%rbp),%rax
movsd  -0xc0(%rbp,%rax,8),%xmm1
ff ff
movsd  -0xc8(%rbp),%xmm0
ff
mov    -0x54(%rbp),%eax
add    $0x1,%eax
cltq
movsd  -0xc0(%rbp,%rax,8),%xmm2
ff ff
movslq -0x54(%rbp),%rax
subsd  -0xc0(%rbp,%rax,8),%xmm2
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xd0(%rbp),%xmm1
ff
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4c(%rbp)
movsd  -0xd0(%rbp),%xmm1
ff
movsd  -0x28(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x48(%rbp)
movl   $0x0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movl   $0x0,-0x60(%rbp)
cmpl   $0x4,-0x60(%rbp)
jge    1538 <gsw_add_barrier+0x408>
mov    -0x8(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1040 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xb84(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1525 <gsw_add_barrier+0x3f5>
mov    -0x5c(%rbp),%eax
movslq -0x60(%rbp),%rcx
cmp    -0x50(%rbp,%rcx,4),%eax
jne    1525 <gsw_add_barrier+0x3f5>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
movsd  -0xd8(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movslq -0x60(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
jmp    152a <gsw_add_barrier+0x3fa>
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    14bc <gsw_add_barrier+0x38c>
cmpl   $0x0,-0x58(%rbp)
jne    1552 <gsw_add_barrier+0x422>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
jmp    156b <gsw_add_barrier+0x43b>
movsd  -0xd8(%rbp),%xmm0
ff
cvtsi2sdl -0x58(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movl   $0x0,-0x60(%rbp)
cmpl   $0x4,-0x60(%rbp)
jge    15fc <gsw_add_barrier+0x4cc>
mov    -0x8(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1040 <fabs@plt>
cvtsi2sd %eax,%xmm0
movsd  0xac6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jae    15b5 <gsw_add_barrier+0x485>
mov    -0x5c(%rbp),%eax
movslq -0x60(%rbp),%rcx
cmp    -0x50(%rbp,%rcx,4),%eax
je     15cf <gsw_add_barrier+0x49f>
movsd  -0xd8(%rbp),%xmm0
ff
mov    -0x40(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    15e9 <gsw_add_barrier+0x4b9>
mov    -0x8(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    15ee <gsw_add_barrier+0x4be>
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1572 <gsw_add_barrier+0x442>
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gsw_add_barrier>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
mov    %rsi,%rbx
movsd  %xmm5,0x8(%rsp)
movsd  %xmm4,(%rsp)
movaps %xmm3,0x30(%rsp)
movaps %xmm2,0x10(%rsp)
movaps %xmm1,0x20(%rsp)
movaps %xmm0,0xb0(%rsp)
mov    %rdi,%r14
movaps 0xea0(%rip),%xmm1
movaps %xmm1,0x40(%rsp)
movaps 0xea4(%rip),%xmm1
movaps %xmm1,0x50(%rsp)
movaps 0xea8(%rip),%xmm1
movaps %xmm1,0x60(%rsp)
movaps 0xeac(%rip),%xmm1
movaps %xmm1,0x70(%rsp)
movaps 0xeb0(%rip),%xmm1
movaps %xmm1,0x80(%rsp)
movaps 0xeb1(%rip),%xmm1
movaps %xmm1,0x90(%rsp)
lea    0x40(%rsp),%r15
mov    %r15,%rdi
mov    $0x6,%esi
call   1040 <gsw_indx@plt>
cltq
movsd  0x40(%rsp,%rax,8),%xmm0
movaps %xmm0,0xa0(%rsp)
movsd  0x48(%rsp,%rax,8),%xmm0
movaps %xmm0,0xc0(%rsp)
movsd  0x70(%rsp,%rax,8),%xmm0
movaps %xmm0,0xd0(%rsp)
movsd  0x78(%rsp,%rax,8),%xmm0
movaps %xmm0,0xe0(%rsp)
mov    %r15,%rdi
mov    $0x6,%esi
movaps 0x10(%rsp),%xmm0
call   1040 <gsw_indx@plt>
cltq
movapd 0x10(%rsp),%xmm3
movapd %xmm3,%xmm0
unpcklpd 0xb0(%rsp),%xmm0
movsd  0x40(%rsp,%rax,8),%xmm1
unpcklpd 0xa0(%rsp),%xmm1
movsd  0x48(%rsp,%rax,8),%xmm2
unpcklpd 0xc0(%rsp),%xmm2
subpd  %xmm1,%xmm0
subpd  %xmm1,%xmm2
divpd  %xmm2,%xmm0
movsd  0x70(%rsp,%rax,8),%xmm1
unpcklpd 0xd0(%rsp),%xmm1
movsd  0x78(%rsp,%rax,8),%xmm2
unpcklpd 0xe0(%rsp),%xmm2
subpd  %xmm1,%xmm2
mulpd  %xmm0,%xmm2
addpd  %xmm1,%xmm2
movapd 0x30(%rsp),%xmm0
unpcklpd 0x20(%rsp),%xmm0
movapd %xmm2,0x20(%rsp)
movapd %xmm2,%xmm1
cmplepd %xmm0,%xmm1
movmskpd %xmm1,%r12d
mov    %r12d,%r13d
shr    %r13b
movsd  (%rsp),%xmm0
addsd  %xmm3,%xmm0
movsd  %xmm0,(%rsp)
mov    %r15,%rdi
mov    $0x6,%esi
call   1040 <gsw_indx@plt>
cltq
movsd  0x40(%rsp,%rax,8),%xmm0
movsd  0x48(%rsp,%rax,8),%xmm1
movsd  (%rsp),%xmm2
subsd  %xmm0,%xmm2
subsd  %xmm0,%xmm1
divsd  %xmm1,%xmm2
movsd  0x70(%rsp,%rax,8),%xmm0
movsd  0x78(%rsp,%rax,8),%xmm1
subsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  (%r14),%xmm0
call   1030 <fabs@plt>
xor    %r13b,%r12b
xor    %ebp,%ebp
xorpd  %xmm0,%xmm0
cmp    $0x64,%eax
jg     131d <gsw_add_barrier+0x1fd>
test   $0x1,%r12b
mov    %rbx,%r15
jne    1320 <gsw_add_barrier+0x200>
xorpd  %xmm0,%xmm0
addsd  (%r14),%xmm0
mov    $0x1,%ebp
jmp    1320 <gsw_add_barrier+0x200>
mov    %rbx,%r15
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
movapd 0x30(%rsp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
ucomisd 0x10(%rsp),%xmm1
setae  %bl
movsd  0x8(%r14),%xmm0
call   1030 <fabs@plt>
cmp    $0x64,%eax
jg     136c <gsw_add_barrier+0x24c>
xor    %r13b,%bl
jne    136c <gsw_add_barrier+0x24c>
add    $0x1,%ebp
movsd  (%rsp),%xmm0
addsd  0x8(%r14),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
ucomisd 0x10(%rsp),%xmm0
setae  %bl
movsd  0x10(%r14),%xmm0
call   1030 <fabs@plt>
cmp    $0x64,%eax
jg     13a3 <gsw_add_barrier+0x283>
xor    %r13b,%bl
jne    13a3 <gsw_add_barrier+0x283>
add    $0x1,%ebp
movsd  (%rsp),%xmm0
addsd  0x10(%r14),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
ucomisd 0x20(%rsp),%xmm0
setae  %bl
movsd  0x18(%r14),%xmm0
call   1030 <fabs@plt>
cmp    $0x64,%eax
jg     13d7 <gsw_add_barrier+0x2b7>
xor    %r13b,%bl
jne    13d7 <gsw_add_barrier+0x2b7>
add    $0x1,%ebp
movsd  (%rsp),%xmm1
addsd  0x18(%r14),%xmm1
jmp    13e0 <gsw_add_barrier+0x2c0>
test   %ebp,%ebp
movsd  (%rsp),%xmm1
je     13f2 <gsw_add_barrier+0x2d2>
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
jmp    13fb <gsw_add_barrier+0x2db>
xorpd  %xmm0,%xmm0
movsd  %xmm0,(%rsp)
movsd  (%r14),%xmm0
call   1030 <fabs@plt>
movsd  (%rsp),%xmm0
test   $0x1,%r12b
jne    1415 <gsw_add_barrier+0x2f5>
movsd  (%r14),%xmm0
movapd 0x30(%rsp),%xmm1
ucomisd 0x10(%rsp),%xmm1
setae  %bl
movsd  %xmm0,(%r15)
movsd  0x8(%r14),%xmm0
call   1030 <fabs@plt>
xor    %r13b,%bl
movsd  (%rsp),%xmm0
jne    1444 <gsw_add_barrier+0x324>
movsd  0x8(%r14),%xmm0
movsd  0x8(%rsp),%xmm1
ucomisd 0x10(%rsp),%xmm1
setae  %bl
movsd  %xmm0,0x8(%r15)
movsd  0x10(%r14),%xmm0
call   1030 <fabs@plt>
xor    %r13b,%bl
movsd  (%rsp),%xmm0
jne    1474 <gsw_add_barrier+0x354>
movsd  0x10(%r14),%xmm0
movsd  0x8(%rsp),%xmm1
ucomisd 0x20(%rsp),%xmm1
setae  %bl
movsd  %xmm0,0x10(%r15)
movsd  0x18(%r14),%xmm0
call   1030 <fabs@plt>
xor    %r13b,%bl
movsd  (%rsp),%xmm0
jne    14a4 <gsw_add_barrier+0x384>
movsd  0x18(%r14),%xmm0
movsd  %xmm0,0x18(%r15)
add    $0xf8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @gsw_add_barrier(double* %0, double %1, double %2, double %3, double %4, double %5, double %6, double* %7) {
%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 [4 x i32]
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca [6 x double]
%23 = alloca [6 x double]
%24 = alloca double
%25 = alloca double
%26 = alloca double
store double* %0, double** %9
store double %1, double* %10
store double %2, double* %11
store double %3, double* %12
store double %4, double* %13
store double %5, double* %14
store double %6, double* %15
store double* %7, double** %16
%27 = bitcast [6 x double]* %22 to i8*
%28 = bitcast i8* %27 to [6 x double]*
%29 = getelementptr inbounds [6 x double], [6 x double]* %28, i32 0, i32 0
store double 2.600000e+02, double* %29
%30 = getelementptr inbounds [6 x double], [6 x double]* %28, i32 0, i32 1
store double 2.725900e+02, double* %30
%31 = getelementptr inbounds [6 x double], [6 x double]* %28, i32 0, i32 2
store double 2.765000e+02, double* %31
%32 = getelementptr inbounds [6 x double], [6 x double]* %28, i32 0, i32 3
store double 2.786500e+02, double* %32
%33 = getelementptr inbounds [6 x double], [6 x double]* %28, i32 0, i32 4
store double 2.807300e+02, double* %33
%34 = getelementptr inbounds [6 x double], [6 x double]* %28, i32 0, i32 5
store double 2.920000e+02, double* %34
%35 = bitcast [6 x double]* %23 to i8*
%36 = bitcast i8* %35 to [6 x double]*
%37 = getelementptr inbounds [6 x double], [6 x double]* %36, i32 0, i32 0
store double 1.955000e+01, double* %37
%38 = getelementptr inbounds [6 x double], [6 x double]* %36, i32 0, i32 1
store double 1.397000e+01, double* %38
%39 = getelementptr inbounds [6 x double], [6 x double]* %36, i32 0, i32 2
store double 0x4023333333333333, double* %39
%40 = getelementptr inbounds [6 x double], [6 x double]* %36, i32 0, i32 3
store double 8.100000e+00, double* %40
%41 = getelementptr inbounds [6 x double], [6 x double]* %36, i32 0, i32 4
store double 9.330000e+00, double* %41
%42 = getelementptr inbounds [6 x double], [6 x double]* %36, i32 0, i32 5
store double 3.400000e+00, double* %42
%43 = getelementptr inbounds [6 x double], [6 x double]* %22, i64 0, i64 0
%44 = load double, double* %10
%45 = call i32 @gsw_indx(double* %43, i32 6, double %44)
store i32 %45, i32* %18
%46 = load double, double* %10
%47 = load i32, i32* %18
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [6 x double], [6 x double]* %22, i64 0, i64 %48
%50 = load double, double* %49
%51 = fsub double %46, %50
%52 = load i32, i32* %18
%53 = add nsw i32 %52, 1
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [6 x double], [6 x double]* %22, i64 0, i64 %54
%56 = load double, double* %55
%57 = load i32, i32* %18
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [6 x double], [6 x double]* %22, i64 0, i64 %58
%60 = load double, double* %59
%61 = fsub double %56, %60
%62 = fdiv double %51, %61
store double %62, double* %24
%63 = load i32, i32* %18
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [6 x double], [6 x double]* %23, i64 0, i64 %64
%66 = load double, double* %65
%67 = load double, double* %24
%68 = load i32, i32* %18
%69 = add nsw i32 %68, 1
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [6 x double], [6 x double]* %23, i64 0, i64 %70
%72 = load double, double* %71
%73 = load i32, i32* %18
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [6 x double], [6 x double]* %23, i64 0, i64 %74
%76 = load double, double* %75
%77 = fsub double %72, %76
%78 = call double @llvm.fmuladd.f64(double %67, double %77, double %66)
store double %78, double* %25
%79 = load double, double* %25
%80 = load double, double* %11
%81 = fcmp ole double %79, %80
%82 = zext i1 %81 to i32
store i32 %82, i32* %20
%83 = getelementptr inbounds [6 x double], [6 x double]* %22, i64 0, i64 0
%84 = load double, double* %12
%85 = call i32 @gsw_indx(double* %83, i32 6, double %84)
store i32 %85, i32* %18
%86 = load double, double* %12
%87 = load i32, i32* %18
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [6 x double], [6 x double]* %22, i64 0, i64 %88
%90 = load double, double* %89
%91 = fsub double %86, %90
%92 = load i32, i32* %18
%93 = add nsw i32 %92, 1
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [6 x double], [6 x double]* %22, i64 0, i64 %94
%96 = load double, double* %95
%97 = load i32, i32* %18
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds [6 x double], [6 x double]* %22, i64 0, i64 %98
%100 = load double, double* %99
%101 = fsub double %96, %100
%102 = fdiv double %91, %101
store double %102, double* %24
%103 = load i32, i32* %18
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds [6 x double], [6 x double]* %23, i64 0, i64 %104
%106 = load double, double* %105
%107 = load double, double* %24
%108 = load i32, i32* %18
%109 = add nsw i32 %108, 1
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds [6 x double], [6 x double]* %23, i64 0, i64 %110
%112 = load double, double* %111
%113 = load i32, i32* %18
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds [6 x double], [6 x double]* %23, i64 0, i64 %114
%116 = load double, double* %115
%117 = fsub double %112, %116
%118 = call double @llvm.fmuladd.f64(double %107, double %117, double %106)
store double %118, double* %25
%119 = load double, double* %25
%120 = load double, double* %13
%121 = fcmp ole double %119, %120
%122 = zext i1 %121 to i32
%123 = getelementptr inbounds [4 x i32], [4 x i32]* %17, i64 0, i64 0
store i32 %122, i32* %123
%124 = load double, double* %25
%125 = load double, double* %13
%126 = load double, double* %15
%127 = fadd double %125, %126
%128 = fcmp ole double %124, %127
%129 = zext i1 %128 to i32
%130 = getelementptr inbounds [4 x i32], [4 x i32]* %17, i64 0, i64 3
store i32 %129, i32* %130
%131 = getelementptr inbounds [6 x double], [6 x double]* %22, i64 0, i64 0
%132 = load double, double* %12
%133 = load double, double* %14
%134 = fadd double %132, %133
%135 = call i32 @gsw_indx(double* %131, i32 6, double %134)
store i32 %135, i32* %18
%136 = load double, double* %12
%137 = load double, double* %14
%138 = fadd double %136, %137
%139 = load i32, i32* %18
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds [6 x double], [6 x double]* %22, i64 0, i64 %140
%142 = load double, double* %141
%143 = fsub double %138, %142
%144 = load i32, i32* %18
%145 = add nsw i32 %144, 1
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds [6 x double], [6 x double]* %22, i64 0, i64 %146
%148 = load double, double* %147
%149 = load i32, i32* %18
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds [6 x double], [6 x double]* %22, i64 0, i64 %150
%152 = load double, double* %151
%153 = fsub double %148, %152
%154 = fdiv double %143, %153
store double %154, double* %24
%155 = load i32, i32* %18
%156 = sext i32 %155 to i64
%157 = getelementptr inbounds [6 x double], [6 x double]* %23, i64 0, i64 %156
%158 = load double, double* %157
%159 = load double, double* %24
%160 = load i32, i32* %18
%161 = add nsw i32 %160, 1
%162 = sext i32 %161 to i64
%163 = getelementptr inbounds [6 x double], [6 x double]* %23, i64 0, i64 %162
%164 = load double, double* %163
%165 = load i32, i32* %18
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds [6 x double], [6 x double]* %23, i64 0, i64 %166
%168 = load double, double* %167
%169 = fsub double %164, %168
%170 = call double @llvm.fmuladd.f64(double %159, double %169, double %158)
store double %170, double* %25
%171 = load double, double* %25
%172 = load double, double* %13
%173 = fcmp ole double %171, %172
%174 = zext i1 %173 to i32
%175 = getelementptr inbounds [4 x i32], [4 x i32]* %17, i64 0, i64 1
store i32 %174, i32* %175
%176 = load double, double* %25
%177 = load double, double* %13
%178 = load double, double* %15
%179 = fadd double %177, %178
%180 = fcmp ole double %176, %179
%181 = zext i1 %180 to i32
%182 = getelementptr inbounds [4 x i32], [4 x i32]* %17, i64 0, i64 2
store i32 %181, i32* %182
store i32 0, i32* %19
store double 0.000000e+00, double* %26
store i32 0, i32* %21
br label %183
183: ; preds = %213, %8
%184 = load i32, i32* %21
%185 = icmp slt i32 %184, 4
br i1 %185, label %186, label %216
186: ; preds = %183
%187 = load double*, double** %9
%188 = load i32, i32* %21
%189 = sext i32 %188 to i64
%190 = getelementptr inbounds double, double* %187, i64 %189
%191 = load double, double* %190
%192 = call i32 @fabs(double %191)
%193 = sitofp i32 %192 to double
%194 = fcmp ole double %193, 1.000000e+02
br i1 %194, label %195, label %212
195: ; preds = %186
%196 = load i32, i32* %20
%197 = load i32, i32* %21
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds [4 x i32], [4 x i32]* %17, i64 0, i64 %198
%200 = load i32, i32* %199
%201 = icmp eq i32 %196, %200
br i1 %201, label %202, label %212
202: ; preds = %195
%203 = load i32, i32* %19
%204 = add nsw i32 %203, 1
store i32 %204, i32* %19
%205 = load double, double* %26
%206 = load double*, double** %9
%207 = load i32, i32* %21
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds double, double* %206, i64 %208
%210 = load double, double* %209
%211 = fadd double %205, %210
store double %211, double* %26
br label %212
212: ; preds = %202, %195, %186
br label %213
213: ; preds = %212
%214 = load i32, i32* %21
%215 = add nsw i32 %214, 1
store i32 %215, i32* %21
br label %183
216: ; preds = %183
%217 = load i32, i32* %19
%218 = icmp eq i32 %217, 0
br i1 %218, label %219, label %220
219: ; preds = %216
store double 0.000000e+00, double* %26
br label %225
220: ; preds = %216
%221 = load double, double* %26
%222 = load i32, i32* %19
%223 = sitofp i32 %222 to double
%224 = fdiv double %221, %223
store double %224, double* %26
br label %225
225: ; preds = %220, %219
store i32 0, i32* %21
br label %226
226: ; preds = %262, %225
%227 = load i32, i32* %21
%228 = icmp slt i32 %227, 4
br i1 %228, label %229, label %265
229: ; preds = %226
%230 = load double*, double** %9
%231 = load i32, i32* %21
%232 = sext i32 %231 to i64
%233 = getelementptr inbounds double, double* %230, i64 %232
%234 = load double, double* %233
%235 = call i32 @fabs(double %234)
%236 = sitofp i32 %235 to double
%237 = fcmp oge double %236, 1.000000e+10
br i1 %237, label %245, label %238
238: ; preds = %229
%239 = load i32, i32* %20
%240 = load i32, i32* %21
%241 = sext i32 %240 to i64
%242 = getelementptr inbounds [4 x i32], [4 x i32]* %17, i64 0, i64 %241
%243 = load i32, i32* %242
%244 = icmp ne i32 %239, %243
br i1 %244, label %245, label %251
245: ; preds = %238, %229
%246 = load double, double* %26
%247 = load double*, double** %16
%248 = load i32, i32* %21
%249 = sext i32 %248 to i64
%250 = getelementptr inbounds double, double* %247, i64 %249
store double %246, double* %250
br label %261
251: ; preds = %238
%252 = load double*, double** %9
%253 = load i32, i32* %21
%254 = sext i32 %253 to i64
%255 = getelementptr inbounds double, double* %252, i64 %254
%256 = load double, double* %255
%257 = load double*, double** %16
%258 = load i32, i32* %21
%259 = sext i32 %258 to i64
%260 = getelementptr inbounds double, double* %257, i64 %259
store double %256, double* %260
br label %261
261: ; preds = %251, %245
br label %262
262: ; preds = %261
%263 = load i32, i32* %21
%264 = add nsw i32 %263, 1
store i32 %264, i32* %21
br label %226
265: ; preds = %226
ret void
}

LLVM IR (-O2):
define void @gsw_add_barrier(double* nocapture %0, double %1, double %2, double %3, double %4, double %5, double %6, double* nocapture writeonly %7) {
%9 = alloca [6 x double]
%10 = alloca [6 x double]
%11 = bitcast [6 x double]* %9 to i8*
%12 = getelementptr inbounds [6 x double], [6 x double]* %9, i64 0, i64 0
%13 = bitcast [6 x double]* %9 to <2 x double>*
store <2 x double> <double 2.600000e+02, double 2.725900e+02>, <2 x double>* %13
%14 = getelementptr inbounds [6 x double], [6 x double]* %9, i64 0, i64 2
%15 = bitcast double* %14 to <2 x double>*
store <2 x double> <double 2.765000e+02, double 2.786500e+02>, <2 x double>* %15
%16 = getelementptr inbounds [6 x double], [6 x double]* %9, i64 0, i64 4
%17 = bitcast double* %16 to <2 x double>*
store <2 x double> <double 2.807300e+02, double 2.920000e+02>, <2 x double>* %17
%18 = bitcast [6 x double]* %10 to i8*
%19 = bitcast [6 x double]* %10 to <2 x double>*
store <2 x double> <double 1.955000e+01, double 1.397000e+01>, <2 x double>* %19
%20 = getelementptr inbounds [6 x double], [6 x double]* %10, i64 0, i64 2
%21 = bitcast double* %20 to <2 x double>*
store <2 x double> <double 0x4023333333333333, double 8.100000e+00>, <2 x double>* %21
%22 = getelementptr inbounds [6 x double], [6 x double]* %10, i64 0, i64 4
%23 = bitcast double* %22 to <2 x double>*
store <2 x double> <double 9.330000e+00, double 3.400000e+00>, <2 x double>* %23
%24 = call i32 @gsw_indx(double* %12, i32 6, double %1)
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [6 x double], [6 x double]* %9, i64 0, i64 %25
%27 = load double, double* %26
%28 = add nsw i32 %24, 1
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [6 x double], [6 x double]* %9, i64 0, i64 %29
%31 = load double, double* %30
%32 = getelementptr inbounds [6 x double], [6 x double]* %10, i64 0, i64 %25
%33 = load double, double* %32
%34 = getelementptr inbounds [6 x double], [6 x double]* %10, i64 0, i64 %29
%35 = load double, double* %34
%36 = call i32 @gsw_indx(double* %12, i32 6, double %3)
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [6 x double], [6 x double]* %9, i64 0, i64 %37
%39 = load double, double* %38
%40 = insertelement <2 x double> poison, double %3, i64 0
%41 = insertelement <2 x double> %40, double %1, i64 1
%42 = insertelement <2 x double> poison, double %39, i64 0
%43 = insertelement <2 x double> %42, double %27, i64 1
%44 = fsub <2 x double> %41, %43
%45 = add nsw i32 %36, 1
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [6 x double], [6 x double]* %9, i64 0, i64 %46
%48 = load double, double* %47
%49 = insertelement <2 x double> poison, double %48, i64 0
%50 = insertelement <2 x double> %49, double %31, i64 1
%51 = fsub <2 x double> %50, %43
%52 = fdiv <2 x double> %44, %51
%53 = getelementptr inbounds [6 x double], [6 x double]* %10, i64 0, i64 %37
%54 = load double, double* %53
%55 = getelementptr inbounds [6 x double], [6 x double]* %10, i64 0, i64 %46
%56 = load double, double* %55
%57 = insertelement <2 x double> poison, double %56, i64 0
%58 = insertelement <2 x double> %57, double %35, i64 1
%59 = insertelement <2 x double> poison, double %54, i64 0
%60 = insertelement <2 x double> %59, double %33, i64 1
%61 = fsub <2 x double> %58, %60
%62 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %52, <2 x double> %61, <2 x double> %60)
%63 = insertelement <2 x double> poison, double %4, i64 0
%64 = insertelement <2 x double> %63, double %2, i64 1
%65 = fcmp ole <2 x double> %62, %64
%66 = fadd double %4, %6
%67 = extractelement <2 x double> %62, i64 0
%68 = fcmp ole double %67, %66
%69 = fadd double %3, %5
%70 = call i32 @gsw_indx(double* %12, i32 6, double %69)
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [6 x double], [6 x double]* %9, i64 0, i64 %71
%73 = load double, double* %72
%74 = fsub double %69, %73
%75 = add nsw i32 %70, 1
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [6 x double], [6 x double]* %9, i64 0, i64 %76
%78 = load double, double* %77
%79 = fsub double %78, %73
%80 = fdiv double %74, %79
%81 = getelementptr inbounds [6 x double], [6 x double]* %10, i64 0, i64 %71
%82 = load double, double* %81
%83 = getelementptr inbounds [6 x double], [6 x double]* %10, i64 0, i64 %76
%84 = load double, double* %83
%85 = fsub double %84, %82
%86 = call double @llvm.fmuladd.f64(double %80, double %85, double %82)
%87 = fcmp ole double %86, %4
%88 = fcmp ole double %86, %66
%89 = load double, double* %0
%90 = call i32 @fabs(double %89)
%91 = icmp sgt i32 %90, 100
%92 = extractelement <2 x i1> %65, i64 0
%93 = extractelement <2 x i1> %65, i64 1
%94 = xor i1 %92, %93
%95 = select i1 %91, i1 true, i1 %94
br i1 %95, label %99, label %96
96: ; preds = %8
%97 = load double, double* %0
%98 = fadd double %97, 0.000000e+00
br label %99
99: ; preds = %8, %96
%100 = phi i32 [ 1, %96 ], [ 0, %8 ]
%101 = phi double [ %98, %96 ], [ 0.000000e+00, %8 ]
%102 = getelementptr inbounds double, double* %0, i64 1
%103 = load double, double* %102
%104 = call i32 @fabs(double %103)
%105 = icmp sgt i32 %104, 100
%106 = xor i1 %87, %93
%107 = select i1 %105, i1 true, i1 %106
br i1 %107, label %112, label %108
108: ; preds = %99
%109 = add nuw nsw i32 %100, 1
%110 = load double, double* %102
%111 = fadd double %101, %110
br label %112
112: ; preds = %108, %99
%113 = phi i32 [ %109, %108 ], [ %100, %99 ]
%114 = phi double [ %111, %108 ], [ %101, %99 ]
%115 = getelementptr inbounds double, double* %0, i64 2
%116 = load double, double* %115
%117 = call i32 @fabs(double %116)
%118 = icmp sgt i32 %117, 100
%119 = xor i1 %88, %93
%120 = select i1 %118, i1 true, i1 %119
br i1 %120, label %125, label %121
121: ; preds = %112
%122 = add nuw nsw i32 %113, 1
%123 = load double, double* %115
%124 = fadd double %114, %123
br label %125
125: ; preds = %121, %112
%126 = phi i32 [ %122, %121 ], [ %113, %112 ]
%127 = phi double [ %124, %121 ], [ %114, %112 ]
%128 = getelementptr inbounds double, double* %0, i64 3
%129 = load double, double* %128
%130 = call i32 @fabs(double %129)
%131 = icmp sgt i32 %130, 100
%132 = xor i1 %68, %93
%133 = select i1 %131, i1 true, i1 %132
br i1 %133, label %138, label %134
134: ; preds = %125
%135 = add nuw nsw i32 %126, 1
%136 = load double, double* %128
%137 = fadd double %127, %136
br label %140
138: ; preds = %125
%139 = icmp eq i32 %126, 0
br i1 %139, label %145, label %140
140: ; preds = %134, %138
%141 = phi double [ %137, %134 ], [ %127, %138 ]
%142 = phi i32 [ %135, %134 ], [ %126, %138 ]
%143 = sitofp i32 %142 to double
%144 = fdiv double %141, %143
br label %145
145: ; preds = %138, %140
%146 = phi double [ %144, %140 ], [ 0.000000e+00, %138 ]
%147 = load double, double* %0
%148 = call i32 @fabs(double %147)
%149 = xor i1 %92, %93
br i1 %149, label %152, label %150
150: ; preds = %145
%151 = load double, double* %0
br label %152
152: ; preds = %145, %150
%153 = phi double [ %151, %150 ], [ %146, %145 ]
store double %153, double* %7
%154 = load double, double* %102
%155 = call i32 @fabs(double %154)
%156 = xor i1 %87, %93
br i1 %156, label %159, label %157
157: ; preds = %152
%158 = load double, double* %102
br label %159
159: ; preds = %152, %157
%160 = phi double [ %158, %157 ], [ %146, %152 ]
%161 = getelementptr inbounds double, double* %7, i64 1
store double %160, double* %161
%162 = load double, double* %115
%163 = call i32 @fabs(double %162)
%164 = xor i1 %88, %93
br i1 %164, label %167, label %165
165: ; preds = %159
%166 = load double, double* %115
br label %167
167: ; preds = %159, %165
%168 = phi double [ %166, %165 ], [ %146, %159 ]
%169 = getelementptr inbounds double, double* %7, i64 2
store double %168, double* %169
%170 = load double, double* %128
%171 = call i32 @fabs(double %170)
%172 = xor i1 %68, %93
br i1 %172, label %175, label %173
173: ; preds = %167
%174 = load double, double* %128
br label %175
175: ; preds = %167, %173
%176 = phi double [ %174, %173 ], [ %146, %167 ]
%177 = getelementptr inbounds double, double* %7, i64 3
store double %176, double* %177
ret void
}