; LLVM IR from interpretml/interpret :: shared/libebm (ApplyTermUpdate)

; 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"

%struct.ApplyUpdateBridge = type { i64, i32, i32, i32, i32, ptr, ptr, i64, ptr, ptr, ptr, ptr, ptr, double }
%"struct.NAMESPACE_MAIN::DataSubsetBoosting" = type { i64, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.ObjectiveWrapper = type { ptr, ptr, ptr, ptr, i32, i32, i32, double, double, double, double, double, double, double, double, i32, i64, i64, i64, i32, ptr }

@g_traceLevel = external global i32, align 4
@_ZN14NAMESPACE_MAINL21g_cLogApplyTermUpdateE = external hidden global i32, align 4
@_ZZ15ApplyTermUpdateE13LOG__sMessage = external hidden constant [61 x i8], align 16
@_ZZ15ApplyTermUpdateE13LOG__sMessage_0 = external hidden constant [61 x i8], align 16
@.str = external hidden unnamed_addr constant [89 x i8], align 1
@__func__.ApplyTermUpdate = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1
@__PRETTY_FUNCTION__.ApplyTermUpdate = external hidden unnamed_addr constant [66 x i8], align 1
@_ZZ15ApplyTermUpdateE13LOG__sMessage_1 = external hidden constant [24 x i8], align 16
@_ZZ15ApplyTermUpdateE13LOG__sMessage_2 = external hidden constant [38 x i8], align 16
@.str.3 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [39 x i8], align 1
@_ZZ15ApplyTermUpdateE13LOG__sMessage_3 = external hidden constant [24 x i8], align 16
@_ZZ15ApplyTermUpdateE13LOG__sMessage_4 = external hidden constant [38 x i8], align 16
@_ZZ15ApplyTermUpdateE13LOG__sMessage_5 = external hidden constant [65 x i8], align 16
@.str.11 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [54 x i8], align 1
@_ZZ15ApplyTermUpdateE13LOG__sMessage_6 = external hidden constant [68 x i8], align 16
@.str.37 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [54 x i8], align 1
@_ZZ15ApplyTermUpdateE13LOG__sMessage_7 = external hidden constant [48 x i8], align 16
@_ZZ15ApplyTermUpdateE13LOG__sMessage_8 = external hidden constant [48 x i8], align 16

; Function Attrs: mustprogress uwtable
define dso_local i32 @ApplyTermUpdate(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca ptr, align 8
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca ptr, align 8
  %40 = alloca i32, align 4
  %41 = alloca double, align 8
  %42 = alloca i64, align 8
  %43 = alloca i8, align 1
  %44 = alloca ptr, align 8
  %45 = alloca ptr, align 8
  %46 = alloca %struct.ApplyUpdateBridge, align 8
  %47 = alloca ptr, align 8
  %48 = alloca ptr, align 8
  %49 = alloca %struct.ApplyUpdateBridge, align 8
  %50 = alloca ptr, align 8
  %51 = alloca ptr, align 8
  %52 = alloca ptr, align 8
  %53 = alloca double, align 8
  %54 = alloca i64, align 8
  %55 = alloca i64, align 8
  %56 = alloca i32, align 4
  %57 = alloca i32, align 4
  %58 = alloca i32, align 4
  %59 = alloca i32, align 4
  %60 = alloca i32, align 4
  %61 = alloca i32, align 4
  %62 = alloca ptr, align 8
  %63 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #10
  br label %64

64:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #10
  store i32 3, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #10
  store i32 4, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #10
  %65 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  store i32 %65, ptr %9, align 4, !tbaa !9
  %66 = load i32, ptr %9, align 4, !tbaa !9
  %67 = icmp sle i32 3, %66
  br i1 %67, label %68, label %93

68:                                               ; preds = %64
  br label %69

69:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #10
  %70 = load i32, ptr %9, align 4, !tbaa !9
  %71 = icmp slt i32 %70, 4
  br i1 %71, label %72, label %83

72:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #10
  store ptr @_ZN14NAMESPACE_MAINL21g_cLogApplyTermUpdateE, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #10
  %73 = load i32, ptr @_ZN14NAMESPACE_MAINL21g_cLogApplyTermUpdateE, align 4, !tbaa !9
  %74 = sub nsw i32 %73, 1
  store i32 %74, ptr %12, align 4, !tbaa !9
  %75 = load i32, ptr %12, align 4, !tbaa !9
  %76 = icmp slt i32 %75, 0
  br i1 %76, label %77, label %78

77:                                               ; preds = %72
  store i32 4, ptr %13, align 4
  br label %80

78:                                               ; preds = %72
  %79 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %79, ptr @_ZN14NAMESPACE_MAINL21g_cLogApplyTermUpdateE, align 4, !tbaa !9
  store i32 3, ptr %10, align 4, !tbaa !9
  store i32 0, ptr %13, align 4
  br label %80

80:                                               ; preds = %78, %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #10
  %81 = load i32, ptr %13, align 4
  switch i32 %81, label %88 [
    i32 0, label %82
  ]

82:                                               ; preds = %80
  br label %84

83:                                               ; preds = %69
  store i32 4, ptr %10, align 4, !tbaa !9
  br label %84

84:                                               ; preds = %83, %82
  %85 = load i32, ptr %10, align 4, !tbaa !9
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  call void (i32, ptr, ...) @InteralLogWithArguments(i32 noundef %85, ptr noundef @_ZZ15ApplyTermUpdateE13LOG__sMessage, ptr noundef %86, ptr noundef %87)
  store i32 0, ptr %13, align 4
  br label %88

88:                                               ; preds = %84, %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #10
  %89 = load i32, ptr %13, align 4
  switch i32 %89, label %833 [
    i32 0, label %90
    i32 4, label %92
  ]

90:                                               ; preds = %88
  br label %91

91:                                               ; preds = %90
  br label %92

92:                                               ; preds = %91, %88
  br label %93

93:                                               ; preds = %92, %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #10
  br label %94

94:                                               ; preds = %93
  br label %95

95:                                               ; preds = %94
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = icmp ne ptr null, %96
  %98 = xor i1 %97, true
  %99 = xor i1 %98, true
  %100 = zext i1 %99 to i64
  %101 = call i64 @llvm.expect.i64(i64 %100, i64 1)
  %102 = icmp ne i64 %101, 0
  br i1 %102, label %103, label %106

103:                                              ; preds = %95
  %104 = call noundef double @_ZNSt14numeric_limitsIdE8infinityEv() #10
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  store double %104, ptr %105, align 8, !tbaa !11
  br label %106

106:                                              ; preds = %103, %95
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #10
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = call noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell25GetBoosterShellFromHandleEP14_BoosterHandle(ptr noundef %107)
  store ptr %108, ptr %14, align 8, !tbaa !5
  %109 = load ptr, ptr %14, align 8, !tbaa !5
  %110 = icmp eq ptr null, %109
  br i1 %110, label %111, label %112

111:                                              ; preds = %106
  store i32 -3, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %831

112:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #10
  %113 = load ptr, ptr %14, align 8, !tbaa !5
  %114 = call noundef i64 @_ZN14NAMESPACE_MAIN12BoosterShell12GetTermIndexEv(ptr noundef nonnull align 8 dereferenceable(112) %113)
  store i64 %114, ptr %15, align 8, !tbaa !13
  %115 = load i64, ptr %15, align 8, !tbaa !13
  %116 = icmp eq i64 -1, %115
  br i1 %116, label %117, label %125

117:                                              ; preds = %112
  br label %118

118:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #10
  store i32 1, ptr %16, align 4, !tbaa !9
  %119 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  %120 = icmp sle i32 1, %119
  br i1 %120, label %121, label %122

121:                                              ; preds = %118
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ15ApplyTermUpdateE13LOG__sMessage_0)
  br label %122

122:                                              ; preds = %121, %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #10
  br label %123

123:                                              ; preds = %122
  br label %124

124:                                              ; preds = %123
  store i32 -3, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %830

125:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #10
  %126 = load ptr, ptr %14, align 8, !tbaa !5
  %127 = call noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell14GetBoosterCoreEv(ptr noundef nonnull align 8 dereferenceable(112) %126)
  store ptr %127, ptr %17, align 8, !tbaa !5
  %128 = load ptr, ptr %17, align 8, !tbaa !5
  %129 = icmp ne ptr null, %128
  br i1 %129, label %132, label %130

130:                                              ; preds = %125
  call void @LogAssertFailure(i64 noundef 66, ptr noundef @.str, ptr noundef @__func__.ApplyTermUpdate, ptr noundef @.str.1)
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str, i32 noundef 66, ptr noundef @__PRETTY_FUNCTION__.ApplyTermUpdate) #11
  unreachable

131:                                              ; No predecessors!
  br label %132

132:                                              ; preds = %131, %125
  %133 = phi i1 [ true, %125 ], [ false, %131 ]
  %134 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN14NAMESPACE_MAIN12BoosterShell12SetTermIndexEm(ptr noundef nonnull align 8 dereferenceable(112) %134, i64 noundef -1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #10
  %135 = load i64, ptr %15, align 8, !tbaa !13
  %136 = icmp eq i64 -2, %135
  br i1 %136, label %137, label %173

137:                                              ; preds = %132
  br label %138

138:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #10
  store i32 3, ptr %21, align 4, !tbaa !9
  %139 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  %140 = icmp sle i32 3, %139
  br i1 %140, label %141, label %142

141:                                              ; preds = %138
  call void @InteralLogWithoutArguments(i32 noundef 3, ptr noundef @_ZZ15ApplyTermUpdateE13LOG__sMessage_1)
  br label %142

142:                                              ; preds = %141, %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #10
  br label %143

143:                                              ; preds = %142
  br label %144

144:                                              ; preds = %143
  %145 = load ptr, ptr %17, align 8, !tbaa !5
  %146 = call noundef i64 @_ZNK14NAMESPACE_MAIN11BoosterCore14GetCountScoresEv(ptr noundef nonnull align 8 dereferenceable(520) %145)
  %147 = icmp eq i64 0, %146
  br i1 %147, label %148, label %156

148:                                              ; preds = %144
  br label %149

149:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #10
  store i32 3, ptr %22, align 4, !tbaa !9
  %150 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  %151 = icmp sle i32 3, %150
  br i1 %151, label %152, label %153

152:                                              ; preds = %149
  call void @InteralLogWithoutArguments(i32 noundef 3, ptr noundef @_ZZ15ApplyTermUpdateE13LOG__sMessage_2)
  br label %153

153:                                              ; preds = %152, %149
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #10
  br label %154

154:                                              ; preds = %153
  br label %155

155:                                              ; preds = %154
  store i32 0, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %829

156:                                              ; preds = %144
  %157 = load ptr, ptr %14, align 8, !tbaa !5
  %158 = call noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell13GetTermUpdateEv(ptr noundef nonnull align 8 dereferenceable(112) %157)
  %159 = icmp ne ptr null, %158
  br i1 %159, label %162, label %160

160:                                              ; preds = %156
  call void @LogAssertFailure(i64 noundef 87, ptr noundef @.str, ptr noundef @__func__.ApplyTermUpdate, ptr noundef @.str.3)
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str, i32 noundef 87, ptr noundef @__PRETTY_FUNCTION__.ApplyTermUpdate) #11
  unreachable

161:                                              ; No predecessors!
  br label %162

162:                                              ; preds = %161, %156
  %163 = phi i1 [ true, %156 ], [ false, %161 ]
  %164 = load ptr, ptr %14, align 8, !tbaa !5
  %165 = call noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell13GetTermUpdateEv(ptr noundef nonnull align 8 dereferenceable(112) %164)
  %166 = call noundef ptr @_ZN14NAMESPACE_MAIN6Tensor22GetTensorScoresPointerEv(ptr noundef nonnull align 8 dereferenceable(72) %165)
  store ptr %166, ptr %18, align 8, !tbaa !5
  %167 = load ptr, ptr %18, align 8, !tbaa !5
  %168 = icmp ne ptr null, %167
  br i1 %168, label %171, label %169

169:                                              ; preds = %162
  call void @LogAssertFailure(i64 noundef 89, ptr noundef @.str, ptr noundef @__func__.ApplyTermUpdate, ptr noundef @.str.5)
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str, i32 noundef 89, ptr noundef @__PRETTY_FUNCTION__.ApplyTermUpdate) #11
  unreachable

170:                                              ; No predecessors!
  br label %171

171:                                              ; preds = %170, %162
  %172 = phi i1 [ true, %162 ], [ false, %170 ]
  store ptr null, ptr %19, align 8, !tbaa !5
  store i64 1, ptr %20, align 8, !tbaa !13
  br label %372

173:                                              ; preds = %132
  %174 = load i64, ptr %15, align 8, !tbaa !13
  %175 = load ptr, ptr %17, align 8, !tbaa !5
  %176 = call noundef i64 @_ZNK14NAMESPACE_MAIN11BoosterCore13GetCountTermsEv(ptr noundef nonnull align 8 dereferenceable(520) %175)
  %177 = icmp ult i64 %174, %176
  br i1 %177, label %180, label %178

178:                                              ; preds = %173
  call void @LogAssertFailure(i64 noundef 94, ptr noundef @.str, ptr noundef @__func__.ApplyTermUpdate, ptr noundef @.str.7)
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str, i32 noundef 94, ptr noundef @__PRETTY_FUNCTION__.ApplyTermUpdate) #11
  unreachable

179:                                              ; No predecessors!
  br label %180

180:                                              ; preds = %179, %173
  %181 = phi i1 [ true, %173 ], [ false, %179 ]
  %182 = load ptr, ptr %17, align 8, !tbaa !5
  %183 = call noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore8GetTermsEv(ptr noundef nonnull align 8 dereferenceable(520) %182)
  %184 = icmp ne ptr null, %183
  br i1 %184, label %187, label %185

185:                                              ; preds = %180
  call void @LogAssertFailure(i64 noundef 95, ptr noundef @.str, ptr noundef @__func__.ApplyTermUpdate, ptr noundef @.str.9)
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str, i32 noundef 95, ptr noundef @__PRETTY_FUNCTION__.ApplyTermUpdate) #11
  unreachable

186:                                              ; No predecessors!
  br label %187

187:                                              ; preds = %186, %180
  %188 = phi i1 [ true, %180 ], [ false, %186 ]
  %189 = load ptr, ptr %17, align 8, !tbaa !5
  %190 = call noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore8GetTermsEv(ptr noundef nonnull align 8 dereferenceable(520) %189)
  %191 = load i64, ptr %15, align 8, !tbaa !13
  %192 = getelementptr inbounds ptr, ptr %190, i64 %191
  %193 = load ptr, ptr %192, align 8, !tbaa !5
  store ptr %193, ptr %19, align 8, !tbaa !5
  br label %194

194:                                              ; preds = %187
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #10
  store i32 3, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #10
  store i32 4, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #10
  %195 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  store i32 %195, ptr %25, align 4, !tbaa !9
  %196 = load i32, ptr %25, align 4, !tbaa !9
  %197 = icmp sle i32 3, %196
  br i1 %197, label %198, label %225

198:                                              ; preds = %194
  br label %199

199:                                              ; preds = %198
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #10
  %200 = load i32, ptr %25, align 4, !tbaa !9
  %201 = icmp slt i32 %200, 4
  br i1 %201, label %202, label %217

202:                                              ; preds = %199
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #10
  %203 = load ptr, ptr %19, align 8, !tbaa !5
  %204 = call noundef ptr @_ZN14NAMESPACE_MAIN4Term46GetPointerCountLogEnterApplyTermUpdateMessagesEv(ptr noundef nonnull align 8 dereferenceable(776) %203) #10
  store ptr %204, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #10
  %205 = load ptr, ptr %27, align 8, !tbaa !5
  %206 = load i32, ptr %205, align 4, !tbaa !9
  %207 = sub nsw i32 %206, 1
  store i32 %207, ptr %28, align 4, !tbaa !9
  %208 = load i32, ptr %28, align 4, !tbaa !9
  %209 = icmp slt i32 %208, 0
  br i1 %209, label %210, label %211

210:                                              ; preds = %202
  store i32 14, ptr %13, align 4
  br label %214

211:                                              ; preds = %202
  %212 = load i32, ptr %28, align 4, !tbaa !9
  %213 = load ptr, ptr %27, align 8, !tbaa !5
  store i32 %212, ptr %213, align 4, !tbaa !9
  store i32 3, ptr %26, align 4, !tbaa !9
  store i32 0, ptr %13, align 4
  br label %214

214:                                              ; preds = %211, %210
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #10
  %215 = load i32, ptr %13, align 4
  switch i32 %215, label %220 [
    i32 0, label %216
  ]

216:                                              ; preds = %214
  br label %218

217:                                              ; preds = %199
  store i32 4, ptr %26, align 4, !tbaa !9
  br label %218

218:                                              ; preds = %217, %216
  %219 = load i32, ptr %26, align 4, !tbaa !9
  call void @InteralLogWithoutArguments(i32 noundef %219, ptr noundef @_ZZ15ApplyTermUpdateE13LOG__sMessage_3)
  store i32 0, ptr %13, align 4
  br label %220

220:                                              ; preds = %218, %214
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #10
  %221 = load i32, ptr %13, align 4
  switch i32 %221, label %833 [
    i32 0, label %222
    i32 14, label %224
  ]

222:                                              ; preds = %220
  br label %223

223:                                              ; preds = %222
  br label %224

224:                                              ; preds = %223, %220
  br label %225

225:                                              ; preds = %224, %194
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #10
  br label %226

226:                                              ; preds = %225
  br label %227

227:                                              ; preds = %226
  %228 = load ptr, ptr %17, align 8, !tbaa !5
  %229 = call noundef i64 @_ZNK14NAMESPACE_MAIN11BoosterCore14GetCountScoresEv(ptr noundef nonnull align 8 dereferenceable(520) %228)
  %230 = icmp eq i64 0, %229
  br i1 %230, label %231, label %266

231:                                              ; preds = %227
  br label %232

232:                                              ; preds = %231
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #10
  store i32 3, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #10
  store i32 4, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #10
  %233 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  store i32 %233, ptr %31, align 4, !tbaa !9
  %234 = load i32, ptr %31, align 4, !tbaa !9
  %235 = icmp sle i32 3, %234
  br i1 %235, label %236, label %263

236:                                              ; preds = %232
  br label %237

237:                                              ; preds = %236
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #10
  %238 = load i32, ptr %31, align 4, !tbaa !9
  %239 = icmp slt i32 %238, 4
  br i1 %239, label %240, label %255

240:                                              ; preds = %237
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #10
  %241 = load ptr, ptr %19, align 8, !tbaa !5
  %242 = call noundef ptr @_ZN14NAMESPACE_MAIN4Term45GetPointerCountLogExitApplyTermUpdateMessagesEv(ptr noundef nonnull align 8 dereferenceable(776) %241) #10
  store ptr %242, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #10
  %243 = load ptr, ptr %33, align 8, !tbaa !5
  %244 = load i32, ptr %243, align 4, !tbaa !9
  %245 = sub nsw i32 %244, 1
  store i32 %245, ptr %34, align 4, !tbaa !9
  %246 = load i32, ptr %34, align 4, !tbaa !9
  %247 = icmp slt i32 %246, 0
  br i1 %247, label %248, label %249

248:                                              ; preds = %240
  store i32 18, ptr %13, align 4
  br label %252

249:                                              ; preds = %240
  %250 = load i32, ptr %34, align 4, !tbaa !9
  %251 = load ptr, ptr %33, align 8, !tbaa !5
  store i32 %250, ptr %251, align 4, !tbaa !9
  store i32 3, ptr %32, align 4, !tbaa !9
  store i32 0, ptr %13, align 4
  br label %252

252:                                              ; preds = %249, %248
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #10
  %253 = load i32, ptr %13, align 4
  switch i32 %253, label %258 [
    i32 0, label %254
  ]

254:                                              ; preds = %252
  br label %256

255:                                              ; preds = %237
  store i32 4, ptr %32, align 4, !tbaa !9
  br label %256

256:                                              ; preds = %255, %254
  %257 = load i32, ptr %32, align 4, !tbaa !9
  call void @InteralLogWithoutArguments(i32 noundef %257, ptr noundef @_ZZ15ApplyTermUpdateE13LOG__sMessage_4)
  store i32 0, ptr %13, align 4
  br label %258

258:                                              ; preds = %256, %252
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #10
  %259 = load i32, ptr %13, align 4
  switch i32 %259, label %833 [
    i32 0, label %260
    i32 18, label %262
  ]

260:                                              ; preds = %258
  br label %261

261:                                              ; preds = %260
  br label %262

262:                                              ; preds = %261, %258
  br label %263

263:                                              ; preds = %262, %232
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #10
  br label %264

264:                                              ; preds = %263
  br label %265

265:                                              ; preds = %264
  store i32 0, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %829

266:                                              ; preds = %227
  %267 = load ptr, ptr %19, align 8, !tbaa !5
  %268 = call noundef i64 @_ZNK14NAMESPACE_MAIN4Term18GetCountTensorBinsEv(ptr noundef nonnull align 8 dereferenceable(776) %267) #10
  store i64 %268, ptr %20, align 8, !tbaa !13
  %269 = load i64, ptr %20, align 8, !tbaa !13
  %270 = icmp eq i64 0, %269
  br i1 %270, label %271, label %306

271:                                              ; preds = %266
  br label %272

272:                                              ; preds = %271
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #10
  store i32 3, ptr %35, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #10
  store i32 4, ptr %36, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #10
  %273 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  store i32 %273, ptr %37, align 4, !tbaa !9
  %274 = load i32, ptr %37, align 4, !tbaa !9
  %275 = icmp sle i32 3, %274
  br i1 %275, label %276, label %303

276:                                              ; preds = %272
  br label %277

277:                                              ; preds = %276
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #10
  %278 = load i32, ptr %37, align 4, !tbaa !9
  %279 = icmp slt i32 %278, 4
  br i1 %279, label %280, label %295

280:                                              ; preds = %277
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #10
  %281 = load ptr, ptr %19, align 8, !tbaa !5
  %282 = call noundef ptr @_ZN14NAMESPACE_MAIN4Term45GetPointerCountLogExitApplyTermUpdateMessagesEv(ptr noundef nonnull align 8 dereferenceable(776) %281) #10
  store ptr %282, ptr %39, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #10
  %283 = load ptr, ptr %39, align 8, !tbaa !5
  %284 = load i32, ptr %283, align 4, !tbaa !9
  %285 = sub nsw i32 %284, 1
  store i32 %285, ptr %40, align 4, !tbaa !9
  %286 = load i32, ptr %40, align 4, !tbaa !9
  %287 = icmp slt i32 %286, 0
  br i1 %287, label %288, label %289

288:                                              ; preds = %280
  store i32 22, ptr %13, align 4
  br label %292

289:                                              ; preds = %280
  %290 = load i32, ptr %40, align 4, !tbaa !9
  %291 = load ptr, ptr %39, align 8, !tbaa !5
  store i32 %290, ptr %291, align 4, !tbaa !9
  store i32 3, ptr %38, align 4, !tbaa !9
  store i32 0, ptr %13, align 4
  br label %292

292:                                              ; preds = %289, %288
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #10
  %293 = load i32, ptr %13, align 4
  switch i32 %293, label %298 [
    i32 0, label %294
  ]

294:                                              ; preds = %292
  br label %296

295:                                              ; preds = %277
  store i32 4, ptr %38, align 4, !tbaa !9
  br label %296

296:                                              ; preds = %295, %294
  %297 = load i32, ptr %38, align 4, !tbaa !9
  call void @InteralLogWithoutArguments(i32 noundef %297, ptr noundef @_ZZ15ApplyTermUpdateE13LOG__sMessage_5)
  store i32 0, ptr %13, align 4
  br label %298

298:                                              ; preds = %296, %292
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #10
  %299 = load i32, ptr %13, align 4
  switch i32 %299, label %833 [
    i32 0, label %300
    i32 22, label %302
  ]

300:                                              ; preds = %298
  br label %301

301:                                              ; preds = %300
  br label %302

302:                                              ; preds = %301, %298
  br label %303

303:                                              ; preds = %302, %272
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #10
  br label %304

304:                                              ; preds = %303
  br label %305

305:                                              ; preds = %304
  store i32 0, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %829

306:                                              ; preds = %266
  %307 = load ptr, ptr %17, align 8, !tbaa !5
  %308 = call noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore15GetCurrentModelEv(ptr noundef nonnull align 8 dereferenceable(520) %307)
  %309 = icmp ne ptr null, %308
  br i1 %309, label %312, label %310

310:                                              ; preds = %306
  call void @LogAssertFailure(i64 noundef 126, ptr noundef @.str, ptr noundef @__func__.ApplyTermUpdate, ptr noundef @.str.11)
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str, i32 noundef 126, ptr noundef @__PRETTY_FUNCTION__.ApplyTermUpdate) #11
  unreachable

311:                                              ; No predecessors!
  br label %312

312:                                              ; preds = %311, %306
  %313 = phi i1 [ true, %306 ], [ false, %311 ]
  %314 = load ptr, ptr %17, align 8, !tbaa !5
  %315 = call noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore12GetBestModelEv(ptr noundef nonnull align 8 dereferenceable(520) %314)
  %316 = icmp ne ptr null, %315
  br i1 %316, label %319, label %317

317:                                              ; preds = %312
  call void @LogAssertFailure(i64 noundef 127, ptr noundef @.str, ptr noundef @__func__.ApplyTermUpdate, ptr noundef @.str.13)
  call void @__assert_fail(ptr noundef @.str.14, ptr noundef @.str, i32 noundef 127, ptr noundef @__PRETTY_FUNCTION__.ApplyTermUpdate) #11
  unreachable

318:                                              ; No predecessors!
  br label %319

319:                                              ; preds = %318, %312
  %320 = phi i1 [ true, %312 ], [ false, %318 ]
  %321 = load ptr, ptr %17, align 8, !tbaa !5
  %322 = call noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore15GetCurrentModelEv(ptr noundef nonnull align 8 dereferenceable(520) %321)
  %323 = load i64, ptr %15, align 8, !tbaa !13
  %324 = getelementptr inbounds ptr, ptr %322, i64 %323
  %325 = load ptr, ptr %324, align 8, !tbaa !5
  %326 = icmp ne ptr null, %325
  br i1 %326, label %329, label %327

327:                                              ; preds = %319
  call void @LogAssertFailure(i64 noundef 128, ptr noundef @.str, ptr noundef @__func__.ApplyTermUpdate, ptr noundef @.str.15)
  call void @__assert_fail(ptr noundef @.str.16, ptr noundef @.str, i32 noundef 128, ptr noundef @__PRETTY_FUNCTION__.ApplyTermUpdate) #11
  unreachable

328:                                              ; No predecessors!
  br label %329

329:                                              ; preds = %328, %319
  %330 = phi i1 [ true, %319 ], [ false, %328 ]
  %331 = load ptr, ptr %17, align 8, !tbaa !5
  %332 = call noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore12GetBestModelEv(ptr noundef nonnull align 8 dereferenceable(520) %331)
  %333 = load i64, ptr %15, align 8, !tbaa !13
  %334 = getelementptr inbounds ptr, ptr %332, i64 %333
  %335 = load ptr, ptr %334, align 8, !tbaa !5
  %336 = icmp ne ptr null, %335
  br i1 %336, label %339, label %337

337:                                              ; preds = %329
  call void @LogAssertFailure(i64 noundef 129, ptr noundef @.str, ptr noundef @__func__.ApplyTermUpdate, ptr noundef @.str.17)
  call void @__assert_fail(ptr noundef @.str.18, ptr noundef @.str, i32 noundef 129, ptr noundef @__PRETTY_FUNCTION__.ApplyTermUpdate) #11
  unreachable

338:                                              ; No predecessors!
  br label %339

339:                                              ; preds = %338, %329
  %340 = phi i1 [ true, %329 ], [ false, %338 ]
  %341 = load ptr, ptr %14, align 8, !tbaa !5
  %342 = call noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell13GetTermUpdateEv(ptr noundef nonnull align 8 dereferenceable(112) %341)
  %343 = load ptr, ptr %19, align 8, !tbaa !5
  %344 = call noundef i32 @_ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE(ptr noundef nonnull align 8 dereferenceable(72) %342, ptr noundef %343)
  store i32 %344, ptr %6, align 4, !tbaa !9
  %345 = load i32, ptr %6, align 4, !tbaa !9
  %346 = icmp ne i32 0, %345
  br i1 %346, label %347, label %349

347:                                              ; preds = %339
  %348 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %348, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %829

349:                                              ; preds = %339
  %350 = load ptr, ptr %14, align 8, !tbaa !5
  %351 = call noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell13GetTermUpdateEv(ptr noundef nonnull align 8 dereferenceable(112) %350)
  %352 = icmp ne ptr null, %351
  br i1 %352, label %355, label %353

353:                                              ; preds = %349
  call void @LogAssertFailure(i64 noundef 136, ptr noundef @.str, ptr noundef @__func__.ApplyTermUpdate, ptr noundef @.str.3)
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str, i32 noundef 136, ptr noundef @__PRETTY_FUNCTION__.ApplyTermUpdate) #11
  unreachable

354:                                              ; No predecessors!
  br label %355

355:                                              ; preds = %354, %349
  %356 = phi i1 [ true, %349 ], [ false, %354 ]
  %357 = load ptr, ptr %14, align 8, !tbaa !5
  %358 = call noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell13GetTermUpdateEv(ptr noundef nonnull align 8 dereferenceable(112) %357)
  %359 = call noundef ptr @_ZN14NAMESPACE_MAIN6Tensor22GetTensorScoresPointerEv(ptr noundef nonnull align 8 dereferenceable(72) %358)
  store ptr %359, ptr %18, align 8, !tbaa !5
  %360 = load ptr, ptr %18, align 8, !tbaa !5
  %361 = icmp ne ptr null, %360
  br i1 %361, label %364, label %362

362:                                              ; preds = %355
  call void @LogAssertFailure(i64 noundef 138, ptr noundef @.str, ptr noundef @__func__.ApplyTermUpdate, ptr noundef @.str.5)
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str, i32 noundef 138, ptr noundef @__PRETTY_FUNCTION__.ApplyTermUpdate) #11
  unreachable

363:                                              ; No predecessors!
  br label %364

364:                                              ; preds = %363, %355
  %365 = phi i1 [ true, %355 ], [ false, %363 ]
  %366 = load ptr, ptr %17, align 8, !tbaa !5
  %367 = call noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore15GetCurrentModelEv(ptr noundef nonnull align 8 dereferenceable(520) %366)
  %368 = load i64, ptr %15, align 8, !tbaa !13
  %369 = getelementptr inbounds ptr, ptr %367, i64 %368
  %370 = load ptr, ptr %369, align 8, !tbaa !5
  %371 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN14NAMESPACE_MAIN6Tensor33AddExpandedWithBadValueProtectionEPKd(ptr noundef nonnull align 8 dereferenceable(72) %370, ptr noundef %371)
  br label %372

372:                                              ; preds = %364, %171
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #10
  store double 0.000000e+00, ptr %41, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #10
  store i64 8, ptr %42, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %43) #10
  store i8 0, ptr %43, align 1, !tbaa !15
  br label %373

373:                                              ; preds = %638, %372
  br label %374

374:                                              ; preds = %373
  %375 = load ptr, ptr %17, align 8, !tbaa !5
  %376 = call noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore14GetTrainingSetEv(ptr noundef nonnull align 8 dereferenceable(520) %375)
  %377 = call noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSamplesEv(ptr noundef nonnull align 8 dereferenceable(40) %376)
  %378 = icmp ne i64 0, %377
  br i1 %378, label %379, label %486

379:                                              ; preds = %374
  %380 = load ptr, ptr %17, align 8, !tbaa !5
  %381 = call noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore14GetTrainingSetEv(ptr noundef nonnull align 8 dereferenceable(520) %380)
  %382 = call noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSubsetsEv(ptr noundef nonnull align 8 dereferenceable(40) %381)
  %383 = icmp ule i64 1, %382
  br i1 %383, label %386, label %384

384:                                              ; preds = %379
  call void @LogAssertFailure(i64 noundef 167, ptr noundef @.str, ptr noundef @__func__.ApplyTermUpdate, ptr noundef @.str.19)
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str, i32 noundef 167, ptr noundef @__PRETTY_FUNCTION__.ApplyTermUpdate) #11
  unreachable

385:                                              ; No predecessors!
  br label %386

386:                                              ; preds = %385, %379
  %387 = phi i1 [ true, %379 ], [ false, %385 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #10
  %388 = load ptr, ptr %17, align 8, !tbaa !5
  %389 = call noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore14GetTrainingSetEv(ptr noundef nonnull align 8 dereferenceable(520) %388)
  %390 = call noundef ptr @_ZN14NAMESPACE_MAIN15DataSetBoosting10GetSubsetsEv(ptr noundef nonnull align 8 dereferenceable(40) %389)
  store ptr %390, ptr %44, align 8, !tbaa !5
  %391 = load ptr, ptr %44, align 8, !tbaa !5
  %392 = icmp ne ptr null, %391
  br i1 %392, label %395, label %393

393:                                              ; preds = %386
  call void @LogAssertFailure(i64 noundef 170, ptr noundef @.str, ptr noundef @__func__.ApplyTermUpdate, ptr noundef @.str.21)
  call void @__assert_fail(ptr noundef @.str.22, ptr noundef @.str, i32 noundef 170, ptr noundef @__PRETTY_FUNCTION__.ApplyTermUpdate) #11
  unreachable

394:                                              ; No predecessors!
  br label %395

395:                                              ; preds = %394, %386
  %396 = phi i1 [ true, %386 ], [ false, %394 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #10
  %397 = load ptr, ptr %44, align 8, !tbaa !5
  %398 = load ptr, ptr %17, align 8, !tbaa !5
  %399 = call noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore14GetTrainingSetEv(ptr noundef nonnull align 8 dereferenceable(520) %398)
  %400 = call noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSubsetsEv(ptr noundef nonnull align 8 dereferenceable(40) %399)
  %401 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSubsetBoosting", ptr %397, i64 %400
  store ptr %401, ptr %45, align 8, !tbaa !5
  br label %402

402:                                              ; preds = %478, %395
  %403 = load ptr, ptr %44, align 8, !tbaa !5
  %404 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting19GetObjectiveWrapperEv(ptr noundef nonnull align 8 dereferenceable(56) %403)
  %405 = getelementptr inbounds %struct.ObjectiveWrapper, ptr %404, i32 0, i32 17
  %406 = load i64, ptr %405, align 8, !tbaa !17
  %407 = load i64, ptr %42, align 8, !tbaa !13
  %408 = icmp ne i64 %406, %407
  br i1 %408, label %409, label %410

409:                                              ; preds = %402
  store i8 1, ptr %43, align 1, !tbaa !15
  br label %475

410:                                              ; preds = %402
  call void @llvm.lifetime.start.p0(i64 96, ptr %46) #10
  %411 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %46, i32 0, i32 1
  store i32 0, ptr %411, align 8, !tbaa !19
  %412 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %46, i32 0, i32 8
  store ptr null, ptr %412, align 8, !tbaa !21
  %413 = load i64, ptr %15, align 8, !tbaa !13
  %414 = icmp ne i64 -2, %413
  br i1 %414, label %415, label %433

415:                                              ; preds = %410
  %416 = load ptr, ptr %44, align 8, !tbaa !5
  %417 = load i64, ptr %15, align 8, !tbaa !13
  %418 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting11GetTermDataEm(ptr noundef nonnull align 8 dereferenceable(56) %416, i64 noundef %417)
  %419 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %46, i32 0, i32 8
  store ptr %418, ptr %419, align 8, !tbaa !21
  %420 = load ptr, ptr %19, align 8, !tbaa !5
  %421 = call noundef i32 @_ZNK14NAMESPACE_MAIN4Term18GetBitsRequiredMinEv(ptr noundef nonnull align 8 dereferenceable(776) %420) #10
  %422 = icmp ne i32 0, %421
  br i1 %422, label %423, label %432

423:                                              ; preds = %415
  %424 = load ptr, ptr %19, align 8, !tbaa !5
  %425 = call noundef i32 @_ZNK14NAMESPACE_MAIN4Term18GetBitsRequiredMinEv(ptr noundef nonnull align 8 dereferenceable(776) %424) #10
  %426 = load ptr, ptr %44, align 8, !tbaa !5
  %427 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting19GetObjectiveWrapperEv(ptr noundef nonnull align 8 dereferenceable(56) %426)
  %428 = getelementptr inbounds %struct.ObjectiveWrapper, ptr %427, i32 0, i32 18
  %429 = load i64, ptr %428, align 8, !tbaa !22
  %430 = call noundef i32 @_ZN14NAMESPACE_MAINL22GetCountItemsBitPackedEim(i32 noundef %425, i64 noundef %429) #10
  %431 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %46, i32 0, i32 1
  store i32 %430, ptr %431, align 8, !tbaa !19
  br label %432

432:                                              ; preds = %423, %415
  br label %433

433:                                              ; preds = %432, %410
  %434 = load ptr, ptr %17, align 8, !tbaa !5
  %435 = call noundef i64 @_ZNK14NAMESPACE_MAIN11BoosterCore14GetCountScoresEv(ptr noundef nonnull align 8 dereferenceable(520) %434)
  %436 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %46, i32 0, i32 0
  store i64 %435, ptr %436, align 8, !tbaa !23
  %437 = load ptr, ptr %17, align 8, !tbaa !5
  %438 = call noundef zeroext i1 @_ZN14NAMESPACE_MAIN11BoosterCore9IsHessianEv(ptr noundef nonnull align 8 dereferenceable(520) %437)
  %439 = zext i1 %438 to i64
  %440 = select i1 %438, i32 1, i32 0
  %441 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %46, i32 0, i32 2
  store i32 %440, ptr %441, align 4, !tbaa !24
  %442 = load ptr, ptr %17, align 8, !tbaa !5
  %443 = call noundef i32 @_ZNK14NAMESPACE_MAIN11BoosterCore11IsUseApproxEv(ptr noundef nonnull align 8 dereferenceable(520) %442)
  %444 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %46, i32 0, i32 4
  store i32 %443, ptr %444, align 4, !tbaa !25
  %445 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %46, i32 0, i32 3
  store i32 0, ptr %445, align 8, !tbaa !26
  %446 = load ptr, ptr %14, align 8, !tbaa !5
  %447 = call noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell23GetMulticlassMidwayTempEv(ptr noundef nonnull align 8 dereferenceable(112) %446)
  %448 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %46, i32 0, i32 5
  store ptr %447, ptr %448, align 8, !tbaa !27
  %449 = load ptr, ptr %18, align 8, !tbaa !5
  %450 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %46, i32 0, i32 6
  store ptr %449, ptr %450, align 8, !tbaa !28
  %451 = load ptr, ptr %44, align 8, !tbaa !5
  %452 = call noundef i64 @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting15GetCountSamplesEv(ptr noundef nonnull align 8 dereferenceable(56) %451)
  %453 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %46, i32 0, i32 7
  store i64 %452, ptr %453, align 8, !tbaa !29
  %454 = load ptr, ptr %44, align 8, !tbaa !5
  %455 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting13GetTargetDataEv(ptr noundef nonnull align 8 dereferenceable(56) %454)
  %456 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %46, i32 0, i32 9
  store ptr %455, ptr %456, align 8, !tbaa !30
  %457 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %46, i32 0, i32 10
  store ptr null, ptr %457, align 8, !tbaa !31
  %458 = load ptr, ptr %44, align 8, !tbaa !5
  %459 = call noundef ptr @_ZN14NAMESPACE_MAIN18DataSubsetBoosting15GetSampleScoresEv(ptr noundef nonnull align 8 dereferenceable(56) %458)
  %460 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %46, i32 0, i32 11
  store ptr %459, ptr %460, align 8, !tbaa !32
  %461 = load ptr, ptr %44, align 8, !tbaa !5
  %462 = call noundef ptr @_ZN14NAMESPACE_MAIN18DataSubsetBoosting11GetGradHessEv(ptr noundef nonnull align 8 dereferenceable(56) %461)
  %463 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %46, i32 0, i32 12
  store ptr %462, ptr %463, align 8, !tbaa !33
  %464 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %46, i32 0, i32 13
  store double 0.000000e+00, ptr %464, align 8, !tbaa !34
  %465 = load ptr, ptr %44, align 8, !tbaa !5
  %466 = call noundef i32 @_ZN14NAMESPACE_MAIN18DataSubsetBoosting20ObjectiveApplyUpdateEP17ApplyUpdateBridge(ptr noundef nonnull align 8 dereferenceable(56) %465, ptr noundef %46)
  store i32 %466, ptr %6, align 4, !tbaa !9
  %467 = load i32, ptr %6, align 4, !tbaa !9
  %468 = icmp ne i32 0, %467
  br i1 %468, label %469, label %471

469:                                              ; preds = %433
  %470 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %470, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %472

471:                                              ; preds = %433
  store i32 0, ptr %13, align 4
  br label %472

472:                                              ; preds = %471, %469
  call void @llvm.lifetime.end.p0(i64 96, ptr %46) #10
  %473 = load i32, ptr %13, align 4
  switch i32 %473, label %483 [
    i32 0, label %474
  ]

474:                                              ; preds = %472
  br label %475

475:                                              ; preds = %474, %409
  %476 = load ptr, ptr %44, align 8, !tbaa !5
  %477 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSubsetBoosting", ptr %476, i32 1
  store ptr %477, ptr %44, align 8, !tbaa !5
  br label %478

478:                                              ; preds = %475
  %479 = load ptr, ptr %45, align 8, !tbaa !5
  %480 = load ptr, ptr %44, align 8, !tbaa !5
  %481 = icmp ne ptr %479, %480
  br i1 %481, label %402, label %482, !llvm.loop !35

482:                                              ; preds = %478
  store i32 0, ptr %13, align 4
  br label %483

483:                                              ; preds = %482, %472
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #10
  %484 = load i32, ptr %13, align 4
  switch i32 %484, label %828 [
    i32 0, label %485
  ]

485:                                              ; preds = %483
  br label %486

486:                                              ; preds = %485, %374
  %487 = load ptr, ptr %17, align 8, !tbaa !5
  %488 = call noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore16GetValidationSetEv(ptr noundef nonnull align 8 dereferenceable(520) %487)
  %489 = call noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSamplesEv(ptr noundef nonnull align 8 dereferenceable(40) %488)
  %490 = icmp ne i64 0, %489
  br i1 %490, label %491, label %601

491:                                              ; preds = %486
  %492 = load ptr, ptr %17, align 8, !tbaa !5
  %493 = call noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore16GetValidationSetEv(ptr noundef nonnull align 8 dereferenceable(520) %492)
  %494 = call noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSubsetsEv(ptr noundef nonnull align 8 dereferenceable(40) %493)
  %495 = icmp ule i64 1, %494
  br i1 %495, label %498, label %496

496:                                              ; preds = %491
  call void @LogAssertFailure(i64 noundef 210, ptr noundef @.str, ptr noundef @__func__.ApplyTermUpdate, ptr noundef @.str.23)
  call void @__assert_fail(ptr noundef @.str.24, ptr noundef @.str, i32 noundef 210, ptr noundef @__PRETTY_FUNCTION__.ApplyTermUpdate) #11
  unreachable

497:                                              ; No predecessors!
  br label %498

498:                                              ; preds = %497, %491
  %499 = phi i1 [ true, %491 ], [ false, %497 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #10
  %500 = load ptr, ptr %17, align 8, !tbaa !5
  %501 = call noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore16GetValidationSetEv(ptr noundef nonnull align 8 dereferenceable(520) %500)
  %502 = call noundef ptr @_ZN14NAMESPACE_MAIN15DataSetBoosting10GetSubsetsEv(ptr noundef nonnull align 8 dereferenceable(40) %501)
  store ptr %502, ptr %47, align 8, !tbaa !5
  %503 = load ptr, ptr %47, align 8, !tbaa !5
  %504 = icmp ne ptr null, %503
  br i1 %504, label %507, label %505

505:                                              ; preds = %498
  call void @LogAssertFailure(i64 noundef 213, ptr noundef @.str, ptr noundef @__func__.ApplyTermUpdate, ptr noundef @.str.21)
  call void @__assert_fail(ptr noundef @.str.22, ptr noundef @.str, i32 noundef 213, ptr noundef @__PRETTY_FUNCTION__.ApplyTermUpdate) #11
  unreachable

506:                                              ; No predecessors!
  br label %507

507:                                              ; preds = %506, %498
  %508 = phi i1 [ true, %498 ], [ false, %506 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #10
  %509 = load ptr, ptr %47, align 8, !tbaa !5
  %510 = load ptr, ptr %17, align 8, !tbaa !5
  %511 = call noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore16GetValidationSetEv(ptr noundef nonnull align 8 dereferenceable(520) %510)
  %512 = call noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSubsetsEv(ptr noundef nonnull align 8 dereferenceable(40) %511)
  %513 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSubsetBoosting", ptr %509, i64 %512
  store ptr %513, ptr %48, align 8, !tbaa !5
  br label %514

514:                                              ; preds = %593, %507
  %515 = load ptr, ptr %47, align 8, !tbaa !5
  %516 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting19GetObjectiveWrapperEv(ptr noundef nonnull align 8 dereferenceable(56) %515)
  %517 = getelementptr inbounds %struct.ObjectiveWrapper, ptr %516, i32 0, i32 17
  %518 = load i64, ptr %517, align 8, !tbaa !17
  %519 = load i64, ptr %42, align 8, !tbaa !13
  %520 = icmp ne i64 %518, %519
  br i1 %520, label %521, label %522

521:                                              ; preds = %514
  store i8 1, ptr %43, align 1, !tbaa !15
  br label %590

522:                                              ; preds = %514
  call void @llvm.lifetime.start.p0(i64 96, ptr %49) #10
  %523 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %49, i32 0, i32 1
  store i32 0, ptr %523, align 8, !tbaa !19
  %524 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %49, i32 0, i32 8
  store ptr null, ptr %524, align 8, !tbaa !21
  %525 = load i64, ptr %15, align 8, !tbaa !13
  %526 = icmp ne i64 -2, %525
  br i1 %526, label %527, label %545

527:                                              ; preds = %522
  %528 = load ptr, ptr %47, align 8, !tbaa !5
  %529 = load i64, ptr %15, align 8, !tbaa !13
  %530 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting11GetTermDataEm(ptr noundef nonnull align 8 dereferenceable(56) %528, i64 noundef %529)
  %531 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %49, i32 0, i32 8
  store ptr %530, ptr %531, align 8, !tbaa !21
  %532 = load ptr, ptr %19, align 8, !tbaa !5
  %533 = call noundef i32 @_ZNK14NAMESPACE_MAIN4Term18GetBitsRequiredMinEv(ptr noundef nonnull align 8 dereferenceable(776) %532) #10
  %534 = icmp ne i32 0, %533
  br i1 %534, label %535, label %544

535:                                              ; preds = %527
  %536 = load ptr, ptr %19, align 8, !tbaa !5
  %537 = call noundef i32 @_ZNK14NAMESPACE_MAIN4Term18GetBitsRequiredMinEv(ptr noundef nonnull align 8 dereferenceable(776) %536) #10
  %538 = load ptr, ptr %47, align 8, !tbaa !5
  %539 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting19GetObjectiveWrapperEv(ptr noundef nonnull align 8 dereferenceable(56) %538)
  %540 = getelementptr inbounds %struct.ObjectiveWrapper, ptr %539, i32 0, i32 18
  %541 = load i64, ptr %540, align 8, !tbaa !22
  %542 = call noundef i32 @_ZN14NAMESPACE_MAINL22GetCountItemsBitPackedEim(i32 noundef %537, i64 noundef %541) #10
  %543 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %49, i32 0, i32 1
  store i32 %542, ptr %543, align 8, !tbaa !19
  br label %544

544:                                              ; preds = %535, %527
  br label %545

545:                                              ; preds = %544, %522
  %546 = load ptr, ptr %17, align 8, !tbaa !5
  %547 = call noundef i64 @_ZNK14NAMESPACE_MAIN11BoosterCore14GetCountScoresEv(ptr noundef nonnull align 8 dereferenceable(520) %546)
  %548 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %49, i32 0, i32 0
  store i64 %547, ptr %548, align 8, !tbaa !23
  %549 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %49, i32 0, i32 2
  store i32 0, ptr %549, align 4, !tbaa !24
  %550 = load ptr, ptr %17, align 8, !tbaa !5
  %551 = call noundef i32 @_ZNK14NAMESPACE_MAIN11BoosterCore11IsUseApproxEv(ptr noundef nonnull align 8 dereferenceable(520) %550)
  %552 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %49, i32 0, i32 4
  store i32 %551, ptr %552, align 4, !tbaa !25
  %553 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %49, i32 0, i32 3
  store i32 1, ptr %553, align 8, !tbaa !26
  %554 = load ptr, ptr %14, align 8, !tbaa !5
  %555 = call noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell23GetMulticlassMidwayTempEv(ptr noundef nonnull align 8 dereferenceable(112) %554)
  %556 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %49, i32 0, i32 5
  store ptr %555, ptr %556, align 8, !tbaa !27
  %557 = load ptr, ptr %18, align 8, !tbaa !5
  %558 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %49, i32 0, i32 6
  store ptr %557, ptr %558, align 8, !tbaa !28
  %559 = load ptr, ptr %47, align 8, !tbaa !5
  %560 = call noundef i64 @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting15GetCountSamplesEv(ptr noundef nonnull align 8 dereferenceable(56) %559)
  %561 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %49, i32 0, i32 7
  store i64 %560, ptr %561, align 8, !tbaa !29
  %562 = load ptr, ptr %47, align 8, !tbaa !5
  %563 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting13GetTargetDataEv(ptr noundef nonnull align 8 dereferenceable(56) %562)
  %564 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %49, i32 0, i32 9
  store ptr %563, ptr %564, align 8, !tbaa !30
  %565 = load ptr, ptr %47, align 8, !tbaa !5
  %566 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting17GetSubsetInnerBagEm(ptr noundef nonnull align 8 dereferenceable(56) %565, i64 noundef 0)
  %567 = call noundef ptr @_ZNK14NAMESPACE_MAIN14SubsetInnerBag10GetWeightsEv(ptr noundef nonnull align 8 dereferenceable(8) %566)
  %568 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %49, i32 0, i32 10
  store ptr %567, ptr %568, align 8, !tbaa !31
  %569 = load ptr, ptr %47, align 8, !tbaa !5
  %570 = call noundef ptr @_ZN14NAMESPACE_MAIN18DataSubsetBoosting15GetSampleScoresEv(ptr noundef nonnull align 8 dereferenceable(56) %569)
  %571 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %49, i32 0, i32 11
  store ptr %570, ptr %571, align 8, !tbaa !32
  %572 = load ptr, ptr %47, align 8, !tbaa !5
  %573 = call noundef ptr @_ZN14NAMESPACE_MAIN18DataSubsetBoosting11GetGradHessEv(ptr noundef nonnull align 8 dereferenceable(56) %572)
  %574 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %49, i32 0, i32 12
  store ptr %573, ptr %574, align 8, !tbaa !33
  %575 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %49, i32 0, i32 13
  store double 0.000000e+00, ptr %575, align 8, !tbaa !34
  %576 = load ptr, ptr %47, align 8, !tbaa !5
  %577 = call noundef i32 @_ZN14NAMESPACE_MAIN18DataSubsetBoosting20ObjectiveApplyUpdateEP17ApplyUpdateBridge(ptr noundef nonnull align 8 dereferenceable(56) %576, ptr noundef %49)
  store i32 %577, ptr %6, align 4, !tbaa !9
  %578 = load i32, ptr %6, align 4, !tbaa !9
  %579 = icmp ne i32 0, %578
  br i1 %579, label %580, label %582

580:                                              ; preds = %545
  %581 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %581, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %587

582:                                              ; preds = %545
  %583 = getelementptr inbounds %struct.ApplyUpdateBridge, ptr %49, i32 0, i32 13
  %584 = load double, ptr %583, align 8, !tbaa !34
  %585 = load double, ptr %41, align 8, !tbaa !11
  %586 = fadd double %585, %584
  store double %586, ptr %41, align 8, !tbaa !11
  store i32 0, ptr %13, align 4
  br label %587

587:                                              ; preds = %582, %580
  call void @llvm.lifetime.end.p0(i64 96, ptr %49) #10
  %588 = load i32, ptr %13, align 4
  switch i32 %588, label %598 [
    i32 0, label %589
  ]

589:                                              ; preds = %587
  br label %590

590:                                              ; preds = %589, %521
  %591 = load ptr, ptr %47, align 8, !tbaa !5
  %592 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSubsetBoosting", ptr %591, i32 1
  store ptr %592, ptr %47, align 8, !tbaa !5
  br label %593

593:                                              ; preds = %590
  %594 = load ptr, ptr %48, align 8, !tbaa !5
  %595 = load ptr, ptr %47, align 8, !tbaa !5
  %596 = icmp ne ptr %594, %595
  br i1 %596, label %514, label %597, !llvm.loop !37

597:                                              ; preds = %593
  store i32 0, ptr %13, align 4
  br label %598

598:                                              ; preds = %597, %587
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #10
  %599 = load i32, ptr %13, align 4
  switch i32 %599, label %828 [
    i32 0, label %600
  ]

600:                                              ; preds = %598
  br label %601

601:                                              ; preds = %600, %486
  %602 = load i8, ptr %43, align 1, !tbaa !15, !range !38, !noundef !39
  %603 = trunc i8 %602 to i1
  br i1 %603, label %605, label %604

604:                                              ; preds = %601
  br label %639

605:                                              ; preds = %601
  %606 = load i64, ptr %42, align 8, !tbaa !13
  %607 = icmp eq i64 4, %606
  br i1 %607, label %608, label %609

608:                                              ; preds = %605
  br label %639

609:                                              ; preds = %605
  %610 = load i64, ptr %42, align 8, !tbaa !13
  %611 = icmp eq i64 8, %610
  br i1 %611, label %614, label %612

612:                                              ; preds = %609
  call void @LogAssertFailure(i64 noundef 278, ptr noundef @.str, ptr noundef @__func__.ApplyTermUpdate, ptr noundef @.str.25)
  call void @__assert_fail(ptr noundef @.str.26, ptr noundef @.str, i32 noundef 278, ptr noundef @__PRETTY_FUNCTION__.ApplyTermUpdate) #11
  unreachable

613:                                              ; No predecessors!
  br label %614

614:                                              ; preds = %613, %609
  %615 = phi i1 [ true, %609 ], [ false, %613 ]
  store i64 4, ptr %42, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #10
  %616 = load ptr, ptr %18, align 8, !tbaa !5
  store ptr %616, ptr %50, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #10
  %617 = load ptr, ptr %18, align 8, !tbaa !5
  store ptr %617, ptr %51, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #10
  %618 = load ptr, ptr %18, align 8, !tbaa !5
  %619 = load ptr, ptr %17, align 8, !tbaa !5
  %620 = call noundef i64 @_ZNK14NAMESPACE_MAIN11BoosterCore14GetCountScoresEv(ptr noundef nonnull align 8 dereferenceable(520) %619)
  %621 = mul i64 8, %620
  %622 = load i64, ptr %20, align 8, !tbaa !13
  %623 = mul i64 %621, %622
  %624 = call noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIvEEPT_S2_m(ptr noundef %618, i64 noundef %623) #10
  store ptr %624, ptr %52, align 8, !tbaa !5
  br label %625

625:                                              ; preds = %634, %614
  %626 = load ptr, ptr %51, align 8, !tbaa !5
  %627 = load double, ptr %626, align 8, !tbaa !11
  %628 = fptrunc double %627 to float
  %629 = load ptr, ptr %50, align 8, !tbaa !5
  store float %628, ptr %629, align 4, !tbaa !40
  %630 = load ptr, ptr %51, align 8, !tbaa !5
  %631 = call noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIvEEPT_S2_m(ptr noundef %630, i64 noundef 8) #10
  store ptr %631, ptr %51, align 8, !tbaa !5
  %632 = load ptr, ptr %50, align 8, !tbaa !5
  %633 = call noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIvEEPT_S2_m(ptr noundef %632, i64 noundef 4) #10
  store ptr %633, ptr %50, align 8, !tbaa !5
  br label %634

634:                                              ; preds = %625
  %635 = load ptr, ptr %52, align 8, !tbaa !5
  %636 = load ptr, ptr %51, align 8, !tbaa !5
  %637 = icmp ne ptr %635, %636
  br i1 %637, label %625, label %638, !llvm.loop !42

638:                                              ; preds = %634
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #10
  br label %373, !llvm.loop !43

639:                                              ; preds = %608, %604
  %640 = load ptr, ptr %17, align 8, !tbaa !5
  %641 = call noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore16GetValidationSetEv(ptr noundef nonnull align 8 dereferenceable(520) %640)
  %642 = call noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSamplesEv(ptr noundef nonnull align 8 dereferenceable(40) %641)
  %643 = icmp ne i64 0, %642
  br i1 %643, label %644, label %691

644:                                              ; preds = %639
  %645 = load ptr, ptr %17, align 8, !tbaa !5
  %646 = load double, ptr %41, align 8, !tbaa !11
  %647 = call noundef double @_ZN14NAMESPACE_MAIN11BoosterCore12FinishMetricEd(ptr noundef nonnull align 8 dereferenceable(520) %645, double noundef %646)
  store double %647, ptr %41, align 8, !tbaa !11
  %648 = load ptr, ptr %17, align 8, !tbaa !5
  %649 = call noundef i32 @_ZN14NAMESPACE_MAIN11BoosterCore14MaximizeMetricEv(ptr noundef nonnull align 8 dereferenceable(520) %648)
  %650 = icmp ne i32 0, %649
  br i1 %650, label %651, label %654

651:                                              ; preds = %644
  %652 = load double, ptr %41, align 8, !tbaa !11
  %653 = fneg double %652
  store double %653, ptr %41, align 8, !tbaa !11
  br label %654

654:                                              ; preds = %651, %644
  %655 = load double, ptr %41, align 8, !tbaa !11
  %656 = call noundef zeroext i1 @_ZSt5isnand(double noundef %655)
  br i1 %656, label %657, label %659

657:                                              ; preds = %654
  call void @LogAssertFailure(i64 noundef 307, ptr noundef @.str, ptr noundef @__func__.ApplyTermUpdate, ptr noundef @.str.27)
  call void @__assert_fail(ptr noundef @.str.28, ptr noundef @.str, i32 noundef 307, ptr noundef @__PRETTY_FUNCTION__.ApplyTermUpdate) #11
  unreachable

658:                                              ; No predecessors!
  br label %659

659:                                              ; preds = %658, %654
  %660 = phi i1 [ true, %654 ], [ false, %658 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #10
  %661 = load ptr, ptr %17, align 8, !tbaa !5
  %662 = call noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore16GetValidationSetEv(ptr noundef nonnull align 8 dereferenceable(520) %661)
  %663 = call noundef double @_ZNK14NAMESPACE_MAIN15DataSetBoosting17GetBagWeightTotalEm(ptr noundef nonnull align 8 dereferenceable(40) %662, i64 noundef 0)
  store double %663, ptr %53, align 8, !tbaa !11
  %664 = load double, ptr %53, align 8, !tbaa !11
  %665 = call noundef zeroext i1 @_ZSt5isnand(double noundef %664)
  br i1 %665, label %666, label %668

666:                                              ; preds = %659
  call void @LogAssertFailure(i64 noundef 311, ptr noundef @.str, ptr noundef @__func__.ApplyTermUpdate, ptr noundef @.str.29)
  call void @__assert_fail(ptr noundef @.str.30, ptr noundef @.str, i32 noundef 311, ptr noundef @__PRETTY_FUNCTION__.ApplyTermUpdate) #11
  unreachable

667:                                              ; No predecessors!
  br label %668

668:                                              ; preds = %667, %659
  %669 = phi i1 [ true, %659 ], [ false, %667 ]
  %670 = load double, ptr %53, align 8, !tbaa !11
  %671 = call noundef zeroext i1 @_ZSt5isinfd(double noundef %670)
  br i1 %671, label %672, label %674

672:                                              ; preds = %668
  call void @LogAssertFailure(i64 noundef 312, ptr noundef @.str, ptr noundef @__func__.ApplyTermUpdate, ptr noundef @.str.31)
  call void @__assert_fail(ptr noundef @.str.32, ptr noundef @.str, i32 noundef 312, ptr noundef @__PRETTY_FUNCTION__.ApplyTermUpdate) #11
  unreachable

673:                                              ; No predecessors!
  br label %674

674:                                              ; preds = %673, %668
  %675 = phi i1 [ true, %668 ], [ false, %673 ]
  %676 = load double, ptr %53, align 8, !tbaa !11
  %677 = fcmp olt double 0.000000e+00, %676
  br i1 %677, label %680, label %678

678:                                              ; preds = %674
  call void @LogAssertFailure(i64 noundef 313, ptr noundef @.str, ptr noundef @__func__.ApplyTermUpdate, ptr noundef @.str.33)
  call void @__assert_fail(ptr noundef @.str.34, ptr noundef @.str, i32 noundef 313, ptr noundef @__PRETTY_FUNCTION__.ApplyTermUpdate) #11
  unreachable

679:                                              ; No predecessors!
  br label %680

680:                                              ; preds = %679, %674
  %681 = phi i1 [ true, %674 ], [ false, %679 ]
  %682 = load double, ptr %53, align 8, !tbaa !11
  %683 = load double, ptr %41, align 8, !tbaa !11
  %684 = fdiv double %683, %682
  store double %684, ptr %41, align 8, !tbaa !11
  %685 = load double, ptr %41, align 8, !tbaa !11
  %686 = call noundef zeroext i1 @_ZSt5isnand(double noundef %685)
  br i1 %686, label %687, label %689

687:                                              ; preds = %680
  call void @LogAssertFailure(i64 noundef 316, ptr noundef @.str, ptr noundef @__func__.ApplyTermUpdate, ptr noundef @.str.27)
  call void @__assert_fail(ptr noundef @.str.28, ptr noundef @.str, i32 noundef 316, ptr noundef @__PRETTY_FUNCTION__.ApplyTermUpdate) #11
  unreachable

688:                                              ; No predecessors!
  br label %689

689:                                              ; preds = %688, %680
  %690 = phi i1 [ true, %680 ], [ false, %688 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #10
  br label %691

691:                                              ; preds = %689, %639
  %692 = load double, ptr %41, align 8, !tbaa !11
  %693 = load ptr, ptr %17, align 8, !tbaa !5
  %694 = call noundef double @_ZNK14NAMESPACE_MAIN11BoosterCore18GetBestModelMetricEv(ptr noundef nonnull align 8 dereferenceable(520) %693)
  %695 = fcmp ole double %692, %694
  %696 = xor i1 %695, true
  %697 = xor i1 %696, true
  %698 = zext i1 %697 to i64
  %699 = call i64 @llvm.expect.i64(i64 %698, i64 1)
  %700 = icmp ne i64 %699, 0
  br i1 %700, label %701, label %773

701:                                              ; preds = %691
  %702 = load ptr, ptr %17, align 8, !tbaa !5
  %703 = load double, ptr %41, align 8, !tbaa !11
  call void @_ZN14NAMESPACE_MAIN11BoosterCore18SetBestModelMetricEd(ptr noundef nonnull align 8 dereferenceable(520) %702, double noundef %703)
  %704 = load i64, ptr %15, align 8, !tbaa !13
  %705 = icmp ne i64 -2, %704
  br i1 %705, label %706, label %772

706:                                              ; preds = %701
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #10
  store i64 0, ptr %54, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #10
  %707 = load ptr, ptr %17, align 8, !tbaa !5
  %708 = call noundef i64 @_ZNK14NAMESPACE_MAIN11BoosterCore13GetCountTermsEv(ptr noundef nonnull align 8 dereferenceable(520) %707)
  store i64 %708, ptr %55, align 8, !tbaa !13
  br label %709

709:                                              ; preds = %764, %706
  %710 = load ptr, ptr %17, align 8, !tbaa !5
  %711 = call noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore15GetCurrentModelEv(ptr noundef nonnull align 8 dereferenceable(520) %710)
  %712 = load i64, ptr %54, align 8, !tbaa !13
  %713 = getelementptr inbounds ptr, ptr %711, i64 %712
  %714 = load ptr, ptr %713, align 8, !tbaa !5
  %715 = icmp ne ptr null, %714
  br i1 %715, label %716, label %750

716:                                              ; preds = %709
  %717 = load ptr, ptr %17, align 8, !tbaa !5
  %718 = call noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore12GetBestModelEv(ptr noundef nonnull align 8 dereferenceable(520) %717)
  %719 = load i64, ptr %54, align 8, !tbaa !13
  %720 = getelementptr inbounds ptr, ptr %718, i64 %719
  %721 = load ptr, ptr %720, align 8, !tbaa !5
  %722 = icmp ne ptr null, %721
  br i1 %722, label %725, label %723

723:                                              ; preds = %716
  call void @LogAssertFailure(i64 noundef 343, ptr noundef @.str, ptr noundef @__func__.ApplyTermUpdate, ptr noundef @.str.35)
  call void @__assert_fail(ptr noundef @.str.36, ptr noundef @.str, i32 noundef 343, ptr noundef @__PRETTY_FUNCTION__.ApplyTermUpdate) #11
  unreachable

724:                                              ; No predecessors!
  br label %725

725:                                              ; preds = %724, %716
  %726 = phi i1 [ true, %716 ], [ false, %724 ]
  %727 = load ptr, ptr %17, align 8, !tbaa !5
  %728 = call noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore12GetBestModelEv(ptr noundef nonnull align 8 dereferenceable(520) %727)
  %729 = load i64, ptr %54, align 8, !tbaa !13
  %730 = getelementptr inbounds ptr, ptr %728, i64 %729
  %731 = load ptr, ptr %730, align 8, !tbaa !5
  %732 = load ptr, ptr %17, align 8, !tbaa !5
  %733 = call noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore15GetCurrentModelEv(ptr noundef nonnull align 8 dereferenceable(520) %732)
  %734 = load i64, ptr %54, align 8, !tbaa !13
  %735 = getelementptr inbounds ptr, ptr %733, i64 %734
  %736 = load ptr, ptr %735, align 8, !tbaa !5
  %737 = call noundef i32 @_ZN14NAMESPACE_MAIN6Tensor4CopyERKS0_(ptr noundef nonnull align 8 dereferenceable(72) %731, ptr noundef nonnull align 8 dereferenceable(72) %736)
  store i32 %737, ptr %6, align 4, !tbaa !9
  %738 = load i32, ptr %6, align 4, !tbaa !9
  %739 = icmp ne i32 0, %738
  br i1 %739, label %740, label %749

740:                                              ; preds = %725
  br label %741

741:                                              ; preds = %740
  call void @llvm.lifetime.start.p0(i64 4, ptr %56) #10
  store i32 4, ptr %56, align 4, !tbaa !9
  %742 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  %743 = icmp sle i32 4, %742
  br i1 %743, label %744, label %745

744:                                              ; preds = %741
  call void @InteralLogWithoutArguments(i32 noundef 4, ptr noundef @_ZZ15ApplyTermUpdateE13LOG__sMessage_6)
  br label %745

745:                                              ; preds = %744, %741
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #10
  br label %746

746:                                              ; preds = %745
  br label %747

747:                                              ; preds = %746
  %748 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %748, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %769

749:                                              ; preds = %725
  br label %761

750:                                              ; preds = %709
  %751 = load ptr, ptr %17, align 8, !tbaa !5
  %752 = call noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore12GetBestModelEv(ptr noundef nonnull align 8 dereferenceable(520) %751)
  %753 = load i64, ptr %54, align 8, !tbaa !13
  %754 = getelementptr inbounds ptr, ptr %752, i64 %753
  %755 = load ptr, ptr %754, align 8, !tbaa !5
  %756 = icmp eq ptr null, %755
  br i1 %756, label %759, label %757

757:                                              ; preds = %750
  call void @LogAssertFailure(i64 noundef 350, ptr noundef @.str, ptr noundef @__func__.ApplyTermUpdate, ptr noundef @.str.37)
  call void @__assert_fail(ptr noundef @.str.38, ptr noundef @.str, i32 noundef 350, ptr noundef @__PRETTY_FUNCTION__.ApplyTermUpdate) #11
  unreachable

758:                                              ; No predecessors!
  br label %759

759:                                              ; preds = %758, %750
  %760 = phi i1 [ true, %750 ], [ false, %758 ]
  br label %761

761:                                              ; preds = %759, %749
  %762 = load i64, ptr %54, align 8, !tbaa !13
  %763 = add i64 %762, 1
  store i64 %763, ptr %54, align 8, !tbaa !13
  br label %764

764:                                              ; preds = %761
  %765 = load i64, ptr %54, align 8, !tbaa !13
  %766 = load i64, ptr %55, align 8, !tbaa !13
  %767 = icmp ne i64 %765, %766
  br i1 %767, label %709, label %768, !llvm.loop !44

768:                                              ; preds = %764
  store i32 0, ptr %13, align 4
  br label %769

769:                                              ; preds = %768, %747
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #10
  %770 = load i32, ptr %13, align 4
  switch i32 %770, label %828 [
    i32 0, label %771
  ]

771:                                              ; preds = %769
  br label %772

772:                                              ; preds = %771, %701
  br label %773

773:                                              ; preds = %772, %691
  %774 = load ptr, ptr %5, align 8, !tbaa !5
  %775 = icmp ne ptr null, %774
  br i1 %775, label %776, label %779

776:                                              ; preds = %773
  %777 = load double, ptr %41, align 8, !tbaa !11
  %778 = load ptr, ptr %5, align 8, !tbaa !5
  store double %777, ptr %778, align 8, !tbaa !11
  br label %779

779:                                              ; preds = %776, %773
  %780 = load i64, ptr %15, align 8, !tbaa !13
  %781 = icmp eq i64 -2, %780
  br i1 %781, label %782, label %791

782:                                              ; preds = %779
  br label %783

783:                                              ; preds = %782
  call void @llvm.lifetime.start.p0(i64 4, ptr %57) #10
  store i32 3, ptr %57, align 4, !tbaa !9
  %784 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  %785 = icmp sle i32 3, %784
  br i1 %785, label %786, label %788

786:                                              ; preds = %783
  %787 = load double, ptr %41, align 8, !tbaa !11
  call void (i32, ptr, ...) @InteralLogWithArguments(i32 noundef 3, ptr noundef @_ZZ15ApplyTermUpdateE13LOG__sMessage_7, double noundef %787)
  br label %788

788:                                              ; preds = %786, %783
  call void @llvm.lifetime.end.p0(i64 4, ptr %57) #10
  br label %789

789:                                              ; preds = %788
  br label %790

790:                                              ; preds = %789
  br label %827

791:                                              ; preds = %779
  br label %792

792:                                              ; preds = %791
  call void @llvm.lifetime.start.p0(i64 4, ptr %58) #10
  store i32 3, ptr %58, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #10
  store i32 4, ptr %59, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %60) #10
  %793 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  store i32 %793, ptr %60, align 4, !tbaa !9
  %794 = load i32, ptr %60, align 4, !tbaa !9
  %795 = icmp sle i32 3, %794
  br i1 %795, label %796, label %824

796:                                              ; preds = %792
  br label %797

797:                                              ; preds = %796
  call void @llvm.lifetime.start.p0(i64 4, ptr %61) #10
  %798 = load i32, ptr %60, align 4, !tbaa !9
  %799 = icmp slt i32 %798, 4
  br i1 %799, label %800, label %815

800:                                              ; preds = %797
  call void @llvm.lifetime.start.p0(i64 8, ptr %62) #10
  %801 = load ptr, ptr %19, align 8, !tbaa !5
  %802 = call noundef ptr @_ZN14NAMESPACE_MAIN4Term45GetPointerCountLogExitApplyTermUpdateMessagesEv(ptr noundef nonnull align 8 dereferenceable(776) %801) #10
  store ptr %802, ptr %62, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %63) #10
  %803 = load ptr, ptr %62, align 8, !tbaa !5
  %804 = load i32, ptr %803, align 4, !tbaa !9
  %805 = sub nsw i32 %804, 1
  store i32 %805, ptr %63, align 4, !tbaa !9
  %806 = load i32, ptr %63, align 4, !tbaa !9
  %807 = icmp slt i32 %806, 0
  br i1 %807, label %808, label %809

808:                                              ; preds = %800
  store i32 40, ptr %13, align 4
  br label %812

809:                                              ; preds = %800
  %810 = load i32, ptr %63, align 4, !tbaa !9
  %811 = load ptr, ptr %62, align 8, !tbaa !5
  store i32 %810, ptr %811, align 4, !tbaa !9
  store i32 3, ptr %61, align 4, !tbaa !9
  store i32 0, ptr %13, align 4
  br label %812

812:                                              ; preds = %809, %808
  call void @llvm.lifetime.end.p0(i64 4, ptr %63) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #10
  %813 = load i32, ptr %13, align 4
  switch i32 %813, label %819 [
    i32 0, label %814
  ]

814:                                              ; preds = %812
  br label %816

815:                                              ; preds = %797
  store i32 4, ptr %61, align 4, !tbaa !9
  br label %816

816:                                              ; preds = %815, %814
  %817 = load i32, ptr %61, align 4, !tbaa !9
  %818 = load double, ptr %41, align 8, !tbaa !11
  call void (i32, ptr, ...) @InteralLogWithArguments(i32 noundef %817, ptr noundef @_ZZ15ApplyTermUpdateE13LOG__sMessage_8, double noundef %818)
  store i32 0, ptr %13, align 4
  br label %819

819:                                              ; preds = %816, %812
  call void @llvm.lifetime.end.p0(i64 4, ptr %61) #10
  %820 = load i32, ptr %13, align 4
  switch i32 %820, label %833 [
    i32 0, label %821
    i32 40, label %823
  ]

821:                                              ; preds = %819
  br label %822

822:                                              ; preds = %821
  br label %823

823:                                              ; preds = %822, %819
  br label %824

824:                                              ; preds = %823, %792
  call void @llvm.lifetime.end.p0(i64 4, ptr %60) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %58) #10
  br label %825

825:                                              ; preds = %824
  br label %826

826:                                              ; preds = %825
  br label %827

827:                                              ; preds = %826, %790
  store i32 0, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %828

828:                                              ; preds = %827, %769, %598, %483
  call void @llvm.lifetime.end.p0(i64 1, ptr %43) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #10
  br label %829

829:                                              ; preds = %828, %347, %305, %265, %155
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #10
  br label %830

830:                                              ; preds = %829, %124
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  br label %831

831:                                              ; preds = %830, %111
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #10
  %832 = load i32, ptr %3, align 4
  ret i32 %832

833:                                              ; preds = %819, %298, %258, %220, %88
  unreachable
}

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

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

declare void @InteralLogWithArguments(i32 noundef, ptr noundef, ...) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNSt14numeric_limitsIdE8infinityEv() #4 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell25GetBoosterShellFromHandleEP14_BoosterHandle(ptr noundef) #5 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN14NAMESPACE_MAIN12BoosterShell12GetTermIndexEv(ptr noundef nonnull align 8 dereferenceable(112)) #6 align 2

declare void @InteralLogWithoutArguments(i32 noundef, ptr noundef) #2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell14GetBoosterCoreEv(ptr noundef nonnull align 8 dereferenceable(112)) #5 align 2

declare void @LogAssertFailure(i64 noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #7

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN14NAMESPACE_MAIN12BoosterShell12SetTermIndexEm(ptr noundef nonnull align 8 dereferenceable(112), i64 noundef) #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK14NAMESPACE_MAIN11BoosterCore14GetCountScoresEv(ptr noundef nonnull align 8 dereferenceable(520)) #8 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell13GetTermUpdateEv(ptr noundef nonnull align 8 dereferenceable(112)) #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN6Tensor22GetTensorScoresPointerEv(ptr noundef nonnull align 8 dereferenceable(72)) #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK14NAMESPACE_MAIN11BoosterCore13GetCountTermsEv(ptr noundef nonnull align 8 dereferenceable(520)) #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore8GetTermsEv(ptr noundef nonnull align 8 dereferenceable(520)) #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN4Term46GetPointerCountLogEnterApplyTermUpdateMessagesEv(ptr noundef nonnull align 8 dereferenceable(776)) #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN4Term45GetPointerCountLogExitApplyTermUpdateMessagesEv(ptr noundef nonnull align 8 dereferenceable(776)) #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK14NAMESPACE_MAIN4Term18GetCountTensorBinsEv(ptr noundef nonnull align 8 dereferenceable(776)) #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore15GetCurrentModelEv(ptr noundef nonnull align 8 dereferenceable(520)) #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore12GetBestModelEv(ptr noundef nonnull align 8 dereferenceable(520)) #8 align 2

declare noundef i32 @_ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef) #2

declare void @_ZN14NAMESPACE_MAIN6Tensor33AddExpandedWithBadValueProtectionEPKd(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore14GetTrainingSetEv(ptr noundef nonnull align 8 dereferenceable(520)) #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSamplesEv(ptr noundef nonnull align 8 dereferenceable(40)) #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSubsetsEv(ptr noundef nonnull align 8 dereferenceable(40)) #8 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN15DataSetBoosting10GetSubsetsEv(ptr noundef nonnull align 8 dereferenceable(40)) #9 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting19GetObjectiveWrapperEv(ptr noundef nonnull align 8 dereferenceable(56)) #9 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting11GetTermDataEm(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef) #9 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK14NAMESPACE_MAIN4Term18GetBitsRequiredMinEv(ptr noundef nonnull align 8 dereferenceable(776)) #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN14NAMESPACE_MAINL22GetCountItemsBitPackedEim(i32 noundef, i64 noundef) #8

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN14NAMESPACE_MAIN11BoosterCore9IsHessianEv(ptr noundef nonnull align 8 dereferenceable(520)) #9 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK14NAMESPACE_MAIN11BoosterCore11IsUseApproxEv(ptr noundef nonnull align 8 dereferenceable(520)) #8 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell23GetMulticlassMidwayTempEv(ptr noundef nonnull align 8 dereferenceable(112)) #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting15GetCountSamplesEv(ptr noundef nonnull align 8 dereferenceable(56)) #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting13GetTargetDataEv(ptr noundef nonnull align 8 dereferenceable(56)) #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN18DataSubsetBoosting15GetSampleScoresEv(ptr noundef nonnull align 8 dereferenceable(56)) #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN18DataSubsetBoosting11GetGradHessEv(ptr noundef nonnull align 8 dereferenceable(56)) #8 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN14NAMESPACE_MAIN18DataSubsetBoosting20ObjectiveApplyUpdateEP17ApplyUpdateBridge(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef) #9 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore16GetValidationSetEv(ptr noundef nonnull align 8 dereferenceable(520)) #8 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting17GetSubsetInnerBagEm(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef) #9 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK14NAMESPACE_MAIN14SubsetInnerBag10GetWeightsEv(ptr noundef nonnull align 8 dereferenceable(8)) #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIvEEPT_S2_m(ptr noundef, i64 noundef) #8

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZN14NAMESPACE_MAIN11BoosterCore12FinishMetricEd(ptr noundef nonnull align 8 dereferenceable(520), double noundef) #9 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN14NAMESPACE_MAIN11BoosterCore14MaximizeMetricEv(ptr noundef nonnull align 8 dereferenceable(520)) #9 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt5isnand(double noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK14NAMESPACE_MAIN15DataSetBoosting17GetBagWeightTotalEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #9 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt5isinfd(double noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK14NAMESPACE_MAIN11BoosterCore18GetBestModelMetricEv(ptr noundef nonnull align 8 dereferenceable(520)) #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN14NAMESPACE_MAIN11BoosterCore18SetBestModelMetricEd(ptr noundef nonnull align 8 dereferenceable(520), double noundef) #8 align 2

declare noundef i32 @_ZN14NAMESPACE_MAIN6Tensor4CopyERKS0_(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(72)) #2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { alwaysinline 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 = { alwaysinline 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 #7 = { noreturn 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 #8 = { 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 #9 = { 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 #10 = { nounwind }
attributes #11 = { noreturn 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{!18, !14, i64 128}
!18 = !{!"_ZTS16ObjectiveWrapper", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !12, i64 96, !12, i64 104, !10, i64 112, !14, i64 120, !14, i64 128, !14, i64 136, !10, i64 144, !6, i64 152}
!19 = !{!20, !10, i64 8}
!20 = !{!"_ZTS17ApplyUpdateBridge", !14, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !6, i64 24, !6, i64 32, !14, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !12, i64 88}
!21 = !{!20, !6, i64 48}
!22 = !{!18, !14, i64 136}
!23 = !{!20, !14, i64 0}
!24 = !{!20, !10, i64 12}
!25 = !{!20, !10, i64 20}
!26 = !{!20, !10, i64 16}
!27 = !{!20, !6, i64 24}
!28 = !{!20, !6, i64 32}
!29 = !{!20, !14, i64 40}
!30 = !{!20, !6, i64 56}
!31 = !{!20, !6, i64 64}
!32 = !{!20, !6, i64 72}
!33 = !{!20, !6, i64 80}
!34 = !{!20, !12, i64 88}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = distinct !{!37, !36}
!38 = !{i8 0, i8 2}
!39 = !{}
!40 = !{!41, !41, i64 0}
!41 = !{!"float", !7, i64 0}
!42 = distinct !{!42, !36}
!43 = distinct !{!43, !36}
!44 = distinct !{!44, !36}


; 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"

%struct.ApplyUpdateBridge = type { i64, i32, i32, i32, i32, ptr, ptr, i64, ptr, ptr, ptr, ptr, ptr, double }
%"struct.NAMESPACE_MAIN::DataSubsetBoosting" = type { i64, ptr, ptr, ptr, ptr, ptr, ptr }

@g_traceLevel = external local_unnamed_addr global i32, align 4
@_ZN14NAMESPACE_MAINL21g_cLogApplyTermUpdateE = external hidden local_unnamed_addr global i32, align 4
@_ZZ15ApplyTermUpdateE13LOG__sMessage = external hidden constant [61 x i8], align 16
@_ZZ15ApplyTermUpdateE13LOG__sMessage_0 = external hidden constant [61 x i8], align 16
@.str = external hidden unnamed_addr constant [89 x i8], align 1
@__func__.ApplyTermUpdate = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1
@__PRETTY_FUNCTION__.ApplyTermUpdate = external hidden unnamed_addr constant [66 x i8], align 1
@_ZZ15ApplyTermUpdateE13LOG__sMessage_1 = external hidden constant [24 x i8], align 16
@_ZZ15ApplyTermUpdateE13LOG__sMessage_2 = external hidden constant [38 x i8], align 16
@.str.3 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [39 x i8], align 1
@_ZZ15ApplyTermUpdateE13LOG__sMessage_3 = external hidden constant [24 x i8], align 16
@_ZZ15ApplyTermUpdateE13LOG__sMessage_4 = external hidden constant [38 x i8], align 16
@_ZZ15ApplyTermUpdateE13LOG__sMessage_5 = external hidden constant [65 x i8], align 16
@.str.11 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [54 x i8], align 1
@_ZZ15ApplyTermUpdateE13LOG__sMessage_6 = external hidden constant [68 x i8], align 16
@.str.37 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [54 x i8], align 1
@_ZZ15ApplyTermUpdateE13LOG__sMessage_7 = external hidden constant [48 x i8], align 16
@_ZZ15ApplyTermUpdateE13LOG__sMessage_8 = external hidden constant [48 x i8], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @ApplyTermUpdate(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca %struct.ApplyUpdateBridge, align 8
  %4 = alloca %struct.ApplyUpdateBridge, align 8
  %5 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %6 = icmp sgt i32 %5, 2
  br i1 %6, label %7, label %.critedge

7:                                                ; preds = %2
  %8 = icmp eq i32 %5, 3
  br i1 %8, label %9, label %14

9:                                                ; preds = %7
  %10 = load i32, ptr @_ZN14NAMESPACE_MAINL21g_cLogApplyTermUpdateE, align 4, !tbaa !5
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %12, label %.critedge

12:                                               ; preds = %9
  %13 = add nsw i32 %10, -1
  store i32 %13, ptr @_ZN14NAMESPACE_MAINL21g_cLogApplyTermUpdateE, align 4, !tbaa !5
  br label %14

14:                                               ; preds = %12, %7
  %.1213 = phi i32 [ 3, %12 ], [ 4, %7 ]
  tail call void (i32, ptr, ...) @InteralLogWithArguments(i32 noundef %.1213, ptr noundef nonnull @_ZZ15ApplyTermUpdateE13LOG__sMessage, ptr noundef %0, ptr noundef %1)
  br label %.critedge

.critedge:                                        ; preds = %14, %9, %2
  %.not284 = icmp eq ptr %1, null
  br i1 %.not284, label %17, label %15, !prof !9

15:                                               ; preds = %.critedge
  %16 = tail call noundef double @_ZNSt14numeric_limitsIdE8infinityEv() #9
  store double %16, ptr %1, align 8, !tbaa !10
  br label %17

17:                                               ; preds = %15, %.critedge
  %18 = tail call noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell25GetBoosterShellFromHandleEP14_BoosterHandle(ptr noundef %0)
  %19 = icmp eq ptr %18, null
  br i1 %19, label %.critedge323, label %20

20:                                               ; preds = %17
  %21 = tail call noundef i64 @_ZN14NAMESPACE_MAIN12BoosterShell12GetTermIndexEv(ptr noundef nonnull align 8 dereferenceable(112) %18)
  %22 = icmp eq i64 %21, -1
  br i1 %22, label %23, label %27

23:                                               ; preds = %20
  %24 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %26, label %.critedge323

26:                                               ; preds = %23
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ15ApplyTermUpdateE13LOG__sMessage_0)
  br label %.critedge323

27:                                               ; preds = %20
  %28 = tail call noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell14GetBoosterCoreEv(ptr noundef nonnull align 8 dereferenceable(112) %18)
  %.not285 = icmp eq ptr %28, null
  br i1 %.not285, label %29, label %30

29:                                               ; preds = %27
  tail call void @LogAssertFailure(i64 noundef 66, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ApplyTermUpdate, ptr noundef nonnull @.str.1)
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str, i32 noundef 66, ptr noundef nonnull @__PRETTY_FUNCTION__.ApplyTermUpdate) #10
  unreachable

30:                                               ; preds = %27
  tail call void @_ZN14NAMESPACE_MAIN12BoosterShell12SetTermIndexEm(ptr noundef nonnull align 8 dereferenceable(112) %18, i64 noundef -1)
  %31 = icmp eq i64 %21, -2
  br i1 %31, label %32, label %50

32:                                               ; preds = %30
  %33 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %34 = icmp sgt i32 %33, 2
  br i1 %34, label %35, label %36

35:                                               ; preds = %32
  tail call void @InteralLogWithoutArguments(i32 noundef 3, ptr noundef nonnull @_ZZ15ApplyTermUpdateE13LOG__sMessage_1)
  br label %36

36:                                               ; preds = %35, %32
  %37 = tail call noundef i64 @_ZNK14NAMESPACE_MAIN11BoosterCore14GetCountScoresEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %38 = icmp eq i64 %37, 0
  br i1 %38, label %39, label %43

39:                                               ; preds = %36
  %40 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %41 = icmp sgt i32 %40, 2
  br i1 %41, label %42, label %.critedge323

42:                                               ; preds = %39
  tail call void @InteralLogWithoutArguments(i32 noundef 3, ptr noundef nonnull @_ZZ15ApplyTermUpdateE13LOG__sMessage_2)
  br label %.critedge323

43:                                               ; preds = %36
  %44 = tail call noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell13GetTermUpdateEv(ptr noundef nonnull align 8 dereferenceable(112) %18)
  %.not294 = icmp eq ptr %44, null
  br i1 %.not294, label %45, label %46

45:                                               ; preds = %43
  tail call void @LogAssertFailure(i64 noundef 87, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ApplyTermUpdate, ptr noundef nonnull @.str.3)
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str, i32 noundef 87, ptr noundef nonnull @__PRETTY_FUNCTION__.ApplyTermUpdate) #10
  unreachable

46:                                               ; preds = %43
  %47 = tail call noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell13GetTermUpdateEv(ptr noundef nonnull align 8 dereferenceable(112) %18)
  %48 = tail call noundef ptr @_ZN14NAMESPACE_MAIN6Tensor22GetTensorScoresPointerEv(ptr noundef nonnull align 8 dereferenceable(72) %47)
  %.not295 = icmp eq ptr %48, null
  br i1 %.not295, label %49, label %131

49:                                               ; preds = %46
  tail call void @LogAssertFailure(i64 noundef 89, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ApplyTermUpdate, ptr noundef nonnull @.str.5)
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str, i32 noundef 89, ptr noundef nonnull @__PRETTY_FUNCTION__.ApplyTermUpdate) #10
  unreachable

50:                                               ; preds = %30
  %51 = tail call noundef i64 @_ZNK14NAMESPACE_MAIN11BoosterCore13GetCountTermsEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %52 = icmp ult i64 %21, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %50
  tail call void @LogAssertFailure(i64 noundef 94, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ApplyTermUpdate, ptr noundef nonnull @.str.7)
  tail call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str, i32 noundef 94, ptr noundef nonnull @__PRETTY_FUNCTION__.ApplyTermUpdate) #10
  unreachable

54:                                               ; preds = %50
  %55 = tail call noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore8GetTermsEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %.not286 = icmp eq ptr %55, null
  br i1 %.not286, label %56, label %57

56:                                               ; preds = %54
  tail call void @LogAssertFailure(i64 noundef 95, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ApplyTermUpdate, ptr noundef nonnull @.str.9)
  tail call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str, i32 noundef 95, ptr noundef nonnull @__PRETTY_FUNCTION__.ApplyTermUpdate) #10
  unreachable

57:                                               ; preds = %54
  %58 = tail call noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore8GetTermsEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %59 = getelementptr inbounds ptr, ptr %58, i64 %21
  %60 = load ptr, ptr %59, align 8, !tbaa !12
  %61 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %62 = icmp sgt i32 %61, 2
  br i1 %62, label %63, label %.critedge321

63:                                               ; preds = %57
  %64 = icmp eq i32 %61, 3
  br i1 %64, label %65, label %71

65:                                               ; preds = %63
  %66 = tail call noundef ptr @_ZN14NAMESPACE_MAIN4Term46GetPointerCountLogEnterApplyTermUpdateMessagesEv(ptr noundef nonnull align 8 dereferenceable(776) %60) #9
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = icmp sgt i32 %67, 0
  br i1 %68, label %69, label %.critedge321

69:                                               ; preds = %65
  %70 = add nsw i32 %67, -1
  store i32 %70, ptr %66, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %69, %63
  %.1228 = phi i32 [ 3, %69 ], [ 4, %63 ]
  tail call void @InteralLogWithoutArguments(i32 noundef %.1228, ptr noundef nonnull @_ZZ15ApplyTermUpdateE13LOG__sMessage_3)
  br label %.critedge321

.critedge321:                                     ; preds = %71, %65, %57
  %72 = tail call noundef i64 @_ZNK14NAMESPACE_MAIN11BoosterCore14GetCountScoresEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %73 = icmp eq i64 %72, 0
  br i1 %73, label %74, label %86

74:                                               ; preds = %.critedge321
  %75 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %76 = icmp sgt i32 %75, 2
  br i1 %76, label %77, label %.critedge323

77:                                               ; preds = %74
  %78 = icmp eq i32 %75, 3
  br i1 %78, label %79, label %85

79:                                               ; preds = %77
  %80 = tail call noundef ptr @_ZN14NAMESPACE_MAIN4Term45GetPointerCountLogExitApplyTermUpdateMessagesEv(ptr noundef nonnull align 8 dereferenceable(776) %60) #9
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = icmp sgt i32 %81, 0
  br i1 %82, label %83, label %.critedge323

83:                                               ; preds = %79
  %84 = add nsw i32 %81, -1
  store i32 %84, ptr %80, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %83, %77
  %.1231 = phi i32 [ 3, %83 ], [ 4, %77 ]
  tail call void @InteralLogWithoutArguments(i32 noundef %.1231, ptr noundef nonnull @_ZZ15ApplyTermUpdateE13LOG__sMessage_4)
  br label %.critedge323

86:                                               ; preds = %.critedge321
  %87 = tail call noundef i64 @_ZNK14NAMESPACE_MAIN4Term18GetCountTensorBinsEv(ptr noundef nonnull align 8 dereferenceable(776) %60) #9
  %88 = icmp eq i64 %87, 0
  br i1 %88, label %89, label %101

89:                                               ; preds = %86
  %90 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %91 = icmp sgt i32 %90, 2
  br i1 %91, label %92, label %.critedge323

92:                                               ; preds = %89
  %93 = icmp eq i32 %90, 3
  br i1 %93, label %94, label %100

94:                                               ; preds = %92
  %95 = tail call noundef ptr @_ZN14NAMESPACE_MAIN4Term45GetPointerCountLogExitApplyTermUpdateMessagesEv(ptr noundef nonnull align 8 dereferenceable(776) %60) #9
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = icmp sgt i32 %96, 0
  br i1 %97, label %98, label %.critedge323

98:                                               ; preds = %94
  %99 = add nsw i32 %96, -1
  store i32 %99, ptr %95, align 4, !tbaa !5
  br label %100

100:                                              ; preds = %98, %92
  %.1233 = phi i32 [ 3, %98 ], [ 4, %92 ]
  tail call void @InteralLogWithoutArguments(i32 noundef %.1233, ptr noundef nonnull @_ZZ15ApplyTermUpdateE13LOG__sMessage_5)
  br label %.critedge323

101:                                              ; preds = %86
  %102 = tail call noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore15GetCurrentModelEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %.not287 = icmp eq ptr %102, null
  br i1 %.not287, label %103, label %104

103:                                              ; preds = %101
  tail call void @LogAssertFailure(i64 noundef 126, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ApplyTermUpdate, ptr noundef nonnull @.str.11)
  tail call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str, i32 noundef 126, ptr noundef nonnull @__PRETTY_FUNCTION__.ApplyTermUpdate) #10
  unreachable

104:                                              ; preds = %101
  %105 = tail call noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore12GetBestModelEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %.not288 = icmp eq ptr %105, null
  br i1 %.not288, label %106, label %107

106:                                              ; preds = %104
  tail call void @LogAssertFailure(i64 noundef 127, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ApplyTermUpdate, ptr noundef nonnull @.str.13)
  tail call void @__assert_fail(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str, i32 noundef 127, ptr noundef nonnull @__PRETTY_FUNCTION__.ApplyTermUpdate) #10
  unreachable

107:                                              ; preds = %104
  %108 = tail call noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore15GetCurrentModelEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %109 = getelementptr inbounds ptr, ptr %108, i64 %21
  %110 = load ptr, ptr %109, align 8, !tbaa !12
  %.not289 = icmp eq ptr %110, null
  br i1 %.not289, label %111, label %112

111:                                              ; preds = %107
  tail call void @LogAssertFailure(i64 noundef 128, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ApplyTermUpdate, ptr noundef nonnull @.str.15)
  tail call void @__assert_fail(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str, i32 noundef 128, ptr noundef nonnull @__PRETTY_FUNCTION__.ApplyTermUpdate) #10
  unreachable

112:                                              ; preds = %107
  %113 = tail call noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore12GetBestModelEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %114 = getelementptr inbounds ptr, ptr %113, i64 %21
  %115 = load ptr, ptr %114, align 8, !tbaa !12
  %.not290 = icmp eq ptr %115, null
  br i1 %.not290, label %116, label %117

116:                                              ; preds = %112
  tail call void @LogAssertFailure(i64 noundef 129, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ApplyTermUpdate, ptr noundef nonnull @.str.17)
  tail call void @__assert_fail(ptr noundef nonnull @.str.18, ptr noundef nonnull @.str, i32 noundef 129, ptr noundef nonnull @__PRETTY_FUNCTION__.ApplyTermUpdate) #10
  unreachable

117:                                              ; preds = %112
  %118 = tail call noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell13GetTermUpdateEv(ptr noundef nonnull align 8 dereferenceable(112) %18)
  %119 = tail call noundef i32 @_ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE(ptr noundef nonnull align 8 dereferenceable(72) %118, ptr noundef nonnull %60)
  %.not291 = icmp eq i32 %119, 0
  br i1 %.not291, label %120, label %.critedge323

120:                                              ; preds = %117
  %121 = tail call noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell13GetTermUpdateEv(ptr noundef nonnull align 8 dereferenceable(112) %18)
  %.not292 = icmp eq ptr %121, null
  br i1 %.not292, label %122, label %123

122:                                              ; preds = %120
  tail call void @LogAssertFailure(i64 noundef 136, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ApplyTermUpdate, ptr noundef nonnull @.str.3)
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str, i32 noundef 136, ptr noundef nonnull @__PRETTY_FUNCTION__.ApplyTermUpdate) #10
  unreachable

123:                                              ; preds = %120
  %124 = tail call noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell13GetTermUpdateEv(ptr noundef nonnull align 8 dereferenceable(112) %18)
  %125 = tail call noundef ptr @_ZN14NAMESPACE_MAIN6Tensor22GetTensorScoresPointerEv(ptr noundef nonnull align 8 dereferenceable(72) %124)
  %.not293 = icmp eq ptr %125, null
  br i1 %.not293, label %126, label %127

126:                                              ; preds = %123
  tail call void @LogAssertFailure(i64 noundef 138, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ApplyTermUpdate, ptr noundef nonnull @.str.5)
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str, i32 noundef 138, ptr noundef nonnull @__PRETTY_FUNCTION__.ApplyTermUpdate) #10
  unreachable

127:                                              ; preds = %123
  %128 = tail call noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore15GetCurrentModelEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %129 = getelementptr inbounds ptr, ptr %128, i64 %21
  %130 = load ptr, ptr %129, align 8, !tbaa !12
  tail call void @_ZN14NAMESPACE_MAIN6Tensor33AddExpandedWithBadValueProtectionEPKd(ptr noundef nonnull align 8 dereferenceable(72) %130, ptr noundef nonnull %125)
  br label %131

131:                                              ; preds = %46, %127
  %.0226 = phi i64 [ %87, %127 ], [ 1, %46 ]
  %.0225 = phi ptr [ %60, %127 ], [ null, %46 ]
  %.0224 = phi ptr [ %125, %127 ], [ %48, %46 ]
  %132 = getelementptr inbounds i8, ptr %3, i64 8
  %133 = getelementptr inbounds i8, ptr %3, i64 48
  %134 = getelementptr inbounds i8, ptr %3, i64 12
  %135 = getelementptr inbounds i8, ptr %3, i64 20
  %136 = getelementptr inbounds i8, ptr %3, i64 16
  %137 = getelementptr inbounds i8, ptr %3, i64 24
  %138 = getelementptr inbounds i8, ptr %3, i64 32
  %139 = getelementptr inbounds i8, ptr %3, i64 40
  %140 = getelementptr inbounds i8, ptr %3, i64 56
  %141 = getelementptr inbounds i8, ptr %3, i64 64
  %142 = getelementptr inbounds i8, ptr %3, i64 72
  %143 = getelementptr inbounds i8, ptr %3, i64 80
  %144 = getelementptr inbounds i8, ptr %3, i64 88
  %145 = getelementptr inbounds i8, ptr %4, i64 8
  %146 = getelementptr inbounds i8, ptr %4, i64 48
  %147 = getelementptr inbounds i8, ptr %4, i64 12
  %148 = getelementptr inbounds i8, ptr %4, i64 20
  %149 = getelementptr inbounds i8, ptr %4, i64 16
  %150 = getelementptr inbounds i8, ptr %4, i64 24
  %151 = getelementptr inbounds i8, ptr %4, i64 32
  %152 = getelementptr inbounds i8, ptr %4, i64 40
  %153 = getelementptr inbounds i8, ptr %4, i64 56
  %154 = getelementptr inbounds i8, ptr %4, i64 64
  %155 = getelementptr inbounds i8, ptr %4, i64 72
  %156 = getelementptr inbounds i8, ptr %4, i64 80
  %157 = getelementptr inbounds i8, ptr %4, i64 88
  %158 = shl i64 %.0226, 3
  br label %159

159:                                              ; preds = %253, %131
  %.0247 = phi i1 [ false, %131 ], [ true, %253 ]
  %.not312 = phi i1 [ true, %131 ], [ false, %253 ]
  %.0245 = phi i64 [ 8, %131 ], [ 4, %253 ]
  %.0236 = phi double [ 0.000000e+00, %131 ], [ %.5241, %253 ]
  %160 = call noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore14GetTrainingSetEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %161 = call noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSamplesEv(ptr noundef nonnull align 8 dereferenceable(40) %160)
  %.not296 = icmp eq i64 %161, 0
  br i1 %.not296, label %.thread, label %162

162:                                              ; preds = %159
  %163 = call noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore14GetTrainingSetEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %164 = call noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSubsetsEv(ptr noundef nonnull align 8 dereferenceable(40) %163)
  %.not297 = icmp eq i64 %164, 0
  br i1 %.not297, label %165, label %166

165:                                              ; preds = %162
  call void @LogAssertFailure(i64 noundef 167, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ApplyTermUpdate, ptr noundef nonnull @.str.19)
  call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str, i32 noundef 167, ptr noundef nonnull @__PRETTY_FUNCTION__.ApplyTermUpdate) #10
  unreachable

166:                                              ; preds = %162
  %167 = call noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore14GetTrainingSetEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %168 = call noundef ptr @_ZN14NAMESPACE_MAIN15DataSetBoosting10GetSubsetsEv(ptr noundef nonnull align 8 dereferenceable(40) %167)
  %.not298 = icmp eq ptr %168, null
  br i1 %.not298, label %169, label %170

169:                                              ; preds = %166
  call void @LogAssertFailure(i64 noundef 170, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ApplyTermUpdate, ptr noundef nonnull @.str.21)
  call void @__assert_fail(ptr noundef nonnull @.str.22, ptr noundef nonnull @.str, i32 noundef 170, ptr noundef nonnull @__PRETTY_FUNCTION__.ApplyTermUpdate) #10
  unreachable

170:                                              ; preds = %166
  %171 = call noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore14GetTrainingSetEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %172 = call noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSubsetsEv(ptr noundef nonnull align 8 dereferenceable(40) %171)
  %173 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSubsetBoosting", ptr %168, i64 %172
  br label %174

174:                                              ; preds = %199, %170
  %.1248 = phi i1 [ %.0247, %170 ], [ %.2249, %199 ]
  %.0246 = phi ptr [ %168, %170 ], [ %200, %199 ]
  %175 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting19GetObjectiveWrapperEv(ptr noundef nonnull align 8 dereferenceable(56) %.0246)
  %176 = getelementptr inbounds i8, ptr %175, i64 128
  %177 = load i64, ptr %176, align 8, !tbaa !14
  %.not299 = icmp eq i64 %177, %.0245
  br i1 %.not299, label %178, label %199

178:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %3) #9
  store i32 0, ptr %132, align 8, !tbaa !17
  store ptr null, ptr %133, align 8, !tbaa !19
  br i1 %31, label %188, label %179

179:                                              ; preds = %178
  %180 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting11GetTermDataEm(ptr noundef nonnull align 8 dereferenceable(56) %.0246, i64 noundef %21)
  store ptr %180, ptr %133, align 8, !tbaa !19
  %181 = call noundef i32 @_ZNK14NAMESPACE_MAIN4Term18GetBitsRequiredMinEv(ptr noundef nonnull align 8 dereferenceable(776) %.0225) #9
  %.not301 = icmp eq i32 %181, 0
  br i1 %.not301, label %188, label %182

182:                                              ; preds = %179
  %183 = call noundef i32 @_ZNK14NAMESPACE_MAIN4Term18GetBitsRequiredMinEv(ptr noundef nonnull align 8 dereferenceable(776) %.0225) #9
  %184 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting19GetObjectiveWrapperEv(ptr noundef nonnull align 8 dereferenceable(56) %.0246)
  %185 = getelementptr inbounds i8, ptr %184, i64 136
  %186 = load i64, ptr %185, align 8, !tbaa !20
  %187 = call noundef i32 @_ZN14NAMESPACE_MAINL22GetCountItemsBitPackedEim(i32 noundef %183, i64 noundef %186) #9
  store i32 %187, ptr %132, align 8, !tbaa !17
  br label %188

188:                                              ; preds = %179, %182, %178
  %189 = call noundef i64 @_ZNK14NAMESPACE_MAIN11BoosterCore14GetCountScoresEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  store i64 %189, ptr %3, align 8, !tbaa !21
  %190 = call noundef zeroext i1 @_ZN14NAMESPACE_MAIN11BoosterCore9IsHessianEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %191 = zext i1 %190 to i32
  store i32 %191, ptr %134, align 4, !tbaa !22
  %192 = call noundef i32 @_ZNK14NAMESPACE_MAIN11BoosterCore11IsUseApproxEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  store i32 %192, ptr %135, align 4, !tbaa !23
  store i32 0, ptr %136, align 8, !tbaa !24
  %193 = call noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell23GetMulticlassMidwayTempEv(ptr noundef nonnull align 8 dereferenceable(112) %18)
  store ptr %193, ptr %137, align 8, !tbaa !25
  store ptr %.0224, ptr %138, align 8, !tbaa !26
  %194 = call noundef i64 @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting15GetCountSamplesEv(ptr noundef nonnull align 8 dereferenceable(56) %.0246)
  store i64 %194, ptr %139, align 8, !tbaa !27
  %195 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting13GetTargetDataEv(ptr noundef nonnull align 8 dereferenceable(56) %.0246)
  store ptr %195, ptr %140, align 8, !tbaa !28
  store ptr null, ptr %141, align 8, !tbaa !29
  %196 = call noundef ptr @_ZN14NAMESPACE_MAIN18DataSubsetBoosting15GetSampleScoresEv(ptr noundef nonnull align 8 dereferenceable(56) %.0246)
  store ptr %196, ptr %142, align 8, !tbaa !30
  %197 = call noundef ptr @_ZN14NAMESPACE_MAIN18DataSubsetBoosting11GetGradHessEv(ptr noundef nonnull align 8 dereferenceable(56) %.0246)
  store ptr %197, ptr %143, align 8, !tbaa !31
  store double 0.000000e+00, ptr %144, align 8, !tbaa !32
  %198 = call noundef i32 @_ZN14NAMESPACE_MAIN18DataSubsetBoosting20ObjectiveApplyUpdateEP17ApplyUpdateBridge(ptr noundef nonnull align 8 dereferenceable(56) %.0246, ptr noundef nonnull %3)
  %.not302 = icmp eq i32 %198, 0
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %3) #9
  br i1 %.not302, label %199, label %.critedge323

199:                                              ; preds = %174, %188
  %.2249 = phi i1 [ %.1248, %188 ], [ true, %174 ]
  %200 = getelementptr inbounds i8, ptr %.0246, i64 56
  %.not303 = icmp eq ptr %173, %200
  br i1 %.not303, label %.thread, label %174, !llvm.loop !33

.thread:                                          ; preds = %199, %159
  %.4251 = phi i1 [ %.0247, %159 ], [ %.2249, %199 ]
  %201 = call noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore16GetValidationSetEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %202 = call noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSamplesEv(ptr noundef nonnull align 8 dereferenceable(40) %201)
  %.not304 = icmp eq i64 %202, 0
  br i1 %.not304, label %.thread331, label %203

203:                                              ; preds = %.thread
  %204 = call noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore16GetValidationSetEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %205 = call noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSubsetsEv(ptr noundef nonnull align 8 dereferenceable(40) %204)
  %.not305 = icmp eq i64 %205, 0
  br i1 %.not305, label %206, label %207

206:                                              ; preds = %203
  call void @LogAssertFailure(i64 noundef 210, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ApplyTermUpdate, ptr noundef nonnull @.str.23)
  call void @__assert_fail(ptr noundef nonnull @.str.24, ptr noundef nonnull @.str, i32 noundef 210, ptr noundef nonnull @__PRETTY_FUNCTION__.ApplyTermUpdate) #10
  unreachable

207:                                              ; preds = %203
  %208 = call noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore16GetValidationSetEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %209 = call noundef ptr @_ZN14NAMESPACE_MAIN15DataSetBoosting10GetSubsetsEv(ptr noundef nonnull align 8 dereferenceable(40) %208)
  %.not306 = icmp eq ptr %209, null
  br i1 %.not306, label %210, label %211

210:                                              ; preds = %207
  call void @LogAssertFailure(i64 noundef 213, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ApplyTermUpdate, ptr noundef nonnull @.str.21)
  call void @__assert_fail(ptr noundef nonnull @.str.22, ptr noundef nonnull @.str, i32 noundef 213, ptr noundef nonnull @__PRETTY_FUNCTION__.ApplyTermUpdate) #10
  unreachable

211:                                              ; preds = %207
  %212 = call noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore16GetValidationSetEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %213 = call noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSubsetsEv(ptr noundef nonnull align 8 dereferenceable(40) %212)
  %214 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSubsetBoosting", ptr %209, i64 %213
  br label %215

215:                                              ; preds = %242, %211
  %.5252 = phi i1 [ %.4251, %211 ], [ %.6253, %242 ]
  %.0244 = phi ptr [ %209, %211 ], [ %243, %242 ]
  %.1237 = phi double [ %.0236, %211 ], [ %.3239, %242 ]
  %216 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting19GetObjectiveWrapperEv(ptr noundef nonnull align 8 dereferenceable(56) %.0244)
  %217 = getelementptr inbounds i8, ptr %216, i64 128
  %218 = load i64, ptr %217, align 8, !tbaa !14
  %.not307 = icmp eq i64 %218, %.0245
  br i1 %.not307, label %219, label %242

219:                                              ; preds = %215
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %4) #9
  store i32 0, ptr %145, align 8, !tbaa !17
  store ptr null, ptr %146, align 8, !tbaa !19
  br i1 %31, label %229, label %220

220:                                              ; preds = %219
  %221 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting11GetTermDataEm(ptr noundef nonnull align 8 dereferenceable(56) %.0244, i64 noundef %21)
  store ptr %221, ptr %146, align 8, !tbaa !19
  %222 = call noundef i32 @_ZNK14NAMESPACE_MAIN4Term18GetBitsRequiredMinEv(ptr noundef nonnull align 8 dereferenceable(776) %.0225) #9
  %.not309 = icmp eq i32 %222, 0
  br i1 %.not309, label %229, label %223

223:                                              ; preds = %220
  %224 = call noundef i32 @_ZNK14NAMESPACE_MAIN4Term18GetBitsRequiredMinEv(ptr noundef nonnull align 8 dereferenceable(776) %.0225) #9
  %225 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting19GetObjectiveWrapperEv(ptr noundef nonnull align 8 dereferenceable(56) %.0244)
  %226 = getelementptr inbounds i8, ptr %225, i64 136
  %227 = load i64, ptr %226, align 8, !tbaa !20
  %228 = call noundef i32 @_ZN14NAMESPACE_MAINL22GetCountItemsBitPackedEim(i32 noundef %224, i64 noundef %227) #9
  store i32 %228, ptr %145, align 8, !tbaa !17
  br label %229

229:                                              ; preds = %220, %223, %219
  %230 = call noundef i64 @_ZNK14NAMESPACE_MAIN11BoosterCore14GetCountScoresEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  store i64 %230, ptr %4, align 8, !tbaa !21
  store i32 0, ptr %147, align 4, !tbaa !22
  %231 = call noundef i32 @_ZNK14NAMESPACE_MAIN11BoosterCore11IsUseApproxEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  store i32 %231, ptr %148, align 4, !tbaa !23
  store i32 1, ptr %149, align 8, !tbaa !24
  %232 = call noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell23GetMulticlassMidwayTempEv(ptr noundef nonnull align 8 dereferenceable(112) %18)
  store ptr %232, ptr %150, align 8, !tbaa !25
  store ptr %.0224, ptr %151, align 8, !tbaa !26
  %233 = call noundef i64 @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting15GetCountSamplesEv(ptr noundef nonnull align 8 dereferenceable(56) %.0244)
  store i64 %233, ptr %152, align 8, !tbaa !27
  %234 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting13GetTargetDataEv(ptr noundef nonnull align 8 dereferenceable(56) %.0244)
  store ptr %234, ptr %153, align 8, !tbaa !28
  %235 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting17GetSubsetInnerBagEm(ptr noundef nonnull align 8 dereferenceable(56) %.0244, i64 noundef 0)
  %236 = call noundef ptr @_ZNK14NAMESPACE_MAIN14SubsetInnerBag10GetWeightsEv(ptr noundef nonnull align 8 dereferenceable(8) %235)
  store ptr %236, ptr %154, align 8, !tbaa !29
  %237 = call noundef ptr @_ZN14NAMESPACE_MAIN18DataSubsetBoosting15GetSampleScoresEv(ptr noundef nonnull align 8 dereferenceable(56) %.0244)
  store ptr %237, ptr %155, align 8, !tbaa !30
  %238 = call noundef ptr @_ZN14NAMESPACE_MAIN18DataSubsetBoosting11GetGradHessEv(ptr noundef nonnull align 8 dereferenceable(56) %.0244)
  store ptr %238, ptr %156, align 8, !tbaa !31
  store double 0.000000e+00, ptr %157, align 8, !tbaa !32
  %239 = call noundef i32 @_ZN14NAMESPACE_MAIN18DataSubsetBoosting20ObjectiveApplyUpdateEP17ApplyUpdateBridge(ptr noundef nonnull align 8 dereferenceable(56) %.0244, ptr noundef nonnull %4)
  %.not310 = icmp eq i32 %239, 0
  %240 = load double, ptr %157, align 8
  %241 = fadd double %.1237, %240
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %4) #9
  br i1 %.not310, label %242, label %.critedge323

242:                                              ; preds = %215, %229
  %.6253 = phi i1 [ %.5252, %229 ], [ true, %215 ]
  %.3239 = phi double [ %241, %229 ], [ %.1237, %215 ]
  %243 = getelementptr inbounds i8, ptr %.0244, i64 56
  %.not311 = icmp eq ptr %214, %243
  br i1 %.not311, label %.thread331, label %215, !llvm.loop !35

.thread331:                                       ; preds = %242, %.thread
  %.8255 = phi i1 [ %.4251, %.thread ], [ %.6253, %242 ]
  %.5241 = phi double [ %.0236, %.thread ], [ %.3239, %242 ]
  %or.cond.not = and i1 %.not312, %.8255
  br i1 %or.cond.not, label %244, label %254

244:                                              ; preds = %.thread331
  %245 = call noundef i64 @_ZNK14NAMESPACE_MAIN11BoosterCore14GetCountScoresEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %246 = mul i64 %158, %245
  %247 = call noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIvEEPT_S2_m(ptr noundef nonnull %.0224, i64 noundef %246) #9
  br label %248

248:                                              ; preds = %248, %244
  %.0235 = phi ptr [ %.0224, %244 ], [ %252, %248 ]
  %.0234 = phi ptr [ %.0224, %244 ], [ %251, %248 ]
  %249 = load double, ptr %.0234, align 8, !tbaa !10
  %250 = fptrunc double %249 to float
  store float %250, ptr %.0235, align 4, !tbaa !36
  %251 = call noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIvEEPT_S2_m(ptr noundef nonnull %.0234, i64 noundef 8) #9
  %252 = call noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIvEEPT_S2_m(ptr noundef nonnull %.0235, i64 noundef 4) #9
  %.not = icmp eq ptr %247, %251
  br i1 %.not, label %253, label %248, !llvm.loop !38

253:                                              ; preds = %248
  br label %159, !llvm.loop !39

254:                                              ; preds = %.thread331
  %255 = call noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore16GetValidationSetEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %256 = call noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSamplesEv(ptr noundef nonnull align 8 dereferenceable(40) %255)
  %.not313 = icmp eq i64 %256, 0
  br i1 %.not313, label %278, label %257

257:                                              ; preds = %254
  %258 = call noundef double @_ZN14NAMESPACE_MAIN11BoosterCore12FinishMetricEd(ptr noundef nonnull align 8 dereferenceable(520) %28, double noundef %.5241)
  %259 = call noundef i32 @_ZN14NAMESPACE_MAIN11BoosterCore14MaximizeMetricEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %.not314 = icmp eq i32 %259, 0
  %260 = fneg double %258
  %.6242 = select i1 %.not314, double %258, double %260
  %261 = call noundef zeroext i1 @_ZSt5isnand(double noundef %.6242)
  br i1 %261, label %262, label %263

262:                                              ; preds = %257
  call void @LogAssertFailure(i64 noundef 307, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ApplyTermUpdate, ptr noundef nonnull @.str.27)
  call void @__assert_fail(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str, i32 noundef 307, ptr noundef nonnull @__PRETTY_FUNCTION__.ApplyTermUpdate) #10
  unreachable

263:                                              ; preds = %257
  %264 = call noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore16GetValidationSetEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %265 = call noundef double @_ZNK14NAMESPACE_MAIN15DataSetBoosting17GetBagWeightTotalEm(ptr noundef nonnull align 8 dereferenceable(40) %264, i64 noundef 0)
  %266 = call noundef zeroext i1 @_ZSt5isnand(double noundef %265)
  br i1 %266, label %267, label %268

267:                                              ; preds = %263
  call void @LogAssertFailure(i64 noundef 311, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ApplyTermUpdate, ptr noundef nonnull @.str.29)
  call void @__assert_fail(ptr noundef nonnull @.str.30, ptr noundef nonnull @.str, i32 noundef 311, ptr noundef nonnull @__PRETTY_FUNCTION__.ApplyTermUpdate) #10
  unreachable

268:                                              ; preds = %263
  %269 = call noundef zeroext i1 @_ZSt5isinfd(double noundef %265)
  br i1 %269, label %270, label %271

270:                                              ; preds = %268
  call void @LogAssertFailure(i64 noundef 312, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ApplyTermUpdate, ptr noundef nonnull @.str.31)
  call void @__assert_fail(ptr noundef nonnull @.str.32, ptr noundef nonnull @.str, i32 noundef 312, ptr noundef nonnull @__PRETTY_FUNCTION__.ApplyTermUpdate) #10
  unreachable

271:                                              ; preds = %268
  %272 = fcmp ogt double %265, 0.000000e+00
  br i1 %272, label %274, label %273

273:                                              ; preds = %271
  call void @LogAssertFailure(i64 noundef 313, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ApplyTermUpdate, ptr noundef nonnull @.str.33)
  call void @__assert_fail(ptr noundef nonnull @.str.34, ptr noundef nonnull @.str, i32 noundef 313, ptr noundef nonnull @__PRETTY_FUNCTION__.ApplyTermUpdate) #10
  unreachable

274:                                              ; preds = %271
  %275 = fdiv double %.6242, %265
  %276 = call noundef zeroext i1 @_ZSt5isnand(double noundef %275)
  br i1 %276, label %277, label %278

277:                                              ; preds = %274
  call void @LogAssertFailure(i64 noundef 316, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ApplyTermUpdate, ptr noundef nonnull @.str.27)
  call void @__assert_fail(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str, i32 noundef 316, ptr noundef nonnull @__PRETTY_FUNCTION__.ApplyTermUpdate) #10
  unreachable

278:                                              ; preds = %274, %254
  %.7243 = phi double [ %.5241, %254 ], [ %275, %274 ]
  %279 = call noundef double @_ZNK14NAMESPACE_MAIN11BoosterCore18GetBestModelMetricEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %280 = fcmp ugt double %.7243, %279
  br i1 %280, label %.loopexit, label %281, !prof !9

281:                                              ; preds = %278
  call void @_ZN14NAMESPACE_MAIN11BoosterCore18SetBestModelMetricEd(ptr noundef nonnull align 8 dereferenceable(520) %28, double noundef %.7243)
  br i1 %31, label %.loopexit, label %282

282:                                              ; preds = %281
  %283 = call noundef i64 @_ZNK14NAMESPACE_MAIN11BoosterCore13GetCountTermsEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  br label %284

284:                                              ; preds = %308, %282
  %.0229 = phi i64 [ 0, %282 ], [ %309, %308 ]
  %285 = call noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore15GetCurrentModelEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %286 = getelementptr inbounds ptr, ptr %285, i64 %.0229
  %287 = load ptr, ptr %286, align 8, !tbaa !12
  %.not316 = icmp eq ptr %287, null
  %288 = call noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore12GetBestModelEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %289 = getelementptr inbounds ptr, ptr %288, i64 %.0229
  %290 = load ptr, ptr %289, align 8, !tbaa !12
  %291 = icmp eq ptr %290, null
  br i1 %.not316, label %306, label %292

292:                                              ; preds = %284
  br i1 %291, label %293, label %294

293:                                              ; preds = %292
  call void @LogAssertFailure(i64 noundef 343, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ApplyTermUpdate, ptr noundef nonnull @.str.35)
  call void @__assert_fail(ptr noundef nonnull @.str.36, ptr noundef nonnull @.str, i32 noundef 343, ptr noundef nonnull @__PRETTY_FUNCTION__.ApplyTermUpdate) #10
  unreachable

294:                                              ; preds = %292
  %295 = call noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore12GetBestModelEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %296 = getelementptr inbounds ptr, ptr %295, i64 %.0229
  %297 = load ptr, ptr %296, align 8, !tbaa !12
  %298 = call noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore15GetCurrentModelEv(ptr noundef nonnull align 8 dereferenceable(520) %28)
  %299 = getelementptr inbounds ptr, ptr %298, i64 %.0229
  %300 = load ptr, ptr %299, align 8, !tbaa !12
  %301 = call noundef i32 @_ZN14NAMESPACE_MAIN6Tensor4CopyERKS0_(ptr noundef nonnull align 8 dereferenceable(72) %297, ptr noundef nonnull align 8 dereferenceable(72) %300)
  %.not318 = icmp eq i32 %301, 0
  br i1 %.not318, label %308, label %302

302:                                              ; preds = %294
  %303 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %304 = icmp sgt i32 %303, 3
  br i1 %304, label %305, label %.critedge323

305:                                              ; preds = %302
  call void @InteralLogWithoutArguments(i32 noundef 4, ptr noundef nonnull @_ZZ15ApplyTermUpdateE13LOG__sMessage_6)
  br label %.critedge323

306:                                              ; preds = %284
  br i1 %291, label %308, label %307

307:                                              ; preds = %306
  call void @LogAssertFailure(i64 noundef 350, ptr noundef nonnull @.str, ptr noundef nonnull @__func__.ApplyTermUpdate, ptr noundef nonnull @.str.37)
  call void @__assert_fail(ptr noundef nonnull @.str.38, ptr noundef nonnull @.str, i32 noundef 350, ptr noundef nonnull @__PRETTY_FUNCTION__.ApplyTermUpdate) #10
  unreachable

308:                                              ; preds = %306, %294
  %309 = add i64 %.0229, 1
  %.not319 = icmp eq i64 %309, %283
  br i1 %.not319, label %.loopexit, label %284, !llvm.loop !40

.loopexit:                                        ; preds = %308, %281, %278
  br i1 %.not284, label %311, label %310

310:                                              ; preds = %.loopexit
  store double %.7243, ptr %1, align 8, !tbaa !10
  br label %311

311:                                              ; preds = %310, %.loopexit
  %312 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %313 = icmp sgt i32 %312, 2
  br i1 %31, label %314, label %316

314:                                              ; preds = %311
  br i1 %313, label %315, label %.critedge323

315:                                              ; preds = %314
  call void (i32, ptr, ...) @InteralLogWithArguments(i32 noundef 3, ptr noundef nonnull @_ZZ15ApplyTermUpdateE13LOG__sMessage_7, double noundef %.7243)
  br label %.critedge323

316:                                              ; preds = %311
  br i1 %313, label %317, label %.critedge323

317:                                              ; preds = %316
  %318 = icmp eq i32 %312, 3
  br i1 %318, label %319, label %325

319:                                              ; preds = %317
  %320 = call noundef ptr @_ZN14NAMESPACE_MAIN4Term45GetPointerCountLogExitApplyTermUpdateMessagesEv(ptr noundef nonnull align 8 dereferenceable(776) %.0225) #9
  %321 = load i32, ptr %320, align 4, !tbaa !5
  %322 = icmp sgt i32 %321, 0
  br i1 %322, label %323, label %.critedge323

323:                                              ; preds = %319
  %324 = add nsw i32 %321, -1
  store i32 %324, ptr %320, align 4, !tbaa !5
  br label %325

325:                                              ; preds = %323, %317
  %.1211 = phi i32 [ 3, %323 ], [ 4, %317 ]
  call void (i32, ptr, ...) @InteralLogWithArguments(i32 noundef %.1211, ptr noundef nonnull @_ZZ15ApplyTermUpdateE13LOG__sMessage_8, double noundef %.7243)
  br label %.critedge323

.critedge323:                                     ; preds = %188, %229, %302, %305, %26, %23, %316, %319, %325, %314, %315, %117, %89, %94, %100, %74, %79, %85, %39, %42, %17
  %.15 = phi i32 [ -3, %17 ], [ -3, %26 ], [ -3, %23 ], [ 0, %42 ], [ 0, %39 ], [ 0, %85 ], [ 0, %79 ], [ 0, %74 ], [ 0, %100 ], [ 0, %94 ], [ 0, %89 ], [ %119, %117 ], [ 0, %316 ], [ 0, %319 ], [ 0, %325 ], [ 0, %314 ], [ 0, %315 ], [ %301, %305 ], [ %301, %302 ], [ %239, %229 ], [ %198, %188 ]
  ret i32 %.15
}

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

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

declare void @InteralLogWithArguments(i32 noundef, ptr noundef, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNSt14numeric_limitsIdE8infinityEv() local_unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell25GetBoosterShellFromHandleEP14_BoosterHandle(ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN14NAMESPACE_MAIN12BoosterShell12GetTermIndexEv(ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #5 align 2

declare void @InteralLogWithoutArguments(i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell14GetBoosterCoreEv(ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #4 align 2

declare void @LogAssertFailure(i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN14NAMESPACE_MAIN12BoosterShell12SetTermIndexEm(ptr noundef nonnull align 8 dereferenceable(112), i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK14NAMESPACE_MAIN11BoosterCore14GetCountScoresEv(ptr noundef nonnull align 8 dereferenceable(520)) local_unnamed_addr #7 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell13GetTermUpdateEv(ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN6Tensor22GetTensorScoresPointerEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK14NAMESPACE_MAIN11BoosterCore13GetCountTermsEv(ptr noundef nonnull align 8 dereferenceable(520)) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore8GetTermsEv(ptr noundef nonnull align 8 dereferenceable(520)) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN4Term46GetPointerCountLogEnterApplyTermUpdateMessagesEv(ptr noundef nonnull align 8 dereferenceable(776)) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN4Term45GetPointerCountLogExitApplyTermUpdateMessagesEv(ptr noundef nonnull align 8 dereferenceable(776)) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK14NAMESPACE_MAIN4Term18GetCountTensorBinsEv(ptr noundef nonnull align 8 dereferenceable(776)) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore15GetCurrentModelEv(ptr noundef nonnull align 8 dereferenceable(520)) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK14NAMESPACE_MAIN11BoosterCore12GetBestModelEv(ptr noundef nonnull align 8 dereferenceable(520)) local_unnamed_addr #7 align 2

declare noundef i32 @_ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef) local_unnamed_addr #2

declare void @_ZN14NAMESPACE_MAIN6Tensor33AddExpandedWithBadValueProtectionEPKd(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore14GetTrainingSetEv(ptr noundef nonnull align 8 dereferenceable(520)) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSamplesEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSubsetsEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN15DataSetBoosting10GetSubsetsEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #8 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting19GetObjectiveWrapperEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #8 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting11GetTermDataEm(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef) local_unnamed_addr #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK14NAMESPACE_MAIN4Term18GetBitsRequiredMinEv(ptr noundef nonnull align 8 dereferenceable(776)) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN14NAMESPACE_MAINL22GetCountItemsBitPackedEim(i32 noundef, i64 noundef) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN14NAMESPACE_MAIN11BoosterCore9IsHessianEv(ptr noundef nonnull align 8 dereferenceable(520)) local_unnamed_addr #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK14NAMESPACE_MAIN11BoosterCore11IsUseApproxEv(ptr noundef nonnull align 8 dereferenceable(520)) local_unnamed_addr #7 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN12BoosterShell23GetMulticlassMidwayTempEv(ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting15GetCountSamplesEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting13GetTargetDataEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN18DataSubsetBoosting15GetSampleScoresEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN18DataSubsetBoosting11GetGradHessEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN14NAMESPACE_MAIN18DataSubsetBoosting20ObjectiveApplyUpdateEP17ApplyUpdateBridge(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef) local_unnamed_addr #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN11BoosterCore16GetValidationSetEv(ptr noundef nonnull align 8 dereferenceable(520)) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting17GetSubsetInnerBagEm(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef) local_unnamed_addr #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK14NAMESPACE_MAIN14SubsetInnerBag10GetWeightsEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIvEEPT_S2_m(ptr noundef, i64 noundef) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZN14NAMESPACE_MAIN11BoosterCore12FinishMetricEd(ptr noundef nonnull align 8 dereferenceable(520), double noundef) local_unnamed_addr #8 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN14NAMESPACE_MAIN11BoosterCore14MaximizeMetricEv(ptr noundef nonnull align 8 dereferenceable(520)) local_unnamed_addr #8 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt5isnand(double noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK14NAMESPACE_MAIN15DataSetBoosting17GetBagWeightTotalEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #8 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt5isinfd(double noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK14NAMESPACE_MAIN11BoosterCore18GetBestModelMetricEv(ptr noundef nonnull align 8 dereferenceable(520)) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN14NAMESPACE_MAIN11BoosterCore18SetBestModelMetricEd(ptr noundef nonnull align 8 dereferenceable(520), double noundef) local_unnamed_addr #7 align 2

declare noundef i32 @_ZN14NAMESPACE_MAIN6Tensor4CopyERKS0_(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { alwaysinline 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 = { alwaysinline 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 #6 = { noreturn 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 #7 = { 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 #8 = { 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 #9 = { nounwind }
attributes #10 = { noreturn 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!15, !16, i64 128}
!15 = !{!"_ZTS16ObjectiveWrapper", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !6, i64 32, !6, i64 36, !6, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !6, i64 112, !16, i64 120, !16, i64 128, !16, i64 136, !6, i64 144, !13, i64 152}
!16 = !{!"long", !7, i64 0}
!17 = !{!18, !6, i64 8}
!18 = !{!"_ZTS17ApplyUpdateBridge", !16, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !13, i64 24, !13, i64 32, !16, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !13, i64 80, !11, i64 88}
!19 = !{!18, !13, i64 48}
!20 = !{!15, !16, i64 136}
!21 = !{!18, !16, i64 0}
!22 = !{!18, !6, i64 12}
!23 = !{!18, !6, i64 20}
!24 = !{!18, !6, i64 16}
!25 = !{!18, !13, i64 24}
!26 = !{!18, !13, i64 32}
!27 = !{!18, !16, i64 40}
!28 = !{!18, !13, i64 56}
!29 = !{!18, !13, i64 64}
!30 = !{!18, !13, i64 72}
!31 = !{!18, !13, i64 80}
!32 = !{!18, !11, i64 88}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = distinct !{!35, !34}
!36 = !{!37, !37, i64 0}
!37 = !{!"float", !7, i64 0}
!38 = distinct !{!38, !34}
!39 = distinct !{!39, !34}
!40 = distinct !{!40, !34}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopSimplifyPass,LoopUnrollPass,LowerExpectIntrinsicPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass