#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 gridInqXsize(int);
int gridInqYsize(int);
void halo(double *array1, int gridID1, double *array2, int lhalo, int rhalo) {
  int nlon1, nlat;
  int ilat, ilon;
  int nmin, nmax;
  nlon1 = gridInqXsize(gridID1);
  nlat = gridInqYsize(gridID1);
  nmin = 0;
  nmax = nlon1;
  if (lhalo < 0)
    nmin = -lhalo;
  if (rhalo < 0)
    nmax += rhalo;
  for (ilat = 0; ilat < nlat; ilat++) {
    for (ilon = nlon1 - lhalo; ilon < nlon1; ilon++)
      *array2++ = array1[ilat * nlon1 + ilon];
    for (ilon = nmin; ilon < nmax; ilon++)
      *array2++ = array1[ilat * nlon1 + ilon];
    for (ilon = 0; ilon < rhalo; ilon++)
      *array2++ = array1[ilat * nlon1 + ilon];
  }
}


x86 assembly (clang, -O0):
<halo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <gridInqXsize@plt>
mov    %eax,-0x24(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <gridInqYsize@plt>
mov    %eax,-0x28(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x38(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    116f <halo+0x4f>
xor    %eax,%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x34(%rbp)
cmpl   $0x0,-0x20(%rbp)
jge    1182 <halo+0x62>
mov    -0x20(%rbp),%eax
add    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    1287 <halo+0x167>
mov    -0x24(%rbp),%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    11e1 <halo+0xc1>
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x24(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x18(%rbp)
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    119e <halo+0x7e>
mov    -0x34(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    122a <halo+0x10a>
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x24(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x18(%rbp)
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11e7 <halo+0xc7>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1274 <halo+0x154>
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x24(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x18(%rbp)
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1231 <halo+0x111>
jmp    1279 <halo+0x159>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1189 <halo+0x69>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<halo>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %r8d,%r14d
mov    %ecx,0x14(%rsp)
mov    %rdx,%rbp
mov    %esi,%ebx
mov    %rdi,0x8(%rsp)
mov    %esi,%edi
call   1040 <gridInqXsize@plt>
mov    %eax,%r13d
mov    %ebx,%edi
call   1030 <gridInqYsize@plt>
test   %eax,%eax
jle    16c3 <halo+0x5a3>
mov    0x14(%rsp),%edi
mov    %edi,%ecx
neg    %ecx
mov    %r14d,%r15d
mov    %edi,%edx
sar    $0x1f,%edx
and    %ecx,%edx
mov    %r14d,%ecx
sar    $0x1f,%ecx
and    %r14d,%ecx
add    %r13d,%ecx
movslq %r13d,%rsi
sub    %edi,%r13d
movslq %r13d,%r9
mov    %edx,0x3c(%rsp)
movslq %edx,%r11
mov    %ecx,0x38(%rsp)
movslq %ecx,%rbx
mov    %eax,%eax
mov    %rax,0xc0(%rsp)
mov    %r14d,%edi
mov    %rbx,%r8
sub    %r11,%r8
lea    0x1(%r9),%rax
cmp    %rsi,%rax
cmovle %rsi,%rax
mov    %rax,0xb0(%rsp)
mov    %rax,%r10
sub    %r9,%r10
lea    -0x4(%r10),%rax
mov    %rax,0xa8(%rsp)
shr    $0x2,%rax
add    $0x1,%rax
lea    -0x4(%r8),%rcx
mov    %rcx,0x70(%rsp)
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edi,%ecx
and    $0xfffffffc,%ecx
mov    %rcx,0x98(%rsp)
lea    -0x4(%rcx),%r14
mov    %r14,0x90(%rsp)
shr    $0x2,%r14
add    $0x1,%r14
mov    %r10,%rcx
mov    %r10,0x30(%rsp)
and    $0xfffffffffffffffc,%r10
mov    %rax,%rcx
mov    %rax,0xa0(%rsp)
and    $0xfffffffffffffffe,%rax
mov    %rax,0x50(%rsp)
mov    %r8,%rcx
mov    %r8,0x28(%rsp)
and    $0xfffffffffffffffc,%rcx
mov    %rdx,%rax
mov    %rdx,0x68(%rsp)
and    $0xfffffffffffffffe,%rdx
mov    %rdx,0x40(%rsp)
mov    %r15d,%edx
movabs $0x7ffffffffffffffe,%rax
ff ff 7f
add    $0xfffffffffffffffe,%rax
and    %r14,%rax
mov    %rax,0x48(%rsp)
mov    %r14d,%r8d
and    $0x3,%r8d
mov    %edi,%eax
and    $0x3,%eax
mov    %rax,0xb8(%rsp)
mov    %r8,0x80(%rsp)
shl    $0x5,%r8
mov    %r10,0x88(%rsp)
lea    (%r10,%r9,1),%rax
mov    %rax,0x78(%rsp)
mov    %rcx,0x60(%rsp)
lea    (%rcx,%r11,1),%rax
mov    %rax,0x58(%rsp)
mov    0x8(%rsp),%r12
mov    %r9,0x20(%rsp)
lea    0x30(%r12,%r9,8),%r9
lea    0x0(,%rsi,8),%r10
mov    %r11,0x18(%rsp)
lea    (%r12,%r11,8),%r13
add    $0x30,%r13
lea    0x10(%r12),%r14
xor    %r15d,%r15d
mov    %edx,0x4(%rsp)
jmp    12ee <halo+0x1ce>
nopl   0x0(%rax)
add    $0x1,%r15
add    %r10,%r9
add    %r10,%r12
add    %r10,%r13
add    %r10,%r14
cmp    0xc0(%rsp),%r15
je     16c3 <halo+0x5a3>
mov    %r15,%r11
imul   %rsi,%r11
cmpl   $0x0,0x14(%rsp)
jle    1368 <halo+0x248>
cmpq   $0x4,0x30(%rsp)
jb     1346 <halo+0x226>
mov    0xb0(%rsp),%rax
add    %r11,%rax
mov    0x8(%rsp),%rcx
lea    (%rcx,%rax,8),%rax
cmp    %rax,%rbp
jae    14a1 <halo+0x381>
mov    0x20(%rsp),%rax
add    %r11,%rax
lea    (%rcx,%rax,8),%rax
mov    0x30(%rsp),%rcx
lea    0x0(,%rcx,8),%rcx
add    %rbp,%rcx
cmp    %rcx,%rax
jae    14a1 <halo+0x381>
mov    0x20(%rsp),%rax
nopl   0x0(%rax,%rax,1)
movsd  (%r12,%rax,8),%xmm0
movsd  %xmm0,0x0(%rbp)
add    $0x8,%rbp
add    $0x1,%rax
cmp    %rsi,%rax
jl     1350 <halo+0x230>
mov    0x38(%rsp),%eax
cmp    %eax,0x3c(%rsp)
jge    13d8 <halo+0x2b8>
cmpq   $0x4,0x28(%rsp)
jb     13b5 <halo+0x295>
lea    (%r11,%rbx,1),%rax
mov    0x8(%rsp),%rcx
lea    (%rcx,%rax,8),%rax
cmp    %rax,%rbp
jae    14c6 <halo+0x3a6>
mov    0x18(%rsp),%rax
add    %r11,%rax
lea    (%rcx,%rax,8),%rax
mov    0x28(%rsp),%rcx
lea    0x0(,%rcx,8),%rcx
add    %rbp,%rcx
cmp    %rcx,%rax
jae    14c6 <halo+0x3a6>
mov    0x18(%rsp),%rax
nopw   0x0(%rax,%rax,1)
movsd  (%r12,%rax,8),%xmm0
movsd  %xmm0,0x0(%rbp)
add    $0x8,%rbp
add    $0x1,%rax
cmp    %rbx,%rax
jl     13c0 <halo+0x2a0>
test   %edx,%edx
jle    12d0 <halo+0x1b0>
cmp    $0x4,%edx
jb     1413 <halo+0x2f3>
lea    (%r11,%rdi,1),%rax
mov    0x8(%rsp),%rcx
lea    (%rcx,%rax,8),%rax
cmp    %rax,%rbp
jae    14b0 <halo+0x390>
lea    (%rcx,%r11,8),%rax
lea    0x0(,%rdi,8),%rcx
add    %rbp,%rcx
cmp    %rcx,%rax
jae    14b0 <halo+0x390>
xor    %eax,%eax
mov    %rax,%rdx
not    %rdx
add    %rdi,%rdx
mov    0xb8(%rsp),%rcx
test   %rcx,%rcx
je     1449 <halo+0x329>
nopl   0x0(%rax,%rax,1)
movsd  (%r12,%rax,8),%xmm0
movsd  %xmm0,0x0(%rbp)
add    $0x8,%rbp
add    $0x1,%rax
add    $0xffffffffffffffff,%rcx
jne    1430 <halo+0x310>
cmp    $0x3,%rdx
mov    0x4(%rsp),%edx
jb     12d0 <halo+0x1b0>
nopw   0x0(%rax,%rax,1)
movsd  (%r12,%rax,8),%xmm0
movsd  %xmm0,0x0(%rbp)
movsd  0x8(%r12,%rax,8),%xmm0
movsd  %xmm0,0x8(%rbp)
movsd  0x10(%r12,%rax,8),%xmm0
movsd  %xmm0,0x10(%rbp)
movsd  0x18(%r12,%rax,8),%xmm0
movsd  %xmm0,0x18(%rbp)
add    $0x20,%rbp
add    $0x4,%rax
cmp    %rax,%rdi
jne    1460 <halo+0x340>
jmp    12d0 <halo+0x1b0>
cmpq   $0x4,0xa8(%rsp)
jae    14d9 <halo+0x3b9>
xor    %eax,%eax
jmp    1515 <halo+0x3f5>
cmpq   $0xc,0x90(%rsp)
jae    1568 <halo+0x448>
xor    %eax,%eax
jmp    15d1 <halo+0x4b1>
cmpq   $0x4,0x70(%rsp)
jae    162d <halo+0x50d>
xor    %eax,%eax
jmp    1676 <halo+0x556>
mov    0x50(%rsp),%rcx
xor    %eax,%eax
movups -0x30(%r9,%rax,8),%xmm0
movups -0x20(%r9,%rax,8),%xmm1
movups %xmm0,0x0(%rbp,%rax,8)
movups %xmm1,0x10(%rbp,%rax,8)
movups -0x10(%r9,%rax,8),%xmm0
movups (%r9,%rax,8),%xmm1
movups %xmm0,0x20(%rbp,%rax,8)
movups %xmm1,0x30(%rbp,%rax,8)
add    $0x8,%rax
add    $0xfffffffffffffffe,%rcx
jne    14e0 <halo+0x3c0>
testb  $0x1,0xa0(%rsp)
01
je     1546 <halo+0x426>
mov    0x20(%rsp),%rcx
add    %rax,%rcx
add    %r11,%rcx
mov    0x8(%rsp),%rdx
movups (%rdx,%rcx,8),%xmm0
movups 0x10(%rdx,%rcx,8),%xmm1
mov    0x4(%rsp),%edx
movups %xmm0,0x0(%rbp,%rax,8)
movups %xmm1,0x10(%rbp,%rax,8)
mov    0x88(%rsp),%rcx
lea    0x0(%rbp,%rcx,8),%rbp
mov    0x78(%rsp),%rax
cmp    %rcx,0x30(%rsp)
jne    1350 <halo+0x230>
jmp    1368 <halo+0x248>
mov    0x48(%rsp),%rdx
xor    %eax,%eax
nop
movups (%r12,%rax,8),%xmm0
movups 0x10(%r12,%rax,8),%xmm1
movups %xmm0,0x0(%rbp,%rax,8)
movups %xmm1,0x10(%rbp,%rax,8)
movups 0x20(%r12,%rax,8),%xmm0
movups 0x30(%r12,%rax,8),%xmm1
movups %xmm0,0x20(%rbp,%rax,8)
movups %xmm1,0x30(%rbp,%rax,8)
movups 0x40(%r12,%rax,8),%xmm0
movups 0x50(%r12,%rax,8),%xmm1
movups %xmm0,0x40(%rbp,%rax,8)
movups %xmm1,0x50(%rbp,%rax,8)
movups 0x60(%r12,%rax,8),%xmm0
movups 0x70(%r12,%rax,8),%xmm1
movups %xmm0,0x60(%rbp,%rax,8)
movups %xmm1,0x70(%rbp,%rax,8)
add    $0x10,%rax
add    $0xfffffffffffffffc,%rdx
jne    1570 <halo+0x450>
cmpq   $0x0,0x80(%rsp)
je     160b <halo+0x4eb>
lea    (%r14,%rax,8),%rcx
lea    0x10(,%rax,8),%rax
add    %rbp,%rax
xor    %edx,%edx
nopl   (%rax)
movups -0x10(%rcx,%rdx,1),%xmm0
movups (%rcx,%rdx,1),%xmm1
movups %xmm0,-0x10(%rax,%rdx,1)
movups %xmm1,(%rax,%rdx,1)
add    $0x20,%rdx
cmp    %rdx,%r8
jne    15f0 <halo+0x4d0>
mov    0x98(%rsp),%rcx
lea    0x0(%rbp,%rcx,8),%rbp
mov    %rcx,%rax
cmp    %rdi,%rcx
mov    0x4(%rsp),%edx
je     12d0 <halo+0x1b0>
jmp    1415 <halo+0x2f5>
mov    0x40(%rsp),%rcx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movups -0x30(%r13,%rax,8),%xmm0
movups -0x20(%r13,%rax,8),%xmm1
movups %xmm0,0x0(%rbp,%rax,8)
movups %xmm1,0x10(%rbp,%rax,8)
movups -0x10(%r13,%rax,8),%xmm0
movups 0x0(%r13,%rax,8),%xmm1
movups %xmm0,0x20(%rbp,%rax,8)
movups %xmm1,0x30(%rbp,%rax,8)
add    $0x8,%rax
add    $0xfffffffffffffffe,%rcx
jne    1640 <halo+0x520>
testb  $0x1,0x68(%rsp)
je     16a4 <halo+0x584>
mov    0x18(%rsp),%rcx
add    %rax,%rcx
add    %r11,%rcx
mov    0x8(%rsp),%rdx
movups (%rdx,%rcx,8),%xmm0
movups 0x10(%rdx,%rcx,8),%xmm1
mov    0x4(%rsp),%edx
movups %xmm0,0x0(%rbp,%rax,8)
movups %xmm1,0x10(%rbp,%rax,8)
mov    0x60(%rsp),%rcx
lea    0x0(%rbp,%rcx,8),%rbp
mov    0x58(%rsp),%rax
cmp    %rcx,0x28(%rsp)
jne    13c0 <halo+0x2a0>
jmp    13d8 <halo+0x2b8>
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @halo(double* %0, i32 %1, double* %2, i32 %3, i32 %4) {
%6 = alloca double*
%7 = alloca i32
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store double* %0, double** %6
store i32 %1, i32* %7
store double* %2, double** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%17 = load i32, i32* %7
%18 = call i32 @gridInqXsize(i32 %17)
store i32 %18, i32* %11
%19 = load i32, i32* %7
%20 = call i32 @gridInqYsize(i32 %19)
store i32 %20, i32* %12
store i32 0, i32* %15
%21 = load i32, i32* %11
store i32 %21, i32* %16
%22 = load i32, i32* %9
%23 = icmp slt i32 %22, 0
br i1 %23, label %24, label %27
24: ; preds = %5
%25 = load i32, i32* %9
%26 = sub nsw i32 0, %25
store i32 %26, i32* %15
br label %27
27: ; preds = %24, %5
%28 = load i32, i32* %10
%29 = icmp slt i32 %28, 0
br i1 %29, label %30, label %34
30: ; preds = %27
%31 = load i32, i32* %10
%32 = load i32, i32* %16
%33 = add nsw i32 %32, %31
store i32 %33, i32* %16
br label %34
34: ; preds = %30, %27
store i32 0, i32* %13
br label %35
35: ; preds = %104, %34
%36 = load i32, i32* %13
%37 = load i32, i32* %12
%38 = icmp slt i32 %36, %37
br i1 %38, label %39, label %107
39: ; preds = %35
%40 = load i32, i32* %11
%41 = load i32, i32* %9
%42 = sub nsw i32 %40, %41
store i32 %42, i32* %14
br label %43
43: ; preds = %59, %39
%44 = load i32, i32* %14
%45 = load i32, i32* %11
%46 = icmp slt i32 %44, %45
br i1 %46, label %47, label %62
47: ; preds = %43
%48 = load double*, double** %6
%49 = load i32, i32* %13
%50 = load i32, i32* %11
%51 = mul nsw i32 %49, %50
%52 = load i32, i32* %14
%53 = add nsw i32 %51, %52
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds double, double* %48, i64 %54
%56 = load double, double* %55
%57 = load double*, double** %8
%58 = getelementptr inbounds double, double* %57, i32 1
store double* %58, double** %8
store double %56, double* %57
br label %59
59: ; preds = %47
%60 = load i32, i32* %14
%61 = add nsw i32 %60, 1
store i32 %61, i32* %14
br label %43
62: ; preds = %43
%63 = load i32, i32* %15
store i32 %63, i32* %14
br label %64
64: ; preds = %80, %62
%65 = load i32, i32* %14
%66 = load i32, i32* %16
%67 = icmp slt i32 %65, %66
br i1 %67, label %68, label %83
68: ; preds = %64
%69 = load double*, double** %6
%70 = load i32, i32* %13
%71 = load i32, i32* %11
%72 = mul nsw i32 %70, %71
%73 = load i32, i32* %14
%74 = add nsw i32 %72, %73
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds double, double* %69, i64 %75
%77 = load double, double* %76
%78 = load double*, double** %8
%79 = getelementptr inbounds double, double* %78, i32 1
store double* %79, double** %8
store double %77, double* %78
br label %80
80: ; preds = %68
%81 = load i32, i32* %14
%82 = add nsw i32 %81, 1
store i32 %82, i32* %14
br label %64
83: ; preds = %64
store i32 0, i32* %14
br label %84
84: ; preds = %100, %83
%85 = load i32, i32* %14
%86 = load i32, i32* %10
%87 = icmp slt i32 %85, %86
br i1 %87, label %88, label %103
88: ; preds = %84
%89 = load double*, double** %6
%90 = load i32, i32* %13
%91 = load i32, i32* %11
%92 = mul nsw i32 %90, %91
%93 = load i32, i32* %14
%94 = add nsw i32 %92, %93
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds double, double* %89, i64 %95
%97 = load double, double* %96
%98 = load double*, double** %8
%99 = getelementptr inbounds double, double* %98, i32 1
store double* %99, double** %8
store double %97, double* %98
br label %100
100: ; preds = %88
%101 = load i32, i32* %14
%102 = add nsw i32 %101, 1
store i32 %102, i32* %14
br label %84
103: ; preds = %84
br label %104
104: ; preds = %103
%105 = load i32, i32* %13
%106 = add nsw i32 %105, 1
store i32 %106, i32* %13
br label %35
107: ; preds = %35
ret void
}

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