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

; 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 { { double, double } }

@_ZZ6zher2_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 @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16), double noundef, double 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 @_ZSteqIdEbRKSt7complexIT_ES4_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z18get_compact_vectorISt7complexIdEEPT_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 @_Z6matrixISt7complexIdEEN5Eigen3MapINS2_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_6MatrixISt7complexIdELin1ELin1ELi0ELin1ELin1EEELi0ENS_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_6MatrixISt7complexIdELin1ELin1ELi0ELin1ELin1EEELi0ENS_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_opISt7complexIdEEENS_8DiagonalINS_3MapINS_6MatrixIS5_Lin1ELin1ELi0ELin1ELin1EEELi0ENS_11OuterStrideILin1EEEEELi0EEEEEE7setZeroEv(ptr noundef nonnull align 1 dereferenceable(1)) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local i32 @zher2_(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) #6 {
  %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 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca %"class.std::complex", align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca %"class.std::complex", align 8
  %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) #8
  %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) #8
  %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) #8
  %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 16, ptr %23) #8
  %38 = load ptr, ptr %13, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr align 8 %38, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  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) #8
  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) #8
  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 %193

99:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #8
  call void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %27, double noundef 0.000000e+00, double noundef 0.000000e+00)
  %100 = call noundef zeroext i1 @_ZSteqIdEbRKSt7complexIT_ES4_(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(16) %27)
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #8
  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 %193

102:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %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_vectorISt7complexIdEEPT_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) #8
  %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_vectorISt7complexIdEEPT_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) #8
  %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 @_ZZ6zher2_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 %192

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 @_ZZ6zher2_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 8 %31, ptr align 8 %23, i64 16, i1 false), !tbaa.struct !9
  %162 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 0
  %163 = load double, ptr %162, align 8
  %164 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 1
  %165 = load double, ptr %164, align 8
  call void %154(i32 noundef %156, ptr noundef %157, i32 noundef %159, ptr noundef %160, ptr noundef %161, double %163, double %165)
  call void @llvm.lifetime.start.p0(i64 56, ptr %32) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr %33) #8
  call void @llvm.lifetime.start.p0(i64 40, ptr %34) #8
  %166 = load ptr, ptr %22, align 8, !tbaa !5
  %167 = load ptr, ptr %12, align 8, !tbaa !5
  %168 = load i32, ptr %167, align 4, !tbaa !11
  %169 = load ptr, ptr %12, align 8, !tbaa !5
  %170 = load i32, ptr %169, align 4, !tbaa !11
  %171 = load ptr, ptr %19, align 8, !tbaa !5
  %172 = load i32, ptr %171, align 4, !tbaa !11
  call void @_Z6matrixISt7complexIdEEN5Eigen3MapINS2_6MatrixIT_Lin1ELin1ELi0ELin1ELin1EEELi0ENS2_11OuterStrideILin1EEEEEPS5_iii(ptr dead_on_unwind writable sret(%"class.Eigen::Map.204") align 8 %34, ptr noundef %166, i32 noundef %168, i32 noundef %170, i32 noundef %172)
  call void @_ZN5Eigen10MatrixBaseINS_3MapINS_6MatrixISt7complexIdELin1ELin1ELi0ELin1ELin1EEELi0ENS_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_6MatrixISt7complexIdELin1ELin1ELi0ELin1ELin1EEELi0ENS_11OuterStrideILin1EEEEELi0EEEE4imagEv(ptr dead_on_unwind writable sret(%"class.Eigen::CwiseUnaryView") align 8 %32, ptr noundef nonnull align 1 dereferenceable(1) %33)
  %173 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZN5Eigen9DenseBaseINS_14CwiseUnaryViewINS_8internal18scalar_imag_ref_opISt7complexIdEEENS_8DiagonalINS_3MapINS_6MatrixIS5_Lin1ELin1ELi0ELin1ELin1EEELi0ENS_11OuterStrideILin1EEEEELi0EEEEEE7setZeroEv(ptr noundef nonnull align 1 dereferenceable(1) %32)
  call void @llvm.lifetime.end.p0(i64 40, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %32) #8
  %174 = load ptr, ptr %28, align 8, !tbaa !5
  %175 = load ptr, ptr %20, align 8, !tbaa !5
  %176 = icmp ne ptr %174, %175
  br i1 %176, label %177, label %182

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

180:                                              ; preds = %177
  call void @_ZdaPv(ptr noundef %178) #9
  br label %181

181:                                              ; preds = %180, %177
  br label %182

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

186:                                              ; preds = %182
  %187 = load ptr, ptr %29, align 8, !tbaa !5
  %188 = icmp eq ptr %187, null
  br i1 %188, label %190, label %189

189:                                              ; preds = %186
  call void @_ZdaPv(ptr noundef %187) #9
  br label %190

190:                                              ; preds = %189, %186
  br label %191

191:                                              ; preds = %190, %182
  store i32 1, ptr %10, align 4
  store i32 1, ptr %26, align 4
  br label %192

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

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

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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 0, i64 16, !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 { { double, double } }

@_ZZ6zher2_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 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: 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 @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16), double noundef, double 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)) local_unnamed_addr #3

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6matrixISt7complexIdEEN5Eigen3MapINS2_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 #6

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local i32 @zher2_(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 #6 {
  %10 = alloca %"class.std::complex", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::complex", align 8
  %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 16, ptr nonnull %10) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %2, i64 16, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %17 = load i8, ptr %0, align 1, !tbaa !6
  switch i8 %17, label %18 [
    i8 85, label %.critedge
    i8 117, label %.critedge
    i8 76, label %.critedge
    i8 108, label %.critedge
  ]

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

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

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

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

25:                                               ; preds = %22
  store i32 5, ptr %11, align 4, !tbaa !9
  br label %.thread

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

29:                                               ; preds = %26
  store i32 7, ptr %11, align 4, !tbaa !9
  br label %.thread

30:                                               ; preds = %26
  %31 = load i32, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  store i32 1, ptr %12, align 4, !tbaa !9
  %32 = 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)
  %33 = load i32, ptr %32, align 4, !tbaa !9
  %34 = icmp slt i32 %31, %33
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  br i1 %34, label %35, label %37

35:                                               ; preds = %30
  store i32 9, ptr %11, align 4, !tbaa !9
  br label %.thread

.thread:                                          ; preds = %18, %25, %35, %29, %21
  %36 = call i32 @xerbla_(ptr noundef nonnull @.str.11, ptr noundef nonnull %11, i32 noundef 6)
  br label %62

37:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #8
  call void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %13, double noundef 0.000000e+00, double noundef 0.000000e+00)
  %38 = call noundef zeroext i1 @_ZSteqIdEbRKSt7complexIT_ES4_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %13)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #8
  br i1 %38, label %62, label %39

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

47:                                               ; preds = %39
  br label %select.unfold

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

select.unfold:                                    ; preds = %39, %39, %select.unfold.fold.split, %47
  %.ph = phi i64 [ 1, %47 ], [ 0, %39 ], [ 0, %39 ], [ 1, %select.unfold.fold.split ]
  %48 = getelementptr inbounds [2 x ptr], ptr @_ZZ6zher2_E4func, i64 0, i64 %.ph
  %49 = load ptr, ptr %48, align 8, !tbaa !11
  %50 = icmp eq ptr %49, null
  br i1 %50, label %62, label %51

51:                                               ; preds = %select.unfold
  %52 = load i32, ptr %1, align 4, !tbaa !9
  %53 = load i32, ptr %8, align 4, !tbaa !9
  %.sroa.0.0.copyload = load double, ptr %10, align 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !6
  call void %49(i32 noundef %52, ptr noundef %7, i32 noundef %53, ptr noundef %42, ptr noundef %45, double %.sroa.0.0.copyload, double %.sroa.2.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
  %54 = load i32, ptr %1, align 4, !tbaa !9
  %55 = load i32, ptr %8, align 4, !tbaa !9
  call void @_Z6matrixISt7complexIdEEN5Eigen3MapINS2_6MatrixIT_Lin1ELin1ELi0ELin1ELin1EEELi0ENS2_11OuterStrideILin1EEEEEPS5_iii(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::Map.204") align 8 %16, ptr noundef %7, i32 noundef %54, i32 noundef %54, i32 noundef %55)
  call void @_ZN5Eigen10MatrixBaseINS_3MapINS_6MatrixISt7complexIdELin1ELin1ELi0ELin1ELin1EEELi0ENS_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_6MatrixISt7complexIdELin1ELin1ELi0ELin1ELin1EEELi0ENS_11OuterStrideILin1EEEEELi0EEEE4imagEv(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::CwiseUnaryView") align 8 %14, ptr noundef nonnull align 1 dereferenceable(1) %15)
  %56 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZN5Eigen9DenseBaseINS_14CwiseUnaryViewINS_8internal18scalar_imag_ref_opISt7complexIdEEENS_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 %42, %3
  %57 = icmp eq ptr %42, null
  %or.cond = or i1 %.not47, %57
  br i1 %or.cond, label %59, label %58

58:                                               ; preds = %51
  call void @_ZdaPv(ptr noundef nonnull %42) #9
  br label %59

59:                                               ; preds = %58, %51
  %.not48 = icmp eq ptr %45, %5
  %60 = icmp eq ptr %45, null
  %or.cond49 = or i1 %.not48, %60
  br i1 %or.cond49, label %62, label %61

61:                                               ; preds = %59
  call void @_ZdaPv(ptr noundef nonnull %45) #9
  br label %62

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

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


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