#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*/ b1(int, int);
int f4(void) {
  int a17 = 17, a18 = 18, a19 = 19, a20 = 20, a21 = 21, a22 = 22, a23 = 23,
      a24 = 0, a25 = 0, a26 = 0;
  int i;
#pragma omp task shared(a17)
  b1(a17, a18);
  b1(a17, a18);
#pragma omp taskwait
#pragma omp parallel shared(a19)
  {
#pragma omp task shared(a19)
    { a19 = 1; }
#pragma omp task shared(a20)
    a20 = a21;
#pragma omp for firstprivate (a25) lastprivate (a22) linear (a23:2) reduction (+:a24) private (a26)
    for (i = 0; i < 10; i++) {
      a26 = i;
      a22 = a26 + 7;
      a23 += 2;
      a24 += i;
      a25++;
    }
  }
  return a22 + a23 + a24 + a25 + a26;
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x11,-0x4(%rbp)
movl   $0x12,-0x8(%rbp)
movl   $0x13,-0xc(%rbp)
movl   $0x14,-0x10(%rbp)
movl   $0x15,-0x14(%rbp)
movl   $0x16,-0x18(%rbp)
movl   $0x17,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <b1@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <b1@plt>
movl   $0x1,-0xc(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x2c(%rbp)
cmpl   $0xa,-0x2c(%rbp)
jge    11ca <f4+0xba>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
add    $0x7,%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x2c(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1188 <f4+0x78>
mov    -0x18(%rbp),%eax
add    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
add    -0x24(%rbp),%eax
add    -0x28(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
push   %rax
mov    $0x11,%edi
mov    $0x12,%esi
call   1030 <b1@plt>
mov    $0x11,%edi
mov    $0x12,%esi
call   1030 <b1@plt>
mov    $0x7b,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @f4() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 17, i32* %1
store i32 18, i32* %2
store i32 19, i32* %3
store i32 20, i32* %4
store i32 21, i32* %5
store i32 22, i32* %6
store i32 23, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
%12 = load i32, i32* %1
%13 = load i32, i32* %2
%14 = call i32 @b1(i32 %12, i32 %13)
%15 = load i32, i32* %1
%16 = load i32, i32* %2
%17 = call i32 @b1(i32 %15, i32 %16)
store i32 1, i32* %3
%18 = load i32, i32* %5
store i32 %18, i32* %4
store i32 0, i32* %11
br label %19
19: ; preds = %33, %0
%20 = load i32, i32* %11
%21 = icmp slt i32 %20, 10
br i1 %21, label %22, label %36
22: ; preds = %19
%23 = load i32, i32* %11
store i32 %23, i32* %10
%24 = load i32, i32* %10
%25 = add nsw i32 %24, 7
store i32 %25, i32* %6
%26 = load i32, i32* %7
%27 = add nsw i32 %26, 2
store i32 %27, i32* %7
%28 = load i32, i32* %11
%29 = load i32, i32* %8
%30 = add nsw i32 %29, %28
store i32 %30, i32* %8
%31 = load i32, i32* %9
%32 = add nsw i32 %31, 1
store i32 %32, i32* %9
br label %33
33: ; preds = %22
%34 = load i32, i32* %11
%35 = add nsw i32 %34, 1
store i32 %35, i32* %11
br label %19
36: ; preds = %19
%37 = load i32, i32* %6
%38 = load i32, i32* %7
%39 = add nsw i32 %37, %38
%40 = load i32, i32* %8
%41 = add nsw i32 %39, %40
%42 = load i32, i32* %9
%43 = add nsw i32 %41, %42
%44 = load i32, i32* %10
%45 = add nsw i32 %43, %44
ret i32 %45
}

LLVM IR (-O2):
define i32 @f4() {
%1 = tail call i32 @b1(i32 17, i32 18)
%2 = tail call i32 @b1(i32 17, i32 18)
ret i32 123
}