; LLVM IR from buresjan/optim_lbm :: nomad/src/Algos/SgtelibModel (SgtelibModelFilterCache)

; 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.NOMAD_4_3::CacheInterface" = type { ptr, %"class.NOMAD_4_3::Point" }
%"class.NOMAD_4_3::Point" = type { %"class.NOMAD_4_3::ArrayOfDouble" }
%"class.NOMAD_4_3::ArrayOfDouble" = type { ptr, i64, ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"class.NOMAD_4_3::SgtelibModelFilterCache" = type { %"class.NOMAD_4_3::Step.base", ptr, i64, %"class.std::set", i32, %"class.std::vector", %"class.std::vector.26", %"class.std::vector.26", %"class.std::vector.26", %"class.std::vector.26", %"class.std::vector.31", %"class.std::vector.26", %"class.std::vector.36", %"class.std::vector.26", %"class.std::vector.26", %"class.std::vector.40", %"class.std::vector.40", double }
%"class.NOMAD_4_3::Step.base" = type <{ ptr, ptr, i32, [4 x i8], %"class.std::shared_ptr", %"class.std::shared_ptr.11", %"class.std::shared_ptr.14", %"class.NOMAD_4_3::SuccessStats", i32 }>
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.11" = type { %"class.std::__shared_ptr.12" }
%"class.std::__shared_ptr.12" = type { ptr, %"class.std::__shared_count" }
%"class.std::shared_ptr.14" = type { %"class.std::__shared_ptr.15" }
%"class.std::__shared_ptr.15" = type { ptr, %"class.std::__shared_count" }
%"class.NOMAD_4_3::SuccessStats" = type { %"class.std::map.17", i64, i64 }
%"class.std::map.17" = type { %"class.std::_Rb_tree.18" }
%"class.std::_Rb_tree.18" = type { %"struct.std::_Rb_tree<std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>, std::pair<const std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>, unsigned long>, std::_Select1st<std::pair<const std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>, unsigned long>>, std::less<std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>, std::pair<const std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>, unsigned long>, std::_Select1st<std::pair<const std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>, unsigned long>>, std::less<std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<NOMAD_4_3::EvalPoint, NOMAD_4_3::EvalPoint, std::_Identity<NOMAD_4_3::EvalPoint>, NOMAD_4_3::EvalPointCompare>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<NOMAD_4_3::EvalPoint, NOMAD_4_3::EvalPoint, std::_Identity<NOMAD_4_3::EvalPoint>, NOMAD_4_3::EvalPointCompare>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<NOMAD_4_3::EvalPoint, std::allocator<NOMAD_4_3::EvalPoint>>::_Vector_impl" }
%"struct.std::_Vector_base<NOMAD_4_3::EvalPoint, std::allocator<NOMAD_4_3::EvalPoint>>::_Vector_impl" = type { %"struct.std::_Vector_base<NOMAD_4_3::EvalPoint, std::allocator<NOMAD_4_3::EvalPoint>>::_Vector_impl_data" }
%"struct.std::_Vector_base<NOMAD_4_3::EvalPoint, std::allocator<NOMAD_4_3::EvalPoint>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.31" = type { %"struct.std::_Vector_base.32" }
%"struct.std::_Vector_base.32" = type { %"struct.std::_Vector_base<std::vector<double>, std::allocator<std::vector<double>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<double>, std::allocator<std::vector<double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<double>, std::allocator<std::vector<double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<double>, std::allocator<std::vector<double>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.36" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::vector.26" = type { %"struct.std::_Vector_base.27" }
%"struct.std::_Vector_base.27" = 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.std::vector.40" = type { %"struct.std::_Vector_base.41" }
%"struct.std::_Vector_base.41" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; 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: mustprogress uwtable
define dso_local void @_ZN9NOMAD_4_323SgtelibModelFilterCache4initEv(ptr noundef nonnull align 8 dereferenceable(528) %0) #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %"class.NOMAD_4_3::CacheInterface", align 8
  %5 = alloca i64, align 8
  %6 = alloca %"class.std::function", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca %"struct.std::_Bit_reference", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %12 = load ptr, ptr %2, align 8
  call void @_ZN9NOMAD_4_34Step19verifyParentNotNullEv(ptr noundef nonnull align 8 dereferenceable(140) %12)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 58, ptr %3, align 4, !tbaa !9
  call void @_ZN9NOMAD_4_34Step11setStepTypeERKNS_8StepTypeE(ptr noundef nonnull align 8 dereferenceable(140) %12, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #5
  call void @_ZN9NOMAD_4_314CacheInterfaceC2EPKNS_4StepE(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  call void @_ZNSt8functionIFbRKN9NOMAD_4_39EvalPointEEEC2IRS4_vEEOT_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @_ZN9NOMAD_4_39EvalPoint12hasModelEvalERKS0_) #5
  %13 = getelementptr inbounds %"class.NOMAD_4_3::SgtelibModelFilterCache", ptr %12, i32 0, i32 5
  %14 = invoke noundef i64 @_ZNK9NOMAD_4_314CacheInterface4findESt8functionIFbRKNS_9EvalPointEEERSt6vectorIS2_SaIS2_EEb(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef %6, ptr noundef nonnull align 8 dereferenceable(24) %13, i1 noundef zeroext false)
          to label %15 unwind label %36

15:                                               ; preds = %1
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  store i64 %14, ptr %5, align 8, !tbaa !11
  %16 = getelementptr inbounds %"class.NOMAD_4_3::SgtelibModelFilterCache", ptr %12, i32 0, i32 6
  %17 = load i64, ptr %5, align 8, !tbaa !11
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %17)
          to label %18 unwind label %40

18:                                               ; preds = %15
  %19 = getelementptr inbounds %"class.NOMAD_4_3::SgtelibModelFilterCache", ptr %12, i32 0, i32 7
  %20 = load i64, ptr %5, align 8, !tbaa !11
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %20)
          to label %21 unwind label %40

21:                                               ; preds = %18
  %22 = getelementptr inbounds %"class.NOMAD_4_3::SgtelibModelFilterCache", ptr %12, i32 0, i32 8
  %23 = load i64, ptr %5, align 8, !tbaa !11
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %23)
          to label %24 unwind label %40

24:                                               ; preds = %21
  %25 = getelementptr inbounds %"class.NOMAD_4_3::SgtelibModelFilterCache", ptr %12, i32 0, i32 9
  %26 = load i64, ptr %5, align 8, !tbaa !11
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %26)
          to label %27 unwind label %40

27:                                               ; preds = %24
  %28 = getelementptr inbounds %"class.NOMAD_4_3::SgtelibModelFilterCache", ptr %12, i32 0, i32 10
  %29 = load i64, ptr %5, align 8, !tbaa !11
  invoke void @_ZNSt6vectorIS_IdSaIdEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %29)
          to label %30 unwind label %40

30:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store i64 0, ptr %9, align 8, !tbaa !11
  br label %31

31:                                               ; preds = %50, %30
  %32 = load i64, ptr %9, align 8, !tbaa !11
  %33 = load i64, ptr %5, align 8, !tbaa !11
  %34 = icmp ult i64 %32, %33
  br i1 %34, label %44, label %35

35:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %57

36:                                               ; preds = %1
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %7, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %8, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %108

40:                                               ; preds = %72, %69, %66, %63, %60, %57, %27, %24, %21, %18, %15
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %7, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %8, align 4
  br label %108

44:                                               ; preds = %31
  %45 = getelementptr inbounds %"class.NOMAD_4_3::SgtelibModelFilterCache", ptr %12, i32 0, i32 10
  %46 = load i64, ptr %9, align 8, !tbaa !11
  %47 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %46) #5
  %48 = load i64, ptr %5, align 8, !tbaa !11
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %48)
          to label %49 unwind label %53

49:                                               ; preds = %44
  br label %50

50:                                               ; preds = %49
  %51 = load i64, ptr %9, align 8, !tbaa !11
  %52 = add i64 %51, 1
  store i64 %52, ptr %9, align 8, !tbaa !11
  br label %31, !llvm.loop !13

53:                                               ; preds = %44
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %7, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %108

57:                                               ; preds = %35
  %58 = getelementptr inbounds %"class.NOMAD_4_3::SgtelibModelFilterCache", ptr %12, i32 0, i32 11
  %59 = load i64, ptr %5, align 8, !tbaa !11
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %59)
          to label %60 unwind label %40

60:                                               ; preds = %57
  %61 = getelementptr inbounds %"class.NOMAD_4_3::SgtelibModelFilterCache", ptr %12, i32 0, i32 12
  %62 = load i64, ptr %5, align 8, !tbaa !11
  invoke void @_ZNSt6vectorIbSaIbEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(40) %61, i64 noundef %62, i1 noundef zeroext false)
          to label %63 unwind label %40

63:                                               ; preds = %60
  %64 = getelementptr inbounds %"class.NOMAD_4_3::SgtelibModelFilterCache", ptr %12, i32 0, i32 13
  %65 = load i64, ptr %5, align 8, !tbaa !11
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %64, i64 noundef %65)
          to label %66 unwind label %40

66:                                               ; preds = %63
  %67 = getelementptr inbounds %"class.NOMAD_4_3::SgtelibModelFilterCache", ptr %12, i32 0, i32 14
  %68 = load i64, ptr %5, align 8, !tbaa !11
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %67, i64 noundef %68)
          to label %69 unwind label %40

69:                                               ; preds = %66
  %70 = getelementptr inbounds %"class.NOMAD_4_3::SgtelibModelFilterCache", ptr %12, i32 0, i32 15
  %71 = load i64, ptr %5, align 8, !tbaa !11
  invoke void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef %71)
          to label %72 unwind label %40

72:                                               ; preds = %69
  %73 = getelementptr inbounds %"class.NOMAD_4_3::SgtelibModelFilterCache", ptr %12, i32 0, i32 16
  %74 = load i64, ptr %5, align 8, !tbaa !11
  invoke void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %73, i64 noundef %74)
          to label %75 unwind label %40

75:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store i64 0, ptr %10, align 8, !tbaa !11
  br label %76

76:                                               ; preds = %100, %75
  %77 = load i64, ptr %10, align 8, !tbaa !11
  %78 = load i64, ptr %5, align 8, !tbaa !11
  %79 = icmp ult i64 %77, %78
  br i1 %79, label %81, label %80

80:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %107

81:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  %82 = getelementptr inbounds %"class.NOMAD_4_3::SgtelibModelFilterCache", ptr %12, i32 0, i32 12
  %83 = load i64, ptr %10, align 8, !tbaa !11
  %84 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %82, i64 noundef %83)
          to label %85 unwind label %103

85:                                               ; preds = %81
  %86 = getelementptr inbounds { ptr, i64 }, ptr %11, i32 0, i32 0
  %87 = extractvalue { ptr, i64 } %84, 0
  store ptr %87, ptr %86, align 8
  %88 = getelementptr inbounds { ptr, i64 }, ptr %11, i32 0, i32 1
  %89 = extractvalue { ptr, i64 } %84, 1
  store i64 %89, ptr %88, align 8
  %90 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %11, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  %91 = getelementptr inbounds %"class.NOMAD_4_3::SgtelibModelFilterCache", ptr %12, i32 0, i32 13
  %92 = load i64, ptr %10, align 8, !tbaa !11
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %91, i64 noundef %92) #5
  store double 0x7FEFFFFFFFFFFFFF, ptr %93, align 8, !tbaa !15
  %94 = getelementptr inbounds %"class.NOMAD_4_3::SgtelibModelFilterCache", ptr %12, i32 0, i32 15
  %95 = load i64, ptr %10, align 8, !tbaa !11
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %94, i64 noundef %95) #5
  store i32 -1, ptr %96, align 4, !tbaa !17
  %97 = getelementptr inbounds %"class.NOMAD_4_3::SgtelibModelFilterCache", ptr %12, i32 0, i32 16
  %98 = load i64, ptr %10, align 8, !tbaa !11
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %97, i64 noundef %98) #5
  store i32 -1, ptr %99, align 4, !tbaa !17
  br label %100

100:                                              ; preds = %85
  %101 = load i64, ptr %10, align 8, !tbaa !11
  %102 = add i64 %101, 1
  store i64 %102, ptr %10, align 8, !tbaa !11
  br label %76, !llvm.loop !19

103:                                              ; preds = %81
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %7, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %108

107:                                              ; preds = %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @_ZN9NOMAD_4_314CacheInterfaceD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #5
  ret void

108:                                              ; preds = %103, %53, %40, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @_ZN9NOMAD_4_314CacheInterfaceD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #5
  br label %109

109:                                              ; preds = %108
  %110 = load ptr, ptr %7, align 8
  %111 = load i32, ptr %8, align 4
  %112 = insertvalue { ptr, i32 } poison, ptr %110, 0
  %113 = insertvalue { ptr, i32 } %112, i32 %111, 1
  resume { ptr, i32 } %113
}

declare void @_ZN9NOMAD_4_34Step19verifyParentNotNullEv(ptr noundef nonnull align 8 dereferenceable(140)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9NOMAD_4_34Step11setStepTypeERKNS_8StepTypeE(ptr noundef nonnull align 8 dereferenceable(140), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NOMAD_4_314CacheInterfaceC2EPKNS_4StepE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) unnamed_addr #1 align 2

declare noundef i64 @_ZNK9NOMAD_4_314CacheInterface4findESt8functionIFbRKNS_9EvalPointEEERSt6vectorIS2_SaIS2_EEb(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 8 dereferenceable(24), i1 noundef zeroext) #2

declare noundef zeroext i1 @_ZN9NOMAD_4_39EvalPoint12hasModelEvalERKS0_(ptr noundef nonnull align 8 dereferenceable(160)) #2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, i1 noundef zeroext) #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) #3 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 nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9NOMAD_4_314CacheInterfaceD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

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


; 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.NOMAD_4_3::CacheInterface" = type { ptr, %"class.NOMAD_4_3::Point" }
%"class.NOMAD_4_3::Point" = type { %"class.NOMAD_4_3::ArrayOfDouble" }
%"class.NOMAD_4_3::ArrayOfDouble" = type { ptr, i64, ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"struct.std::_Bit_reference" = 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: mustprogress uwtable
define dso_local void @_ZN9NOMAD_4_323SgtelibModelFilterCache4initEv(ptr noundef nonnull align 8 dereferenceable(528) %0) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca %"class.NOMAD_4_3::CacheInterface", align 8
  %4 = alloca %"class.std::function", align 8
  %5 = alloca %"struct.std::_Bit_reference", align 8
  tail call void @_ZN9NOMAD_4_34Step19verifyParentNotNullEv(ptr noundef nonnull align 8 dereferenceable(140) %0)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  store i32 58, ptr %2, align 4, !tbaa !5
  call void @_ZN9NOMAD_4_34Step11setStepTypeERKNS_8StepTypeE(ptr noundef nonnull align 8 dereferenceable(140) %0, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #5
  call void @_ZN9NOMAD_4_314CacheInterfaceC2EPKNS_4StepE(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull %0)
  call void @_ZNSt8functionIFbRKN9NOMAD_4_39EvalPointEEEC2IRS4_vEEOT_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @_ZN9NOMAD_4_39EvalPoint12hasModelEvalERKS0_) #5
  %6 = getelementptr inbounds i8, ptr %0, i64 216
  %7 = invoke noundef i64 @_ZNK9NOMAD_4_314CacheInterface4findESt8functionIFbRKNS_9EvalPointEEERSt6vectorIS2_SaIS2_EEb(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull %4, ptr noundef nonnull align 8 dereferenceable(24) %6, i1 noundef zeroext false)
          to label %8 unwind label %19

8:                                                ; preds = %1
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  %9 = getelementptr inbounds i8, ptr %0, i64 240
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %7)
          to label %10 unwind label %21

10:                                               ; preds = %8
  %11 = getelementptr inbounds i8, ptr %0, i64 264
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %7)
          to label %12 unwind label %21

12:                                               ; preds = %10
  %13 = getelementptr inbounds i8, ptr %0, i64 288
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %7)
          to label %14 unwind label %21

14:                                               ; preds = %12
  %15 = getelementptr inbounds i8, ptr %0, i64 312
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %7)
          to label %16 unwind label %21

16:                                               ; preds = %14
  %17 = getelementptr inbounds i8, ptr %0, i64 336
  invoke void @_ZNSt6vectorIS_IdSaIdEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %7)
          to label %.preheader30 unwind label %21

.preheader30:                                     ; preds = %16
  %.not = icmp eq i64 %7, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %24, %.preheader30
  %18 = getelementptr inbounds i8, ptr %0, i64 360
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %7)
          to label %28 unwind label %21

19:                                               ; preds = %1
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  br label %51

21:                                               ; preds = %36, %34, %32, %30, %28, %._crit_edge, %16, %14, %12, %10, %8
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %51

.lr.ph:                                           ; preds = %.preheader30, %24
  %.02531 = phi i64 [ %25, %24 ], [ 0, %.preheader30 ]
  %23 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %.02531) #5
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %7)
          to label %24 unwind label %26

24:                                               ; preds = %.lr.ph
  %25 = add nuw i64 %.02531, 1
  %exitcond.not = icmp eq i64 %25, %7
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

26:                                               ; preds = %.lr.ph
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %51

28:                                               ; preds = %._crit_edge
  %29 = getelementptr inbounds i8, ptr %0, i64 384
  invoke void @_ZNSt6vectorIbSaIbEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(40) %29, i64 noundef %7, i1 noundef zeroext false)
          to label %30 unwind label %21

30:                                               ; preds = %28
  %31 = getelementptr inbounds i8, ptr %0, i64 424
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %7)
          to label %32 unwind label %21

32:                                               ; preds = %30
  %33 = getelementptr inbounds i8, ptr %0, i64 448
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %33, i64 noundef %7)
          to label %34 unwind label %21

34:                                               ; preds = %32
  %35 = getelementptr inbounds i8, ptr %0, i64 472
  invoke void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef %7)
          to label %36 unwind label %21

36:                                               ; preds = %34
  %37 = getelementptr inbounds i8, ptr %0, i64 496
  invoke void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %7)
          to label %.preheader unwind label %21

.preheader:                                       ; preds = %36
  br i1 %.not, label %._crit_edge34, label %.lr.ph33

.lr.ph33:                                         ; preds = %.preheader
  %38 = getelementptr inbounds i8, ptr %5, i64 8
  br label %39

._crit_edge34:                                    ; preds = %41, %.preheader
  call void @_ZN9NOMAD_4_314CacheInterfaceD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  ret void

39:                                               ; preds = %.lr.ph33, %41
  %.032 = phi i64 [ 0, %.lr.ph33 ], [ %48, %41 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %40 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %29, i64 noundef %.032)
          to label %41 unwind label %49

41:                                               ; preds = %39
  %42 = extractvalue { ptr, i64 } %40, 0
  store ptr %42, ptr %5, align 8
  %43 = extractvalue { ptr, i64 } %40, 1
  store i64 %43, ptr %38, align 8
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %5, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %.032) #5
  store double 0x7FEFFFFFFFFFFFFF, ptr %45, align 8, !tbaa !11
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef %.032) #5
  store i32 -1, ptr %46, align 4, !tbaa !13
  %47 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %.032) #5
  store i32 -1, ptr %47, align 4, !tbaa !13
  %48 = add nuw i64 %.032, 1
  %exitcond36.not = icmp eq i64 %48, %7
  br i1 %exitcond36.not, label %._crit_edge34, label %39, !llvm.loop !15

49:                                               ; preds = %39
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  br label %51

51:                                               ; preds = %49, %26, %21, %19
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %50, %49 ], [ %22, %21 ], [ %20, %19 ]
  call void @_ZN9NOMAD_4_314CacheInterfaceD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn
}

declare void @_ZN9NOMAD_4_34Step19verifyParentNotNullEv(ptr noundef nonnull align 8 dereferenceable(140)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9NOMAD_4_34Step11setStepTypeERKNS_8StepTypeE(ptr noundef nonnull align 8 dereferenceable(140), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NOMAD_4_314CacheInterfaceC2EPKNS_4StepE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) unnamed_addr #1 align 2

declare noundef i64 @_ZNK9NOMAD_4_314CacheInterface4findESt8functionIFbRKNS_9EvalPointEEERSt6vectorIS2_SaIS2_EEb(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 8 dereferenceable(24), i1 noundef zeroext) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN9NOMAD_4_39EvalPoint12hasModelEvalERKS0_(ptr noundef nonnull align 8 dereferenceable(160)) #2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, i1 noundef zeroext) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) local_unnamed_addr #3 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 nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9NOMAD_4_314CacheInterfaceD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

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 = { "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 = { 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 #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 = !{!"_ZTSN9NOMAD_4_38StepTypeE", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = distinct !{!15, !10}


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