; LLVM IR from buresjan/optim_lbm :: nomad/src/Algos/SgtelibModel (SgtelibModelUpdate)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::shared_ptr.41" = type { %"class.std::__shared_ptr.42" }
%"class.std::__shared_ptr.42" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.NOMAD_4_3::Double" = type <{ ptr, double, i8, [7 x i8] }>

@_ZN9NOMAD_4_3L16MODEL_MAX_OUTPUTE = 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: mustprogress nounwind uwtable
declare dso_local void @_ZN9NOMAD_4_312EvcInterface19getEvaluatorControlEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.41") align 8) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN9NOMAD_4_318SgtelibModelUpdate14validForUpdateERKNS_9EvalPointE(ptr noundef nonnull align 8 dereferenceable(160) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i8, align 1
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::shared_ptr.41", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.NOMAD_4_3::Double", align 8
  %10 = alloca i1, align 1
  %11 = alloca i1, align 1
  %12 = alloca %"class.NOMAD_4_3::Double", align 8
  %13 = alloca i1, align 1
  %14 = alloca i1, align 1
  %15 = alloca %"class.NOMAD_4_3::Double", align 8
  %16 = alloca i1, align 1
  %17 = alloca i1, align 1
  %18 = alloca %"class.NOMAD_4_3::Double", align 8
  %19 = alloca i1, align 1
  %20 = alloca i1, align 1
  %21 = alloca %"class.NOMAD_4_3::Double", align 8
  %22 = alloca i1, align 1
  %23 = alloca i1, align 1
  %24 = alloca %"class.NOMAD_4_3::Double", align 8
  %25 = alloca i1, align 1
  %26 = alloca i1, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #6
  store i8 1, ptr %3, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %27 = load ptr, ptr %2, align 8, !tbaa !5
  %28 = call noundef ptr @_ZNK9NOMAD_4_39EvalPoint7getEvalENS_8EvalTypeE(ptr noundef nonnull align 8 dereferenceable(160) %27, i32 noundef 0)
  store ptr %28, ptr %4, align 8, !tbaa !5
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = icmp eq ptr null, %29
  br i1 %30, label %31, label %32

31:                                               ; preds = %1
  store i8 0, ptr %3, align 1, !tbaa !9
  br label %193

32:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #6
  call void @_ZN9NOMAD_4_312EvcInterface19getEvaluatorControlEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.41") align 8 %6)
  %33 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_316EvaluatorControlELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  %34 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9NOMAD_4_316EvaluatorControl14getComputeTypeEi(ptr noundef nonnull align 8 dereferenceable(352) %33, i32 noundef -1)
          to label %35 unwind label %107

35:                                               ; preds = %32
  %36 = load i32, ptr %34, align 4, !tbaa !11
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_316EvaluatorControlELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #6
  store i32 %36, ptr %5, align 4, !tbaa !11
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = call noundef zeroext i1 @_ZNK9NOMAD_4_34Eval18isBBOutputCompleteEv(ptr noundef nonnull align 8 dereferenceable(105) %37)
  store i1 false, ptr %10, align 1
  store i1 false, ptr %11, align 1
  store i1 false, ptr %13, align 1
  store i1 false, ptr %14, align 1
  store i1 false, ptr %16, align 1
  store i1 false, ptr %17, align 1
  store i1 false, ptr %19, align 1
  store i1 false, ptr %20, align 1
  store i1 false, ptr %22, align 1
  store i1 false, ptr %23, align 1
  store i1 false, ptr %25, align 1
  store i1 false, ptr %26, align 1
  br i1 %38, label %39, label %68

39:                                               ; preds = %35
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = call noundef i32 @_ZNK9NOMAD_4_34Eval13getEvalStatusEv(ptr noundef nonnull align 8 dereferenceable(105) %40)
  %42 = icmp eq i32 4, %41
  br i1 %42, label %43, label %68

43:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #6
  store i1 true, ptr %10, align 1
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = load i32, ptr %5, align 4, !tbaa !11
  call void @_ZNK9NOMAD_4_34Eval4getFENS_11ComputeTypeE(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8 %9, ptr noundef nonnull align 8 dereferenceable(105) %44, i32 noundef %45)
  store i1 true, ptr %11, align 1
  %46 = invoke noundef zeroext i1 @_ZNK9NOMAD_4_36Double9isDefinedEv(ptr noundef nonnull align 8 dereferenceable(17) %9)
          to label %47 unwind label %111

47:                                               ; preds = %43
  br i1 %46, label %48, label %68

48:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #6
  store i1 true, ptr %13, align 1
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = load i32, ptr %5, align 4, !tbaa !11
  invoke void @_ZNK9NOMAD_4_34Eval4getHENS_11ComputeTypeE(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8 %12, ptr noundef nonnull align 8 dereferenceable(105) %49, i32 noundef %50)
          to label %51 unwind label %115

51:                                               ; preds = %48
  store i1 true, ptr %14, align 1
  %52 = invoke noundef zeroext i1 @_ZNK9NOMAD_4_36Double9isDefinedEv(ptr noundef nonnull align 8 dereferenceable(17) %12)
          to label %53 unwind label %119

53:                                               ; preds = %51
  br i1 %52, label %54, label %68

54:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #6
  store i1 true, ptr %16, align 1
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = load i32, ptr %5, align 4, !tbaa !11
  invoke void @_ZNK9NOMAD_4_34Eval4getFENS_11ComputeTypeE(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8 %15, ptr noundef nonnull align 8 dereferenceable(105) %55, i32 noundef %56)
          to label %57 unwind label %123

57:                                               ; preds = %54
  store i1 true, ptr %17, align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #6
  store i1 true, ptr %19, align 1
  invoke void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17) %18, ptr noundef nonnull align 8 dereferenceable(8) @_ZN9NOMAD_4_3L16MODEL_MAX_OUTPUTE)
          to label %58 unwind label %127

58:                                               ; preds = %57
  store i1 true, ptr %20, align 1
  %59 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3gtERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %15, ptr noundef nonnull align 8 dereferenceable(17) %18)
          to label %60 unwind label %131

60:                                               ; preds = %58
  br i1 %59, label %68, label %61

61:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #6
  store i1 true, ptr %22, align 1
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = load i32, ptr %5, align 4, !tbaa !11
  invoke void @_ZNK9NOMAD_4_34Eval4getHENS_11ComputeTypeE(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8 %21, ptr noundef nonnull align 8 dereferenceable(105) %62, i32 noundef %63)
          to label %64 unwind label %135

64:                                               ; preds = %61
  store i1 true, ptr %23, align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #6
  store i1 true, ptr %25, align 1
  invoke void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17) %24, ptr noundef nonnull align 8 dereferenceable(8) @_ZN9NOMAD_4_3L16MODEL_MAX_OUTPUTE)
          to label %65 unwind label %139

65:                                               ; preds = %64
  store i1 true, ptr %26, align 1
  %66 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3gtERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %21, ptr noundef nonnull align 8 dereferenceable(17) %24)
          to label %67 unwind label %143

67:                                               ; preds = %65
  br label %68

68:                                               ; preds = %67, %60, %53, %47, %39, %35
  %69 = phi i1 [ true, %60 ], [ true, %53 ], [ true, %47 ], [ true, %39 ], [ true, %35 ], [ %66, %67 ]
  %70 = load i1, ptr %26, align 1
  br i1 %70, label %71, label %72

71:                                               ; preds = %68
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %24) #6
  br label %72

72:                                               ; preds = %71, %68
  %73 = load i1, ptr %25, align 1
  br i1 %73, label %74, label %75

74:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #6
  br label %75

75:                                               ; preds = %74, %72
  %76 = load i1, ptr %23, align 1
  br i1 %76, label %77, label %78

77:                                               ; preds = %75
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %21) #6
  br label %78

78:                                               ; preds = %77, %75
  %79 = load i1, ptr %22, align 1
  br i1 %79, label %80, label %81

80:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #6
  br label %81

81:                                               ; preds = %80, %78
  %82 = load i1, ptr %20, align 1
  br i1 %82, label %83, label %84

83:                                               ; preds = %81
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %18) #6
  br label %84

84:                                               ; preds = %83, %81
  %85 = load i1, ptr %19, align 1
  br i1 %85, label %86, label %87

86:                                               ; preds = %84
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  br label %87

87:                                               ; preds = %86, %84
  %88 = load i1, ptr %17, align 1
  br i1 %88, label %89, label %90

89:                                               ; preds = %87
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %15) #6
  br label %90

90:                                               ; preds = %89, %87
  %91 = load i1, ptr %16, align 1
  br i1 %91, label %92, label %93

92:                                               ; preds = %90
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  br label %93

93:                                               ; preds = %92, %90
  %94 = load i1, ptr %14, align 1
  br i1 %94, label %95, label %96

95:                                               ; preds = %93
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %12) #6
  br label %96

96:                                               ; preds = %95, %93
  %97 = load i1, ptr %13, align 1
  br i1 %97, label %98, label %99

98:                                               ; preds = %96
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  br label %99

99:                                               ; preds = %98, %96
  %100 = load i1, ptr %11, align 1
  br i1 %100, label %101, label %102

101:                                              ; preds = %99
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %9) #6
  br label %102

102:                                              ; preds = %101, %99
  %103 = load i1, ptr %10, align 1
  br i1 %103, label %104, label %105

104:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  br label %105

105:                                              ; preds = %104, %102
  br i1 %69, label %106, label %191

106:                                              ; preds = %105
  store i8 0, ptr %3, align 1, !tbaa !9
  br label %191

107:                                              ; preds = %32
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %7, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %8, align 4
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_316EvaluatorControlELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #6
  br label %192

111:                                              ; preds = %43
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %7, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %8, align 4
  br label %184

115:                                              ; preds = %48
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %7, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %8, align 4
  br label %180

119:                                              ; preds = %51
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %7, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %8, align 4
  br label %176

123:                                              ; preds = %54
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %7, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %8, align 4
  br label %172

127:                                              ; preds = %57
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %7, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %8, align 4
  br label %165

131:                                              ; preds = %58
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %7, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %8, align 4
  br label %161

135:                                              ; preds = %61
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %7, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %8, align 4
  br label %157

139:                                              ; preds = %64
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %7, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %8, align 4
  br label %150

143:                                              ; preds = %65
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %7, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %8, align 4
  %147 = load i1, ptr %26, align 1
  br i1 %147, label %148, label %149

148:                                              ; preds = %143
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %24) #6
  br label %149

149:                                              ; preds = %148, %143
  br label %150

150:                                              ; preds = %149, %139
  %151 = load i1, ptr %25, align 1
  br i1 %151, label %152, label %153

152:                                              ; preds = %150
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #6
  br label %153

153:                                              ; preds = %152, %150
  %154 = load i1, ptr %23, align 1
  br i1 %154, label %155, label %156

155:                                              ; preds = %153
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %21) #6
  br label %156

156:                                              ; preds = %155, %153
  br label %157

157:                                              ; preds = %156, %135
  %158 = load i1, ptr %22, align 1
  br i1 %158, label %159, label %160

159:                                              ; preds = %157
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #6
  br label %160

160:                                              ; preds = %159, %157
  br label %161

161:                                              ; preds = %160, %131
  %162 = load i1, ptr %20, align 1
  br i1 %162, label %163, label %164

163:                                              ; preds = %161
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %18) #6
  br label %164

164:                                              ; preds = %163, %161
  br label %165

165:                                              ; preds = %164, %127
  %166 = load i1, ptr %19, align 1
  br i1 %166, label %167, label %168

167:                                              ; preds = %165
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  br label %168

168:                                              ; preds = %167, %165
  %169 = load i1, ptr %17, align 1
  br i1 %169, label %170, label %171

170:                                              ; preds = %168
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %15) #6
  br label %171

171:                                              ; preds = %170, %168
  br label %172

172:                                              ; preds = %171, %123
  %173 = load i1, ptr %16, align 1
  br i1 %173, label %174, label %175

174:                                              ; preds = %172
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  br label %175

175:                                              ; preds = %174, %172
  br label %176

176:                                              ; preds = %175, %119
  %177 = load i1, ptr %14, align 1
  br i1 %177, label %178, label %179

178:                                              ; preds = %176
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %12) #6
  br label %179

179:                                              ; preds = %178, %176
  br label %180

180:                                              ; preds = %179, %115
  %181 = load i1, ptr %13, align 1
  br i1 %181, label %182, label %183

182:                                              ; preds = %180
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  br label %183

183:                                              ; preds = %182, %180
  br label %184

184:                                              ; preds = %183, %111
  %185 = load i1, ptr %11, align 1
  br i1 %185, label %186, label %187

186:                                              ; preds = %184
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %9) #6
  br label %187

187:                                              ; preds = %186, %184
  %188 = load i1, ptr %10, align 1
  br i1 %188, label %189, label %190

189:                                              ; preds = %187
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  br label %190

190:                                              ; preds = %189, %187
  br label %192

191:                                              ; preds = %106, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %193

192:                                              ; preds = %190, %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #6
  br label %196

193:                                              ; preds = %191, %31
  %194 = load i8, ptr %3, align 1, !tbaa !9, !range !13, !noundef !14
  %195 = trunc i8 %194 to i1
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #6
  ret i1 %195

196:                                              ; preds = %192
  %197 = load ptr, ptr %7, align 8
  %198 = load i32, ptr %8, align 4
  %199 = insertvalue { ptr, i32 } poison, ptr %197, 0
  %200 = insertvalue { ptr, i32 } %199, i32 %198, 1
  resume { ptr, i32 } %200
}

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 #4

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9NOMAD_4_316EvaluatorControl14getComputeTypeEi(ptr noundef nonnull align 8 dereferenceable(352), i32 noundef) #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_34Eval18isBBOutputCompleteEv(ptr noundef nonnull align 8 dereferenceable(105)) #1 align 2

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

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

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

declare void @_ZNK9NOMAD_4_34Eval4getHENS_11ComputeTypeE(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8, ptr noundef nonnull align 8 dereferenceable(105), 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)) #5

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 = { "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 = { 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 #5 = { 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 #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 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTSN9NOMAD_4_311ComputeTypeE", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::shared_ptr.41" = type { %"class.std::__shared_ptr.42" }
%"class.std::__shared_ptr.42" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.NOMAD_4_3::Double" = type <{ ptr, double, i8, [7 x i8] }>

@_ZN9NOMAD_4_3L16MODEL_MAX_OUTPUTE = 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: mustprogress nounwind uwtable
declare dso_local void @_ZN9NOMAD_4_312EvcInterface19getEvaluatorControlEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.41") align 8) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN9NOMAD_4_318SgtelibModelUpdate14validForUpdateERKNS_9EvalPointE(ptr noundef nonnull align 8 dereferenceable(160) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::shared_ptr.41", align 8
  %3 = alloca %"class.NOMAD_4_3::Double", align 8
  %4 = alloca %"class.NOMAD_4_3::Double", align 8
  %5 = alloca %"class.NOMAD_4_3::Double", align 8
  %6 = alloca %"class.NOMAD_4_3::Double", align 8
  %7 = alloca %"class.NOMAD_4_3::Double", align 8
  %8 = alloca %"class.NOMAD_4_3::Double", align 8
  %9 = tail call noundef ptr @_ZNK9NOMAD_4_39EvalPoint7getEvalENS_8EvalTypeE(ptr noundef nonnull align 8 dereferenceable(160) %0, i32 noundef 0)
  %10 = icmp eq ptr %9, null
  br i1 %10, label %.critedge76, label %11

11:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #6
  call void @_ZN9NOMAD_4_312EvcInterface19getEvaluatorControlEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.41") align 8 %2)
  %12 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN9NOMAD_4_316EvaluatorControlELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %13 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9NOMAD_4_316EvaluatorControl14getComputeTypeEi(ptr noundef nonnull align 8 dereferenceable(352) %12, i32 noundef -1)
          to label %14 unwind label %38

14:                                               ; preds = %11
  %15 = load i32, ptr %13, align 4, !tbaa !5
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_316EvaluatorControlELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %2) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #6
  %16 = call noundef zeroext i1 @_ZNK9NOMAD_4_34Eval18isBBOutputCompleteEv(ptr noundef nonnull align 8 dereferenceable(105) %9)
  br i1 %16, label %17, label %.critedge76

17:                                               ; preds = %14
  %18 = call noundef i32 @_ZNK9NOMAD_4_34Eval13getEvalStatusEv(ptr noundef nonnull align 8 dereferenceable(105) %9)
  %19 = icmp eq i32 %18, 4
  br i1 %19, label %20, label %.critedge76

20:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  call void @_ZNK9NOMAD_4_34Eval4getFENS_11ComputeTypeE(ptr dead_on_unwind nonnull writable sret(%"class.NOMAD_4_3::Double") align 8 %3, ptr noundef nonnull align 8 dereferenceable(105) %9, i32 noundef %15)
  %21 = call noundef zeroext i1 @_ZNK9NOMAD_4_36Double9isDefinedEv(ptr noundef nonnull align 8 dereferenceable(17) %3)
  br i1 %21, label %22, label %.critedge74

22:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  invoke void @_ZNK9NOMAD_4_34Eval4getHENS_11ComputeTypeE(ptr dead_on_unwind nonnull writable sret(%"class.NOMAD_4_3::Double") align 8 %4, ptr noundef nonnull align 8 dereferenceable(105) %9, i32 noundef %15)
          to label %23 unwind label %40

23:                                               ; preds = %22
  %24 = call noundef zeroext i1 @_ZNK9NOMAD_4_36Double9isDefinedEv(ptr noundef nonnull align 8 dereferenceable(17) %4)
  br i1 %24, label %25, label %.critedge74.thread

25:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  invoke void @_ZNK9NOMAD_4_34Eval4getFENS_11ComputeTypeE(ptr dead_on_unwind nonnull writable sret(%"class.NOMAD_4_3::Double") align 8 %5, ptr noundef nonnull align 8 dereferenceable(105) %9, i32 noundef %15)
          to label %26 unwind label %42

26:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  invoke void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17) %6, ptr noundef nonnull align 8 dereferenceable(8) @_ZN9NOMAD_4_3L16MODEL_MAX_OUTPUTE)
          to label %27 unwind label %44

27:                                               ; preds = %26
  %28 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3gtERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %5, ptr noundef nonnull align 8 dereferenceable(17) %6)
          to label %29 unwind label %46

29:                                               ; preds = %27
  br i1 %28, label %.critedge72.thread, label %30

30:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  invoke void @_ZNK9NOMAD_4_34Eval4getHENS_11ComputeTypeE(ptr dead_on_unwind nonnull writable sret(%"class.NOMAD_4_3::Double") align 8 %7, ptr noundef nonnull align 8 dereferenceable(105) %9, i32 noundef %15)
          to label %31 unwind label %48

31:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #6
  invoke void @_ZN9NOMAD_4_36DoubleC1ERKd(ptr noundef nonnull align 8 dereferenceable(17) %8, ptr noundef nonnull align 8 dereferenceable(8) @_ZN9NOMAD_4_3L16MODEL_MAX_OUTPUTE)
          to label %32 unwind label %50

32:                                               ; preds = %31
  %33 = invoke noundef zeroext i1 @_ZN9NOMAD_4_3gtERKNS_6DoubleES2_(ptr noundef nonnull align 8 dereferenceable(17) %7, ptr noundef nonnull align 8 dereferenceable(17) %8)
          to label %.critedge68.thread unwind label %52

.critedge68.thread:                               ; preds = %32
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  %34 = xor i1 %33, true
  br label %.critedge72.thread

.critedge72.thread:                               ; preds = %.critedge68.thread, %29
  %35 = phi i1 [ %34, %.critedge68.thread ], [ false, %29 ]
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  br label %.critedge74.thread

.critedge74.thread:                               ; preds = %.critedge72.thread, %23
  %36 = phi i1 [ %35, %.critedge72.thread ], [ false, %23 ]
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  br label %.critedge74

.critedge74:                                      ; preds = %20, %.critedge74.thread
  %37 = phi i1 [ %36, %.critedge74.thread ], [ false, %20 ]
  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 %.critedge76

38:                                               ; preds = %11
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN9NOMAD_4_316EvaluatorControlELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %2) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #6
  br label %60

40:                                               ; preds = %22
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %59

42:                                               ; preds = %25
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %58

44:                                               ; preds = %26
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %57

46:                                               ; preds = %27
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %56

48:                                               ; preds = %30
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %55

50:                                               ; preds = %31
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %54

52:                                               ; preds = %32
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %8) #6
  br label %54

54:                                               ; preds = %50, %52
  %.pn = phi { ptr, i32 } [ %53, %52 ], [ %51, %50 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %7) #6
  br label %55

55:                                               ; preds = %48, %54
  %.pn.pn = phi { ptr, i32 } [ %.pn, %54 ], [ %49, %48 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br label %56

56:                                               ; preds = %46, %55
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %55 ], [ %47, %46 ]
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %6) #6
  br label %57

57:                                               ; preds = %44, %56
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %56 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %5) #6
  br label %58

58:                                               ; preds = %42, %57
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %57 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @_ZN9NOMAD_4_36DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %4) #6
  br label %59

59:                                               ; preds = %40, %58
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %58 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  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 %60

60:                                               ; preds = %59, %38
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %59 ], [ %39, %38 ]
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn.pn

.critedge76:                                      ; preds = %.critedge74, %14, %17, %1
  %.158 = phi i1 [ false, %1 ], [ %37, %.critedge74 ], [ false, %14 ], [ false, %17 ]
  ret i1 %.158
}

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 #4

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9NOMAD_4_316EvaluatorControl14getComputeTypeEi(ptr noundef nonnull align 8 dereferenceable(352), i32 noundef) 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_34Eval18isBBOutputCompleteEv(ptr noundef nonnull align 8 dereferenceable(105)) local_unnamed_addr #1 align 2

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

declare void @_ZNK9NOMAD_4_34Eval4getFENS_11ComputeTypeE(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8, ptr noundef nonnull align 8 dereferenceable(105), 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 #1 align 2

declare void @_ZNK9NOMAD_4_34Eval4getHENS_11ComputeTypeE(ptr dead_on_unwind writable sret(%"class.NOMAD_4_3::Double") align 8, ptr noundef nonnull align 8 dereferenceable(105), 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 #5

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


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