; LLVM IR from o0o0o0o0o0o0o/image-processing-from-scratch :: ImageMatting/Eigen/blas (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.9" = type { %"class.Eigen::MapBase.base.19", [7 x i8] }
%"class.Eigen::MapBase.base.19" = type { %"class.Eigen::MapBase.base.18" }
%"class.Eigen::MapBase.base.18" = type <{ ptr, %"class.Eigen::internal::variable_if_dynamic", i8 }>
%"class.Eigen::internal::variable_if_dynamic" = type { i64 }

@_ZZ6dsymv_E4func = external hidden constant [2 x ptr], align 16
@.str.7 = 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: mustprogress uwtable
declare dso_local void @_Z11make_vectorIdEN5Eigen3MapINS0_6MatrixIT_Lin1ELi1ELi0ELin1ELi1EEELi0ENS0_6StrideILi0ELi0EEEEEPS3_i(ptr dead_on_unwind noalias writable sret(%"class.Eigen::Map.9") align 8, ptr noundef, i32 noundef) #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(19) ptr @_ZN5Eigen9DenseBaseINS_3MapINS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEELi0ENS_6StrideILi0ELi0EEEEEEmLERKd(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(8)) #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: mustprogress uwtable
declare dso_local noundef ptr @_Z18get_compact_vectorIKdEPT_S2_ii(ptr noundef, i32 noundef, i32 noundef) #1

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local i32 @dsymv_(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, ptr noundef %9) #1 {
  %11 = alloca i32, align 4
  %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 ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca %"class.Eigen::Map.9", align 8
  %33 = alloca %"class.Eigen::Map.9", align 8
  %34 = alloca i32, align 4
  store ptr %0, ptr %12, align 8, !tbaa !5
  store ptr %1, ptr %13, align 8, !tbaa !5
  store ptr %2, ptr %14, align 8, !tbaa !5
  store ptr %3, ptr %15, align 8, !tbaa !5
  store ptr %4, ptr %16, align 8, !tbaa !5
  store ptr %5, ptr %17, align 8, !tbaa !5
  store ptr %6, ptr %18, align 8, !tbaa !5
  store ptr %7, ptr %19, align 8, !tbaa !5
  store ptr %8, ptr %20, align 8, !tbaa !5
  store ptr %9, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %35 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %35, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %36 = load ptr, ptr %17, align 8, !tbaa !5
  store ptr %36, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %37 = load ptr, ptr %20, align 8, !tbaa !5
  store ptr %37, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %38 = load ptr, ptr %14, align 8, !tbaa !5
  %39 = load double, ptr %38, align 8, !tbaa !9
  store double %39, ptr %25, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %40 = load ptr, ptr %19, align 8, !tbaa !5
  %41 = load double, ptr %40, align 8, !tbaa !9
  store double %41, ptr %26, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  store i32 0, ptr %27, align 4, !tbaa !11
  %42 = load ptr, ptr %12, align 8, !tbaa !5
  %43 = load i8, ptr %42, align 1, !tbaa !13
  %44 = sext i8 %43 to i32
  %45 = icmp eq i32 %44, 85
  br i1 %45, label %51, label %46

46:                                               ; preds = %10
  %47 = load ptr, ptr %12, align 8, !tbaa !5
  %48 = load i8, ptr %47, align 1, !tbaa !13
  %49 = sext i8 %48 to i32
  %50 = icmp eq i32 %49, 117
  br i1 %50, label %51, label %52

51:                                               ; preds = %46, %10
  br label %66

52:                                               ; preds = %46
  %53 = load ptr, ptr %12, align 8, !tbaa !5
  %54 = load i8, ptr %53, align 1, !tbaa !13
  %55 = sext i8 %54 to i32
  %56 = icmp eq i32 %55, 76
  br i1 %56, label %62, label %57

57:                                               ; preds = %52
  %58 = load ptr, ptr %12, align 8, !tbaa !5
  %59 = load i8, ptr %58, align 1, !tbaa !13
  %60 = sext i8 %59 to i32
  %61 = icmp eq i32 %60, 108
  br label %62

62:                                               ; preds = %57, %52
  %63 = phi i1 [ true, %52 ], [ %61, %57 ]
  %64 = zext i1 %63 to i64
  %65 = select i1 %63, i32 1, i32 255
  br label %66

66:                                               ; preds = %62, %51
  %67 = phi i32 [ 0, %51 ], [ %65, %62 ]
  %68 = icmp eq i32 %67, 255
  br i1 %68, label %69, label %70

69:                                               ; preds = %66
  store i32 1, ptr %27, align 4, !tbaa !11
  br label %97

70:                                               ; preds = %66
  %71 = load ptr, ptr %13, align 8, !tbaa !5
  %72 = load i32, ptr %71, align 4, !tbaa !11
  %73 = icmp slt i32 %72, 0
  br i1 %73, label %74, label %75

74:                                               ; preds = %70
  store i32 2, ptr %27, align 4, !tbaa !11
  br label %96

75:                                               ; preds = %70
  %76 = load ptr, ptr %16, align 8, !tbaa !5
  %77 = load i32, ptr %76, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  store i32 1, ptr %28, align 4, !tbaa !11
  %78 = load ptr, ptr %13, align 8, !tbaa !5
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %28, ptr noundef nonnull align 4 dereferenceable(4) %78)
  %80 = load i32, ptr %79, align 4, !tbaa !11
  %81 = icmp slt i32 %77, %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  br i1 %81, label %82, label %83

82:                                               ; preds = %75
  store i32 5, ptr %27, align 4, !tbaa !11
  br label %95

83:                                               ; preds = %75
  %84 = load ptr, ptr %18, align 8, !tbaa !5
  %85 = load i32, ptr %84, align 4, !tbaa !11
  %86 = icmp eq i32 %85, 0
  br i1 %86, label %87, label %88

87:                                               ; preds = %83
  store i32 7, ptr %27, align 4, !tbaa !11
  br label %94

88:                                               ; preds = %83
  %89 = load ptr, ptr %21, align 8, !tbaa !5
  %90 = load i32, ptr %89, align 4, !tbaa !11
  %91 = icmp eq i32 %90, 0
  br i1 %91, label %92, label %93

92:                                               ; preds = %88
  store i32 10, ptr %27, align 4, !tbaa !11
  br label %93

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

94:                                               ; preds = %93, %87
  br label %95

95:                                               ; preds = %94, %82
  br label %96

96:                                               ; preds = %95, %74
  br label %97

97:                                               ; preds = %96, %69
  %98 = load i32, ptr %27, align 4, !tbaa !11
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %100, label %102

100:                                              ; preds = %97
  %101 = call i32 @xerbla_(ptr noundef @.str.7, ptr noundef %27, i32 noundef 6)
  store i32 %101, ptr %11, align 4
  store i32 1, ptr %29, align 4
  br label %210

102:                                              ; preds = %97
  %103 = load ptr, ptr %13, align 8, !tbaa !5
  %104 = load i32, ptr %103, align 4, !tbaa !11
  %105 = icmp eq i32 %104, 0
  br i1 %105, label %106, label %107

106:                                              ; preds = %102
  store i32 0, ptr %11, align 4
  store i32 1, ptr %29, align 4
  br label %210

107:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %108 = load ptr, ptr %23, align 8, !tbaa !5
  %109 = load ptr, ptr %13, align 8, !tbaa !5
  %110 = load i32, ptr %109, align 4, !tbaa !11
  %111 = load ptr, ptr %18, align 8, !tbaa !5
  %112 = load i32, ptr %111, align 4, !tbaa !11
  %113 = call noundef ptr @_Z18get_compact_vectorIKdEPT_S2_ii(ptr noundef %108, i32 noundef %110, i32 noundef %112)
  store ptr %113, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %114 = load ptr, ptr %24, align 8, !tbaa !5
  %115 = load ptr, ptr %13, align 8, !tbaa !5
  %116 = load i32, ptr %115, align 4, !tbaa !11
  %117 = load ptr, ptr %21, align 8, !tbaa !5
  %118 = load i32, ptr %117, align 4, !tbaa !11
  %119 = call noundef ptr @_Z18get_compact_vectorIdEPT_S1_ii(ptr noundef %114, i32 noundef %116, i32 noundef %118)
  store ptr %119, ptr %31, align 8, !tbaa !5
  %120 = load double, ptr %26, align 8, !tbaa !9
  %121 = fcmp une double %120, 1.000000e+00
  br i1 %121, label %122, label %136

122:                                              ; preds = %107
  %123 = load double, ptr %26, align 8, !tbaa !9
  %124 = fcmp oeq double %123, 0.000000e+00
  br i1 %124, label %125, label %130

125:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 24, ptr %32) #6
  %126 = load ptr, ptr %31, align 8, !tbaa !5
  %127 = load ptr, ptr %13, align 8, !tbaa !5
  %128 = load i32, ptr %127, align 4, !tbaa !11
  call void @_Z11make_vectorIdEN5Eigen3MapINS0_6MatrixIT_Lin1ELi1ELi0ELin1ELi1EEELi0ENS0_6StrideILi0ELi0EEEEEPS3_i(ptr dead_on_unwind writable sret(%"class.Eigen::Map.9") align 8 %32, ptr noundef %126, i32 noundef %128)
  %129 = call noundef nonnull align 8 dereferenceable(19) ptr @_ZN5Eigen9DenseBaseINS_3MapINS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEELi0ENS_6StrideILi0ELi0EEEEEE7setZeroEv(ptr noundef nonnull align 1 dereferenceable(1) %32)
  call void @llvm.lifetime.end.p0(i64 24, ptr %32) #6
  br label %135

130:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 24, ptr %33) #6
  %131 = load ptr, ptr %31, align 8, !tbaa !5
  %132 = load ptr, ptr %13, align 8, !tbaa !5
  %133 = load i32, ptr %132, align 4, !tbaa !11
  call void @_Z11make_vectorIdEN5Eigen3MapINS0_6MatrixIT_Lin1ELi1ELi0ELin1ELi1EEELi0ENS0_6StrideILi0ELi0EEEEEPS3_i(ptr dead_on_unwind writable sret(%"class.Eigen::Map.9") align 8 %33, ptr noundef %131, i32 noundef %133)
  %134 = call noundef nonnull align 8 dereferenceable(19) ptr @_ZN5Eigen9DenseBaseINS_3MapINS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEELi0ENS_6StrideILi0ELi0EEEEEEmLERKd(ptr noundef nonnull align 1 dereferenceable(1) %33, ptr noundef nonnull align 8 dereferenceable(8) %26)
  call void @llvm.lifetime.end.p0(i64 24, ptr %33) #6
  br label %135

135:                                              ; preds = %130, %125
  br label %136

136:                                              ; preds = %135, %107
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #6
  %137 = load ptr, ptr %12, align 8, !tbaa !5
  %138 = load i8, ptr %137, align 1, !tbaa !13
  %139 = sext i8 %138 to i32
  %140 = icmp eq i32 %139, 85
  br i1 %140, label %146, label %141

141:                                              ; preds = %136
  %142 = load ptr, ptr %12, align 8, !tbaa !5
  %143 = load i8, ptr %142, align 1, !tbaa !13
  %144 = sext i8 %143 to i32
  %145 = icmp eq i32 %144, 117
  br i1 %145, label %146, label %147

146:                                              ; preds = %141, %136
  br label %161

147:                                              ; preds = %141
  %148 = load ptr, ptr %12, align 8, !tbaa !5
  %149 = load i8, ptr %148, align 1, !tbaa !13
  %150 = sext i8 %149 to i32
  %151 = icmp eq i32 %150, 76
  br i1 %151, label %157, label %152

152:                                              ; preds = %147
  %153 = load ptr, ptr %12, align 8, !tbaa !5
  %154 = load i8, ptr %153, align 1, !tbaa !13
  %155 = sext i8 %154 to i32
  %156 = icmp eq i32 %155, 108
  br label %157

157:                                              ; preds = %152, %147
  %158 = phi i1 [ true, %147 ], [ %156, %152 ]
  %159 = zext i1 %158 to i64
  %160 = select i1 %158, i32 1, i32 255
  br label %161

161:                                              ; preds = %157, %146
  %162 = phi i32 [ 0, %146 ], [ %160, %157 ]
  store i32 %162, ptr %34, align 4, !tbaa !11
  %163 = load i32, ptr %34, align 4, !tbaa !11
  %164 = icmp sge i32 %163, 2
  br i1 %164, label %171, label %165

165:                                              ; preds = %161
  %166 = load i32, ptr %34, align 4, !tbaa !11
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [2 x ptr], ptr @_ZZ6dsymv_E4func, i64 0, i64 %167
  %169 = load ptr, ptr %168, align 8, !tbaa !5
  %170 = icmp eq ptr %169, null
  br i1 %170, label %171, label %172

171:                                              ; preds = %165, %161
  store i32 0, ptr %11, align 4
  store i32 1, ptr %29, align 4
  br label %209

172:                                              ; preds = %165
  %173 = load i32, ptr %34, align 4, !tbaa !11
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [2 x ptr], ptr @_ZZ6dsymv_E4func, i64 0, i64 %174
  %176 = load ptr, ptr %175, align 8, !tbaa !5
  %177 = load ptr, ptr %13, align 8, !tbaa !5
  %178 = load i32, ptr %177, align 4, !tbaa !11
  %179 = load ptr, ptr %22, align 8, !tbaa !5
  %180 = load ptr, ptr %16, align 8, !tbaa !5
  %181 = load i32, ptr %180, align 4, !tbaa !11
  %182 = load ptr, ptr %30, align 8, !tbaa !5
  %183 = load ptr, ptr %31, align 8, !tbaa !5
  %184 = load double, ptr %25, align 8, !tbaa !9
  call void %176(i32 noundef %178, ptr noundef %179, i32 noundef %181, ptr noundef %182, ptr noundef %183, double noundef %184)
  %185 = load ptr, ptr %30, align 8, !tbaa !5
  %186 = load ptr, ptr %23, align 8, !tbaa !5
  %187 = icmp ne ptr %185, %186
  br i1 %187, label %188, label %193

188:                                              ; preds = %172
  %189 = load ptr, ptr %30, align 8, !tbaa !5
  %190 = icmp eq ptr %189, null
  br i1 %190, label %192, label %191

191:                                              ; preds = %188
  call void @_ZdaPv(ptr noundef %189) #7
  br label %192

192:                                              ; preds = %191, %188
  br label %193

193:                                              ; preds = %192, %172
  %194 = load ptr, ptr %31, align 8, !tbaa !5
  %195 = load ptr, ptr %24, align 8, !tbaa !5
  %196 = icmp ne ptr %194, %195
  br i1 %196, label %197, label %208

197:                                              ; preds = %193
  %198 = load ptr, ptr %31, align 8, !tbaa !5
  %199 = load ptr, ptr %24, align 8, !tbaa !5
  %200 = load ptr, ptr %13, align 8, !tbaa !5
  %201 = load i32, ptr %200, align 4, !tbaa !11
  %202 = load ptr, ptr %21, align 8, !tbaa !5
  %203 = load i32, ptr %202, align 4, !tbaa !11
  %204 = call noundef ptr @_Z9copy_backIdEPT_S1_S1_ii(ptr noundef %198, ptr noundef %199, i32 noundef %201, i32 noundef %203)
  %205 = icmp eq ptr %204, null
  br i1 %205, label %207, label %206

206:                                              ; preds = %197
  call void @_ZdaPv(ptr noundef %204) #7
  br label %207

207:                                              ; preds = %206, %197
  br label %208

208:                                              ; preds = %207, %193
  store i32 1, ptr %11, align 4
  store i32 1, ptr %29, align 4
  br label %209

209:                                              ; preds = %208, %171
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br label %210

210:                                              ; preds = %209, %106, %100
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  %211 = load i32, ptr %11, align 4
  ret i32 %211
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = { 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 #6 = { nounwind }
attributes #7 = { 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 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !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.9" = type { %"class.Eigen::MapBase.base.19", [7 x i8] }
%"class.Eigen::MapBase.base.19" = type { %"class.Eigen::MapBase.base.18" }
%"class.Eigen::MapBase.base.18" = type <{ ptr, %"class.Eigen::internal::variable_if_dynamic", i8 }>
%"class.Eigen::internal::variable_if_dynamic" = type { i64 }

@_ZZ6dsymv_E4func = external hidden local_unnamed_addr constant [2 x ptr], align 16
@.str.7 = 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 uwtable
declare dso_local void @_Z11make_vectorIdEN5Eigen3MapINS0_6MatrixIT_Lin1ELi1ELi0ELin1ELi1EEELi0ENS0_6StrideILi0ELi0EEEEEPS3_i(ptr dead_on_unwind noalias writable sret(%"class.Eigen::Map.9") align 8, ptr noundef, i32 noundef) local_unnamed_addr #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: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(19) ptr @_ZN5Eigen9DenseBaseINS_3MapINS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEELi0ENS_6StrideILi0ELi0EEEEEEmLERKd(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(8)) local_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: mustprogress uwtable
declare dso_local noundef ptr @_Z18get_compact_vectorIKdEPT_S2_ii(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local i32 @dsymv_(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 nocapture noundef readonly %7, ptr noundef %8, ptr nocapture noundef readonly %9) local_unnamed_addr #1 {
  %11 = alloca double, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.Eigen::Map.9", align 8
  %15 = alloca %"class.Eigen::Map.9", align 8
  %16 = load double, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %17 = load double, ptr %7, align 8, !tbaa !5
  store double %17, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  %18 = load i8, ptr %0, align 1, !tbaa !9
  switch i8 %18, label %19 [
    i8 85, label %20
    i8 117, label %20
    i8 76, label %20
    i8 108, label %20
  ]

19:                                               ; preds = %10
  store i32 1, ptr %12, align 4, !tbaa !10
  br label %.thread60

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

23:                                               ; preds = %20
  store i32 2, ptr %12, align 4, !tbaa !10
  br label %.thread60

24:                                               ; preds = %20
  %25 = load i32, ptr %4, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #6
  store i32 1, ptr %13, align 4, !tbaa !10
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %27 = load i32, ptr %26, align 4, !tbaa !10
  %28 = icmp slt i32 %25, %27
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #6
  br i1 %28, label %29, label %30

29:                                               ; preds = %24
  store i32 5, ptr %12, align 4, !tbaa !10
  br label %.thread60

30:                                               ; preds = %24
  %31 = load i32, ptr %6, align 4, !tbaa !10
  %32 = icmp eq i32 %31, 0
  br i1 %32, label %33, label %34

33:                                               ; preds = %30
  store i32 7, ptr %12, align 4, !tbaa !10
  br label %.thread60

34:                                               ; preds = %30
  %35 = load i32, ptr %9, align 4, !tbaa !10
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %39

37:                                               ; preds = %34
  store i32 10, ptr %12, align 4, !tbaa !10
  br label %.thread60

.thread60:                                        ; preds = %19, %29, %37, %33, %23
  %38 = call i32 @xerbla_(ptr noundef nonnull @.str.7, ptr noundef nonnull %12, i32 noundef 6)
  br label %74

39:                                               ; preds = %34
  %40 = load i32, ptr %1, align 4, !tbaa !10
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %74, label %42

42:                                               ; preds = %39
  %43 = call noundef ptr @_Z18get_compact_vectorIKdEPT_S2_ii(ptr noundef %5, i32 noundef %40, i32 noundef %31)
  %44 = load i32, ptr %1, align 4, !tbaa !10
  %45 = load i32, ptr %9, align 4, !tbaa !10
  %46 = call noundef ptr @_Z18get_compact_vectorIdEPT_S1_ii(ptr noundef %8, i32 noundef %44, i32 noundef %45)
  %47 = fcmp une double %17, 1.000000e+00
  br i1 %47, label %48, label %56

48:                                               ; preds = %42
  %49 = fcmp oeq double %17, 0.000000e+00
  br i1 %49, label %50, label %53

50:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #6
  %51 = load i32, ptr %1, align 4, !tbaa !10
  call void @_Z11make_vectorIdEN5Eigen3MapINS0_6MatrixIT_Lin1ELi1ELi0ELin1ELi1EEELi0ENS0_6StrideILi0ELi0EEEEEPS3_i(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::Map.9") align 8 %14, ptr noundef %46, i32 noundef %51)
  %52 = call noundef nonnull align 8 dereferenceable(19) ptr @_ZN5Eigen9DenseBaseINS_3MapINS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEELi0ENS_6StrideILi0ELi0EEEEEE7setZeroEv(ptr noundef nonnull align 1 dereferenceable(1) %14)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #6
  br label %56

53:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #6
  %54 = load i32, ptr %1, align 4, !tbaa !10
  call void @_Z11make_vectorIdEN5Eigen3MapINS0_6MatrixIT_Lin1ELi1ELi0ELin1ELi1EEELi0ENS0_6StrideILi0ELi0EEEEEPS3_i(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::Map.9") align 8 %15, ptr noundef %46, i32 noundef %54)
  %55 = call noundef nonnull align 8 dereferenceable(19) ptr @_ZN5Eigen9DenseBaseINS_3MapINS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEELi0ENS_6StrideILi0ELi0EEEEEEmLERKd(ptr noundef nonnull align 1 dereferenceable(1) %15, ptr noundef nonnull align 8 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #6
  br label %56

56:                                               ; preds = %50, %53, %42
  %57 = load i8, ptr %0, align 1, !tbaa !9
  switch i8 %57, label %74 [
    i8 85, label %select.unfold
    i8 117, label %select.unfold
    i8 76, label %58
    i8 108, label %select.unfold.fold.split
  ]

58:                                               ; preds = %56
  br label %select.unfold

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

select.unfold:                                    ; preds = %56, %56, %select.unfold.fold.split, %58
  %.ph = phi i64 [ 1, %58 ], [ 0, %56 ], [ 0, %56 ], [ 1, %select.unfold.fold.split ]
  %59 = getelementptr inbounds [2 x ptr], ptr @_ZZ6dsymv_E4func, i64 0, i64 %.ph
  %60 = load ptr, ptr %59, align 8, !tbaa !12
  %61 = icmp eq ptr %60, null
  br i1 %61, label %74, label %62

62:                                               ; preds = %select.unfold
  %63 = load i32, ptr %1, align 4, !tbaa !10
  %64 = load i32, ptr %4, align 4, !tbaa !10
  call void %60(i32 noundef %63, ptr noundef %3, i32 noundef %64, ptr noundef %43, ptr noundef %46, double noundef %16)
  %.not57 = icmp eq ptr %43, %5
  %65 = icmp eq ptr %43, null
  %or.cond = or i1 %.not57, %65
  br i1 %or.cond, label %67, label %66

66:                                               ; preds = %62
  call void @_ZdaPv(ptr noundef nonnull %43) #7
  br label %67

67:                                               ; preds = %66, %62
  %.not58 = icmp eq ptr %46, %8
  br i1 %.not58, label %74, label %68

68:                                               ; preds = %67
  %69 = load i32, ptr %1, align 4, !tbaa !10
  %70 = load i32, ptr %9, align 4, !tbaa !10
  %71 = call noundef ptr @_Z9copy_backIdEPT_S1_S1_ii(ptr noundef %46, ptr noundef %8, i32 noundef %69, i32 noundef %70)
  %72 = icmp eq ptr %71, null
  br i1 %72, label %74, label %73

73:                                               ; preds = %68
  call void @_ZdaPv(ptr noundef nonnull %71) #7
  br label %74

74:                                               ; preds = %56, %select.unfold, %68, %73, %67, %39, %.thread60
  %.1 = phi i32 [ %38, %.thread60 ], [ 0, %39 ], [ 0, %select.unfold ], [ 1, %68 ], [ 1, %73 ], [ 1, %67 ], [ 0, %56 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  ret i32 %.1
}

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


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