; LLVM IR from buresjan/optim_lbm :: nomad/ext/sgtelib/src/Matrix.ll (ZN7SGTELIB6Matrix19get_distances_norm2ERKS0_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.SGTELIB::Matrix" = type { ptr, %"class.std::__cxx11::basic_string", i32, i32, 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.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
@.str.107 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.108 = external hidden unnamed_addr constant [2 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

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)

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

; Function Attrs: nounwind
declare double @sqrt(double noundef) #5

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7SGTELIB6Matrix19get_distances_norm2ERKS0_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 %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator", align 1
  %14 = alloca i1, align 1
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i1, align 1
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::allocator", align 1
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  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
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %25)
  store i32 %26, ptr %7, align 4, !tbaa !9
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %27)
  %29 = load i32, ptr %7, align 4, !tbaa !9
  %30 = icmp ne i32 %28, %29
  br i1 %30, label %31, label %53

31:                                               ; preds = %3
  store i1 true, ptr %14, align 1
  %32 = call ptr @__cxa_allocate_exception(i64 112) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef @.str.4, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %33 unwind label %36

33:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %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 @.str.107, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %34 unwind label %40

34:                                               ; preds = %33
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %32, ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef 2652, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %35 unwind label %44

35:                                               ; preds = %34
  store i1 false, ptr %14, align 1
  invoke void @__cxa_throw(ptr %32, ptr @_ZTIN7SGTELIB9ExceptionE, ptr @_ZN7SGTELIB9ExceptionD2Ev) #7
          to label %145 unwind label %44

36:                                               ; preds = %31
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %10, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %11, align 4
  br label %49

40:                                               ; preds = %33
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %10, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %11, align 4
  br label %48

44:                                               ; preds = %35, %34
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %10, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  br label %48

48:                                               ; preds = %44, %40
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  br label %49

49:                                               ; preds = %48, %36
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  %50 = load i1, ptr %14, align 1
  br i1 %50, label %51, label %52

51:                                               ; preds = %49
  call void @__cxa_free_exception(ptr %32) #6
  br label %52

52:                                               ; preds = %51, %49
  br label %139

53:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %54)
  store i32 %55, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %56)
  store i32 %57, ptr %16, align 4, !tbaa !9
  store i1 false, ptr %17, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef @.str.108, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %58 unwind label %107

58:                                               ; preds = %53
  %59 = load i32, ptr %15, align 4, !tbaa !9
  %60 = load i32, ptr %16, 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) %18, i32 noundef %59, i32 noundef %60)
          to label %61 unwind label %111

61:                                               ; preds = %58
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %62

62:                                               ; preds = %132, %61
  %63 = load i32, ptr %22, align 4, !tbaa !9
  %64 = load i32, ptr %15, align 4, !tbaa !9
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %66, label %135

66:                                               ; preds = %62
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %67

67:                                               ; preds = %128, %66
  %68 = load i32, ptr %23, align 4, !tbaa !9
  %69 = load i32, ptr %16, align 4, !tbaa !9
  %70 = icmp slt i32 %68, %69
  br i1 %70, label %71, label %131

71:                                               ; preds = %67
  store double 0.000000e+00, ptr %20, align 8, !tbaa !11
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %72

72:                                               ; preds = %104, %71
  %73 = load i32, ptr %24, align 4, !tbaa !9
  %74 = load i32, ptr %7, align 4, !tbaa !9
  %75 = icmp slt i32 %73, %74
  br i1 %75, label %76, label %116

76:                                               ; preds = %72
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %77, i32 0, i32 4
  %79 = load ptr, ptr %78, align 8, !tbaa !13
  %80 = load i32, ptr %22, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds ptr, ptr %79, i64 %81
  %83 = load ptr, ptr %82, align 8, !tbaa !5
  %84 = load i32, ptr %24, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds double, ptr %83, i64 %85
  %87 = load double, ptr %86, align 8, !tbaa !11
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %88, i32 0, i32 4
  %90 = load ptr, ptr %89, align 8, !tbaa !13
  %91 = load i32, ptr %23, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds ptr, ptr %90, i64 %92
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  %95 = load i32, ptr %24, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds double, ptr %94, i64 %96
  %98 = load double, ptr %97, align 8, !tbaa !11
  %99 = fsub double %87, %98
  store double %99, ptr %21, align 8, !tbaa !11
  %100 = load double, ptr %21, align 8, !tbaa !11
  %101 = load double, ptr %21, align 8, !tbaa !11
  %102 = load double, ptr %20, align 8, !tbaa !11
  %103 = call double @llvm.fmuladd.f64(double %100, double %101, double %102)
  store double %103, ptr %20, align 8, !tbaa !11
  br label %104

104:                                              ; preds = %76
  %105 = load i32, ptr %24, align 4, !tbaa !9
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %24, align 4, !tbaa !9
  br label %72, !llvm.loop !18

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

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

115:                                              ; preds = %111, %107
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %139

116:                                              ; preds = %72
  %117 = load double, ptr %20, align 8, !tbaa !11
  %118 = call double @sqrt(double noundef %117) #6
  %119 = getelementptr inbounds %"class.SGTELIB::Matrix", ptr %0, i32 0, i32 4
  %120 = load ptr, ptr %119, align 8, !tbaa !13
  %121 = load i32, ptr %22, align 4, !tbaa !9
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds ptr, ptr %120, i64 %122
  %124 = load ptr, ptr %123, align 8, !tbaa !5
  %125 = load i32, ptr %23, align 4, !tbaa !9
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds double, ptr %124, i64 %126
  store double %118, ptr %127, align 8, !tbaa !11
  br label %128

128:                                              ; preds = %116
  %129 = load i32, ptr %23, align 4, !tbaa !9
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %23, align 4, !tbaa !9
  br label %67, !llvm.loop !20

131:                                              ; preds = %67
  br label %132

132:                                              ; preds = %131
  %133 = load i32, ptr %22, align 4, !tbaa !9
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %22, align 4, !tbaa !9
  br label %62, !llvm.loop !21

135:                                              ; preds = %62
  store i1 true, ptr %17, align 1
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  %136 = load i1, ptr %17, align 1
  br i1 %136, label %138, label %137

137:                                              ; preds = %135
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #6
  br label %138

138:                                              ; preds = %137, %135
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  ret void

139:                                              ; preds = %115, %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %140

140:                                              ; preds = %139
  %141 = load ptr, ptr %10, align 8
  %142 = load i32, ptr %11, align 4
  %143 = insertvalue { ptr, i32 } poison, ptr %141, 0
  %144 = insertvalue { ptr, i32 } %143, i32 %142, 1
  resume { ptr, i32 } %144

145:                                              ; preds = %35
  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 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = { 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, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !6, i64 48}
!14 = !{!"_ZTSN7SGTELIB6MatrixE", !15, i64 8, !10, i64 40, !10, i64 44, !6, i64 48}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !16, i64 0, !17, i64 8, !7, i64 16}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !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.SGTELIB::Matrix" = type { ptr, %"class.std::__cxx11::basic_string", i32, i32, 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.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
@.str.107 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.108 = external hidden unnamed_addr constant [2 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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #3 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 #3 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7SGTELIB6Matrix19get_distances_norm2ERKS0_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::allocator", align 1
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = tail call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %11 = tail call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %2)
  %.not = icmp eq i32 %11, %10
  br i1 %.not, label %24, label %12

12:                                               ; preds = %3
  %13 = tail call ptr @__cxa_allocate_exception(i64 112) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.4, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %14 unwind label %.thread

14:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.107, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %15 unwind label %18

15:                                               ; preds = %14
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %13, ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef 2652, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %16 unwind label %20

16:                                               ; preds = %15
  invoke void @__cxa_throw(ptr nonnull %13, ptr nonnull @_ZTIN7SGTELIB9ExceptionE, ptr nonnull @_ZN7SGTELIB9ExceptionD2Ev) #8
          to label %104 unwind label %20

.thread:                                          ; preds = %12
  %17 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  br label %23

18:                                               ; preds = %14
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %22

20:                                               ; preds = %16, %15
  %.039 = phi i1 [ false, %16 ], [ true, %15 ]
  %21 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  br label %22

22:                                               ; preds = %18, %20
  %.140 = phi i1 [ %.039, %20 ], [ true, %18 ]
  %.pn44 = phi { ptr, i32 } [ %21, %20 ], [ %19, %18 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  br i1 %.140, label %23, label %103

23:                                               ; preds = %.thread, %22
  %.pn44.pn50 = phi { ptr, i32 } [ %17, %.thread ], [ %.pn44, %22 ]
  call void @__cxa_free_exception(ptr %13) #7
  br label %103

24:                                               ; preds = %3
  %25 = tail call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %26 = tail call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %2)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.108, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %27 unwind label %96

27:                                               ; preds = %24
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef %25, i32 noundef %26)
          to label %28 unwind label %98

28:                                               ; preds = %27
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  %29 = icmp sgt i32 %25, 0
  br i1 %29, label %.preheader51.lr.ph, label %._crit_edge

.preheader51.lr.ph:                               ; preds = %28
  %30 = icmp sgt i32 %26, 0
  %31 = getelementptr inbounds i8, ptr %1, i64 48
  %32 = getelementptr inbounds i8, ptr %2, i64 48
  %33 = getelementptr inbounds i8, ptr %0, i64 48
  br i1 %30, label %.preheader51.lr.ph.split.us, label %._crit_edge

.preheader51.lr.ph.split.us:                      ; preds = %.preheader51.lr.ph
  %34 = icmp sgt i32 %10, 0
  br i1 %34, label %.preheader51.us.us.preheader, label %.preheader51.us.preheader

.preheader51.us.preheader:                        ; preds = %.preheader51.lr.ph.split.us
  %35 = zext nneg i32 %26 to i64
  %36 = shl nuw nsw i64 %35, 3
  %wide.trip.count = zext nneg i32 %25 to i64
  %.pre = load ptr, ptr %33, align 8, !tbaa !5
  %xtraiter = and i64 %wide.trip.count, 7
  %37 = icmp ult i32 %25, 8
  br i1 %37, label %._crit_edge.loopexit82.unr-lcssa, label %.preheader51.us.preheader.new

.preheader51.us.preheader.new:                    ; preds = %.preheader51.us.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483640
  br label %.preheader51.us

.preheader51.us.us.preheader:                     ; preds = %.preheader51.lr.ph.split.us
  %wide.trip.count78 = zext nneg i32 %25 to i64
  %wide.trip.count73 = zext nneg i32 %26 to i64
  %wide.trip.count68 = zext nneg i32 %10 to i64
  %xtraiter83 = and i64 %wide.trip.count68, 3
  %38 = icmp ult i32 %10, 4
  %unroll_iter87 = and i64 %wide.trip.count68, 2147483644
  %lcmp.mod85.not = icmp eq i64 %xtraiter83, 0
  br label %.preheader51.us.us

.preheader51.us.us:                               ; preds = %.preheader51.us.us.preheader, %._crit_edge55.split.us.us.us
  %indvars.iv75 = phi i64 [ 0, %.preheader51.us.us.preheader ], [ %indvars.iv.next76, %._crit_edge55.split.us.us.us ]
  br label %.preheader.us.us.us

.preheader.us.us.us:                              ; preds = %._crit_edge.us.us.us, %.preheader51.us.us
  %indvars.iv70 = phi i64 [ %indvars.iv.next71, %._crit_edge.us.us.us ], [ 0, %.preheader51.us.us ]
  %39 = load ptr, ptr %31, align 8, !tbaa !5
  %40 = getelementptr inbounds ptr, ptr %39, i64 %indvars.iv75
  %41 = load ptr, ptr %40, align 8, !tbaa !14
  %42 = load ptr, ptr %32, align 8, !tbaa !5
  %43 = getelementptr inbounds ptr, ptr %42, i64 %indvars.iv70
  %44 = load ptr, ptr %43, align 8, !tbaa !14
  br i1 %38, label %._crit_edge.us.us.us.unr-lcssa, label %.preheader.us.us.us.new

.preheader.us.us.us.new:                          ; preds = %.preheader.us.us.us, %.preheader.us.us.us.new
  %indvars.iv65 = phi i64 [ %indvars.iv.next66.3, %.preheader.us.us.us.new ], [ 0, %.preheader.us.us.us ]
  %.03452.us.us.us = phi double [ %68, %.preheader.us.us.us.new ], [ 0.000000e+00, %.preheader.us.us.us ]
  %niter88 = phi i64 [ %niter88.next.3, %.preheader.us.us.us.new ], [ 0, %.preheader.us.us.us ]
  %45 = getelementptr inbounds double, ptr %41, i64 %indvars.iv65
  %46 = load double, ptr %45, align 8, !tbaa !15
  %47 = getelementptr inbounds double, ptr %44, i64 %indvars.iv65
  %48 = load double, ptr %47, align 8, !tbaa !15
  %49 = fsub double %46, %48
  %50 = call double @llvm.fmuladd.f64(double %49, double %49, double %.03452.us.us.us)
  %indvars.iv.next66 = or disjoint i64 %indvars.iv65, 1
  %51 = getelementptr inbounds double, ptr %41, i64 %indvars.iv.next66
  %52 = load double, ptr %51, align 8, !tbaa !15
  %53 = getelementptr inbounds double, ptr %44, i64 %indvars.iv.next66
  %54 = load double, ptr %53, align 8, !tbaa !15
  %55 = fsub double %52, %54
  %56 = call double @llvm.fmuladd.f64(double %55, double %55, double %50)
  %indvars.iv.next66.1 = or disjoint i64 %indvars.iv65, 2
  %57 = getelementptr inbounds double, ptr %41, i64 %indvars.iv.next66.1
  %58 = load double, ptr %57, align 8, !tbaa !15
  %59 = getelementptr inbounds double, ptr %44, i64 %indvars.iv.next66.1
  %60 = load double, ptr %59, align 8, !tbaa !15
  %61 = fsub double %58, %60
  %62 = call double @llvm.fmuladd.f64(double %61, double %61, double %56)
  %indvars.iv.next66.2 = or disjoint i64 %indvars.iv65, 3
  %63 = getelementptr inbounds double, ptr %41, i64 %indvars.iv.next66.2
  %64 = load double, ptr %63, align 8, !tbaa !15
  %65 = getelementptr inbounds double, ptr %44, i64 %indvars.iv.next66.2
  %66 = load double, ptr %65, align 8, !tbaa !15
  %67 = fsub double %64, %66
  %68 = call double @llvm.fmuladd.f64(double %67, double %67, double %62)
  %indvars.iv.next66.3 = add nuw nsw i64 %indvars.iv65, 4
  %niter88.next.3 = add i64 %niter88, 4
  %niter88.ncmp.3 = icmp eq i64 %niter88.next.3, %unroll_iter87
  br i1 %niter88.ncmp.3, label %._crit_edge.us.us.us.unr-lcssa, label %.preheader.us.us.us.new, !llvm.loop !17

._crit_edge.us.us.us.unr-lcssa:                   ; preds = %.preheader.us.us.us.new, %.preheader.us.us.us
  %.lcssa.ph = phi double [ poison, %.preheader.us.us.us ], [ %68, %.preheader.us.us.us.new ]
  %indvars.iv65.unr = phi i64 [ 0, %.preheader.us.us.us ], [ %indvars.iv.next66.3, %.preheader.us.us.us.new ]
  %.03452.us.us.us.unr = phi double [ 0.000000e+00, %.preheader.us.us.us ], [ %68, %.preheader.us.us.us.new ]
  br i1 %lcmp.mod85.not, label %._crit_edge.us.us.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.us.us.us.unr-lcssa, %.epil.preheader
  %indvars.iv65.epil = phi i64 [ %indvars.iv.next66.epil, %.epil.preheader ], [ %indvars.iv65.unr, %._crit_edge.us.us.us.unr-lcssa ]
  %.03452.us.us.us.epil = phi double [ %74, %.epil.preheader ], [ %.03452.us.us.us.unr, %._crit_edge.us.us.us.unr-lcssa ]
  %epil.iter84 = phi i64 [ %epil.iter84.next, %.epil.preheader ], [ 0, %._crit_edge.us.us.us.unr-lcssa ]
  %69 = getelementptr inbounds double, ptr %41, i64 %indvars.iv65.epil
  %70 = load double, ptr %69, align 8, !tbaa !15
  %71 = getelementptr inbounds double, ptr %44, i64 %indvars.iv65.epil
  %72 = load double, ptr %71, align 8, !tbaa !15
  %73 = fsub double %70, %72
  %74 = call double @llvm.fmuladd.f64(double %73, double %73, double %.03452.us.us.us.epil)
  %indvars.iv.next66.epil = add nuw nsw i64 %indvars.iv65.epil, 1
  %epil.iter84.next = add i64 %epil.iter84, 1
  %epil.iter84.cmp.not = icmp eq i64 %epil.iter84.next, %xtraiter83
  br i1 %epil.iter84.cmp.not, label %._crit_edge.us.us.us, label %.epil.preheader, !llvm.loop !19

._crit_edge.us.us.us:                             ; preds = %.epil.preheader, %._crit_edge.us.us.us.unr-lcssa
  %.lcssa = phi double [ %.lcssa.ph, %._crit_edge.us.us.us.unr-lcssa ], [ %74, %.epil.preheader ]
  %75 = call double @sqrt(double noundef %.lcssa) #7
  %76 = load ptr, ptr %33, align 8, !tbaa !5
  %77 = getelementptr inbounds ptr, ptr %76, i64 %indvars.iv75
  %78 = load ptr, ptr %77, align 8, !tbaa !14
  %79 = getelementptr inbounds double, ptr %78, i64 %indvars.iv70
  store double %75, ptr %79, align 8, !tbaa !15
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %exitcond74.not = icmp eq i64 %indvars.iv.next71, %wide.trip.count73
  br i1 %exitcond74.not, label %._crit_edge55.split.us.us.us, label %.preheader.us.us.us, !llvm.loop !21

._crit_edge55.split.us.us.us:                     ; preds = %._crit_edge.us.us.us
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %exitcond79.not = icmp eq i64 %indvars.iv.next76, %wide.trip.count78
  br i1 %exitcond79.not, label %._crit_edge, label %.preheader51.us.us, !llvm.loop !22

.preheader51.us:                                  ; preds = %.preheader51.us, %.preheader51.us.preheader.new
  %indvars.iv = phi i64 [ 0, %.preheader51.us.preheader.new ], [ %indvars.iv.next.7, %.preheader51.us ]
  %niter = phi i64 [ 0, %.preheader51.us.preheader.new ], [ %niter.next.7, %.preheader51.us ]
  %80 = getelementptr inbounds ptr, ptr %.pre, i64 %indvars.iv
  %81 = load ptr, ptr %80, align 8, !tbaa !14
  call void @llvm.memset.p0.i64(ptr align 8 %81, i8 0, i64 %36, i1 false), !tbaa !15
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %82 = getelementptr inbounds ptr, ptr %.pre, i64 %indvars.iv.next
  %83 = load ptr, ptr %82, align 8, !tbaa !14
  call void @llvm.memset.p0.i64(ptr align 8 %83, i8 0, i64 %36, i1 false), !tbaa !15
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %84 = getelementptr inbounds ptr, ptr %.pre, i64 %indvars.iv.next.1
  %85 = load ptr, ptr %84, align 8, !tbaa !14
  call void @llvm.memset.p0.i64(ptr align 8 %85, i8 0, i64 %36, i1 false), !tbaa !15
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %86 = getelementptr inbounds ptr, ptr %.pre, i64 %indvars.iv.next.2
  %87 = load ptr, ptr %86, align 8, !tbaa !14
  call void @llvm.memset.p0.i64(ptr align 8 %87, i8 0, i64 %36, i1 false), !tbaa !15
  %indvars.iv.next.3 = or disjoint i64 %indvars.iv, 4
  %88 = getelementptr inbounds ptr, ptr %.pre, i64 %indvars.iv.next.3
  %89 = load ptr, ptr %88, align 8, !tbaa !14
  call void @llvm.memset.p0.i64(ptr align 8 %89, i8 0, i64 %36, i1 false), !tbaa !15
  %indvars.iv.next.4 = or disjoint i64 %indvars.iv, 5
  %90 = getelementptr inbounds ptr, ptr %.pre, i64 %indvars.iv.next.4
  %91 = load ptr, ptr %90, align 8, !tbaa !14
  call void @llvm.memset.p0.i64(ptr align 8 %91, i8 0, i64 %36, i1 false), !tbaa !15
  %indvars.iv.next.5 = or disjoint i64 %indvars.iv, 6
  %92 = getelementptr inbounds ptr, ptr %.pre, i64 %indvars.iv.next.5
  %93 = load ptr, ptr %92, align 8, !tbaa !14
  call void @llvm.memset.p0.i64(ptr align 8 %93, i8 0, i64 %36, i1 false), !tbaa !15
  %indvars.iv.next.6 = or disjoint i64 %indvars.iv, 7
  %94 = getelementptr inbounds ptr, ptr %.pre, i64 %indvars.iv.next.6
  %95 = load ptr, ptr %94, align 8, !tbaa !14
  call void @llvm.memset.p0.i64(ptr align 8 %95, i8 0, i64 %36, i1 false), !tbaa !15
  %indvars.iv.next.7 = add nuw nsw i64 %indvars.iv, 8
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %._crit_edge.loopexit82.unr-lcssa, label %.preheader51.us, !llvm.loop !22

96:                                               ; preds = %24
  %97 = landingpad { ptr, i32 }
          cleanup
  br label %100

98:                                               ; preds = %27
  %99 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  br label %100

100:                                              ; preds = %98, %96
  %.pn = phi { ptr, i32 } [ %99, %98 ], [ %97, %96 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  br label %103

._crit_edge.loopexit82.unr-lcssa:                 ; preds = %.preheader51.us, %.preheader51.us.preheader
  %indvars.iv.unr = phi i64 [ 0, %.preheader51.us.preheader ], [ %indvars.iv.next.7, %.preheader51.us ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.preheader51.us.epil

.preheader51.us.epil:                             ; preds = %._crit_edge.loopexit82.unr-lcssa, %.preheader51.us.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.preheader51.us.epil ], [ %indvars.iv.unr, %._crit_edge.loopexit82.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.preheader51.us.epil ], [ 0, %._crit_edge.loopexit82.unr-lcssa ]
  %101 = getelementptr inbounds ptr, ptr %.pre, i64 %indvars.iv.epil
  %102 = load ptr, ptr %101, align 8, !tbaa !14
  call void @llvm.memset.p0.i64(ptr align 8 %102, i8 0, i64 %36, i1 false), !tbaa !15
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.preheader51.us.epil, !llvm.loop !23

._crit_edge:                                      ; preds = %._crit_edge.loopexit82.unr-lcssa, %.preheader51.us.epil, %._crit_edge55.split.us.us.us, %.preheader51.lr.ph, %28
  ret void

103:                                              ; preds = %22, %23, %100
  %.pn44.pn.pn = phi { ptr, i32 } [ %.pn44.pn50, %23 ], [ %.pn44, %22 ], [ %.pn, %100 ]
  resume { ptr, i32 } %.pn44.pn.pn

104:                                              ; preds = %16
  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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { mustprogress nofree nounwind willreturn memory(write) "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { 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}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.unroll.disable"}
!21 = distinct !{!21, !18}
!22 = distinct !{!22, !18}
!23 = distinct !{!23, !20}


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