; LLVM IR from rdguez-mariano/fast_imas_IPOL :: libOrsa (homography_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" }
%"class.orsa::OrsaModel" = type <{ ptr, %"class.libNumerics::matrix", %"class.libNumerics::matrix", %"class.libNumerics::matrix", %"class.libNumerics::matrix", [2 x double], i8, [7 x i8] }>

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) #0 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4orsa15HomographyModel3FitERKSt6vectorIiSaIiEEPS1_IN11libNumerics6matrixIdEESaIS8_EE(ptr noundef nonnull align 8 dereferenceable(122) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef %2) unnamed_addr #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.libNumerics::matrix", align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.libNumerics::vector", align 8
  %15 = alloca %"class.libNumerics::matrix", align 8
  %16 = 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
  %17 = load ptr, ptr %4, align 8
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  %20 = icmp ugt i64 4, %19
  br i1 %20, label %21, label %22

21:                                               ; preds = %3
  br label %210

22:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  %25 = trunc i64 %24 to i32
  store i32 %25, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #6
  %26 = load i32, ptr %7, align 4, !tbaa !9
  %27 = mul nsw i32 %26, 2
  call void @_ZN11libNumerics6matrixIdE5zerosEii(ptr dead_on_unwind writable sret(%"class.libNumerics::matrix") align 8 %8, i32 noundef %27, i32 noundef 9)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %28

28:                                               ; preds = %145, %22
  %29 = load i32, ptr %9, align 4, !tbaa !9
  %30 = load i32, ptr %7, align 4, !tbaa !9
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %152

33:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = load i32, ptr %9, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef %36) #6
  %38 = load i32, ptr %37, align 4, !tbaa !9
  store i32 %38, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %39 = load i32, ptr %9, align 4, !tbaa !9
  %40 = mul nsw i32 2, %39
  store i32 %40, ptr %11, align 4, !tbaa !9
  %41 = getelementptr inbounds %"class.orsa::OrsaModel", ptr %17, i32 0, i32 1
  %42 = load i32, ptr %10, align 4, !tbaa !9
  %43 = invoke noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %41, i32 noundef 0, i32 noundef %42)
          to label %44 unwind label %148

44:                                               ; preds = %33
  %45 = load i32, ptr %11, align 4, !tbaa !9
  %46 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %45, i32 noundef 0)
          to label %47 unwind label %148

47:                                               ; preds = %44
  store double %43, ptr %46, align 8, !tbaa !11
  %48 = getelementptr inbounds %"class.orsa::OrsaModel", ptr %17, i32 0, i32 1
  %49 = load i32, ptr %10, align 4, !tbaa !9
  %50 = invoke noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %48, i32 noundef 1, i32 noundef %49)
          to label %51 unwind label %148

51:                                               ; preds = %47
  %52 = load i32, ptr %11, align 4, !tbaa !9
  %53 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %52, i32 noundef 1)
          to label %54 unwind label %148

54:                                               ; preds = %51
  store double %50, ptr %53, align 8, !tbaa !11
  %55 = load i32, ptr %11, align 4, !tbaa !9
  %56 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %55, i32 noundef 2)
          to label %57 unwind label %148

57:                                               ; preds = %54
  store double 1.000000e+00, ptr %56, align 8, !tbaa !11
  %58 = getelementptr inbounds %"class.orsa::OrsaModel", ptr %17, i32 0, i32 2
  %59 = load i32, ptr %10, align 4, !tbaa !9
  %60 = invoke noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %58, i32 noundef 0, i32 noundef %59)
          to label %61 unwind label %148

61:                                               ; preds = %57
  %62 = fneg double %60
  %63 = getelementptr inbounds %"class.orsa::OrsaModel", ptr %17, i32 0, i32 1
  %64 = load i32, ptr %10, align 4, !tbaa !9
  %65 = invoke noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %63, i32 noundef 0, i32 noundef %64)
          to label %66 unwind label %148

66:                                               ; preds = %61
  %67 = fmul double %62, %65
  %68 = load i32, ptr %11, align 4, !tbaa !9
  %69 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %68, i32 noundef 6)
          to label %70 unwind label %148

70:                                               ; preds = %66
  store double %67, ptr %69, align 8, !tbaa !11
  %71 = getelementptr inbounds %"class.orsa::OrsaModel", ptr %17, i32 0, i32 2
  %72 = load i32, ptr %10, align 4, !tbaa !9
  %73 = invoke noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %71, i32 noundef 0, i32 noundef %72)
          to label %74 unwind label %148

74:                                               ; preds = %70
  %75 = fneg double %73
  %76 = getelementptr inbounds %"class.orsa::OrsaModel", ptr %17, i32 0, i32 1
  %77 = load i32, ptr %10, align 4, !tbaa !9
  %78 = invoke noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %76, i32 noundef 1, i32 noundef %77)
          to label %79 unwind label %148

79:                                               ; preds = %74
  %80 = fmul double %75, %78
  %81 = load i32, ptr %11, align 4, !tbaa !9
  %82 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %81, i32 noundef 7)
          to label %83 unwind label %148

83:                                               ; preds = %79
  store double %80, ptr %82, align 8, !tbaa !11
  %84 = getelementptr inbounds %"class.orsa::OrsaModel", ptr %17, i32 0, i32 2
  %85 = load i32, ptr %10, align 4, !tbaa !9
  %86 = invoke noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %84, i32 noundef 0, i32 noundef %85)
          to label %87 unwind label %148

87:                                               ; preds = %83
  %88 = fneg double %86
  %89 = load i32, ptr %11, align 4, !tbaa !9
  %90 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %89, i32 noundef 8)
          to label %91 unwind label %148

91:                                               ; preds = %87
  store double %88, ptr %90, align 8, !tbaa !11
  %92 = load i32, ptr %11, align 4, !tbaa !9
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %11, align 4, !tbaa !9
  %94 = getelementptr inbounds %"class.orsa::OrsaModel", ptr %17, i32 0, i32 1
  %95 = load i32, ptr %10, align 4, !tbaa !9
  %96 = invoke noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %94, i32 noundef 0, i32 noundef %95)
          to label %97 unwind label %148

97:                                               ; preds = %91
  %98 = load i32, ptr %11, align 4, !tbaa !9
  %99 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %98, i32 noundef 3)
          to label %100 unwind label %148

100:                                              ; preds = %97
  store double %96, ptr %99, align 8, !tbaa !11
  %101 = getelementptr inbounds %"class.orsa::OrsaModel", ptr %17, i32 0, i32 1
  %102 = load i32, ptr %10, align 4, !tbaa !9
  %103 = invoke noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %101, i32 noundef 1, i32 noundef %102)
          to label %104 unwind label %148

104:                                              ; preds = %100
  %105 = load i32, ptr %11, align 4, !tbaa !9
  %106 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %105, i32 noundef 4)
          to label %107 unwind label %148

107:                                              ; preds = %104
  store double %103, ptr %106, align 8, !tbaa !11
  %108 = load i32, ptr %11, align 4, !tbaa !9
  %109 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %108, i32 noundef 5)
          to label %110 unwind label %148

110:                                              ; preds = %107
  store double 1.000000e+00, ptr %109, align 8, !tbaa !11
  %111 = getelementptr inbounds %"class.orsa::OrsaModel", ptr %17, i32 0, i32 2
  %112 = load i32, ptr %10, align 4, !tbaa !9
  %113 = invoke noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %111, i32 noundef 1, i32 noundef %112)
          to label %114 unwind label %148

114:                                              ; preds = %110
  %115 = fneg double %113
  %116 = getelementptr inbounds %"class.orsa::OrsaModel", ptr %17, i32 0, i32 1
  %117 = load i32, ptr %10, align 4, !tbaa !9
  %118 = invoke noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %116, i32 noundef 0, i32 noundef %117)
          to label %119 unwind label %148

119:                                              ; preds = %114
  %120 = fmul double %115, %118
  %121 = load i32, ptr %11, align 4, !tbaa !9
  %122 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %121, i32 noundef 6)
          to label %123 unwind label %148

123:                                              ; preds = %119
  store double %120, ptr %122, align 8, !tbaa !11
  %124 = getelementptr inbounds %"class.orsa::OrsaModel", ptr %17, i32 0, i32 2
  %125 = load i32, ptr %10, align 4, !tbaa !9
  %126 = invoke noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %124, i32 noundef 1, i32 noundef %125)
          to label %127 unwind label %148

127:                                              ; preds = %123
  %128 = fneg double %126
  %129 = getelementptr inbounds %"class.orsa::OrsaModel", ptr %17, i32 0, i32 1
  %130 = load i32, ptr %10, align 4, !tbaa !9
  %131 = invoke noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %129, i32 noundef 1, i32 noundef %130)
          to label %132 unwind label %148

132:                                              ; preds = %127
  %133 = fmul double %128, %131
  %134 = load i32, ptr %11, align 4, !tbaa !9
  %135 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %134, i32 noundef 7)
          to label %136 unwind label %148

136:                                              ; preds = %132
  store double %133, ptr %135, align 8, !tbaa !11
  %137 = getelementptr inbounds %"class.orsa::OrsaModel", ptr %17, i32 0, i32 2
  %138 = load i32, ptr %10, align 4, !tbaa !9
  %139 = invoke noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %137, i32 noundef 1, i32 noundef %138)
          to label %140 unwind label %148

140:                                              ; preds = %136
  %141 = fneg double %139
  %142 = load i32, ptr %11, align 4, !tbaa !9
  %143 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %142, i32 noundef 8)
          to label %144 unwind label %148

144:                                              ; preds = %140
  store double %141, ptr %143, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %145

145:                                              ; preds = %144
  %146 = load i32, ptr %9, align 4, !tbaa !9
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %9, align 4, !tbaa !9
  br label %28, !llvm.loop !13

148:                                              ; preds = %140, %136, %132, %127, %123, %119, %114, %110, %107, %104, %100, %97, %91, %87, %83, %79, %74, %70, %66, %61, %57, %54, %51, %47, %44, %33
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %12, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %213

152:                                              ; preds = %32
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #6
  invoke void @_ZN11libNumerics6vectorIdEC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef 9)
          to label %153 unwind label %166

153:                                              ; preds = %152
  %154 = invoke noundef zeroext i1 @_ZN11libNumerics3SVD9NullspaceERKNS_6matrixIdEEPNS_6vectorIdEEdd(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef %14, double noundef 1.000000e-02, double noundef 5.000000e-01)
          to label %155 unwind label %170

155:                                              ; preds = %153
  br i1 %154, label %156, label %209

156:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #6
  invoke void @_ZN11libNumerics6matrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 3, i32 noundef 3)
          to label %157 unwind label %174

157:                                              ; preds = %156
  invoke void @_ZN11libNumerics6matrixIdE4readIdEEvRKNS0_IT_EE(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %14)
          to label %158 unwind label %178

158:                                              ; preds = %157
  %159 = invoke noundef double @_ZNK11libNumerics6matrixIdE3detEv(ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %160 unwind label %178

160:                                              ; preds = %158
  %161 = fcmp olt double %159, 0.000000e+00
  br i1 %161, label %162, label %191

162:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #6
  invoke void @_ZNK11libNumerics6matrixIdEngEv(ptr dead_on_unwind writable sret(%"class.libNumerics::matrix") align 8 %16, ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %163 unwind label %182

163:                                              ; preds = %162
  %164 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics6matrixIdEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %165 unwind label %186

165:                                              ; preds = %163
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  br label %191

166:                                              ; preds = %152
  %167 = landingpad { ptr, i32 }
          cleanup
  %168 = extractvalue { ptr, i32 } %167, 0
  store ptr %168, ptr %12, align 8
  %169 = extractvalue { ptr, i32 } %167, 1
  store i32 %169, ptr %13, align 4
  br label %212

170:                                              ; preds = %153
  %171 = landingpad { ptr, i32 }
          cleanup
  %172 = extractvalue { ptr, i32 } %171, 0
  store ptr %172, ptr %12, align 8
  %173 = extractvalue { ptr, i32 } %171, 1
  store i32 %173, ptr %13, align 4
  br label %211

174:                                              ; preds = %156
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %12, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %13, align 4
  br label %208

178:                                              ; preds = %203, %199, %195, %193, %191, %158, %157
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %12, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %13, align 4
  br label %207

182:                                              ; preds = %162
  %183 = landingpad { ptr, i32 }
          cleanup
  %184 = extractvalue { ptr, i32 } %183, 0
  store ptr %184, ptr %12, align 8
  %185 = extractvalue { ptr, i32 } %183, 1
  store i32 %185, ptr %13, align 4
  br label %190

186:                                              ; preds = %163
  %187 = landingpad { ptr, i32 }
          cleanup
  %188 = extractvalue { ptr, i32 } %187, 0
  store ptr %188, ptr %12, align 8
  %189 = extractvalue { ptr, i32 } %187, 1
  store i32 %189, ptr %13, align 4
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  br label %190

190:                                              ; preds = %186, %182
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  br label %207

191:                                              ; preds = %165, %160
  %192 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 2, i32 noundef 2)
          to label %193 unwind label %178

193:                                              ; preds = %191
  %194 = load double, ptr %192, align 8, !tbaa !11
  invoke void @_ZN11libNumerics6matrixIdEdVEd(ptr noundef nonnull align 8 dereferenceable(24) %15, double noundef %194)
          to label %195 unwind label %178

195:                                              ; preds = %193
  %196 = invoke noundef double @_ZN11libNumerics3SVD7InvCondERKNS_6matrixIdEE(ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %197 unwind label %178

197:                                              ; preds = %195
  %198 = fcmp oge double %196, 1.000000e-01
  br i1 %198, label %199, label %206

199:                                              ; preds = %197
  %200 = load ptr, ptr %5, align 8, !tbaa !5
  %201 = invoke noundef zeroext i1 @_ZNK4orsa15HomographyModel23IsOrientationPreservingERKSt6vectorIiSaIiEERKN11libNumerics6matrixIdEE(ptr noundef nonnull align 8 dereferenceable(122) %17, ptr noundef nonnull align 8 dereferenceable(24) %200, ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %202 unwind label %178

202:                                              ; preds = %199
  br i1 %201, label %203, label %206

203:                                              ; preds = %202
  %204 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIN11libNumerics6matrixIdEESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %204, ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %205 unwind label %178

205:                                              ; preds = %203
  br label %206

206:                                              ; preds = %205, %202, %197
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  br label %209

207:                                              ; preds = %190, %178
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  br label %208

208:                                              ; preds = %207, %174
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  br label %211

209:                                              ; preds = %206, %155
  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) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %210

210:                                              ; preds = %209, %21
  ret void

211:                                              ; preds = %208, %170
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  br label %212

212:                                              ; preds = %211, %166
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  br label %213

213:                                              ; preds = %212, %148
  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 @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %214

214:                                              ; preds = %213
  %215 = load ptr, ptr %12, align 8
  %216 = load i32, ptr %13, align 4
  %217 = insertvalue { ptr, i32 } poison, ptr %215, 0
  %218 = insertvalue { ptr, i32 } %217, i32 %216, 1
  resume { ptr, i32 } %218
}

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

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

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

declare noundef zeroext i1 @_ZN11libNumerics3SVD9NullspaceERKNS_6matrixIdEEPNS_6vectorIdEEdd(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, double noundef, double noundef) #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK11libNumerics6matrixIdE3detEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

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

declare noundef double @_ZN11libNumerics3SVD7InvCondERKNS_6matrixIdEE(ptr noundef nonnull align 8 dereferenceable(24)) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4orsa15HomographyModel23IsOrientationPreservingERKSt6vectorIiSaIiEERKN11libNumerics6matrixIdEE(ptr noundef nonnull align 8 dereferenceable(122), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4orsa15HomographyModel3FitERKSt6vectorIiSaIiEEPS1_IN11libNumerics6matrixIdEESaIS8_EE(ptr noundef nonnull align 8 dereferenceable(122) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.libNumerics::matrix", align 8
  %5 = alloca %"class.libNumerics::vector", align 8
  %6 = alloca %"class.libNumerics::matrix", align 8
  %7 = alloca %"class.libNumerics::matrix", align 8
  %8 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %9 = icmp ult i64 %8, 4
  br i1 %9, label %101, label %10

10:                                               ; preds = %3
  %11 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %12 = trunc i64 %11 to i32
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  %13 = shl nsw i32 %12, 1
  call void @_ZN11libNumerics6matrixIdE5zerosEii(ptr dead_on_unwind nonnull writable sret(%"class.libNumerics::matrix") align 8 %4, i32 noundef %13, i32 noundef 9)
  %14 = icmp sgt i32 %12, 0
  br i1 %14, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %10
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = getelementptr inbounds i8, ptr %0, i64 32
  %wide.trip.count = and i64 %11, 2147483647
  br label %17

._crit_edge:                                      ; preds = %17, %10
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  invoke void @_ZN11libNumerics6vectorIdEC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef 9)
          to label %60 unwind label %73

17:                                               ; preds = %.lr.ph, %17
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %17 ]
  %18 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #6
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %20 = shl nuw nsw i64 %indvars.iv, 1
  %21 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 0, i32 noundef %19)
  %22 = trunc nuw i64 %20 to i32
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %22, i32 noundef 0)
  store double %21, ptr %23, align 8, !tbaa !9
  %24 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 1, i32 noundef %19)
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %22, i32 noundef 1)
  store double %24, ptr %25, align 8, !tbaa !9
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %22, i32 noundef 2)
  store double 1.000000e+00, ptr %26, align 8, !tbaa !9
  %27 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %16, i32 noundef 0, i32 noundef %19)
  %28 = fneg double %27
  %29 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 0, i32 noundef %19)
  %30 = fmul double %29, %28
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %22, i32 noundef 6)
  store double %30, ptr %31, align 8, !tbaa !9
  %32 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %16, i32 noundef 0, i32 noundef %19)
  %33 = fneg double %32
  %34 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 1, i32 noundef %19)
  %35 = fmul double %34, %33
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %22, i32 noundef 7)
  store double %35, ptr %36, align 8, !tbaa !9
  %37 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %16, i32 noundef 0, i32 noundef %19)
  %38 = fneg double %37
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %22, i32 noundef 8)
  store double %38, ptr %39, align 8, !tbaa !9
  %40 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 0, i32 noundef %19)
  %41 = trunc i64 %20 to i32
  %42 = or disjoint i32 %41, 1
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %42, i32 noundef 3)
  store double %40, ptr %43, align 8, !tbaa !9
  %44 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 1, i32 noundef %19)
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %42, i32 noundef 4)
  store double %44, ptr %45, align 8, !tbaa !9
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %42, i32 noundef 5)
  store double 1.000000e+00, ptr %46, align 8, !tbaa !9
  %47 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %16, i32 noundef 1, i32 noundef %19)
  %48 = fneg double %47
  %49 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 0, i32 noundef %19)
  %50 = fmul double %49, %48
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %42, i32 noundef 6)
  store double %50, ptr %51, align 8, !tbaa !9
  %52 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %16, i32 noundef 1, i32 noundef %19)
  %53 = fneg double %52
  %54 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef 1, i32 noundef %19)
  %55 = fmul double %54, %53
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %42, i32 noundef 7)
  store double %55, ptr %56, align 8, !tbaa !9
  %57 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %16, i32 noundef 1, i32 noundef %19)
  %58 = fneg double %57
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef %42, i32 noundef 8)
  store double %58, ptr %59, align 8, !tbaa !9
  %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 %17, !llvm.loop !11

60:                                               ; preds = %._crit_edge
  %61 = invoke noundef zeroext i1 @_ZN11libNumerics3SVD9NullspaceERKNS_6matrixIdEEPNS_6vectorIdEEdd(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull %5, double noundef 1.000000e-02, double noundef 5.000000e-01)
          to label %62 unwind label %75

62:                                               ; preds = %60
  br i1 %61, label %63, label %100

63:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  invoke void @_ZN11libNumerics6matrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(24) %6, i32 noundef 3, i32 noundef 3)
          to label %64 unwind label %77

64:                                               ; preds = %63
  invoke void @_ZN11libNumerics6matrixIdE4readIdEEvRKNS0_IT_EE(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %65 unwind label %79

65:                                               ; preds = %64
  %66 = invoke noundef double @_ZNK11libNumerics6matrixIdE3detEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %67 unwind label %79

67:                                               ; preds = %65
  %68 = fcmp olt double %66, 0.000000e+00
  br i1 %68, label %69, label %86

69:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  invoke void @_ZNK11libNumerics6matrixIdEngEv(ptr dead_on_unwind nonnull writable sret(%"class.libNumerics::matrix") align 8 %7, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %70 unwind label %81

70:                                               ; preds = %69
  %71 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics6matrixIdEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %72 unwind label %83

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

73:                                               ; preds = %._crit_edge
  %74 = landingpad { ptr, i32 }
          cleanup
  br label %103

75:                                               ; preds = %60
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %102

77:                                               ; preds = %63
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %99

79:                                               ; preds = %96, %93, %89, %86, %65, %64
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %98

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

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

85:                                               ; preds = %83, %81
  %.pn = phi { ptr, i32 } [ %84, %83 ], [ %82, %81 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br label %98

86:                                               ; preds = %72, %67
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %6, i32 noundef 2, i32 noundef 2)
  %88 = load double, ptr %87, align 8, !tbaa !9
  invoke void @_ZN11libNumerics6matrixIdEdVEd(ptr noundef nonnull align 8 dereferenceable(24) %6, double noundef %88)
          to label %89 unwind label %79

89:                                               ; preds = %86
  %90 = invoke noundef double @_ZN11libNumerics3SVD7InvCondERKNS_6matrixIdEE(ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %91 unwind label %79

91:                                               ; preds = %89
  %92 = fcmp ult double %90, 1.000000e-01
  br i1 %92, label %97, label %93

93:                                               ; preds = %91
  %94 = invoke noundef zeroext i1 @_ZNK4orsa15HomographyModel23IsOrientationPreservingERKSt6vectorIiSaIiEERKN11libNumerics6matrixIdEE(ptr noundef nonnull align 8 dereferenceable(122) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %95 unwind label %79

95:                                               ; preds = %93
  br i1 %94, label %96, label %97

96:                                               ; preds = %95
  invoke void @_ZNSt6vectorIN11libNumerics6matrixIdEESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %97 unwind label %79

97:                                               ; preds = %96, %95, %91
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  br label %100

98:                                               ; preds = %85, %79
  %.pn47 = phi { ptr, i32 } [ %80, %79 ], [ %.pn, %85 ]
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  br label %99

99:                                               ; preds = %98, %77
  %.pn47.pn = phi { ptr, i32 } [ %.pn47, %98 ], [ %78, %77 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  br label %102

100:                                              ; preds = %97, %62
  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
  br label %101

101:                                              ; preds = %3, %100
  ret void

102:                                              ; preds = %99, %75
  %.pn47.pn.pn = phi { ptr, i32 } [ %.pn47.pn, %99 ], [ %76, %75 ]
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  br label %103

103:                                              ; preds = %102, %73
  %.pn47.pn.pn.pn = phi { ptr, i32 } [ %.pn47.pn.pn, %102 ], [ %74, %73 ]
  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 } %.pn47.pn.pn.pn
}

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

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

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

declare noundef zeroext i1 @_ZN11libNumerics3SVD9NullspaceERKNS_6matrixIdEEPNS_6vectorIdEEdd(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, double noundef, double noundef) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK11libNumerics6matrixIdE3detEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

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

declare noundef double @_ZN11libNumerics3SVD7InvCondERKNS_6matrixIdEE(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4orsa15HomographyModel23IsOrientationPreservingERKSt6vectorIiSaIiEERKN11libNumerics6matrixIdEE(ptr noundef nonnull align 8 dereferenceable(122), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass