#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*/ check_offloading();
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  check_offloading();
  int fail;
  double A[(992)], B[(992)], C[(992)], D[(992)], E[(992)];
  double *pA, *pB, *pC, *pD, *pE;
  pA = &A[0];
  pB = &B[0];
  pC = &C[0];
  pD = &D[0];
  pE = &E[0];
  {
    int i;
    for (i = 0; i < (992); i++) {
      {
        A[i] = 0;
        C[i] = 1;
        D[i] = i;
        E[i] = -i;
      }
    }
  };
#pragma omp target data map(from                                               \
                            : pA [0:N]) map(to                                 \
                                            : pC [0:N], pD [0:N]) device(1)
  {
#pragma omp target device(1)
    {
#pragma omp parallel for schedule(static, 1)
      for (int i = 0; i < (992); i++)
        pA[i] = pC[i] + pD[i] + 1;
    }
#pragma omp target update from(pA [0:N]) device(1)
    fail = 0;
    {
      int i;
      int errorNum = 0;
      for (i = 0; i < (992); i++) {
        if (A[i] != (double)(i + 2)) {
          printf("Failed at %3d with %s, expected %f, got %f\n", i, "A[i]",
                 (double)(i + 2), A[i]);
          fail = 1;
          if (errorNum++ > 10)
            break;
        }
      }
    };
    if (fail) {
      printf("Test update from: Failed\n");
    } else {
      printf("Test update from: Succeeded\n");
    }
    for (int i = 0; i < (992); i++) {
      C[i] = 2;
      D[i] = i + 1;
    }
#pragma omp target update to(pC [0:N], pD [0:N]) device(1)
#pragma omp target device(1)
    {
#pragma omp parallel for schedule(static, 1)
      for (int i = 0; i < (992); i++)
        pA[i] = pC[i] + pD[i] + 1;
    }
#pragma omp target update from(pA [0:N]) device(1)
    fail = 0;
    {
      int i;
      int errorNum = 0;
      for (i = 0; i < (992); i++) {
        if (A[i] != (double)(i + 4)) {
          printf("Failed at %3d with %s, expected %f, got %f\n", i, "A[i]",
                 (double)(i + 4), A[i]);
          fail = 1;
          if (errorNum++ > 10)
            break;
        }
      }
    };
    if (fail) {
      printf("Test update to: Failed\n");
    } else {
      printf("Test update to: Succeeded\n");
    }
  }
  pA = pA - 100;
  pC = pC - 200;
  pD = pD - 300;
  {
    int i;
    for (i = 0; i < (992); i++) {
      {
        A[i] = 0;
        C[i] = 1;
        D[i] = i;
        E[i] = -i;
      }
    }
  };
#pragma omp target data map(from                                               \
                            : pA [100:N]) map(to                               \
                                              : pC [200:N], pD [300:N])        \
    device(1)
  {
#pragma omp target map(from                                                    \
                       : pA [100:N]) map(to                                    \
                                         : pC [200:N], pD [300:N]) device(1)
    {
#pragma omp parallel for schedule(static, 1)
      for (int i = 0; i < (992); i++)
        pA[i + 100] = pC[i + 200] + pD[i + 300] + 1;
    }
#pragma omp target update from(pA [100:N]) device(1)
    fail = 0;
    {
      int i;
      int errorNum = 0;
      for (i = 0; i < (992); i++) {
        if (A[i] != (double)(i + 2)) {
          printf("Failed at %3d with %s, expected %f, got %f\n", i, "A[i]",
                 (double)(i + 2), A[i]);
          fail = 1;
          if (errorNum++ > 10)
            break;
        }
      }
    };
    if (fail) {
      printf("Test update from with offsets: Failed\n");
    } else {
      printf("Test update from with offsets: Succeeded\n");
    }
    for (int i = 0; i < (992); i++) {
      C[i] = 2;
      D[i] = i + 1;
    }
#pragma omp target update to(pC [200:N], pD [300:N]) device(1)
#pragma omp target map(from                                                    \
                       : pA [100:N]) map(to                                    \
                                         : pC [200:N], pD [300:N]) device(1)
    {
#pragma omp parallel for schedule(static, 1)
      for (int i = 0; i < (992); i++)
        pA[i + 100] = pC[i + 200] + pD[i + 300] + 1;
    }
#pragma omp target update from(pA [100:N]) device(1)
    fail = 0;
    {
      int i;
      int errorNum = 0;
      for (i = 0; i < (992); i++) {
        if (A[i] != (double)(i + 4)) {
          printf("Failed at %3d with %s, expected %f, got %f\n", i, "A[i]",
                 (double)(i + 4), A[i]);
          fail = 1;
          if (errorNum++ > 10)
            break;
        }
      }
    };
    if (fail) {
      printf("Test update to with offsets: Failed\n");
    } else {
      printf("Test update to with offsets: Succeeded\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9b80,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <check_offloading@plt>
lea    -0x1f10(%rbp),%rax
mov    %rax,-0x9b18(%rbp)
lea    -0x3e10(%rbp),%rax
mov    %rax,-0x9b20(%rbp)
lea    -0x5d10(%rbp),%rax
mov    %rax,-0x9b28(%rbp)
lea    -0x7c10(%rbp),%rax
mov    %rax,-0x9b30(%rbp)
lea    -0x9b10(%rbp),%rax
mov    %rax,-0x9b38(%rbp)
movl   $0x0,-0x9b3c(%rbp)
cmpl   $0x3e0,-0x9b3c(%rbp)
jge    120c <main+0xec>
movslq -0x9b3c(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
movslq -0x9b3c(%rbp),%rax
movsd  0xe45(%rip),%xmm0
movsd  %xmm0,-0x5d10(%rbp,%rax,8)
ff ff
cvtsi2sdl -0x9b3c(%rbp),%xmm0
ff
movslq -0x9b3c(%rbp),%rax
movsd  %xmm0,-0x7c10(%rbp,%rax,8)
ff ff
xor    %eax,%eax
sub    -0x9b3c(%rbp),%eax
cvtsi2sd %eax,%xmm0
movslq -0x9b3c(%rbp),%rax
movsd  %xmm0,-0x9b10(%rbp,%rax,8)
ff ff
mov    -0x9b3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b3c(%rbp)
jmp    1189 <main+0x69>
movl   $0x0,-0x9b40(%rbp)
cmpl   $0x3e0,-0x9b40(%rbp)
jge    127f <main+0x15f>
mov    -0x9b28(%rbp),%rax
movslq -0x9b40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x9b30(%rbp),%rax
movslq -0x9b40(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  0xdac(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x9b18(%rbp),%rax
movslq -0x9b40(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x9b40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b40(%rbp)
jmp    1216 <main+0xf6>
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x9b48(%rbp)
movl   $0x0,-0x9b44(%rbp)
cmpl   $0x3e0,-0x9b44(%rbp)
jge    1358 <main+0x238>
movslq -0x9b44(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
mov    -0x9b44(%rbp),%eax
add    $0x2,%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jne    12dc <main+0x1bc>
jp     12dc <main+0x1bc>
jmp    133f <main+0x21f>
mov    -0x9b44(%rbp),%esi
mov    -0x9b44(%rbp),%eax
add    $0x2,%eax
cvtsi2sd %eax,%xmm0
movslq -0x9b44(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm1
ff ff
lea    0xd0a(%rip),%rdi
lea    0xd2f(%rip),%rdx
mov    $0x2,%al
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x9b48(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x9b48(%rbp)
cmp    $0xa,%eax
jle    133a <main+0x21a>
jmp    1358 <main+0x238>
jmp    133f <main+0x21f>
jmp    1344 <main+0x224>
mov    -0x9b44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b44(%rbp)
jmp    129a <main+0x17a>
cmpl   $0x0,-0x8(%rbp)
je     1375 <main+0x255>
lea    0xcd8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1383 <main+0x263>
lea    0xcdf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x9b4c(%rbp)
cmpl   $0x3e0,-0x9b4c(%rbp)
jge    13e6 <main+0x2c6>
movslq -0x9b4c(%rbp),%rax
movsd  0xc5c(%rip),%xmm0
movsd  %xmm0,-0x5d10(%rbp,%rax,8)
ff ff
mov    -0x9b4c(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
movslq -0x9b4c(%rbp),%rax
movsd  %xmm0,-0x7c10(%rbp,%rax,8)
ff ff
mov    -0x9b4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b4c(%rbp)
jmp    138d <main+0x26d>
movl   $0x0,-0x9b50(%rbp)
cmpl   $0x3e0,-0x9b50(%rbp)
jge    1459 <main+0x339>
mov    -0x9b28(%rbp),%rax
movslq -0x9b50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x9b30(%rbp),%rax
movslq -0x9b50(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  0xbd2(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x9b18(%rbp),%rax
movslq -0x9b50(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x9b50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b50(%rbp)
jmp    13f0 <main+0x2d0>
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x9b58(%rbp)
movl   $0x0,-0x9b54(%rbp)
cmpl   $0x3e0,-0x9b54(%rbp)
jge    1532 <main+0x412>
movslq -0x9b54(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
mov    -0x9b54(%rbp),%eax
add    $0x4,%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jne    14b6 <main+0x396>
jp     14b6 <main+0x396>
jmp    1519 <main+0x3f9>
mov    -0x9b54(%rbp),%esi
mov    -0x9b54(%rbp),%eax
add    $0x4,%eax
cvtsi2sd %eax,%xmm0
movslq -0x9b54(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm1
ff ff
lea    0xb30(%rip),%rdi
lea    0xb55(%rip),%rdx
mov    $0x2,%al
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x9b58(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x9b58(%rbp)
cmp    $0xa,%eax
jle    1514 <main+0x3f4>
jmp    1532 <main+0x412>
jmp    1519 <main+0x3f9>
jmp    151e <main+0x3fe>
mov    -0x9b54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b54(%rbp)
jmp    1474 <main+0x354>
cmpl   $0x0,-0x8(%rbp)
je     154f <main+0x42f>
lea    0xb35(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    155d <main+0x43d>
lea    0xb3a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x9b18(%rbp),%rax
add    $0xfffffffffffffce0,%rax
mov    %rax,-0x9b18(%rbp)
mov    -0x9b28(%rbp),%rax
add    $0xfffffffffffff9c0,%rax
mov    %rax,-0x9b28(%rbp)
mov    -0x9b30(%rbp),%rax
add    $0xfffffffffffff6a0,%rax
mov    %rax,-0x9b30(%rbp)
movl   $0x0,-0x9b5c(%rbp)
cmpl   $0x3e0,-0x9b5c(%rbp)
jge    1626 <main+0x506>
movslq -0x9b5c(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
movslq -0x9b5c(%rbp),%rax
movsd  0xa2b(%rip),%xmm0
movsd  %xmm0,-0x5d10(%rbp,%rax,8)
ff ff
cvtsi2sdl -0x9b5c(%rbp),%xmm0
ff
movslq -0x9b5c(%rbp),%rax
movsd  %xmm0,-0x7c10(%rbp,%rax,8)
ff ff
xor    %eax,%eax
sub    -0x9b5c(%rbp),%eax
cvtsi2sd %eax,%xmm0
movslq -0x9b5c(%rbp),%rax
movsd  %xmm0,-0x9b10(%rbp,%rax,8)
ff ff
mov    -0x9b5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b5c(%rbp)
jmp    15a3 <main+0x483>
movl   $0x0,-0x9b60(%rbp)
cmpl   $0x3e0,-0x9b60(%rbp)
jge    16ae <main+0x58e>
mov    -0x9b28(%rbp),%rax
mov    -0x9b60(%rbp),%ecx
add    $0xc8,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x9b30(%rbp),%rax
mov    -0x9b60(%rbp),%ecx
add    $0x12c,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  0x982(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x9b18(%rbp),%rax
mov    -0x9b60(%rbp),%ecx
add    $0x64,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x9b60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b60(%rbp)
jmp    1630 <main+0x510>
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x9b68(%rbp)
movl   $0x0,-0x9b64(%rbp)
cmpl   $0x3e0,-0x9b64(%rbp)
jge    1787 <main+0x667>
movslq -0x9b64(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
mov    -0x9b64(%rbp),%eax
add    $0x2,%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jne    170b <main+0x5eb>
jp     170b <main+0x5eb>
jmp    176e <main+0x64e>
mov    -0x9b64(%rbp),%esi
mov    -0x9b64(%rbp),%eax
add    $0x2,%eax
cvtsi2sd %eax,%xmm0
movslq -0x9b64(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm1
ff ff
lea    0x8db(%rip),%rdi
lea    0x900(%rip),%rdx
mov    $0x2,%al
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x9b68(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x9b68(%rbp)
cmp    $0xa,%eax
jle    1769 <main+0x649>
jmp    1787 <main+0x667>
jmp    176e <main+0x64e>
jmp    1773 <main+0x653>
mov    -0x9b64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b64(%rbp)
jmp    16c9 <main+0x5a9>
cmpl   $0x0,-0x8(%rbp)
je     17a4 <main+0x684>
lea    0x913(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    17b2 <main+0x692>
lea    0x927(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x9b6c(%rbp)
cmpl   $0x3e0,-0x9b6c(%rbp)
jge    1815 <main+0x6f5>
movslq -0x9b6c(%rbp),%rax
movsd  0x82d(%rip),%xmm0
movsd  %xmm0,-0x5d10(%rbp,%rax,8)
ff ff
mov    -0x9b6c(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
movslq -0x9b6c(%rbp),%rax
movsd  %xmm0,-0x7c10(%rbp,%rax,8)
ff ff
mov    -0x9b6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b6c(%rbp)
jmp    17bc <main+0x69c>
movl   $0x0,-0x9b70(%rbp)
cmpl   $0x3e0,-0x9b70(%rbp)
jge    189d <main+0x77d>
mov    -0x9b28(%rbp),%rax
mov    -0x9b70(%rbp),%ecx
add    $0xc8,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x9b30(%rbp),%rax
mov    -0x9b70(%rbp),%ecx
add    $0x12c,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  0x793(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x9b18(%rbp),%rax
mov    -0x9b70(%rbp),%ecx
add    $0x64,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x9b70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b70(%rbp)
jmp    181f <main+0x6ff>
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x9b78(%rbp)
movl   $0x0,-0x9b74(%rbp)
cmpl   $0x3e0,-0x9b74(%rbp)
jge    1976 <main+0x856>
movslq -0x9b74(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
mov    -0x9b74(%rbp),%eax
add    $0x4,%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jne    18fa <main+0x7da>
jp     18fa <main+0x7da>
jmp    195d <main+0x83d>
mov    -0x9b74(%rbp),%esi
mov    -0x9b74(%rbp),%eax
add    $0x4,%eax
cvtsi2sd %eax,%xmm0
movslq -0x9b74(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm1
ff ff
lea    0x6ec(%rip),%rdi
lea    0x711(%rip),%rdx
mov    $0x2,%al
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x9b78(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x9b78(%rbp)
cmp    $0xa,%eax
jle    1958 <main+0x838>
jmp    1976 <main+0x856>
jmp    195d <main+0x83d>
jmp    1962 <main+0x842>
mov    -0x9b74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b74(%rbp)
jmp    18b8 <main+0x798>
cmpl   $0x0,-0x8(%rbp)
je     1993 <main+0x873>
lea    0x775(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    19a1 <main+0x881>
lea    0x787(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x9b80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x5d00,%rsp
xor    %eax,%eax
call   1060 <check_offloading@plt>
lea    0x3e00(%rsp),%rdi
mov    $0x1f00,%edx
xor    %esi,%esi
call   1050 <memset@plt>
movdqa 0xe8e(%rip),%xmm0
mov    $0x6,%eax
movapd 0xea1(%rip),%xmm4
nop
movdqa %xmm0,%xmm1
paddd  0xe84(%rip),%xmm1
movapd %xmm4,0x1ed0(%rsp,%rax,8)
cvtdq2pd %xmm0,%xmm2
cvtdq2pd %xmm1,%xmm1
movapd %xmm4,0x1ee0(%rsp,%rax,8)
movaps %xmm2,-0x30(%rsp,%rax,8)
movaps %xmm1,-0x20(%rsp,%rax,8)
movdqa %xmm0,%xmm1
paddd  0xe74(%rip),%xmm1
movdqa %xmm0,%xmm2
paddd  0xe78(%rip),%xmm2
movapd %xmm4,0x1ef0(%rsp,%rax,8)
cvtdq2pd %xmm1,%xmm1
movapd %xmm4,0x1f00(%rsp,%rax,8)
cvtdq2pd %xmm2,%xmm2
movapd %xmm1,-0x10(%rsp,%rax,8)
movapd %xmm2,(%rsp,%rax,8)
paddd  0xe5b(%rip),%xmm0
add    $0x8,%rax
cmp    $0x3e6,%rax
jne    1180 <main+0x40>
mov    $0x6,%eax
nopw   0x0(%rax,%rax,1)
movapd 0x1ed0(%rsp,%rax,8),%xmm0
movapd 0x1ee0(%rsp,%rax,8),%xmm1
movapd 0x1ef0(%rsp,%rax,8),%xmm2
movapd 0x1f00(%rsp,%rax,8),%xmm3
addpd  -0x30(%rsp,%rax,8),%xmm0
addpd  -0x20(%rsp,%rax,8),%xmm1
addpd  %xmm4,%xmm0
addpd  %xmm4,%xmm1
movapd %xmm0,0x3dd0(%rsp,%rax,8)
movapd %xmm1,0x3de0(%rsp,%rax,8)
addpd  -0x10(%rsp,%rax,8),%xmm2
addpd  (%rsp,%rax,8),%xmm3
addpd  %xmm4,%xmm2
addpd  %xmm4,%xmm3
movapd %xmm2,0x3df0(%rsp,%rax,8)
movapd %xmm3,0x3e00(%rsp,%rax,8)
add    $0x8,%rax
cmp    $0x3e6,%rax
jne    1210 <main+0xd0>
lea    0xe4f(%rip),%rdi
xor    %ebx,%ebx
lea    0xe15(%rip),%r14
lea    0xe3a(%rip),%r15
lea    0xf1f(%rip),%r12
xor    %ebp,%ebp
add    $0x1,%rbx
nop
movsd  0x3df8(%rsp,%rbx,8),%xmm1
lea    0x1(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
ucomisd %xmm0,%xmm1
jne    12e0 <main+0x1a0>
jp     12e0 <main+0x1a0>
add    $0x1,%rbx
cmp    $0x3e1,%rbx
jne    12b0 <main+0x170>
jmp    1307 <main+0x1c7>
nopw   0x0(%rax,%rax,1)
lea    -0x1(%rbx),%esi
mov    %r14,%rdi
mov    %r15,%rdx
mov    $0x2,%al
call   1040 <printf@plt>
cmp    $0xa,%ebp
ja     1304 <main+0x1c4>
add    $0x1,%ebp
mov    %r12,%rdi
cmp    $0x3e0,%rbx
jne    12ab <main+0x16b>
mov    %r12,%rdi
call   1030 <puts@plt>
movdqa 0xd4c(%rip),%xmm0
mov    $0x6,%eax
movaps 0xd50(%rip),%xmm4
pcmpeqd %xmm1,%xmm1
movdqa 0xd54(%rip),%xmm5
nopl   0x0(%rax)
movaps %xmm4,0x1ed0(%rsp,%rax,8)
movaps %xmm4,0x1ee0(%rsp,%rax,8)
pshufd $0xe8,%xmm0,%xmm2
movdqa %xmm2,%xmm3
psubd  %xmm1,%xmm3
cvtdq2pd %xmm3,%xmm3
paddd  %xmm5,%xmm2
cvtdq2pd %xmm2,%xmm2
movaps %xmm3,-0x30(%rsp,%rax,8)
movaps %xmm2,-0x20(%rsp,%rax,8)
movdqa %xmm0,%xmm2
paddq  0xd21(%rip),%xmm2
movaps %xmm4,0x1ef0(%rsp,%rax,8)
movaps %xmm4,0x1f00(%rsp,%rax,8)
pshufd $0xe8,%xmm2,%xmm2
movdqa %xmm2,%xmm3
psubd  %xmm1,%xmm3
cvtdq2pd %xmm3,%xmm3
paddd  %xmm5,%xmm2
cvtdq2pd %xmm2,%xmm2
movapd %xmm3,-0x10(%rsp,%rax,8)
movapd %xmm2,(%rsp,%rax,8)
paddq  0xcf5(%rip),%xmm0
add    $0x8,%rax
cmp    $0x3e6,%rax
jne    1330 <main+0x1f0>
mov    $0x6,%eax
movapd 0xc58(%rip),%xmm4
nopl   0x0(%rax,%rax,1)
movapd 0x1ed0(%rsp,%rax,8),%xmm0
movapd 0x1ee0(%rsp,%rax,8),%xmm1
movapd 0x1ef0(%rsp,%rax,8),%xmm2
movapd 0x1f00(%rsp,%rax,8),%xmm3
addpd  -0x30(%rsp,%rax,8),%xmm0
addpd  -0x20(%rsp,%rax,8),%xmm1
addpd  %xmm4,%xmm0
addpd  %xmm4,%xmm1
movapd %xmm0,0x3dd0(%rsp,%rax,8)
movapd %xmm1,0x3de0(%rsp,%rax,8)
addpd  -0x10(%rsp,%rax,8),%xmm2
addpd  (%rsp,%rax,8),%xmm3
addpd  %xmm4,%xmm2
addpd  %xmm4,%xmm3
movapd %xmm2,0x3df0(%rsp,%rax,8)
movapd %xmm3,0x3e00(%rsp,%rax,8)
add    $0x8,%rax
cmp    $0x3e6,%rax
jne    13d0 <main+0x290>
lea    0xcab(%rip),%rdi
xor    %ebx,%ebx
lea    0xc55(%rip),%r14
lea    0xc7a(%rip),%r15
lea    0xd48(%rip),%r12
xor    %ebp,%ebp
add    $0x1,%rbx
nop
movsd  0x3df8(%rsp,%rbx,8),%xmm1
lea    0x3(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
ucomisd %xmm0,%xmm1
jne    14a0 <main+0x360>
jp     14a0 <main+0x360>
add    $0x1,%rbx
cmp    $0x3e1,%rbx
jne    1470 <main+0x330>
jmp    14c7 <main+0x387>
nopw   0x0(%rax,%rax,1)
lea    -0x1(%rbx),%esi
mov    %r14,%rdi
mov    %r15,%rdx
mov    $0x2,%al
call   1040 <printf@plt>
cmp    $0xa,%ebp
ja     14c4 <main+0x384>
add    $0x1,%ebp
mov    %r12,%rdi
cmp    $0x3e0,%rbx
jne    146b <main+0x32b>
mov    %r12,%rdi
call   1030 <puts@plt>
lea    0x3e00(%rsp),%rdi
mov    $0x1f00,%edx
xor    %esi,%esi
call   1050 <memset@plt>
movdqa 0xb18(%rip),%xmm0
mov    $0x6,%eax
movapd 0xb2b(%rip),%xmm4
movdqa 0xb13(%rip),%xmm3
movdqa 0xb2b(%rip),%xmm5
movdqa 0xb33(%rip),%xmm6
movdqa 0xb3b(%rip),%xmm7
cs nopw 0x0(%rax,%rax,1)
nop
movdqa %xmm0,%xmm1
paddd  %xmm3,%xmm1
movapd %xmm4,0x1ed0(%rsp,%rax,8)
cvtdq2pd %xmm0,%xmm2
cvtdq2pd %xmm1,%xmm1
movapd %xmm4,0x1ee0(%rsp,%rax,8)
movaps %xmm2,-0x30(%rsp,%rax,8)
movaps %xmm1,-0x20(%rsp,%rax,8)
movdqa %xmm0,%xmm1
paddd  %xmm5,%xmm1
movdqa %xmm0,%xmm2
paddd  %xmm6,%xmm2
movapd %xmm4,0x1ef0(%rsp,%rax,8)
cvtdq2pd %xmm1,%xmm1
movapd %xmm4,0x1f00(%rsp,%rax,8)
cvtdq2pd %xmm2,%xmm2
movdqa %xmm1,-0x10(%rsp,%rax,8)
movapd %xmm2,(%rsp,%rax,8)
paddd  %xmm7,%xmm0
add    $0x8,%rax
cmp    $0x3e6,%rax
jne    1520 <main+0x3e0>
mov    $0x6,%eax
cs nopw 0x0(%rax,%rax,1)
movapd 0x1ed0(%rsp,%rax,8),%xmm0
movapd 0x1ee0(%rsp,%rax,8),%xmm1
movapd 0x1ef0(%rsp,%rax,8),%xmm2
movapd 0x1f00(%rsp,%rax,8),%xmm3
addpd  -0x30(%rsp,%rax,8),%xmm0
addpd  -0x20(%rsp,%rax,8),%xmm1
addpd  %xmm4,%xmm0
addpd  %xmm4,%xmm1
movapd %xmm0,0x3dd0(%rsp,%rax,8)
movapd %xmm1,0x3de0(%rsp,%rax,8)
addpd  -0x10(%rsp,%rax,8),%xmm2
addpd  (%rsp,%rax,8),%xmm3
addpd  %xmm4,%xmm2
addpd  %xmm4,%xmm3
movapd %xmm2,0x3df0(%rsp,%rax,8)
movapd %xmm3,0x3e00(%rsp,%rax,8)
add    $0x8,%rax
cmp    $0x3e6,%rax
jne    15a0 <main+0x460>
lea    0xaf5(%rip),%rdi
xor    %ebx,%ebx
lea    0xa85(%rip),%r14
lea    0xaaa(%rip),%r15
lea    0xb52(%rip),%r12
xor    %ebp,%ebp
add    $0x1,%rbx
nop
movsd  0x3df8(%rsp,%rbx,8),%xmm1
lea    0x1(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
ucomisd %xmm0,%xmm1
jne    1670 <main+0x530>
jp     1670 <main+0x530>
add    $0x1,%rbx
cmp    $0x3e1,%rbx
jne    1640 <main+0x500>
jmp    1697 <main+0x557>
nopw   0x0(%rax,%rax,1)
lea    -0x1(%rbx),%esi
mov    %r14,%rdi
mov    %r15,%rdx
mov    $0x2,%al
call   1040 <printf@plt>
cmp    $0xa,%ebp
ja     1694 <main+0x554>
add    $0x1,%ebp
mov    %r12,%rdi
cmp    $0x3e0,%rbx
jne    163b <main+0x4fb>
mov    %r12,%rdi
call   1030 <puts@plt>
movdqa 0x9bc(%rip),%xmm0
mov    $0x6,%eax
pcmpeqd %xmm1,%xmm1
movaps 0x9bc(%rip),%xmm4
movdqa 0x9c4(%rip),%xmm5
movdqa 0x9cc(%rip),%xmm6
movdqa 0x9d4(%rip),%xmm7
nopl   0x0(%rax)
movaps %xmm4,0x1ed0(%rsp,%rax,8)
movaps %xmm4,0x1ee0(%rsp,%rax,8)
pshufd $0xe8,%xmm0,%xmm2
movdqa %xmm2,%xmm3
psubd  %xmm1,%xmm3
cvtdq2pd %xmm3,%xmm3
paddd  %xmm5,%xmm2
cvtdq2pd %xmm2,%xmm2
movaps %xmm3,-0x30(%rsp,%rax,8)
movaps %xmm2,-0x20(%rsp,%rax,8)
movdqa %xmm0,%xmm2
paddq  %xmm6,%xmm2
movaps %xmm4,0x1ef0(%rsp,%rax,8)
movaps %xmm4,0x1f00(%rsp,%rax,8)
pshufd $0xe8,%xmm2,%xmm2
movdqa %xmm2,%xmm3
psubd  %xmm1,%xmm3
cvtdq2pd %xmm3,%xmm3
paddd  %xmm5,%xmm2
cvtdq2pd %xmm2,%xmm2
movdqa %xmm3,-0x10(%rsp,%rax,8)
movapd %xmm2,(%rsp,%rax,8)
paddq  %xmm7,%xmm0
add    $0x8,%rax
cmp    $0x3e6,%rax
jne    16d0 <main+0x590>
mov    $0x6,%eax
movapd 0x8c4(%rip),%xmm4
nopl   0x0(%rax)
movapd 0x1ed0(%rsp,%rax,8),%xmm0
movapd 0x1ee0(%rsp,%rax,8),%xmm1
movapd 0x1ef0(%rsp,%rax,8),%xmm2
movapd 0x1f00(%rsp,%rax,8),%xmm3
addpd  -0x30(%rsp,%rax,8),%xmm0
addpd  -0x20(%rsp,%rax,8),%xmm1
addpd  %xmm4,%xmm0
addpd  %xmm4,%xmm1
movapd %xmm0,0x3dd0(%rsp,%rax,8)
movapd %xmm1,0x3de0(%rsp,%rax,8)
addpd  -0x10(%rsp,%rax,8),%xmm2
addpd  (%rsp,%rax,8),%xmm3
addpd  %xmm4,%xmm2
addpd  %xmm4,%xmm3
movapd %xmm2,0x3df0(%rsp,%rax,8)
movapd %xmm3,0x3e00(%rsp,%rax,8)
add    $0x8,%rax
cmp    $0x3e6,%rax
jne    1760 <main+0x620>
lea    0x95e(%rip),%rdi
xor    %ebx,%ebx
lea    0x8c5(%rip),%r14
lea    0x8ea(%rip),%r15
lea    0x96e(%rip),%r12
xor    %ebp,%ebp
add    $0x1,%rbx
nop
movsd  0x3df8(%rsp,%rbx,8),%xmm1
lea    0x3(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
ucomisd %xmm0,%xmm1
jne    1830 <main+0x6f0>
jp     1830 <main+0x6f0>
add    $0x1,%rbx
cmp    $0x3e1,%rbx
jne    1800 <main+0x6c0>
jmp    1857 <main+0x717>
nopw   0x0(%rax,%rax,1)
lea    -0x1(%rbx),%esi
mov    %r14,%rdi
mov    %r15,%rdx
mov    $0x2,%al
call   1040 <printf@plt>
cmp    $0xa,%ebp
ja     1854 <main+0x714>
add    $0x1,%ebp
mov    %r12,%rdi
cmp    $0x3e0,%rbx
jne    17fb <main+0x6bb>
mov    %r12,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x5d00,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

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