; LLVM IR from o0o0o0o0o0o0o/image-processing-from-scratch :: ImageMatting/Eigen/blas (complex_single)

; 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"

%"class.Eigen::Map.204" = type { %"class.Eigen::MapBase.205", %"class.Eigen::OuterStride" }
%"class.Eigen::MapBase.205" = type { %"class.Eigen::MapBase.206" }
%"class.Eigen::MapBase.206" = type { ptr, %"class.Eigen::internal::variable_if_dynamic", %"class.Eigen::internal::variable_if_dynamic" }
%"class.Eigen::internal::variable_if_dynamic" = type { i64 }
%"class.Eigen::OuterStride" = type { %"class.Eigen::Stride.base", [7 x i8] }
%"class.Eigen::Stride.base" = type <{ %"class.Eigen::internal::variable_if_dynamic", i8 }>
%"class.Eigen::Diagonal" = type <{ %"class.Eigen::Map.204", [8 x i8] }>
%"class.Eigen::CwiseUnaryView" = type { %"class.Eigen::Diagonal", [8 x i8] }
%"class.std::complex" = type { { float, float } }

@_ZZ6cher2_E4func = external hidden constant [2 x ptr], align 16
@.str.11 = external hidden unnamed_addr constant [7 x i8], align 1

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt7complexIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

declare i32 @xerbla_(ptr noundef, ptr noundef, i32 noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSteqIfEbRKSt7complexIT_ES4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z18get_compact_vectorISt7complexIfEEPT_S3_ii(ptr noundef, i32 noundef, i32 noundef) #6

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6matrixISt7complexIfEEN5Eigen3MapINS2_6MatrixIT_Lin1ELin1ELi0ELin1ELin1EEELi0ENS2_11OuterStrideILin1EEEEEPS5_iii(ptr dead_on_unwind noalias writable sret(%"class.Eigen::Map.204") align 8, ptr noundef, i32 noundef, i32 noundef, i32 noundef) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Eigen10MatrixBaseINS_3MapINS_6MatrixISt7complexIfELin1ELin1ELi0ELin1ELin1EEELi0ENS_11OuterStrideILin1EEEEEE8diagonalEv(ptr dead_on_unwind noalias writable sret(%"class.Eigen::Diagonal") align 8, ptr noundef nonnull align 1 dereferenceable(1)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Eigen10MatrixBaseINS_8DiagonalINS_3MapINS_6MatrixISt7complexIfELin1ELin1ELi0ELin1ELin1EEELi0ENS_11OuterStrideILin1EEEEELi0EEEE4imagEv(ptr dead_on_unwind noalias writable sret(%"class.Eigen::CwiseUnaryView") align 8, ptr noundef nonnull align 1 dereferenceable(1)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(49) ptr @_ZN5Eigen9DenseBaseINS_14CwiseUnaryViewINS_8internal18scalar_imag_ref_opISt7complexIfEEENS_8DiagonalINS_3MapINS_6MatrixIS5_Lin1ELin1ELi0ELin1ELin1EEELi0ENS_11OuterStrideILin1EEEEELi0EEEEEE7setZeroEv(ptr noundef nonnull align 1 dereferenceable(1)) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local i32 @cher2_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) #8 {
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca %"class.std::complex", align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca %"class.std::complex", align 4
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca %"class.std::complex", align 4
  %32 = alloca %"class.Eigen::CwiseUnaryView", align 8
  %33 = alloca %"class.Eigen::Diagonal", align 8
  %34 = alloca %"class.Eigen::Map.204", align 8
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store ptr %2, ptr %13, align 8, !tbaa !5
  store ptr %3, ptr %14, align 8, !tbaa !5
  store ptr %4, ptr %15, align 8, !tbaa !5
  store ptr %5, ptr %16, align 8, !tbaa !5
  store ptr %6, ptr %17, align 8, !tbaa !5
  store ptr %7, ptr %18, align 8, !tbaa !5
  store ptr %8, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  %35 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %35, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  %36 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %36, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  %37 = load ptr, ptr %18, align 8, !tbaa !5
  store ptr %37, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #9
  %38 = load ptr, ptr %13, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 4 %38, i64 8, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  store i32 0, ptr %24, align 4, !tbaa !11
  %39 = load ptr, ptr %11, align 8, !tbaa !5
  %40 = load i8, ptr %39, align 1, !tbaa !10
  %41 = sext i8 %40 to i32
  %42 = icmp eq i32 %41, 85
  br i1 %42, label %48, label %43

43:                                               ; preds = %9
  %44 = load ptr, ptr %11, align 8, !tbaa !5
  %45 = load i8, ptr %44, align 1, !tbaa !10
  %46 = sext i8 %45 to i32
  %47 = icmp eq i32 %46, 117
  br i1 %47, label %48, label %49

48:                                               ; preds = %43, %9
  br label %63

49:                                               ; preds = %43
  %50 = load ptr, ptr %11, align 8, !tbaa !5
  %51 = load i8, ptr %50, align 1, !tbaa !10
  %52 = sext i8 %51 to i32
  %53 = icmp eq i32 %52, 76
  br i1 %53, label %59, label %54

54:                                               ; preds = %49
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = load i8, ptr %55, align 1, !tbaa !10
  %57 = sext i8 %56 to i32
  %58 = icmp eq i32 %57, 108
  br label %59

59:                                               ; preds = %54, %49
  %60 = phi i1 [ true, %49 ], [ %58, %54 ]
  %61 = zext i1 %60 to i64
  %62 = select i1 %60, i32 1, i32 255
  br label %63

63:                                               ; preds = %59, %48
  %64 = phi i32 [ 0, %48 ], [ %62, %59 ]
  %65 = icmp eq i32 %64, 255
  br i1 %65, label %66, label %67

66:                                               ; preds = %63
  store i32 1, ptr %24, align 4, !tbaa !11
  br label %94

67:                                               ; preds = %63
  %68 = load ptr, ptr %12, align 8, !tbaa !5
  %69 = load i32, ptr %68, align 4, !tbaa !11
  %70 = icmp slt i32 %69, 0
  br i1 %70, label %71, label %72

71:                                               ; preds = %67
  store i32 2, ptr %24, align 4, !tbaa !11
  br label %93

72:                                               ; preds = %67
  %73 = load ptr, ptr %15, align 8, !tbaa !5
  %74 = load i32, ptr %73, align 4, !tbaa !11
  %75 = icmp eq i32 %74, 0
  br i1 %75, label %76, label %77

76:                                               ; preds = %72
  store i32 5, ptr %24, align 4, !tbaa !11
  br label %92

77:                                               ; preds = %72
  %78 = load ptr, ptr %17, align 8, !tbaa !5
  %79 = load i32, ptr %78, align 4, !tbaa !11
  %80 = icmp eq i32 %79, 0
  br i1 %80, label %81, label %82

81:                                               ; preds = %77
  store i32 7, ptr %24, align 4, !tbaa !11
  br label %91

82:                                               ; preds = %77
  %83 = load ptr, ptr %19, align 8, !tbaa !5
  %84 = load i32, ptr %83, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  store i32 1, ptr %25, align 4, !tbaa !11
  %85 = load ptr, ptr %12, align 8, !tbaa !5
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(4) %85)
  %87 = load i32, ptr %86, align 4, !tbaa !11
  %88 = icmp slt i32 %84, %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  br i1 %88, label %89, label %90

89:                                               ; preds = %82
  store i32 9, ptr %24, align 4, !tbaa !11
  br label %90

90:                                               ; preds = %89, %82
  br label %91

91:                                               ; preds = %90, %81
  br label %92

92:                                               ; preds = %91, %76
  br label %93

93:                                               ; preds = %92, %71
  br label %94

94:                                               ; preds = %93, %66
  %95 = load i32, ptr %24, align 4, !tbaa !11
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %97, label %99

97:                                               ; preds = %94
  %98 = call i32 @xerbla_(ptr noundef @.str.11, ptr noundef %24, i32 noundef 6)
  store i32 %98, ptr %10, align 4
  store i32 1, ptr %26, align 4
  br label %191

99:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #9
  call void @_ZNSt7complexIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %27, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %100 = call noundef zeroext i1 @_ZSteqIfEbRKSt7complexIT_ES4_(ptr noundef nonnull align 4 dereferenceable(8) %23, ptr noundef nonnull align 4 dereferenceable(8) %27)
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  br i1 %100, label %101, label %102

101:                                              ; preds = %99
  store i32 1, ptr %10, align 4
  store i32 1, ptr %26, align 4
  br label %191

102:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  %103 = load ptr, ptr %20, align 8, !tbaa !5
  %104 = load ptr, ptr %12, align 8, !tbaa !5
  %105 = load i32, ptr %104, align 4, !tbaa !11
  %106 = load ptr, ptr %15, align 8, !tbaa !5
  %107 = load i32, ptr %106, align 4, !tbaa !11
  %108 = call noundef ptr @_Z18get_compact_vectorISt7complexIfEEPT_S3_ii(ptr noundef %103, i32 noundef %105, i32 noundef %107)
  store ptr %108, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #9
  %109 = load ptr, ptr %21, align 8, !tbaa !5
  %110 = load ptr, ptr %12, align 8, !tbaa !5
  %111 = load i32, ptr %110, align 4, !tbaa !11
  %112 = load ptr, ptr %17, align 8, !tbaa !5
  %113 = load i32, ptr %112, align 4, !tbaa !11
  %114 = call noundef ptr @_Z18get_compact_vectorISt7complexIfEEPT_S3_ii(ptr noundef %109, i32 noundef %111, i32 noundef %113)
  store ptr %114, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #9
  %115 = load ptr, ptr %11, align 8, !tbaa !5
  %116 = load i8, ptr %115, align 1, !tbaa !10
  %117 = sext i8 %116 to i32
  %118 = icmp eq i32 %117, 85
  br i1 %118, label %124, label %119

119:                                              ; preds = %102
  %120 = load ptr, ptr %11, align 8, !tbaa !5
  %121 = load i8, ptr %120, align 1, !tbaa !10
  %122 = sext i8 %121 to i32
  %123 = icmp eq i32 %122, 117
  br i1 %123, label %124, label %125

124:                                              ; preds = %119, %102
  br label %139

125:                                              ; preds = %119
  %126 = load ptr, ptr %11, align 8, !tbaa !5
  %127 = load i8, ptr %126, align 1, !tbaa !10
  %128 = sext i8 %127 to i32
  %129 = icmp eq i32 %128, 76
  br i1 %129, label %135, label %130

130:                                              ; preds = %125
  %131 = load ptr, ptr %11, align 8, !tbaa !5
  %132 = load i8, ptr %131, align 1, !tbaa !10
  %133 = sext i8 %132 to i32
  %134 = icmp eq i32 %133, 108
  br label %135

135:                                              ; preds = %130, %125
  %136 = phi i1 [ true, %125 ], [ %134, %130 ]
  %137 = zext i1 %136 to i64
  %138 = select i1 %136, i32 1, i32 255
  br label %139

139:                                              ; preds = %135, %124
  %140 = phi i32 [ 0, %124 ], [ %138, %135 ]
  store i32 %140, ptr %30, align 4, !tbaa !11
  %141 = load i32, ptr %30, align 4, !tbaa !11
  %142 = icmp sge i32 %141, 2
  br i1 %142, label %149, label %143

143:                                              ; preds = %139
  %144 = load i32, ptr %30, align 4, !tbaa !11
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [2 x ptr], ptr @_ZZ6cher2_E4func, i64 0, i64 %145
  %147 = load ptr, ptr %146, align 8, !tbaa !5
  %148 = icmp eq ptr %147, null
  br i1 %148, label %149, label %150

149:                                              ; preds = %143, %139
  store i32 0, ptr %10, align 4
  store i32 1, ptr %26, align 4
  br label %190

150:                                              ; preds = %143
  %151 = load i32, ptr %30, align 4, !tbaa !11
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [2 x ptr], ptr @_ZZ6cher2_E4func, i64 0, i64 %152
  %154 = load ptr, ptr %153, align 8, !tbaa !5
  %155 = load ptr, ptr %12, align 8, !tbaa !5
  %156 = load i32, ptr %155, align 4, !tbaa !11
  %157 = load ptr, ptr %22, align 8, !tbaa !5
  %158 = load ptr, ptr %19, align 8, !tbaa !5
  %159 = load i32, ptr %158, align 4, !tbaa !11
  %160 = load ptr, ptr %28, align 8, !tbaa !5
  %161 = load ptr, ptr %29, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %31, ptr align 4 %23, i64 8, i1 false), !tbaa.struct !9
  %162 = getelementptr inbounds %"class.std::complex", ptr %31, i32 0, i32 0
  %163 = load <2 x float>, ptr %162, align 4
  call void %154(i32 noundef %156, ptr noundef %157, i32 noundef %159, ptr noundef %160, ptr noundef %161, <2 x float> %163)
  call void @llvm.lifetime.start.p0(i64 56, ptr %32) #9
  call void @llvm.lifetime.start.p0(i64 48, ptr %33) #9
  call void @llvm.lifetime.start.p0(i64 40, ptr %34) #9
  %164 = load ptr, ptr %22, align 8, !tbaa !5
  %165 = load ptr, ptr %12, align 8, !tbaa !5
  %166 = load i32, ptr %165, align 4, !tbaa !11
  %167 = load ptr, ptr %12, align 8, !tbaa !5
  %168 = load i32, ptr %167, align 4, !tbaa !11
  %169 = load ptr, ptr %19, align 8, !tbaa !5
  %170 = load i32, ptr %169, align 4, !tbaa !11
  call void @_Z6matrixISt7complexIfEEN5Eigen3MapINS2_6MatrixIT_Lin1ELin1ELi0ELin1ELin1EEELi0ENS2_11OuterStrideILin1EEEEEPS5_iii(ptr dead_on_unwind writable sret(%"class.Eigen::Map.204") align 8 %34, ptr noundef %164, i32 noundef %166, i32 noundef %168, i32 noundef %170)
  call void @_ZN5Eigen10MatrixBaseINS_3MapINS_6MatrixISt7complexIfELin1ELin1ELi0ELin1ELin1EEELi0ENS_11OuterStrideILin1EEEEEE8diagonalEv(ptr dead_on_unwind writable sret(%"class.Eigen::Diagonal") align 8 %33, ptr noundef nonnull align 1 dereferenceable(1) %34)
  call void @_ZN5Eigen10MatrixBaseINS_8DiagonalINS_3MapINS_6MatrixISt7complexIfELin1ELin1ELi0ELin1ELin1EEELi0ENS_11OuterStrideILin1EEEEELi0EEEE4imagEv(ptr dead_on_unwind writable sret(%"class.Eigen::CwiseUnaryView") align 8 %32, ptr noundef nonnull align 1 dereferenceable(1) %33)
  %171 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZN5Eigen9DenseBaseINS_14CwiseUnaryViewINS_8internal18scalar_imag_ref_opISt7complexIfEEENS_8DiagonalINS_3MapINS_6MatrixIS5_Lin1ELin1ELi0ELin1ELin1EEELi0ENS_11OuterStrideILin1EEEEELi0EEEEEE7setZeroEv(ptr noundef nonnull align 1 dereferenceable(1) %32)
  call void @llvm.lifetime.end.p0(i64 40, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr %33) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %32) #9
  %172 = load ptr, ptr %28, align 8, !tbaa !5
  %173 = load ptr, ptr %20, align 8, !tbaa !5
  %174 = icmp ne ptr %172, %173
  br i1 %174, label %175, label %180

175:                                              ; preds = %150
  %176 = load ptr, ptr %28, align 8, !tbaa !5
  %177 = icmp eq ptr %176, null
  br i1 %177, label %179, label %178

178:                                              ; preds = %175
  call void @_ZdaPv(ptr noundef %176) #10
  br label %179

179:                                              ; preds = %178, %175
  br label %180

180:                                              ; preds = %179, %150
  %181 = load ptr, ptr %29, align 8, !tbaa !5
  %182 = load ptr, ptr %21, align 8, !tbaa !5
  %183 = icmp ne ptr %181, %182
  br i1 %183, label %184, label %189

184:                                              ; preds = %180
  %185 = load ptr, ptr %29, align 8, !tbaa !5
  %186 = icmp eq ptr %185, null
  br i1 %186, label %188, label %187

187:                                              ; preds = %184
  call void @_ZdaPv(ptr noundef %185) #10
  br label %188

188:                                              ; preds = %187, %184
  br label %189

189:                                              ; preds = %188, %180
  store i32 1, ptr %10, align 4
  store i32 1, ptr %26, align 4
  br label %190

190:                                              ; preds = %189, %149
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  br label %191

191:                                              ; preds = %190, %101, %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  %192 = load i32, ptr %10, align 4
  ret i32 %192
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 #3 = { inlinehint mustprogress 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 #4 = { "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 = { inlinehint mustprogress 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 #6 = { mustprogress 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 #7 = { nobuiltin 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 #8 = { mustprogress 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 #9 = { nounwind }
attributes #10 = { builtin 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++ TBAA"}
!9 = !{i64 0, i64 8, !10}
!10 = !{!7, !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, 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"

%"class.Eigen::Map.204" = type { %"class.Eigen::MapBase.205", %"class.Eigen::OuterStride" }
%"class.Eigen::MapBase.205" = type { %"class.Eigen::MapBase.206" }
%"class.Eigen::MapBase.206" = type { ptr, %"class.Eigen::internal::variable_if_dynamic", %"class.Eigen::internal::variable_if_dynamic" }
%"class.Eigen::internal::variable_if_dynamic" = type { i64 }
%"class.Eigen::OuterStride" = type { %"class.Eigen::Stride.base", [7 x i8] }
%"class.Eigen::Stride.base" = type <{ %"class.Eigen::internal::variable_if_dynamic", i8 }>
%"class.Eigen::Diagonal" = type <{ %"class.Eigen::Map.204", [8 x i8] }>
%"class.Eigen::CwiseUnaryView" = type { %"class.Eigen::Diagonal", [8 x i8] }
%"class.std::complex" = type { { float, float } }

@_ZZ6cher2_E4func = external hidden local_unnamed_addr constant [2 x ptr], align 16
@.str.11 = external hidden unnamed_addr constant [7 x i8], align 1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt7complexIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

declare i32 @xerbla_(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSteqIfEbRKSt7complexIT_ES4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z18get_compact_vectorISt7complexIfEEPT_S3_ii(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6matrixISt7complexIfEEN5Eigen3MapINS2_6MatrixIT_Lin1ELin1ELi0ELin1ELin1EEELi0ENS2_11OuterStrideILin1EEEEEPS5_iii(ptr dead_on_unwind noalias writable sret(%"class.Eigen::Map.204") align 8, ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Eigen10MatrixBaseINS_3MapINS_6MatrixISt7complexIfELin1ELin1ELi0ELin1ELin1EEELi0ENS_11OuterStrideILin1EEEEEE8diagonalEv(ptr dead_on_unwind noalias writable sret(%"class.Eigen::Diagonal") align 8, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Eigen10MatrixBaseINS_8DiagonalINS_3MapINS_6MatrixISt7complexIfELin1ELin1ELi0ELin1ELin1EEELi0ENS_11OuterStrideILin1EEEEELi0EEEE4imagEv(ptr dead_on_unwind noalias writable sret(%"class.Eigen::CwiseUnaryView") align 8, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(49) ptr @_ZN5Eigen9DenseBaseINS_14CwiseUnaryViewINS_8internal18scalar_imag_ref_opISt7complexIfEEENS_8DiagonalINS_3MapINS_6MatrixIS5_Lin1ELin1ELi0ELin1ELin1EEELi0ENS_11OuterStrideILin1EEEEELi0EEEEEE7setZeroEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local i32 @cher2_(ptr nocapture noundef readonly %0, ptr noundef %1, ptr nocapture noundef readonly %2, ptr noundef %3, ptr nocapture noundef readonly %4, ptr noundef %5, ptr nocapture noundef readonly %6, ptr noundef %7, ptr nocapture noundef readonly %8) local_unnamed_addr #7 {
  %10 = alloca %"class.std::complex", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::complex", align 4
  %14 = alloca %"class.Eigen::CwiseUnaryView", align 8
  %15 = alloca %"class.Eigen::Diagonal", align 8
  %16 = alloca %"class.Eigen::Map.204", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  %17 = load i64, ptr %2, align 4, !tbaa !5
  store i64 %17, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %18 = load i8, ptr %0, align 1, !tbaa !5
  switch i8 %18, label %19 [
    i8 85, label %.critedge
    i8 117, label %.critedge
    i8 76, label %.critedge
    i8 108, label %.critedge
  ]

19:                                               ; preds = %9
  store i32 1, ptr %11, align 4, !tbaa !8
  br label %.thread

.critedge:                                        ; preds = %9, %9, %9, %9
  %20 = load i32, ptr %1, align 4, !tbaa !8
  %21 = icmp slt i32 %20, 0
  br i1 %21, label %22, label %23

22:                                               ; preds = %.critedge
  store i32 2, ptr %11, align 4, !tbaa !8
  br label %.thread

23:                                               ; preds = %.critedge
  %24 = load i32, ptr %4, align 4, !tbaa !8
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %26, label %27

26:                                               ; preds = %23
  store i32 5, ptr %11, align 4, !tbaa !8
  br label %.thread

27:                                               ; preds = %23
  %28 = load i32, ptr %6, align 4, !tbaa !8
  %29 = icmp eq i32 %28, 0
  br i1 %29, label %30, label %31

30:                                               ; preds = %27
  store i32 7, ptr %11, align 4, !tbaa !8
  br label %.thread

31:                                               ; preds = %27
  %32 = load i32, ptr %8, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  store i32 1, ptr %12, align 4, !tbaa !8
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %34 = load i32, ptr %33, align 4, !tbaa !8
  %35 = icmp slt i32 %32, %34
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  br i1 %35, label %36, label %38

36:                                               ; preds = %31
  store i32 9, ptr %11, align 4, !tbaa !8
  br label %.thread

.thread:                                          ; preds = %19, %26, %36, %30, %22
  %37 = call i32 @xerbla_(ptr noundef nonnull @.str.11, ptr noundef nonnull %11, i32 noundef 6)
  br label %63

38:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #8
  call void @_ZNSt7complexIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %13, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %39 = call noundef zeroext i1 @_ZSteqIfEbRKSt7complexIT_ES4_(ptr noundef nonnull align 4 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(8) %13)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  br i1 %39, label %63, label %40

40:                                               ; preds = %38
  %41 = load i32, ptr %1, align 4, !tbaa !8
  %42 = load i32, ptr %4, align 4, !tbaa !8
  %43 = call noundef ptr @_Z18get_compact_vectorISt7complexIfEEPT_S3_ii(ptr noundef %3, i32 noundef %41, i32 noundef %42)
  %44 = load i32, ptr %1, align 4, !tbaa !8
  %45 = load i32, ptr %6, align 4, !tbaa !8
  %46 = call noundef ptr @_Z18get_compact_vectorISt7complexIfEEPT_S3_ii(ptr noundef %5, i32 noundef %44, i32 noundef %45)
  %47 = load i8, ptr %0, align 1, !tbaa !5
  switch i8 %47, label %63 [
    i8 85, label %select.unfold
    i8 117, label %select.unfold
    i8 76, label %48
    i8 108, label %select.unfold.fold.split
  ]

48:                                               ; preds = %40
  br label %select.unfold

select.unfold.fold.split:                         ; preds = %40
  br label %select.unfold

select.unfold:                                    ; preds = %40, %40, %select.unfold.fold.split, %48
  %.ph = phi i64 [ 1, %48 ], [ 0, %40 ], [ 0, %40 ], [ 1, %select.unfold.fold.split ]
  %49 = getelementptr inbounds [2 x ptr], ptr @_ZZ6cher2_E4func, i64 0, i64 %.ph
  %50 = load ptr, ptr %49, align 8, !tbaa !10
  %51 = icmp eq ptr %50, null
  br i1 %51, label %63, label %52

52:                                               ; preds = %select.unfold
  %53 = load i32, ptr %1, align 4, !tbaa !8
  %54 = load i32, ptr %8, align 4, !tbaa !8
  %.sroa.0.0.copyload = load <2 x float>, ptr %10, align 8, !tbaa !5
  call void %50(i32 noundef %53, ptr noundef %7, i32 noundef %54, ptr noundef %43, ptr noundef %46, <2 x float> %.sroa.0.0.copyload)
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %14) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %15) #8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %16) #8
  %55 = load i32, ptr %1, align 4, !tbaa !8
  %56 = load i32, ptr %8, align 4, !tbaa !8
  call void @_Z6matrixISt7complexIfEEN5Eigen3MapINS2_6MatrixIT_Lin1ELin1ELi0ELin1ELin1EEELi0ENS2_11OuterStrideILin1EEEEEPS5_iii(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::Map.204") align 8 %16, ptr noundef %7, i32 noundef %55, i32 noundef %55, i32 noundef %56)
  call void @_ZN5Eigen10MatrixBaseINS_3MapINS_6MatrixISt7complexIfELin1ELin1ELi0ELin1ELin1EEELi0ENS_11OuterStrideILin1EEEEEE8diagonalEv(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::Diagonal") align 8 %15, ptr noundef nonnull align 1 dereferenceable(1) %16)
  call void @_ZN5Eigen10MatrixBaseINS_8DiagonalINS_3MapINS_6MatrixISt7complexIfELin1ELin1ELi0ELin1ELin1EEELi0ENS_11OuterStrideILin1EEEEELi0EEEE4imagEv(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::CwiseUnaryView") align 8 %14, ptr noundef nonnull align 1 dereferenceable(1) %15)
  %57 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZN5Eigen9DenseBaseINS_14CwiseUnaryViewINS_8internal18scalar_imag_ref_opISt7complexIfEEENS_8DiagonalINS_3MapINS_6MatrixIS5_Lin1ELin1ELi0ELin1ELin1EEELi0ENS_11OuterStrideILin1EEEEELi0EEEEEE7setZeroEv(ptr noundef nonnull align 1 dereferenceable(1) %14)
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %14) #8
  %.not47 = icmp eq ptr %43, %3
  %58 = icmp eq ptr %43, null
  %or.cond = or i1 %.not47, %58
  br i1 %or.cond, label %60, label %59

59:                                               ; preds = %52
  call void @_ZdaPv(ptr noundef nonnull %43) #9
  br label %60

60:                                               ; preds = %59, %52
  %.not48 = icmp eq ptr %46, %5
  %61 = icmp eq ptr %46, null
  %or.cond49 = or i1 %.not48, %61
  br i1 %or.cond49, label %63, label %62

62:                                               ; preds = %60
  call void @_ZdaPv(ptr noundef nonnull %46) #9
  br label %63

63:                                               ; preds = %40, %select.unfold, %62, %60, %38, %.thread
  %.1 = phi i32 [ %37, %.thread ], [ 1, %38 ], [ 0, %select.unfold ], [ 1, %62 ], [ 1, %60 ], [ 0, %40 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  ret i32 %.1
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 #2 = { inlinehint mustprogress 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 #3 = { "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 mustprogress 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 = { mustprogress 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 #6 = { nobuiltin 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 #7 = { mustprogress 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 #8 = { nounwind }
attributes #9 = { builtin 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !6, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass