; LLVM IR from rdguez-mariano/fast_imas_IPOL :: libOrsa (fundamental_model)

; 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.libNumerics::matrix" = type { ptr, i32, i32, ptr }
%"class.libNumerics::vector" = type { %"class.libNumerics::matrix" }

; 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 uwtable
declare dso_local void @_ZN11libNumerics6matrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4orsa16FundamentalModel7algo7ptERKN11libNumerics6matrixIdEEPSt6vectorIS3_SaIS3_EE(ptr noundef nonnull align 8 dereferenceable(122) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef %2) #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.libNumerics::matrix", align 8
  %8 = alloca %"class.libNumerics::matrix", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.libNumerics::vector", align 8
  %12 = alloca %"class.libNumerics::vector", align 8
  %13 = alloca %"class.libNumerics::vector", align 8
  %14 = alloca %"class.libNumerics::vector", align 8
  %15 = alloca %"class.libNumerics::vector", align 8
  %16 = alloca %"class.libNumerics::vector", align 8
  %17 = alloca [4 x double], align 16
  %18 = alloca [3 x double], align 16
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %"class.libNumerics::matrix", align 8
  %22 = alloca %"class.libNumerics::matrix", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %23 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #6
  call void @_ZN11libNumerics6matrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef 3, i32 noundef 3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #6
  invoke void @_ZN11libNumerics6matrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 3, i32 noundef 3)
          to label %24 unwind label %72

24:                                               ; preds = %3
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN11libNumerics3SVD18Nullspace2_Remap33ERKNS_6matrixIdEERS2_S5_(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %26 unwind label %76

26:                                               ; preds = %24
  invoke void @_ZN11libNumerics6matrixIdEmIERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %27 unwind label %76

27:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #6
  invoke void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind writable sret(%"class.libNumerics::vector") align 8 %11, ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef 0)
          to label %28 unwind label %80

28:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #6
  invoke void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind writable sret(%"class.libNumerics::vector") align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef 1)
          to label %29 unwind label %84

29:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #6
  invoke void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind writable sret(%"class.libNumerics::vector") align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef 2)
          to label %30 unwind label %88

30:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #6
  invoke void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind writable sret(%"class.libNumerics::vector") align 8 %14, ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 0)
          to label %31 unwind label %92

31:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #6
  invoke void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind writable sret(%"class.libNumerics::vector") align 8 %15, ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 1)
          to label %32 unwind label %96

32:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #6
  invoke void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind writable sret(%"class.libNumerics::vector") align 8 %16, ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 2)
          to label %33 unwind label %100

33:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #6
  %34 = invoke noundef double @_ZN4orsa4det3ERKN11libNumerics6vectorIdEES4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %35 unwind label %104

35:                                               ; preds = %33
  store double %34, ptr %17, align 8, !tbaa !9
  %36 = getelementptr inbounds double, ptr %17, i64 1
  %37 = invoke noundef double @_ZN4orsa4det3ERKN11libNumerics6vectorIdEES4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %38 unwind label %104

38:                                               ; preds = %35
  %39 = invoke noundef double @_ZN4orsa4det3ERKN11libNumerics6vectorIdEES4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %40 unwind label %104

40:                                               ; preds = %38
  %41 = fadd double %37, %39
  %42 = invoke noundef double @_ZN4orsa4det3ERKN11libNumerics6vectorIdEES4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %43 unwind label %104

43:                                               ; preds = %40
  %44 = fadd double %41, %42
  store double %44, ptr %36, align 8, !tbaa !9
  %45 = getelementptr inbounds double, ptr %17, i64 2
  %46 = invoke noundef double @_ZN4orsa4det3ERKN11libNumerics6vectorIdEES4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %47 unwind label %104

47:                                               ; preds = %43
  %48 = invoke noundef double @_ZN4orsa4det3ERKN11libNumerics6vectorIdEES4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %49 unwind label %104

49:                                               ; preds = %47
  %50 = fadd double %46, %48
  %51 = invoke noundef double @_ZN4orsa4det3ERKN11libNumerics6vectorIdEES4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %52 unwind label %104

52:                                               ; preds = %49
  %53 = fadd double %50, %51
  store double %53, ptr %45, align 8, !tbaa !9
  %54 = getelementptr inbounds double, ptr %17, i64 3
  %55 = invoke noundef double @_ZN4orsa4det3ERKN11libNumerics6vectorIdEES4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %56 unwind label %104

56:                                               ; preds = %52
  store double %55, ptr %54, align 8, !tbaa !9
  %57 = getelementptr inbounds [4 x double], ptr %17, i64 0, i64 0
  %58 = load double, ptr %57, align 16, !tbaa !9
  %59 = invoke noundef double @_ZSt3absd(double noundef %58)
          to label %60 unwind label %104

60:                                               ; preds = %56
  %61 = getelementptr inbounds [4 x double], ptr %17, i64 0, i64 3
  %62 = load double, ptr %61, align 8, !tbaa !9
  %63 = invoke noundef double @_ZSt3absd(double noundef %62)
          to label %64 unwind label %104

64:                                               ; preds = %60
  %65 = fcmp ogt double %59, %63
  br i1 %65, label %66, label %108

66:                                               ; preds = %64
  invoke void @_ZN11libNumerics4swapIdEEvRNS_6matrixIT_EES4_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %67 unwind label %104

67:                                               ; preds = %66
  %68 = getelementptr inbounds [4 x double], ptr %17, i64 0, i64 0
  %69 = getelementptr inbounds [4 x double], ptr %17, i64 0, i64 3
  call void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %68, ptr noundef nonnull align 8 dereferenceable(8) %69) #6
  %70 = getelementptr inbounds [4 x double], ptr %17, i64 0, i64 1
  %71 = getelementptr inbounds [4 x double], ptr %17, i64 0, i64 2
  call void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %70, ptr noundef nonnull align 8 dereferenceable(8) %71) #6
  br label %108

72:                                               ; preds = %3
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %9, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %10, align 4
  br label %158

76:                                               ; preds = %26, %24
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %9, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %10, align 4
  br label %157

80:                                               ; preds = %27
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %9, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %10, align 4
  br label %156

84:                                               ; preds = %28
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %9, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %10, align 4
  br label %155

88:                                               ; preds = %29
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %9, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %10, align 4
  br label %154

92:                                               ; preds = %30
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %9, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %10, align 4
  br label %153

96:                                               ; preds = %31
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %9, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %10, align 4
  br label %152

100:                                              ; preds = %32
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %9, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %10, align 4
  br label %151

104:                                              ; preds = %66, %60, %56, %52, %49, %47, %43, %40, %38, %35, %33
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %9, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %10, align 4
  br label %150

108:                                              ; preds = %67, %64
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %109 = getelementptr inbounds [4 x double], ptr %17, i64 0, i64 0
  %110 = getelementptr inbounds [3 x double], ptr %18, i64 0, i64 0
  %111 = invoke noundef i32 @_ZN4orsa10CubicRootsIdEEiPKT_PS1_(ptr noundef %109, ptr noundef %110)
          to label %112 unwind label %118

112:                                              ; preds = %108
  store i32 %111, ptr %19, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !11
  br label %113

113:                                              ; preds = %131, %112
  %114 = load i32, ptr %20, align 4, !tbaa !11
  %115 = load i32, ptr %19, align 4, !tbaa !11
  %116 = icmp slt i32 %114, %115
  br i1 %116, label %122, label %117

117:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %148

118:                                              ; preds = %108
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %9, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %10, align 4
  br label %149

122:                                              ; preds = %113
  %123 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #6
  %124 = load i32, ptr %20, align 4, !tbaa !11
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [3 x double], ptr %18, i64 0, i64 %125
  %127 = load double, ptr %126, align 8, !tbaa !9
  invoke void @_ZN11libNumericsmlEdRKNS_6matrixIdEE(ptr dead_on_unwind writable sret(%"class.libNumerics::matrix") align 8 %22, double noundef %127, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %128 unwind label %134

128:                                              ; preds = %122
  invoke void @_ZNK11libNumerics6matrixIdEplERKS1_(ptr dead_on_unwind writable sret(%"class.libNumerics::matrix") align 8 %21, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %22)
          to label %129 unwind label %138

129:                                              ; preds = %128
  invoke void @_ZNSt6vectorIN11libNumerics6matrixIdEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %123, ptr noundef nonnull align 8 dereferenceable(24) %21)
          to label %130 unwind label %142

130:                                              ; preds = %129
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #6
  br label %131

131:                                              ; preds = %130
  %132 = load i32, ptr %20, align 4, !tbaa !11
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %20, align 4, !tbaa !11
  br label %113, !llvm.loop !13

134:                                              ; preds = %122
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %9, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %10, align 4
  br label %147

138:                                              ; preds = %128
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %9, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %10, align 4
  br label %146

142:                                              ; preds = %129
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %9, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %10, align 4
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  br label %146

146:                                              ; preds = %142, %138
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #6
  br label %147

147:                                              ; preds = %146, %134
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %149

148:                                              ; preds = %117
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  ret void

149:                                              ; preds = %147, %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  br label %150

150:                                              ; preds = %149, %104
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  br label %151

151:                                              ; preds = %150, %100
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  br label %152

152:                                              ; preds = %151, %96
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  br label %153

153:                                              ; preds = %152, %92
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  br label %154

154:                                              ; preds = %153, %88
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  br label %155

155:                                              ; preds = %154, %84
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  br label %156

156:                                              ; preds = %155, %80
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #6
  br label %157

157:                                              ; preds = %156, %76
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  br label %158

158:                                              ; preds = %157, %72
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  br label %159

159:                                              ; preds = %158
  %160 = load ptr, ptr %9, align 8
  %161 = load i32, ptr %10, align 4
  %162 = insertvalue { ptr, i32 } poison, ptr %160, 0
  %163 = insertvalue { ptr, i32 } %162, i32 %161, 1
  resume { ptr, i32 } %163
}

declare void @_ZN11libNumerics3SVD18Nullspace2_Remap33ERKNS_6matrixIdEERS2_S5_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11libNumerics6matrixIdEmIERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind noalias writable sret(%"class.libNumerics::vector") align 8, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZN4orsa4det3ERKN11libNumerics6vectorIdEES4_S4_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11libNumerics4swapIdEEvRNS_6matrixIT_EES4_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK11libNumerics6matrixIdEplERKS1_(ptr dead_on_unwind noalias writable sret(%"class.libNumerics::matrix") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11libNumericsmlEdRKNS_6matrixIdEE(ptr dead_on_unwind noalias writable sret(%"class.libNumerics::matrix") align 8, double noundef, ptr noundef nonnull align 8 dereferenceable(24)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; 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.libNumerics::matrix" = type { ptr, i32, i32, ptr }
%"class.libNumerics::vector" = type { %"class.libNumerics::matrix" }

; 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 uwtable
declare dso_local void @_ZN11libNumerics6matrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4orsa16FundamentalModel7algo7ptERKN11libNumerics6matrixIdEEPSt6vectorIS3_SaIS3_EE(ptr nocapture noundef nonnull readnone align 8 dereferenceable(122) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.libNumerics::matrix", align 8
  %5 = alloca %"class.libNumerics::matrix", align 8
  %6 = alloca %"class.libNumerics::vector", align 8
  %7 = alloca %"class.libNumerics::vector", align 8
  %8 = alloca %"class.libNumerics::vector", align 8
  %9 = alloca %"class.libNumerics::vector", align 8
  %10 = alloca %"class.libNumerics::vector", align 8
  %11 = alloca %"class.libNumerics::vector", align 8
  %12 = alloca [4 x double], align 16
  %13 = alloca [3 x double], align 16
  %14 = alloca %"class.libNumerics::matrix", align 8
  %15 = alloca %"class.libNumerics::matrix", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  call void @_ZN11libNumerics6matrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef 3, i32 noundef 3)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  invoke void @_ZN11libNumerics6matrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef 3, i32 noundef 3)
          to label %16 unwind label %51

16:                                               ; preds = %3
  invoke void @_ZN11libNumerics3SVD18Nullspace2_Remap33ERKNS_6matrixIdEERS2_S5_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %17 unwind label %53

17:                                               ; preds = %16
  call void @_ZN11libNumerics6matrixIdEmIERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  invoke void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind nonnull writable sret(%"class.libNumerics::vector") align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef 0)
          to label %18 unwind label %55

18:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  invoke void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind nonnull writable sret(%"class.libNumerics::vector") align 8 %7, ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef 1)
          to label %19 unwind label %57

19:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #6
  invoke void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind nonnull writable sret(%"class.libNumerics::vector") align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef 2)
          to label %20 unwind label %59

20:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #6
  invoke void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind nonnull writable sret(%"class.libNumerics::vector") align 8 %9, ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef 0)
          to label %21 unwind label %61

21:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #6
  invoke void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind nonnull writable sret(%"class.libNumerics::vector") align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef 1)
          to label %22 unwind label %63

22:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #6
  invoke void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind nonnull writable sret(%"class.libNumerics::vector") align 8 %11, ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef 2)
          to label %23 unwind label %65

23:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #6
  %24 = invoke noundef double @_ZN4orsa4det3ERKN11libNumerics6vectorIdEES4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %25 unwind label %67

25:                                               ; preds = %23
  store double %24, ptr %12, align 16, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %12, i64 8
  %27 = invoke noundef double @_ZN4orsa4det3ERKN11libNumerics6vectorIdEES4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %28 unwind label %67

28:                                               ; preds = %25
  %29 = invoke noundef double @_ZN4orsa4det3ERKN11libNumerics6vectorIdEES4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %30 unwind label %67

30:                                               ; preds = %28
  %31 = invoke noundef double @_ZN4orsa4det3ERKN11libNumerics6vectorIdEES4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %32 unwind label %67

32:                                               ; preds = %30
  %33 = fadd double %27, %29
  %34 = fadd double %33, %31
  store double %34, ptr %26, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %12, i64 16
  %36 = invoke noundef double @_ZN4orsa4det3ERKN11libNumerics6vectorIdEES4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %37 unwind label %67

37:                                               ; preds = %32
  %38 = invoke noundef double @_ZN4orsa4det3ERKN11libNumerics6vectorIdEES4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %39 unwind label %67

39:                                               ; preds = %37
  %40 = invoke noundef double @_ZN4orsa4det3ERKN11libNumerics6vectorIdEES4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %41 unwind label %67

41:                                               ; preds = %39
  %42 = fadd double %36, %38
  %43 = fadd double %42, %40
  store double %43, ptr %35, align 16, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %12, i64 24
  %45 = invoke noundef double @_ZN4orsa4det3ERKN11libNumerics6vectorIdEES4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %46 unwind label %67

46:                                               ; preds = %41
  store double %45, ptr %44, align 8, !tbaa !5
  %47 = call noundef double @_ZSt3absd(double noundef %24)
  %48 = call noundef double @_ZSt3absd(double noundef %45)
  %49 = fcmp ogt double %47, %48
  br i1 %49, label %50, label %69

50:                                               ; preds = %46
  call void @_ZN11libNumerics4swapIdEEvRNS_6matrixIT_EES4_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5)
  call void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %44) #6
  call void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %35) #6
  br label %69

51:                                               ; preds = %3
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %96

53:                                               ; preds = %16
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %95

55:                                               ; preds = %17
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %94

57:                                               ; preds = %18
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %93

59:                                               ; preds = %19
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %92

61:                                               ; preds = %20
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %91

63:                                               ; preds = %21
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %90

65:                                               ; preds = %22
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %89

67:                                               ; preds = %41, %39, %37, %32, %30, %28, %25, %23
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %88

69:                                               ; preds = %50, %46
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #6
  %70 = invoke noundef i32 @_ZN4orsa10CubicRootsIdEEiPKT_PS1_(ptr noundef nonnull %12, ptr noundef nonnull %13)
          to label %.preheader unwind label %72

.preheader:                                       ; preds = %69
  %71 = icmp sgt i32 %70, 0
  br i1 %71, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.preheader
  %wide.trip.count = zext nneg i32 %70 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %78, %.preheader
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  ret void

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

.lr.ph:                                           ; preds = %.lr.ph.preheader, %78
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %78 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #6
  %74 = getelementptr inbounds [3 x double], ptr %13, i64 0, i64 %indvars.iv
  %75 = load double, ptr %74, align 8, !tbaa !5
  invoke void @_ZN11libNumericsmlEdRKNS_6matrixIdEE(ptr dead_on_unwind nonnull writable sret(%"class.libNumerics::matrix") align 8 %15, double noundef %75, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %76 unwind label %79

76:                                               ; preds = %.lr.ph
  invoke void @_ZNK11libNumerics6matrixIdEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.libNumerics::matrix") align 8 %14, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %77 unwind label %81

77:                                               ; preds = %76
  invoke void @_ZNSt6vectorIN11libNumerics6matrixIdEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %14)
          to label %78 unwind label %83

78:                                               ; preds = %77
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

79:                                               ; preds = %.lr.ph
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %86

81:                                               ; preds = %76
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %85

83:                                               ; preds = %77
  %84 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  br label %85

85:                                               ; preds = %83, %81
  %.pn = phi { ptr, i32 } [ %84, %83 ], [ %82, %81 ]
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  br label %86

86:                                               ; preds = %85, %79
  %.pn.pn = phi { ptr, i32 } [ %.pn, %85 ], [ %80, %79 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #6
  br label %87

87:                                               ; preds = %86, %72
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %86 ], [ %73, %72 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #6
  br label %88

88:                                               ; preds = %87, %67
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %87 ], [ %68, %67 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  br label %89

89:                                               ; preds = %88, %65
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %88 ], [ %66, %65 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  br label %90

90:                                               ; preds = %89, %63
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %89 ], [ %64, %63 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  br label %91

91:                                               ; preds = %90, %61
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %90 ], [ %62, %61 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  br label %92

92:                                               ; preds = %91, %59
  %.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn, %91 ], [ %60, %59 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  br label %93

93:                                               ; preds = %92, %57
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn, %92 ], [ %58, %57 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  br label %94

94:                                               ; preds = %93, %55
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn.pn, %93 ], [ %56, %55 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  br label %95

95:                                               ; preds = %94, %53
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %94 ], [ %54, %53 ]
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  br label %96

96:                                               ; preds = %95, %51
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %95 ], [ %52, %51 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn
}

declare void @_ZN11libNumerics3SVD18Nullspace2_Remap33ERKNS_6matrixIdEERS2_S5_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11libNumerics6matrixIdEmIERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK11libNumerics6matrixIdE3colEi(ptr dead_on_unwind noalias writable sret(%"class.libNumerics::vector") align 8, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZN4orsa4det3ERKN11libNumerics6vectorIdEES4_S4_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11libNumerics4swapIdEEvRNS_6matrixIT_EES4_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN11libNumerics6matrixIdEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK11libNumerics6matrixIdEplERKS1_(ptr dead_on_unwind noalias writable sret(%"class.libNumerics::matrix") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11libNumericsmlEdRKNS_6matrixIdEE(ptr dead_on_unwind noalias writable sret(%"class.libNumerics::matrix") align 8, double noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass