_Complex float f3(void) {
  _Complex float a13 = 13.0f, a14 = 14.0f, a15 = 15.0f, a16 = 16.0f;
#pragma omp parallel shared(a13, a15)
  {
#pragma omp parallel shared(a14)
    {
      if (omp_get_thread_num() == 0 && omp_get_ancestor_thread_num(1) == 1)
        __imag__ a13 = __real__ a15;
      else if (omp_get_thread_num() == 1 && omp_get_ancestor_thread_num(1) == 0)
        __real__ a14 = __imag__ a16;
      b3(a15, a16);
    }
  }
  return a13 + a14 + a15 + a16;
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movss  0xecc(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xeb3(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xe9a(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xe81(%rip),%xmm0
movss  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x24(%rbp)
mov    $0x0,%al
call   1050 <omp_get_thread_num@plt>
cmp    $0x0,%eax
jne    11c0 <f3+0x90>
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <omp_get_ancestor_thread_num@plt>
cmp    $0x1,%eax
jne    11c0 <f3+0x90>
movss  -0x20(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    11f4 <f3+0xc4>
mov    $0x0,%al
call   1050 <omp_get_thread_num@plt>
cmp    $0x1,%eax
jne    11ef <f3+0xbf>
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <omp_get_ancestor_thread_num@plt>
cmp    $0x0,%eax
jne    11ef <f3+0xbf>
movss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    11f4 <f3+0xc4>
movss  -0x20(%rbp),%xmm3
movss  -0x1c(%rbp),%xmm0
movss  -0x28(%rbp),%xmm2
movss  -0x24(%rbp),%xmm1
movss  %xmm3,-0x30(%rbp)
movss  %xmm0,-0x2c(%rbp)
movsd  -0x30(%rbp),%xmm0
movss  %xmm2,-0x38(%rbp)
movss  %xmm1,-0x34(%rbp)
movsd  -0x38(%rbp),%xmm1
mov    $0x2,%al
call   1040 <b3@plt>
movss  -0x10(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
movss  -0x18(%rbp),%xmm3
movss  -0x14(%rbp),%xmm2
addss  %xmm3,%xmm1
addss  %xmm2,%xmm0
movss  -0x20(%rbp),%xmm3
movss  -0x1c(%rbp),%xmm2
addss  %xmm3,%xmm1
addss  %xmm2,%xmm0
movss  -0x28(%rbp),%xmm3
movss  -0x24(%rbp),%xmm2
addss  %xmm3,%xmm1
addss  %xmm2,%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0x4(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
sub    $0x18,%rsp
xor    %eax,%eax
call   1050 <omp_get_thread_num@plt>
test   %eax,%eax
jne    115a <f3+0x2a>
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <omp_get_ancestor_thread_num@plt>
cmp    $0x1,%eax
jne    115a <f3+0x2a>
movss  0xea8(%rip),%xmm0
jmp    118d <f3+0x5d>
xor    %eax,%eax
call   1050 <omp_get_thread_num@plt>
xorps  %xmm0,%xmm0
cmp    $0x1,%eax
jne    118d <f3+0x5d>
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <omp_get_ancestor_thread_num@plt>
xorps  %xmm0,%xmm0
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
lea    0xe86(%rip),%rax
movss  (%rax,%rcx,4),%xmm1
jmp    1195 <f3+0x65>
movss  0xe6f(%rip),%xmm1
unpcklps %xmm0,%xmm1
movaps %xmm1,(%rsp)
movss  0xe5c(%rip),%xmm0
movss  0xe5c(%rip),%xmm1
mov    $0x2,%al
call   1040 <b3@plt>
movaps (%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define <2 x float> @f3() {
%1 = alloca { float, float }
%2 = alloca { float, float }
%3 = alloca { float, float }
%4 = alloca { float, float }
%5 = alloca { float, float }
%6 = alloca { float, float }
%7 = alloca { float, float }
%8 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 0
%9 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 1
store float 1.300000e+01, float* %8
store float 0.000000e+00, float* %9
%10 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 0
%11 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 1
store float 1.400000e+01, float* %10
store float 0.000000e+00, float* %11
%12 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 0
%13 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 1
store float 1.500000e+01, float* %12
store float 0.000000e+00, float* %13
%14 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 0
%15 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 1
store float 1.600000e+01, float* %14
store float 0.000000e+00, float* %15
%16 = call i32 (...) @omp_get_thread_num()
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %25
18: ; preds = %0
%19 = call i32 (i32, ...) bitcast (i32 (...)* @omp_get_ancestor_thread_num to i32 (i32, ...)*)(i32 1)
%20 = icmp eq i32 %19, 1
br i1 %20, label %21, label %25
21: ; preds = %18
%22 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 0
%23 = load float, float* %22
%24 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 1
store float %23, float* %24
br label %36
25: ; preds = %18, %0
%26 = call i32 (...) @omp_get_thread_num()
%27 = icmp eq i32 %26, 1
br i1 %27, label %28, label %35
28: ; preds = %25
%29 = call i32 (i32, ...) bitcast (i32 (...)* @omp_get_ancestor_thread_num to i32 (i32, ...)*)(i32 1)
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %35
31: ; preds = %28
%32 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 1
%33 = load float, float* %32
%34 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 0
store float %33, float* %34
br label %35
35: ; preds = %31, %28, %25
br label %36
36: ; preds = %35, %21
%37 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 0
%38 = load float, float* %37
%39 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 1
%40 = load float, float* %39
%41 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 0
%42 = load float, float* %41
%43 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 1
%44 = load float, float* %43
%45 = getelementptr inbounds { float, float }, { float, float }* %6, i32 0, i32 0
%46 = getelementptr inbounds { float, float }, { float, float }* %6, i32 0, i32 1
store float %38, float* %45
store float %40, float* %46
%47 = bitcast { float, float }* %6 to <2 x float>*
%48 = load <2 x float>, <2 x float>* %47
%49 = getelementptr inbounds { float, float }, { float, float }* %7, i32 0, i32 0
%50 = getelementptr inbounds { float, float }, { float, float }* %7, i32 0, i32 1
store float %42, float* %49
store float %44, float* %50
%51 = bitcast { float, float }* %7 to <2 x float>*
%52 = load <2 x float>, <2 x float>* %51
%53 = call i32 (<2 x float>, <2 x float>, ...) bitcast (i32 (...)* @b3 to i32 (<2 x float>, <2 x float>, ...)*)(<2 x float> %48, <2 x float> %52)
%54 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 0
%55 = load float, float* %54
%56 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 1
%57 = load float, float* %56
%58 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 0
%59 = load float, float* %58
%60 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 1
%61 = load float, float* %60
%62 = fadd float %55, %59
%63 = fadd float %57, %61
%64 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 0
%65 = load float, float* %64
%66 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 1
%67 = load float, float* %66
%68 = fadd float %62, %65
%69 = fadd float %63, %67
%70 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 0
%71 = load float, float* %70
%72 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 1
%73 = load float, float* %72
%74 = fadd float %68, %71
%75 = fadd float %69, %73
%76 = getelementptr inbounds { float, float }, { float, float }* %1, i32 0, i32 0
%77 = getelementptr inbounds { float, float }, { float, float }* %1, i32 0, i32 1
store float %74, float* %76
store float %75, float* %77
%78 = bitcast { float, float }* %1 to <2 x float>*
%79 = load <2 x float>, <2 x float>* %78
ret <2 x float> %79
}

LLVM IR (-O2):
define <2 x float> @f3() {
%1 = tail call i32 (...) @omp_get_thread_num()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @omp_get_ancestor_thread_num to i32 (i32, ...)*)(i32 1)
%5 = icmp eq i32 %4, 1
br i1 %5, label %13, label %6
6: ; preds = %3, %0
%7 = tail call i32 (...) @omp_get_thread_num()
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = tail call i32 (i32, ...) bitcast (i32 (...)* @omp_get_ancestor_thread_num to i32 (i32, ...)*)(i32 1)
%11 = icmp eq i32 %10, 0
%12 = select i1 %11, float 4.400000e+01, float 5.800000e+01
br label %13
13: ; preds = %9, %3, %6
%14 = phi float [ 5.800000e+01, %6 ], [ 5.800000e+01, %3 ], [ %12, %9 ]
%15 = phi float [ 0.000000e+00, %6 ], [ 1.500000e+01, %3 ], [ 0.000000e+00, %9 ]
%16 = tail call i32 (<2 x float>, <2 x float>, ...) bitcast (i32 (...)* @b3 to i32 (<2 x float>, <2 x float>, ...)*)(<2 x float> <float 1.500000e+01, float 0.000000e+00>, <2 x float> <float 1.600000e+01, float 0.000000e+00>)
%17 = insertelement <2 x float> undef, float %14, i64 0
%18 = insertelement <2 x float> %17, float %15, i64 1
ret <2 x float> %18
}