; LLVM IR from rdguez-mariano/fast_imas_IPOL :: libOrsa (orsa_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"

%"struct.orsa::OrsaModel::ErrorIndex" = type { double, i32, i32 }
%"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 }

; 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 { double, i64 } @_ZNK4orsa9OrsaModel7bestNFAERKSt6vectorINS0_10ErrorIndexESaIS2_EEddRKS1_IfSaIfEESA_(ptr noundef nonnull align 8 dereferenceable(121) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, double noundef %2, double noundef %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5) #1 align 2 {
  %7 = alloca %"struct.orsa::OrsaModel::ErrorIndex", align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca double, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca double, align 8
  %19 = alloca %"struct.orsa::OrsaModel::ErrorIndex", align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store double %2, ptr %10, align 8, !tbaa !9
  store double %3, ptr %11, align 8, !tbaa !9
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  %20 = load ptr, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %21 = load ptr, ptr %20, align 8, !tbaa !11
  %22 = getelementptr inbounds ptr, ptr %21, i64 2
  %23 = load ptr, ptr %22, align 8
  %24 = call noundef i32 %23(ptr noundef nonnull align 8 dereferenceable(121) %20)
  store i32 %24, ptr %14, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %25 = load ptr, ptr %20, align 8, !tbaa !11
  %26 = getelementptr inbounds ptr, ptr %25, i64 4
  %27 = load ptr, ptr %26, align 8
  %28 = call noundef zeroext i1 %27(ptr noundef nonnull align 8 dereferenceable(121) %20)
  %29 = zext i1 %28 to i64
  %30 = select i1 %28, double 1.000000e+00, double 5.000000e-01
  store double %30, ptr %15, align 8, !tbaa !9
  %31 = call noundef double @_ZNSt14numeric_limitsIdE8infinityEv() #6
  %32 = load i32, ptr %14, align 4, !tbaa !13
  call void @_ZN4orsa9OrsaModel10ErrorIndexC2Edii(ptr noundef nonnull align 8 dereferenceable(16) %7, double noundef %31, i32 noundef %32, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = call noundef i64 @_ZNKSt6vectorIN4orsa9OrsaModel10ErrorIndexESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %33) #6
  %35 = trunc i64 %34 to i32
  store i32 %35, ptr %16, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %36 = load i32, ptr %14, align 4, !tbaa !13
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %17, align 4, !tbaa !13
  br label %38

38:                                               ; preds = %115, %6
  %39 = load i32, ptr %17, align 4, !tbaa !13
  %40 = load i32, ptr %16, align 4, !tbaa !13
  %41 = icmp sle i32 %39, %40
  br i1 %41, label %42, label %52

42:                                               ; preds = %38
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = load i32, ptr %17, align 4, !tbaa !13
  %45 = sub nsw i32 %44, 1
  %46 = sext i32 %45 to i64
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN4orsa9OrsaModel10ErrorIndexESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %46) #6
  %48 = getelementptr inbounds %"struct.orsa::OrsaModel::ErrorIndex", ptr %47, i32 0, i32 0
  %49 = load double, ptr %48, align 8, !tbaa !15
  %50 = load double, ptr %11, align 8, !tbaa !9
  %51 = fcmp ole double %49, %50
  br label %52

52:                                               ; preds = %42, %38
  %53 = phi i1 [ false, %38 ], [ %51, %42 ]
  br i1 %53, label %55, label %54

54:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %118

55:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %56 = getelementptr inbounds %"class.orsa::OrsaModel", ptr %20, i32 0, i32 5
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = load i32, ptr %17, align 4, !tbaa !13
  %59 = sub nsw i32 %58, 1
  %60 = sext i32 %59 to i64
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN4orsa9OrsaModel10ErrorIndexESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %60) #6
  %62 = getelementptr inbounds %"struct.orsa::OrsaModel::ErrorIndex", ptr %61, i32 0, i32 2
  %63 = load i32, ptr %62, align 4, !tbaa !17
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [2 x double], ptr %56, i64 0, i64 %64
  %66 = load double, ptr %65, align 8, !tbaa !9
  %67 = load double, ptr %15, align 8, !tbaa !9
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = load i32, ptr %17, align 4, !tbaa !13
  %70 = sub nsw i32 %69, 1
  %71 = sext i32 %70 to i64
  %72 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN4orsa9OrsaModel10ErrorIndexESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %68, i64 noundef %71) #6
  %73 = getelementptr inbounds %"struct.orsa::OrsaModel::ErrorIndex", ptr %72, i32 0, i32 0
  %74 = load double, ptr %73, align 8, !tbaa !15
  %75 = call noundef double @_ZNSt14numeric_limitsIdE7epsilonEv() #6
  %76 = fadd double %74, %75
  %77 = call double @log10(double noundef %76) #6
  %78 = call double @llvm.fmuladd.f64(double %67, double %77, double %66)
  store double %78, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #6
  %79 = load double, ptr %10, align 8, !tbaa !9
  %80 = load double, ptr %18, align 8, !tbaa !9
  %81 = load i32, ptr %17, align 4, !tbaa !13
  %82 = load i32, ptr %14, align 4, !tbaa !13
  %83 = sub nsw i32 %81, %82
  %84 = sitofp i32 %83 to double
  %85 = call double @llvm.fmuladd.f64(double %80, double %84, double %79)
  %86 = load ptr, ptr %12, align 8, !tbaa !5
  %87 = load i32, ptr %17, align 4, !tbaa !13
  %88 = sext i32 %87 to i64
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %86, i64 noundef %88) #6
  %90 = load float, ptr %89, align 4, !tbaa !18
  %91 = fpext float %90 to double
  %92 = fadd double %85, %91
  %93 = load ptr, ptr %13, align 8, !tbaa !5
  %94 = load i32, ptr %17, align 4, !tbaa !13
  %95 = sext i32 %94 to i64
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %93, i64 noundef %95) #6
  %97 = load float, ptr %96, align 4, !tbaa !18
  %98 = fpext float %97 to double
  %99 = fadd double %92, %98
  %100 = load i32, ptr %17, align 4, !tbaa !13
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = load i32, ptr %17, align 4, !tbaa !13
  %103 = sub nsw i32 %102, 1
  %104 = sext i32 %103 to i64
  %105 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN4orsa9OrsaModel10ErrorIndexESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %101, i64 noundef %104) #6
  %106 = getelementptr inbounds %"struct.orsa::OrsaModel::ErrorIndex", ptr %105, i32 0, i32 2
  %107 = load i32, ptr %106, align 4, !tbaa !17
  call void @_ZN4orsa9OrsaModel10ErrorIndexC2Edii(ptr noundef nonnull align 8 dereferenceable(16) %19, double noundef %99, i32 noundef %100, i32 noundef %107)
  %108 = getelementptr inbounds %"struct.orsa::OrsaModel::ErrorIndex", ptr %19, i32 0, i32 0
  %109 = load double, ptr %108, align 8, !tbaa !15
  %110 = getelementptr inbounds %"struct.orsa::OrsaModel::ErrorIndex", ptr %7, i32 0, i32 0
  %111 = load double, ptr %110, align 8, !tbaa !15
  %112 = fcmp olt double %109, %111
  br i1 %112, label %113, label %114

113:                                              ; preds = %55
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %7, ptr align 8 %19, i64 16, i1 false), !tbaa.struct !20
  br label %114

114:                                              ; preds = %113, %55
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %115

115:                                              ; preds = %114
  %116 = load i32, ptr %17, align 4, !tbaa !13
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %17, align 4, !tbaa !13
  br label %38, !llvm.loop !21

118:                                              ; preds = %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  %119 = load { double, i64 }, ptr %7, align 8
  ret { double, i64 } %119
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNSt14numeric_limitsIdE8infinityEv() #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4orsa9OrsaModel10ErrorIndexC2Edii(ptr noundef nonnull align 8 dereferenceable(16), double noundef, i32 noundef, i32 noundef) unnamed_addr #2 align 2

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

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

; Function Attrs: nounwind
declare double @log10(double noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNSt14numeric_limitsIdE7epsilonEv() #2 align 2

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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 = { 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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !10, i64 0}
!16 = !{!"_ZTSN4orsa9OrsaModel10ErrorIndexE", !10, i64 0, !14, i64 8, !14, i64 12}
!17 = !{!16, !14, i64 12}
!18 = !{!19, !19, i64 0}
!19 = !{!"float", !7, i64 0}
!20 = !{i64 0, i64 8, !9, i64 8, i64 4, !13, i64 12, i64 4, !13}
!21 = distinct !{!21, !22}
!22 = !{!"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"

%"struct.orsa::OrsaModel::ErrorIndex" = type { double, i32, i32 }

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

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

; Function Attrs: mustprogress uwtable
define dso_local { double, i64 } @_ZNK4orsa9OrsaModel7bestNFAERKSt6vectorINS0_10ErrorIndexESaIS2_EEddRKS1_IfSaIfEESA_(ptr noundef nonnull align 8 dereferenceable(121) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, double noundef %2, double noundef %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5) local_unnamed_addr #1 align 2 {
  %7 = alloca %"struct.orsa::OrsaModel::ErrorIndex", align 8
  %8 = alloca %"struct.orsa::OrsaModel::ErrorIndex", align 8
  %9 = load ptr, ptr %0, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %9, i64 16
  %11 = load ptr, ptr %10, align 8
  %12 = tail call noundef i32 %11(ptr noundef nonnull align 8 dereferenceable(121) %0)
  %13 = load ptr, ptr %0, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %13, i64 32
  %15 = load ptr, ptr %14, align 8
  %16 = tail call noundef zeroext i1 %15(ptr noundef nonnull align 8 dereferenceable(121) %0)
  %17 = select i1 %16, double 1.000000e+00, double 5.000000e-01
  %18 = tail call noundef double @_ZNSt14numeric_limitsIdE8infinityEv() #6
  call void @_ZN4orsa9OrsaModel10ErrorIndexC2Edii(ptr noundef nonnull align 8 dereferenceable(16) %7, double noundef %18, i32 noundef %12, i32 noundef 0)
  %19 = call noundef i64 @_ZNKSt6vectorIN4orsa9OrsaModel10ErrorIndexESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %20 = trunc i64 %19 to i32
  %.not.not26 = icmp slt i32 %12, %20
  br i1 %.not.not26, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %6
  %21 = getelementptr inbounds i8, ptr %0, i64 104
  %22 = sext i32 %12 to i64
  %sext = shl i64 %19, 32
  %wide.trip.count = ashr exact i64 %sext, 32
  br label %23

23:                                               ; preds = %.lr.ph, %60
  %indvars.iv = phi i64 [ %22, %.lr.ph ], [ %indvars.iv.next, %60 ]
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN4orsa9OrsaModel10ErrorIndexESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #6
  %25 = load double, ptr %24, align 8, !tbaa !8
  %26 = fcmp ugt double %25, %3
  br i1 %26, label %.critedge, label %27

.critedge:                                        ; preds = %23, %60, %6
  %.fca.0.load = load double, ptr %7, align 8
  %.fca.0.insert = insertvalue { double, i64 } poison, double %.fca.0.load, 0
  %.fca.1.gep = getelementptr inbounds i8, ptr %7, i64 8
  %.fca.1.load = load i64, ptr %.fca.1.gep, align 8
  %.fca.1.insert = insertvalue { double, i64 } %.fca.0.insert, i64 %.fca.1.load, 1
  ret { double, i64 } %.fca.1.insert

27:                                               ; preds = %23
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN4orsa9OrsaModel10ErrorIndexESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #6
  %29 = getelementptr inbounds i8, ptr %28, i64 12
  %30 = load i32, ptr %29, align 4, !tbaa !13
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [2 x double], ptr %21, i64 0, i64 %31
  %33 = load double, ptr %32, align 8, !tbaa !14
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN4orsa9OrsaModel10ErrorIndexESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #6
  %35 = load double, ptr %34, align 8, !tbaa !8
  %36 = call noundef double @_ZNSt14numeric_limitsIdE7epsilonEv() #6
  %37 = fadd double %35, %36
  %38 = call double @log10(double noundef %37) #6
  %39 = call double @llvm.fmuladd.f64(double %17, double %38, double %33)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #6
  %40 = trunc i64 %indvars.iv.next to i32
  %41 = sub i32 %40, %12
  %42 = sitofp i32 %41 to double
  %43 = call double @llvm.fmuladd.f64(double %39, double %42, double %2)
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv.next) #6
  %45 = load float, ptr %44, align 4, !tbaa !15
  %46 = fpext float %45 to double
  %47 = fadd double %43, %46
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv.next) #6
  %49 = load float, ptr %48, align 4, !tbaa !15
  %50 = fpext float %49 to double
  %51 = fadd double %47, %50
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN4orsa9OrsaModel10ErrorIndexESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #6
  %53 = getelementptr inbounds i8, ptr %52, i64 12
  %54 = load i32, ptr %53, align 4, !tbaa !13
  %55 = trunc nsw i64 %indvars.iv.next to i32
  call void @_ZN4orsa9OrsaModel10ErrorIndexC2Edii(ptr noundef nonnull align 8 dereferenceable(16) %8, double noundef %51, i32 noundef %55, i32 noundef %54)
  %56 = load double, ptr %8, align 8, !tbaa !8
  %57 = load double, ptr %7, align 8, !tbaa !8
  %58 = fcmp olt double %56, %57
  br i1 %58, label %59, label %60

59:                                               ; preds = %27
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %8, i64 16, i1 false), !tbaa.struct !17
  br label %60

60:                                               ; preds = %59, %27
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.critedge, label %23, !llvm.loop !19
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNSt14numeric_limitsIdE8infinityEv() local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4orsa9OrsaModel10ErrorIndexC2Edii(ptr noundef nonnull align 8 dereferenceable(16), double noundef, i32 noundef, i32 noundef) unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNSt14numeric_limitsIdE7epsilonEv() local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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


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