; LLVM IR from buresjan/optim_lbm :: nomad/src/Eval (EvalPoint)

; 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::EvalPoint" = type { %"class.NOMAD_4_3::Point", [3 x %"class.std::unique_ptr"], i32, i32, i16, %"class.std::shared_ptr", %"class.std::vector", %"class.std::shared_ptr.8", %"class.NOMAD_4_3::Double", %"class.std::shared_ptr.11" }
%"class.NOMAD_4_3::Point" = type { %"class.NOMAD_4_3::ArrayOfDouble" }
%"class.NOMAD_4_3::ArrayOfDouble" = type { ptr, i64, ptr }
%"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.4" }
%"struct.std::_Head_base.4" = type { ptr }
%"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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<NOMAD_4_3::StepType, std::allocator<NOMAD_4_3::StepType>>::_Vector_impl" }
%"struct.std::_Vector_base<NOMAD_4_3::StepType, std::allocator<NOMAD_4_3::StepType>>::_Vector_impl" = type { %"struct.std::_Vector_base<NOMAD_4_3::StepType, std::allocator<NOMAD_4_3::StepType>>::_Vector_impl_data" }
%"struct.std::_Vector_base<NOMAD_4_3::StepType, std::allocator<NOMAD_4_3::StepType>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::shared_ptr.8" = type { %"class.std::__shared_ptr.9" }
%"class.std::__shared_ptr.9" = type { ptr, %"class.std::__shared_count" }
%"class.NOMAD_4_3::Double" = type <{ ptr, double, i8, [7 x i8] }>
%"class.std::shared_ptr.11" = type { %"class.std::__shared_ptr.12" }
%"class.std::__shared_ptr.12" = type { ptr, %"class.std::__shared_count" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@.str.9 = external hidden unnamed_addr constant [81 x i8], align 1
@_ZTIN9NOMAD_4_39ExceptionE = external constant ptr
@.str.27 = external hidden unnamed_addr constant [37 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

declare ptr @__cxa_allocate_exception(i64)

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

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

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK9NOMAD_4_39EvalPoint26makeSubSpacePointFromFixedERKNS_5PointE(ptr dead_on_unwind noalias writable sret(%"class.NOMAD_4_3::EvalPoint") align 8, ptr noundef nonnull align 8 dereferenceable(160), ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9NOMAD_4_321convertPointListToSubERSt6vectorINS_9EvalPointESaIS1_EERKNS_5PointE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca i1, align 1
  %12 = alloca i64, align 8
  %13 = alloca %"class.NOMAD_4_3::EvalPoint", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = call noundef zeroext i1 @_ZNK9NOMAD_4_313ArrayOfDouble7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
  br i1 %15, label %16, label %38

16:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #3
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef @.str.27, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %17 unwind label %21

17:                                               ; preds = %16
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #3
  store i1 true, ptr %11, align 1
  %18 = call ptr @__cxa_allocate_exception(i64 112) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #3
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #3
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef @.str.9, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %19 unwind label %25

19:                                               ; preds = %17
  invoke void @_ZN9NOMAD_4_39ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmS8_(ptr noundef nonnull align 8 dereferenceable(112) %18, ptr noundef nonnull align 8 dereferenceable(32) %9, i64 noundef 903, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %20 unwind label %29

20:                                               ; preds = %19
  store i1 false, ptr %11, align 1
  invoke void @__cxa_throw(ptr %18, ptr @_ZTIN9NOMAD_4_39ExceptionE, ptr @_ZN9NOMAD_4_39ExceptionD2Ev) #4
          to label %77 unwind label %29

21:                                               ; preds = %16
  %22 = landingpad { ptr, i32 }
          cleanup
  %23 = extractvalue { ptr, i32 } %22, 0
  store ptr %23, ptr %7, align 8
  %24 = extractvalue { ptr, i32 } %22, 1
  store i32 %24, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #3
  br label %37

25:                                               ; preds = %17
  %26 = landingpad { ptr, i32 }
          cleanup
  %27 = extractvalue { ptr, i32 } %26, 0
  store ptr %27, ptr %7, align 8
  %28 = extractvalue { ptr, i32 } %26, 1
  store i32 %28, ptr %8, align 4
  br label %33

29:                                               ; preds = %20, %19
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %7, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #3
  br label %33

33:                                               ; preds = %29, %25
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #3
  %34 = load i1, ptr %11, align 1
  br i1 %34, label %35, label %36

35:                                               ; preds = %33
  call void @__cxa_free_exception(ptr %18) #3
  br label %36

36:                                               ; preds = %35, %33
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #3
  br label %37

37:                                               ; preds = %36, %21
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #3
  br label %72

38:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %39

39:                                               ; preds = %68, %38
  %40 = load i64, ptr %12, align 8, !tbaa !9
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = call noundef i64 @_ZNKSt6vectorIN9NOMAD_4_39EvalPointESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %41) #3
  %43 = icmp ult i64 %40, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  br label %71

45:                                               ; preds = %39
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = load i64, ptr %12, align 8, !tbaa !9
  %48 = call noundef nonnull align 8 dereferenceable(160) ptr @_ZNSt6vectorIN9NOMAD_4_39EvalPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %47) #3
  %49 = call noundef i64 @_ZNK9NOMAD_4_313ArrayOfDouble4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %48)
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = call noundef i64 @_ZNK9NOMAD_4_313ArrayOfDouble4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %50)
  %52 = icmp eq i64 %49, %51
  br i1 %52, label %53, label %67

53:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 160, ptr %13) #3
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = load i64, ptr %12, align 8, !tbaa !9
  %56 = call noundef nonnull align 8 dereferenceable(160) ptr @_ZNSt6vectorIN9NOMAD_4_39EvalPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef %55) #3
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNK9NOMAD_4_39EvalPoint26makeSubSpacePointFromFixedERKNS_5PointE(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::EvalPoint") align 8 %13, ptr noundef nonnull align 8 dereferenceable(160) %56, ptr noundef nonnull align 8 dereferenceable(24) %57)
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = load i64, ptr %12, align 8, !tbaa !9
  %60 = call noundef nonnull align 8 dereferenceable(160) ptr @_ZNSt6vectorIN9NOMAD_4_39EvalPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %59) #3
  %61 = invoke noundef nonnull align 8 dereferenceable(160) ptr @_ZN9NOMAD_4_39EvalPointaSERKS0_(ptr noundef nonnull align 8 dereferenceable(160) %60, ptr noundef nonnull align 8 dereferenceable(160) %13)
          to label %62 unwind label %63

62:                                               ; preds = %53
  call void @_ZN9NOMAD_4_39EvalPointD1Ev(ptr noundef nonnull align 8 dereferenceable(160) %13) #3
  call void @llvm.lifetime.end.p0(i64 160, ptr %13) #3
  br label %67

63:                                               ; preds = %53
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %7, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %8, align 4
  call void @_ZN9NOMAD_4_39EvalPointD1Ev(ptr noundef nonnull align 8 dereferenceable(160) %13) #3
  call void @llvm.lifetime.end.p0(i64 160, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  br label %72

67:                                               ; preds = %62, %45
  br label %68

68:                                               ; preds = %67
  %69 = load i64, ptr %12, align 8, !tbaa !9
  %70 = add i64 %69, 1
  store i64 %70, ptr %12, align 8, !tbaa !9
  br label %39, !llvm.loop !11

71:                                               ; preds = %44
  ret void

72:                                               ; preds = %63, %37
  %73 = load ptr, ptr %7, align 8
  %74 = load i32, ptr %8, align 4
  %75 = insertvalue { ptr, i32 } poison, ptr %73, 0
  %76 = insertvalue { ptr, i32 } %75, i32 %74, 1
  resume { ptr, i32 } %76

77:                                               ; preds = %20
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK9NOMAD_4_313ArrayOfDouble7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

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

declare void @_ZN9NOMAD_4_39EvalPointD1Ev(ptr)

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 = { nounwind }
attributes #4 = { noreturn }

!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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; 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::EvalPoint" = type { %"class.NOMAD_4_3::Point", [3 x %"class.std::unique_ptr"], i32, i32, i16, %"class.std::shared_ptr", %"class.std::vector", %"class.std::shared_ptr.8", %"class.NOMAD_4_3::Double", %"class.std::shared_ptr.11" }
%"class.NOMAD_4_3::Point" = type { %"class.NOMAD_4_3::ArrayOfDouble" }
%"class.NOMAD_4_3::ArrayOfDouble" = type { ptr, i64, ptr }
%"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.4" }
%"struct.std::_Head_base.4" = type { ptr }
%"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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<NOMAD_4_3::StepType, std::allocator<NOMAD_4_3::StepType>>::_Vector_impl" }
%"struct.std::_Vector_base<NOMAD_4_3::StepType, std::allocator<NOMAD_4_3::StepType>>::_Vector_impl" = type { %"struct.std::_Vector_base<NOMAD_4_3::StepType, std::allocator<NOMAD_4_3::StepType>>::_Vector_impl_data" }
%"struct.std::_Vector_base<NOMAD_4_3::StepType, std::allocator<NOMAD_4_3::StepType>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::shared_ptr.8" = type { %"class.std::__shared_ptr.9" }
%"class.std::__shared_ptr.9" = type { ptr, %"class.std::__shared_count" }
%"class.NOMAD_4_3::Double" = type <{ ptr, double, i8, [7 x i8] }>
%"class.std::shared_ptr.11" = type { %"class.std::__shared_ptr.12" }
%"class.std::__shared_ptr.12" = type { ptr, %"class.std::__shared_count" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@.str.9 = external hidden unnamed_addr constant [81 x i8], align 1
@_ZTIN9NOMAD_4_39ExceptionE = external constant ptr
@.str.27 = external hidden unnamed_addr constant [37 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

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

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK9NOMAD_4_39EvalPoint26makeSubSpacePointFromFixedERKNS_5PointE(ptr dead_on_unwind noalias writable sret(%"class.NOMAD_4_3::EvalPoint") align 8, ptr noundef nonnull align 8 dereferenceable(160), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9NOMAD_4_321convertPointListToSubERSt6vectorINS_9EvalPointESaIS1_EERKNS_5PointE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %"class.NOMAD_4_3::EvalPoint", align 8
  %8 = tail call noundef zeroext i1 @_ZNK9NOMAD_4_313ArrayOfDouble7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  br i1 %8, label %10, label %.preheader

.preheader:                                       ; preds = %2
  %9 = tail call noundef i64 @_ZNKSt6vectorIN9NOMAD_4_39EvalPointESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  %.not = icmp eq i64 %9, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

10:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #3
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #3
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.27, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %11 unwind label %15

11:                                               ; preds = %10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #3
  %12 = call ptr @__cxa_allocate_exception(i64 112) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #3
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.9, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %13 unwind label %.thread

13:                                               ; preds = %11
  invoke void @_ZN9NOMAD_4_39ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmS8_(ptr noundef nonnull align 8 dereferenceable(112) %12, ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef 903, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %14 unwind label %18

14:                                               ; preds = %13
  invoke void @__cxa_throw(ptr nonnull %12, ptr nonnull @_ZTIN9NOMAD_4_39ExceptionE, ptr nonnull @_ZN9NOMAD_4_39ExceptionD2Ev) #4
          to label %39 unwind label %18

15:                                               ; preds = %10
  %16 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #3
  br label %22

.thread:                                          ; preds = %11
  %17 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #3
  br label %20

18:                                               ; preds = %13, %14
  %.014 = phi i1 [ false, %14 ], [ true, %13 ]
  %19 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #3
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #3
  br i1 %.014, label %20, label %21

20:                                               ; preds = %.thread, %18
  %.pn26 = phi { ptr, i32 } [ %17, %.thread ], [ %19, %18 ]
  call void @__cxa_free_exception(ptr %12) #3
  br label %21

21:                                               ; preds = %20, %18
  %.pn25 = phi { ptr, i32 } [ %.pn26, %20 ], [ %19, %18 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #3
  br label %22

22:                                               ; preds = %21, %15
  %.pn.pn = phi { ptr, i32 } [ %.pn25, %21 ], [ %16, %15 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #3
  br label %38

._crit_edge:                                      ; preds = %34, %.preheader
  ret void

.lr.ph:                                           ; preds = %.preheader, %34
  %.027 = phi i64 [ %35, %34 ], [ 0, %.preheader ]
  %23 = call noundef nonnull align 8 dereferenceable(160) ptr @_ZNSt6vectorIN9NOMAD_4_39EvalPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %.027) #3
  %24 = call noundef i64 @_ZNK9NOMAD_4_313ArrayOfDouble4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23)
  %25 = call noundef i64 @_ZNK9NOMAD_4_313ArrayOfDouble4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %26 = icmp eq i64 %24, %25
  br i1 %26, label %27, label %34

27:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %7) #3
  %28 = call noundef nonnull align 8 dereferenceable(160) ptr @_ZNSt6vectorIN9NOMAD_4_39EvalPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %.027) #3
  call void @_ZNK9NOMAD_4_39EvalPoint26makeSubSpacePointFromFixedERKNS_5PointE(ptr dead_on_unwind nonnull writable sret(%"class.NOMAD_4_3::EvalPoint") align 8 %7, ptr noundef nonnull align 8 dereferenceable(160) %28, ptr noundef nonnull align 8 dereferenceable(24) %1)
  %29 = call noundef nonnull align 8 dereferenceable(160) ptr @_ZNSt6vectorIN9NOMAD_4_39EvalPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %.027) #3
  %30 = invoke noundef nonnull align 8 dereferenceable(160) ptr @_ZN9NOMAD_4_39EvalPointaSERKS0_(ptr noundef nonnull align 8 dereferenceable(160) %29, ptr noundef nonnull align 8 dereferenceable(160) %7)
          to label %31 unwind label %32

31:                                               ; preds = %27
  call void @_ZN9NOMAD_4_39EvalPointD1Ev(ptr noundef nonnull align 8 dereferenceable(160) %7) #3
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %7) #3
  br label %34

32:                                               ; preds = %27
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NOMAD_4_39EvalPointD1Ev(ptr noundef nonnull align 8 dereferenceable(160) %7) #3
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %7) #3
  br label %38

34:                                               ; preds = %.lr.ph, %31
  %35 = add nuw i64 %.027, 1
  %36 = call noundef i64 @_ZNKSt6vectorIN9NOMAD_4_39EvalPointESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  %37 = icmp ult i64 %35, %36
  br i1 %37, label %.lr.ph, label %._crit_edge, !llvm.loop !5

38:                                               ; preds = %32, %22
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %22 ], [ %33, %32 ]
  resume { ptr, i32 } %.pn.pn.pn

39:                                               ; preds = %14
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK9NOMAD_4_313ArrayOfDouble7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

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

declare void @_ZN9NOMAD_4_39EvalPointD1Ev(ptr) local_unnamed_addr

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 = { nounwind }
attributes #4 = { noreturn }

!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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}


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