#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 */
scalar_t__ malloc(int);
int omp_is_initial_device();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int errors = 0;
  bool isHost = true;
  double sum = 0.0;
  double *h_array = (double *)malloc(1000 * sizeof(double));
  double *in_1 = (double *)malloc(1000 * sizeof(double));
  double *in_2 = (double *)malloc(1000 * sizeof(double));
#pragma omp task depend(out : in_1) shared(in_1)
  {
    for (int i = 0; i < 1000; ++i) {
      in_1[i] = 1;
    }
  }
#pragma omp task depend(out : in_2) shared(in_2)
  {
    for (int i = 0; i < 1000; ++i) {
      in_2[i] = 2;
    }
  }
#pragma omp target enter data nowait map(alloc                                 \
                                         : h_array [0:N]) map(to               \
                                                              : in_1 [0:N])    \
    map(to                                                                     \
        : in_2 [0:N]) depend(out                                               \
                             : h_array) depend(in                              \
                                               : in_1) depend(in               \
                                                              : in_2)
#pragma omp target nowait map(tofrom : isHost) depend(inout : h_array)
  {
    isHost = omp_is_initial_device();
    for (int i = 0; i < 1000; ++i) {
      h_array[i] = in_1[i] * in_2[i];
    }
  }
#pragma omp target exit data nowait map(from                                   \
                                        : h_array [0:N]) depend(inout          \
                                                                : h_array)
#pragma omp task depend(in : h_array) shared(sum, h_array)
  {
    for (int i = 0; i < 1000; ++i) {
      sum += h_array[i];
    }
  }
#pragma omp taskwait
  errors = 2.0 * 1000 != sum;
  if (!errors)
    printf("Test passed\n");
  else
    printf("Test failed on %s: sum = %g\n", (isHost ? "host" : "device"), sum);
  return errors;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x1f40,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    $0x1f40,%edi
call   1040 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    $0x1f40,%edi
call   1040 <malloc@plt>
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0x3e8,-0x34(%rbp)
jge    11b6 <main+0x86>
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  0xe6d(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1186 <main+0x56>
movl   $0x0,-0x38(%rbp)
cmpl   $0x3e8,-0x38(%rbp)
jge    11ed <main+0xbd>
mov    -0x30(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  0xe2e(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    11bd <main+0x8d>
mov    $0x0,%al
call   1050 <omp_is_initial_device@plt>
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0x3e8,-0x3c(%rbp)
jge    1240 <main+0x110>
mov    -0x28(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11fe <main+0xce>
movl   $0x0,-0x40(%rbp)
cmpl   $0x3e8,-0x40(%rbp)
jge    1279 <main+0x149>
mov    -0x20(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1247 <main+0x117>
movsd  0xd7f(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    12b3 <main+0x183>
lea    0xd71(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12de <main+0x1ae>
mov    -0xc(%rbp),%ecx
lea    0xd8a(%rip),%rsi
lea    0xd7e(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
movsd  -0x18(%rbp),%xmm0
lea    0xd4e(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    $0x1f40,%edi
call   1050 <malloc@plt>
mov    %rax,%r14
mov    $0x1f40,%edi
call   1050 <malloc@plt>
mov    %rax,%r15
mov    $0x1f40,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    $0x12,%eax
movaps 0xe84(%rip),%xmm0
nopl   0x0(%rax)
movups %xmm0,-0x90(%r15,%rax,8)
ff ff
movups %xmm0,-0x80(%r15,%rax,8)
movups %xmm0,-0x70(%r15,%rax,8)
movups %xmm0,-0x60(%r15,%rax,8)
movups %xmm0,-0x50(%r15,%rax,8)
movups %xmm0,-0x40(%r15,%rax,8)
movups %xmm0,-0x30(%r15,%rax,8)
movups %xmm0,-0x20(%r15,%rax,8)
movups %xmm0,-0x10(%r15,%rax,8)
movups %xmm0,(%r15,%rax,8)
add    $0x14,%rax
cmp    $0x3fa,%rax
jne    1180 <main+0x40>
mov    $0x12,%eax
movapd 0xe39(%rip),%xmm0
nopw   0x0(%rax,%rax,1)
movupd %xmm0,-0x90(%rbx,%rax,8)
ff ff
movupd %xmm0,-0x80(%rbx,%rax,8)
movupd %xmm0,-0x70(%rbx,%rax,8)
movupd %xmm0,-0x60(%rbx,%rax,8)
movupd %xmm0,-0x50(%rbx,%rax,8)
movupd %xmm0,-0x40(%rbx,%rax,8)
movupd %xmm0,-0x30(%rbx,%rax,8)
movupd %xmm0,-0x20(%rbx,%rax,8)
movupd %xmm0,-0x10(%rbx,%rax,8)
movupd %xmm0,(%rbx,%rax,8)
add    $0x14,%rax
cmp    $0x3fa,%rax
jne    11e0 <main+0xa0>
xor    %eax,%eax
call   1060 <omp_is_initial_device@plt>
lea    0x1f40(%r14),%rdx
lea    0x1f40(%r15),%rcx
lea    0x1f40(%rbx),%rsi
cmp    %rcx,%r14
setb   %dil
cmp    %rdx,%r15
setb   %r8b
cmp    %rsi,%r14
setb   %cl
cmp    %rdx,%rbx
setb   %dl
test   %r8b,%dil
jne    12dc <main+0x19c>
and    %dl,%cl
jne    12dc <main+0x19c>
mov    $0x6,%ecx
xchg   %ax,%ax
movupd -0x30(%r15,%rcx,8),%xmm0
movupd -0x20(%r15,%rcx,8),%xmm1
movupd -0x30(%rbx,%rcx,8),%xmm2
mulpd  %xmm0,%xmm2
movupd -0x20(%rbx,%rcx,8),%xmm0
mulpd  %xmm1,%xmm0
movupd %xmm2,-0x30(%r14,%rcx,8)
movupd %xmm0,-0x20(%r14,%rcx,8)
movupd -0x10(%r15,%rcx,8),%xmm0
movupd (%r15,%rcx,8),%xmm1
movupd -0x10(%rbx,%rcx,8),%xmm2
mulpd  %xmm0,%xmm2
movupd (%rbx,%rcx,8),%xmm0
mulpd  %xmm1,%xmm0
movupd %xmm2,-0x10(%r14,%rcx,8)
movupd %xmm0,(%r14,%rcx,8)
add    $0x8,%rcx
cmp    $0x3ee,%rcx
jne    1270 <main+0x130>
jmp    134a <main+0x20a>
mov    $0x3,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  -0x18(%r15,%rcx,8),%xmm0
mulsd  -0x18(%rbx,%rcx,8),%xmm0
movsd  %xmm0,-0x18(%r14,%rcx,8)
movsd  -0x10(%r15,%rcx,8),%xmm0
mulsd  -0x10(%rbx,%rcx,8),%xmm0
movsd  %xmm0,-0x10(%r14,%rcx,8)
movsd  -0x8(%r15,%rcx,8),%xmm0
mulsd  -0x8(%rbx,%rcx,8),%xmm0
movsd  %xmm0,-0x8(%r14,%rcx,8)
movsd  (%r15,%rcx,8),%xmm0
mulsd  (%rbx,%rcx,8),%xmm0
movsd  %xmm0,(%r14,%rcx,8)
add    $0x4,%rcx
cmp    $0x3eb,%rcx
jne    12f0 <main+0x1b0>
xorpd  %xmm0,%xmm0
mov    $0x7,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
addsd  -0x38(%r14,%rcx,8),%xmm0
addsd  -0x30(%r14,%rcx,8),%xmm0
addsd  -0x28(%r14,%rcx,8),%xmm0
addsd  -0x20(%r14,%rcx,8),%xmm0
addsd  -0x18(%r14,%rcx,8),%xmm0
addsd  -0x10(%r14,%rcx,8),%xmm0
addsd  -0x8(%r14,%rcx,8),%xmm0
addsd  (%r14,%rcx,8),%xmm0
add    $0x8,%rcx
cmp    $0x3ef,%rcx
jne    1360 <main+0x220>
ucomisd 0xc74(%rip),%xmm0
jne    13b0 <main+0x270>
jnp    13da <main+0x29a>
test   %eax,%eax
lea    0xc91(%rip),%rax
lea    0xc85(%rip),%rsi
cmove  %rax,%rsi
lea    0xc5d(%rip),%rdi
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%al
call   1040 <printf@plt>
jmp    13ec <main+0x2ac>
lea    0xc70(%rip),%rdi
movsd  %xmm0,0x8(%rsp)
call   1030 <puts@plt>
movsd  0x8(%rsp),%xmm0
cmpneqsd 0xc25(%rip),%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Test passed\0A\00"
@.str.1 = [29 x i8] c"Test failed on %s: sum = %g\0A\00"
@.str.2 = [5 x i8] c"host\00"
@.str.3 = [7 x i8] c"device\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 1, i32* %3
store double 0.000000e+00, double* %4
%12 = call i64 @malloc(i32 8000)
%13 = inttoptr i64 %12 to double*
store double* %13, double** %5
%14 = call i64 @malloc(i32 8000)
%15 = inttoptr i64 %14 to double*
store double* %15, double** %6
%16 = call i64 @malloc(i32 8000)
%17 = inttoptr i64 %16 to double*
store double* %17, double** %7
store i32 0, i32* %8
br label %18
18: ; preds = %26, %0
%19 = load i32, i32* %8
%20 = icmp slt i32 %19, 1000
br i1 %20, label %21, label %29
21: ; preds = %18
%22 = load double*, double** %6
%23 = load i32, i32* %8
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds double, double* %22, i64 %24
store double 1.000000e+00, double* %25
br label %26
26: ; preds = %21
%27 = load i32, i32* %8
%28 = add nsw i32 %27, 1
store i32 %28, i32* %8
br label %18
29: ; preds = %18
store i32 0, i32* %9
br label %30
30: ; preds = %38, %29
%31 = load i32, i32* %9
%32 = icmp slt i32 %31, 1000
br i1 %32, label %33, label %41
33: ; preds = %30
%34 = load double*, double** %7
%35 = load i32, i32* %9
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds double, double* %34, i64 %36
store double 2.000000e+00, double* %37
br label %38
38: ; preds = %33
%39 = load i32, i32* %9
%40 = add nsw i32 %39, 1
store i32 %40, i32* %9
br label %30
41: ; preds = %30
%42 = call i32 (...) @omp_is_initial_device()
store i32 %42, i32* %3
store i32 0, i32* %10
br label %43
43: ; preds = %62, %41
%44 = load i32, i32* %10
%45 = icmp slt i32 %44, 1000
br i1 %45, label %46, label %65
46: ; preds = %43
%47 = load double*, double** %6
%48 = load i32, i32* %10
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds double, double* %47, i64 %49
%51 = load double, double* %50
%52 = load double*, double** %7
%53 = load i32, i32* %10
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds double, double* %52, i64 %54
%56 = load double, double* %55
%57 = fmul double %51, %56
%58 = load double*, double** %5
%59 = load i32, i32* %10
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds double, double* %58, i64 %60
store double %57, double* %61
br label %62
62: ; preds = %46
%63 = load i32, i32* %10
%64 = add nsw i32 %63, 1
store i32 %64, i32* %10
br label %43
65: ; preds = %43
store i32 0, i32* %11
br label %66
66: ; preds = %77, %65
%67 = load i32, i32* %11
%68 = icmp slt i32 %67, 1000
br i1 %68, label %69, label %80
69: ; preds = %66
%70 = load double*, double** %5
%71 = load i32, i32* %11
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds double, double* %70, i64 %72
%74 = load double, double* %73
%75 = load double, double* %4
%76 = fadd double %75, %74
store double %76, double* %4
br label %77
77: ; preds = %69
%78 = load i32, i32* %11
%79 = add nsw i32 %78, 1
store i32 %79, i32* %11
br label %66
80: ; preds = %66
%81 = load double, double* %4
%82 = fcmp une double 2.000000e+03, %81
%83 = zext i1 %82 to i32
store i32 %83, i32* %2
%84 = load i32, i32* %2
%85 = icmp ne i32 %84, 0
br i1 %85, label %88, label %86
86: ; preds = %80
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %95
88: ; preds = %80
%89 = load i32, i32* %3
%90 = icmp ne i32 %89, 0
%91 = zext i1 %90 to i64
%92 = select i1 %90, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0)
%93 = load double, double* %4
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %92, double %93)
br label %95
95: ; preds = %88, %86
%96 = load i32, i32* %2
ret i32 %96
}

LLVM IR (-O2):
@.str.1 = [29 x i8] c"Test failed on %s: sum = %g\0A\00"
@.str.2 = [5 x i8] c"host\00"
@.str.3 = [7 x i8] c"device\00"
@str = [12 x i8] c"Test passed\00"
define i32 @main() {
%1 = tail call i64 @malloc(i32 8000)
%2 = tail call i64 @malloc(i32 8000)
%3 = inttoptr i64 %2 to double*
%4 = inttoptr i64 %2 to i8*
%5 = tail call i64 @malloc(i32 8000)
br label %6
6: ; preds = %6, %0
%7 = phi i64 [ 0, %0 ], [ %32, %6 ]
%8 = getelementptr inbounds double, double* %3, i64 %7
%9 = bitcast double* %8 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %9
%10 = getelementptr inbounds double, double* %8, i64 2
%11 = bitcast double* %10 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %11
%12 = add nuw nsw i64 %7, 4
%13 = getelementptr inbounds double, double* %3, i64 %12
%14 = bitcast double* %13 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %14
%15 = getelementptr inbounds double, double* %13, i64 2
%16 = bitcast double* %15 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %16
%17 = add nuw nsw i64 %7, 8
%18 = getelementptr inbounds double, double* %3, i64 %17
%19 = bitcast double* %18 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %19
%20 = getelementptr inbounds double, double* %18, i64 2
%21 = bitcast double* %20 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %21
%22 = add nuw nsw i64 %7, 12
%23 = getelementptr inbounds double, double* %3, i64 %22
%24 = bitcast double* %23 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %24
%25 = getelementptr inbounds double, double* %23, i64 2
%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 = add nuw nsw i64 %7, 16
%28 = getelementptr inbounds double, double* %3, i64 %27
%29 = bitcast double* %28 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %29
%30 = getelementptr inbounds double, double* %28, i64 2
%31 = bitcast double* %30 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %31
%32 = add nuw nsw i64 %7, 20
%33 = icmp eq i64 %32, 1000
br i1 %33, label %34, label %6
34: ; preds = %6
%35 = inttoptr i64 %5 to double*
%36 = inttoptr i64 %5 to i8*
br label %37
37: ; preds = %37, %34
%38 = phi i64 [ 0, %34 ], [ %63, %37 ]
%39 = getelementptr inbounds double, double* %35, i64 %38
%40 = bitcast double* %39 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %40
%41 = getelementptr inbounds double, double* %39, i64 2
%42 = bitcast double* %41 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %42
%43 = add nuw nsw i64 %38, 4
%44 = getelementptr inbounds double, double* %35, i64 %43
%45 = bitcast double* %44 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %45
%46 = getelementptr inbounds double, double* %44, i64 2
%47 = bitcast double* %46 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %47
%48 = add nuw nsw i64 %38, 8
%49 = getelementptr inbounds double, double* %35, i64 %48
%50 = bitcast double* %49 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %50
%51 = getelementptr inbounds double, double* %49, i64 2
%52 = bitcast double* %51 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %52
%53 = add nuw nsw i64 %38, 12
%54 = getelementptr inbounds double, double* %35, i64 %53
%55 = bitcast double* %54 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %55
%56 = getelementptr inbounds double, double* %54, i64 2
%57 = bitcast double* %56 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %57
%58 = add nuw nsw i64 %38, 16
%59 = getelementptr inbounds double, double* %35, i64 %58
%60 = bitcast double* %59 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %60
%61 = getelementptr inbounds double, double* %59, i64 2
%62 = bitcast double* %61 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double>* %62
%63 = add nuw nsw i64 %38, 20
%64 = icmp eq i64 %63, 1000
br i1 %64, label %65, label %37
65: ; preds = %37
%66 = inttoptr i64 %1 to double*
%67 = inttoptr i64 %1 to i8*
%68 = tail call i32 (...) @omp_is_initial_device()
%69 = getelementptr double, double* %66, i64 1000
%70 = bitcast double* %69 to i8*
%71 = getelementptr double, double* %3, i64 1000
%72 = bitcast double* %71 to i8*
%73 = getelementptr double, double* %35, i64 1000
%74 = bitcast double* %73 to i8*
%75 = icmp ult i8* %67, %72
%76 = icmp ult i8* %4, %70
%77 = and i1 %75, %76
%78 = icmp ult i8* %67, %74
%79 = icmp ult i8* %36, %70
%80 = and i1 %78, %79
%81 = or i1 %77, %80
br i1 %81, label %124, label %82
82: ; preds = %65, %82
%83 = phi i64 [ %121, %82 ], [ 0, %65 ]
%84 = getelementptr inbounds double, double* %3, i64 %83
%85 = bitcast double* %84 to <2 x double>*
%86 = load <2 x double>, <2 x double>* %85
%87 = getelementptr inbounds double, double* %84, i64 2
%88 = bitcast double* %87 to <2 x double>*
%89 = load <2 x double>, <2 x double>* %88
%90 = getelementptr inbounds double, double* %35, i64 %83
%91 = bitcast double* %90 to <2 x double>*
%92 = load <2 x double>, <2 x double>* %91
%93 = getelementptr inbounds double, double* %90, i64 2
%94 = bitcast double* %93 to <2 x double>*
%95 = load <2 x double>, <2 x double>* %94
%96 = fmul <2 x double> %86, %92
%97 = fmul <2 x double> %89, %95
%98 = getelementptr inbounds double, double* %66, i64 %83
%99 = bitcast double* %98 to <2 x double>*
store <2 x double> %96, <2 x double>* %99
%100 = getelementptr inbounds double, double* %98, i64 2
%101 = bitcast double* %100 to <2 x double>*
store <2 x double> %97, <2 x double>* %101
%102 = or i64 %83, 4
%103 = getelementptr inbounds double, double* %3, i64 %102
%104 = bitcast double* %103 to <2 x double>*
%105 = load <2 x double>, <2 x double>* %104
%106 = getelementptr inbounds double, double* %103, i64 2
%107 = bitcast double* %106 to <2 x double>*
%108 = load <2 x double>, <2 x double>* %107
%109 = getelementptr inbounds double, double* %35, i64 %102
%110 = bitcast double* %109 to <2 x double>*
%111 = load <2 x double>, <2 x double>* %110
%112 = getelementptr inbounds double, double* %109, i64 2
%113 = bitcast double* %112 to <2 x double>*
%114 = load <2 x double>, <2 x double>* %113
%115 = fmul <2 x double> %105, %111
%116 = fmul <2 x double> %108, %114
%117 = getelementptr inbounds double, double* %66, i64 %102
%118 = bitcast double* %117 to <2 x double>*
store <2 x double> %115, <2 x double>* %118
%119 = getelementptr inbounds double, double* %117, i64 2
%120 = bitcast double* %119 to <2 x double>*
store <2 x double> %116, <2 x double>* %120
%121 = add nuw nsw i64 %83, 8
%122 = icmp eq i64 %121, 1000
br i1 %122, label %123, label %82
123: ; preds = %82, %124
br label %157
124: ; preds = %65, %124
%125 = phi i64 [ %153, %124 ], [ 0, %65 ]
%126 = getelementptr inbounds double, double* %3, i64 %125
%127 = load double, double* %126
%128 = getelementptr inbounds double, double* %35, i64 %125
%129 = load double, double* %128
%130 = fmul double %127, %129
%131 = getelementptr inbounds double, double* %66, i64 %125
store double %130, double* %131
%132 = or i64 %125, 1
%133 = getelementptr inbounds double, double* %3, i64 %132
%134 = load double, double* %133
%135 = getelementptr inbounds double, double* %35, i64 %132
%136 = load double, double* %135
%137 = fmul double %134, %136
%138 = getelementptr inbounds double, double* %66, i64 %132
store double %137, double* %138
%139 = or i64 %125, 2
%140 = getelementptr inbounds double, double* %3, i64 %139
%141 = load double, double* %140
%142 = getelementptr inbounds double, double* %35, i64 %139
%143 = load double, double* %142
%144 = fmul double %141, %143
%145 = getelementptr inbounds double, double* %66, i64 %139
store double %144, double* %145
%146 = or i64 %125, 3
%147 = getelementptr inbounds double, double* %3, i64 %146
%148 = load double, double* %147
%149 = getelementptr inbounds double, double* %35, i64 %146
%150 = load double, double* %149
%151 = fmul double %148, %150
%152 = getelementptr inbounds double, double* %66, i64 %146
store double %151, double* %152
%153 = add nuw nsw i64 %125, 4
%154 = icmp eq i64 %153, 1000
br i1 %154, label %123, label %124
155: ; preds = %157
%156 = fcmp une double %190, 2.000000e+03
br i1 %156, label %195, label %193
157: ; preds = %157, %123
%158 = phi i64 [ 0, %123 ], [ %191, %157 ]
%159 = phi double [ 0.000000e+00, %123 ], [ %190, %157 ]
%160 = getelementptr inbounds double, double* %66, i64 %158
%161 = load double, double* %160
%162 = fadd double %159, %161
%163 = or i64 %158, 1
%164 = getelementptr inbounds double, double* %66, i64 %163
%165 = load double, double* %164
%166 = fadd double %162, %165
%167 = or i64 %158, 2
%168 = getelementptr inbounds double, double* %66, i64 %167
%169 = load double, double* %168
%170 = fadd double %166, %169
%171 = or i64 %158, 3
%172 = getelementptr inbounds double, double* %66, i64 %171
%173 = load double, double* %172
%174 = fadd double %170, %173
%175 = or i64 %158, 4
%176 = getelementptr inbounds double, double* %66, i64 %175
%177 = load double, double* %176
%178 = fadd double %174, %177
%179 = or i64 %158, 5
%180 = getelementptr inbounds double, double* %66, i64 %179
%181 = load double, double* %180
%182 = fadd double %178, %181
%183 = or i64 %158, 6
%184 = getelementptr inbounds double, double* %66, i64 %183
%185 = load double, double* %184
%186 = fadd double %182, %185
%187 = or i64 %158, 7
%188 = getelementptr inbounds double, double* %66, i64 %187
%189 = load double, double* %188
%190 = fadd double %186, %189
%191 = add nuw nsw i64 %158, 8
%192 = icmp eq i64 %191, 1000
br i1 %192, label %155, label %157
193: ; preds = %155
%194 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
br label %199
195: ; preds = %155
%196 = icmp eq i32 %68, 0
%197 = select i1 %196, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0)
%198 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %197, double %190)
br label %199
199: ; preds = %195, %193
%200 = zext i1 %156 to i32
ret i32 %200
}