; LLVM IR from cvanaret/Uno :: uno/ingredients/globalization_strategies/switching_methods/filter_methods/filter_c8ef92f1 (reductionEddd)

; 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.uno::Range" = type { %"class.uno::Collection", i64, i64 }
%"class.uno::Collection" = type { ptr }
%"class.uno::Collection<unsigned long>::iterator" = type { ptr, i64 }
%"class.uno::NonmonotoneFilter" = type { %"class.uno::Filter", i64 }
%"class.uno::Filter" = type { ptr, i64, %"class.std::vector", %"class.std::vector", double, i64, %"struct.uno::FilterParameters" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.uno::FilterParameters" = type { double, double }

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNK3uno10CollectionImE5beginEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNK3uno10CollectionImE3endEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3unoneERKNS_10CollectionImE8iteratorES4_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN3uno10CollectionImE8iteratorppEv(ptr noundef nonnull align 8 dereferenceable(16)) #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 uwtable
define dso_local noundef double @_ZN3uno17NonmonotoneFilter34compute_actual_objective_reductionEddd(ptr noundef nonnull align 8 dereferenceable(104) %0, double noundef %1, double noundef %2, double noundef %3) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.uno::Range", align 8
  %12 = alloca %"class.uno::Collection<unsigned long>::iterator", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.uno::Collection<unsigned long>::iterator", align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store double %1, ptr %6, align 8, !tbaa !9
  store double %2, ptr %7, align 8, !tbaa !9
  store double %3, ptr %8, align 8, !tbaa !9
  %20 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %21 = load double, ptr %6, align 8, !tbaa !9
  store double %21, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #6
  %22 = getelementptr inbounds %"class.uno::NonmonotoneFilter", ptr %20, i32 0, i32 1
  %23 = load i64, ptr %22, align 8, !tbaa !11
  call void @_ZN3uno5RangeILNS_14RangeDirectionE0EEC2Em(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %23)
  store ptr %11, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #6
  %24 = load ptr, ptr %10, align 8, !tbaa !5
  %25 = invoke { ptr, i64 } @_ZNK3uno10CollectionImE5beginEv(ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %26 unwind label %42

26:                                               ; preds = %4
  %27 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 0
  %28 = extractvalue { ptr, i64 } %25, 0
  store ptr %28, ptr %27, align 8
  %29 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 1
  %30 = extractvalue { ptr, i64 } %25, 1
  store i64 %30, ptr %29, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #6
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  %32 = invoke { ptr, i64 } @_ZNK3uno10CollectionImE3endEv(ptr noundef nonnull align 8 dereferenceable(8) %31)
          to label %33 unwind label %46

33:                                               ; preds = %26
  %34 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 0
  %35 = extractvalue { ptr, i64 } %32, 0
  store ptr %35, ptr %34, align 8
  %36 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 1
  %37 = extractvalue { ptr, i64 } %32, 1
  store i64 %37, ptr %36, align 8
  br label %38

38:                                               ; preds = %91, %33
  %39 = invoke noundef zeroext i1 @_ZN3unoneERKNS_10CollectionImE8iteratorES4_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %15)
          to label %40 unwind label %46

40:                                               ; preds = %38
  br i1 %39, label %50, label %41

41:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  call void @_ZN3uno10CollectionImED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %103

42:                                               ; preds = %4
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %13, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %14, align 4
  br label %102

46:                                               ; preds = %89, %38, %26
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %13, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %14, align 4
  br label %101

50:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %51 = invoke noundef i64 @_ZNK3uno10CollectionImE8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %52 unwind label %92

52:                                               ; preds = %50
  store i64 %51, ptr %16, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %53 = getelementptr inbounds %"class.uno::Filter", ptr %20, i32 0, i32 5
  %54 = load i64, ptr %53, align 8, !tbaa !21
  %55 = load i64, ptr %16, align 8, !tbaa !20
  %56 = sub i64 %54, %55
  store i64 %56, ptr %17, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %57 = load double, ptr %7, align 8, !tbaa !9
  %58 = getelementptr inbounds %"class.uno::Filter", ptr %20, i32 0, i32 2
  %59 = load i64, ptr %17, align 8, !tbaa !20
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %59) #6
  %61 = load double, ptr %60, align 8, !tbaa !9
  %62 = fcmp olt double %57, %61
  br i1 %62, label %63, label %68

63:                                               ; preds = %52
  %64 = getelementptr inbounds %"class.uno::Filter", ptr %20, i32 0, i32 6
  %65 = getelementptr inbounds %"struct.uno::FilterParameters", ptr %64, i32 0, i32 1
  %66 = load double, ptr %65, align 8, !tbaa !22
  %67 = fdiv double 1.000000e+00, %66
  br label %72

68:                                               ; preds = %52
  %69 = getelementptr inbounds %"class.uno::Filter", ptr %20, i32 0, i32 6
  %70 = getelementptr inbounds %"struct.uno::FilterParameters", ptr %69, i32 0, i32 1
  %71 = load double, ptr %70, align 8, !tbaa !22
  br label %72

72:                                               ; preds = %68, %63
  %73 = phi double [ %67, %63 ], [ %71, %68 ]
  store double %73, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %74 = getelementptr inbounds %"class.uno::Filter", ptr %20, i32 0, i32 3
  %75 = load i64, ptr %17, align 8, !tbaa !20
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %74, i64 noundef %75) #6
  %77 = load double, ptr %76, align 8, !tbaa !9
  %78 = load double, ptr %18, align 8, !tbaa !9
  %79 = getelementptr inbounds %"class.uno::Filter", ptr %20, i32 0, i32 2
  %80 = load i64, ptr %17, align 8, !tbaa !20
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %79, i64 noundef %80) #6
  %82 = load double, ptr %81, align 8, !tbaa !9
  %83 = load double, ptr %7, align 8, !tbaa !9
  %84 = fsub double %82, %83
  %85 = call double @llvm.fmuladd.f64(double %78, double %84, double %77)
  store double %85, ptr %19, align 8, !tbaa !9
  %86 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %87 unwind label %96

87:                                               ; preds = %72
  %88 = load double, ptr %86, align 8, !tbaa !9
  store double %88, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %89

89:                                               ; preds = %87
  %90 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN3uno10CollectionImE8iteratorppEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %91 unwind label %46

91:                                               ; preds = %89
  br label %38

92:                                               ; preds = %50
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %13, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %14, align 4
  br label %100

96:                                               ; preds = %72
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %13, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %100

100:                                              ; preds = %96, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %101

101:                                              ; preds = %100, %46
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  br label %102

102:                                              ; preds = %101, %42
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  call void @_ZN3uno10CollectionImED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %107

103:                                              ; preds = %41
  %104 = load double, ptr %9, align 8, !tbaa !9
  %105 = load double, ptr %8, align 8, !tbaa !9
  %106 = fsub double %104, %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  ret double %106

107:                                              ; preds = %102
  %108 = load ptr, ptr %13, align 8
  %109 = load i32, ptr %14, align 4
  %110 = insertvalue { ptr, i32 } poison, ptr %108, 0
  %111 = insertvalue { ptr, i32 } %110, i32 %109, 1
  resume { ptr, i32 } %111
}

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !14, i64 96}
!12 = !{!"_ZTSN3uno17NonmonotoneFilterE", !13, i64 0, !14, i64 96}
!13 = !{!"_ZTSN3uno6FilterE", !14, i64 8, !15, i64 16, !15, i64 40, !10, i64 64, !14, i64 72, !19, i64 80}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSSt6vectorIdSaIdEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSN3uno16FilterParametersE", !10, i64 0, !10, i64 8}
!20 = !{!14, !14, i64 0}
!21 = !{!13, !14, i64 72}
!22 = !{!13, !10, i64 88}


; 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.uno::Range" = type { %"class.uno::Collection", i64, i64 }
%"class.uno::Collection" = type { ptr }
%"class.uno::Collection<unsigned long>::iterator" = type { ptr, i64 }

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNK3uno10CollectionImE5beginEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNK3uno10CollectionImE3endEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3unoneERKNS_10CollectionImE8iteratorES4_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN3uno10CollectionImE8iteratorppEv(ptr noundef nonnull align 8 dereferenceable(16)) 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 uwtable
define dso_local noundef double @_ZN3uno17NonmonotoneFilter34compute_actual_objective_reductionEddd(ptr noundef nonnull align 8 dereferenceable(104) %0, double noundef %1, double noundef %2, double noundef %3) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca double, align 8
  %6 = alloca %"class.uno::Range", align 8
  %7 = alloca %"class.uno::Collection<unsigned long>::iterator", align 8
  %8 = alloca %"class.uno::Collection<unsigned long>::iterator", align 8
  %9 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  store double %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  %10 = getelementptr inbounds i8, ptr %0, i64 96
  %11 = load i64, ptr %10, align 8, !tbaa !9
  call void @_ZN3uno5RangeILNS_14RangeDirectionE0EEC2Em(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %11)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #6
  %12 = invoke { ptr, i64 } @_ZNK3uno10CollectionImE5beginEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %13 unwind label %31

13:                                               ; preds = %4
  %14 = extractvalue { ptr, i64 } %12, 0
  store ptr %14, ptr %7, align 8
  %15 = getelementptr inbounds i8, ptr %7, i64 8
  %16 = extractvalue { ptr, i64 } %12, 1
  store i64 %16, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #6
  %17 = invoke { ptr, i64 } @_ZNK3uno10CollectionImE3endEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %18 unwind label %.loopexit.split-lp

18:                                               ; preds = %13
  %19 = extractvalue { ptr, i64 } %17, 0
  store ptr %19, ptr %8, align 8
  %20 = getelementptr inbounds i8, ptr %8, i64 8
  %21 = extractvalue { ptr, i64 } %17, 1
  store i64 %21, ptr %20, align 8
  %22 = getelementptr inbounds i8, ptr %0, i64 72
  %23 = getelementptr inbounds i8, ptr %0, i64 16
  %24 = getelementptr inbounds i8, ptr %0, i64 88
  %25 = getelementptr inbounds i8, ptr %0, i64 40
  br label %26

26:                                               ; preds = %35, %18
  %27 = call noundef zeroext i1 @_ZN3unoneERKNS_10CollectionImE8iteratorES4_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %8)
  br i1 %27, label %33, label %28

28:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  call void @_ZN3uno10CollectionImED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  %29 = load double, ptr %5, align 8, !tbaa !5
  %30 = fsub double %29, %3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  ret double %30

31:                                               ; preds = %4
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %56

.loopexit:                                        ; preds = %35
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %55

.loopexit.split-lp:                               ; preds = %13
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %55

33:                                               ; preds = %26
  %34 = invoke noundef i64 @_ZNK3uno10CollectionImE8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %35 unwind label %53

35:                                               ; preds = %33
  %36 = load i64, ptr %22, align 8, !tbaa !19
  %37 = sub i64 %36, %34
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %37) #6
  %39 = load double, ptr %38, align 8, !tbaa !5
  %40 = fcmp ogt double %39, %2
  %41 = load double, ptr %24, align 8
  %42 = fdiv double 1.000000e+00, %41
  %43 = select i1 %40, double %42, double %41
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %37) #6
  %45 = load double, ptr %44, align 8, !tbaa !5
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %37) #6
  %47 = load double, ptr %46, align 8, !tbaa !5
  %48 = fsub double %47, %2
  %49 = call double @llvm.fmuladd.f64(double %43, double %48, double %45)
  store double %49, ptr %9, align 8, !tbaa !5
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %51 = load double, ptr %50, align 8, !tbaa !5
  store double %51, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  %52 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN3uno10CollectionImE8iteratorppEv(ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %26 unwind label %.loopexit

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

55:                                               ; preds = %.loopexit, %.loopexit.split-lp, %53
  %.pn = phi { ptr, i32 } [ %54, %53 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  br label %56

56:                                               ; preds = %55, %31
  %.pn.pn = phi { ptr, i32 } [ %.pn, %55 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  call void @_ZN3uno10CollectionImED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  resume { ptr, i32 } %.pn.pn
}

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 96}
!10 = !{!"_ZTSN3uno17NonmonotoneFilterE", !11, i64 0, !12, i64 96}
!11 = !{!"_ZTSN3uno6FilterE", !12, i64 8, !13, i64 16, !13, i64 40, !6, i64 64, !12, i64 72, !18, i64 80}
!12 = !{!"long", !7, i64 0}
!13 = !{!"_ZTSSt6vectorIdSaIdEE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!17 = !{!"any pointer", !7, i64 0}
!18 = !{!"_ZTSN3uno16FilterParametersE", !6, i64 0, !6, i64 8}
!19 = !{!11, !12, i64 72}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopSimplifyPass,SROAPass,SimplifyCFGPass