#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*/ exit(int /*<<< orphan*/);
scalar_t__ malloc(int);
int omp_get_num_threads();
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int i, tid, nthreads, n = 20;
  double *A, *B, *C, *D;
  A = (double *)malloc(n * sizeof(double));
  B = (double *)malloc(n * sizeof(double));
  C = (double *)malloc(n * sizeof(double));
  D = (double *)malloc(n * sizeof(double));
  for (i = 0; i < n; i++) {
    A[i] = (double)(i + 1);
    C[i] = (double)(i + 1);
  }
#pragma omp parallel private(tid, i) shared(n, A, B, C, D)
  {
    tid = omp_get_thread_num();
    if (tid == 0) {
      nthreads = omp_get_num_threads();
      printf("Number of threads = %d\n", nthreads);
    }
#pragma omp for nowait
    for (i = 0; i < n; i++) {
      B[i] = 2.0 * A[i];
    }
#pragma omp for
    for (i = 0; i < n; i++) {
      D[i] = 1.0 / C[i];
      printf("Thread %d does iteration %d\n", tid, i);
    }
  }
  printf("B: ");
  for (i = 0; i < n; i++) {
    printf("%3.2f ", B[i]);
  }
  printf("\n\nD: ");
  for (i = 0; i < n; i++) {
    printf("%2.3f ", D[i]);
  }
  printf("\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x14,-0x20(%rbp)
movslq -0x20(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x28(%rbp)
movslq -0x20(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x30(%rbp)
movslq -0x20(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x38(%rbp)
movslq -0x20(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x40(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1208 <main+0xb8>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
mov    -0x38(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11c0 <main+0x70>
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    1237 <main+0xe7>
mov    $0x0,%al
call   1050 <omp_get_num_threads@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xde0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    127a <main+0x12a>
mov    -0x28(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  0xdae(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    123e <main+0xee>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    12d1 <main+0x181>
mov    -0x38(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  0xd63(%rip),%xmm0
divsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xd6c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1281 <main+0x131>
lea    0xd6d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    131b <main+0x1cb>
mov    -0x30(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xd43(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12e6 <main+0x196>
lea    0xd2e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1365 <main+0x215>
mov    -0x40(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xd06(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1330 <main+0x1e0>
lea    0xcba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0xa0,%edi
call   1070 <malloc@plt>
mov    %rax,%r12
mov    $0xa0,%edi
call   1070 <malloc@plt>
mov    %rax,%rbx
mov    $0xa0,%edi
call   1070 <malloc@plt>
mov    %rax,%r13
mov    $0xa0,%edi
call   1070 <malloc@plt>
mov    %rax,%r15
movabs $0x3ff0000000000000,%rax
mov    %rax,(%r12)
mov    %rax,0x0(%r13)
movabs $0x4000000000000000,%rax
mov    %rax,0x8(%r12)
mov    %rax,0x8(%r13)
movabs $0x4008000000000000,%rax
mov    %rax,0x10(%r12)
mov    %rax,0x10(%r13)
movabs $0x4010000000000000,%rax
mov    %rax,0x18(%r12)
mov    %rax,0x18(%r13)
movabs $0x4014000000000000,%rax
mov    %rax,0x20(%r12)
mov    %rax,0x20(%r13)
movabs $0x4018000000000000,%rax
mov    %rax,0x28(%r12)
mov    %rax,0x28(%r13)
movabs $0x401c000000000000,%rax
mov    %rax,0x30(%r12)
mov    %rax,0x30(%r13)
movabs $0x4020000000000000,%rax
mov    %rax,0x38(%r12)
mov    %rax,0x38(%r13)
movabs $0x4022000000000000,%rax
mov    %rax,0x40(%r12)
mov    %rax,0x40(%r13)
movabs $0x4024000000000000,%rax
mov    %rax,0x48(%r12)
mov    %rax,0x48(%r13)
movabs $0x4026000000000000,%rax
mov    %rax,0x50(%r12)
mov    %rax,0x50(%r13)
movabs $0x4028000000000000,%rax
mov    %rax,0x58(%r12)
mov    %rax,0x58(%r13)
movabs $0x402a000000000000,%rax
mov    %rax,0x60(%r12)
mov    %rax,0x60(%r13)
movabs $0x402c000000000000,%rax
mov    %rax,0x68(%r12)
mov    %rax,0x68(%r13)
movabs $0x402e000000000000,%rax
mov    %rax,0x70(%r12)
mov    %rax,0x70(%r13)
movabs $0x4030000000000000,%rax
mov    %rax,0x78(%r12)
mov    %rax,0x78(%r13)
movabs $0x4031000000000000,%rax
mov    %rax,0x80(%r12)
mov    %rax,0x80(%r13)
movabs $0x4032000000000000,%rax
mov    %rax,0x88(%r12)
mov    %rax,0x88(%r13)
movabs $0x4033000000000000,%rax
mov    %rax,0x90(%r12)
mov    %rax,0x90(%r13)
movabs $0x4034000000000000,%rax
mov    %rax,0x98(%r12)
mov    %rax,0x98(%r13)
xor    %eax,%eax
call   1040 <omp_get_thread_num@plt>
mov    %eax,%r14d
test   %eax,%eax
jne    1357 <main+0x1f7>
xor    %eax,%eax
call   1060 <omp_get_num_threads@plt>
lea    0xcba(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
movsd  (%r12),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,(%rbx)
movsd  0x8(%r12),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rbx)
movsd  0x10(%r12),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rbx)
movsd  0x18(%r12),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x18(%rbx)
movsd  0x20(%r12),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x20(%rbx)
movsd  0x28(%r12),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x28(%rbx)
movsd  0x30(%r12),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x30(%rbx)
movsd  0x38(%r12),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x38(%rbx)
movsd  0x40(%r12),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x40(%rbx)
movsd  0x48(%r12),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x48(%rbx)
movsd  0x50(%r12),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x50(%rbx)
movsd  0x58(%r12),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x58(%rbx)
movsd  0x60(%r12),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x60(%rbx)
movsd  0x68(%r12),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x68(%rbx)
movsd  0x70(%r12),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x70(%rbx)
movsd  0x78(%r12),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x78(%rbx)
movsd  0x80(%r12),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x80(%rbx)
movsd  0x88(%r12),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x88(%rbx)
movsd  0x90(%r12),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x90(%rbx)
movsd  0x98(%r12),%xmm0
addsd  %xmm0,%xmm0
mov    %rbx,%r12
movsd  %xmm0,0x98(%rbx)
lea    0xb69(%rip),%rbx
xor    %ebp,%ebp
nopl   0x0(%rax)
movsd  0xb38(%rip),%xmm0
divsd  0x0(%r13,%rbp,8),%xmm0
movsd  %xmm0,(%r15,%rbp,8)
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbp
cmp    $0x14,%rbp
jne    14c0 <main+0x360>
lea    0xb48(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsd  (%r12),%xmm0
lea    0xb38(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x8(%r12),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x10(%r12),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x18(%r12),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x20(%r12),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x28(%r12),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x30(%r12),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x38(%r12),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x40(%r12),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x48(%r12),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x50(%r12),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x58(%r12),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x60(%r12),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x68(%r12),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x70(%r12),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x78(%r12),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x80(%r12),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x88(%r12),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x90(%r12),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x98(%r12),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0x9df(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsd  (%r15),%xmm0
lea    0x9d2(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x8(%r15),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x10(%r15),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x18(%r15),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x20(%r15),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x28(%r15),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x30(%r15),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x38(%r15),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x40(%r15),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x48(%r15),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x50(%r15),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x58(%r15),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x60(%r15),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x68(%r15),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x70(%r15),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x78(%r15),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x80(%r15),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x88(%r15),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x90(%r15),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x98(%r15),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %edi,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Number of threads = %d\0A\00"
@.str.1 = [29 x i8] c"Thread %d does iteration %d\0A\00"
@.str.2 = [4 x i8] c"B: \00"
@.str.3 = [7 x i8] c"%3.2f \00"
@.str.4 = [6 x i8] c"\0A\0AD: \00"
@.str.5 = [7 x i8] c"%2.3f \00"
@.str.6 = [2 x i8] c"\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 i32
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 20, i32* %9
%14 = load i32, i32* %9
%15 = sext i32 %14 to i64
%16 = mul i64 %15, 8
%17 = trunc i64 %16 to i32
%18 = call i64 @malloc(i32 %17)
%19 = inttoptr i64 %18 to double*
store double* %19, double** %10
%20 = load i32, i32* %9
%21 = sext i32 %20 to i64
%22 = mul i64 %21, 8
%23 = trunc i64 %22 to i32
%24 = call i64 @malloc(i32 %23)
%25 = inttoptr i64 %24 to double*
store double* %25, double** %11
%26 = load i32, i32* %9
%27 = sext i32 %26 to i64
%28 = mul i64 %27, 8
%29 = trunc i64 %28 to i32
%30 = call i64 @malloc(i32 %29)
%31 = inttoptr i64 %30 to double*
store double* %31, double** %12
%32 = load i32, i32* %9
%33 = sext i32 %32 to i64
%34 = mul i64 %33, 8
%35 = trunc i64 %34 to i32
%36 = call i64 @malloc(i32 %35)
%37 = inttoptr i64 %36 to double*
store double* %37, double** %13
store i32 0, i32* %6
br label %38
38: ; preds = %57, %2
%39 = load i32, i32* %6
%40 = load i32, i32* %9
%41 = icmp slt i32 %39, %40
br i1 %41, label %42, label %60
42: ; preds = %38
%43 = load i32, i32* %6
%44 = add nsw i32 %43, 1
%45 = sitofp i32 %44 to double
%46 = load double*, double** %10
%47 = load i32, i32* %6
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds double, double* %46, i64 %48
store double %45, double* %49
%50 = load i32, i32* %6
%51 = add nsw i32 %50, 1
%52 = sitofp i32 %51 to double
%53 = load double*, double** %12
%54 = load i32, i32* %6
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds double, double* %53, i64 %55
store double %52, double* %56
br label %57
57: ; preds = %42
%58 = load i32, i32* %6
%59 = add nsw i32 %58, 1
store i32 %59, i32* %6
br label %38
60: ; preds = %38
%61 = call i32 (...) @omp_get_thread_num()
store i32 %61, i32* %7
%62 = load i32, i32* %7
%63 = icmp eq i32 %62, 0
br i1 %63, label %64, label %68
64: ; preds = %60
%65 = call i32 (...) @omp_get_num_threads()
store i32 %65, i32* %8
%66 = load i32, i32* %8
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %66)
br label %68
68: ; preds = %64, %60
store i32 0, i32* %6
br label %69
69: ; preds = %84, %68
%70 = load i32, i32* %6
%71 = load i32, i32* %9
%72 = icmp slt i32 %70, %71
br i1 %72, label %73, label %87
73: ; preds = %69
%74 = load double*, double** %10
%75 = load i32, i32* %6
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds double, double* %74, i64 %76
%78 = load double, double* %77
%79 = fmul double 2.000000e+00, %78
%80 = load double*, double** %11
%81 = load i32, i32* %6
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds double, double* %80, i64 %82
store double %79, double* %83
br label %84
84: ; preds = %73
%85 = load i32, i32* %6
%86 = add nsw i32 %85, 1
store i32 %86, i32* %6
br label %69
87: ; preds = %69
store i32 0, i32* %6
br label %88
88: ; preds = %106, %87
%89 = load i32, i32* %6
%90 = load i32, i32* %9
%91 = icmp slt i32 %89, %90
br i1 %91, label %92, label %109
92: ; preds = %88
%93 = load double*, double** %12
%94 = load i32, i32* %6
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds double, double* %93, i64 %95
%97 = load double, double* %96
%98 = fdiv double 1.000000e+00, %97
%99 = load double*, double** %13
%100 = load i32, i32* %6
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds double, double* %99, i64 %101
store double %98, double* %102
%103 = load i32, i32* %7
%104 = load i32, i32* %6
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %103, i32 %104)
br label %106
106: ; preds = %92
%107 = load i32, i32* %6
%108 = add nsw i32 %107, 1
store i32 %108, i32* %6
br label %88
109: ; preds = %88
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %6
br label %111
111: ; preds = %122, %109
%112 = load i32, i32* %6
%113 = load i32, i32* %9
%114 = icmp slt i32 %112, %113
br i1 %114, label %115, label %125
115: ; preds = %111
%116 = load double*, double** %11
%117 = load i32, i32* %6
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds double, double* %116, i64 %118
%120 = load double, double* %119
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %120)
br label %122
122: ; preds = %115
%123 = load i32, i32* %6
%124 = add nsw i32 %123, 1
store i32 %124, i32* %6
br label %111
125: ; preds = %111
%126 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %6
br label %127
127: ; preds = %138, %125
%128 = load i32, i32* %6
%129 = load i32, i32* %9
%130 = icmp slt i32 %128, %129
br i1 %130, label %131, label %141
131: ; preds = %127
%132 = load double*, double** %13
%133 = load i32, i32* %6
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds double, double* %132, i64 %134
%136 = load double, double* %135
%137 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %136)
br label %138
138: ; preds = %131
%139 = load i32, i32* %6
%140 = add nsw i32 %139, 1
store i32 %140, i32* %6
br label %127
141: ; preds = %127
%142 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%143 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [24 x i8] c"Number of threads = %d\0A\00"
@.str.1 = [29 x i8] c"Thread %d does iteration %d\0A\00"
@.str.2 = [4 x i8] c"B: \00"
@.str.3 = [7 x i8] c"%3.2f \00"
@.str.4 = [6 x i8] c"\0A\0AD: \00"
@.str.5 = [7 x i8] c"%2.3f \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @malloc(i32 160)
%4 = inttoptr i64 %3 to double*
%5 = tail call i64 @malloc(i32 160)
%6 = tail call i64 @malloc(i32 160)
%7 = inttoptr i64 %6 to double*
%8 = tail call i64 @malloc(i32 160)
store double 1.000000e+00, double* %4
store double 1.000000e+00, double* %7
%9 = getelementptr inbounds double, double* %4, i64 1
store double 2.000000e+00, double* %9
%10 = getelementptr inbounds double, double* %7, i64 1
store double 2.000000e+00, double* %10
%11 = getelementptr inbounds double, double* %4, i64 2
store double 3.000000e+00, double* %11
%12 = getelementptr inbounds double, double* %7, i64 2
store double 3.000000e+00, double* %12
%13 = getelementptr inbounds double, double* %4, i64 3
store double 4.000000e+00, double* %13
%14 = getelementptr inbounds double, double* %7, i64 3
store double 4.000000e+00, double* %14
%15 = getelementptr inbounds double, double* %4, i64 4
store double 5.000000e+00, double* %15
%16 = getelementptr inbounds double, double* %7, i64 4
store double 5.000000e+00, double* %16
%17 = getelementptr inbounds double, double* %4, i64 5
store double 6.000000e+00, double* %17
%18 = getelementptr inbounds double, double* %7, i64 5
store double 6.000000e+00, double* %18
%19 = getelementptr inbounds double, double* %4, i64 6
store double 7.000000e+00, double* %19
%20 = getelementptr inbounds double, double* %7, i64 6
store double 7.000000e+00, double* %20
%21 = getelementptr inbounds double, double* %4, i64 7
store double 8.000000e+00, double* %21
%22 = getelementptr inbounds double, double* %7, i64 7
store double 8.000000e+00, double* %22
%23 = getelementptr inbounds double, double* %4, i64 8
store double 9.000000e+00, double* %23
%24 = getelementptr inbounds double, double* %7, i64 8
store double 9.000000e+00, double* %24
%25 = getelementptr inbounds double, double* %4, i64 9
store double 1.000000e+01, double* %25
%26 = getelementptr inbounds double, double* %7, i64 9
store double 1.000000e+01, double* %26
%27 = getelementptr inbounds double, double* %4, i64 10
store double 1.100000e+01, double* %27
%28 = getelementptr inbounds double, double* %7, i64 10
store double 1.100000e+01, double* %28
%29 = getelementptr inbounds double, double* %4, i64 11
store double 1.200000e+01, double* %29
%30 = getelementptr inbounds double, double* %7, i64 11
store double 1.200000e+01, double* %30
%31 = getelementptr inbounds double, double* %4, i64 12
store double 1.300000e+01, double* %31
%32 = getelementptr inbounds double, double* %7, i64 12
store double 1.300000e+01, double* %32
%33 = getelementptr inbounds double, double* %4, i64 13
store double 1.400000e+01, double* %33
%34 = getelementptr inbounds double, double* %7, i64 13
store double 1.400000e+01, double* %34
%35 = getelementptr inbounds double, double* %4, i64 14
store double 1.500000e+01, double* %35
%36 = getelementptr inbounds double, double* %7, i64 14
store double 1.500000e+01, double* %36
%37 = getelementptr inbounds double, double* %4, i64 15
store double 1.600000e+01, double* %37
%38 = getelementptr inbounds double, double* %7, i64 15
store double 1.600000e+01, double* %38
%39 = getelementptr inbounds double, double* %4, i64 16
store double 1.700000e+01, double* %39
%40 = getelementptr inbounds double, double* %7, i64 16
store double 1.700000e+01, double* %40
%41 = getelementptr inbounds double, double* %4, i64 17
store double 1.800000e+01, double* %41
%42 = getelementptr inbounds double, double* %7, i64 17
store double 1.800000e+01, double* %42
%43 = getelementptr inbounds double, double* %4, i64 18
store double 1.900000e+01, double* %43
%44 = getelementptr inbounds double, double* %7, i64 18
store double 1.900000e+01, double* %44
%45 = getelementptr inbounds double, double* %4, i64 19
store double 2.000000e+01, double* %45
%46 = getelementptr inbounds double, double* %7, i64 19
store double 2.000000e+01, double* %46
%47 = inttoptr i64 %5 to double*
%48 = inttoptr i64 %8 to double*
%49 = tail call i32 (...) @omp_get_thread_num()
%50 = icmp eq i32 %49, 0
br i1 %50, label %51, label %54
51: ; preds = %2
%52 = tail call i32 (...) @omp_get_num_threads()
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %52)
br label %54
54: ; preds = %51, %2
%55 = load double, double* %4
%56 = fmul double %55, 2.000000e+00
store double %56, double* %47
%57 = load double, double* %9
%58 = fmul double %57, 2.000000e+00
%59 = getelementptr inbounds double, double* %47, i64 1
store double %58, double* %59
%60 = load double, double* %11
%61 = fmul double %60, 2.000000e+00
%62 = getelementptr inbounds double, double* %47, i64 2
store double %61, double* %62
%63 = load double, double* %13
%64 = fmul double %63, 2.000000e+00
%65 = getelementptr inbounds double, double* %47, i64 3
store double %64, double* %65
%66 = load double, double* %15
%67 = fmul double %66, 2.000000e+00
%68 = getelementptr inbounds double, double* %47, i64 4
store double %67, double* %68
%69 = load double, double* %17
%70 = fmul double %69, 2.000000e+00
%71 = getelementptr inbounds double, double* %47, i64 5
store double %70, double* %71
%72 = load double, double* %19
%73 = fmul double %72, 2.000000e+00
%74 = getelementptr inbounds double, double* %47, i64 6
store double %73, double* %74
%75 = load double, double* %21
%76 = fmul double %75, 2.000000e+00
%77 = getelementptr inbounds double, double* %47, i64 7
store double %76, double* %77
%78 = load double, double* %23
%79 = fmul double %78, 2.000000e+00
%80 = getelementptr inbounds double, double* %47, i64 8
store double %79, double* %80
%81 = load double, double* %25
%82 = fmul double %81, 2.000000e+00
%83 = getelementptr inbounds double, double* %47, i64 9
store double %82, double* %83
%84 = load double, double* %27
%85 = fmul double %84, 2.000000e+00
%86 = getelementptr inbounds double, double* %47, i64 10
store double %85, double* %86
%87 = load double, double* %29
%88 = fmul double %87, 2.000000e+00
%89 = getelementptr inbounds double, double* %47, i64 11
store double %88, double* %89
%90 = load double, double* %31
%91 = fmul double %90, 2.000000e+00
%92 = getelementptr inbounds double, double* %47, i64 12
store double %91, double* %92
%93 = load double, double* %33
%94 = fmul double %93, 2.000000e+00
%95 = getelementptr inbounds double, double* %47, i64 13
store double %94, double* %95
%96 = load double, double* %35
%97 = fmul double %96, 2.000000e+00
%98 = getelementptr inbounds double, double* %47, i64 14
store double %97, double* %98
%99 = load double, double* %37
%100 = fmul double %99, 2.000000e+00
%101 = getelementptr inbounds double, double* %47, i64 15
store double %100, double* %101
%102 = load double, double* %39
%103 = fmul double %102, 2.000000e+00
%104 = getelementptr inbounds double, double* %47, i64 16
store double %103, double* %104
%105 = load double, double* %41
%106 = fmul double %105, 2.000000e+00
%107 = getelementptr inbounds double, double* %47, i64 17
store double %106, double* %107
%108 = load double, double* %43
%109 = fmul double %108, 2.000000e+00
%110 = getelementptr inbounds double, double* %47, i64 18
store double %109, double* %110
%111 = load double, double* %45
%112 = fmul double %111, 2.000000e+00
%113 = getelementptr inbounds double, double* %47, i64 19
store double %112, double* %113
br label %114
114: ; preds = %54, %114
%115 = phi i64 [ 0, %54 ], [ %122, %114 ]
%116 = getelementptr inbounds double, double* %7, i64 %115
%117 = load double, double* %116
%118 = fdiv double 1.000000e+00, %117
%119 = getelementptr inbounds double, double* %48, i64 %115
store double %118, double* %119
%120 = trunc i64 %115 to i32
%121 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %49, i32 %120)
%122 = add nuw nsw i64 %115, 1
%123 = icmp eq i64 %122, 20
br i1 %123, label %124, label %114
124: ; preds = %114
%125 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%126 = load double, double* %47
%127 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %126)
%128 = load double, double* %59
%129 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %128)
%130 = load double, double* %62
%131 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %130)
%132 = load double, double* %65
%133 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %132)
%134 = load double, double* %68
%135 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %134)
%136 = load double, double* %71
%137 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %136)
%138 = load double, double* %74
%139 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %138)
%140 = load double, double* %77
%141 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %140)
%142 = load double, double* %80
%143 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %142)
%144 = load double, double* %83
%145 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %144)
%146 = load double, double* %86
%147 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %146)
%148 = load double, double* %89
%149 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %148)
%150 = load double, double* %92
%151 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %150)
%152 = load double, double* %95
%153 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %152)
%154 = load double, double* %98
%155 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %154)
%156 = load double, double* %101
%157 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %156)
%158 = load double, double* %104
%159 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %158)
%160 = load double, double* %107
%161 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %160)
%162 = load double, double* %110
%163 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %162)
%164 = load double, double* %113
%165 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %164)
%166 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%167 = load double, double* %48
%168 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %167)
%169 = getelementptr inbounds double, double* %48, i64 1
%170 = load double, double* %169
%171 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %170)
%172 = getelementptr inbounds double, double* %48, i64 2
%173 = load double, double* %172
%174 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %173)
%175 = getelementptr inbounds double, double* %48, i64 3
%176 = load double, double* %175
%177 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %176)
%178 = getelementptr inbounds double, double* %48, i64 4
%179 = load double, double* %178
%180 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %179)
%181 = getelementptr inbounds double, double* %48, i64 5
%182 = load double, double* %181
%183 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %182)
%184 = getelementptr inbounds double, double* %48, i64 6
%185 = load double, double* %184
%186 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %185)
%187 = getelementptr inbounds double, double* %48, i64 7
%188 = load double, double* %187
%189 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %188)
%190 = getelementptr inbounds double, double* %48, i64 8
%191 = load double, double* %190
%192 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %191)
%193 = getelementptr inbounds double, double* %48, i64 9
%194 = load double, double* %193
%195 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %194)
%196 = getelementptr inbounds double, double* %48, i64 10
%197 = load double, double* %196
%198 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %197)
%199 = getelementptr inbounds double, double* %48, i64 11
%200 = load double, double* %199
%201 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %200)
%202 = getelementptr inbounds double, double* %48, i64 12
%203 = load double, double* %202
%204 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %203)
%205 = getelementptr inbounds double, double* %48, i64 13
%206 = load double, double* %205
%207 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %206)
%208 = getelementptr inbounds double, double* %48, i64 14
%209 = load double, double* %208
%210 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %209)
%211 = getelementptr inbounds double, double* %48, i64 15
%212 = load double, double* %211
%213 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %212)
%214 = getelementptr inbounds double, double* %48, i64 16
%215 = load double, double* %214
%216 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %215)
%217 = getelementptr inbounds double, double* %48, i64 17
%218 = load double, double* %217
%219 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %218)
%220 = getelementptr inbounds double, double* %48, i64 18
%221 = load double, double* %220
%222 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %221)
%223 = getelementptr inbounds double, double* %48, i64 19
%224 = load double, double* %223
%225 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), double %224)
%226 = tail call i32 @putchar(i32 10)
%227 = tail call i32 @exit(i32 0)
unreachable
}