; LLVM IR from buresjan/optim_lbm :: nomad/src/Algos/DMultiMads (DMultiMadsBarrier)

; 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" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.NOMAD_4_3::ComputeSuccessType" = type { %"class.std::function" }
%"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 } }
%"class.NOMAD_4_3::DMultiMadsBarrier" = type { %"class.NOMAD_4_3::BarrierBase", %"class.std::shared_ptr", %"class.std::shared_ptr", %"class.NOMAD_4_3::ArrayOfDouble", %"class.std::vector", i64, %"class.std::vector.9", i64 }
%"class.NOMAD_4_3::BarrierBase" = type { ptr, %"class.std::vector", %"class.std::vector", %"class.std::shared_ptr", %"class.std::shared_ptr", %"class.NOMAD_4_3::Double", i64 }
%"class.NOMAD_4_3::Double" = type <{ ptr, double, i8, [7 x i8] }>
%"class.NOMAD_4_3::ArrayOfDouble" = type { ptr, i64, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::EvalPoint>, std::allocator<std::shared_ptr<NOMAD_4_3::EvalPoint>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::EvalPoint>, std::allocator<std::shared_ptr<NOMAD_4_3::EvalPoint>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::EvalPoint>, std::allocator<std::shared_ptr<NOMAD_4_3::EvalPoint>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<NOMAD_4_3::EvalPoint>, std::allocator<std::shared_ptr<NOMAD_4_3::EvalPoint>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.9" = type { %"struct.std::_Vector_base.10" }
%"struct.std::_Vector_base.10" = type { %"struct.std::_Vector_base<NOMAD_4_3::BBInputType, std::allocator<NOMAD_4_3::BBInputType>>::_Vector_impl" }
%"struct.std::_Vector_base<NOMAD_4_3::BBInputType, std::allocator<NOMAD_4_3::BBInputType>>::_Vector_impl" = type { %"struct.std::_Vector_base<NOMAD_4_3::BBInputType, std::allocator<NOMAD_4_3::BBInputType>>::_Vector_impl_data" }
%"struct.std::_Vector_base<NOMAD_4_3::BBInputType, std::allocator<NOMAD_4_3::BBInputType>>::_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 nounwind uwtable
declare dso_local void @_ZNSt10shared_ptrIN9NOMAD_4_39EvalPointEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN9NOMAD_4_317DMultiMadsBarrier22getSuccessTypeOfPointsESt10shared_ptrINS_9EvalPointEES3_NS_8EvalTypeENS_11ComputeTypeE(ptr noundef nonnull align 8 dereferenceable(240) %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::shared_ptr", align 8
  %14 = alloca %"class.std::shared_ptr", align 8
  %15 = alloca %"class.NOMAD_4_3::ComputeSuccessType", align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"class.std::shared_ptr", align 8
  %19 = alloca %"class.std::shared_ptr", align 8
  %20 = alloca %"class.std::shared_ptr", align 8
  %21 = alloca %"class.std::shared_ptr", align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !11
  %22 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 2, ptr %11, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 2, ptr %12, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  call void @_ZNSt10shared_ptrIN9NOMAD_4_39EvalPointEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #5
  call void @_ZNSt10shared_ptrIN9NOMAD_4_39EvalPointEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #5
  %23 = getelementptr inbounds %"class.NOMAD_4_3::DMultiMadsBarrier", ptr %22, i32 0, i32 1
  %24 = call noundef zeroext i1 @_ZStneIN9NOMAD_4_39EvalPointEEbDnRKSt10shared_ptrIT_E(ptr null, ptr noundef nonnull align 8 dereferenceable(16) %23) #5
  br i1 %24, label %28, label %25

25:                                               ; preds = %5
  %26 = getelementptr inbounds %"class.NOMAD_4_3::DMultiMadsBarrier", ptr %22, i32 0, i32 2
  %27 = call noundef zeroext i1 @_ZStneIN9NOMAD_4_39EvalPointEEbDnRKSt10shared_ptrIT_E(ptr null, ptr noundef nonnull align 8 dereferenceable(16) %26) #5
  br i1 %27, label %28, label %68

28:                                               ; preds = %25, %5
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #5
  %29 = load i32, ptr %9, align 4, !tbaa !9
  %30 = load i32, ptr %10, align 4, !tbaa !11
  invoke void @_ZN9NOMAD_4_318ComputeSuccessTypeC2ENS_8EvalTypeENS_11ComputeTypeE(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef %29, i32 noundef %30)
          to label %31 unwind label %39

31:                                               ; preds = %28
  %32 = getelementptr inbounds %"class.NOMAD_4_3::DMultiMadsBarrier", ptr %22, i32 0, i32 1
  %33 = call noundef zeroext i1 @_ZStneIN9NOMAD_4_39EvalPointEEbDnRKSt10shared_ptrIT_E(ptr null, ptr noundef nonnull align 8 dereferenceable(16) %32) #5
  br i1 %33, label %34, label %47

34:                                               ; preds = %31
  call void @_ZNSt10shared_ptrIN9NOMAD_4_39EvalPointEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %1) #5
  %35 = getelementptr inbounds %"class.NOMAD_4_3::DMultiMadsBarrier", ptr %22, i32 0, i32 1
  call void @_ZNSt10shared_ptrIN9NOMAD_4_39EvalPointEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(16) %35) #5
  %36 = getelementptr inbounds %"class.NOMAD_4_3::BarrierBase", ptr %22, i32 0, i32 5
  %37 = invoke noundef i32 @_ZN9NOMAD_4_318ComputeSuccessTypeclESt10shared_ptrINS_9EvalPointEES3_RKNS_6DoubleE(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef %18, ptr noundef %19, ptr noundef nonnull align 8 dereferenceable(17) %36)
          to label %38 unwind label %43

38:                                               ; preds = %34
  store i32 %37, ptr %11, align 4, !tbaa !13
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #5
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #5
  br label %47

39:                                               ; preds = %28
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %16, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %17, align 4
  br label %67

43:                                               ; preds = %34
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %16, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %17, align 4
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #5
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #5
  br label %66

47:                                               ; preds = %38, %31
  %48 = getelementptr inbounds %"class.NOMAD_4_3::DMultiMadsBarrier", ptr %22, i32 0, i32 2
  %49 = call noundef zeroext i1 @_ZStneIN9NOMAD_4_39EvalPointEEbDnRKSt10shared_ptrIT_E(ptr null, ptr noundef nonnull align 8 dereferenceable(16) %48) #5
  br i1 %49, label %50, label %59

50:                                               ; preds = %47
  call void @_ZNSt10shared_ptrIN9NOMAD_4_39EvalPointEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(16) %2) #5
  %51 = getelementptr inbounds %"class.NOMAD_4_3::DMultiMadsBarrier", ptr %22, i32 0, i32 2
  call void @_ZNSt10shared_ptrIN9NOMAD_4_39EvalPointEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %51) #5
  %52 = getelementptr inbounds %"class.NOMAD_4_3::BarrierBase", ptr %22, i32 0, i32 5
  %53 = invoke noundef i32 @_ZN9NOMAD_4_318ComputeSuccessTypeclESt10shared_ptrINS_9EvalPointEES3_RKNS_6DoubleE(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef %20, ptr noundef %21, ptr noundef nonnull align 8 dereferenceable(17) %52)
          to label %54 unwind label %55

54:                                               ; preds = %50
  store i32 %53, ptr %12, align 4, !tbaa !13
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #5
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #5
  br label %59

55:                                               ; preds = %50
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %16, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %17, align 4
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #5
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #5
  br label %66

59:                                               ; preds = %54, %47
  %60 = load i32, ptr %12, align 4, !tbaa !13
  %61 = load i32, ptr %11, align 4, !tbaa !13
  %62 = icmp sgt i32 %60, %61
  br i1 %62, label %63, label %65

63:                                               ; preds = %59
  %64 = load i32, ptr %12, align 4, !tbaa !13
  store i32 %64, ptr %11, align 4, !tbaa !13
  br label %65

65:                                               ; preds = %63, %59
  call void @_ZN9NOMAD_4_318ComputeSuccessTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #5
  br label %68

66:                                               ; preds = %55, %43
  call void @_ZN9NOMAD_4_318ComputeSuccessTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  br label %67

67:                                               ; preds = %66, %39
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #5
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %70

68:                                               ; preds = %65, %25
  %69 = load i32, ptr %11, align 4, !tbaa !13
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  ret i32 %69

70:                                               ; preds = %67
  %71 = load ptr, ptr %16, align 8
  %72 = load i32, ptr %17, align 4
  %73 = insertvalue { ptr, i32 } poison, ptr %71, 0
  %74 = insertvalue { ptr, i32 } %73, i32 %72, 1
  resume { ptr, i32 } %74
}

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

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

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

declare noundef i32 @_ZN9NOMAD_4_318ComputeSuccessTypeclESt10shared_ptrINS_9EvalPointEES3_RKNS_6DoubleE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(17)) #4

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { "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_38EvalTypeE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTSN9NOMAD_4_311ComputeTypeE", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTSN9NOMAD_4_311SuccessTypeE", !7, 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.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.NOMAD_4_3::ComputeSuccessType" = type { %"class.std::function" }
%"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 } }

; 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 nounwind uwtable
declare dso_local void @_ZNSt10shared_ptrIN9NOMAD_4_39EvalPointEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN9NOMAD_4_317DMultiMadsBarrier22getSuccessTypeOfPointsESt10shared_ptrINS_9EvalPointEES3_NS_8EvalTypeENS_11ComputeTypeE(ptr noundef nonnull align 8 dereferenceable(240) %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::shared_ptr", align 8
  %7 = alloca %"class.std::shared_ptr", align 8
  %8 = alloca %"class.NOMAD_4_3::ComputeSuccessType", align 8
  %9 = alloca %"class.std::shared_ptr", align 8
  %10 = alloca %"class.std::shared_ptr", align 8
  %11 = alloca %"class.std::shared_ptr", align 8
  %12 = alloca %"class.std::shared_ptr", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  call void @_ZNSt10shared_ptrIN9NOMAD_4_39EvalPointEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #6
  call void @_ZNSt10shared_ptrIN9NOMAD_4_39EvalPointEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  %13 = getelementptr inbounds i8, ptr %0, i64 120
  %14 = call noundef zeroext i1 @_ZStneIN9NOMAD_4_39EvalPointEEbDnRKSt10shared_ptrIT_E(ptr null, ptr noundef nonnull align 8 dereferenceable(16) %13) #6
  br i1 %14, label %18, label %15

15:                                               ; preds = %5
  %16 = getelementptr inbounds i8, ptr %0, i64 136
  %17 = call noundef zeroext i1 @_ZStneIN9NOMAD_4_39EvalPointEEbDnRKSt10shared_ptrIT_E(ptr null, ptr noundef nonnull align 8 dereferenceable(16) %16) #6
  br i1 %17, label %18, label %41

18:                                               ; preds = %15, %5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #6
  invoke void @_ZN9NOMAD_4_318ComputeSuccessTypeC2ENS_8EvalTypeENS_11ComputeTypeE(ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef %3, i32 noundef %4)
          to label %19 unwind label %25

19:                                               ; preds = %18
  %20 = call noundef zeroext i1 @_ZStneIN9NOMAD_4_39EvalPointEEbDnRKSt10shared_ptrIT_E(ptr null, ptr noundef nonnull align 8 dereferenceable(16) %13) #6
  br i1 %20, label %21, label %29

21:                                               ; preds = %19
  call void @_ZNSt10shared_ptrIN9NOMAD_4_39EvalPointEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %1) #6
  call void @_ZNSt10shared_ptrIN9NOMAD_4_39EvalPointEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %13) #6
  %22 = getelementptr inbounds i8, ptr %0, i64 88
  %23 = invoke noundef i32 @_ZN9NOMAD_4_318ComputeSuccessTypeclESt10shared_ptrINS_9EvalPointEES3_RKNS_6DoubleE(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull align 8 dereferenceable(17) %22)
          to label %24 unwind label %27

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

25:                                               ; preds = %18
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %40

27:                                               ; preds = %21
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %39

29:                                               ; preds = %24, %19
  %.011 = phi i32 [ %23, %24 ], [ 2, %19 ]
  %30 = getelementptr inbounds i8, ptr %0, i64 136
  %31 = call noundef zeroext i1 @_ZStneIN9NOMAD_4_39EvalPointEEbDnRKSt10shared_ptrIT_E(ptr null, ptr noundef nonnull align 8 dereferenceable(16) %30) #6
  br i1 %31, label %32, label %38

32:                                               ; preds = %29
  call void @_ZNSt10shared_ptrIN9NOMAD_4_39EvalPointEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %2) #6
  call void @_ZNSt10shared_ptrIN9NOMAD_4_39EvalPointEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %30) #6
  %33 = getelementptr inbounds i8, ptr %0, i64 88
  %34 = invoke noundef i32 @_ZN9NOMAD_4_318ComputeSuccessTypeclESt10shared_ptrINS_9EvalPointEES3_RKNS_6DoubleE(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull align 8 dereferenceable(17) %33)
          to label %35 unwind label %36

35:                                               ; preds = %32
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #6
  br label %38

36:                                               ; preds = %32
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %39

38:                                               ; preds = %35, %29
  %.010 = phi i32 [ %34, %35 ], [ 2, %29 ]
  %spec.select = call i32 @llvm.smax.i32(i32 %.010, i32 %.011)
  call void @_ZN9NOMAD_4_318ComputeSuccessTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  br label %41

39:                                               ; preds = %36, %27
  %.sink15 = phi ptr [ %12, %36 ], [ %10, %27 ]
  %.sink = phi ptr [ %11, %36 ], [ %9, %27 ]
  %.pn = phi { ptr, i32 } [ %37, %36 ], [ %28, %27 ]
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %.sink15) #6
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %.sink) #6
  call void @_ZN9NOMAD_4_318ComputeSuccessTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  br label %40

40:                                               ; preds = %39, %25
  %.pn.pn = phi { ptr, i32 } [ %.pn, %39 ], [ %26, %25 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  resume { ptr, i32 } %.pn.pn

41:                                               ; preds = %38, %15
  %.2 = phi i32 [ %spec.select, %38 ], [ 2, %15 ]
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  ret i32 %.2
}

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

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

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

declare noundef i32 @_ZN9NOMAD_4_318ComputeSuccessTypeclESt10shared_ptrINS_9EvalPointEES3_RKNS_6DoubleE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(17)) local_unnamed_addr #4

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #5

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}


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