; LLVM IR from buresjan/optim_lbm :: nomad/src/Algos/SSDMads/SSDMads.ll (ZN9NOMAD_4_37SSDMads6runImpEv)

; 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.std::shared_ptr.44" = type { %"class.std::__shared_ptr.45" }
%"class.std::__shared_ptr.45" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.47" = type { %"class.std::__shared_ptr.48" }
%"class.std::__shared_ptr.48" = type { ptr, %"class.std::__shared_count" }
%"class.std::shared_ptr.50" = type { %"class.std::__shared_ptr.51" }
%"class.std::__shared_ptr.51" = type { ptr, %"class.std::__shared_count" }
%"class.NOMAD_4_3::SSDMadsMegaIteration" = type { %"class.NOMAD_4_3::MadsMegaIteration", %"class.std::vector.61", %"class.NOMAD_4_3::RandomPickup" }
%"class.NOMAD_4_3::MadsMegaIteration" = type { %"class.NOMAD_4_3::MegaIteration.base", %"class.std::shared_ptr.44", %"class.std::unique_ptr.53" }
%"class.NOMAD_4_3::MegaIteration.base" = type <{ %"class.NOMAD_4_3::Step.base", [4 x i8], %"class.std::shared_ptr.47", i64, i32 }>
%"class.NOMAD_4_3::Step.base" = type <{ ptr, ptr, i32, [4 x i8], %"class.std::shared_ptr", %"class.std::shared_ptr.3", %"class.std::shared_ptr.6", %"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_ptr.3" = type { %"class.std::__shared_ptr.4" }
%"class.std::__shared_ptr.4" = type { ptr, %"class.std::__shared_count" }
%"class.std::shared_ptr.6" = type { %"class.std::__shared_ptr.7" }
%"class.std::__shared_ptr.7" = type { ptr, %"class.std::__shared_count" }
%"class.NOMAD_4_3::SuccessStats" = type { %"class.std::map", i64, i64 }
%"class.std::map" = type { %"class.std::_Rb_tree.9" }
%"class.std::_Rb_tree.9" = 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::unique_ptr.53" = type { %"struct.std::__uniq_ptr_data.54" }
%"struct.std::__uniq_ptr_data.54" = type { %"class.std::__uniq_ptr_impl.55" }
%"class.std::__uniq_ptr_impl.55" = type { %"class.std::tuple.56" }
%"class.std::tuple.56" = type { %"struct.std::_Tuple_impl.57" }
%"struct.std::_Tuple_impl.57" = type { %"struct.std::_Head_base.60" }
%"struct.std::_Head_base.60" = type { ptr }
%"class.std::vector.61" = type { %"struct.std::_Vector_base.62" }
%"struct.std::_Vector_base.62" = type { %"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::Mads>, std::allocator<std::shared_ptr<NOMAD_4_3::Mads>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::Mads>, std::allocator<std::shared_ptr<NOMAD_4_3::Mads>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::Mads>, std::allocator<std::shared_ptr<NOMAD_4_3::Mads>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::Mads>, std::allocator<std::shared_ptr<NOMAD_4_3::Mads>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.NOMAD_4_3::RandomPickup" = type { %"class.NOMAD_4_3::Uncopyable", i64, i64, ptr }
%"class.NOMAD_4_3::Uncopyable" = type { ptr }
%"class.NOMAD_4_3::Algorithm" = type <{ %"class.NOMAD_4_3::Step.base", i8, [3 x i8], %"class.std::unique_ptr", %"class.std::unique_ptr.16", %"class.std::shared_ptr.24", i8, i8, [6 x i8], %"class.NOMAD_4_3::TrialPointStats", i8, [7 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.15" }
%"struct.std::_Head_base.15" = type { ptr }
%"class.std::unique_ptr.16" = type { %"struct.std::__uniq_ptr_data.17" }
%"struct.std::__uniq_ptr_data.17" = type { %"class.std::__uniq_ptr_impl.18" }
%"class.std::__uniq_ptr_impl.18" = type { %"class.std::tuple.19" }
%"class.std::tuple.19" = type { %"struct.std::_Tuple_impl.20" }
%"struct.std::_Tuple_impl.20" = type { %"struct.std::_Head_base.23" }
%"struct.std::_Head_base.23" = type { ptr }
%"class.std::shared_ptr.24" = type { %"class.std::__shared_ptr.25" }
%"class.std::__shared_ptr.25" = type { ptr, %"class.std::__shared_count" }
%"class.NOMAD_4_3::TrialPointStats" = type { ptr, %"class.std::vector", %"class.std::map.30", %"class.std::map.30", %"class.std::map.30", %"class.std::map.30", i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<NOMAD_4_3::EvalType, std::allocator<NOMAD_4_3::EvalType>>::_Vector_impl" }
%"struct.std::_Vector_base<NOMAD_4_3::EvalType, std::allocator<NOMAD_4_3::EvalType>>::_Vector_impl" = type { %"struct.std::_Vector_base<NOMAD_4_3::EvalType, std::allocator<NOMAD_4_3::EvalType>>::_Vector_impl_data" }
%"struct.std::_Vector_base<NOMAD_4_3::EvalType, std::allocator<NOMAD_4_3::EvalType>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map.30" = type { %"class.std::_Rb_tree.31" }
%"class.std::_Rb_tree.31" = type { %"struct.std::_Rb_tree<NOMAD_4_3::EvalType, std::pair<const NOMAD_4_3::EvalType, unsigned long>, std::_Select1st<std::pair<const NOMAD_4_3::EvalType, unsigned long>>, std::less<NOMAD_4_3::EvalType>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<NOMAD_4_3::EvalType, std::pair<const NOMAD_4_3::EvalType, unsigned long>, std::_Select1st<std::pair<const NOMAD_4_3::EvalType, unsigned long>>, std::less<NOMAD_4_3::EvalType>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }

@_ZTIN9NOMAD_4_314InitializationE = external constant ptr
@_ZTIN9NOMAD_4_318MadsInitializationE = external constant 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 noundef zeroext i1 @_ZN9NOMAD_4_37SSDMads6runImpEv(ptr noundef nonnull align 8 dereferenceable(417) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i32, align 4
  %5 = alloca i8, align 1
  %6 = alloca %"class.std::shared_ptr.44", align 8
  %7 = alloca %"class.std::shared_ptr.47", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::shared_ptr.50", align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.NOMAD_4_3::SSDMadsMegaIteration", align 8
  %13 = alloca %"class.std::shared_ptr.47", align 8
  %14 = alloca %"class.std::shared_ptr.44", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %15 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  store i64 0, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #7
  store i8 1, ptr %5, align 1, !tbaa !13
  %16 = getelementptr inbounds %"class.NOMAD_4_3::Algorithm", ptr %15, i32 0, i32 4
  %17 = call noundef ptr @_ZNKSt10unique_ptrIN9NOMAD_4_311TerminationESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  %18 = load i64, ptr %3, align 8, !tbaa !9
  %19 = load ptr, ptr %17, align 8, !tbaa !15
  %20 = getelementptr inbounds ptr, ptr %19, i64 10
  %21 = load ptr, ptr %20, align 8
  %22 = call noundef zeroext i1 %21(ptr noundef nonnull align 8 dereferenceable(140) %17, i64 noundef %18)
  br i1 %22, label %90, label %23

23:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #7
  %24 = getelementptr inbounds %"class.NOMAD_4_3::Algorithm", ptr %15, i32 0, i32 3
  %25 = call noundef ptr @_ZNKSt10unique_ptrIN9NOMAD_4_314InitializationESt14default_deleteIS1_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #7
  %26 = icmp eq ptr %25, null
  br i1 %26, label %29, label %27

27:                                               ; preds = %23
  %28 = call ptr @__dynamic_cast(ptr %25, ptr @_ZTIN9NOMAD_4_314InitializationE, ptr @_ZTIN9NOMAD_4_318MadsInitializationE, i64 0) #7
  br label %30

29:                                               ; preds = %23
  br label %30

30:                                               ; preds = %29, %27
  %31 = phi ptr [ %28, %27 ], [ null, %29 ]
  call void @_ZNK9NOMAD_4_318MadsInitialization7getMeshEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.44") align 8 %6, ptr noundef nonnull align 8 dereferenceable(410) %31)
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #7
  %32 = getelementptr inbounds %"class.NOMAD_4_3::Algorithm", ptr %15, i32 0, i32 3
  %33 = call noundef ptr @_ZNKSt10unique_ptrIN9NOMAD_4_314InitializationESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #7
  %34 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9NOMAD_4_314Initialization10getBarrierEv(ptr noundef nonnull align 8 dereferenceable(392) %33)
          to label %35 unwind label %69

35:                                               ; preds = %30
  call void @_ZNSt10shared_ptrIN9NOMAD_4_311BarrierBaseEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %34) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store ptr %15, ptr %11, align 8, !tbaa !5
  invoke void @_ZSt11make_sharedIN9NOMAD_4_320SSDMadsMegaIterationEJPNS0_7SSDMadsERmRSt10shared_ptrINS0_11BarrierBaseEERS5_INS0_8MeshBaseEERNS0_11SuccessTypeEEES5_INSt9enable_ifIXntsr8is_arrayIT_EE5valueESF_E4typeEEDpOT0_(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.50") align 8 %10, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %36 unwind label %73

36:                                               ; preds = %35
  %37 = getelementptr inbounds %"class.NOMAD_4_3::Algorithm", ptr %15, i32 0, i32 5
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN9NOMAD_4_313MegaIterationEEaSINS0_20SSDMadsMegaIterationEEENSt9enable_ifIXsr13is_assignableIRSt12__shared_ptrIS1_LN9__gnu_cxx12_Lock_policyE2EES_IT_EEE5valueERS2_E4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 8 dereferenceable(16) %10) #7
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_320SSDMadsMegaIterationELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 256, ptr %12) #7
  %39 = load i64, ptr %3, align 8, !tbaa !9
  call void @_ZNSt10shared_ptrIN9NOMAD_4_311BarrierBaseEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %7) #7
  call void @_ZNSt10shared_ptrIN9NOMAD_4_38MeshBaseEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(16) %6) #7
  %40 = load i32, ptr %4, align 4, !tbaa !11
  invoke void @_ZN9NOMAD_4_320SSDMadsMegaIterationC2EPKNS_4StepEmSt10shared_ptrINS_11BarrierBaseEES4_INS_8MeshBaseEENS_11SuccessTypeE(ptr noundef nonnull align 8 dereferenceable(256) %12, ptr noundef %15, i64 noundef %39, ptr noundef %13, ptr noundef %14, i32 noundef %40)
          to label %41 unwind label %77

41:                                               ; preds = %36
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #7
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_311BarrierBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #7
  br label %42

42:                                               ; preds = %85, %41
  %43 = getelementptr inbounds %"class.NOMAD_4_3::Algorithm", ptr %15, i32 0, i32 4
  %44 = call noundef ptr @_ZNKSt10unique_ptrIN9NOMAD_4_311TerminationESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %43) #7
  %45 = load i64, ptr %3, align 8, !tbaa !9
  %46 = load ptr, ptr %44, align 8, !tbaa !15
  %47 = getelementptr inbounds ptr, ptr %46, i64 10
  %48 = load ptr, ptr %47, align 8
  %49 = invoke noundef zeroext i1 %48(ptr noundef nonnull align 8 dereferenceable(140) %44, i64 noundef %45)
          to label %50 unwind label %81

50:                                               ; preds = %42
  %51 = xor i1 %49, true
  br i1 %51, label %52, label %86

52:                                               ; preds = %50
  invoke void @_ZN9NOMAD_4_34Step5startEv(ptr noundef nonnull align 8 dereferenceable(140) %12)
          to label %53 unwind label %81

53:                                               ; preds = %52
  %54 = invoke noundef zeroext i1 @_ZN9NOMAD_4_34Step3runEv(ptr noundef nonnull align 8 dereferenceable(140) %12)
          to label %55 unwind label %81

55:                                               ; preds = %53
  invoke void @_ZN9NOMAD_4_34Step3endEv(ptr noundef nonnull align 8 dereferenceable(140) %12)
          to label %56 unwind label %81

56:                                               ; preds = %55
  %57 = invoke noundef i64 @_ZNK9NOMAD_4_313MegaIteration4getKEv(ptr noundef nonnull align 8 dereferenceable(172) %12)
          to label %58 unwind label %81

58:                                               ; preds = %56
  store i64 %57, ptr %3, align 8, !tbaa !9
  %59 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9NOMAD_4_34Step14getSuccessTypeEv(ptr noundef nonnull align 8 dereferenceable(140) %12)
          to label %60 unwind label %81

60:                                               ; preds = %58
  %61 = load i32, ptr %59, align 4, !tbaa !11
  store i32 %61, ptr %4, align 4, !tbaa !11
  %62 = invoke noundef zeroext i1 @_ZN9NOMAD_4_34Step16getUserInterruptEv()
          to label %63 unwind label %81

63:                                               ; preds = %60
  br i1 %62, label %64, label %85

64:                                               ; preds = %63
  %65 = load ptr, ptr %15, align 8, !tbaa !15
  %66 = getelementptr inbounds ptr, ptr %65, i64 8
  %67 = load ptr, ptr %66, align 8
  invoke void %67(ptr noundef nonnull align 8 dereferenceable(417) %15)
          to label %68 unwind label %81

68:                                               ; preds = %64
  br label %85

69:                                               ; preds = %30
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %8, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %9, align 4
  br label %89

73:                                               ; preds = %35
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %8, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  br label %88

77:                                               ; preds = %36
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %8, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %9, align 4
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #7
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_311BarrierBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #7
  br label %87

81:                                               ; preds = %64, %60, %58, %56, %55, %53, %52, %42
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %8, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %9, align 4
  call void @_ZN9NOMAD_4_320SSDMadsMegaIterationD2Ev(ptr noundef nonnull align 8 dereferenceable(256) %12) #7
  br label %87

85:                                               ; preds = %68, %63
  br label %42, !llvm.loop !17

86:                                               ; preds = %50
  call void @_ZN9NOMAD_4_320SSDMadsMegaIterationD2Ev(ptr noundef nonnull align 8 dereferenceable(256) %12) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr %12) #7
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_311BarrierBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #7
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #7
  br label %91

87:                                               ; preds = %81, %77
  call void @llvm.lifetime.end.p0(i64 256, ptr %12) #7
  br label %88

88:                                               ; preds = %87, %73
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_311BarrierBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #7
  br label %89

89:                                               ; preds = %88, %69
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #7
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  br label %101

90:                                               ; preds = %1
  store i8 0, ptr %5, align 1, !tbaa !13
  br label %91

91:                                               ; preds = %90, %86
  %92 = getelementptr inbounds %"class.NOMAD_4_3::Algorithm", ptr %15, i32 0, i32 4
  %93 = call noundef ptr @_ZNKSt10unique_ptrIN9NOMAD_4_311TerminationESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %92) #7
  call void @_ZN9NOMAD_4_34Step5startEv(ptr noundef nonnull align 8 dereferenceable(140) %93)
  %94 = getelementptr inbounds %"class.NOMAD_4_3::Algorithm", ptr %15, i32 0, i32 4
  %95 = call noundef ptr @_ZNKSt10unique_ptrIN9NOMAD_4_311TerminationESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %94) #7
  %96 = call noundef zeroext i1 @_ZN9NOMAD_4_34Step3runEv(ptr noundef nonnull align 8 dereferenceable(140) %95)
  %97 = getelementptr inbounds %"class.NOMAD_4_3::Algorithm", ptr %15, i32 0, i32 4
  %98 = call noundef ptr @_ZNKSt10unique_ptrIN9NOMAD_4_311TerminationESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %97) #7
  call void @_ZN9NOMAD_4_34Step3endEv(ptr noundef nonnull align 8 dereferenceable(140) %98)
  %99 = load i8, ptr %5, align 1, !tbaa !13, !range !19, !noundef !20
  %100 = trunc i8 %99 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  ret i1 %100

101:                                              ; preds = %89
  %102 = load ptr, ptr %8, align 8
  %103 = load i32, ptr %9, align 4
  %104 = insertvalue { ptr, i32 } poison, ptr %102, 0
  %105 = insertvalue { ptr, i32 } %104, i32 %103, 1
  resume { ptr, i32 } %105
}

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

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

; Function Attrs: nounwind willreturn memory(read)
declare ptr @__dynamic_cast(ptr, ptr, ptr, i64) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK9NOMAD_4_318MadsInitialization7getMeshEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.44") align 8, ptr noundef nonnull align 8 dereferenceable(410)) #2 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_sharedIN9NOMAD_4_320SSDMadsMegaIterationEJPNS0_7SSDMadsERmRSt10shared_ptrINS0_11BarrierBaseEERS5_INS0_8MeshBaseEERNS0_11SuccessTypeEEES5_INSt9enable_ifIXntsr8is_arrayIT_EE5valueESF_E4typeEEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.50") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

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

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

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

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

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

declare void @_ZN9NOMAD_4_34Step5startEv(ptr noundef nonnull align 8 dereferenceable(140)) #5

declare noundef zeroext i1 @_ZN9NOMAD_4_34Step3runEv(ptr noundef nonnull align 8 dereferenceable(140)) #5

declare void @_ZN9NOMAD_4_34Step3endEv(ptr noundef nonnull align 8 dereferenceable(140)) #5

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

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

declare noundef zeroext i1 @_ZN9NOMAD_4_34Step16getUserInterruptEv() #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9NOMAD_4_320SSDMadsMegaIterationD2Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #6 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 = { 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 willreturn memory(read) }
attributes #4 = { 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 #5 = { "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 = { 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 #7 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTSN9NOMAD_4_311SuccessTypeE", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !8, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{i8 0, i8 2}
!20 = !{}


; 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.std::shared_ptr.44" = type { %"class.std::__shared_ptr.45" }
%"class.std::__shared_ptr.45" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.47" = type { %"class.std::__shared_ptr.48" }
%"class.std::__shared_ptr.48" = type { ptr, %"class.std::__shared_count" }
%"class.std::shared_ptr.50" = type { %"class.std::__shared_ptr.51" }
%"class.std::__shared_ptr.51" = type { ptr, %"class.std::__shared_count" }
%"class.NOMAD_4_3::SSDMadsMegaIteration" = type { %"class.NOMAD_4_3::MadsMegaIteration", %"class.std::vector.61", %"class.NOMAD_4_3::RandomPickup" }
%"class.NOMAD_4_3::MadsMegaIteration" = type { %"class.NOMAD_4_3::MegaIteration.base", %"class.std::shared_ptr.44", %"class.std::unique_ptr.53" }
%"class.NOMAD_4_3::MegaIteration.base" = type <{ %"class.NOMAD_4_3::Step.base", [4 x i8], %"class.std::shared_ptr.47", i64, i32 }>
%"class.NOMAD_4_3::Step.base" = type <{ ptr, ptr, i32, [4 x i8], %"class.std::shared_ptr", %"class.std::shared_ptr.3", %"class.std::shared_ptr.6", %"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_ptr.3" = type { %"class.std::__shared_ptr.4" }
%"class.std::__shared_ptr.4" = type { ptr, %"class.std::__shared_count" }
%"class.std::shared_ptr.6" = type { %"class.std::__shared_ptr.7" }
%"class.std::__shared_ptr.7" = type { ptr, %"class.std::__shared_count" }
%"class.NOMAD_4_3::SuccessStats" = type { %"class.std::map", i64, i64 }
%"class.std::map" = type { %"class.std::_Rb_tree.9" }
%"class.std::_Rb_tree.9" = 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::unique_ptr.53" = type { %"struct.std::__uniq_ptr_data.54" }
%"struct.std::__uniq_ptr_data.54" = type { %"class.std::__uniq_ptr_impl.55" }
%"class.std::__uniq_ptr_impl.55" = type { %"class.std::tuple.56" }
%"class.std::tuple.56" = type { %"struct.std::_Tuple_impl.57" }
%"struct.std::_Tuple_impl.57" = type { %"struct.std::_Head_base.60" }
%"struct.std::_Head_base.60" = type { ptr }
%"class.std::vector.61" = type { %"struct.std::_Vector_base.62" }
%"struct.std::_Vector_base.62" = type { %"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::Mads>, std::allocator<std::shared_ptr<NOMAD_4_3::Mads>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::Mads>, std::allocator<std::shared_ptr<NOMAD_4_3::Mads>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::Mads>, std::allocator<std::shared_ptr<NOMAD_4_3::Mads>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::Mads>, std::allocator<std::shared_ptr<NOMAD_4_3::Mads>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.NOMAD_4_3::RandomPickup" = type { %"class.NOMAD_4_3::Uncopyable", i64, i64, ptr }
%"class.NOMAD_4_3::Uncopyable" = type { ptr }

@_ZTIN9NOMAD_4_314InitializationE = external constant ptr
@_ZTIN9NOMAD_4_318MadsInitializationE = external constant ptr

; 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 noundef zeroext i1 @_ZN9NOMAD_4_37SSDMads6runImpEv(ptr noundef nonnull align 8 dereferenceable(417) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i64, align 8
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::shared_ptr.44", align 8
  %5 = alloca %"class.std::shared_ptr.47", align 8
  %6 = alloca %"class.std::shared_ptr.50", align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.NOMAD_4_3::SSDMadsMegaIteration", align 8
  %9 = alloca %"class.std::shared_ptr.47", align 8
  %10 = alloca %"class.std::shared_ptr.44", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  store i64 0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  store i32 0, ptr %3, align 4, !tbaa !9
  %11 = getelementptr inbounds i8, ptr %0, i64 152
  %12 = tail call noundef ptr @_ZNKSt10unique_ptrIN9NOMAD_4_311TerminationESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %13 = load ptr, ptr %12, align 8, !tbaa !11
  %14 = getelementptr inbounds i8, ptr %13, i64 80
  %15 = load ptr, ptr %14, align 8
  %16 = tail call noundef zeroext i1 %15(ptr noundef nonnull align 8 dereferenceable(140) %12, i64 noundef 0)
  br i1 %16, label %61, label %17

17:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #8
  %18 = getelementptr inbounds i8, ptr %0, i64 144
  %19 = tail call noundef ptr @_ZNKSt10unique_ptrIN9NOMAD_4_314InitializationESt14default_deleteIS1_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  %20 = icmp ne ptr %19, null
  tail call void @llvm.assume(i1 %20)
  %21 = tail call ptr @__dynamic_cast(ptr nonnull %19, ptr nonnull @_ZTIN9NOMAD_4_314InitializationE, ptr nonnull @_ZTIN9NOMAD_4_318MadsInitializationE, i64 0) #8
  call void @_ZNK9NOMAD_4_318MadsInitialization7getMeshEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.44") align 8 %4, ptr noundef nonnull align 8 dereferenceable(410) %21)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #8
  %22 = call noundef ptr @_ZNKSt10unique_ptrIN9NOMAD_4_314InitializationESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9NOMAD_4_314Initialization10getBarrierEv(ptr noundef nonnull align 8 dereferenceable(392) %22)
  call void @_ZNSt10shared_ptrIN9NOMAD_4_311BarrierBaseEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %23) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  store ptr %0, ptr %7, align 8, !tbaa !13
  invoke void @_ZSt11make_sharedIN9NOMAD_4_320SSDMadsMegaIterationEJPNS0_7SSDMadsERmRSt10shared_ptrINS0_11BarrierBaseEERS5_INS0_8MeshBaseEERNS0_11SuccessTypeEEES5_INSt9enable_ifIXntsr8is_arrayIT_EE5valueESF_E4typeEEDpOT0_(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.50") align 8 %6, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %24 unwind label %52

24:                                               ; preds = %17
  %25 = getelementptr inbounds i8, ptr %0, i64 160
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN9NOMAD_4_313MegaIterationEEaSINS0_20SSDMadsMegaIterationEEENSt9enable_ifIXsr13is_assignableIRSt12__shared_ptrIS1_LN9__gnu_cxx12_Lock_policyE2EES_IT_EEE5valueERS2_E4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 8 dereferenceable(16) %6) #8
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_320SSDMadsMegaIterationELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %8) #8
  %27 = load i64, ptr %2, align 8, !tbaa !5
  call void @_ZNSt10shared_ptrIN9NOMAD_4_311BarrierBaseEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %5) #8
  call void @_ZNSt10shared_ptrIN9NOMAD_4_38MeshBaseEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %4) #8
  %28 = load i32, ptr %3, align 4, !tbaa !9
  invoke void @_ZN9NOMAD_4_320SSDMadsMegaIterationC2EPKNS_4StepEmSt10shared_ptrINS_11BarrierBaseEES4_INS_8MeshBaseEENS_11SuccessTypeE(ptr noundef nonnull align 8 dereferenceable(256) %8, ptr noundef nonnull %0, i64 noundef %27, ptr noundef nonnull %9, ptr noundef nonnull %10, i32 noundef %28)
          to label %29 unwind label %54

29:                                               ; preds = %24
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #8
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_311BarrierBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #8
  br label %30

30:                                               ; preds = %.backedge, %29
  %31 = call noundef ptr @_ZNKSt10unique_ptrIN9NOMAD_4_311TerminationESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %32 = load i64, ptr %2, align 8, !tbaa !5
  %33 = load ptr, ptr %31, align 8, !tbaa !11
  %34 = getelementptr inbounds i8, ptr %33, i64 80
  %35 = load ptr, ptr %34, align 8
  %36 = invoke noundef zeroext i1 %35(ptr noundef nonnull align 8 dereferenceable(140) %31, i64 noundef %32)
          to label %37 unwind label %56

37:                                               ; preds = %30
  br i1 %36, label %58, label %38

38:                                               ; preds = %37
  invoke void @_ZN9NOMAD_4_34Step5startEv(ptr noundef nonnull align 8 dereferenceable(140) %8)
          to label %39 unwind label %56

39:                                               ; preds = %38
  %40 = invoke noundef zeroext i1 @_ZN9NOMAD_4_34Step3runEv(ptr noundef nonnull align 8 dereferenceable(140) %8)
          to label %41 unwind label %56

41:                                               ; preds = %39
  invoke void @_ZN9NOMAD_4_34Step3endEv(ptr noundef nonnull align 8 dereferenceable(140) %8)
          to label %42 unwind label %56

42:                                               ; preds = %41
  %43 = call noundef i64 @_ZNK9NOMAD_4_313MegaIteration4getKEv(ptr noundef nonnull align 8 dereferenceable(172) %8)
  store i64 %43, ptr %2, align 8, !tbaa !5
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9NOMAD_4_34Step14getSuccessTypeEv(ptr noundef nonnull align 8 dereferenceable(140) %8)
  %45 = load i32, ptr %44, align 4, !tbaa !9
  store i32 %45, ptr %3, align 4, !tbaa !9
  %46 = invoke noundef zeroext i1 @_ZN9NOMAD_4_34Step16getUserInterruptEv()
          to label %47 unwind label %56

47:                                               ; preds = %42
  br i1 %46, label %48, label %.backedge

48:                                               ; preds = %47
  %49 = load ptr, ptr %0, align 8, !tbaa !11
  %50 = getelementptr inbounds i8, ptr %49, i64 64
  %51 = load ptr, ptr %50, align 8
  invoke void %51(ptr noundef nonnull align 8 dereferenceable(417) %0)
          to label %.backedge unwind label %56

.backedge:                                        ; preds = %48, %47
  br label %30, !llvm.loop !15

52:                                               ; preds = %17
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #8
  br label %60

54:                                               ; preds = %24
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #8
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_311BarrierBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #8
  br label %59

56:                                               ; preds = %48, %42, %41, %39, %38, %30
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NOMAD_4_320SSDMadsMegaIterationD2Ev(ptr noundef nonnull align 8 dereferenceable(256) %8) #8
  br label %59

58:                                               ; preds = %37
  call void @_ZN9NOMAD_4_320SSDMadsMegaIterationD2Ev(ptr noundef nonnull align 8 dereferenceable(256) %8) #8
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %8) #8
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_311BarrierBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  br label %61

59:                                               ; preds = %56, %54
  %.pn = phi { ptr, i32 } [ %57, %56 ], [ %55, %54 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %8) #8
  br label %60

60:                                               ; preds = %59, %52
  %.pn.pn = phi { ptr, i32 } [ %.pn, %59 ], [ %53, %52 ]
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_311BarrierBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  resume { ptr, i32 } %.pn.pn

61:                                               ; preds = %1, %58
  %.05 = xor i1 %16, true
  %62 = call noundef ptr @_ZNKSt10unique_ptrIN9NOMAD_4_311TerminationESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  call void @_ZN9NOMAD_4_34Step5startEv(ptr noundef nonnull align 8 dereferenceable(140) %62)
  %63 = call noundef ptr @_ZNKSt10unique_ptrIN9NOMAD_4_311TerminationESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %64 = call noundef zeroext i1 @_ZN9NOMAD_4_34Step3runEv(ptr noundef nonnull align 8 dereferenceable(140) %63)
  %65 = call noundef ptr @_ZNKSt10unique_ptrIN9NOMAD_4_311TerminationESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  call void @_ZN9NOMAD_4_34Step3endEv(ptr noundef nonnull align 8 dereferenceable(140) %65)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  ret i1 %.05
}

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare ptr @__dynamic_cast(ptr, ptr, ptr, i64) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK9NOMAD_4_318MadsInitialization7getMeshEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.44") align 8, ptr noundef nonnull align 8 dereferenceable(410)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_sharedIN9NOMAD_4_320SSDMadsMegaIterationEJPNS0_7SSDMadsERmRSt10shared_ptrINS0_11BarrierBaseEERS5_INS0_8MeshBaseEERNS0_11SuccessTypeEEES5_INSt9enable_ifIXntsr8is_arrayIT_EE5valueESF_E4typeEEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.50") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

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

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

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

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

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

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

declare void @_ZN9NOMAD_4_34Step5startEv(ptr noundef nonnull align 8 dereferenceable(140)) local_unnamed_addr #5

declare noundef zeroext i1 @_ZN9NOMAD_4_34Step3runEv(ptr noundef nonnull align 8 dereferenceable(140)) local_unnamed_addr #5

declare void @_ZN9NOMAD_4_34Step3endEv(ptr noundef nonnull align 8 dereferenceable(140)) local_unnamed_addr #5

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

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

declare noundef zeroext i1 @_ZN9NOMAD_4_34Step16getUserInterruptEv() local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9NOMAD_4_320SSDMadsMegaIterationD2Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #6 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write)
declare void @llvm.assume(i1 noundef) #7

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(read) }
attributes #4 = { 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 #5 = { "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 = { 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 #7 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) }
attributes #8 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTSN9NOMAD_4_311SuccessTypeE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


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