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

; 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::__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 }
%"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 } }

@.str.9 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [90 x i8], align 1
@_ZTIN9NOMAD_4_39ExceptionE = external constant ptr

; 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 i32 @_ZN9NOMAD_4_318ComputeSuccessType25defaultComputeSuccessTypeESt10shared_ptrINS_9EvalPointEES3_RKNS_6DoubleE(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(17)) #2 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9NOMAD_4_318ComputeSuccessType29setComputeSuccessTypeFunctionENS_8EvalTypeENS_11ComputeTypeE(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef %1, i32 noundef %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca i1, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !11
  %14 = load ptr, ptr %4, align 8
  %15 = load i32, ptr %5, align 4, !tbaa !9
  %16 = icmp eq i32 0, %15
  br i1 %16, label %17, label %32

17:                                               ; preds = %3
  %18 = load i32, ptr %6, align 4, !tbaa !11
  %19 = icmp eq i32 0, %18
  br i1 %19, label %20, label %23

20:                                               ; preds = %17
  %21 = getelementptr inbounds %"class.NOMAD_4_3::ComputeSuccessType", ptr %14, i32 0, i32 0
  %22 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt8functionIFN9NOMAD_4_311SuccessTypeESt10shared_ptrINS0_9EvalPointEES4_RKNS0_6DoubleEEEaSIRS8_EENSt9enable_ifIXsrNS9_9_CallableIT_NSC_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISE_E4typeEE4typeES9_EE5valueESt5decayISE_EE4type4typeESt15__invoke_resultIRSP_JS4_S4_S7_EEEE5valueERS9_E4typeEOSE_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull @_ZN9NOMAD_4_318ComputeSuccessType25defaultComputeSuccessTypeESt10shared_ptrINS_9EvalPointEES3_RKNS_6DoubleE) #5
  br label %31

23:                                               ; preds = %17
  %24 = load i32, ptr %6, align 4, !tbaa !11
  %25 = icmp eq i32 1, %24
  br i1 %25, label %26, label %29

26:                                               ; preds = %23
  %27 = getelementptr inbounds %"class.NOMAD_4_3::ComputeSuccessType", ptr %14, i32 0, i32 0
  %28 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt8functionIFN9NOMAD_4_311SuccessTypeESt10shared_ptrINS0_9EvalPointEES4_RKNS0_6DoubleEEEaSIRS8_EENSt9enable_ifIXsrNS9_9_CallableIT_NSC_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISE_E4typeEE4typeES9_EE5valueESt5decayISE_EE4type4typeESt15__invoke_resultIRSP_JS4_S4_S7_EEEE5valueERS9_E4typeEOSE_(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef nonnull @_ZN9NOMAD_4_318ComputeSuccessType26computeSuccessTypePhaseOneESt10shared_ptrINS_9EvalPointEES3_RKNS_6DoubleE) #5
  br label %30

29:                                               ; preds = %23
  br label %30

30:                                               ; preds = %29, %26
  br label %31

31:                                               ; preds = %30, %20
  br label %81

32:                                               ; preds = %3
  %33 = load i32, ptr %5, align 4, !tbaa !9
  %34 = icmp eq i32 2, %33
  br i1 %34, label %35, label %50

35:                                               ; preds = %32
  %36 = load i32, ptr %6, align 4, !tbaa !11
  %37 = icmp eq i32 0, %36
  br i1 %37, label %38, label %41

38:                                               ; preds = %35
  %39 = getelementptr inbounds %"class.NOMAD_4_3::ComputeSuccessType", ptr %14, i32 0, i32 0
  %40 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt8functionIFN9NOMAD_4_311SuccessTypeESt10shared_ptrINS0_9EvalPointEES4_RKNS0_6DoubleEEEaSIRS8_EENSt9enable_ifIXsrNS9_9_CallableIT_NSC_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISE_E4typeEE4typeES9_EE5valueESt5decayISE_EE4type4typeESt15__invoke_resultIRSP_JS4_S4_S7_EEEE5valueERS9_E4typeEOSE_(ptr noundef nonnull align 8 dereferenceable(32) %39, ptr noundef nonnull @_ZN9NOMAD_4_318ComputeSuccessType27computeSuccessTypeSurrogateESt10shared_ptrINS_9EvalPointEES3_RKNS_6DoubleE) #5
  br label %49

41:                                               ; preds = %35
  %42 = load i32, ptr %6, align 4, !tbaa !11
  %43 = icmp eq i32 1, %42
  br i1 %43, label %44, label %47

44:                                               ; preds = %41
  %45 = getelementptr inbounds %"class.NOMAD_4_3::ComputeSuccessType", ptr %14, i32 0, i32 0
  %46 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt8functionIFN9NOMAD_4_311SuccessTypeESt10shared_ptrINS0_9EvalPointEES4_RKNS0_6DoubleEEEaSIRS8_EENSt9enable_ifIXsrNS9_9_CallableIT_NSC_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISE_E4typeEE4typeES9_EE5valueESt5decayISE_EE4type4typeESt15__invoke_resultIRSP_JS4_S4_S7_EEEE5valueERS9_E4typeEOSE_(ptr noundef nonnull align 8 dereferenceable(32) %45, ptr noundef nonnull @_ZN9NOMAD_4_318ComputeSuccessType35computeSuccessTypePhaseOneSurrogateESt10shared_ptrINS_9EvalPointEES3_RKNS_6DoubleE) #5
  br label %48

47:                                               ; preds = %41
  br label %48

48:                                               ; preds = %47, %44
  br label %49

49:                                               ; preds = %48, %38
  br label %80

50:                                               ; preds = %32
  %51 = load i32, ptr %5, align 4, !tbaa !9
  %52 = icmp eq i32 1, %51
  br i1 %52, label %53, label %56

53:                                               ; preds = %50
  %54 = getelementptr inbounds %"class.NOMAD_4_3::ComputeSuccessType", ptr %14, i32 0, i32 0
  %55 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt8functionIFN9NOMAD_4_311SuccessTypeESt10shared_ptrINS0_9EvalPointEES4_RKNS0_6DoubleEEEaSIRS8_EENSt9enable_ifIXsrNS9_9_CallableIT_NSC_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISE_E4typeEE4typeES9_EE5valueESt5decayISE_EE4type4typeESt15__invoke_resultIRSP_JS4_S4_S7_EEEE5valueERS9_E4typeEOSE_(ptr noundef nonnull align 8 dereferenceable(32) %54, ptr noundef nonnull @_ZN9NOMAD_4_318ComputeSuccessType23computeSuccessTypeModelESt10shared_ptrINS_9EvalPointEES3_RKNS_6DoubleE) #5
  br label %79

56:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #5
  %57 = load i32, ptr %5, align 4, !tbaa !9
  call void @_ZN9NOMAD_4_316evalTypeToStringB5cxx11ENS_8EvalTypeE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %8, i32 noundef %57)
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef @.str.9, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %58 unwind label %62

58:                                               ; preds = %56
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #5
  store i1 true, ptr %13, align 1
  %59 = call ptr @__cxa_allocate_exception(i64 112) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef @.str.10, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %60 unwind label %66

60:                                               ; preds = %58
  invoke void @_ZN9NOMAD_4_39ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmS8_(ptr noundef nonnull align 8 dereferenceable(112) %59, ptr noundef nonnull align 8 dereferenceable(32) %11, i64 noundef 267, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %61 unwind label %70

61:                                               ; preds = %60
  store i1 false, ptr %13, align 1
  invoke void @__cxa_throw(ptr %59, ptr @_ZTIN9NOMAD_4_39ExceptionE, ptr @_ZN9NOMAD_4_39ExceptionD2Ev) #6
          to label %87 unwind label %70

62:                                               ; preds = %56
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %9, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #5
  br label %78

66:                                               ; preds = %58
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %9, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %10, align 4
  br label %74

70:                                               ; preds = %61, %60
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %9, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  br label %74

74:                                               ; preds = %70, %66
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  %75 = load i1, ptr %13, align 1
  br i1 %75, label %76, label %77

76:                                               ; preds = %74
  call void @__cxa_free_exception(ptr %59) #5
  br label %77

77:                                               ; preds = %76, %74
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  br label %78

78:                                               ; preds = %77, %62
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #5
  br label %82

79:                                               ; preds = %53
  br label %80

80:                                               ; preds = %79, %49
  br label %81

81:                                               ; preds = %80, %31
  ret void

82:                                               ; preds = %78
  %83 = load ptr, ptr %9, align 8
  %84 = load i32, ptr %10, align 4
  %85 = insertvalue { ptr, i32 } poison, ptr %83, 0
  %86 = insertvalue { ptr, i32 } %85, i32 %84, 1
  resume { ptr, i32 } %86

87:                                               ; preds = %61
  unreachable
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) #3

declare void @_ZN9NOMAD_4_316evalTypeToStringB5cxx11ENS_8EvalTypeE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) #4

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)

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 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 }
attributes #6 = { 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 = !{!"_ZTSN9NOMAD_4_38EvalTypeE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTSN9NOMAD_4_311ComputeTypeE", !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::__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 [48 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [90 x i8], align 1
@_ZTIN9NOMAD_4_39ExceptionE = 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

; 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 i32 @_ZN9NOMAD_4_318ComputeSuccessType25defaultComputeSuccessTypeESt10shared_ptrINS_9EvalPointEES3_RKNS_6DoubleE(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(17)) #2 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9NOMAD_4_318ComputeSuccessType29setComputeSuccessTypeFunctionENS_8EvalTypeENS_11ComputeTypeE(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  switch i32 %1, label %12 [
    i32 0, label %8
    i32 2, label %10
    i32 1, label %.sink.split
  ]

8:                                                ; preds = %3
  switch i32 %2, label %26 [
    i32 0, label %.sink.split
    i32 1, label %9
  ]

9:                                                ; preds = %8
  br label %.sink.split

10:                                               ; preds = %3
  switch i32 %2, label %26 [
    i32 0, label %.sink.split
    i32 1, label %11
  ]

11:                                               ; preds = %10
  br label %.sink.split

12:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  call void @_ZN9NOMAD_4_316evalTypeToStringB5cxx11ENS_8EvalTypeE(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, i32 noundef %1)
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull @.str.9, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %13 unwind label %17

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

15:                                               ; preds = %13
  invoke void @_ZN9NOMAD_4_39ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmS8_(ptr noundef nonnull align 8 dereferenceable(112) %14, ptr noundef nonnull align 8 dereferenceable(32) %6, i64 noundef 267, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %16 unwind label %20

16:                                               ; preds = %15
  invoke void @__cxa_throw(ptr nonnull %14, ptr nonnull @_ZTIN9NOMAD_4_39ExceptionE, ptr nonnull @_ZN9NOMAD_4_39ExceptionD2Ev) #6
          to label %27 unwind label %20

17:                                               ; preds = %12
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  br label %24

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

20:                                               ; preds = %15, %16
  %.0 = phi i1 [ false, %16 ], [ true, %15 ]
  %21 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  br i1 %.0, label %22, label %23

22:                                               ; preds = %.thread, %20
  %.pn23 = phi { ptr, i32 } [ %19, %.thread ], [ %21, %20 ]
  call void @__cxa_free_exception(ptr %14) #5
  br label %23

23:                                               ; preds = %22, %20
  %.pn22 = phi { ptr, i32 } [ %.pn23, %22 ], [ %21, %20 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  br label %24

24:                                               ; preds = %23, %17
  %.pn.pn = phi { ptr, i32 } [ %.pn22, %23 ], [ %18, %17 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn.pn

.sink.split:                                      ; preds = %3, %10, %8, %9, %11
  %_ZN9NOMAD_4_318ComputeSuccessType23computeSuccessTypeModelESt10shared_ptrINS_9EvalPointEES3_RKNS_6DoubleE.sink = phi ptr [ @_ZN9NOMAD_4_318ComputeSuccessType35computeSuccessTypePhaseOneSurrogateESt10shared_ptrINS_9EvalPointEES3_RKNS_6DoubleE, %11 ], [ @_ZN9NOMAD_4_318ComputeSuccessType26computeSuccessTypePhaseOneESt10shared_ptrINS_9EvalPointEES3_RKNS_6DoubleE, %9 ], [ @_ZN9NOMAD_4_318ComputeSuccessType25defaultComputeSuccessTypeESt10shared_ptrINS_9EvalPointEES3_RKNS_6DoubleE, %8 ], [ @_ZN9NOMAD_4_318ComputeSuccessType27computeSuccessTypeSurrogateESt10shared_ptrINS_9EvalPointEES3_RKNS_6DoubleE, %10 ], [ @_ZN9NOMAD_4_318ComputeSuccessType23computeSuccessTypeModelESt10shared_ptrINS_9EvalPointEES3_RKNS_6DoubleE, %3 ]
  %25 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt8functionIFN9NOMAD_4_311SuccessTypeESt10shared_ptrINS0_9EvalPointEES4_RKNS0_6DoubleEEEaSIRS8_EENSt9enable_ifIXsrNS9_9_CallableIT_NSC_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISE_E4typeEE4typeES9_EE5valueESt5decayISE_EE4type4typeESt15__invoke_resultIRSP_JS4_S4_S7_EEEE5valueERS9_E4typeEOSE_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %_ZN9NOMAD_4_318ComputeSuccessType23computeSuccessTypeModelESt10shared_ptrINS_9EvalPointEES3_RKNS_6DoubleE.sink) #5
  br label %26

26:                                               ; preds = %.sink.split, %10, %8
  ret void

27:                                               ; preds = %16
  unreachable
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

declare void @_ZN9NOMAD_4_316evalTypeToStringB5cxx11ENS_8EvalTypeE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) local_unnamed_addr #4

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

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 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 }
attributes #6 = { 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)"}


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