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

@_ZN9NOMAD_4_3L3INFE = external hidden constant double, 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneIN9NOMAD_4_39EvalPointEEbDnRKSt10shared_ptrIT_E(ptr, ptr noundef nonnull align 8 dereferenceable(16)) #1

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

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

declare void @_ZNK9NOMAD_4_39EvalPoint4getHENS_8EvalTypeENS_11ComputeTypeE(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8, ptr noundef nonnull align 8 dereferenceable(160), i32 noundef, i32 noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN9NOMAD_4_3gtERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN9NOMAD_4_3eqERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) #4

declare void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3

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

declare noundef zeroext i1 @_ZNK9NOMAD_4_39EvalPoint10isFeasibleENS_8EvalTypeENS_11ComputeTypeE(ptr noundef nonnull align 8 dereferenceable(160), i32 noundef, i32 noundef) #3

declare noundef i32 @_ZN9NOMAD_4_34Eval18computeSuccessTypeEPKS0_S2_NS_11ComputeTypeERKNS_6DoubleE(ptr noundef, ptr noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(17)) #3

declare noundef ptr @_ZNK9NOMAD_4_39EvalPoint7getEvalENS_8EvalTypeE(ptr noundef nonnull align 8 dereferenceable(160), i32 noundef) #3

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN9NOMAD_4_318ComputeSuccessType27computeSuccessTypeSurrogateESt10shared_ptrINS_9EvalPointEES3_RKNS_6DoubleE(ptr noundef %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(17) %2) #6 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.NOMAD_4_3::Double", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.NOMAD_4_3::Double", align 8
  %12 = alloca i1, align 1
  %13 = alloca i1, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !9
  %14 = call noundef zeroext i1 @_ZStneIN9NOMAD_4_39EvalPointEEbDnRKSt10shared_ptrIT_E(ptr null, ptr noundef nonnull align 8 dereferenceable(16) %0) #7
  br i1 %14, label %15, label %74

15:                                               ; preds = %3
  %16 = call noundef zeroext i1 @_ZSteqIN9NOMAD_4_39EvalPointEEbDnRKSt10shared_ptrIT_E(ptr null, ptr noundef nonnull align 8 dereferenceable(16) %1) #7
  br i1 %16, label %17, label %66

17:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #7
  %18 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #7
  call void @_ZNK9NOMAD_4_39EvalPoint4getHENS_8EvalTypeENS_11ComputeTypeE(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8 %8, ptr noundef nonnull align 8 dereferenceable(160) %18, i32 noundef 2, i32 noundef 0)
  store i1 false, ptr %12, align 1
  store i1 false, ptr %13, align 1
  %19 = invoke noundef zeroext i1 @_ZNK9NOMAD_4_36Double9isDefinedEv(ptr noundef nonnull align 8 dereferenceable(17) %8)
          to label %20 unwind label %38

20:                                               ; preds = %17
  br i1 %19, label %21, label %29

21:                                               ; preds = %20
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3gtERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %8, ptr noundef nonnull align 8 dereferenceable(17) %22)
          to label %24 unwind label %38

24:                                               ; preds = %21
  br i1 %23, label %29, label %25

25:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #7
  store i1 true, ptr %12, align 1
  invoke void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17) %11, ptr noundef nonnull align 8 dereferenceable(8) @_ZN9NOMAD_4_3L3INFE)
          to label %26 unwind label %42

26:                                               ; preds = %25
  store i1 true, ptr %13, align 1
  %27 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3eqERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %8, ptr noundef nonnull align 8 dereferenceable(17) %11)
          to label %28 unwind label %46

28:                                               ; preds = %26
  br label %29

29:                                               ; preds = %28, %24, %20
  %30 = phi i1 [ true, %24 ], [ true, %20 ], [ %27, %28 ]
  %31 = load i1, ptr %13, align 1
  br i1 %31, label %32, label %33

32:                                               ; preds = %29
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %11) #7
  br label %33

33:                                               ; preds = %32, %29
  %34 = load i1, ptr %12, align 1
  br i1 %34, label %35, label %36

35:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  br label %36

36:                                               ; preds = %35, %33
  br i1 %30, label %37, label %57

37:                                               ; preds = %36
  store i32 2, ptr %7, align 4, !tbaa !9
  br label %64

38:                                               ; preds = %57, %21, %17
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %9, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %10, align 4
  br label %65

42:                                               ; preds = %25
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %9, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %10, align 4
  br label %53

46:                                               ; preds = %26
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %9, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %10, align 4
  %50 = load i1, ptr %13, align 1
  br i1 %50, label %51, label %52

51:                                               ; preds = %46
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %11) #7
  br label %52

52:                                               ; preds = %51, %46
  br label %53

53:                                               ; preds = %52, %42
  %54 = load i1, ptr %12, align 1
  br i1 %54, label %55, label %56

55:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  br label %56

56:                                               ; preds = %55, %53
  br label %65

57:                                               ; preds = %36
  %58 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #7
  %59 = invoke noundef zeroext i1 @_ZNK9NOMAD_4_39EvalPoint10isFeasibleENS_8EvalTypeENS_11ComputeTypeE(ptr noundef nonnull align 8 dereferenceable(160) %58, i32 noundef 2, i32 noundef 0)
          to label %60 unwind label %38

60:                                               ; preds = %57
  br i1 %59, label %61, label %62

61:                                               ; preds = %60
  store i32 4, ptr %7, align 4, !tbaa !9
  br label %63

62:                                               ; preds = %60
  store i32 3, ptr %7, align 4, !tbaa !9
  br label %63

63:                                               ; preds = %62, %61
  br label %64

64:                                               ; preds = %63, %37
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #7
  br label %73

65:                                               ; preds = %56, %38
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %76

66:                                               ; preds = %15
  %67 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #7
  %68 = call noundef ptr @_ZNK9NOMAD_4_39EvalPoint7getEvalENS_8EvalTypeE(ptr noundef nonnull align 8 dereferenceable(160) %67, i32 noundef 2)
  %69 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %70 = call noundef ptr @_ZNK9NOMAD_4_39EvalPoint7getEvalENS_8EvalTypeE(ptr noundef nonnull align 8 dereferenceable(160) %69, i32 noundef 2)
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = call noundef i32 @_ZN9NOMAD_4_34Eval18computeSuccessTypeEPKS0_S2_NS_11ComputeTypeERKNS_6DoubleE(ptr noundef %68, ptr noundef %70, i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(17) %71)
  store i32 %72, ptr %7, align 4, !tbaa !9
  br label %73

73:                                               ; preds = %66, %64
  br label %74

74:                                               ; preds = %73, %3
  %75 = load i32, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  ret i32 %75

76:                                               ; preds = %65
  %77 = load ptr, ptr %9, align 8
  %78 = load i32, ptr %10, align 4
  %79 = insertvalue { ptr, i32 } poison, ptr %77, 0
  %80 = insertvalue { ptr, i32 } %79, i32 %78, 1
  resume { ptr, i32 } %80
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_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.NOMAD_4_3::Double" = type <{ ptr, double, i8, [7 x i8] }>

@_ZN9NOMAD_4_3L3INFE = external hidden constant double, 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: 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 #1

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

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

declare void @_ZNK9NOMAD_4_39EvalPoint4getHENS_8EvalTypeENS_11ComputeTypeE(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8, ptr noundef nonnull align 8 dereferenceable(160), i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN9NOMAD_4_3gtERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN9NOMAD_4_3eqERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) local_unnamed_addr #4

declare void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3

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

declare noundef zeroext i1 @_ZNK9NOMAD_4_39EvalPoint10isFeasibleENS_8EvalTypeENS_11ComputeTypeE(ptr noundef nonnull align 8 dereferenceable(160), i32 noundef, i32 noundef) local_unnamed_addr #3

declare noundef i32 @_ZN9NOMAD_4_34Eval18computeSuccessTypeEPKS0_S2_NS_11ComputeTypeERKNS_6DoubleE(ptr noundef, ptr noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(17)) local_unnamed_addr #3

declare noundef ptr @_ZNK9NOMAD_4_39EvalPoint7getEvalENS_8EvalTypeE(ptr noundef nonnull align 8 dereferenceable(160), i32 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN9NOMAD_4_318ComputeSuccessType27computeSuccessTypeSurrogateESt10shared_ptrINS_9EvalPointEES3_RKNS_6DoubleE(ptr noundef nonnull %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(17) %2) local_unnamed_addr #6 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.NOMAD_4_3::Double", align 8
  %5 = alloca %"class.NOMAD_4_3::Double", align 8
  %6 = tail call noundef zeroext i1 @_ZStneIN9NOMAD_4_39EvalPointEEbDnRKSt10shared_ptrIT_E(ptr null, ptr noundef nonnull align 8 dereferenceable(16) %0) #7
  br i1 %6, label %7, label %36

7:                                                ; preds = %3
  %8 = tail call noundef zeroext i1 @_ZSteqIN9NOMAD_4_39EvalPointEEbDnRKSt10shared_ptrIT_E(ptr null, ptr noundef nonnull align 8 dereferenceable(16) %1) #7
  br i1 %8, label %9, label %30

9:                                                ; preds = %7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  %10 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #7
  call void @_ZNK9NOMAD_4_39EvalPoint4getHENS_8EvalTypeENS_11ComputeTypeE(ptr dead_on_unwind nonnull writable sret(%"class.NOMAD_4_3::Double") align 8 %4, ptr noundef nonnull align 8 dereferenceable(160) %10, i32 noundef 2, i32 noundef 0)
  %11 = call noundef zeroext i1 @_ZNK9NOMAD_4_36Double9isDefinedEv(ptr noundef nonnull align 8 dereferenceable(17) %4)
  br i1 %11, label %12, label %.critedge.thread

12:                                               ; preds = %9
  %13 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3gtERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %4, ptr noundef nonnull align 8 dereferenceable(17) %2)
          to label %14 unwind label %18

14:                                               ; preds = %12
  br i1 %13, label %.critedge.thread, label %15

15:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  invoke void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17) %5, ptr noundef nonnull align 8 dereferenceable(8) @_ZN9NOMAD_4_3L3INFE)
          to label %16 unwind label %20

16:                                               ; preds = %15
  %17 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3eqERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %4, ptr noundef nonnull align 8 dereferenceable(17) %5)
          to label %.critedge unwind label %22

.critedge:                                        ; preds = %16
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  br i1 %17, label %.critedge.thread, label %25

18:                                               ; preds = %25, %12
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %29

20:                                               ; preds = %15
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %24

22:                                               ; preds = %16
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %5) #7
  br label %24

24:                                               ; preds = %20, %22
  %.pn = phi { ptr, i32 } [ %23, %22 ], [ %21, %20 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  br label %29

25:                                               ; preds = %.critedge
  %26 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #7
  %27 = invoke noundef zeroext i1 @_ZNK9NOMAD_4_39EvalPoint10isFeasibleENS_8EvalTypeENS_11ComputeTypeE(ptr noundef nonnull align 8 dereferenceable(160) %26, i32 noundef 2, i32 noundef 0)
          to label %28 unwind label %18

28:                                               ; preds = %25
  %. = select i1 %27, i32 4, i32 3
  br label %.critedge.thread

.critedge.thread:                                 ; preds = %14, %9, %28, %.critedge
  %.012 = phi i32 [ 2, %.critedge ], [ %., %28 ], [ 2, %9 ], [ 2, %14 ]
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  br label %36

29:                                               ; preds = %24, %18
  %.pn15 = phi { ptr, i32 } [ %19, %18 ], [ %.pn, %24 ]
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn15

30:                                               ; preds = %7
  %31 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #7
  %32 = tail call noundef ptr @_ZNK9NOMAD_4_39EvalPoint7getEvalENS_8EvalTypeE(ptr noundef nonnull align 8 dereferenceable(160) %31, i32 noundef 2)
  %33 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %34 = tail call noundef ptr @_ZNK9NOMAD_4_39EvalPoint7getEvalENS_8EvalTypeE(ptr noundef nonnull align 8 dereferenceable(160) %33, i32 noundef 2)
  %35 = tail call noundef i32 @_ZN9NOMAD_4_34Eval18computeSuccessTypeEPKS0_S2_NS_11ComputeTypeERKNS_6DoubleE(ptr noundef %32, ptr noundef %34, i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(17) %2)
  br label %36

36:                                               ; preds = %.critedge.thread, %30, %3
  %.113 = phi i32 [ %.012, %.critedge.thread ], [ %35, %30 ], [ 0, %3 ]
  ret i32 %.113
}

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

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass