; 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.orsa::OrsaModel" = type <{ ptr, %"class.libNumerics::matrix", %"class.libNumerics::matrix", %"class.libNumerics::matrix", %"class.libNumerics::matrix", [2 x double], i8, [7 x i8] }>
%"class.libNumerics::matrix" = type { ptr, i32, i32, ptr }
%"class.orsa::FundamentalModel" = type { %"class.orsa::OrsaModel.base", i8, [6 x i8] }
%"class.orsa::OrsaModel.base" = type <{ ptr, %"class.libNumerics::matrix", %"class.libNumerics::matrix", %"class.libNumerics::matrix", %"class.libNumerics::matrix", [2 x double], i8 }>

; 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 speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

; 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 noundef double @_ZNK4orsa16FundamentalModel5ErrorERKN11libNumerics6matrixIdEEiPi(ptr noundef nonnull align 8 dereferenceable(122) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %2, ptr noundef %3) unnamed_addr #2 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  %19 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %20 = getelementptr inbounds %"class.orsa::OrsaModel", ptr %19, i32 0, i32 1
  %21 = load i32, ptr %7, align 4, !tbaa !9
  %22 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %20, i32 noundef 0, i32 noundef %21)
  store double %22, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %23 = getelementptr inbounds %"class.orsa::OrsaModel", ptr %19, i32 0, i32 1
  %24 = load i32, ptr %7, align 4, !tbaa !9
  %25 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef 1, i32 noundef %24)
  store double %25, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %26 = getelementptr inbounds %"class.orsa::OrsaModel", ptr %19, i32 0, i32 2
  %27 = load i32, ptr %7, align 4, !tbaa !9
  %28 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %26, i32 noundef 0, i32 noundef %27)
  store double %28, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %29 = getelementptr inbounds %"class.orsa::OrsaModel", ptr %19, i32 0, i32 2
  %30 = load i32, ptr %7, align 4, !tbaa !9
  %31 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %29, i32 noundef 1, i32 noundef %30)
  store double %31, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = icmp ne ptr %32, null
  br i1 %33, label %34, label %36

34:                                               ; preds = %4
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 1, ptr %35, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %34, %4
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %37, i32 noundef 0, i32 noundef 0)
  %39 = load double, ptr %9, align 8, !tbaa !11
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %40, i32 noundef 1, i32 noundef 0)
  %42 = load double, ptr %10, align 8, !tbaa !11
  %43 = fmul double %41, %42
  %44 = call double @llvm.fmuladd.f64(double %38, double %39, double %43)
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %45, i32 noundef 2, i32 noundef 0)
  %47 = fadd double %44, %46
  store double %47, ptr %13, align 8, !tbaa !11
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %48, i32 noundef 0, i32 noundef 1)
  %50 = load double, ptr %9, align 8, !tbaa !11
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %51, i32 noundef 1, i32 noundef 1)
  %53 = load double, ptr %10, align 8, !tbaa !11
  %54 = fmul double %52, %53
  %55 = call double @llvm.fmuladd.f64(double %49, double %50, double %54)
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %56, i32 noundef 2, i32 noundef 1)
  %58 = fadd double %55, %57
  store double %58, ptr %14, align 8, !tbaa !11
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %59, i32 noundef 0, i32 noundef 2)
  %61 = load double, ptr %9, align 8, !tbaa !11
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %62, i32 noundef 1, i32 noundef 2)
  %64 = load double, ptr %10, align 8, !tbaa !11
  %65 = fmul double %63, %64
  %66 = call double @llvm.fmuladd.f64(double %60, double %61, double %65)
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %67, i32 noundef 2, i32 noundef 2)
  %69 = fadd double %66, %68
  store double %69, ptr %15, align 8, !tbaa !11
  %70 = load double, ptr %13, align 8, !tbaa !11
  %71 = load double, ptr %11, align 8, !tbaa !11
  %72 = load double, ptr %14, align 8, !tbaa !11
  %73 = load double, ptr %12, align 8, !tbaa !11
  %74 = fmul double %72, %73
  %75 = call double @llvm.fmuladd.f64(double %70, double %71, double %74)
  %76 = load double, ptr %15, align 8, !tbaa !11
  %77 = fadd double %75, %76
  store double %77, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %78 = load double, ptr %16, align 8, !tbaa !11
  %79 = load double, ptr %16, align 8, !tbaa !11
  %80 = fmul double %78, %79
  %81 = load double, ptr %13, align 8, !tbaa !11
  %82 = load double, ptr %13, align 8, !tbaa !11
  %83 = load double, ptr %14, align 8, !tbaa !11
  %84 = load double, ptr %14, align 8, !tbaa !11
  %85 = fmul double %83, %84
  %86 = call double @llvm.fmuladd.f64(double %81, double %82, double %85)
  %87 = fdiv double %80, %86
  store double %87, ptr %17, align 8, !tbaa !11
  %88 = getelementptr inbounds %"class.orsa::FundamentalModel", ptr %19, i32 0, i32 1
  %89 = load i8, ptr %88, align 1, !tbaa !13, !range !18, !noundef !19
  %90 = trunc i8 %89 to i1
  br i1 %90, label %91, label %154

91:                                               ; preds = %36
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %92, i32 noundef 0, i32 noundef 0)
  %94 = load double, ptr %11, align 8, !tbaa !11
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %95, i32 noundef 0, i32 noundef 1)
  %97 = load double, ptr %12, align 8, !tbaa !11
  %98 = fmul double %96, %97
  %99 = call double @llvm.fmuladd.f64(double %93, double %94, double %98)
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %100, i32 noundef 0, i32 noundef 2)
  %102 = fadd double %99, %101
  store double %102, ptr %13, align 8, !tbaa !11
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %103, i32 noundef 1, i32 noundef 0)
  %105 = load double, ptr %11, align 8, !tbaa !11
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  %107 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %106, i32 noundef 1, i32 noundef 1)
  %108 = load double, ptr %12, align 8, !tbaa !11
  %109 = fmul double %107, %108
  %110 = call double @llvm.fmuladd.f64(double %104, double %105, double %109)
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %111, i32 noundef 1, i32 noundef 2)
  %113 = fadd double %110, %112
  store double %113, ptr %14, align 8, !tbaa !11
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %114, i32 noundef 2, i32 noundef 0)
  %116 = load double, ptr %11, align 8, !tbaa !11
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %117, i32 noundef 2, i32 noundef 1)
  %119 = load double, ptr %12, align 8, !tbaa !11
  %120 = fmul double %118, %119
  %121 = call double @llvm.fmuladd.f64(double %115, double %116, double %120)
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  %123 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %122, i32 noundef 2, i32 noundef 2)
  %124 = fadd double %121, %123
  store double %124, ptr %15, align 8, !tbaa !11
  %125 = load double, ptr %13, align 8, !tbaa !11
  %126 = load double, ptr %9, align 8, !tbaa !11
  %127 = load double, ptr %14, align 8, !tbaa !11
  %128 = load double, ptr %10, align 8, !tbaa !11
  %129 = fmul double %127, %128
  %130 = call double @llvm.fmuladd.f64(double %125, double %126, double %129)
  %131 = load double, ptr %15, align 8, !tbaa !11
  %132 = fadd double %130, %131
  store double %132, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %133 = load double, ptr %16, align 8, !tbaa !11
  %134 = load double, ptr %16, align 8, !tbaa !11
  %135 = fmul double %133, %134
  %136 = load double, ptr %13, align 8, !tbaa !11
  %137 = load double, ptr %13, align 8, !tbaa !11
  %138 = load double, ptr %14, align 8, !tbaa !11
  %139 = load double, ptr %14, align 8, !tbaa !11
  %140 = fmul double %138, %139
  %141 = call double @llvm.fmuladd.f64(double %136, double %137, double %140)
  %142 = fdiv double %135, %141
  store double %142, ptr %18, align 8, !tbaa !11
  %143 = load double, ptr %18, align 8, !tbaa !11
  %144 = load double, ptr %17, align 8, !tbaa !11
  %145 = fcmp ogt double %143, %144
  br i1 %145, label %146, label %153

146:                                              ; preds = %91
  %147 = load double, ptr %18, align 8, !tbaa !11
  store double %147, ptr %17, align 8, !tbaa !11
  %148 = load ptr, ptr %8, align 8, !tbaa !5
  %149 = icmp ne ptr %148, null
  br i1 %149, label %150, label %152

150:                                              ; preds = %146
  %151 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 0, ptr %151, align 4, !tbaa !9
  br label %152

152:                                              ; preds = %150, %146
  br label %153

153:                                              ; preds = %152, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %154

154:                                              ; preds = %153, %36
  %155 = load double, ptr %17, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  ret double %155
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!14, !17, i64 121}
!14 = !{!"_ZTSN4orsa16FundamentalModelE", !15, i64 0, !17, i64 121}
!15 = !{!"_ZTSN4orsa9OrsaModelE", !16, i64 8, !16, i64 32, !16, i64 56, !16, i64 80, !7, i64 104, !17, i64 120}
!16 = !{!"_ZTSN11libNumerics6matrixIdEE", !10, i64 8, !10, i64 12, !6, i64 16}
!17 = !{!"bool", !7, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef double @_ZNK4orsa16FundamentalModel5ErrorERKN11libNumerics6matrixIdEEiPi(ptr noundef nonnull align 8 dereferenceable(122) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %2, ptr noundef writeonly %3) unnamed_addr #1 align 2 {
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  %6 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef 0, i32 noundef %2)
  %7 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef 1, i32 noundef %2)
  %8 = getelementptr inbounds i8, ptr %0, i64 32
  %9 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 0, i32 noundef %2)
  %10 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 1, i32 noundef %2)
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %12, label %11

11:                                               ; preds = %4
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %11, %4
  %13 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef 0, i32 noundef 0)
  %14 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef 1, i32 noundef 0)
  %15 = fmul double %7, %14
  %16 = tail call double @llvm.fmuladd.f64(double %13, double %6, double %15)
  %17 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef 2, i32 noundef 0)
  %18 = fadd double %17, %16
  %19 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef 0, i32 noundef 1)
  %20 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef 1, i32 noundef 1)
  %21 = fmul double %7, %20
  %22 = tail call double @llvm.fmuladd.f64(double %19, double %6, double %21)
  %23 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef 2, i32 noundef 1)
  %24 = fadd double %23, %22
  %25 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef 0, i32 noundef 2)
  %26 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef 1, i32 noundef 2)
  %27 = fmul double %7, %26
  %28 = tail call double @llvm.fmuladd.f64(double %25, double %6, double %27)
  %29 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef 2, i32 noundef 2)
  %30 = fadd double %29, %28
  %31 = fmul double %10, %24
  %32 = tail call double @llvm.fmuladd.f64(double %18, double %9, double %31)
  %33 = fadd double %32, %30
  %34 = fmul double %33, %33
  %35 = fmul double %24, %24
  %36 = tail call double @llvm.fmuladd.f64(double %18, double %18, double %35)
  %37 = fdiv double %34, %36
  %38 = getelementptr inbounds i8, ptr %0, i64 121
  %39 = load i8, ptr %38, align 1, !tbaa !9, !range !15, !noundef !16
  %40 = trunc nuw i8 %39 to i1
  br i1 %40, label %41, label %69

41:                                               ; preds = %12
  %42 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef 0, i32 noundef 0)
  %43 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef 0, i32 noundef 1)
  %44 = fmul double %10, %43
  %45 = tail call double @llvm.fmuladd.f64(double %42, double %9, double %44)
  %46 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef 0, i32 noundef 2)
  %47 = fadd double %46, %45
  %48 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef 1, i32 noundef 0)
  %49 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef 1, i32 noundef 1)
  %50 = fmul double %10, %49
  %51 = tail call double @llvm.fmuladd.f64(double %48, double %9, double %50)
  %52 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef 1, i32 noundef 2)
  %53 = fadd double %52, %51
  %54 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef 2, i32 noundef 0)
  %55 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef 2, i32 noundef 1)
  %56 = fmul double %10, %55
  %57 = tail call double @llvm.fmuladd.f64(double %54, double %9, double %56)
  %58 = tail call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef 2, i32 noundef 2)
  %59 = fadd double %58, %57
  %60 = fmul double %7, %53
  %61 = tail call double @llvm.fmuladd.f64(double %47, double %6, double %60)
  %62 = fadd double %61, %59
  %63 = fmul double %62, %62
  %64 = fmul double %53, %53
  %65 = tail call double @llvm.fmuladd.f64(double %47, double %47, double %64)
  %66 = fdiv double %63, %65
  %67 = fcmp ule double %66, %37
  %brmerge = or i1 %.not, %67
  %.mux = select i1 %67, double %37, double %66
  br i1 %brmerge, label %69, label %68

68:                                               ; preds = %41
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %68, %41, %12
  %.1 = phi double [ %37, %12 ], [ %66, %68 ], [ %.mux, %41 ]
  ret double %.1
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !14, i64 121}
!10 = !{!"_ZTSN4orsa16FundamentalModelE", !11, i64 0, !14, i64 121}
!11 = !{!"_ZTSN4orsa9OrsaModelE", !12, i64 8, !12, i64 32, !12, i64 56, !12, i64 80, !7, i64 104, !14, i64 120}
!12 = !{!"_ZTSN11libNumerics6matrixIdEE", !6, i64 8, !6, i64 12, !13, i64 16}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}


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