; LLVM IR from buresjan/optim_lbm :: nomad/ext/sgtelib/src/Matrix.ll (ZN7SGTELIB6Matrix13diagA_productERKS0_S2_)

; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.SGTELIB::Matrix" = type { ptr, %"class.std::__cxx11::basic_string", i32, i32, ptr }
%"class.std::allocator" = type { i8 }

@.str.4 = external hidden unnamed_addr constant [85 x i8], align 1
@_ZTIN7SGTELIB9ExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.16 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [44 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

declare i32 @__gxx_personality_v0(...)

; 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

declare ptr @__cxa_allocate_exception(i64)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7SGTELIB9ExceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(112)) unnamed_addr #1 align 2

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56)) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK7SGTELIB6Matrix8get_nameB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(56)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7SGTELIB6Matrix13diagA_productERKS0_S2_(ptr dead_on_unwind noalias writable sret(%"class.SGTELIB::Matrix") align 8 %0, ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(56) %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i1, align 1
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca double, align 8
  %21 = alloca i32, align 4
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %24 = alloca %"class.std::__cxx11::basic_string", align 8
  %25 = alloca %"class.std::allocator", align 1
  %26 = alloca %"class.std::__cxx11::basic_string", align 8
  %27 = alloca %"class.std::allocator", align 1
  %28 = alloca i1, align 1
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %29)
  store i32 %30, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %31)
  store i32 %32, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %33)
  store i32 %34, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %35)
  store i32 %36, ptr %10, align 4, !tbaa !9
  store i1 false, ptr %11, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #6
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK7SGTELIB6Matrix8get_nameB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %14, ptr noundef nonnull align 8 dereferenceable(56) %37)
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %13, ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef @.str.16)
          to label %38 unwind label %99

38:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #6
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZNK7SGTELIB6Matrix8get_nameB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %17, ptr noundef nonnull align 8 dereferenceable(56) %39)
          to label %40 unwind label %103

40:                                               ; preds = %38
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %41 unwind label %107

41:                                               ; preds = %40
  %42 = load i32, ptr %9, align 4, !tbaa !9
  %43 = load i32, ptr %10, align 4, !tbaa !9
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(32) %12, i32 noundef %42, i32 noundef %43)
          to label %44 unwind label %111

44:                                               ; preds = %41
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %45 = load i32, ptr %7, align 4, !tbaa !9
  %46 = load i32, ptr %8, align 4, !tbaa !9
  %47 = icmp eq i32 %45, %46
  br i1 %47, label %52, label %48

48:                                               ; preds = %44
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = load i32, ptr %9, align 4, !tbaa !9
  %51 = icmp eq i32 %49, %50
  br i1 %51, label %52, label %123

52:                                               ; preds = %48, %44
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %119, %52
  %54 = load i32, ptr %18, align 4, !tbaa !9
  %55 = load i32, ptr %9, align 4, !tbaa !9
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %57, label %122

57:                                               ; preds = %53
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %58, i32 0, i32 4
  %60 = load ptr, ptr %59, align 8, !tbaa !11
  %61 = load i32, ptr %18, align 4, !tbaa !9
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds ptr, ptr %60, i64 %62
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  %65 = load i32, ptr %18, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds double, ptr %64, i64 %66
  %68 = load double, ptr %67, align 8, !tbaa !16
  store double %68, ptr %20, align 8, !tbaa !16
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %96, %57
  %70 = load i32, ptr %19, align 4, !tbaa !9
  %71 = load i32, ptr %10, align 4, !tbaa !9
  %72 = icmp slt i32 %70, %71
  br i1 %72, label %73, label %118

73:                                               ; preds = %69
  %74 = load double, ptr %20, align 8, !tbaa !16
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %75, i32 0, i32 4
  %77 = load ptr, ptr %76, align 8, !tbaa !11
  %78 = load i32, ptr %18, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds ptr, ptr %77, i64 %79
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  %82 = load i32, ptr %19, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds double, ptr %81, i64 %83
  %85 = load double, ptr %84, align 8, !tbaa !16
  %86 = fmul double %74, %85
  %87 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %0, i32 0, i32 4
  %88 = load ptr, ptr %87, align 8, !tbaa !11
  %89 = load i32, ptr %18, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds ptr, ptr %88, i64 %90
  %92 = load ptr, ptr %91, align 8, !tbaa !5
  %93 = load i32, ptr %19, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds double, ptr %92, i64 %94
  store double %86, ptr %95, align 8, !tbaa !16
  br label %96

96:                                               ; preds = %73
  %97 = load i32, ptr %19, align 4, !tbaa !9
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %19, align 4, !tbaa !9
  br label %69, !llvm.loop !18

99:                                               ; preds = %3
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %15, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %16, align 4
  br label %117

103:                                              ; preds = %38
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %15, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %16, align 4
  br label %116

107:                                              ; preds = %40
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %15, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %16, align 4
  br label %115

111:                                              ; preds = %41
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %15, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  br label %115

115:                                              ; preds = %111, %107
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  br label %116

116:                                              ; preds = %115, %103
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  br label %117

117:                                              ; preds = %116, %99
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  br label %330

118:                                              ; preds = %69
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %18, align 4, !tbaa !9
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %18, align 4, !tbaa !9
  br label %53, !llvm.loop !20

122:                                              ; preds = %53
  store i1 true, ptr %11, align 1
  store i32 1, ptr %21, align 4
  br label %325

123:                                              ; preds = %48
  %124 = load i32, ptr %7, align 4, !tbaa !9
  %125 = icmp eq i32 %124, 1
  br i1 %125, label %126, label %180

126:                                              ; preds = %123
  %127 = load i32, ptr %8, align 4, !tbaa !9
  %128 = load i32, ptr %9, align 4, !tbaa !9
  %129 = icmp eq i32 %127, %128
  br i1 %129, label %130, label %180

130:                                              ; preds = %126
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %131

131:                                              ; preds = %176, %130
  %132 = load i32, ptr %18, align 4, !tbaa !9
  %133 = load i32, ptr %9, align 4, !tbaa !9
  %134 = icmp slt i32 %132, %133
  br i1 %134, label %135, label %179

135:                                              ; preds = %131
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %136, i32 0, i32 4
  %138 = load ptr, ptr %137, align 8, !tbaa !11
  %139 = getelementptr inbounds ptr, ptr %138, i64 0
  %140 = load ptr, ptr %139, align 8, !tbaa !5
  %141 = load i32, ptr %18, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds double, ptr %140, i64 %142
  %144 = load double, ptr %143, align 8, !tbaa !16
  store double %144, ptr %20, align 8, !tbaa !16
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %145

145:                                              ; preds = %172, %135
  %146 = load i32, ptr %19, align 4, !tbaa !9
  %147 = load i32, ptr %10, align 4, !tbaa !9
  %148 = icmp slt i32 %146, %147
  br i1 %148, label %149, label %175

149:                                              ; preds = %145
  %150 = load double, ptr %20, align 8, !tbaa !16
  %151 = load ptr, ptr %6, align 8, !tbaa !5
  %152 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %151, i32 0, i32 4
  %153 = load ptr, ptr %152, align 8, !tbaa !11
  %154 = load i32, ptr %18, align 4, !tbaa !9
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds ptr, ptr %153, i64 %155
  %157 = load ptr, ptr %156, align 8, !tbaa !5
  %158 = load i32, ptr %19, align 4, !tbaa !9
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds double, ptr %157, i64 %159
  %161 = load double, ptr %160, align 8, !tbaa !16
  %162 = fmul double %150, %161
  %163 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %0, i32 0, i32 4
  %164 = load ptr, ptr %163, align 8, !tbaa !11
  %165 = load i32, ptr %18, align 4, !tbaa !9
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds ptr, ptr %164, i64 %166
  %168 = load ptr, ptr %167, align 8, !tbaa !5
  %169 = load i32, ptr %19, align 4, !tbaa !9
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds double, ptr %168, i64 %170
  store double %162, ptr %171, align 8, !tbaa !16
  br label %172

172:                                              ; preds = %149
  %173 = load i32, ptr %19, align 4, !tbaa !9
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %19, align 4, !tbaa !9
  br label %145, !llvm.loop !21

175:                                              ; preds = %145
  br label %176

176:                                              ; preds = %175
  %177 = load i32, ptr %18, align 4, !tbaa !9
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %18, align 4, !tbaa !9
  br label %131, !llvm.loop !22

179:                                              ; preds = %131
  store i1 true, ptr %11, align 1
  store i32 1, ptr %21, align 4
  br label %325

180:                                              ; preds = %126, %123
  %181 = load i32, ptr %7, align 4, !tbaa !9
  %182 = load i32, ptr %9, align 4, !tbaa !9
  %183 = icmp eq i32 %181, %182
  br i1 %183, label %184, label %237

184:                                              ; preds = %180
  %185 = load i32, ptr %8, align 4, !tbaa !9
  %186 = icmp eq i32 %185, 1
  br i1 %186, label %187, label %237

187:                                              ; preds = %184
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %188

188:                                              ; preds = %233, %187
  %189 = load i32, ptr %18, align 4, !tbaa !9
  %190 = load i32, ptr %9, align 4, !tbaa !9
  %191 = icmp slt i32 %189, %190
  br i1 %191, label %192, label %236

192:                                              ; preds = %188
  %193 = load ptr, ptr %5, align 8, !tbaa !5
  %194 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %193, i32 0, i32 4
  %195 = load ptr, ptr %194, align 8, !tbaa !11
  %196 = load i32, ptr %18, align 4, !tbaa !9
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds ptr, ptr %195, i64 %197
  %199 = load ptr, ptr %198, align 8, !tbaa !5
  %200 = getelementptr inbounds double, ptr %199, i64 0
  %201 = load double, ptr %200, align 8, !tbaa !16
  store double %201, ptr %20, align 8, !tbaa !16
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %202

202:                                              ; preds = %229, %192
  %203 = load i32, ptr %19, align 4, !tbaa !9
  %204 = load i32, ptr %10, align 4, !tbaa !9
  %205 = icmp slt i32 %203, %204
  br i1 %205, label %206, label %232

206:                                              ; preds = %202
  %207 = load double, ptr %20, align 8, !tbaa !16
  %208 = load ptr, ptr %6, align 8, !tbaa !5
  %209 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %208, i32 0, i32 4
  %210 = load ptr, ptr %209, align 8, !tbaa !11
  %211 = load i32, ptr %18, align 4, !tbaa !9
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds ptr, ptr %210, i64 %212
  %214 = load ptr, ptr %213, align 8, !tbaa !5
  %215 = load i32, ptr %19, align 4, !tbaa !9
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds double, ptr %214, i64 %216
  %218 = load double, ptr %217, align 8, !tbaa !16
  %219 = fmul double %207, %218
  %220 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %0, i32 0, i32 4
  %221 = load ptr, ptr %220, align 8, !tbaa !11
  %222 = load i32, ptr %18, align 4, !tbaa !9
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds ptr, ptr %221, i64 %223
  %225 = load ptr, ptr %224, align 8, !tbaa !5
  %226 = load i32, ptr %19, align 4, !tbaa !9
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds double, ptr %225, i64 %227
  store double %219, ptr %228, align 8, !tbaa !16
  br label %229

229:                                              ; preds = %206
  %230 = load i32, ptr %19, align 4, !tbaa !9
  %231 = add nsw i32 %230, 1
  store i32 %231, ptr %19, align 4, !tbaa !9
  br label %202, !llvm.loop !23

232:                                              ; preds = %202
  br label %233

233:                                              ; preds = %232
  %234 = load i32, ptr %18, align 4, !tbaa !9
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %18, align 4, !tbaa !9
  br label %188, !llvm.loop !24

236:                                              ; preds = %188
  store i1 true, ptr %11, align 1
  store i32 1, ptr %21, align 4
  br label %325

237:                                              ; preds = %184, %180
  %238 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.61)
          to label %239 unwind label %286

239:                                              ; preds = %237
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #6
  %240 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZNK7SGTELIB6Matrix8get_nameB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %22, ptr noundef nonnull align 8 dereferenceable(56) %240)
          to label %241 unwind label %290

241:                                              ; preds = %239
  %242 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %238, ptr noundef nonnull align 8 dereferenceable(32) %22)
          to label %243 unwind label %294

243:                                              ; preds = %241
  %244 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %242, ptr noundef @.str.62)
          to label %245 unwind label %294

245:                                              ; preds = %243
  %246 = load ptr, ptr %5, align 8, !tbaa !5
  %247 = invoke noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %246)
          to label %248 unwind label %294

248:                                              ; preds = %245
  %249 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %244, i32 noundef %247)
          to label %250 unwind label %294

250:                                              ; preds = %248
  %251 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %249, ptr noundef @.str.47)
          to label %252 unwind label %294

252:                                              ; preds = %250
  %253 = load ptr, ptr %5, align 8, !tbaa !5
  %254 = invoke noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %253)
          to label %255 unwind label %294

255:                                              ; preds = %252
  %256 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %251, i32 noundef %254)
          to label %257 unwind label %294

257:                                              ; preds = %255
  %258 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %256, ptr noundef @.str.40)
          to label %259 unwind label %294

259:                                              ; preds = %257
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #6
  %260 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.63)
          to label %261 unwind label %286

261:                                              ; preds = %259
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #6
  %262 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZNK7SGTELIB6Matrix8get_nameB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %23, ptr noundef nonnull align 8 dereferenceable(56) %262)
          to label %263 unwind label %299

263:                                              ; preds = %261
  %264 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %260, ptr noundef nonnull align 8 dereferenceable(32) %23)
          to label %265 unwind label %303

265:                                              ; preds = %263
  %266 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %264, ptr noundef @.str.62)
          to label %267 unwind label %303

267:                                              ; preds = %265
  %268 = load ptr, ptr %6, align 8, !tbaa !5
  %269 = invoke noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %268)
          to label %270 unwind label %303

270:                                              ; preds = %267
  %271 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %266, i32 noundef %269)
          to label %272 unwind label %303

272:                                              ; preds = %270
  %273 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %271, ptr noundef @.str.47)
          to label %274 unwind label %303

274:                                              ; preds = %272
  %275 = load ptr, ptr %6, align 8, !tbaa !5
  %276 = invoke noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %275)
          to label %277 unwind label %303

277:                                              ; preds = %274
  %278 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %273, i32 noundef %276)
          to label %279 unwind label %303

279:                                              ; preds = %277
  %280 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %278, ptr noundef @.str.40)
          to label %281 unwind label %303

281:                                              ; preds = %279
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #6
  store i1 true, ptr %28, align 1
  %282 = call ptr @__cxa_allocate_exception(i64 112) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef @.str.4, ptr noundef nonnull align 1 dereferenceable(1) %25)
          to label %283 unwind label %308

283:                                              ; preds = %281
  call void @llvm.lifetime.start.p0(i64 32, ptr %26) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef @.str.64, ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %284 unwind label %312

284:                                              ; preds = %283
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %282, ptr noundef nonnull align 8 dereferenceable(32) %24, i32 noundef 1207, ptr noundef nonnull align 8 dereferenceable(32) %26)
          to label %285 unwind label %316

285:                                              ; preds = %284
  store i1 false, ptr %28, align 1
  invoke void @__cxa_throw(ptr %282, ptr @_ZTIN7SGTELIB9ExceptionE, ptr @_ZN7SGTELIB9ExceptionD2Ev) #7
          to label %336 unwind label %316

286:                                              ; preds = %259, %237
  %287 = landingpad { ptr, i32 }
          cleanup
  %288 = extractvalue { ptr, i32 } %287, 0
  store ptr %288, ptr %15, align 8
  %289 = extractvalue { ptr, i32 } %287, 1
  store i32 %289, ptr %16, align 4
  br label %327

290:                                              ; preds = %239
  %291 = landingpad { ptr, i32 }
          cleanup
  %292 = extractvalue { ptr, i32 } %291, 0
  store ptr %292, ptr %15, align 8
  %293 = extractvalue { ptr, i32 } %291, 1
  store i32 %293, ptr %16, align 4
  br label %298

294:                                              ; preds = %257, %255, %252, %250, %248, %245, %243, %241
  %295 = landingpad { ptr, i32 }
          cleanup
  %296 = extractvalue { ptr, i32 } %295, 0
  store ptr %296, ptr %15, align 8
  %297 = extractvalue { ptr, i32 } %295, 1
  store i32 %297, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #6
  br label %298

298:                                              ; preds = %294, %290
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #6
  br label %327

299:                                              ; preds = %261
  %300 = landingpad { ptr, i32 }
          cleanup
  %301 = extractvalue { ptr, i32 } %300, 0
  store ptr %301, ptr %15, align 8
  %302 = extractvalue { ptr, i32 } %300, 1
  store i32 %302, ptr %16, align 4
  br label %307

303:                                              ; preds = %279, %277, %274, %272, %270, %267, %265, %263
  %304 = landingpad { ptr, i32 }
          cleanup
  %305 = extractvalue { ptr, i32 } %304, 0
  store ptr %305, ptr %15, align 8
  %306 = extractvalue { ptr, i32 } %304, 1
  store i32 %306, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #6
  br label %307

307:                                              ; preds = %303, %299
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #6
  br label %327

308:                                              ; preds = %281
  %309 = landingpad { ptr, i32 }
          cleanup
  %310 = extractvalue { ptr, i32 } %309, 0
  store ptr %310, ptr %15, align 8
  %311 = extractvalue { ptr, i32 } %309, 1
  store i32 %311, ptr %16, align 4
  br label %321

312:                                              ; preds = %283
  %313 = landingpad { ptr, i32 }
          cleanup
  %314 = extractvalue { ptr, i32 } %313, 0
  store ptr %314, ptr %15, align 8
  %315 = extractvalue { ptr, i32 } %313, 1
  store i32 %315, ptr %16, align 4
  br label %320

316:                                              ; preds = %285, %284
  %317 = landingpad { ptr, i32 }
          cleanup
  %318 = extractvalue { ptr, i32 } %317, 0
  store ptr %318, ptr %15, align 8
  %319 = extractvalue { ptr, i32 } %317, 1
  store i32 %319, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #6
  br label %320

320:                                              ; preds = %316, %312
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #6
  br label %321

321:                                              ; preds = %320, %308
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #6
  %322 = load i1, ptr %28, align 1
  br i1 %322, label %323, label %324

323:                                              ; preds = %321
  call void @__cxa_free_exception(ptr %282) #6
  br label %324

324:                                              ; preds = %323, %321
  br label %327

325:                                              ; preds = %236, %179, %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  %326 = load i1, ptr %11, align 1
  br i1 %326, label %329, label %328

327:                                              ; preds = %324, %307, %298, %286
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #6
  br label %330

328:                                              ; preds = %325
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #6
  br label %329

329:                                              ; preds = %328, %325
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  ret void

330:                                              ; preds = %327, %117
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %331

331:                                              ; preds = %330
  %332 = load ptr, ptr %15, align 8
  %333 = load i32, ptr %16, align 4
  %334 = insertvalue { ptr, i32 } poison, ptr %332, 0
  %335 = insertvalue { ptr, i32 } %334, i32 %333, 1
  resume { ptr, i32 } %335

336:                                              ; preds = %285
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

declare void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr, ptr, i32, i32)

declare void @_ZN7SGTELIB6MatrixD1Ev(ptr)

attributes #0 = { 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 = { 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 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 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 #6 = { nounwind }
attributes #7 = { noreturn }

!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 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 48}
!12 = !{!"_ZTSN7SGTELIB6MatrixE", !13, i64 8, !10, i64 40, !10, i64 44, !6, i64 48}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}
!23 = distinct !{!23, !19}
!24 = distinct !{!24, !19}


; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.SGTELIB::Matrix" = type { ptr, %"class.std::__cxx11::basic_string", i32, i32, ptr }
%"class.std::allocator" = type { i8 }

@.str.4 = external hidden unnamed_addr constant [85 x i8], align 1
@_ZTIN7SGTELIB9ExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.16 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [44 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

declare i32 @__gxx_personality_v0(...)

; 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7SGTELIB9ExceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(112)) unnamed_addr #1 align 2

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

declare void @__cxa_free_exception(ptr) local_unnamed_addr

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK7SGTELIB6Matrix8get_nameB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7SGTELIB6Matrix13diagA_productERKS0_S2_(ptr dead_on_unwind noalias writable sret(%"class.SGTELIB::Matrix") align 8 %0, ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(56) %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator", align 1
  %14 = tail call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %15 = tail call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %16 = tail call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %2)
  %17 = tail call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %2)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  call void @_ZNK7SGTELIB6Matrix8get_nameB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(56) %1)
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.16)
          to label %18 unwind label %72

18:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  invoke void @_ZNK7SGTELIB6Matrix8get_nameB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(56) %2)
          to label %19 unwind label %74

19:                                               ; preds = %18
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %20 unwind label %76

20:                                               ; preds = %19
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %16, i32 noundef %17)
          to label %21 unwind label %78

21:                                               ; preds = %20
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  %22 = icmp eq i32 %14, %15
  %23 = icmp eq i32 %15, %16
  %or.cond105 = or i1 %22, %23
  br i1 %or.cond105, label %.preheader, label %83

.preheader:                                       ; preds = %21
  %24 = icmp sgt i32 %16, 0
  br i1 %24, label %.lr.ph116, label %.loopexit

.lr.ph116:                                        ; preds = %.preheader
  %25 = getelementptr inbounds i8, ptr %1, i64 48
  %26 = load ptr, ptr %25, align 8, !tbaa !5
  %27 = icmp sgt i32 %17, 0
  %28 = getelementptr inbounds i8, ptr %2, i64 48
  %29 = load ptr, ptr %28, align 8
  %30 = getelementptr inbounds i8, ptr %0, i64 48
  %31 = load ptr, ptr %30, align 8
  br i1 %27, label %.lr.ph.us117.preheader, label %.loopexit

.lr.ph.us117.preheader:                           ; preds = %.lr.ph116
  %wide.trip.count136 = zext nneg i32 %16 to i64
  %wide.trip.count131 = zext nneg i32 %17 to i64
  %min.iters.check145 = icmp ult i32 %17, 4
  %n.vec148 = and i64 %wide.trip.count131, 2147483644
  %cmp.n157 = icmp eq i64 %n.vec148, %wide.trip.count131
  %xtraiter165 = and i64 %wide.trip.count131, 3
  %lcmp.mod166.not = icmp eq i64 %xtraiter165, 0
  br label %.lr.ph.us117

.lr.ph.us117:                                     ; preds = %.lr.ph.us117.preheader, %._crit_edge.us118
  %indvars.iv133 = phi i64 [ 0, %.lr.ph.us117.preheader ], [ %indvars.iv.next134, %._crit_edge.us118 ]
  %32 = getelementptr inbounds ptr, ptr %26, i64 %indvars.iv133
  %33 = load ptr, ptr %32, align 8, !tbaa !14
  %34 = getelementptr inbounds double, ptr %33, i64 %indvars.iv133
  %35 = load double, ptr %34, align 8, !tbaa !15
  %36 = getelementptr inbounds ptr, ptr %29, i64 %indvars.iv133
  %37 = load ptr, ptr %36, align 8, !tbaa !14
  %38 = getelementptr inbounds ptr, ptr %31, i64 %indvars.iv133
  %39 = load ptr, ptr %38, align 8, !tbaa !14
  %40 = ptrtoint ptr %39 to i64
  %41 = ptrtoint ptr %37 to i64
  %42 = sub i64 %40, %41
  %diff.check142 = icmp ult i64 %42, 32
  %or.cond160 = select i1 %min.iters.check145, i1 true, i1 %diff.check142
  br i1 %or.cond160, label %scalar.ph144.preheader, label %vector.ph146

vector.ph146:                                     ; preds = %.lr.ph.us117
  %broadcast.splatinsert154 = insertelement <2 x double> poison, double %35, i64 0
  %broadcast.splat155 = shufflevector <2 x double> %broadcast.splatinsert154, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body150

vector.body150:                                   ; preds = %vector.body150, %vector.ph146
  %index151 = phi i64 [ 0, %vector.ph146 ], [ %index.next156, %vector.body150 ]
  %43 = getelementptr inbounds double, ptr %37, i64 %index151
  %44 = getelementptr inbounds i8, ptr %43, i64 16
  %wide.load152 = load <2 x double>, ptr %43, align 8, !tbaa !15
  %wide.load153 = load <2 x double>, ptr %44, align 8, !tbaa !15
  %45 = fmul <2 x double> %broadcast.splat155, %wide.load152
  %46 = fmul <2 x double> %broadcast.splat155, %wide.load153
  %47 = getelementptr inbounds double, ptr %39, i64 %index151
  %48 = getelementptr inbounds i8, ptr %47, i64 16
  store <2 x double> %45, ptr %47, align 8, !tbaa !15
  store <2 x double> %46, ptr %48, align 8, !tbaa !15
  %index.next156 = add nuw i64 %index151, 4
  %49 = icmp eq i64 %index.next156, %n.vec148
  br i1 %49, label %middle.block143, label %vector.body150, !llvm.loop !17

middle.block143:                                  ; preds = %vector.body150
  br i1 %cmp.n157, label %._crit_edge.us118, label %scalar.ph144.preheader

scalar.ph144.preheader:                           ; preds = %middle.block143, %.lr.ph.us117
  %indvars.iv128.ph = phi i64 [ 0, %.lr.ph.us117 ], [ %n.vec148, %middle.block143 ]
  br i1 %lcmp.mod166.not, label %scalar.ph144.prol.loopexit, label %scalar.ph144.prol

scalar.ph144.prol:                                ; preds = %scalar.ph144.preheader, %scalar.ph144.prol
  %indvars.iv128.prol = phi i64 [ %indvars.iv.next129.prol, %scalar.ph144.prol ], [ %indvars.iv128.ph, %scalar.ph144.preheader ]
  %prol.iter167 = phi i64 [ %prol.iter167.next, %scalar.ph144.prol ], [ 0, %scalar.ph144.preheader ]
  %50 = getelementptr inbounds double, ptr %37, i64 %indvars.iv128.prol
  %51 = load double, ptr %50, align 8, !tbaa !15
  %52 = fmul double %35, %51
  %53 = getelementptr inbounds double, ptr %39, i64 %indvars.iv128.prol
  store double %52, ptr %53, align 8, !tbaa !15
  %indvars.iv.next129.prol = add nuw nsw i64 %indvars.iv128.prol, 1
  %prol.iter167.next = add i64 %prol.iter167, 1
  %prol.iter167.cmp.not = icmp eq i64 %prol.iter167.next, %xtraiter165
  br i1 %prol.iter167.cmp.not, label %scalar.ph144.prol.loopexit, label %scalar.ph144.prol, !llvm.loop !21

scalar.ph144.prol.loopexit:                       ; preds = %scalar.ph144.prol, %scalar.ph144.preheader
  %indvars.iv128.unr = phi i64 [ %indvars.iv128.ph, %scalar.ph144.preheader ], [ %indvars.iv.next129.prol, %scalar.ph144.prol ]
  %54 = sub nsw i64 %indvars.iv128.ph, %wide.trip.count131
  %55 = icmp ugt i64 %54, -4
  br i1 %55, label %._crit_edge.us118, label %scalar.ph144

scalar.ph144:                                     ; preds = %scalar.ph144.prol.loopexit, %scalar.ph144
  %indvars.iv128 = phi i64 [ %indvars.iv.next129.3, %scalar.ph144 ], [ %indvars.iv128.unr, %scalar.ph144.prol.loopexit ]
  %56 = getelementptr inbounds double, ptr %37, i64 %indvars.iv128
  %57 = load double, ptr %56, align 8, !tbaa !15
  %58 = fmul double %35, %57
  %59 = getelementptr inbounds double, ptr %39, i64 %indvars.iv128
  store double %58, ptr %59, align 8, !tbaa !15
  %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1
  %60 = getelementptr inbounds double, ptr %37, i64 %indvars.iv.next129
  %61 = load double, ptr %60, align 8, !tbaa !15
  %62 = fmul double %35, %61
  %63 = getelementptr inbounds double, ptr %39, i64 %indvars.iv.next129
  store double %62, ptr %63, align 8, !tbaa !15
  %indvars.iv.next129.1 = add nuw nsw i64 %indvars.iv128, 2
  %64 = getelementptr inbounds double, ptr %37, i64 %indvars.iv.next129.1
  %65 = load double, ptr %64, align 8, !tbaa !15
  %66 = fmul double %35, %65
  %67 = getelementptr inbounds double, ptr %39, i64 %indvars.iv.next129.1
  store double %66, ptr %67, align 8, !tbaa !15
  %indvars.iv.next129.2 = add nuw nsw i64 %indvars.iv128, 3
  %68 = getelementptr inbounds double, ptr %37, i64 %indvars.iv.next129.2
  %69 = load double, ptr %68, align 8, !tbaa !15
  %70 = fmul double %35, %69
  %71 = getelementptr inbounds double, ptr %39, i64 %indvars.iv.next129.2
  store double %70, ptr %71, align 8, !tbaa !15
  %indvars.iv.next129.3 = add nuw nsw i64 %indvars.iv128, 4
  %exitcond132.not.3 = icmp eq i64 %indvars.iv.next129.3, %wide.trip.count131
  br i1 %exitcond132.not.3, label %._crit_edge.us118, label %scalar.ph144, !llvm.loop !23

._crit_edge.us118:                                ; preds = %scalar.ph144.prol.loopexit, %scalar.ph144, %middle.block143
  %indvars.iv.next134 = add nuw nsw i64 %indvars.iv133, 1
  %exitcond137.not = icmp eq i64 %indvars.iv.next134, %wide.trip.count136
  br i1 %exitcond137.not, label %.loopexit, label %.lr.ph.us117, !llvm.loop !24

72:                                               ; preds = %3
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %82

74:                                               ; preds = %18
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %81

76:                                               ; preds = %19
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %80

78:                                               ; preds = %20
  %79 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  br label %80

80:                                               ; preds = %78, %76
  %.pn = phi { ptr, i32 } [ %79, %78 ], [ %77, %76 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  br label %81

81:                                               ; preds = %80, %74
  %.pn.pn = phi { ptr, i32 } [ %.pn, %80 ], [ %75, %74 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  br label %82

82:                                               ; preds = %81, %72
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %81 ], [ %73, %72 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  br label %192

83:                                               ; preds = %21
  %84 = icmp eq i32 %14, %16
  %85 = icmp eq i32 %15, 1
  %or.cond = and i1 %85, %84
  br i1 %or.cond, label %.preheader109, label %133

.preheader109:                                    ; preds = %83
  %86 = icmp sgt i32 %14, 0
  br i1 %86, label %.lr.ph113, label %.loopexit

.lr.ph113:                                        ; preds = %.preheader109
  %87 = getelementptr inbounds i8, ptr %1, i64 48
  %88 = load ptr, ptr %87, align 8, !tbaa !5
  %89 = icmp sgt i32 %17, 0
  %90 = getelementptr inbounds i8, ptr %2, i64 48
  %91 = load ptr, ptr %90, align 8
  %92 = getelementptr inbounds i8, ptr %0, i64 48
  %93 = load ptr, ptr %92, align 8
  br i1 %89, label %.lr.ph.us.preheader, label %.loopexit

.lr.ph.us.preheader:                              ; preds = %.lr.ph113
  %wide.trip.count126 = zext nneg i32 %14 to i64
  %wide.trip.count = zext nneg i32 %17 to i64
  %min.iters.check = icmp ult i32 %17, 4
  %n.vec = and i64 %wide.trip.count, 2147483644
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  %xtraiter = and i64 %wide.trip.count, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %._crit_edge.us
  %indvars.iv123 = phi i64 [ 0, %.lr.ph.us.preheader ], [ %indvars.iv.next124, %._crit_edge.us ]
  %94 = getelementptr inbounds ptr, ptr %88, i64 %indvars.iv123
  %95 = load ptr, ptr %94, align 8, !tbaa !14
  %96 = load double, ptr %95, align 8, !tbaa !15
  %97 = getelementptr inbounds ptr, ptr %91, i64 %indvars.iv123
  %98 = load ptr, ptr %97, align 8, !tbaa !14
  %99 = getelementptr inbounds ptr, ptr %93, i64 %indvars.iv123
  %100 = load ptr, ptr %99, align 8, !tbaa !14
  %101 = ptrtoint ptr %100 to i64
  %102 = ptrtoint ptr %98 to i64
  %103 = sub i64 %101, %102
  %diff.check = icmp ult i64 %103, 32
  %or.cond163 = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond163, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.us
  %broadcast.splatinsert = insertelement <2 x double> poison, double %96, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %104 = getelementptr inbounds double, ptr %98, i64 %index
  %105 = getelementptr inbounds i8, ptr %104, i64 16
  %wide.load = load <2 x double>, ptr %104, align 8, !tbaa !15
  %wide.load140 = load <2 x double>, ptr %105, align 8, !tbaa !15
  %106 = fmul <2 x double> %broadcast.splat, %wide.load
  %107 = fmul <2 x double> %broadcast.splat, %wide.load140
  %108 = getelementptr inbounds double, ptr %100, i64 %index
  %109 = getelementptr inbounds i8, ptr %108, i64 16
  store <2 x double> %106, ptr %108, align 8, !tbaa !15
  store <2 x double> %107, ptr %109, align 8, !tbaa !15
  %index.next = add nuw i64 %index, 4
  %110 = icmp eq i64 %index.next, %n.vec
  br i1 %110, label %middle.block, label %vector.body, !llvm.loop !25

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph.us
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.us ], [ %n.vec, %middle.block ]
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %scalar.ph.prol ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %111 = getelementptr inbounds double, ptr %98, i64 %indvars.iv.prol
  %112 = load double, ptr %111, align 8, !tbaa !15
  %113 = fmul double %96, %112
  %114 = getelementptr inbounds double, ptr %100, i64 %indvars.iv.prol
  store double %113, ptr %114, align 8, !tbaa !15
  %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !26

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %115 = sub nsw i64 %indvars.iv.ph, %wide.trip.count
  %116 = icmp ugt i64 %115, -4
  br i1 %116, label %._crit_edge.us, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %117 = getelementptr inbounds double, ptr %98, i64 %indvars.iv
  %118 = load double, ptr %117, align 8, !tbaa !15
  %119 = fmul double %96, %118
  %120 = getelementptr inbounds double, ptr %100, i64 %indvars.iv
  store double %119, ptr %120, align 8, !tbaa !15
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %121 = getelementptr inbounds double, ptr %98, i64 %indvars.iv.next
  %122 = load double, ptr %121, align 8, !tbaa !15
  %123 = fmul double %96, %122
  %124 = getelementptr inbounds double, ptr %100, i64 %indvars.iv.next
  store double %123, ptr %124, align 8, !tbaa !15
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %125 = getelementptr inbounds double, ptr %98, i64 %indvars.iv.next.1
  %126 = load double, ptr %125, align 8, !tbaa !15
  %127 = fmul double %96, %126
  %128 = getelementptr inbounds double, ptr %100, i64 %indvars.iv.next.1
  store double %127, ptr %128, align 8, !tbaa !15
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %129 = getelementptr inbounds double, ptr %98, i64 %indvars.iv.next.2
  %130 = load double, ptr %129, align 8, !tbaa !15
  %131 = fmul double %96, %130
  %132 = getelementptr inbounds double, ptr %100, i64 %indvars.iv.next.2
  store double %131, ptr %132, align 8, !tbaa !15
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, %wide.trip.count
  br i1 %exitcond.not.3, label %._crit_edge.us, label %scalar.ph, !llvm.loop !27

._crit_edge.us:                                   ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1
  %exitcond127.not = icmp eq i64 %indvars.iv.next124, %wide.trip.count126
  br i1 %exitcond127.not, label %.loopexit, label %.lr.ph.us, !llvm.loop !28

133:                                              ; preds = %83
  %134 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.61)
          to label %135 unwind label %172

135:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #6
  invoke void @_ZNK7SGTELIB6Matrix8get_nameB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(56) %1)
          to label %136 unwind label %174

136:                                              ; preds = %135
  %137 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %134, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %138 unwind label %176

138:                                              ; preds = %136
  %139 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %137, ptr noundef nonnull @.str.62)
          to label %140 unwind label %176

140:                                              ; preds = %138
  %141 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %142 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %139, i32 noundef %141)
          to label %143 unwind label %176

143:                                              ; preds = %140
  %144 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %142, ptr noundef nonnull @.str.47)
          to label %145 unwind label %176

145:                                              ; preds = %143
  %146 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %147 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %144, i32 noundef %146)
          to label %148 unwind label %176

148:                                              ; preds = %145
  %149 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %147, ptr noundef nonnull @.str.40)
          to label %150 unwind label %176

150:                                              ; preds = %148
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  %151 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.63)
          to label %152 unwind label %172

152:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #6
  invoke void @_ZNK7SGTELIB6Matrix8get_nameB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(56) %2)
          to label %153 unwind label %179

153:                                              ; preds = %152
  %154 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %151, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %155 unwind label %181

155:                                              ; preds = %153
  %156 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %154, ptr noundef nonnull @.str.62)
          to label %157 unwind label %181

157:                                              ; preds = %155
  %158 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %2)
  %159 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %156, i32 noundef %158)
          to label %160 unwind label %181

160:                                              ; preds = %157
  %161 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %159, ptr noundef nonnull @.str.47)
          to label %162 unwind label %181

162:                                              ; preds = %160
  %163 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %2)
  %164 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %161, i32 noundef %163)
          to label %165 unwind label %181

165:                                              ; preds = %162
  %166 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %164, ptr noundef nonnull @.str.40)
          to label %167 unwind label %181

167:                                              ; preds = %165
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  %168 = call ptr @__cxa_allocate_exception(i64 112) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull @.str.4, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %169 unwind label %.thread

169:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull @.str.64, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %170 unwind label %185

170:                                              ; preds = %169
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %168, ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef 1207, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %171 unwind label %187

171:                                              ; preds = %170
  invoke void @__cxa_throw(ptr nonnull %168, ptr nonnull @_ZTIN7SGTELIB9ExceptionE, ptr nonnull @_ZN7SGTELIB9ExceptionD2Ev) #7
          to label %193 unwind label %187

172:                                              ; preds = %150, %133
  %173 = landingpad { ptr, i32 }
          cleanup
  br label %191

174:                                              ; preds = %135
  %175 = landingpad { ptr, i32 }
          cleanup
  br label %178

176:                                              ; preds = %148, %145, %143, %140, %138, %136
  %177 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  br label %178

178:                                              ; preds = %176, %174
  %.pn96 = phi { ptr, i32 } [ %177, %176 ], [ %175, %174 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  br label %191

179:                                              ; preds = %152
  %180 = landingpad { ptr, i32 }
          cleanup
  br label %183

181:                                              ; preds = %165, %162, %160, %157, %155, %153
  %182 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  br label %183

183:                                              ; preds = %181, %179
  %.pn98 = phi { ptr, i32 } [ %182, %181 ], [ %180, %179 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  br label %191

.thread:                                          ; preds = %167
  %184 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  br label %190

185:                                              ; preds = %169
  %186 = landingpad { ptr, i32 }
          cleanup
  br label %189

187:                                              ; preds = %171, %170
  %.0 = phi i1 [ false, %171 ], [ true, %170 ]
  %188 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  br label %189

189:                                              ; preds = %185, %187
  %.pn100 = phi { ptr, i32 } [ %188, %187 ], [ %186, %185 ]
  %.1 = phi i1 [ %.0, %187 ], [ true, %185 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  br i1 %.1, label %190, label %191

190:                                              ; preds = %.thread, %189
  %.pn100.pn108 = phi { ptr, i32 } [ %184, %.thread ], [ %.pn100, %189 ]
  call void @__cxa_free_exception(ptr %168) #6
  br label %191

191:                                              ; preds = %189, %190, %183, %178, %172
  %.pn100.pn.pn = phi { ptr, i32 } [ %.pn100.pn108, %190 ], [ %.pn100, %189 ], [ %.pn98, %183 ], [ %173, %172 ], [ %.pn96, %178 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #6
  br label %192

.loopexit:                                        ; preds = %._crit_edge.us, %._crit_edge.us118, %.lr.ph113, %.lr.ph116, %.preheader109, %.preheader
  ret void

192:                                              ; preds = %191, %82
  %.pn100.pn.pn.pn = phi { ptr, i32 } [ %.pn100.pn.pn, %191 ], [ %.pn.pn.pn, %82 ]
  resume { ptr, i32 } %.pn100.pn.pn.pn

193:                                              ; preds = %171
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

declare void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr, ptr, i32, i32) local_unnamed_addr

declare void @_ZN7SGTELIB6MatrixD1Ev(ptr) local_unnamed_addr

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 = { 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 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 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 #6 = { nounwind }
attributes #7 = { noreturn }

!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, !9, i64 48}
!6 = !{!"_ZTSN7SGTELIB6MatrixE", !7, i64 8, !13, i64 40, !13, i64 44, !9, i64 48}
!7 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !8, i64 0, !12, i64 8, !10, i64 16}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"int", !10, i64 0}
!14 = !{!9, !9, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !10, i64 0}
!17 = distinct !{!17, !18, !19, !20}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!"llvm.loop.isvectorized", i32 1}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.unroll.disable"}
!23 = distinct !{!23, !18, !19}
!24 = distinct !{!24, !18}
!25 = distinct !{!25, !18, !19, !20}
!26 = distinct !{!26, !22}
!27 = distinct !{!27, !18, !19}
!28 = distinct !{!28, !18}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass