#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 */
typedef int /*<<< orphan*/ omp_lock_t;

/* Variables and functions */
int omp_get_num_threads();
int omp_get_thread_num();
int /*<<< orphan*/ omp_init_lock(int /*<<< orphan*/ *);
int /*<<< orphan*/ omp_set_lock(int /*<<< orphan*/ *);
int /*<<< orphan*/ omp_unset_lock(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int nthreads, tid, i;
  float a[1000000], b[1000000];
  omp_lock_t locka, lockb;
  omp_init_lock(&locka);
  omp_init_lock(&lockb);
#pragma omp parallel shared(a, b, nthreads, locka, lockb) private(tid)
  {
    tid = omp_get_thread_num();
#pragma omp master
    {
      nthreads = omp_get_num_threads();
      printf("Number of threads = %d\n", nthreads);
    }
    printf("Thread %d starting...\n", tid);
#pragma omp barrier
#pragma omp sections nowait
    {
#pragma omp section
      {
        printf("Thread %d initializing a[]\n", tid);
        omp_set_lock(&locka);
        for (i = 0; i < 1000000; i++)
          a[i] = i * .01415926535;
        omp_unset_lock(&locka);
        omp_set_lock(&lockb);
        printf("Thread %d adding a[] to b[]\n", tid);
        for (i = 0; i < 1000000; i++)
          b[i] += a[i];
        omp_unset_lock(&lockb);
      }
#pragma omp section
      {
        printf("Thread %d initializing b[]\n", tid);
        omp_set_lock(&lockb);
        for (i = 0; i < 1000000; i++)
          b[i] = i * 3.1415926535;
        omp_unset_lock(&lockb);
        omp_set_lock(&locka);
        printf("Thread %d adding b[] to a[]\n", tid);
        for (i = 0; i < 1000000; i++)
          a[i] += b[i];
        omp_unset_lock(&locka);
      }
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7a1230,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x7a1224(%rbp),%rdi
call   1080 <omp_init_lock@plt>
lea    -0x7a1228(%rbp),%rdi
call   1080 <omp_init_lock@plt>
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1060 <omp_get_num_threads@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe61(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xe6a(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xe72(%rip),%rdi
call   1050 <printf@plt>
lea    -0x7a1224(%rbp),%rdi
call   1070 <omp_set_lock@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0xf4240,-0x1c(%rbp)
jge    1222 <main+0xc2>
cvtsi2sdl -0x1c(%rbp),%xmm0
movsd  0xe09(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movslq -0x1c(%rbp),%rax
movss  %xmm0,-0x3d0920(%rbp,%rax,4)
c2 ff
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11e5 <main+0x85>
lea    -0x7a1224(%rbp),%rdi
call   1040 <omp_unset_lock@plt>
lea    -0x7a1228(%rbp),%rdi
call   1070 <omp_set_lock@plt>
mov    -0x18(%rbp),%esi
lea    0xe17(%rip),%rdi
call   1050 <printf@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0xf4240,-0x1c(%rbp)
jge    128e <main+0x12e>
movslq -0x1c(%rbp),%rax
movss  -0x3d0920(%rbp,%rax,4),%xmm0
c2 ff
movslq -0x1c(%rbp),%rax
addss  -0x7a1220(%rbp,%rax,4),%xmm0
85 ff
movss  %xmm0,-0x7a1220(%rbp,%rax,4)
85 ff
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1250 <main+0xf0>
lea    -0x7a1228(%rbp),%rdi
call   1040 <omp_unset_lock@plt>
mov    -0x18(%rbp),%esi
lea    0xdd4(%rip),%rdi
call   1050 <printf@plt>
lea    -0x7a1228(%rbp),%rdi
call   1070 <omp_set_lock@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0xf4240,-0x1c(%rbp)
jge    12f9 <main+0x199>
cvtsi2sdl -0x1c(%rbp),%xmm0
movsd  0xd2a(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movslq -0x1c(%rbp),%rax
movss  %xmm0,-0x7a1220(%rbp,%rax,4)
85 ff
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12bc <main+0x15c>
lea    -0x7a1228(%rbp),%rdi
call   1040 <omp_unset_lock@plt>
lea    -0x7a1224(%rbp),%rdi
call   1070 <omp_set_lock@plt>
mov    -0x18(%rbp),%esi
lea    0xd79(%rip),%rdi
call   1050 <printf@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0xf4240,-0x1c(%rbp)
jge    1365 <main+0x205>
movslq -0x1c(%rbp),%rax
movss  -0x7a1220(%rbp,%rax,4),%xmm0
85 ff
movslq -0x1c(%rbp),%rax
addss  -0x3d0920(%rbp,%rax,4),%xmm0
c2 ff
movss  %xmm0,-0x3d0920(%rbp,%rax,4)
c2 ff
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1327 <main+0x1c7>
lea    -0x7a1224(%rbp),%rdi
call   1040 <omp_unset_lock@plt>
mov    -0x4(%rbp),%eax
add    $0x7a1230,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x7a1218,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1080 <omp_init_lock@plt>
lea    0x8(%rsp),%rdi
call   1080 <omp_init_lock@plt>
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1060 <omp_get_num_threads@plt>
lea    0xed9(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
lea    0xee3(%rip),%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
lea    0xeec(%rip),%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1070 <omp_set_lock@plt>
movdqa 0xe36(%rip),%xmm0
mov    $0xc,%eax
movapd 0xe49(%rip),%xmm1
nopw   0x0(%rax,%rax,1)
movdqa %xmm0,%xmm2
paddd  0xe24(%rip),%xmm2
cvtdq2pd %xmm0,%xmm3
pshufd $0xee,%xmm0,%xmm4
cvtdq2pd %xmm4,%xmm4
cvtdq2pd %xmm2,%xmm5
pshufd $0xee,%xmm2,%xmm2
cvtdq2pd %xmm2,%xmm2
mulpd  %xmm1,%xmm4
mulpd  %xmm1,%xmm3
mulpd  %xmm1,%xmm2
cvtpd2ps %xmm3,%xmm3
cvtpd2ps %xmm4,%xmm4
mulpd  %xmm1,%xmm5
unpcklpd %xmm4,%xmm3
cvtpd2ps %xmm5,%xmm4
cvtpd2ps %xmm2,%xmm2
unpcklpd %xmm2,%xmm4
movdqa %xmm0,%xmm2
paddd  0xdf6(%rip),%xmm2
movdqa %xmm0,%xmm5
paddd  0xdfa(%rip),%xmm5
cvtdq2pd %xmm2,%xmm6
pshufd $0xee,%xmm2,%xmm2
cvtdq2pd %xmm2,%xmm2
cvtdq2pd %xmm5,%xmm7
movapd %xmm3,0x3d08e0(%rsp,%rax,4)
pshufd $0xee,%xmm5,%xmm3
cvtdq2pd %xmm3,%xmm3
movapd %xmm4,0x3d08f0(%rsp,%rax,4)
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm6
mulpd  %xmm1,%xmm3
cvtpd2ps %xmm6,%xmm4
cvtpd2ps %xmm2,%xmm2
mulpd  %xmm1,%xmm7
unpcklpd %xmm2,%xmm4
cvtpd2ps %xmm7,%xmm2
cvtpd2ps %xmm3,%xmm3
unpcklpd %xmm3,%xmm2
movapd %xmm4,0x3d0900(%rsp,%rax,4)
movapd %xmm2,0x3d0910(%rsp,%rax,4)
paddd  0xd9c(%rip),%xmm0
add    $0x10,%rax
cmp    $0xf424c,%rax
jne    11e0 <main+0x80>
lea    0xc(%rsp),%rdi
call   1040 <omp_unset_lock@plt>
lea    0x8(%rsp),%rdi
call   1070 <omp_set_lock@plt>
lea    0xddc(%rip),%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
mov    $0xc,%eax
nopl   0x0(%rax,%rax,1)
movaps 0x3d08e0(%rsp,%rax,4),%xmm0
movaps 0x3d08f0(%rsp,%rax,4),%xmm1
movaps 0x3d0900(%rsp,%rax,4),%xmm2
movaps 0x3d0910(%rsp,%rax,4),%xmm3
addps  -0x20(%rsp,%rax,4),%xmm0
addps  -0x10(%rsp,%rax,4),%xmm1
movaps %xmm0,-0x20(%rsp,%rax,4)
movaps %xmm1,-0x10(%rsp,%rax,4)
addps  (%rsp,%rax,4),%xmm2
addps  0x10(%rsp,%rax,4),%xmm3
movaps %xmm2,(%rsp,%rax,4)
movaps %xmm3,0x10(%rsp,%rax,4)
add    $0x10,%rax
cmp    $0xf424c,%rax
jne    12f0 <main+0x190>
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <omp_unset_lock@plt>
lea    0xd82(%rip),%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1070 <omp_set_lock@plt>
movdqa 0xc93(%rip),%xmm0
mov    $0xc,%eax
movapd 0xce6(%rip),%xmm1
movdqa 0xc8d(%rip),%xmm8
movdqa 0xca4(%rip),%xmm9
movdqa 0xcab(%rip),%xmm10
movdqa 0xcb2(%rip),%xmm11
xchg   %ax,%ax
movdqa %xmm0,%xmm2
paddd  %xmm8,%xmm2
cvtdq2pd %xmm0,%xmm3
pshufd $0xee,%xmm0,%xmm4
cvtdq2pd %xmm4,%xmm4
cvtdq2pd %xmm2,%xmm5
pshufd $0xee,%xmm2,%xmm2
cvtdq2pd %xmm2,%xmm2
mulpd  %xmm1,%xmm4
mulpd  %xmm1,%xmm3
mulpd  %xmm1,%xmm2
cvtpd2ps %xmm3,%xmm3
cvtpd2ps %xmm4,%xmm4
mulpd  %xmm1,%xmm5
unpcklpd %xmm4,%xmm3
cvtpd2ps %xmm5,%xmm4
cvtpd2ps %xmm2,%xmm2
unpcklpd %xmm2,%xmm4
movdqa %xmm0,%xmm2
paddd  %xmm9,%xmm2
movdqa %xmm0,%xmm5
paddd  %xmm10,%xmm5
cvtdq2pd %xmm2,%xmm6
pshufd $0xee,%xmm2,%xmm2
cvtdq2pd %xmm2,%xmm2
cvtdq2pd %xmm5,%xmm7
movapd %xmm3,-0x20(%rsp,%rax,4)
pshufd $0xee,%xmm5,%xmm3
cvtdq2pd %xmm3,%xmm3
movapd %xmm4,-0x10(%rsp,%rax,4)
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm6
mulpd  %xmm1,%xmm3
cvtpd2ps %xmm6,%xmm4
cvtpd2ps %xmm2,%xmm2
mulpd  %xmm1,%xmm7
unpcklpd %xmm2,%xmm4
cvtpd2ps %xmm7,%xmm2
cvtpd2ps %xmm3,%xmm3
unpcklpd %xmm3,%xmm2
movapd %xmm4,(%rsp,%rax,4)
movapd %xmm2,0x10(%rsp,%rax,4)
paddd  %xmm11,%xmm0
add    $0x10,%rax
cmp    $0xf424c,%rax
jne    13a0 <main+0x240>
lea    0x8(%rsp),%rdi
call   1040 <omp_unset_lock@plt>
lea    0xc(%rsp),%rdi
call   1070 <omp_set_lock@plt>
lea    0xc6e(%rip),%rdi
mov    %ebp,%esi
call   1050 <printf@plt>
mov    $0xc,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movaps -0x20(%rsp,%rax,4),%xmm0
movaps -0x10(%rsp,%rax,4),%xmm1
movaps (%rsp,%rax,4),%xmm2
movaps 0x10(%rsp,%rax,4),%xmm3
addps  0x3d08e0(%rsp,%rax,4),%xmm0
addps  0x3d08f0(%rsp,%rax,4),%xmm1
movaps %xmm0,0x3d08e0(%rsp,%rax,4)
movaps %xmm1,0x3d08f0(%rsp,%rax,4)
addps  0x3d0900(%rsp,%rax,4),%xmm2
addps  0x3d0910(%rsp,%rax,4),%xmm3
movaps %xmm2,0x3d0900(%rsp,%rax,4)
movaps %xmm3,0x3d0910(%rsp,%rax,4)
add    $0x10,%rax
cmp    $0xf424c,%rax
jne    14a0 <main+0x340>
lea    0xc(%rsp),%rdi
call   1040 <omp_unset_lock@plt>
xor    %eax,%eax
add    $0x7a1218,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Number of threads = %d\0A\00"
@.str.1 = [23 x i8] c"Thread %d starting...\0A\00"
@.str.2 = [28 x i8] c"Thread %d initializing a[]\0A\00"
@.str.3 = [29 x i8] c"Thread %d adding a[] to b[]\0A\00"
@.str.4 = [28 x i8] c"Thread %d initializing b[]\0A\00"
@.str.5 = [29 x i8] c"Thread %d adding b[] to a[]\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [1000000 x float]
%10 = alloca [1000000 x float]
%11 = alloca i32
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = call i32 @omp_init_lock(i32* %11)
%14 = call i32 @omp_init_lock(i32* %12)
%15 = call i32 (...) @omp_get_thread_num()
store i32 %15, i32* %7
%16 = call i32 (...) @omp_get_num_threads()
store i32 %16, i32* %6
%17 = load i32, i32* %6
%18 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %7
%20 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %19)
%21 = load i32, i32* %7
%22 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 %21)
%23 = call i32 @omp_set_lock(i32* %11)
store i32 0, i32* %8
br label %24
24: ; preds = %35, %2
%25 = load i32, i32* %8
%26 = icmp slt i32 %25, 1000000
br i1 %26, label %27, label %38
27: ; preds = %24
%28 = load i32, i32* %8
%29 = sitofp i32 %28 to double
%30 = fmul double %29, 0x3F8CFF886CE8B9FD
%31 = fptrunc double %30 to float
%32 = load i32, i32* %8
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [1000000 x float], [1000000 x float]* %9, i64 0, i64 %33
store float %31, float* %34
br label %35
35: ; preds = %27
%36 = load i32, i32* %8
%37 = add nsw i32 %36, 1
store i32 %37, i32* %8
br label %24
38: ; preds = %24
%39 = call i32 @omp_unset_lock(i32* %11)
%40 = call i32 @omp_set_lock(i32* %12)
%41 = load i32, i32* %7
%42 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i32 %41)
store i32 0, i32* %8
br label %43
43: ; preds = %56, %38
%44 = load i32, i32* %8
%45 = icmp slt i32 %44, 1000000
br i1 %45, label %46, label %59
46: ; preds = %43
%47 = load i32, i32* %8
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [1000000 x float], [1000000 x float]* %9, i64 0, i64 %48
%50 = load float, float* %49
%51 = load i32, i32* %8
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [1000000 x float], [1000000 x float]* %10, i64 0, i64 %52
%54 = load float, float* %53
%55 = fadd float %54, %50
store float %55, float* %53
br label %56
56: ; preds = %46
%57 = load i32, i32* %8
%58 = add nsw i32 %57, 1
store i32 %58, i32* %8
br label %43
59: ; preds = %43
%60 = call i32 @omp_unset_lock(i32* %12)
%61 = load i32, i32* %7
%62 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), i32 %61)
%63 = call i32 @omp_set_lock(i32* %12)
store i32 0, i32* %8
br label %64
64: ; preds = %75, %59
%65 = load i32, i32* %8
%66 = icmp slt i32 %65, 1000000
br i1 %66, label %67, label %78
67: ; preds = %64
%68 = load i32, i32* %8
%69 = sitofp i32 %68 to double
%70 = fmul double %69, 0x400921FB54411744
%71 = fptrunc double %70 to float
%72 = load i32, i32* %8
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [1000000 x float], [1000000 x float]* %10, i64 0, i64 %73
store float %71, float* %74
br label %75
75: ; preds = %67
%76 = load i32, i32* %8
%77 = add nsw i32 %76, 1
store i32 %77, i32* %8
br label %64
78: ; preds = %64
%79 = call i32 @omp_unset_lock(i32* %12)
%80 = call i32 @omp_set_lock(i32* %11)
%81 = load i32, i32* %7
%82 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i32 %81)
store i32 0, i32* %8
br label %83
83: ; preds = %96, %78
%84 = load i32, i32* %8
%85 = icmp slt i32 %84, 1000000
br i1 %85, label %86, label %99
86: ; preds = %83
%87 = load i32, i32* %8
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [1000000 x float], [1000000 x float]* %10, i64 0, i64 %88
%90 = load float, float* %89
%91 = load i32, i32* %8
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds [1000000 x float], [1000000 x float]* %9, i64 0, i64 %92
%94 = load float, float* %93
%95 = fadd float %94, %90
store float %95, float* %93
br label %96
96: ; preds = %86
%97 = load i32, i32* %8
%98 = add nsw i32 %97, 1
store i32 %98, i32* %8
br label %83
99: ; preds = %83
%100 = call i32 @omp_unset_lock(i32* %11)
%101 = load i32, i32* %3
ret i32 %101
}

LLVM IR (-O2):
@.str = [24 x i8] c"Number of threads = %d\0A\00"
@.str.1 = [23 x i8] c"Thread %d starting...\0A\00"
@.str.2 = [28 x i8] c"Thread %d initializing a[]\0A\00"
@.str.3 = [29 x i8] c"Thread %d adding a[] to b[]\0A\00"
@.str.4 = [28 x i8] c"Thread %d initializing b[]\0A\00"
@.str.5 = [29 x i8] c"Thread %d adding b[] to a[]\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1000000 x float]
%4 = alloca [1000000 x float]
%5 = alloca i32
%6 = alloca i32
%7 = bitcast [1000000 x float]* %3 to i8*
%8 = bitcast [1000000 x float]* %4 to i8*
%9 = bitcast i32* %5 to i8*
%10 = bitcast i32* %6 to i8*
%11 = call i32 @omp_init_lock(i32* %5)
%12 = call i32 @omp_init_lock(i32* %6)
%13 = call i32 (...) @omp_get_thread_num()
%14 = call i32 (...) @omp_get_num_threads()
%15 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %13)
%17 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 %13)
%18 = call i32 @omp_set_lock(i32* %5)
br label %19
19: ; preds = %19, %2
%20 = phi i64 [ 0, %2 ], [ %46, %19 ]
%21 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %2 ], [ %47, %19 ]
%22 = add <4 x i32> %21, <i32 4, i32 4, i32 4, i32 4>
%23 = sitofp <4 x i32> %21 to <4 x double>
%24 = sitofp <4 x i32> %22 to <4 x double>
%25 = fmul <4 x double> %23, <double 0x3F8CFF886CE8B9FD, double 0x3F8CFF886CE8B9FD, double 0x3F8CFF886CE8B9FD, double 0x3F8CFF886CE8B9FD>
%26 = fmul <4 x double> %24, <double 0x3F8CFF886CE8B9FD, double 0x3F8CFF886CE8B9FD, double 0x3F8CFF886CE8B9FD, double 0x3F8CFF886CE8B9FD>
%27 = fptrunc <4 x double> %25 to <4 x float>
%28 = fptrunc <4 x double> %26 to <4 x float>
%29 = getelementptr inbounds [1000000 x float], [1000000 x float]* %3, i64 0, i64 %20
%30 = bitcast float* %29 to <4 x float>*
store <4 x float> %27, <4 x float>* %30
%31 = getelementptr inbounds float, float* %29, i64 4
%32 = bitcast float* %31 to <4 x float>*
store <4 x float> %28, <4 x float>* %32
%33 = or i64 %20, 8
%34 = add <4 x i32> %21, <i32 8, i32 8, i32 8, i32 8>
%35 = add <4 x i32> %21, <i32 12, i32 12, i32 12, i32 12>
%36 = sitofp <4 x i32> %34 to <4 x double>
%37 = sitofp <4 x i32> %35 to <4 x double>
%38 = fmul <4 x double> %36, <double 0x3F8CFF886CE8B9FD, double 0x3F8CFF886CE8B9FD, double 0x3F8CFF886CE8B9FD, double 0x3F8CFF886CE8B9FD>
%39 = fmul <4 x double> %37, <double 0x3F8CFF886CE8B9FD, double 0x3F8CFF886CE8B9FD, double 0x3F8CFF886CE8B9FD, double 0x3F8CFF886CE8B9FD>
%40 = fptrunc <4 x double> %38 to <4 x float>
%41 = fptrunc <4 x double> %39 to <4 x float>
%42 = getelementptr inbounds [1000000 x float], [1000000 x float]* %3, i64 0, i64 %33
%43 = bitcast float* %42 to <4 x float>*
store <4 x float> %40, <4 x float>* %43
%44 = getelementptr inbounds float, float* %42, i64 4
%45 = bitcast float* %44 to <4 x float>*
store <4 x float> %41, <4 x float>* %45
%46 = add nuw nsw i64 %20, 16
%47 = add <4 x i32> %21, <i32 16, i32 16, i32 16, i32 16>
%48 = icmp eq i64 %46, 1000000
br i1 %48, label %49, label %19
49: ; preds = %19
%50 = call i32 @omp_unset_lock(i32* %5)
%51 = call i32 @omp_set_lock(i32* %6)
%52 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i32 %13)
br label %53
53: ; preds = %53, %49
%54 = phi i64 [ 0, %49 ], [ %88, %53 ]
%55 = getelementptr inbounds [1000000 x float], [1000000 x float]* %3, i64 0, i64 %54
%56 = bitcast float* %55 to <4 x float>*
%57 = load <4 x float>, <4 x float>* %56
%58 = getelementptr inbounds float, float* %55, i64 4
%59 = bitcast float* %58 to <4 x float>*
%60 = load <4 x float>, <4 x float>* %59
%61 = getelementptr inbounds [1000000 x float], [1000000 x float]* %4, i64 0, i64 %54
%62 = bitcast float* %61 to <4 x float>*
%63 = load <4 x float>, <4 x float>* %62
%64 = getelementptr inbounds float, float* %61, i64 4
%65 = bitcast float* %64 to <4 x float>*
%66 = load <4 x float>, <4 x float>* %65
%67 = fadd <4 x float> %57, %63
%68 = fadd <4 x float> %60, %66
%69 = bitcast float* %61 to <4 x float>*
store <4 x float> %67, <4 x float>* %69
%70 = bitcast float* %64 to <4 x float>*
store <4 x float> %68, <4 x float>* %70
%71 = or i64 %54, 8
%72 = getelementptr inbounds [1000000 x float], [1000000 x float]* %3, i64 0, i64 %71
%73 = bitcast float* %72 to <4 x float>*
%74 = load <4 x float>, <4 x float>* %73
%75 = getelementptr inbounds float, float* %72, i64 4
%76 = bitcast float* %75 to <4 x float>*
%77 = load <4 x float>, <4 x float>* %76
%78 = getelementptr inbounds [1000000 x float], [1000000 x float]* %4, i64 0, i64 %71
%79 = bitcast float* %78 to <4 x float>*
%80 = load <4 x float>, <4 x float>* %79
%81 = getelementptr inbounds float, float* %78, i64 4
%82 = bitcast float* %81 to <4 x float>*
%83 = load <4 x float>, <4 x float>* %82
%84 = fadd <4 x float> %74, %80
%85 = fadd <4 x float> %77, %83
%86 = bitcast float* %78 to <4 x float>*
store <4 x float> %84, <4 x float>* %86
%87 = bitcast float* %81 to <4 x float>*
store <4 x float> %85, <4 x float>* %87
%88 = add nuw nsw i64 %54, 16
%89 = icmp eq i64 %88, 1000000
br i1 %89, label %90, label %53
90: ; preds = %53
%91 = call i32 @omp_unset_lock(i32* %6)
%92 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), i32 %13)
%93 = call i32 @omp_set_lock(i32* %6)
br label %94
94: ; preds = %94, %90
%95 = phi i64 [ 0, %90 ], [ %121, %94 ]
%96 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %90 ], [ %122, %94 ]
%97 = add <4 x i32> %96, <i32 4, i32 4, i32 4, i32 4>
%98 = sitofp <4 x i32> %96 to <4 x double>
%99 = sitofp <4 x i32> %97 to <4 x double>
%100 = fmul <4 x double> %98, <double 0x400921FB54411744, double 0x400921FB54411744, double 0x400921FB54411744, double 0x400921FB54411744>
%101 = fmul <4 x double> %99, <double 0x400921FB54411744, double 0x400921FB54411744, double 0x400921FB54411744, double 0x400921FB54411744>
%102 = fptrunc <4 x double> %100 to <4 x float>
%103 = fptrunc <4 x double> %101 to <4 x float>
%104 = getelementptr inbounds [1000000 x float], [1000000 x float]* %4, i64 0, i64 %95
%105 = bitcast float* %104 to <4 x float>*
store <4 x float> %102, <4 x float>* %105
%106 = getelementptr inbounds float, float* %104, i64 4
%107 = bitcast float* %106 to <4 x float>*
store <4 x float> %103, <4 x float>* %107
%108 = or i64 %95, 8
%109 = add <4 x i32> %96, <i32 8, i32 8, i32 8, i32 8>
%110 = add <4 x i32> %96, <i32 12, i32 12, i32 12, i32 12>
%111 = sitofp <4 x i32> %109 to <4 x double>
%112 = sitofp <4 x i32> %110 to <4 x double>
%113 = fmul <4 x double> %111, <double 0x400921FB54411744, double 0x400921FB54411744, double 0x400921FB54411744, double 0x400921FB54411744>
%114 = fmul <4 x double> %112, <double 0x400921FB54411744, double 0x400921FB54411744, double 0x400921FB54411744, double 0x400921FB54411744>
%115 = fptrunc <4 x double> %113 to <4 x float>
%116 = fptrunc <4 x double> %114 to <4 x float>
%117 = getelementptr inbounds [1000000 x float], [1000000 x float]* %4, i64 0, i64 %108
%118 = bitcast float* %117 to <4 x float>*
store <4 x float> %115, <4 x float>* %118
%119 = getelementptr inbounds float, float* %117, i64 4
%120 = bitcast float* %119 to <4 x float>*
store <4 x float> %116, <4 x float>* %120
%121 = add nuw nsw i64 %95, 16
%122 = add <4 x i32> %96, <i32 16, i32 16, i32 16, i32 16>
%123 = icmp eq i64 %121, 1000000
br i1 %123, label %124, label %94
124: ; preds = %94
%125 = call i32 @omp_unset_lock(i32* %6)
%126 = call i32 @omp_set_lock(i32* %5)
%127 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i32 %13)
br label %128
128: ; preds = %128, %124
%129 = phi i64 [ 0, %124 ], [ %163, %128 ]
%130 = getelementptr inbounds [1000000 x float], [1000000 x float]* %4, i64 0, i64 %129
%131 = bitcast float* %130 to <4 x float>*
%132 = load <4 x float>, <4 x float>* %131
%133 = getelementptr inbounds float, float* %130, i64 4
%134 = bitcast float* %133 to <4 x float>*
%135 = load <4 x float>, <4 x float>* %134
%136 = getelementptr inbounds [1000000 x float], [1000000 x float]* %3, i64 0, i64 %129
%137 = bitcast float* %136 to <4 x float>*
%138 = load <4 x float>, <4 x float>* %137
%139 = getelementptr inbounds float, float* %136, i64 4
%140 = bitcast float* %139 to <4 x float>*
%141 = load <4 x float>, <4 x float>* %140
%142 = fadd <4 x float> %132, %138
%143 = fadd <4 x float> %135, %141
%144 = bitcast float* %136 to <4 x float>*
store <4 x float> %142, <4 x float>* %144
%145 = bitcast float* %139 to <4 x float>*
store <4 x float> %143, <4 x float>* %145
%146 = or i64 %129, 8
%147 = getelementptr inbounds [1000000 x float], [1000000 x float]* %4, i64 0, i64 %146
%148 = bitcast float* %147 to <4 x float>*
%149 = load <4 x float>, <4 x float>* %148
%150 = getelementptr inbounds float, float* %147, i64 4
%151 = bitcast float* %150 to <4 x float>*
%152 = load <4 x float>, <4 x float>* %151
%153 = getelementptr inbounds [1000000 x float], [1000000 x float]* %3, i64 0, i64 %146
%154 = bitcast float* %153 to <4 x float>*
%155 = load <4 x float>, <4 x float>* %154
%156 = getelementptr inbounds float, float* %153, i64 4
%157 = bitcast float* %156 to <4 x float>*
%158 = load <4 x float>, <4 x float>* %157
%159 = fadd <4 x float> %149, %155
%160 = fadd <4 x float> %152, %158
%161 = bitcast float* %153 to <4 x float>*
store <4 x float> %159, <4 x float>* %161
%162 = bitcast float* %156 to <4 x float>*
store <4 x float> %160, <4 x float>* %162
%163 = add nuw nsw i64 %129, 16
%164 = icmp eq i64 %163, 1000000
br i1 %164, label %165, label %128
165: ; preds = %128
%166 = call i32 @omp_unset_lock(i32* %5)
ret i32 0
}