; LLVM IR from rdguez-mariano/fast_imas_IPOL :: libNumerics/computeH.ll (ZNK11libNumerics8ComputeH4wrapERNS_10HomographyERKNS_6vectorIdEE)

; 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::ComputeH" = type { i32, i32, [64 x double], [8 x double], double }

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

; 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
define dso_local void @_ZNK11libNumerics8ComputeH4wrapERNS_10HomographyERKNS_6vectorIdEE(ptr noundef nonnull align 8 dereferenceable(592) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #1 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  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
  %8 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  %9 = getelementptr inbounds %"class.libNumerics::ComputeH", ptr %8, i32 0, i32 0
  %10 = load i32, ptr %9, align 8, !tbaa !11
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %12, label %13

12:                                               ; preds = %3
  br label %18

13:                                               ; preds = %3
  %14 = load ptr, ptr %6, align 8, !tbaa !5
  %15 = load i32, ptr %7, align 4, !tbaa !9
  %16 = add nsw i32 %15, 1
  store i32 %16, ptr %7, align 4, !tbaa !9
  %17 = call noundef double @_ZNK11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef %15)
  br label %18

18:                                               ; preds = %13, %12
  %19 = phi double [ 1.000000e+00, %12 ], [ %17, %13 ]
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %20)
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %21, i32 noundef 0, i32 noundef 0)
  store double %19, ptr %22, align 8, !tbaa !15
  %23 = getelementptr inbounds %"class.libNumerics::ComputeH", ptr %8, i32 0, i32 0
  %24 = load i32, ptr %23, align 8, !tbaa !11
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %34, label %26

26:                                               ; preds = %18
  %27 = getelementptr inbounds %"class.libNumerics::ComputeH", ptr %8, i32 0, i32 0
  %28 = load i32, ptr %27, align 8, !tbaa !11
  %29 = icmp eq i32 %28, 2
  br i1 %29, label %34, label %30

30:                                               ; preds = %26
  %31 = getelementptr inbounds %"class.libNumerics::ComputeH", ptr %8, i32 0, i32 0
  %32 = load i32, ptr %31, align 8, !tbaa !11
  %33 = icmp eq i32 %32, 3
  br i1 %33, label %34, label %35

34:                                               ; preds = %30, %26, %18
  br label %40

35:                                               ; preds = %30
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = load i32, ptr %7, align 4, !tbaa !9
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %7, align 4, !tbaa !9
  %39 = call noundef double @_ZNK11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %36, i32 noundef %37)
  br label %40

40:                                               ; preds = %35, %34
  %41 = phi double [ 0.000000e+00, %34 ], [ %39, %35 ]
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %42)
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %43, i32 noundef 0, i32 noundef 1)
  store double %41, ptr %44, align 8, !tbaa !15
  %45 = getelementptr inbounds %"class.libNumerics::ComputeH", ptr %8, i32 0, i32 1
  %46 = load i32, ptr %45, align 4, !tbaa !16
  %47 = icmp sge i32 %46, 6
  br i1 %47, label %48, label %63

48:                                               ; preds = %40
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = load i32, ptr %7, align 4, !tbaa !9
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %7, align 4, !tbaa !9
  %52 = call noundef double @_ZNK11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %49, i32 noundef %50)
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %53)
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %54, i32 noundef 1, i32 noundef 0)
  store double %52, ptr %55, align 8, !tbaa !15
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = load i32, ptr %7, align 4, !tbaa !9
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %7, align 4, !tbaa !9
  %59 = call noundef double @_ZNK11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %56, i32 noundef %57)
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %60)
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %61, i32 noundef 1, i32 noundef 1)
  store double %59, ptr %62, align 8, !tbaa !15
  br label %90

63:                                               ; preds = %40
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %64)
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %65, i32 noundef 0, i32 noundef 1)
  %67 = load double, ptr %66, align 8, !tbaa !15
  %68 = fneg double %67
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %69)
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %70, i32 noundef 1, i32 noundef 0)
  store double %68, ptr %71, align 8, !tbaa !15
  %72 = getelementptr inbounds %"class.libNumerics::ComputeH", ptr %8, i32 0, i32 0
  %73 = load i32, ptr %72, align 8, !tbaa !11
  %74 = icmp eq i32 %73, 3
  br i1 %74, label %75, label %80

75:                                               ; preds = %63
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = load i32, ptr %7, align 4, !tbaa !9
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %7, align 4, !tbaa !9
  %79 = call noundef double @_ZNK11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %76, i32 noundef %77)
  br label %85

80:                                               ; preds = %63
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %81)
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %82, i32 noundef 0, i32 noundef 0)
  %84 = load double, ptr %83, align 8, !tbaa !15
  br label %85

85:                                               ; preds = %80, %75
  %86 = phi double [ %79, %75 ], [ %84, %80 ]
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %87)
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %88, i32 noundef 1, i32 noundef 1)
  store double %86, ptr %89, align 8, !tbaa !15
  br label %90

90:                                               ; preds = %85, %48
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = load i32, ptr %7, align 4, !tbaa !9
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %7, align 4, !tbaa !9
  %94 = call noundef double @_ZNK11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %91, i32 noundef %92)
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %95)
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %96, i32 noundef 0, i32 noundef 2)
  store double %94, ptr %97, align 8, !tbaa !15
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = load i32, ptr %7, align 4, !tbaa !9
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %7, align 4, !tbaa !9
  %101 = call noundef double @_ZNK11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %98, i32 noundef %99)
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %102)
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %103, i32 noundef 1, i32 noundef 2)
  store double %101, ptr %104, align 8, !tbaa !15
  %105 = getelementptr inbounds %"class.libNumerics::ComputeH", ptr %8, i32 0, i32 0
  %106 = load i32, ptr %105, align 8, !tbaa !11
  %107 = icmp eq i32 %106, 6
  br i1 %107, label %108, label %123

108:                                              ; preds = %90
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = load i32, ptr %7, align 4, !tbaa !9
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %7, align 4, !tbaa !9
  %112 = call noundef double @_ZNK11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %109, i32 noundef %110)
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %113)
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %114, i32 noundef 2, i32 noundef 0)
  store double %112, ptr %115, align 8, !tbaa !15
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = load i32, ptr %7, align 4, !tbaa !9
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %7, align 4, !tbaa !9
  %119 = call noundef double @_ZNK11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %116, i32 noundef %117)
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %120)
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %121, i32 noundef 2, i32 noundef 1)
  store double %119, ptr %122, align 8, !tbaa !15
  br label %130

123:                                              ; preds = %90
  %124 = load ptr, ptr %5, align 8, !tbaa !5
  %125 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %124)
  %126 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %125, i32 noundef 2, i32 noundef 1)
  store double 0.000000e+00, ptr %126, align 8, !tbaa !15
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  %128 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %127)
  %129 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %128, i32 noundef 2, i32 noundef 0)
  store double 0.000000e+00, ptr %129, align 8, !tbaa !15
  br label %130

130:                                              ; preds = %123, %108
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %131)
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %132, i32 noundef 2, i32 noundef 2)
  store double 1.000000e+00, ptr %133, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret void
}

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

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

; 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) #2 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 = { 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 #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 = { 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, !13, i64 0}
!12 = !{!"_ZTSN11libNumerics8ComputeHE", !13, i64 0, !10, i64 4, !7, i64 8, !7, i64 520, !14, i64 584}
!13 = !{!"_ZTSN11libNumerics8ComputeH4TypeE", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!14, !14, i64 0}
!16 = !{!12, !10, i64 4}


; 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"

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZNK11libNumerics8ComputeH4wrapERNS_10HomographyERKNS_6vectorIdEE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(592) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #0 align 2 {
  %4 = load i32, ptr %0, align 8, !tbaa !5
  %5 = icmp eq i32 %4, 0
  br i1 %5, label %8, label %6

6:                                                ; preds = %3
  %7 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef 0)
  br label %8

8:                                                ; preds = %3, %6
  %.0 = phi i32 [ 0, %3 ], [ 1, %6 ]
  %9 = phi double [ 1.000000e+00, %3 ], [ %7, %6 ]
  %10 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %11 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %10, i32 noundef 0, i32 noundef 0)
  store double %9, ptr %11, align 8, !tbaa !12
  %12 = load i32, ptr %0, align 8, !tbaa !5
  switch i32 %12, label %13 [
    i32 0, label %16
    i32 2, label %16
    i32 3, label %16
  ]

13:                                               ; preds = %8
  %14 = add nuw nsw i32 %.0, 1
  %15 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %.0)
  br label %16

16:                                               ; preds = %8, %8, %8, %13
  %.1 = phi i32 [ %.0, %8 ], [ %14, %13 ], [ %.0, %8 ], [ %.0, %8 ]
  %17 = phi double [ 0.000000e+00, %8 ], [ %15, %13 ], [ 0.000000e+00, %8 ], [ 0.000000e+00, %8 ]
  %18 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %19 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %18, i32 noundef 0, i32 noundef 1)
  store double %17, ptr %19, align 8, !tbaa !12
  %20 = getelementptr inbounds i8, ptr %0, i64 4
  %21 = load i32, ptr %20, align 4, !tbaa !13
  %22 = icmp sgt i32 %21, 5
  br i1 %22, label %23, label %30

23:                                               ; preds = %16
  %24 = add nuw nsw i32 %.1, 1
  %25 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %.1)
  %26 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %27 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %26, i32 noundef 1, i32 noundef 0)
  store double %25, ptr %27, align 8, !tbaa !12
  %28 = add nuw nsw i32 %.1, 2
  %29 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %24)
  br label %46

30:                                               ; preds = %16
  %31 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %32 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %31, i32 noundef 0, i32 noundef 1)
  %33 = load double, ptr %32, align 8, !tbaa !12
  %34 = fneg double %33
  %35 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %36 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %35, i32 noundef 1, i32 noundef 0)
  store double %34, ptr %36, align 8, !tbaa !12
  %37 = load i32, ptr %0, align 8, !tbaa !5
  %38 = icmp eq i32 %37, 3
  br i1 %38, label %39, label %42

39:                                               ; preds = %30
  %40 = add nuw nsw i32 %.1, 1
  %41 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %.1)
  br label %46

42:                                               ; preds = %30
  %43 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %44 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %43, i32 noundef 0, i32 noundef 0)
  %45 = load double, ptr %44, align 8, !tbaa !12
  br label %46

46:                                               ; preds = %39, %42, %23
  %.sink = phi double [ %29, %23 ], [ %41, %39 ], [ %45, %42 ]
  %.3 = phi i32 [ %28, %23 ], [ %40, %39 ], [ %.1, %42 ]
  %47 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %48 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %47, i32 noundef 1, i32 noundef 1)
  store double %.sink, ptr %48, align 8, !tbaa !12
  %49 = add nuw nsw i32 %.3, 1
  %50 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %.3)
  %51 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %52 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %51, i32 noundef 0, i32 noundef 2)
  store double %50, ptr %52, align 8, !tbaa !12
  %53 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %49)
  %54 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %55 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %54, i32 noundef 1, i32 noundef 2)
  store double %53, ptr %55, align 8, !tbaa !12
  %56 = load i32, ptr %0, align 8, !tbaa !5
  %57 = icmp eq i32 %56, 6
  br i1 %57, label %58, label %65

58:                                               ; preds = %46
  %59 = add nuw nsw i32 %.3, 2
  %60 = add nuw nsw i32 %.3, 3
  %61 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %59)
  %62 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %63 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %62, i32 noundef 2, i32 noundef 0)
  store double %61, ptr %63, align 8, !tbaa !12
  %64 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %60)
  br label %68

65:                                               ; preds = %46
  %66 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %67 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %66, i32 noundef 2, i32 noundef 1)
  store double 0.000000e+00, ptr %67, align 8, !tbaa !12
  br label %68

68:                                               ; preds = %65, %58
  %.sink39 = phi i32 [ 0, %65 ], [ 1, %58 ]
  %.sink36 = phi double [ 0.000000e+00, %65 ], [ %64, %58 ]
  %69 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %70 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %69, i32 noundef 2, i32 noundef %.sink39)
  store double %.sink36, ptr %70, align 8, !tbaa !12
  %71 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics10Homography3matEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %72 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %71, i32 noundef 2, i32 noundef 2)
  store double 1.000000e+00, ptr %72, align 8, !tbaa !12
  ret void
}

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

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

; 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 #1 align 2

attributes #0 = { 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 = { 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" }

!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, !7, i64 0}
!6 = !{!"_ZTSN11libNumerics8ComputeHE", !7, i64 0, !10, i64 4, !8, i64 8, !8, i64 520, !11, i64 584}
!7 = !{!"_ZTSN11libNumerics8ComputeH4TypeE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!6, !10, i64 4}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass