#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*/ bar();
void foo(int x, unsigned long long y) {
#pragma omp task
  bar();
#pragma omp taskloop
  for (int i = 0; i < 10; i++)
    bar();
#pragma omp task
  bar();
#pragma omp taskloop
  for (unsigned long long int i = 0; i < y; i++)
    bar();
#pragma omp task priority(1)
  bar();
#pragma omp taskloop priority(1)
  for (int i = 0; i < 10; i++)
    bar();
#pragma omp task priority(x + 1)
  bar();
#pragma omp taskloop priority(x + 1)
  for (unsigned long long int i = 0; i < y; i++)
    bar();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <bar@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    114c <foo+0x3c>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <foo+0x1d>
mov    $0x0,%al
call   1030 <bar@plt>
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1181 <foo+0x71>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    115b <foo+0x4b>
mov    $0x0,%al
call   1030 <bar@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0xa,-0x24(%rbp)
jge    11ae <foo+0x9e>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    118f <foo+0x7f>
mov    $0x0,%al
call   1030 <bar@plt>
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    11e3 <foo+0xd3>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    11bd <foo+0xad>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1030 <bar@plt>
test   %r14,%r14
je     118d <foo+0x7d>
mov    %r14,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1030 <bar@plt>
add    $0xffffffffffffffff,%rbx
jne    1180 <foo+0x70>
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1030 <bar@plt>
xor    %eax,%eax
call   1030 <bar@plt>
test   %r14,%r14
je     11fd <foo+0xed>
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <bar@plt>
add    $0xffffffffffffffff,%r14
jne    11f0 <foo+0xe0>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @foo(i32 %0, i64 %1) {
%3 = tail call i32 (...) @bar()
%4 = tail call i32 (...) @bar()
%5 = tail call i32 (...) @bar()
%6 = tail call i32 (...) @bar()
%7 = tail call i32 (...) @bar()
%8 = tail call i32 (...) @bar()
%9 = tail call i32 (...) @bar()
%10 = tail call i32 (...) @bar()
%11 = tail call i32 (...) @bar()
%12 = tail call i32 (...) @bar()
%13 = tail call i32 (...) @bar()
%14 = tail call i32 (...) @bar()
%15 = icmp eq i64 %1, 0
br i1 %15, label %16, label %29
16: ; preds = %29, %2
%17 = tail call i32 (...) @bar()
%18 = tail call i32 (...) @bar()
%19 = tail call i32 (...) @bar()
%20 = tail call i32 (...) @bar()
%21 = tail call i32 (...) @bar()
%22 = tail call i32 (...) @bar()
%23 = tail call i32 (...) @bar()
%24 = tail call i32 (...) @bar()
%25 = tail call i32 (...) @bar()
%26 = tail call i32 (...) @bar()
%27 = tail call i32 (...) @bar()
%28 = tail call i32 (...) @bar()
br i1 %15, label %34, label %35
29: ; preds = %2, %29
%30 = phi i64 [ %32, %29 ], [ 0, %2 ]
%31 = tail call i32 (...) @bar()
%32 = add nuw i64 %30, 1
%33 = icmp eq i64 %32, %1
br i1 %33, label %16, label %29
34: ; preds = %35, %16
ret void
35: ; preds = %16, %35
%36 = phi i64 [ %38, %35 ], [ 0, %16 ]
%37 = tail call i32 (...) @bar()
%38 = add nuw i64 %36, 1
%39 = icmp eq i64 %38, %1
br i1 %39, label %34, label %35
}