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

; 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::Double" = type <{ ptr, double, i8, [7 x i8] }>
%"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.std::shared_ptr.11" = type { %"class.std::__shared_ptr.12" }
%"class.std::__shared_ptr.12" = type { ptr, %"class.std::__shared_count" }

@_ZTVN9NOMAD_4_39EvalPointE = external dso_local unnamed_addr constant { [9 x ptr] }, align 8

; 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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

declare void @_ZN9NOMAD_4_36DoubleC1Ev(ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #3

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

declare noundef i32 @_ZN9NOMAD_4_312getThreadNumEv() #2

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9NOMAD_4_39EvalPointC2Em(ptr noundef nonnull align 8 dereferenceable(160) %0, i64 noundef %1) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.NOMAD_4_3::Double", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i64 %1, ptr %4, align 8, !tbaa !9
  %8 = load ptr, ptr %3, align 8
  %9 = load i64, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #6
  call void @_ZN9NOMAD_4_36DoubleC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %5)
  invoke void @_ZN9NOMAD_4_35PointC2EmRKNS_6DoubleE(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %9, ptr noundef nonnull align 8 dereferenceable(17) %5)
          to label %10 unwind label %31

10:                                               ; preds = %2
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  store ptr getelementptr inbounds inrange(-16, 56) ({ [9 x ptr] }, ptr @_ZTVN9NOMAD_4_39EvalPointE, i32 0, i32 0, i32 2), ptr %8, align 8, !tbaa !11
  %11 = getelementptr inbounds %"class.NOMAD_4_3::EvalPoint", ptr %8, i32 0, i32 1
  %12 = getelementptr inbounds [3 x %"class.std::unique_ptr"], ptr %11, i32 0, i32 0
  %13 = getelementptr inbounds %"class.std::unique_ptr", ptr %12, i64 3
  br label %14

14:                                               ; preds = %14, %10
  %15 = phi ptr [ %12, %10 ], [ %16, %14 ]
  call void @_ZNSt10unique_ptrIN9NOMAD_4_34EvalESt14default_deleteIS1_EEC2IS3_vEEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  %16 = getelementptr inbounds %"class.std::unique_ptr", ptr %15, i64 1
  %17 = icmp eq ptr %16, %13
  br i1 %17, label %18, label %14

18:                                               ; preds = %14
  %19 = getelementptr inbounds %"class.NOMAD_4_3::EvalPoint", ptr %8, i32 0, i32 2
  store i32 -1, ptr %19, align 8, !tbaa !13
  %20 = getelementptr inbounds %"class.NOMAD_4_3::EvalPoint", ptr %8, i32 0, i32 3
  %21 = invoke noundef i32 @_ZN9NOMAD_4_312getThreadNumEv()
          to label %22 unwind label %35

22:                                               ; preds = %18
  store i32 %21, ptr %20, align 4, !tbaa !33
  %23 = getelementptr inbounds %"class.NOMAD_4_3::EvalPoint", ptr %8, i32 0, i32 4
  store i16 0, ptr %23, align 8, !tbaa !34
  %24 = getelementptr inbounds %"class.NOMAD_4_3::EvalPoint", ptr %8, i32 0, i32 5
  call void @_ZNSt10shared_ptrIN9NOMAD_4_39EvalPointEEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr null) #6
  %25 = getelementptr inbounds %"class.NOMAD_4_3::EvalPoint", ptr %8, i32 0, i32 6
  call void @llvm.memset.p0.i64(ptr align 8 %25, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIN9NOMAD_4_38StepTypeESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #6
  %26 = getelementptr inbounds %"class.NOMAD_4_3::EvalPoint", ptr %8, i32 0, i32 7
  call void @_ZNSt10shared_ptrIN9NOMAD_4_39DirectionEEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr null) #6
  %27 = getelementptr inbounds %"class.NOMAD_4_3::EvalPoint", ptr %8, i32 0, i32 8
  invoke void @_ZN9NOMAD_4_36DoubleC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %27)
          to label %28 unwind label %39

28:                                               ; preds = %22
  %29 = getelementptr inbounds %"class.NOMAD_4_3::EvalPoint", ptr %8, i32 0, i32 9
  call void @_ZNSt10shared_ptrIN9NOMAD_4_38MeshBaseEEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr null) #6
  invoke void @_ZN9NOMAD_4_39EvalPoint8initEvalEv(ptr noundef nonnull align 8 dereferenceable(160) %8)
          to label %30 unwind label %43

30:                                               ; preds = %28
  ret void

31:                                               ; preds = %2
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %6, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %7, align 4
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  br label %56

35:                                               ; preds = %18
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %6, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %7, align 4
  br label %48

39:                                               ; preds = %22
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %6, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %7, align 4
  br label %47

43:                                               ; preds = %28
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %6, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %7, align 4
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %29) #6
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %27) #6
  br label %47

47:                                               ; preds = %43, %39
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39DirectionELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %26) #6
  call void @_ZNSt6vectorIN9NOMAD_4_38StepTypeESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #6
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %24) #6
  br label %48

48:                                               ; preds = %47, %35
  %49 = getelementptr inbounds [3 x %"class.std::unique_ptr"], ptr %11, i32 0, i32 0
  %50 = getelementptr inbounds %"class.std::unique_ptr", ptr %49, i64 3
  br label %51

51:                                               ; preds = %51, %48
  %52 = phi ptr [ %50, %48 ], [ %53, %51 ]
  %53 = getelementptr inbounds %"class.std::unique_ptr", ptr %52, i64 -1
  call void @_ZNSt10unique_ptrIN9NOMAD_4_34EvalESt14default_deleteIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %53) #6
  %54 = icmp eq ptr %53, %49
  br i1 %54, label %55, label %51

55:                                               ; preds = %51
  call void @_ZN9NOMAD_4_313ArrayOfDoubleD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  br label %56

56:                                               ; preds = %55, %31
  %57 = load ptr, ptr %6, align 8
  %58 = load i32, ptr %7, align 4
  %59 = insertvalue { ptr, i32 } poison, ptr %57, 0
  %60 = insertvalue { ptr, i32 } %59, i32 %58, 1
  resume { ptr, i32 } %60
}

; Function Attrs: nounwind
declare void @_ZN9NOMAD_4_313ArrayOfDoubleD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NOMAD_4_35PointC2EmRKNS_6DoubleE(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #5 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 #4 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 #4 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #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)"}
!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 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !17, i64 48}
!14 = !{!"_ZTSN9NOMAD_4_39EvalPointE", !15, i64 0, !7, i64 24, !17, i64 48, !17, i64 52, !18, i64 56, !19, i64 64, !22, i64 80, !26, i64 104, !28, i64 120, !31, i64 144}
!15 = !{!"_ZTSN9NOMAD_4_35PointE", !16, i64 0}
!16 = !{!"_ZTSN9NOMAD_4_313ArrayOfDoubleE", !10, i64 8, !6, i64 16}
!17 = !{!"int", !7, i64 0}
!18 = !{!"short", !7, i64 0}
!19 = !{!"_ZTSSt10shared_ptrIN9NOMAD_4_39EvalPointEE", !20, i64 0}
!20 = !{!"_ZTSSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !21, i64 8}
!21 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!22 = !{!"_ZTSSt6vectorIN9NOMAD_4_38StepTypeESaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIN9NOMAD_4_38StepTypeESaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN9NOMAD_4_38StepTypeESaIS1_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIN9NOMAD_4_38StepTypeESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"_ZTSSt10shared_ptrIN9NOMAD_4_39DirectionEE", !27, i64 0}
!27 = !{!"_ZTSSt12__shared_ptrIN9NOMAD_4_39DirectionELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !21, i64 8}
!28 = !{!"_ZTSN9NOMAD_4_36DoubleE", !29, i64 8, !30, i64 16}
!29 = !{!"double", !7, i64 0}
!30 = !{!"bool", !7, i64 0}
!31 = !{!"_ZTSSt10shared_ptrIN9NOMAD_4_38MeshBaseEE", !32, i64 0}
!32 = !{!"_ZTSSt12__shared_ptrIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !21, i64 8}
!33 = !{!14, !17, i64 52}
!34 = !{!14, !18, i64 56}


; 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::Double" = type <{ ptr, double, i8, [7 x i8] }>

@_ZTVN9NOMAD_4_39EvalPointE = external dso_local unnamed_addr constant { [9 x ptr] }, align 8

; 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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

declare void @_ZN9NOMAD_4_36DoubleC1Ev(ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #3

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

declare noundef i32 @_ZN9NOMAD_4_312getThreadNumEv() local_unnamed_addr #2

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9NOMAD_4_39EvalPointC2Em(ptr noundef nonnull align 8 dereferenceable(160) %0, i64 noundef %1) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.NOMAD_4_3::Double", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  call void @_ZN9NOMAD_4_36DoubleC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %3)
  invoke void @_ZN9NOMAD_4_35PointC2EmRKNS_6DoubleE(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1, ptr noundef nonnull align 8 dereferenceable(17) %3)
          to label %4 unwind label %16

4:                                                ; preds = %2
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  store ptr getelementptr inbounds inrange(-16, 56) (i8, ptr @_ZTVN9NOMAD_4_39EvalPointE, i64 16), ptr %0, align 8, !tbaa !5
  %.ptr = getelementptr inbounds i8, ptr %0, i64 24
  call void @_ZNSt10unique_ptrIN9NOMAD_4_34EvalESt14default_deleteIS1_EEC2IS3_vEEv(ptr noundef nonnull align 8 dereferenceable(8) %.ptr) #6
  %.ptr.1 = getelementptr inbounds i8, ptr %0, i64 32
  call void @_ZNSt10unique_ptrIN9NOMAD_4_34EvalESt14default_deleteIS1_EEC2IS3_vEEv(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.1) #6
  %.ptr.2 = getelementptr inbounds i8, ptr %0, i64 40
  call void @_ZNSt10unique_ptrIN9NOMAD_4_34EvalESt14default_deleteIS1_EEC2IS3_vEEv(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.2) #6
  %5 = getelementptr inbounds i8, ptr %0, i64 48
  store i32 -1, ptr %5, align 8, !tbaa !8
  %6 = invoke noundef i32 @_ZN9NOMAD_4_312getThreadNumEv()
          to label %7 unwind label %18

7:                                                ; preds = %4
  %8 = getelementptr inbounds i8, ptr %0, i64 52
  store i32 %6, ptr %8, align 4, !tbaa !31
  %9 = getelementptr inbounds i8, ptr %0, i64 56
  store i16 0, ptr %9, align 8, !tbaa !32
  %10 = getelementptr inbounds i8, ptr %0, i64 64
  call void @_ZNSt10shared_ptrIN9NOMAD_4_39EvalPointEEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr null) #6
  %11 = getelementptr inbounds i8, ptr %0, i64 80
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %11, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIN9NOMAD_4_38StepTypeESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  %12 = getelementptr inbounds i8, ptr %0, i64 104
  call void @_ZNSt10shared_ptrIN9NOMAD_4_39DirectionEEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr null) #6
  %13 = getelementptr inbounds i8, ptr %0, i64 120
  invoke void @_ZN9NOMAD_4_36DoubleC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %13)
          to label %14 unwind label %20

14:                                               ; preds = %7
  %15 = getelementptr inbounds i8, ptr %0, i64 144
  call void @_ZNSt10shared_ptrIN9NOMAD_4_38MeshBaseEEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr null) #6
  call void @_ZN9NOMAD_4_39EvalPoint8initEvalEv(ptr noundef nonnull align 8 dereferenceable(160) %0)
  ret void

16:                                               ; preds = %2
  %17 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  br label %23

18:                                               ; preds = %4
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %22

20:                                               ; preds = %7
  %21 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39DirectionELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  call void @_ZNSt6vectorIN9NOMAD_4_38StepTypeESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #6
  br label %22

22:                                               ; preds = %20, %18
  %.pn = phi { ptr, i32 } [ %21, %20 ], [ %19, %18 ]
  call void @_ZNSt10unique_ptrIN9NOMAD_4_34EvalESt14default_deleteIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.2) #6
  call void @_ZNSt10unique_ptrIN9NOMAD_4_34EvalESt14default_deleteIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %.ptr.1) #6
  call void @_ZNSt10unique_ptrIN9NOMAD_4_34EvalESt14default_deleteIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %.ptr) #6
  call void @_ZN9NOMAD_4_313ArrayOfDoubleD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %23

23:                                               ; preds = %22, %16
  %.pn.pn = phi { ptr, i32 } [ %.pn, %22 ], [ %17, %16 ]
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: nounwind
declare void @_ZN9NOMAD_4_313ArrayOfDoubleD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NOMAD_4_35PointC2EmRKNS_6DoubleE(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #5 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 #4 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #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)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !15, i64 48}
!9 = !{!"_ZTSN9NOMAD_4_39EvalPointE", !10, i64 0, !13, i64 24, !15, i64 48, !15, i64 52, !16, i64 56, !17, i64 64, !20, i64 80, !24, i64 104, !26, i64 120, !29, i64 144}
!10 = !{!"_ZTSN9NOMAD_4_35PointE", !11, i64 0}
!11 = !{!"_ZTSN9NOMAD_4_313ArrayOfDoubleE", !12, i64 8, !14, i64 16}
!12 = !{!"long", !13, i64 0}
!13 = !{!"omnipotent char", !7, i64 0}
!14 = !{!"any pointer", !13, i64 0}
!15 = !{!"int", !13, i64 0}
!16 = !{!"short", !13, i64 0}
!17 = !{!"_ZTSSt10shared_ptrIN9NOMAD_4_39EvalPointEE", !18, i64 0}
!18 = !{!"_ZTSSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EE", !14, i64 0, !19, i64 8}
!19 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !14, i64 0}
!20 = !{!"_ZTSSt6vectorIN9NOMAD_4_38StepTypeESaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIN9NOMAD_4_38StepTypeESaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN9NOMAD_4_38StepTypeESaIS1_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN9NOMAD_4_38StepTypeESaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!24 = !{!"_ZTSSt10shared_ptrIN9NOMAD_4_39DirectionEE", !25, i64 0}
!25 = !{!"_ZTSSt12__shared_ptrIN9NOMAD_4_39DirectionELN9__gnu_cxx12_Lock_policyE2EE", !14, i64 0, !19, i64 8}
!26 = !{!"_ZTSN9NOMAD_4_36DoubleE", !27, i64 8, !28, i64 16}
!27 = !{!"double", !13, i64 0}
!28 = !{!"bool", !13, i64 0}
!29 = !{!"_ZTSSt10shared_ptrIN9NOMAD_4_38MeshBaseEE", !30, i64 0}
!30 = !{!"_ZTSSt12__shared_ptrIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2EE", !14, i64 0, !19, i64 8}
!31 = !{!9, !15, i64 52}
!32 = !{!9, !16, i64 56}


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