; LLVM IR from cvanaret/Uno :: uno/model (ScaledModel)

; 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::ScaledModel" = type { %"class.uno::Model", %"class.std::unique_ptr", %"class.uno::Scaling", %"class.uno::Vector" }
%"class.uno::Model" = type { ptr, %"class.std::__cxx11::basic_string", i64, i64, double }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.1" }
%"struct.std::_Head_base.1" = type { ptr }
%"class.uno::Scaling" = type { double, double, %"class.std::vector" }
%"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 }
%"class.uno::Vector" = type { %"class.std::vector" }

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

declare i32 @__gxx_personality_v0(...)

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

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

declare noundef double @_ZNK3uno7Scaling21get_objective_scalingEv(ptr noundef nonnull align 8 dereferenceable(40)) #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNK3uno10CollectionImE3endEv(ptr noundef nonnull align 8 dereferenceable(8)) #4 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)) #0

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

declare noundef double @_ZNK3uno7Scaling22get_constraint_scalingEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #2

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

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

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

35:                                               ; preds = %28
  %36 = getelementptr inbounds { ptr, i64 }, ptr %17, i32 0, i32 0
  %37 = extractvalue { ptr, i64 } %34, 0
  store ptr %37, ptr %36, align 8
  %38 = getelementptr inbounds { ptr, i64 }, ptr %17, i32 0, i32 1
  %39 = extractvalue { ptr, i64 } %34, 1
  store i64 %39, ptr %38, align 8
  br label %40

40:                                               ; preds = %71, %35
  %41 = invoke noundef zeroext i1 @_ZN3unoneERKNS_10CollectionImE8iteratorES4_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(16) %17)
          to label %42 unwind label %48

42:                                               ; preds = %40
  br i1 %41, label %52, label %43

43:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  call void @_ZN3uno10CollectionImED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %78

44:                                               ; preds = %5
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %15, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %16, align 4
  br label %77

48:                                               ; preds = %69, %40, %28
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %15, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %16, align 4
  br label %76

52:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %53 = invoke noundef i64 @_ZNK3uno10CollectionImE8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %54 unwind label %72

54:                                               ; preds = %52
  store i64 %53, ptr %18, align 8, !tbaa !16
  %55 = getelementptr inbounds %"class.uno::ScaledModel", ptr %19, i32 0, i32 2
  %56 = load i64, ptr %18, align 8, !tbaa !16
  %57 = invoke noundef double @_ZNK3uno7Scaling22get_constraint_scalingEm(ptr noundef nonnull align 8 dereferenceable(40) %55, i64 noundef %56)
          to label %58 unwind label %72

58:                                               ; preds = %54
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = load i64, ptr %18, align 8, !tbaa !16
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3uno6VectorIdEixEm(ptr noundef nonnull align 8 dereferenceable(24) %59, i64 noundef %60)
          to label %62 unwind label %72

62:                                               ; preds = %58
  %63 = load double, ptr %61, align 8, !tbaa !9
  %64 = fmul double %57, %63
  %65 = getelementptr inbounds %"class.uno::ScaledModel", ptr %19, i32 0, i32 3
  %66 = load i64, ptr %18, align 8, !tbaa !16
  %67 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3uno6VectorIdEixEm(ptr noundef nonnull align 8 dereferenceable(24) %65, i64 noundef %66)
          to label %68 unwind label %72

68:                                               ; preds = %62
  store double %64, ptr %67, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %69

69:                                               ; preds = %68
  %70 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN3uno10CollectionImE8iteratorppEv(ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %71 unwind label %48

71:                                               ; preds = %69
  br label %40

72:                                               ; preds = %62, %58, %54, %52
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %15, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %76

76:                                               ; preds = %72, %48
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  br label %77

77:                                               ; preds = %76, %44
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  call void @_ZN3uno10CollectionImED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %88

78:                                               ; preds = %43
  %79 = getelementptr inbounds %"class.uno::ScaledModel", ptr %19, i32 0, i32 1
  %80 = call noundef ptr @_ZNKSt10unique_ptrIN3uno5ModelESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %79) #5
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  %82 = load double, ptr %11, align 8, !tbaa !9
  %83 = getelementptr inbounds %"class.uno::ScaledModel", ptr %19, i32 0, i32 3
  %84 = load ptr, ptr %10, align 8, !tbaa !5
  %85 = load ptr, ptr %80, align 8, !tbaa !17
  %86 = getelementptr inbounds ptr, ptr %85, i64 7
  %87 = load ptr, ptr %86, align 8
  call void %87(ptr noundef nonnull align 8 dereferenceable(64) %80, ptr noundef nonnull align 8 dereferenceable(24) %81, double noundef %82, ptr noundef nonnull align 8 dereferenceable(24) %83, ptr noundef nonnull align 1 %84)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  ret void

88:                                               ; preds = %77
  %89 = load ptr, ptr %15, align 8
  %90 = load i32, ptr %16, align 4
  %91 = insertvalue { ptr, i32 } poison, ptr %89, 0
  %92 = insertvalue { ptr, i32 } %91, i32 %90, 1
  resume { ptr, i32 } %92
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3uno10CollectionImED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 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 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 #5 = { 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, !15, i64 48}
!12 = !{!"_ZTSN3uno5ModelE", !13, i64 8, !15, i64 40, !15, i64 48, !10, i64 56}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!15, !15, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !8, i64 0}


; 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 nounwind uwtable
declare dso_local noundef ptr @_ZNKSt10unique_ptrIN3uno5ModelESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

declare noundef double @_ZNK3uno7Scaling21get_objective_scalingEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNK3uno10CollectionImE3endEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 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 #0

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

declare noundef double @_ZNK3uno7Scaling22get_constraint_scalingEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #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 #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3uno11ScaledModel27evaluate_lagrangian_hessianERKNS_6VectorIdEEdS4_RNS_15SymmetricMatrixImdEE(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, double noundef %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 1 %4) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %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 = getelementptr inbounds i8, ptr %0, i64 72
  %10 = tail call noundef double @_ZNK3uno7Scaling21get_objective_scalingEv(ptr noundef nonnull align 8 dereferenceable(40) %9)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  %11 = getelementptr inbounds i8, ptr %0, i64 48
  %12 = load i64, ptr %11, align 8, !tbaa !5
  call void @_ZN3uno5RangeILNS_14RangeDirectionE0EEC2Em(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %12)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  %13 = invoke { ptr, i64 } @_ZNK3uno10CollectionImE5beginEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %14 unwind label %33

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

19:                                               ; preds = %14
  %20 = extractvalue { ptr, i64 } %18, 0
  store ptr %20, ptr %8, align 8
  %21 = getelementptr inbounds i8, ptr %8, i64 8
  %22 = extractvalue { ptr, i64 } %18, 1
  store i64 %22, ptr %21, align 8
  %23 = getelementptr inbounds i8, ptr %0, i64 112
  br label %24

24:                                               ; preds = %39, %19
  %25 = call noundef zeroext i1 @_ZN3unoneERKNS_10CollectionImE8iteratorES4_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %8)
  br i1 %25, label %35, label %26

26:                                               ; preds = %24
  %27 = fmul double %10, %2
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  call void @_ZN3uno10CollectionImED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  %28 = getelementptr inbounds i8, ptr %0, i64 64
  %29 = call noundef ptr @_ZNKSt10unique_ptrIN3uno5ModelESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #5
  %30 = load ptr, ptr %29, align 8, !tbaa !14
  %31 = getelementptr inbounds i8, ptr %30, i64 56
  %32 = load ptr, ptr %31, align 8
  call void %32(ptr noundef nonnull align 8 dereferenceable(64) %29, ptr noundef nonnull align 8 dereferenceable(24) %1, double noundef %27, ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 1 %4)
  ret void

33:                                               ; preds = %5
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %48

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

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

35:                                               ; preds = %24
  %36 = invoke noundef i64 @_ZNK3uno10CollectionImE8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %37 unwind label %45

37:                                               ; preds = %35
  %38 = invoke noundef double @_ZNK3uno7Scaling22get_constraint_scalingEm(ptr noundef nonnull align 8 dereferenceable(40) %9, i64 noundef %36)
          to label %39 unwind label %45

39:                                               ; preds = %37
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3uno6VectorIdEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %36)
  %41 = load double, ptr %40, align 8, !tbaa !16
  %42 = fmul double %38, %41
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3uno6VectorIdEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %36)
  store double %42, ptr %43, align 8, !tbaa !16
  %44 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN3uno10CollectionImE8iteratorppEv(ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %24 unwind label %.loopexit

45:                                               ; preds = %37, %35
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %47

47:                                               ; preds = %.loopexit, %.loopexit.split-lp, %45
  %.pn = phi { ptr, i32 } [ %46, %45 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  br label %48

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3uno10CollectionImED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 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 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 #5 = { 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, !12, i64 48}
!6 = !{!"_ZTSN3uno5ModelE", !7, i64 8, !12, i64 40, !12, i64 48, !13, i64 56}
!7 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !8, i64 0, !12, i64 8, !10, i64 16}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"double", !10, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"vtable pointer", !11, i64 0}
!16 = !{!13, !13, i64 0}


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