; LLVM IR from OpenMathLib/OpenBLAS :: lapack-netlib/SRC (claev2)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.complex = type { float, float }

; Function Attrs: nounwind uwtable
define dso_local void @claev2_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #0 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca %struct.complex, align 4
  %19 = alloca %struct.complex, align 4
  %20 = alloca float, align 4
  %21 = alloca %struct.complex, align 4
  %22 = alloca { float, float }, align 4
  %23 = alloca { float, float }, align 4
  %24 = alloca { float, float }, align 4
  %25 = alloca { float, float }, align 4
  %26 = alloca { float, float }, align 4
  %27 = alloca { float, float }, align 4
  %28 = alloca { float, float }, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %29 = load ptr, ptr %9, align 8, !tbaa !5
  %30 = call <2 x float> @Cf(ptr noundef %29)
  store <2 x float> %30, ptr %22, align 4
  %31 = getelementptr inbounds { float, float }, ptr %22, i32 0, i32 0
  %32 = load float, ptr %31, align 4
  %33 = getelementptr inbounds { float, float }, ptr %22, i32 0, i32 1
  %34 = load float, ptr %33, align 4
  %35 = getelementptr inbounds { float, float }, ptr %23, i32 0, i32 0
  %36 = getelementptr inbounds { float, float }, ptr %23, i32 0, i32 1
  store float %32, ptr %35, align 4
  store float %34, ptr %36, align 4
  %37 = load <2 x float>, ptr %23, align 4
  %38 = call float @cabsf(<2 x float> noundef %37) #6
  %39 = fcmp oeq float %38, 0.000000e+00
  br i1 %39, label %40, label %43

40:                                               ; preds = %7
  %41 = getelementptr inbounds %struct.complex, ptr %21, i32 0, i32 0
  store float 1.000000e+00, ptr %41, align 4, !tbaa !9
  %42 = getelementptr inbounds %struct.complex, ptr %21, i32 0, i32 1
  store float 0.000000e+00, ptr %42, align 4, !tbaa !12
  br label %80

43:                                               ; preds = %7
  %44 = load ptr, ptr %9, align 8, !tbaa !5
  %45 = call <2 x float> @Cf(ptr noundef %44)
  store <2 x float> %45, ptr %24, align 4
  %46 = getelementptr inbounds { float, float }, ptr %24, i32 0, i32 0
  %47 = load float, ptr %46, align 4
  %48 = getelementptr inbounds { float, float }, ptr %24, i32 0, i32 1
  %49 = load float, ptr %48, align 4
  %50 = fneg float %49
  %51 = call ptr @_pCf(ptr noundef %19)
  %52 = getelementptr inbounds { float, float }, ptr %51, i32 0, i32 0
  %53 = getelementptr inbounds { float, float }, ptr %51, i32 0, i32 1
  store float %47, ptr %52, align 4
  store float %50, ptr %53, align 4
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  %55 = call <2 x float> @Cf(ptr noundef %54)
  store <2 x float> %55, ptr %25, align 4
  %56 = getelementptr inbounds { float, float }, ptr %25, i32 0, i32 0
  %57 = load float, ptr %56, align 4
  %58 = getelementptr inbounds { float, float }, ptr %25, i32 0, i32 1
  %59 = load float, ptr %58, align 4
  %60 = getelementptr inbounds { float, float }, ptr %26, i32 0, i32 0
  %61 = getelementptr inbounds { float, float }, ptr %26, i32 0, i32 1
  store float %57, ptr %60, align 4
  store float %59, ptr %61, align 4
  %62 = load <2 x float>, ptr %26, align 4
  %63 = call float @cabsf(<2 x float> noundef %62) #6
  store float %63, ptr %15, align 4, !tbaa !13
  %64 = getelementptr inbounds %struct.complex, ptr %19, i32 0, i32 0
  %65 = load float, ptr %64, align 4, !tbaa !9
  %66 = load float, ptr %15, align 4, !tbaa !13
  %67 = fdiv float %65, %66
  %68 = getelementptr inbounds %struct.complex, ptr %18, i32 0, i32 0
  store float %67, ptr %68, align 4, !tbaa !9
  %69 = getelementptr inbounds %struct.complex, ptr %19, i32 0, i32 1
  %70 = load float, ptr %69, align 4, !tbaa !12
  %71 = load float, ptr %15, align 4, !tbaa !13
  %72 = fdiv float %70, %71
  %73 = getelementptr inbounds %struct.complex, ptr %18, i32 0, i32 1
  store float %72, ptr %73, align 4, !tbaa !12
  %74 = getelementptr inbounds %struct.complex, ptr %18, i32 0, i32 0
  %75 = load float, ptr %74, align 4, !tbaa !9
  %76 = getelementptr inbounds %struct.complex, ptr %21, i32 0, i32 0
  store float %75, ptr %76, align 4, !tbaa !9
  %77 = getelementptr inbounds %struct.complex, ptr %18, i32 0, i32 1
  %78 = load float, ptr %77, align 4, !tbaa !12
  %79 = getelementptr inbounds %struct.complex, ptr %21, i32 0, i32 1
  store float %78, ptr %79, align 4, !tbaa !12
  br label %80

80:                                               ; preds = %43, %40
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.complex, ptr %81, i32 0, i32 0
  %83 = load float, ptr %82, align 4, !tbaa !9
  store float %83, ptr %15, align 4, !tbaa !13
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  %85 = call <2 x float> @Cf(ptr noundef %84)
  store <2 x float> %85, ptr %27, align 4
  %86 = getelementptr inbounds { float, float }, ptr %27, i32 0, i32 0
  %87 = load float, ptr %86, align 4
  %88 = getelementptr inbounds { float, float }, ptr %27, i32 0, i32 1
  %89 = load float, ptr %88, align 4
  %90 = getelementptr inbounds { float, float }, ptr %28, i32 0, i32 0
  %91 = getelementptr inbounds { float, float }, ptr %28, i32 0, i32 1
  store float %87, ptr %90, align 4
  store float %89, ptr %91, align 4
  %92 = load <2 x float>, ptr %28, align 4
  %93 = call float @cabsf(<2 x float> noundef %92) #6
  store float %93, ptr %16, align 4, !tbaa !13
  %94 = load ptr, ptr %10, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.complex, ptr %94, i32 0, i32 0
  %96 = load float, ptr %95, align 4, !tbaa !9
  store float %96, ptr %17, align 4, !tbaa !13
  %97 = load ptr, ptr %11, align 8, !tbaa !5
  %98 = load ptr, ptr %12, align 8, !tbaa !5
  %99 = load ptr, ptr %13, align 8, !tbaa !5
  call void @slaev2_(ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %97, ptr noundef %98, ptr noundef %99, ptr noundef %20)
  %100 = load float, ptr %20, align 4, !tbaa !13
  %101 = getelementptr inbounds %struct.complex, ptr %21, i32 0, i32 0
  %102 = load float, ptr %101, align 4, !tbaa !9
  %103 = fmul float %100, %102
  %104 = getelementptr inbounds %struct.complex, ptr %18, i32 0, i32 0
  store float %103, ptr %104, align 4, !tbaa !9
  %105 = load float, ptr %20, align 4, !tbaa !13
  %106 = getelementptr inbounds %struct.complex, ptr %21, i32 0, i32 1
  %107 = load float, ptr %106, align 4, !tbaa !12
  %108 = fmul float %105, %107
  %109 = getelementptr inbounds %struct.complex, ptr %18, i32 0, i32 1
  store float %108, ptr %109, align 4, !tbaa !12
  %110 = getelementptr inbounds %struct.complex, ptr %18, i32 0, i32 0
  %111 = load float, ptr %110, align 4, !tbaa !9
  %112 = load ptr, ptr %14, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.complex, ptr %112, i32 0, i32 0
  store float %111, ptr %113, align 4, !tbaa !9
  %114 = getelementptr inbounds %struct.complex, ptr %18, i32 0, i32 1
  %115 = load float, ptr %114, align 4, !tbaa !12
  %116 = load ptr, ptr %14, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.complex, ptr %116, i32 0, i32 1
  store float %115, ptr %117, align 4, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nounwind
declare float @cabsf(<2 x float> noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @Cf(ptr noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @_pCf(ptr noundef) #4

declare void @slaev2_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #5

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"", !11, i64 0, !11, i64 4}
!11 = !{!"float", !7, i64 0}
!12 = !{!10, !11, i64 4}
!13 = !{!11, !11, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.complex = type { float, float }

; Function Attrs: nounwind uwtable
define dso_local void @claev2_(ptr nocapture noundef readonly %0, ptr noundef %1, ptr nocapture noundef readonly %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr nocapture noundef writeonly %6) local_unnamed_addr #0 {
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca %struct.complex, align 8
  %12 = alloca float, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  %13 = tail call <2 x float> @Cf(ptr noundef %1)
  %14 = tail call float @cabsf(<2 x float> noundef %13) #6
  %15 = fcmp oeq float %14, 0.000000e+00
  br i1 %15, label %27, label %16

16:                                               ; preds = %7
  %17 = tail call <2 x float> @Cf(ptr noundef %1)
  %.sroa.06.0.vec.extract = extractelement <2 x float> %17, i64 0
  %.sroa.06.4.vec.extract = extractelement <2 x float> %17, i64 1
  %18 = fneg float %.sroa.06.4.vec.extract
  %19 = call ptr @_pCf(ptr noundef nonnull %11)
  %20 = getelementptr inbounds i8, ptr %19, i64 4
  store float %.sroa.06.0.vec.extract, ptr %19, align 4
  store float %18, ptr %20, align 4
  %21 = call <2 x float> @Cf(ptr noundef %1)
  %22 = call float @cabsf(<2 x float> noundef %21) #6
  %23 = load <2 x float>, ptr %11, align 8, !tbaa !5
  %24 = insertelement <2 x float> poison, float %22, i64 0
  %25 = shufflevector <2 x float> %24, <2 x float> poison, <2 x i32> zeroinitializer
  %26 = fdiv <2 x float> %23, %25
  br label %27

27:                                               ; preds = %7, %16
  %28 = phi <2 x float> [ %26, %16 ], [ <float 1.000000e+00, float 0.000000e+00>, %7 ]
  %29 = load float, ptr %0, align 4, !tbaa !9
  store float %29, ptr %8, align 4, !tbaa !5
  %30 = call <2 x float> @Cf(ptr noundef %1)
  %31 = call float @cabsf(<2 x float> noundef %30) #6
  store float %31, ptr %9, align 4, !tbaa !5
  %32 = load float, ptr %2, align 4, !tbaa !9
  store float %32, ptr %10, align 4, !tbaa !5
  call void @slaev2_(ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef nonnull %12) #6
  %33 = load float, ptr %12, align 4, !tbaa !5
  %34 = insertelement <2 x float> poison, float %33, i64 0
  %35 = shufflevector <2 x float> %34, <2 x float> poison, <2 x i32> zeroinitializer
  %36 = fmul <2 x float> %28, %35
  store <2 x float> %36, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  ret void
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nounwind
declare float @cabsf(<2 x float> noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @Cf(ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @_pCf(ptr noundef) local_unnamed_addr #4

declare void @slaev2_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"", !6, i64 0, !6, i64 4}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass