#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();
  double A[(992)], B[(992)], C[(992)], D[(992)], E[(992)];
  {
    int i;
    for (i = 0; i < (992); i++) {
      {
        C[i] = 1;
        D[i] = i;
        E[i] = -i;
      }
    }
  };
  for (int t = 0; t <= 224; t++) {
    int threads[1];
    threads[0] = t;

#pragma omp parallel if (threads[0] > 1) num_threads(threads[0])

#pragma omp for nowait schedule(static, 1)

#pragma omp master

#pragma omp barrier

#pragma omp for schedule(static, 1)
    {
      int fail = 0;
      int trial;
      for (int trial = 0; trial < (1) && fail == 0; trial++) {
#pragma omp target teams num_teams(1) thread_limit(1024)
        {{for (int i = 0; i < (992); i++){A[i] = 1;
        B[i] = 0;
      }
      {
        for (int i = 0; i < (992); i++) {
          B[i] = D[i] - E[i];
        }
        {
          for (int i = 0; i < (992); i++) {
            A[i] += C[i] + D[i];
          }
        }
        for (int i = 0; i < (992); i++) {
          B[i] += A[i];
        }
      }
    }
  }
  {
    int i;
    int errorNum = 0;
    for (i = 0; i < (992); i++) {
      if (B[i] != 3 * i + 2) {
        printf("Failed at %3d with %s, expected %f, got %f\n", i, "B[i]",
               3 * i + 2, B[i]);
        fail = 1;
        if (errorNum++ > 10)
          break;
      }
    }
  }
}
if (fail) {
  printf("Failed\n");
} else {
  printf("Succeeded\n");
}
}
;
}
return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9b50,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <check_offloading@plt>
movl   $0x0,-0x9b14(%rbp)
cmpl   $0x3e0,-0x9b14(%rbp)
jge    11b3 <main+0x93>
movslq -0x9b14(%rbp),%rax
movsd  0xe9e(%rip),%xmm0
movsd  %xmm0,-0x5d10(%rbp,%rax,8)
ff ff
cvtsi2sdl -0x9b14(%rbp),%xmm0
ff
movslq -0x9b14(%rbp),%rax
movsd  %xmm0,-0x7c10(%rbp,%rax,8)
ff ff
xor    %eax,%eax
sub    -0x9b14(%rbp),%eax
cvtsi2sd %eax,%xmm0
movslq -0x9b14(%rbp),%rax
movsd  %xmm0,-0x9b10(%rbp,%rax,8)
ff ff
mov    -0x9b14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b14(%rbp)
jmp    1143 <main+0x23>
movl   $0x0,-0x9b18(%rbp)
cmpl   $0xe0,-0x9b18(%rbp)
jg     14cd <main+0x3ad>
mov    -0x9b18(%rbp),%eax
mov    %eax,-0x9b1c(%rbp)
movl   $0x0,-0x9b20(%rbp)
movl   $0x0,-0x9b28(%rbp)
xor    %eax,%eax
cmpl   $0x1,-0x9b28(%rbp)
mov    %al,-0x9b41(%rbp)
jge    1212 <main+0xf2>
cmpl   $0x0,-0x9b20(%rbp)
sete   %al
mov    %al,-0x9b41(%rbp)
mov    -0x9b41(%rbp),%al
test   $0x1,%al
jne    1225 <main+0x105>
jmp    1486 <main+0x366>
movl   $0x0,-0x9b2c(%rbp)
cmpl   $0x3e0,-0x9b2c(%rbp)
jge    127e <main+0x15e>
movslq -0x9b2c(%rbp),%rax
movsd  0xdb2(%rip),%xmm0
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
movslq -0x9b2c(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x3e10(%rbp,%rax,8)
ff ff
mov    -0x9b2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b2c(%rbp)
jmp    122f <main+0x10f>
movl   $0x0,-0x9b30(%rbp)
cmpl   $0x3e0,-0x9b30(%rbp)
jge    12dc <main+0x1bc>
movslq -0x9b30(%rbp),%rax
movsd  -0x7c10(%rbp,%rax,8),%xmm0
ff ff
movslq -0x9b30(%rbp),%rax
subsd  -0x9b10(%rbp,%rax,8),%xmm0
ff ff
movslq -0x9b30(%rbp),%rax
movsd  %xmm0,-0x3e10(%rbp,%rax,8)
ff ff
mov    -0x9b30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b30(%rbp)
jmp    1288 <main+0x168>
movl   $0x0,-0x9b34(%rbp)
cmpl   $0x3e0,-0x9b34(%rbp)
jge    1343 <main+0x223>
movslq -0x9b34(%rbp),%rax
movsd  -0x5d10(%rbp,%rax,8),%xmm0
ff ff
movslq -0x9b34(%rbp),%rax
addsd  -0x7c10(%rbp,%rax,8),%xmm0
ff ff
movslq -0x9b34(%rbp),%rax
addsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x1f10(%rbp,%rax,8)
ff ff
mov    -0x9b34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b34(%rbp)
jmp    12e6 <main+0x1c6>
movl   $0x0,-0x9b38(%rbp)
cmpl   $0x3e0,-0x9b38(%rbp)
jge    139a <main+0x27a>
movslq -0x9b38(%rbp),%rax
movsd  -0x1f10(%rbp,%rax,8),%xmm0
ff ff
movslq -0x9b38(%rbp),%rax
addsd  -0x3e10(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x3e10(%rbp,%rax,8)
ff ff
mov    -0x9b38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b38(%rbp)
jmp    134d <main+0x22d>
movl   $0x0,-0x9b40(%rbp)
movl   $0x0,-0x9b3c(%rbp)
cmpl   $0x3e0,-0x9b3c(%rbp)
jge    146d <main+0x34d>
movslq -0x9b3c(%rbp),%rax
movsd  -0x3e10(%rbp,%rax,8),%xmm0
ff ff
imul   $0x3,-0x9b3c(%rbp),%eax
add    $0x2,%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jne    13f1 <main+0x2d1>
jp     13f1 <main+0x2d1>
jmp    1454 <main+0x334>
mov    -0x9b3c(%rbp),%esi
imul   $0x3,-0x9b3c(%rbp),%ecx
add    $0x2,%ecx
movslq -0x9b3c(%rbp),%rax
movsd  -0x3e10(%rbp,%rax,8),%xmm0
ff ff
lea    0xbf0(%rip),%rdi
lea    0xc15(%rip),%rdx
mov    $0x1,%al
call   1030 <printf@plt>
movl   $0x1,-0x9b20(%rbp)
mov    -0x9b40(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x9b40(%rbp)
cmp    $0xa,%eax
jle    144f <main+0x32f>
jmp    146d <main+0x34d>
jmp    1454 <main+0x334>
jmp    1459 <main+0x339>
mov    -0x9b3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b3c(%rbp)
jmp    13ae <main+0x28e>
jmp    1472 <main+0x352>
mov    -0x9b28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b28(%rbp)
jmp    11ed <main+0xcd>
cmpl   $0x0,-0x9b20(%rbp)
je     14a6 <main+0x386>
lea    0xb9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14b4 <main+0x394>
lea    0xb94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14b9 <main+0x399>
mov    -0x9b18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9b18(%rbp)
jmp    11bd <main+0x9d>
xor    %eax,%eax
add    $0x9b50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x9b08,%rsp
xor    %eax,%eax
call   1060 <check_offloading@plt>
movdqa 0xea0(%rip),%xmm0
mov    $0x2,%eax
movdqa 0xea3(%rip),%xmm1
movaps 0xeac(%rip),%xmm7
movdqa 0xeb4(%rip),%xmm2
movdqa 0xebc(%rip),%xmm3
movdqa %xmm0,%xmm4
nopl   0x0(%rax,%rax,1)
movdqa %xmm0,%xmm5
paddd  %xmm1,%xmm5
movaps %xmm7,0x7bf0(%rsp,%rax,8)
cvtdq2pd %xmm0,%xmm6
cvtdq2pd %xmm5,%xmm5
movaps %xmm7,0x7c00(%rsp,%rax,8)
movaps %xmm6,0x3df0(%rsp,%rax,8)
movdqa %xmm5,0x3e00(%rsp,%rax,8)
pxor   %xmm5,%xmm5
psubd  %xmm4,%xmm5
movdqa %xmm2,%xmm6
psubd  %xmm4,%xmm6
cvtdq2pd %xmm5,%xmm5
cvtdq2pd %xmm6,%xmm6
movaps %xmm5,0x5cf0(%rsp,%rax,8)
movaps %xmm6,0x5d00(%rsp,%rax,8)
paddd  %xmm3,%xmm0
paddd  %xmm3,%xmm4
add    $0x4,%rax
cmp    $0x3e2,%rax
jne    1190 <main+0x50>
xor    %r13d,%r13d
lea    0xe49(%rip),%r15
lea    0xe6e(%rip),%r12
jmp    123a <main+0xfa>
test   %eax,%eax
lea    0xe72(%rip),%rdi
lea    0xe61(%rip),%rax
cmove  %rax,%rdi
call   1030 <puts@plt>
add    $0x1,%r13d
cmp    $0xe1,%r13d
je     14dc <main+0x39c>
mov    $0x1f00,%edx
lea    0x1f00(%rsp),%rdi
xor    %esi,%esi
call   1050 <memset@plt>
mov    $0x1e,%eax
movdqa 0xdc5(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
movdqa %xmm0,-0xf0(%rsp,%rax,8)
ff ff
movdqa %xmm0,-0xe0(%rsp,%rax,8)
ff ff
movdqa %xmm0,-0xd0(%rsp,%rax,8)
ff ff
movdqa %xmm0,-0xc0(%rsp,%rax,8)
ff ff
movdqa %xmm0,-0xb0(%rsp,%rax,8)
ff ff
movdqa %xmm0,-0xa0(%rsp,%rax,8)
ff ff
movdqa %xmm0,-0x90(%rsp,%rax,8)
ff ff
movdqa %xmm0,-0x80(%rsp,%rax,8)
movdqa %xmm0,-0x70(%rsp,%rax,8)
movdqa %xmm0,-0x60(%rsp,%rax,8)
movdqa %xmm0,-0x50(%rsp,%rax,8)
movdqa %xmm0,-0x40(%rsp,%rax,8)
movdqa %xmm0,-0x30(%rsp,%rax,8)
movdqa %xmm0,-0x20(%rsp,%rax,8)
movdqa %xmm0,-0x10(%rsp,%rax,8)
movdqa %xmm0,(%rsp,%rax,8)
add    $0x20,%rax
cmp    $0x3fe,%rax
jne    1260 <main+0x120>
mov    $0x6,%eax
cs nopw 0x0(%rax,%rax,1)
nop
movapd 0x3dd0(%rsp,%rax,8),%xmm0
movapd 0x3de0(%rsp,%rax,8),%xmm1
movapd 0x3df0(%rsp,%rax,8),%xmm2
movapd 0x3e00(%rsp,%rax,8),%xmm3
subpd  0x5cd0(%rsp,%rax,8),%xmm0
subpd  0x5ce0(%rsp,%rax,8),%xmm1
movapd %xmm0,0x1ed0(%rsp,%rax,8)
movapd %xmm1,0x1ee0(%rsp,%rax,8)
subpd  0x5cf0(%rsp,%rax,8),%xmm2
subpd  0x5d00(%rsp,%rax,8),%xmm3
movapd %xmm2,0x1ef0(%rsp,%rax,8)
movapd %xmm3,0x1f00(%rsp,%rax,8)
add    $0x8,%rax
cmp    $0x3e6,%rax
jne    12f0 <main+0x1b0>
mov    $0x6,%eax
nopl   (%rax)
movapd 0x7bd0(%rsp,%rax,8),%xmm0
movapd 0x7be0(%rsp,%rax,8),%xmm1
movapd 0x7bf0(%rsp,%rax,8),%xmm2
movapd 0x7c00(%rsp,%rax,8),%xmm3
addpd  0x3dd0(%rsp,%rax,8),%xmm0
addpd  0x3de0(%rsp,%rax,8),%xmm1
addpd  -0x30(%rsp,%rax,8),%xmm0
addpd  -0x20(%rsp,%rax,8),%xmm1
movapd %xmm0,-0x30(%rsp,%rax,8)
movapd %xmm1,-0x20(%rsp,%rax,8)
addpd  0x3df0(%rsp,%rax,8),%xmm2
addpd  0x3e00(%rsp,%rax,8),%xmm3
addpd  -0x10(%rsp,%rax,8),%xmm2
addpd  (%rsp,%rax,8),%xmm3
movapd %xmm2,-0x10(%rsp,%rax,8)
movapd %xmm3,(%rsp,%rax,8)
add    $0x8,%rax
cmp    $0x3e6,%rax
jne    1370 <main+0x230>
mov    $0x6,%eax
nopl   0x0(%rax,%rax,1)
movapd -0x30(%rsp,%rax,8),%xmm0
movapd -0x20(%rsp,%rax,8),%xmm1
movapd -0x10(%rsp,%rax,8),%xmm2
movapd (%rsp,%rax,8),%xmm3
addpd  0x1ed0(%rsp,%rax,8),%xmm0
addpd  0x1ee0(%rsp,%rax,8),%xmm1
movapd %xmm0,0x1ed0(%rsp,%rax,8)
movapd %xmm1,0x1ee0(%rsp,%rax,8)
addpd  0x1ef0(%rsp,%rax,8),%xmm2
addpd  0x1f00(%rsp,%rax,8),%xmm3
movapd %xmm2,0x1ef0(%rsp,%rax,8)
movapd %xmm3,0x1f00(%rsp,%rax,8)
add    $0x8,%rax
cmp    $0x3e6,%rax
jne    1400 <main+0x2c0>
xor    %ebx,%ebx
mov    $0x2,%ebp
xor    %r14d,%r14d
xor    %eax,%eax
jmp    1494 <main+0x354>
nopl   0x0(%rax)
add    $0x1,%rbx
add    $0x3,%ebp
cmp    $0x3e0,%rbx
je     1210 <main+0xd0>
movsd  0x1f00(%rsp,%rbx,8),%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %ebp,%xmm1
ucomisd %xmm1,%xmm0
jne    14ac <main+0x36c>
jnp    1480 <main+0x340>
mov    %r15,%rdi
mov    %ebx,%esi
mov    %r12,%rdx
mov    %ebp,%ecx
mov    $0x1,%al
call   1040 <printf@plt>
cmp    $0xa,%r14d
jg     14d0 <main+0x390>
add    $0x1,%r14d
mov    $0x1,%eax
jmp    1480 <main+0x340>
xchg   %ax,%ax
lea    0xbb4(%rip),%rdi
jmp    1224 <main+0xe4>
xor    %eax,%eax
add    $0x9b08,%rsp
pop    %rbx
pop    %r12
pop    %r13
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"B[i]\00"
@.str.2 = [8 x i8] c"Failed\0A\00"
@.str.3 = [11 x i8] c"Succeeded\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [992 x double]
%3 = alloca [992 x double]
%4 = alloca [992 x double]
%5 = alloca [992 x double]
%6 = alloca [992 x double]
%7 = alloca i32
%8 = alloca i32
%9 = alloca [1 x i32]
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32 0, i32* %1
%19 = call i32 (...) @check_offloading()
store i32 0, i32* %7
br label %20
20: ; preds = %38, %0
%21 = load i32, i32* %7
%22 = icmp slt i32 %21, 992
br i1 %22, label %23, label %41
23: ; preds = %20
%24 = load i32, i32* %7
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [992 x double], [992 x double]* %4, i64 0, i64 %25
store double 1.000000e+00, double* %26
%27 = load i32, i32* %7
%28 = sitofp i32 %27 to double
%29 = load i32, i32* %7
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [992 x double], [992 x double]* %5, i64 0, i64 %30
store double %28, double* %31
%32 = load i32, i32* %7
%33 = sub nsw i32 0, %32
%34 = sitofp i32 %33 to double
%35 = load i32, i32* %7
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [992 x double], [992 x double]* %6, i64 0, i64 %36
store double %34, double* %37
br label %38
38: ; preds = %23
%39 = load i32, i32* %7
%40 = add nsw i32 %39, 1
store i32 %40, i32* %7
br label %20
41: ; preds = %20
store i32 0, i32* %8
br label %42
42: ; preds = %174, %41
%43 = load i32, i32* %8
%44 = icmp sle i32 %43, 224
br i1 %44, label %45, label %177
45: ; preds = %42
%46 = load i32, i32* %8
%47 = getelementptr inbounds [1 x i32], [1 x i32]* %9, i64 0, i64 0
store i32 %46, i32* %47
store i32 0, i32* %10
store i32 0, i32* %12
br label %48
48: ; preds = %163, %45
%49 = load i32, i32* %12
%50 = icmp slt i32 %49, 1
br i1 %50, label %51, label %54
51: ; preds = %48
%52 = load i32, i32* %10
%53 = icmp eq i32 %52, 0
br label %54
54: ; preds = %51, %48
%55 = phi i1 [ false, %48 ], [ %53, %51 ]
br i1 %55, label %56, label %166
56: ; preds = %54
store i32 0, i32* %13
br label %57
57: ; preds = %67, %56
%58 = load i32, i32* %13
%59 = icmp slt i32 %58, 992
br i1 %59, label %60, label %70
60: ; preds = %57
%61 = load i32, i32* %13
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %62
store double 1.000000e+00, double* %63
%64 = load i32, i32* %13
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [992 x double], [992 x double]* %3, i64 0, i64 %65
store double 0.000000e+00, double* %66
br label %67
67: ; preds = %60
%68 = load i32, i32* %13
%69 = add nsw i32 %68, 1
store i32 %69, i32* %13
br label %57
70: ; preds = %57
store i32 0, i32* %14
br label %71
71: ; preds = %87, %70
%72 = load i32, i32* %14
%73 = icmp slt i32 %72, 992
br i1 %73, label %74, label %90
74: ; preds = %71
%75 = load i32, i32* %14
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [992 x double], [992 x double]* %5, i64 0, i64 %76
%78 = load double, double* %77
%79 = load i32, i32* %14
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds [992 x double], [992 x double]* %6, i64 0, i64 %80
%82 = load double, double* %81
%83 = fsub double %78, %82
%84 = load i32, i32* %14
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds [992 x double], [992 x double]* %3, i64 0, i64 %85
store double %83, double* %86
br label %87
87: ; preds = %74
%88 = load i32, i32* %14
%89 = add nsw i32 %88, 1
store i32 %89, i32* %14
br label %71
90: ; preds = %71
store i32 0, i32* %15
br label %91
91: ; preds = %109, %90
%92 = load i32, i32* %15
%93 = icmp slt i32 %92, 992
br i1 %93, label %94, label %112
94: ; preds = %91
%95 = load i32, i32* %15
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds [992 x double], [992 x double]* %4, i64 0, i64 %96
%98 = load double, double* %97
%99 = load i32, i32* %15
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds [992 x double], [992 x double]* %5, i64 0, i64 %100
%102 = load double, double* %101
%103 = fadd double %98, %102
%104 = load i32, i32* %15
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %105
%107 = load double, double* %106
%108 = fadd double %107, %103
store double %108, double* %106
br label %109
109: ; preds = %94
%110 = load i32, i32* %15
%111 = add nsw i32 %110, 1
store i32 %111, i32* %15
br label %91
112: ; preds = %91
store i32 0, i32* %16
br label %113
113: ; preds = %126, %112
%114 = load i32, i32* %16
%115 = icmp slt i32 %114, 992
br i1 %115, label %116, label %129
116: ; preds = %113
%117 = load i32, i32* %16
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %118
%120 = load double, double* %119
%121 = load i32, i32* %16
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds [992 x double], [992 x double]* %3, i64 0, i64 %122
%124 = load double, double* %123
%125 = fadd double %124, %120
store double %125, double* %123
br label %126
126: ; preds = %116
%127 = load i32, i32* %16
%128 = add nsw i32 %127, 1
store i32 %128, i32* %16
br label %113
129: ; preds = %113
store i32 0, i32* %18
store i32 0, i32* %17
br label %130
130: ; preds = %159, %129
%131 = load i32, i32* %17
%132 = icmp slt i32 %131, 992
br i1 %132, label %133, label %162
133: ; preds = %130
%134 = load i32, i32* %17
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds [992 x double], [992 x double]* %3, i64 0, i64 %135
%137 = load double, double* %136
%138 = load i32, i32* %17
%139 = mul nsw i32 3, %138
%140 = add nsw i32 %139, 2
%141 = sitofp i32 %140 to double
%142 = fcmp une double %137, %141
br i1 %142, label %143, label %158
143: ; preds = %133
%144 = load i32, i32* %17
%145 = load i32, i32* %17
%146 = mul nsw i32 3, %145
%147 = add nsw i32 %146, 2
%148 = load i32, i32* %17
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds [992 x double], [992 x double]* %3, i64 0, i64 %149
%151 = load double, double* %150
%152 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %144, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %147, double %151)
store i32 1, i32* %10
%153 = load i32, i32* %18
%154 = add nsw i32 %153, 1
store i32 %154, i32* %18
%155 = icmp sgt i32 %153, 10
br i1 %155, label %156, label %157
156: ; preds = %143
br label %162
157: ; preds = %143
br label %158
158: ; preds = %157, %133
br label %159
159: ; preds = %158
%160 = load i32, i32* %17
%161 = add nsw i32 %160, 1
store i32 %161, i32* %17
br label %130
162: ; preds = %156, %130
br label %163
163: ; preds = %162
%164 = load i32, i32* %12
%165 = add nsw i32 %164, 1
store i32 %165, i32* %12
br label %48
166: ; preds = %54
%167 = load i32, i32* %10
%168 = icmp ne i32 %167, 0
br i1 %168, label %169, label %171
169: ; preds = %166
%170 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %173
171: ; preds = %166
%172 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
br label %173
173: ; preds = %171, %169
br label %174
174: ; preds = %173
%175 = load i32, i32* %8
%176 = add nsw i32 %175, 1
store i32 %176, i32* %8
br label %42
177: ; preds = %42
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"B[i]\00"
@str = [10 x i8] c"Succeeded\00"
@str.4 = [7 x i8] c"Failed\00"
define i32 @main() {
%1 = alloca [992 x double]
%2 = alloca [992 x double]
%3 = bitcast [992 x double]* %2 to i8*
%4 = alloca [992 x double]
%5 = alloca [992 x double]
%6 = alloca [992 x double]
%7 = tail call i32 (...) @check_offloading()
%8 = bitcast [992 x double]* %1 to i8*
%9 = bitcast [992 x double]* %4 to i8*
%10 = bitcast [992 x double]* %5 to i8*
%11 = bitcast [992 x double]* %6 to i8*
br label %12
12: ; preds = %12, %0
%13 = phi i64 [ 0, %0 ], [ %35, %12 ]
%14 = phi <2 x i32> [ <i32 0, i32 1>, %0 ], [ %36, %12 ]
%15 = phi <2 x i32> [ <i32 0, i32 1>, %0 ], [ %37, %12 ]
%16 = add <2 x i32> %14, <i32 2, i32 2>
%17 = getelementptr inbounds [992 x double], [992 x double]* %4, i64 0, i64 %13
%18 = bitcast double* %17 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %18
%19 = getelementptr inbounds double, double* %17, i64 2
%20 = bitcast double* %19 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %20
%21 = sitofp <2 x i32> %14 to <2 x double>
%22 = sitofp <2 x i32> %16 to <2 x double>
%23 = getelementptr inbounds [992 x double], [992 x double]* %5, i64 0, i64 %13
%24 = bitcast double* %23 to <2 x double>*
store <2 x double> %21, <2 x double>* %24
%25 = getelementptr inbounds double, double* %23, i64 2
%26 = bitcast double* %25 to <2 x double>*
store <2 x double> %22, <2 x double>* %26
%27 = sub <2 x i32> zeroinitializer, %15
%28 = sub <2 x i32> <i32 -2, i32 -2>, %15
%29 = sitofp <2 x i32> %27 to <2 x double>
%30 = sitofp <2 x i32> %28 to <2 x double>
%31 = getelementptr inbounds [992 x double], [992 x double]* %6, i64 0, i64 %13
%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 i64 %13, 4
%36 = add <2 x i32> %14, <i32 4, i32 4>
%37 = add <2 x i32> %15, <i32 4, i32 4>
%38 = icmp eq i64 %35, 992
br i1 %38, label %39, label %12
39: ; preds = %12, %242
%40 = phi i32 [ %245, %242 ], [ 0, %12 ]
br label %41
41: ; preds = %41, %39
%42 = phi i64 [ 0, %39 ], [ %82, %41 ]
%43 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %42
%44 = bitcast double* %43 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %44
%45 = getelementptr inbounds double, double* %43, i64 2
%46 = bitcast double* %45 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %46
%47 = or i64 %42, 4
%48 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %47
%49 = bitcast double* %48 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %49
%50 = getelementptr inbounds double, double* %48, i64 2
%51 = bitcast double* %50 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %51
%52 = or i64 %42, 8
%53 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %52
%54 = bitcast double* %53 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %54
%55 = getelementptr inbounds double, double* %53, i64 2
%56 = bitcast double* %55 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %56
%57 = or i64 %42, 12
%58 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %57
%59 = bitcast double* %58 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %59
%60 = getelementptr inbounds double, double* %58, i64 2
%61 = bitcast double* %60 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %61
%62 = or i64 %42, 16
%63 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %62
%64 = bitcast double* %63 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %64
%65 = getelementptr inbounds double, double* %63, i64 2
%66 = bitcast double* %65 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %66
%67 = or i64 %42, 20
%68 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %67
%69 = bitcast double* %68 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %69
%70 = getelementptr inbounds double, double* %68, i64 2
%71 = bitcast double* %70 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %71
%72 = or i64 %42, 24
%73 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %72
%74 = bitcast double* %73 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %74
%75 = getelementptr inbounds double, double* %73, i64 2
%76 = bitcast double* %75 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %76
%77 = or i64 %42, 28
%78 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %77
%79 = bitcast double* %78 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %79
%80 = getelementptr inbounds double, double* %78, i64 2
%81 = bitcast double* %80 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %81
%82 = add nuw nsw i64 %42, 32
%83 = icmp eq i64 %82, 992
br i1 %83, label %85, label %41
84: ; preds = %242
ret i32 0
85: ; preds = %41, %85
%86 = phi i64 [ %124, %85 ], [ 0, %41 ]
%87 = getelementptr inbounds [992 x double], [992 x double]* %5, i64 0, i64 %86
%88 = bitcast double* %87 to <2 x double>*
%89 = load <2 x double>, <2 x double>* %88
%90 = getelementptr inbounds double, double* %87, i64 2
%91 = bitcast double* %90 to <2 x double>*
%92 = load <2 x double>, <2 x double>* %91
%93 = getelementptr inbounds [992 x double], [992 x double]* %6, i64 0, i64 %86
%94 = bitcast double* %93 to <2 x double>*
%95 = load <2 x double>, <2 x double>* %94
%96 = getelementptr inbounds double, double* %93, i64 2
%97 = bitcast double* %96 to <2 x double>*
%98 = load <2 x double>, <2 x double>* %97
%99 = fsub <2 x double> %89, %95
%100 = fsub <2 x double> %92, %98
%101 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %86
%102 = bitcast double* %101 to <2 x double>*
store <2 x double> %99, <2 x double>* %102
%103 = getelementptr inbounds double, double* %101, i64 2
%104 = bitcast double* %103 to <2 x double>*
store <2 x double> %100, <2 x double>* %104
%105 = or i64 %86, 4
%106 = getelementptr inbounds [992 x double], [992 x double]* %5, i64 0, i64 %105
%107 = bitcast double* %106 to <2 x double>*
%108 = load <2 x double>, <2 x double>* %107
%109 = getelementptr inbounds double, double* %106, i64 2
%110 = bitcast double* %109 to <2 x double>*
%111 = load <2 x double>, <2 x double>* %110
%112 = getelementptr inbounds [992 x double], [992 x double]* %6, i64 0, i64 %105
%113 = bitcast double* %112 to <2 x double>*
%114 = load <2 x double>, <2 x double>* %113
%115 = getelementptr inbounds double, double* %112, i64 2
%116 = bitcast double* %115 to <2 x double>*
%117 = load <2 x double>, <2 x double>* %116
%118 = fsub <2 x double> %108, %114
%119 = fsub <2 x double> %111, %117
%120 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %105
%121 = bitcast double* %120 to <2 x double>*
store <2 x double> %118, <2 x double>* %121
%122 = getelementptr inbounds double, double* %120, i64 2
%123 = bitcast double* %122 to <2 x double>*
store <2 x double> %119, <2 x double>* %123
%124 = add nuw nsw i64 %86, 8
%125 = icmp eq i64 %124, 992
br i1 %125, label %126, label %85
126: ; preds = %85, %126
%127 = phi i64 [ %177, %126 ], [ 0, %85 ]
%128 = getelementptr inbounds [992 x double], [992 x double]* %4, i64 0, i64 %127
%129 = bitcast double* %128 to <2 x double>*
%130 = load <2 x double>, <2 x double>* %129
%131 = getelementptr inbounds double, double* %128, i64 2
%132 = bitcast double* %131 to <2 x double>*
%133 = load <2 x double>, <2 x double>* %132
%134 = getelementptr inbounds [992 x double], [992 x double]* %5, i64 0, i64 %127
%135 = bitcast double* %134 to <2 x double>*
%136 = load <2 x double>, <2 x double>* %135
%137 = getelementptr inbounds double, double* %134, i64 2
%138 = bitcast double* %137 to <2 x double>*
%139 = load <2 x double>, <2 x double>* %138
%140 = fadd <2 x double> %130, %136
%141 = fadd <2 x double> %133, %139
%142 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %127
%143 = bitcast double* %142 to <2 x double>*
%144 = load <2 x double>, <2 x double>* %143
%145 = getelementptr inbounds double, double* %142, i64 2
%146 = bitcast double* %145 to <2 x double>*
%147 = load <2 x double>, <2 x double>* %146
%148 = fadd <2 x double> %144, %140
%149 = fadd <2 x double> %147, %141
%150 = bitcast double* %142 to <2 x double>*
store <2 x double> %148, <2 x double>* %150
%151 = bitcast double* %145 to <2 x double>*
store <2 x double> %149, <2 x double>* %151
%152 = or i64 %127, 4
%153 = getelementptr inbounds [992 x double], [992 x double]* %4, i64 0, i64 %152
%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 = getelementptr inbounds [992 x double], [992 x double]* %5, i64 0, i64 %152
%160 = bitcast double* %159 to <2 x double>*
%161 = load <2 x double>, <2 x double>* %160
%162 = getelementptr inbounds double, double* %159, i64 2
%163 = bitcast double* %162 to <2 x double>*
%164 = load <2 x double>, <2 x double>* %163
%165 = fadd <2 x double> %155, %161
%166 = fadd <2 x double> %158, %164
%167 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %152
%168 = bitcast double* %167 to <2 x double>*
%169 = load <2 x double>, <2 x double>* %168
%170 = getelementptr inbounds double, double* %167, i64 2
%171 = bitcast double* %170 to <2 x double>*
%172 = load <2 x double>, <2 x double>* %171
%173 = fadd <2 x double> %169, %165
%174 = fadd <2 x double> %172, %166
%175 = bitcast double* %167 to <2 x double>*
store <2 x double> %173, <2 x double>* %175
%176 = bitcast double* %170 to <2 x double>*
store <2 x double> %174, <2 x double>* %176
%177 = add nuw nsw i64 %127, 8
%178 = icmp eq i64 %177, 992
br i1 %178, label %179, label %126
179: ; preds = %126, %179
%180 = phi i64 [ %214, %179 ], [ 0, %126 ]
%181 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %180
%182 = bitcast double* %181 to <2 x double>*
%183 = load <2 x double>, <2 x double>* %182
%184 = getelementptr inbounds double, double* %181, i64 2
%185 = bitcast double* %184 to <2 x double>*
%186 = load <2 x double>, <2 x double>* %185
%187 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %180
%188 = bitcast double* %187 to <2 x double>*
%189 = load <2 x double>, <2 x double>* %188
%190 = getelementptr inbounds double, double* %187, i64 2
%191 = bitcast double* %190 to <2 x double>*
%192 = load <2 x double>, <2 x double>* %191
%193 = fadd <2 x double> %183, %189
%194 = fadd <2 x double> %186, %192
%195 = bitcast double* %187 to <2 x double>*
store <2 x double> %193, <2 x double>* %195
%196 = bitcast double* %190 to <2 x double>*
store <2 x double> %194, <2 x double>* %196
%197 = or i64 %180, 4
%198 = getelementptr inbounds [992 x double], [992 x double]* %1, i64 0, i64 %197
%199 = bitcast double* %198 to <2 x double>*
%200 = load <2 x double>, <2 x double>* %199
%201 = getelementptr inbounds double, double* %198, i64 2
%202 = bitcast double* %201 to <2 x double>*
%203 = load <2 x double>, <2 x double>* %202
%204 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %197
%205 = bitcast double* %204 to <2 x double>*
%206 = load <2 x double>, <2 x double>* %205
%207 = getelementptr inbounds double, double* %204, i64 2
%208 = bitcast double* %207 to <2 x double>*
%209 = load <2 x double>, <2 x double>* %208
%210 = fadd <2 x double> %200, %206
%211 = fadd <2 x double> %203, %209
%212 = bitcast double* %204 to <2 x double>*
store <2 x double> %210, <2 x double>* %212
%213 = bitcast double* %207 to <2 x double>*
store <2 x double> %211, <2 x double>* %213
%214 = add nuw nsw i64 %180, 8
%215 = icmp eq i64 %214, 992
br i1 %215, label %216, label %179
216: ; preds = %179, %234
%217 = phi i64 [ %237, %234 ], [ 0, %179 ]
%218 = phi i32 [ %236, %234 ], [ 0, %179 ]
%219 = phi i32 [ %235, %234 ], [ 0, %179 ]
%220 = trunc i64 %217 to i32
%221 = getelementptr inbounds [992 x double], [992 x double]* %2, i64 0, i64 %217
%222 = load double, double* %221
%223 = trunc i64 %217 to i32
%224 = mul i32 %223, 3
%225 = add i32 %224, 2
%226 = sitofp i32 %225 to double
%227 = fcmp une double %222, %226
br i1 %227, label %228, label %234
228: ; preds = %216
%229 = mul nuw nsw i32 %220, 3
%230 = add nuw nsw i32 %229, 2
%231 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %220, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %230, double %222)
%232 = add nsw i32 %218, 1
%233 = icmp sgt i32 %218, 10
br i1 %233, label %242, label %234
234: ; preds = %216, %228
%235 = phi i32 [ 1, %228 ], [ %219, %216 ]
%236 = phi i32 [ %232, %228 ], [ %218, %216 ]
%237 = add nuw nsw i64 %217, 1
%238 = icmp eq i64 %237, 992
br i1 %238, label %239, label %216
239: ; preds = %234
%240 = icmp eq i32 %235, 0
%241 = select i1 %240, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.4, i64 0, i64 0)
br label %242
242: ; preds = %228, %239
%243 = phi i8* [ %241, %239 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.4, i64 0, i64 0), %228 ]
%244 = tail call i32 @puts(i8* dereferenceable(1) %243)
%245 = add nuw nsw i32 %40, 1
%246 = icmp eq i32 %245, 225
br i1 %246, label %84, label %39
}