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

; 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.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
@_ZZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingEE13LOG__sMessage = external hidden constant [51 x i8], align 16
@.str = external hidden unnamed_addr constant [104 x i8], align 1
@__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE = external hidden unnamed_addr constant [43 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE = external hidden unnamed_addr constant [186 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [20 x i8], align 1
@_ZZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingEE13LOG__sMessage_0 = external hidden constant [50 x i8], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE(ptr noundef %0, double noundef %1, i8 noundef signext %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #0 {
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  %9 = alloca i8, align 1
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i8, align 1
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i8, align 1
  %22 = alloca double, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i64, align 8
  %26 = alloca i8, align 1
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store double %1, ptr %8, align 8, !tbaa !9
  store i8 %2, ptr %9, align 1, !tbaa !11
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  br label %30

30:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 3, ptr %13, align 4, !tbaa !12
  %31 = load i32, ptr @g_traceLevel, align 4, !tbaa !12
  %32 = icmp sle i32 3, %31
  br i1 %32, label %33, label %34

33:                                               ; preds = %30
  call void @InteralLogWithoutArguments(i32 noundef 3, ptr noundef @_ZZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingEE13LOG__sMessage)
  br label %34

34:                                               ; preds = %33, %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %35

35:                                               ; preds = %34
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = icmp ne ptr null, %36
  br i1 %37, label %40, label %38

38:                                               ; preds = %35
  call void @LogAssertFailure(i64 noundef 40, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef @.str.1)
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str, i32 noundef 40, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #7
  unreachable

39:                                               ; No predecessors!
  br label %40

40:                                               ; preds = %39, %35
  %41 = phi i1 [ true, %35 ], [ false, %39 ]
  %42 = load i8, ptr %9, align 1, !tbaa !11
  %43 = sext i8 %42 to i32
  %44 = icmp eq i32 -1, %43
  br i1 %44, label %51, label %45

45:                                               ; preds = %40
  %46 = load i8, ptr %9, align 1, !tbaa !11
  %47 = sext i8 %46 to i32
  %48 = icmp eq i32 1, %47
  br i1 %48, label %51, label %49

49:                                               ; preds = %45
  call void @LogAssertFailure(i64 noundef 41, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef @.str.3)
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str, i32 noundef 41, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #7
  unreachable

50:                                               ; No predecessors!
  br label %51

51:                                               ; preds = %50, %45, %40
  %52 = phi i1 [ true, %45 ], [ true, %40 ], [ false, %50 ]
  %53 = load ptr, ptr %12, align 8, !tbaa !5
  %54 = icmp ne ptr null, %53
  br i1 %54, label %57, label %55

55:                                               ; preds = %51
  call void @LogAssertFailure(i64 noundef 42, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef @.str.5)
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str, i32 noundef 42, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #7
  unreachable

56:                                               ; No predecessors!
  br label %57

57:                                               ; preds = %56, %51
  %58 = phi i1 [ true, %51 ], [ false, %56 ]
  %59 = load ptr, ptr %12, align 8, !tbaa !5
  %60 = call noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSamplesEv(ptr noundef nonnull align 8 dereferenceable(40) %59)
  %61 = icmp ne i64 0, %60
  br i1 %61, label %62, label %249

62:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = call noundef ptr @_ZN14NAMESPACE_MAIN22GetDataSetSharedTargetEPKhmPl(ptr noundef %63, i64 noundef 0, ptr noundef %14)
  store ptr %64, ptr %15, align 8, !tbaa !5
  %65 = load ptr, ptr %15, align 8, !tbaa !5
  %66 = icmp ne ptr null, %65
  br i1 %66, label %69, label %67

67:                                               ; preds = %62
  call void @LogAssertFailure(i64 noundef 48, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef @.str.7)
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str, i32 noundef 48, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #7
  unreachable

68:                                               ; No predecessors!
  br label %69

69:                                               ; preds = %68, %62
  %70 = phi i1 [ true, %62 ], [ false, %68 ]
  %71 = load i64, ptr %14, align 8, !tbaa !14
  %72 = icmp eq i64 -2, %71
  br i1 %72, label %75, label %73

73:                                               ; preds = %69
  call void @LogAssertFailure(i64 noundef 49, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef @.str.9)
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str, i32 noundef 49, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #7
  unreachable

74:                                               ; No predecessors!
  br label %75

75:                                               ; preds = %74, %69
  %76 = phi i1 [ true, %69 ], [ false, %74 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %77, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %78 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %78, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #6
  %79 = load i8, ptr %9, align 1, !tbaa !11
  %80 = sext i8 %79 to i32
  %81 = icmp slt i32 %80, 0
  %82 = zext i1 %81 to i8
  store i8 %82, ptr %18, align 1, !tbaa !16
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  %84 = icmp ne ptr null, %83
  br i1 %84, label %90, label %85

85:                                               ; preds = %75
  %86 = load i8, ptr %18, align 1, !tbaa !16, !range !18, !noundef !19
  %87 = trunc i8 %86 to i1
  br i1 %87, label %88, label %90

88:                                               ; preds = %85
  call void @LogAssertFailure(i64 noundef 56, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef @.str.11)
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str, i32 noundef 56, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #7
  unreachable

89:                                               ; No predecessors!
  br label %90

90:                                               ; preds = %89, %85, %75
  %91 = phi i1 [ true, %85 ], [ true, %75 ], [ false, %89 ]
  %92 = load ptr, ptr %12, align 8, !tbaa !5
  %93 = call noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSubsetsEv(ptr noundef nonnull align 8 dereferenceable(40) %92)
  %94 = icmp ule i64 1, %93
  br i1 %94, label %97, label %95

95:                                               ; preds = %90
  call void @LogAssertFailure(i64 noundef 58, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef @.str.13)
  call void @__assert_fail(ptr noundef @.str.14, ptr noundef @.str, i32 noundef 58, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #7
  unreachable

96:                                               ; No predecessors!
  br label %97

97:                                               ; preds = %96, %90
  %98 = phi i1 [ true, %90 ], [ false, %96 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %99 = load ptr, ptr %12, align 8, !tbaa !5
  %100 = call noundef ptr @_ZN14NAMESPACE_MAIN15DataSetBoosting10GetSubsetsEv(ptr noundef nonnull align 8 dereferenceable(40) %99)
  store ptr %100, ptr %19, align 8, !tbaa !5
  %101 = load ptr, ptr %19, align 8, !tbaa !5
  %102 = icmp ne ptr null, %101
  br i1 %102, label %105, label %103

103:                                              ; preds = %97
  call void @LogAssertFailure(i64 noundef 60, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef @.str.15)
  call void @__assert_fail(ptr noundef @.str.16, ptr noundef @.str, i32 noundef 60, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #7
  unreachable

104:                                              ; No predecessors!
  br label %105

105:                                              ; preds = %104, %97
  %106 = phi i1 [ true, %97 ], [ false, %104 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %107 = load ptr, ptr %19, align 8, !tbaa !5
  %108 = load ptr, ptr %12, align 8, !tbaa !5
  %109 = call noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSubsetsEv(ptr noundef nonnull align 8 dereferenceable(40) %108)
  %110 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSubsetBoosting", ptr %107, i64 %109
  store ptr %110, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #6
  store i8 0, ptr %21, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  br label %111

111:                                              ; preds = %237, %105
  %112 = load ptr, ptr %19, align 8, !tbaa !5
  %113 = call noundef i64 @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting15GetCountSamplesEv(ptr noundef nonnull align 8 dereferenceable(56) %112)
  %114 = icmp ule i64 1, %113
  br i1 %114, label %117, label %115

115:                                              ; preds = %111
  call void @LogAssertFailure(i64 noundef 66, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef @.str.17)
  call void @__assert_fail(ptr noundef @.str.18, ptr noundef @.str, i32 noundef 66, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #7
  unreachable

116:                                              ; No predecessors!
  br label %117

117:                                              ; preds = %116, %111
  %118 = phi i1 [ true, %111 ], [ false, %116 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %119 = load ptr, ptr %19, align 8, !tbaa !5
  %120 = call noundef ptr @_ZN14NAMESPACE_MAIN18DataSubsetBoosting11GetGradHessEv(ptr noundef nonnull align 8 dereferenceable(56) %119)
  store ptr %120, ptr %23, align 8, !tbaa !5
  %121 = load ptr, ptr %23, align 8, !tbaa !5
  %122 = icmp ne ptr null, %121
  br i1 %122, label %125, label %123

123:                                              ; preds = %117
  call void @LogAssertFailure(i64 noundef 68, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef @.str.19)
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str, i32 noundef 68, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #7
  unreachable

124:                                              ; No predecessors!
  br label %125

125:                                              ; preds = %124, %117
  %126 = phi i1 [ true, %117 ], [ false, %124 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %127 = load ptr, ptr %23, align 8, !tbaa !5
  %128 = load ptr, ptr %19, align 8, !tbaa !5
  %129 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting19GetObjectiveWrapperEv(ptr noundef nonnull align 8 dereferenceable(56) %128)
  %130 = getelementptr inbounds %struct.ObjectiveWrapper, ptr %129, i32 0, i32 17
  %131 = load i64, ptr %130, align 8, !tbaa !20
  %132 = load ptr, ptr %19, align 8, !tbaa !5
  %133 = call noundef i64 @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting15GetCountSamplesEv(ptr noundef nonnull align 8 dereferenceable(56) %132)
  %134 = mul i64 %131, %133
  %135 = call noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIvEEPT_S2_m(ptr noundef %127, i64 noundef %134) #6
  store ptr %135, ptr %24, align 8, !tbaa !5
  br label %136

136:                                              ; preds = %230, %125
  %137 = load i8, ptr %21, align 1, !tbaa !11
  %138 = sext i8 %137 to i32
  %139 = icmp eq i32 0, %138
  br i1 %139, label %140, label %195

140:                                              ; preds = %136
  store i8 1, ptr %21, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  store i64 1, ptr %25, align 8, !tbaa !14
  %141 = load ptr, ptr %16, align 8, !tbaa !5
  %142 = icmp ne ptr null, %141
  br i1 %142, label %143, label %174

143:                                              ; preds = %140
  store i64 0, ptr %25, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #6
  br label %144

144:                                              ; preds = %163, %143
  br label %145

145:                                              ; preds = %152, %144
  %146 = load ptr, ptr %16, align 8, !tbaa !5
  %147 = load i8, ptr %146, align 1, !tbaa !11
  store i8 %147, ptr %21, align 1, !tbaa !11
  %148 = load ptr, ptr %16, align 8, !tbaa !5
  %149 = getelementptr inbounds i8, ptr %148, i32 1
  store ptr %149, ptr %16, align 8, !tbaa !5
  %150 = load ptr, ptr %15, align 8, !tbaa !5
  %151 = getelementptr inbounds double, ptr %150, i32 1
  store ptr %151, ptr %15, align 8, !tbaa !5
  br label %152

152:                                              ; preds = %145
  %153 = load i8, ptr %21, align 1, !tbaa !11
  %154 = sext i8 %153 to i32
  %155 = icmp eq i32 0, %154
  br i1 %155, label %145, label %156, !llvm.loop !22

156:                                              ; preds = %152
  %157 = load i8, ptr %21, align 1, !tbaa !11
  %158 = sext i8 %157 to i32
  %159 = icmp slt i32 %158, 0
  %160 = zext i1 %159 to i8
  store i8 %160, ptr %26, align 1, !tbaa !16
  %161 = load i64, ptr %25, align 8, !tbaa !14
  %162 = add i64 %161, 1
  store i64 %162, ptr %25, align 8, !tbaa !14
  br label %163

163:                                              ; preds = %156
  %164 = load i8, ptr %18, align 1, !tbaa !16, !range !18, !noundef !19
  %165 = trunc i8 %164 to i1
  %166 = zext i1 %165 to i32
  %167 = load i8, ptr %26, align 1, !tbaa !16, !range !18, !noundef !19
  %168 = trunc i8 %167 to i1
  %169 = zext i1 %168 to i32
  %170 = icmp ne i32 %166, %169
  br i1 %170, label %144, label %171, !llvm.loop !24

171:                                              ; preds = %163
  %172 = load ptr, ptr %15, align 8, !tbaa !5
  %173 = getelementptr inbounds double, ptr %172, i32 -1
  store ptr %173, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #6
  br label %174

174:                                              ; preds = %171, %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %175 = load ptr, ptr %15, align 8, !tbaa !5
  %176 = load double, ptr %175, align 8, !tbaa !9
  store double %176, ptr %27, align 8, !tbaa !9
  %177 = load ptr, ptr %15, align 8, !tbaa !5
  %178 = getelementptr inbounds double, ptr %177, i32 1
  store ptr %178, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %179 = load double, ptr %8, align 8, !tbaa !9
  store double %179, ptr %28, align 8, !tbaa !9
  %180 = load ptr, ptr %17, align 8, !tbaa !5
  %181 = icmp ne ptr null, %180
  br i1 %181, label %182, label %191

182:                                              ; preds = %174
  %183 = load i64, ptr %25, align 8, !tbaa !14
  %184 = load ptr, ptr %17, align 8, !tbaa !5
  %185 = getelementptr inbounds double, ptr %184, i64 %183
  store ptr %185, ptr %17, align 8, !tbaa !5
  %186 = load ptr, ptr %17, align 8, !tbaa !5
  %187 = getelementptr inbounds double, ptr %186, i64 -1
  %188 = load double, ptr %187, align 8, !tbaa !9
  %189 = load double, ptr %28, align 8, !tbaa !9
  %190 = fadd double %189, %188
  store double %190, ptr %28, align 8, !tbaa !9
  br label %191

191:                                              ; preds = %182, %174
  %192 = load double, ptr %28, align 8, !tbaa !9
  %193 = load double, ptr %27, align 8, !tbaa !9
  %194 = fsub double %192, %193
  store double %194, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  br label %195

195:                                              ; preds = %191, %136
  %196 = load ptr, ptr %19, align 8, !tbaa !5
  %197 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting19GetObjectiveWrapperEv(ptr noundef nonnull align 8 dereferenceable(56) %196)
  %198 = getelementptr inbounds %struct.ObjectiveWrapper, ptr %197, i32 0, i32 17
  %199 = load i64, ptr %198, align 8, !tbaa !20
  %200 = icmp eq i64 8, %199
  br i1 %200, label %201, label %204

201:                                              ; preds = %195
  %202 = load double, ptr %22, align 8, !tbaa !9
  %203 = load ptr, ptr %23, align 8, !tbaa !5
  store double %202, ptr %203, align 8, !tbaa !9
  br label %217

204:                                              ; preds = %195
  %205 = load ptr, ptr %19, align 8, !tbaa !5
  %206 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting19GetObjectiveWrapperEv(ptr noundef nonnull align 8 dereferenceable(56) %205)
  %207 = getelementptr inbounds %struct.ObjectiveWrapper, ptr %206, i32 0, i32 17
  %208 = load i64, ptr %207, align 8, !tbaa !20
  %209 = icmp eq i64 4, %208
  br i1 %209, label %212, label %210

210:                                              ; preds = %204
  call void @LogAssertFailure(i64 noundef 120, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef @.str.21)
  call void @__assert_fail(ptr noundef @.str.22, ptr noundef @.str, i32 noundef 120, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #7
  unreachable

211:                                              ; No predecessors!
  br label %212

212:                                              ; preds = %211, %204
  %213 = phi i1 [ true, %204 ], [ false, %211 ]
  %214 = load double, ptr %22, align 8, !tbaa !9
  %215 = fptrunc double %214 to float
  %216 = load ptr, ptr %23, align 8, !tbaa !5
  store float %215, ptr %216, align 4, !tbaa !25
  br label %217

217:                                              ; preds = %212, %201
  %218 = load ptr, ptr %23, align 8, !tbaa !5
  %219 = load ptr, ptr %19, align 8, !tbaa !5
  %220 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting19GetObjectiveWrapperEv(ptr noundef nonnull align 8 dereferenceable(56) %219)
  %221 = getelementptr inbounds %struct.ObjectiveWrapper, ptr %220, i32 0, i32 17
  %222 = load i64, ptr %221, align 8, !tbaa !20
  %223 = call noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIvEEPT_S2_m(ptr noundef %218, i64 noundef %222) #6
  store ptr %223, ptr %23, align 8, !tbaa !5
  %224 = load i8, ptr %9, align 1, !tbaa !11
  %225 = sext i8 %224 to i32
  %226 = load i8, ptr %21, align 1, !tbaa !11
  %227 = sext i8 %226 to i32
  %228 = sub nsw i32 %227, %225
  %229 = trunc i32 %228 to i8
  store i8 %229, ptr %21, align 1, !tbaa !11
  br label %230

230:                                              ; preds = %217
  %231 = load ptr, ptr %24, align 8, !tbaa !5
  %232 = load ptr, ptr %23, align 8, !tbaa !5
  %233 = icmp ne ptr %231, %232
  br i1 %233, label %136, label %234, !llvm.loop !27

234:                                              ; preds = %230
  %235 = load ptr, ptr %19, align 8, !tbaa !5
  %236 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSubsetBoosting", ptr %235, i32 1
  store ptr %236, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %237

237:                                              ; preds = %234
  %238 = load ptr, ptr %20, align 8, !tbaa !5
  %239 = load ptr, ptr %19, align 8, !tbaa !5
  %240 = icmp ne ptr %238, %239
  br i1 %240, label %111, label %241, !llvm.loop !28

241:                                              ; preds = %237
  %242 = load i8, ptr %21, align 1, !tbaa !11
  %243 = sext i8 %242 to i32
  %244 = icmp eq i32 0, %243
  br i1 %244, label %247, label %245

245:                                              ; preds = %241
  call void @LogAssertFailure(i64 noundef 130, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef @.str.23)
  call void @__assert_fail(ptr noundef @.str.24, ptr noundef @.str, i32 noundef 130, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #7
  unreachable

246:                                              ; No predecessors!
  br label %247

247:                                              ; preds = %246, %241
  %248 = phi i1 [ true, %241 ], [ false, %246 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %249

249:                                              ; preds = %247, %57
  br label %250

250:                                              ; preds = %249
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  store i32 3, ptr %29, align 4, !tbaa !12
  %251 = load i32, ptr @g_traceLevel, align 4, !tbaa !12
  %252 = icmp sle i32 3, %251
  br i1 %252, label %253, label %254

253:                                              ; preds = %250
  call void @InteralLogWithoutArguments(i32 noundef 3, ptr noundef @_ZZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingEE13LOG__sMessage_0)
  br label %254

254:                                              ; preds = %253, %250
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %255

255:                                              ; preds = %254
  ret void
}

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

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

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

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) #3

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

declare noundef ptr @_ZN14NAMESPACE_MAIN22GetDataSetSharedTargetEPKhmPl(ptr noundef, i64 noundef, ptr noundef) #2

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting19GetObjectiveWrapperEv(ptr noundef nonnull align 8 dereferenceable(56)) #5 align 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 = { 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 #4 = { 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 #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { 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 = !{!"double", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!21, !15, i64 128}
!21 = !{!"_ZTS16ObjectiveWrapper", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !13, i64 32, !13, i64 36, !13, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !13, i64 112, !15, i64 120, !15, i64 128, !15, i64 136, !13, i64 144, !6, i64 152}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = !{!26, !26, i64 0}
!26 = !{!"float", !7, i64 0}
!27 = distinct !{!27, !23}
!28 = distinct !{!28, !23}


; 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.NAMESPACE_MAIN::DataSubsetBoosting" = type { i64, ptr, ptr, ptr, ptr, ptr, ptr }

@g_traceLevel = external local_unnamed_addr global i32, align 4
@_ZZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingEE13LOG__sMessage = external hidden constant [51 x i8], align 16
@.str = external hidden unnamed_addr constant [104 x i8], align 1
@__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE = external hidden unnamed_addr constant [43 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE = external hidden unnamed_addr constant [186 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [20 x i8], align 1
@_ZZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingEE13LOG__sMessage_0 = external hidden constant [50 x i8], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE(ptr noundef %0, double noundef %1, i8 noundef signext %2, ptr noundef readonly %3, ptr noundef readonly %4, ptr noundef %5) local_unnamed_addr #0 {
  %7 = alloca i64, align 8
  %8 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %9 = icmp sgt i32 %8, 2
  br i1 %9, label %10, label %11

10:                                               ; preds = %6
  tail call void @InteralLogWithoutArguments(i32 noundef 3, ptr noundef nonnull @_ZZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingEE13LOG__sMessage)
  br label %11

11:                                               ; preds = %10, %6
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %12, label %13

12:                                               ; preds = %11
  tail call void @LogAssertFailure(i64 noundef 40, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef nonnull @.str.1)
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str, i32 noundef 40, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #6
  unreachable

13:                                               ; preds = %11
  switch i8 %2, label %14 [
    i8 -1, label %15
    i8 1, label %15
  ]

14:                                               ; preds = %13
  tail call void @LogAssertFailure(i64 noundef 41, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef nonnull @.str.3)
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str, i32 noundef 41, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #6
  unreachable

15:                                               ; preds = %13, %13
  %.not91 = icmp eq ptr %5, null
  br i1 %.not91, label %16, label %17

16:                                               ; preds = %15
  tail call void @LogAssertFailure(i64 noundef 42, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef nonnull @.str.5)
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str, i32 noundef 42, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #6
  unreachable

17:                                               ; preds = %15
  %18 = tail call noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSamplesEv(ptr noundef nonnull align 8 dereferenceable(40) %5)
  %.not92 = icmp eq i64 %18, 0
  br i1 %.not92, label %96, label %19

19:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %20 = call noundef ptr @_ZN14NAMESPACE_MAIN22GetDataSetSharedTargetEPKhmPl(ptr noundef nonnull %0, i64 noundef 0, ptr noundef nonnull %7)
  %.not93 = icmp eq ptr %20, null
  br i1 %.not93, label %21, label %22

21:                                               ; preds = %19
  call void @LogAssertFailure(i64 noundef 48, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef nonnull @.str.7)
  call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str, i32 noundef 48, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #6
  unreachable

22:                                               ; preds = %19
  %23 = load i64, ptr %7, align 8, !tbaa !9
  %24 = icmp eq i64 %23, -2
  br i1 %24, label %26, label %25

25:                                               ; preds = %22
  call void @LogAssertFailure(i64 noundef 49, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef nonnull @.str.9)
  call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str, i32 noundef 49, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #6
  unreachable

26:                                               ; preds = %22
  %.not94 = icmp eq ptr %3, null
  %27 = icmp slt i8 %2, 0
  %or.cond = and i1 %27, %.not94
  br i1 %or.cond, label %28, label %29

28:                                               ; preds = %26
  call void @LogAssertFailure(i64 noundef 56, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef nonnull @.str.11)
  call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str, i32 noundef 56, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #6
  unreachable

29:                                               ; preds = %26
  %30 = call noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSubsetsEv(ptr noundef nonnull align 8 dereferenceable(40) %5)
  %.not95 = icmp eq i64 %30, 0
  br i1 %.not95, label %31, label %32

31:                                               ; preds = %29
  call void @LogAssertFailure(i64 noundef 58, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef nonnull @.str.13)
  call void @__assert_fail(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str, i32 noundef 58, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #6
  unreachable

32:                                               ; preds = %29
  %33 = call noundef ptr @_ZN14NAMESPACE_MAIN15DataSetBoosting10GetSubsetsEv(ptr noundef nonnull align 8 dereferenceable(40) %5)
  %.not96 = icmp eq ptr %33, null
  br i1 %.not96, label %34, label %35

34:                                               ; preds = %32
  call void @LogAssertFailure(i64 noundef 60, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef nonnull @.str.15)
  call void @__assert_fail(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str, i32 noundef 60, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #6
  unreachable

35:                                               ; preds = %32
  %36 = call noundef i64 @_ZNK14NAMESPACE_MAIN15DataSetBoosting15GetCountSubsetsEv(ptr noundef nonnull align 8 dereferenceable(40) %5)
  %37 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSubsetBoosting", ptr %33, i64 %36
  br label %38

38:                                               ; preds = %90, %35
  %.079 = phi i8 [ 0, %35 ], [ %89, %90 ]
  %.076 = phi double [ undef, %35 ], [ %.278, %90 ]
  %.074 = phi ptr [ %33, %35 ], [ %91, %90 ]
  %.068 = phi ptr [ %4, %35 ], [ %.371, %90 ]
  %.062 = phi ptr [ %3, %35 ], [ %.567, %90 ]
  %.0 = phi ptr [ %20, %35 ], [ %.5, %90 ]
  %39 = call noundef i64 @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting15GetCountSamplesEv(ptr noundef nonnull align 8 dereferenceable(56) %.074)
  %.not97 = icmp eq i64 %39, 0
  br i1 %.not97, label %40, label %41

40:                                               ; preds = %38
  call void @LogAssertFailure(i64 noundef 66, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef nonnull @.str.17)
  call void @__assert_fail(ptr noundef nonnull @.str.18, ptr noundef nonnull @.str, i32 noundef 66, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #6
  unreachable

41:                                               ; preds = %38
  %42 = call noundef ptr @_ZN14NAMESPACE_MAIN18DataSubsetBoosting11GetGradHessEv(ptr noundef nonnull align 8 dereferenceable(56) %.074)
  %.not98 = icmp eq ptr %42, null
  br i1 %.not98, label %43, label %44

43:                                               ; preds = %41
  call void @LogAssertFailure(i64 noundef 68, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef nonnull @.str.19)
  call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str, i32 noundef 68, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #6
  unreachable

44:                                               ; preds = %41
  %45 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting19GetObjectiveWrapperEv(ptr noundef nonnull align 8 dereferenceable(56) %.074)
  %46 = getelementptr inbounds i8, ptr %45, i64 128
  %47 = load i64, ptr %46, align 8, !tbaa !11
  %48 = call noundef i64 @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting15GetCountSamplesEv(ptr noundef nonnull align 8 dereferenceable(56) %.074)
  %49 = mul i64 %48, %47
  %50 = call noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIvEEPT_S2_m(ptr noundef nonnull %42, i64 noundef %49) #7
  br label %51

51:                                               ; preds = %84, %44
  %.180 = phi i8 [ %.079, %44 ], [ %89, %84 ]
  %.177 = phi double [ %.076, %44 ], [ %.278, %84 ]
  %.075 = phi ptr [ %42, %44 ], [ %88, %84 ]
  %.169 = phi ptr [ %.068, %44 ], [ %.371, %84 ]
  %.163 = phi ptr [ %.062, %44 ], [ %.567, %84 ]
  %.1 = phi ptr [ %.0, %44 ], [ %.5, %84 ]
  %52 = icmp eq i8 %.180, 0
  br i1 %52, label %53, label %70

53:                                               ; preds = %51
  %.not99 = icmp eq ptr %.163, null
  br i1 %.not99, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %53, %59
  %.072 = phi i64 [ %60, %59 ], [ 0, %53 ]
  %.264 = phi ptr [ %56, %59 ], [ %.163, %53 ]
  %.2 = phi ptr [ %57, %59 ], [ %.1, %53 ]
  br label %54

54:                                               ; preds = %54, %.preheader
  %.365 = phi ptr [ %.264, %.preheader ], [ %56, %54 ]
  %.3 = phi ptr [ %.2, %.preheader ], [ %57, %54 ]
  %55 = load i8, ptr %.365, align 1, !tbaa !15
  %56 = getelementptr inbounds i8, ptr %.365, i64 1
  %57 = getelementptr inbounds i8, ptr %.3, i64 8
  %58 = icmp eq i8 %55, 0
  br i1 %58, label %54, label %59, !llvm.loop !16

59:                                               ; preds = %54
  %60 = add i64 %.072, 1
  %.not101.unshifted = xor i8 %55, %2
  %.not101 = icmp sgt i8 %.not101.unshifted, -1
  br i1 %.not101, label %.loopexit, label %.preheader, !llvm.loop !18

.loopexit:                                        ; preds = %59, %53
  %.281 = phi i8 [ 1, %53 ], [ %55, %59 ]
  %.173 = phi i64 [ 1, %53 ], [ %60, %59 ]
  %.466 = phi ptr [ null, %53 ], [ %56, %59 ]
  %.4 = phi ptr [ %.1, %53 ], [ %.3, %59 ]
  %61 = load double, ptr %.4, align 8, !tbaa !19
  %62 = getelementptr inbounds i8, ptr %.4, i64 8
  %.not102 = icmp eq ptr %.169, null
  br i1 %.not102, label %68, label %63

63:                                               ; preds = %.loopexit
  %64 = getelementptr inbounds double, ptr %.169, i64 %.173
  %65 = getelementptr inbounds i8, ptr %64, i64 -8
  %66 = load double, ptr %65, align 8, !tbaa !19
  %67 = fadd double %66, %1
  br label %68

68:                                               ; preds = %63, %.loopexit
  %.270 = phi ptr [ %64, %63 ], [ null, %.loopexit ]
  %.061 = phi double [ %67, %63 ], [ %1, %.loopexit ]
  %69 = fsub double %.061, %61
  br label %70

70:                                               ; preds = %68, %51
  %.382 = phi i8 [ %.281, %68 ], [ %.180, %51 ]
  %.278 = phi double [ %69, %68 ], [ %.177, %51 ]
  %.371 = phi ptr [ %.270, %68 ], [ %.169, %51 ]
  %.567 = phi ptr [ %.466, %68 ], [ %.163, %51 ]
  %.5 = phi ptr [ %62, %68 ], [ %.1, %51 ]
  %71 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting19GetObjectiveWrapperEv(ptr noundef nonnull align 8 dereferenceable(56) %.074)
  %72 = getelementptr inbounds i8, ptr %71, i64 128
  %73 = load i64, ptr %72, align 8, !tbaa !11
  %74 = icmp eq i64 %73, 8
  br i1 %74, label %75, label %76

75:                                               ; preds = %70
  store double %.278, ptr %.075, align 8, !tbaa !19
  br label %84

76:                                               ; preds = %70
  %77 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting19GetObjectiveWrapperEv(ptr noundef nonnull align 8 dereferenceable(56) %.074)
  %78 = getelementptr inbounds i8, ptr %77, i64 128
  %79 = load i64, ptr %78, align 8, !tbaa !11
  %80 = icmp eq i64 %79, 4
  br i1 %80, label %82, label %81

81:                                               ; preds = %76
  call void @LogAssertFailure(i64 noundef 120, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef nonnull @.str.21)
  call void @__assert_fail(ptr noundef nonnull @.str.22, ptr noundef nonnull @.str, i32 noundef 120, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #6
  unreachable

82:                                               ; preds = %76
  %83 = fptrunc double %.278 to float
  store float %83, ptr %.075, align 4, !tbaa !20
  br label %84

84:                                               ; preds = %82, %75
  %85 = call noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting19GetObjectiveWrapperEv(ptr noundef nonnull align 8 dereferenceable(56) %.074)
  %86 = getelementptr inbounds i8, ptr %85, i64 128
  %87 = load i64, ptr %86, align 8, !tbaa !11
  %88 = call noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIvEEPT_S2_m(ptr noundef nonnull %.075, i64 noundef %87) #7
  %89 = sub i8 %.382, %2
  %.not103 = icmp eq ptr %50, %88
  br i1 %.not103, label %90, label %51, !llvm.loop !22

90:                                               ; preds = %84
  %91 = getelementptr inbounds i8, ptr %.074, i64 56
  %.not104 = icmp eq ptr %37, %91
  br i1 %.not104, label %92, label %38, !llvm.loop !23

92:                                               ; preds = %90
  %93 = icmp eq i8 %89, 0
  br i1 %93, label %95, label %94

94:                                               ; preds = %92
  call void @LogAssertFailure(i64 noundef 130, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE, ptr noundef nonnull @.str.23)
  call void @__assert_fail(ptr noundef nonnull @.str.24, ptr noundef nonnull @.str, i32 noundef 130, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingE) #6
  unreachable

95:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %96

96:                                               ; preds = %17, %95
  %97 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %98 = icmp sgt i32 %97, 2
  br i1 %98, label %99, label %100

99:                                               ; preds = %96
  call void @InteralLogWithoutArguments(i32 noundef 3, ptr noundef nonnull @_ZZN14NAMESPACE_MAIN42InitializeRmseGradientsAndHessiansBoostingEPKhdaPKaPKdPNS_15DataSetBoostingEE13LOG__sMessage_0)
  br label %100

100:                                              ; preds = %99, %96
  ret void
}

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

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

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

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

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

declare noundef ptr @_ZN14NAMESPACE_MAIN22GetDataSetSharedTargetEPKhmPl(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN15DataSetBoosting10GetSubsetsEv(ptr noundef nonnull align 8 dereferenceable(40)) 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 #4 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 #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK14NAMESPACE_MAIN18DataSubsetBoosting19GetObjectiveWrapperEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #5 align 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 = { 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 #4 = { 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 #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { noreturn nounwind }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 128}
!12 = !{!"_ZTS16ObjectiveWrapper", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !6, i64 32, !6, i64 36, !6, i64 40, !14, i64 48, !14, i64 56, !14, i64 64, !14, i64 72, !14, i64 80, !14, i64 88, !14, i64 96, !14, i64 104, !6, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !6, i64 144, !13, i64 152}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = !{!14, !14, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"float", !7, i64 0}
!22 = distinct !{!22, !17}
!23 = distinct !{!23, !17}


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