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

; 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::DataSetInteraction" = type { i64, i64, ptr, double }
%"struct.NAMESPACE_MAIN::DataSubsetInteraction" = type { i64, 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
@.str = external hidden unnamed_addr constant [92 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.9 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [20 x i8], align 1
@_ZZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKaE13LOG__sMessage = external hidden constant [40 x i8], align 16
@__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa = external hidden unnamed_addr constant [12 x i8], align 1
@__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa = external hidden unnamed_addr constant [106 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [26 x i8], align 1
@_ZZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKaE13LOG__sMessage_0 = external hidden constant [110 x i8], align 16
@_ZZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKaE13LOG__sMessage_1 = external hidden constant [61 x i8], align 16
@.str.67 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.70 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.71 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.73 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.75 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.77 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.79 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.80 = external hidden unnamed_addr constant [53 x i8], align 1
@_ZZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKaE13LOG__sMessage_2 = external hidden constant [64 x i8], align 16
@_ZZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKaE13LOG__sMessage_3 = external hidden constant [39 x i8], align 16

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef, i64 noundef) #3

declare ptr @AlignedAlloc(i64 noundef) #1

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

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

27:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 3, ptr %8, align 4, !tbaa !9
  %28 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  %29 = icmp sle i32 3, %28
  br i1 %29, label %30, label %31

30:                                               ; preds = %27
  call void @InteralLogWithoutArguments(i32 noundef 3, ptr noundef @_ZZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKaE13LOG__sMessage)
  br label %31

31:                                               ; preds = %30, %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %32

32:                                               ; preds = %31
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = icmp ne ptr null, %33
  br i1 %34, label %37, label %35

35:                                               ; preds = %32
  call void @LogAssertFailure(i64 noundef 285, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef @.str.9)
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str, i32 noundef 285, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #7
  unreachable

36:                                               ; No predecessors!
  br label %37

37:                                               ; preds = %36, %32
  %38 = phi i1 [ true, %32 ], [ false, %36 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = call noundef ptr @_ZN14NAMESPACE_MAIN22GetDataSetSharedWeightEPKhm(ptr noundef %39, i64 noundef 0)
  store ptr %40, ptr %9, align 8, !tbaa !5
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = icmp ne ptr null, %41
  br i1 %42, label %45, label %43

43:                                               ; preds = %37
  call void @LogAssertFailure(i64 noundef 288, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef @.str.65)
  call void @__assert_fail(ptr noundef @.str.66, ptr noundef @.str, i32 noundef 288, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #7
  unreachable

44:                                               ; No predecessors!
  br label %45

45:                                               ; preds = %44, %37
  %46 = phi i1 [ true, %37 ], [ false, %44 ]
  %47 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSetInteraction", ptr %26, i32 0, i32 2
  %48 = load ptr, ptr %47, align 8, !tbaa !11
  %49 = icmp ne ptr null, %48
  br i1 %49, label %52, label %50

50:                                               ; preds = %45
  call void @LogAssertFailure(i64 noundef 290, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef @.str.13)
  call void @__assert_fail(ptr noundef @.str.14, ptr noundef @.str, i32 noundef 290, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #7
  unreachable

51:                                               ; No predecessors!
  br label %52

52:                                               ; preds = %51, %45
  %53 = phi i1 [ true, %45 ], [ false, %51 ]
  %54 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSetInteraction", ptr %26, i32 0, i32 1
  %55 = load i64, ptr %54, align 8, !tbaa !15
  %56 = icmp ule i64 1, %55
  br i1 %56, label %59, label %57

57:                                               ; preds = %52
  call void @LogAssertFailure(i64 noundef 291, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef @.str.15)
  call void @__assert_fail(ptr noundef @.str.16, ptr noundef @.str, i32 noundef 291, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #7
  unreachable

58:                                               ; No predecessors!
  br label %59

59:                                               ; preds = %58, %52
  %60 = phi i1 [ true, %52 ], [ false, %58 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %61 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSetInteraction", ptr %26, i32 0, i32 2
  %62 = load ptr, ptr %61, align 8, !tbaa !11
  store ptr %62, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %63 = load ptr, ptr %10, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSetInteraction", ptr %26, i32 0, i32 1
  %65 = load i64, ptr %64, align 8, !tbaa !15
  %66 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSubsetInteraction", ptr %63, i64 %65
  store ptr %66, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %67, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store double 0.000000e+00, ptr %13, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #6
  store i8 0, ptr %14, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  br label %68

68:                                               ; preds = %226, %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSubsetInteraction", ptr %69, i32 0, i32 0
  %71 = load i64, ptr %70, align 8, !tbaa !18
  store i64 %71, ptr %16, align 8, !tbaa !20
  %72 = load i64, ptr %16, align 8, !tbaa !20
  %73 = icmp ule i64 1, %72
  br i1 %73, label %76, label %74

74:                                               ; preds = %68
  call void @LogAssertFailure(i64 noundef 303, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef @.str.5)
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str, i32 noundef 303, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #7
  unreachable

75:                                               ; No predecessors!
  br label %76

76:                                               ; preds = %75, %68
  %77 = phi i1 [ true, %68 ], [ false, %75 ]
  %78 = load ptr, ptr %10, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSubsetInteraction", ptr %78, i32 0, i32 1
  %80 = load ptr, ptr %79, align 8, !tbaa !21
  %81 = getelementptr inbounds %struct.ObjectiveWrapper, ptr %80, i32 0, i32 17
  %82 = load i64, ptr %81, align 8, !tbaa !22
  %83 = load i64, ptr %16, align 8, !tbaa !20
  %84 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef %82, i64 noundef %83) #6
  br i1 %84, label %85, label %93

85:                                               ; preds = %76
  br label %86

86:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 2, ptr %17, align 4, !tbaa !9
  %87 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  %88 = icmp sle i32 2, %87
  br i1 %88, label %89, label %90

89:                                               ; preds = %86
  call void @InteralLogWithoutArguments(i32 noundef 2, ptr noundef @_ZZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKaE13LOG__sMessage_0)
  br label %90

90:                                               ; preds = %89, %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %91

91:                                               ; preds = %90
  br label %92

92:                                               ; preds = %91
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %18, align 4
  br label %223

93:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %94 = load ptr, ptr %10, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSubsetInteraction", ptr %94, i32 0, i32 1
  %96 = load ptr, ptr %95, align 8, !tbaa !21
  %97 = getelementptr inbounds %struct.ObjectiveWrapper, ptr %96, i32 0, i32 17
  %98 = load i64, ptr %97, align 8, !tbaa !22
  %99 = load i64, ptr %16, align 8, !tbaa !20
  %100 = mul i64 %98, %99
  store i64 %100, ptr %19, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %101 = load i64, ptr %19, align 8, !tbaa !20
  %102 = call ptr @AlignedAlloc(i64 noundef %101)
  store ptr %102, ptr %20, align 8, !tbaa !5
  %103 = load ptr, ptr %20, align 8, !tbaa !5
  %104 = icmp eq ptr null, %103
  br i1 %104, label %105, label %113

105:                                              ; preds = %93
  br label %106

106:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 2, ptr %21, align 4, !tbaa !9
  %107 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  %108 = icmp sle i32 2, %107
  br i1 %108, label %109, label %110

109:                                              ; preds = %106
  call void @InteralLogWithoutArguments(i32 noundef 2, ptr noundef @_ZZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKaE13LOG__sMessage_1)
  br label %110

110:                                              ; preds = %109, %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %111

111:                                              ; preds = %110
  br label %112

112:                                              ; preds = %111
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %18, align 4
  br label %222

113:                                              ; preds = %93
  %114 = load ptr, ptr %20, align 8, !tbaa !5
  %115 = load ptr, ptr %10, align 8, !tbaa !5
  %116 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSubsetInteraction", ptr %115, i32 0, i32 4
  store ptr %114, ptr %116, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %117 = load ptr, ptr %20, align 8, !tbaa !5
  %118 = load i64, ptr %19, align 8, !tbaa !20
  %119 = call noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIvEEPT_S2_m(ptr noundef %117, i64 noundef %118) #6
  store ptr %119, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  store double 0.000000e+00, ptr %23, align 8, !tbaa !16
  br label %120

120:                                              ; preds = %212, %113
  %121 = load i8, ptr %14, align 1, !tbaa !17
  %122 = sext i8 %121 to i32
  %123 = icmp eq i32 0, %122
  br i1 %123, label %124, label %175

124:                                              ; preds = %120
  store i8 1, ptr %14, align 1, !tbaa !17
  %125 = load ptr, ptr %12, align 8, !tbaa !5
  %126 = icmp ne ptr null, %125
  br i1 %126, label %127, label %142

127:                                              ; preds = %124
  br label %128

128:                                              ; preds = %135, %127
  %129 = load ptr, ptr %12, align 8, !tbaa !5
  %130 = load i8, ptr %129, align 1, !tbaa !17
  store i8 %130, ptr %14, align 1, !tbaa !17
  %131 = load ptr, ptr %12, align 8, !tbaa !5
  %132 = getelementptr inbounds i8, ptr %131, i32 1
  store ptr %132, ptr %12, align 8, !tbaa !5
  %133 = load ptr, ptr %9, align 8, !tbaa !5
  %134 = getelementptr inbounds double, ptr %133, i32 1
  store ptr %134, ptr %9, align 8, !tbaa !5
  br label %135

135:                                              ; preds = %128
  %136 = load i8, ptr %14, align 1, !tbaa !17
  %137 = sext i8 %136 to i32
  %138 = icmp sle i32 %137, 0
  br i1 %138, label %128, label %139, !llvm.loop !25

139:                                              ; preds = %135
  %140 = load ptr, ptr %9, align 8, !tbaa !5
  %141 = getelementptr inbounds double, ptr %140, i32 -1
  store ptr %141, ptr %9, align 8, !tbaa !5
  br label %142

142:                                              ; preds = %139, %124
  %143 = load ptr, ptr %9, align 8, !tbaa !5
  %144 = load double, ptr %143, align 8, !tbaa !16
  store double %144, ptr %15, align 8, !tbaa !16
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = getelementptr inbounds double, ptr %145, i32 1
  store ptr %146, ptr %9, align 8, !tbaa !5
  %147 = load double, ptr %15, align 8, !tbaa !16
  %148 = call noundef zeroext i1 @_ZSt5isnand(double noundef %147)
  br i1 %148, label %149, label %151

149:                                              ; preds = %142
  call void @LogAssertFailure(i64 noundef 338, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef @.str.67)
  call void @__assert_fail(ptr noundef @.str.68, ptr noundef @.str, i32 noundef 338, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #7
  unreachable

150:                                              ; No predecessors!
  br label %151

151:                                              ; preds = %150, %142
  %152 = phi i1 [ true, %142 ], [ false, %150 ]
  %153 = load double, ptr %15, align 8, !tbaa !16
  %154 = call noundef zeroext i1 @_ZSt5isinfd(double noundef %153)
  br i1 %154, label %155, label %157

155:                                              ; preds = %151
  call void @LogAssertFailure(i64 noundef 339, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef @.str.69)
  call void @__assert_fail(ptr noundef @.str.70, ptr noundef @.str, i32 noundef 339, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #7
  unreachable

156:                                              ; No predecessors!
  br label %157

157:                                              ; preds = %156, %151
  %158 = phi i1 [ true, %151 ], [ false, %156 ]
  %159 = call noundef float @_ZNSt14numeric_limitsIfE3minEv() #6
  %160 = fpext float %159 to double
  %161 = load double, ptr %15, align 8, !tbaa !16
  %162 = fcmp ole double %160, %161
  br i1 %162, label %165, label %163

163:                                              ; preds = %157
  call void @LogAssertFailure(i64 noundef 340, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef @.str.71)
  call void @__assert_fail(ptr noundef @.str.72, ptr noundef @.str, i32 noundef 340, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #7
  unreachable

164:                                              ; No predecessors!
  br label %165

165:                                              ; preds = %164, %157
  %166 = phi i1 [ true, %157 ], [ false, %164 ]
  %167 = load double, ptr %15, align 8, !tbaa !16
  %168 = call noundef float @_ZNSt14numeric_limitsIfE3maxEv() #6
  %169 = fpext float %168 to double
  %170 = fcmp ole double %167, %169
  br i1 %170, label %173, label %171

171:                                              ; preds = %165
  call void @LogAssertFailure(i64 noundef 341, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef @.str.73)
  call void @__assert_fail(ptr noundef @.str.74, ptr noundef @.str, i32 noundef 341, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #7
  unreachable

172:                                              ; No predecessors!
  br label %173

173:                                              ; preds = %172, %165
  %174 = phi i1 [ true, %165 ], [ false, %172 ]
  br label %175

175:                                              ; preds = %173, %120
  %176 = load double, ptr %15, align 8, !tbaa !16
  %177 = load double, ptr %23, align 8, !tbaa !16
  %178 = fadd double %177, %176
  store double %178, ptr %23, align 8, !tbaa !16
  %179 = load ptr, ptr %10, align 8, !tbaa !5
  %180 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSubsetInteraction", ptr %179, i32 0, i32 1
  %181 = load ptr, ptr %180, align 8, !tbaa !21
  %182 = getelementptr inbounds %struct.ObjectiveWrapper, ptr %181, i32 0, i32 17
  %183 = load i64, ptr %182, align 8, !tbaa !22
  %184 = icmp eq i64 8, %183
  br i1 %184, label %185, label %188

185:                                              ; preds = %175
  %186 = load double, ptr %15, align 8, !tbaa !16
  %187 = load ptr, ptr %20, align 8, !tbaa !5
  store double %186, ptr %187, align 8, !tbaa !16
  br label %202

188:                                              ; preds = %175
  %189 = load ptr, ptr %10, align 8, !tbaa !5
  %190 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSubsetInteraction", ptr %189, i32 0, i32 1
  %191 = load ptr, ptr %190, align 8, !tbaa !21
  %192 = getelementptr inbounds %struct.ObjectiveWrapper, ptr %191, i32 0, i32 17
  %193 = load i64, ptr %192, align 8, !tbaa !22
  %194 = icmp eq i64 4, %193
  br i1 %194, label %197, label %195

195:                                              ; preds = %188
  call void @LogAssertFailure(i64 noundef 349, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef @.str.75)
  call void @__assert_fail(ptr noundef @.str.76, ptr noundef @.str, i32 noundef 349, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #7
  unreachable

196:                                              ; No predecessors!
  br label %197

197:                                              ; preds = %196, %188
  %198 = phi i1 [ true, %188 ], [ false, %196 ]
  %199 = load double, ptr %15, align 8, !tbaa !16
  %200 = fptrunc double %199 to float
  %201 = load ptr, ptr %20, align 8, !tbaa !5
  store float %200, ptr %201, align 4, !tbaa !27
  br label %202

202:                                              ; preds = %197, %185
  %203 = load ptr, ptr %20, align 8, !tbaa !5
  %204 = load ptr, ptr %10, align 8, !tbaa !5
  %205 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSubsetInteraction", ptr %204, i32 0, i32 1
  %206 = load ptr, ptr %205, align 8, !tbaa !21
  %207 = getelementptr inbounds %struct.ObjectiveWrapper, ptr %206, i32 0, i32 17
  %208 = load i64, ptr %207, align 8, !tbaa !22
  %209 = call noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIvEEPT_S2_m(ptr noundef %203, i64 noundef %208) #6
  store ptr %209, ptr %20, align 8, !tbaa !5
  %210 = load i8, ptr %14, align 1, !tbaa !17
  %211 = add i8 %210, -1
  store i8 %211, ptr %14, align 1, !tbaa !17
  br label %212

212:                                              ; preds = %202
  %213 = load ptr, ptr %22, align 8, !tbaa !5
  %214 = load ptr, ptr %20, align 8, !tbaa !5
  %215 = icmp ne ptr %213, %214
  br i1 %215, label %120, label %216, !llvm.loop !29

216:                                              ; preds = %212
  %217 = load double, ptr %23, align 8, !tbaa !16
  %218 = load double, ptr %13, align 8, !tbaa !16
  %219 = fadd double %218, %217
  store double %219, ptr %13, align 8, !tbaa !16
  %220 = load ptr, ptr %10, align 8, !tbaa !5
  %221 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSubsetInteraction", ptr %220, i32 1
  store ptr %221, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  store i32 0, ptr %18, align 4
  br label %222

222:                                              ; preds = %216, %112
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %223

223:                                              ; preds = %222, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  %224 = load i32, ptr %18, align 4
  switch i32 %224, label %271 [
    i32 0, label %225
  ]

225:                                              ; preds = %223
  br label %226

226:                                              ; preds = %225
  %227 = load ptr, ptr %11, align 8, !tbaa !5
  %228 = load ptr, ptr %10, align 8, !tbaa !5
  %229 = icmp ne ptr %227, %228
  br i1 %229, label %68, label %230, !llvm.loop !30

230:                                              ; preds = %226
  %231 = load i8, ptr %14, align 1, !tbaa !17
  %232 = sext i8 %231 to i32
  %233 = icmp eq i32 0, %232
  br i1 %233, label %236, label %234

234:                                              ; preds = %230
  call void @LogAssertFailure(i64 noundef 361, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef @.str.63)
  call void @__assert_fail(ptr noundef @.str.64, ptr noundef @.str, i32 noundef 361, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #7
  unreachable

235:                                              ; No predecessors!
  br label %236

236:                                              ; preds = %235, %230
  %237 = phi i1 [ true, %230 ], [ false, %235 ]
  %238 = load double, ptr %13, align 8, !tbaa !16
  %239 = call noundef zeroext i1 @_ZSt5isnand(double noundef %238)
  br i1 %239, label %240, label %242

240:                                              ; preds = %236
  call void @LogAssertFailure(i64 noundef 363, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef @.str.77)
  call void @__assert_fail(ptr noundef @.str.78, ptr noundef @.str, i32 noundef 363, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #7
  unreachable

241:                                              ; No predecessors!
  br label %242

242:                                              ; preds = %241, %236
  %243 = phi i1 [ true, %236 ], [ false, %241 ]
  %244 = call noundef double @_ZNSt14numeric_limitsIdE3minEv() #6
  %245 = load double, ptr %13, align 8, !tbaa !16
  %246 = fcmp ole double %244, %245
  br i1 %246, label %249, label %247

247:                                              ; preds = %242
  call void @LogAssertFailure(i64 noundef 364, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef @.str.79)
  call void @__assert_fail(ptr noundef @.str.80, ptr noundef @.str, i32 noundef 364, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #7
  unreachable

248:                                              ; No predecessors!
  br label %249

249:                                              ; preds = %248, %242
  %250 = phi i1 [ true, %242 ], [ false, %248 ]
  %251 = load double, ptr %13, align 8, !tbaa !16
  %252 = call noundef zeroext i1 @_ZSt5isinfd(double noundef %251)
  br i1 %252, label %253, label %261

253:                                              ; preds = %249
  br label %254

254:                                              ; preds = %253
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  store i32 2, ptr %24, align 4, !tbaa !9
  %255 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  %256 = icmp sle i32 2, %255
  br i1 %256, label %257, label %258

257:                                              ; preds = %254
  call void @InteralLogWithoutArguments(i32 noundef 2, ptr noundef @_ZZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKaE13LOG__sMessage_2)
  br label %258

258:                                              ; preds = %257, %254
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %259

259:                                              ; preds = %258
  br label %260

260:                                              ; preds = %259
  store i32 -4, ptr %4, align 4
  store i32 1, ptr %18, align 4
  br label %271

261:                                              ; preds = %249
  %262 = load double, ptr %13, align 8, !tbaa !16
  %263 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSetInteraction", ptr %26, i32 0, i32 3
  store double %262, ptr %263, align 8, !tbaa !31
  br label %264

264:                                              ; preds = %261
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  store i32 3, ptr %25, align 4, !tbaa !9
  %265 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  %266 = icmp sle i32 3, %265
  br i1 %266, label %267, label %268

267:                                              ; preds = %264
  call void @InteralLogWithoutArguments(i32 noundef 3, ptr noundef @_ZZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKaE13LOG__sMessage_3)
  br label %268

268:                                              ; preds = %267, %264
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %269

269:                                              ; preds = %268
  br label %270

270:                                              ; preds = %269
  store i32 0, ptr %4, align 4
  store i32 1, ptr %18, align 4
  br label %271

271:                                              ; preds = %270, %260, %223
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  %272 = load i32, ptr %4, align 4
  ret i32 %272
}

declare noundef ptr @_ZN14NAMESPACE_MAIN22GetDataSetSharedWeightEPKhm(ptr noundef, i64 noundef) #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNSt14numeric_limitsIfE3minEv() #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNSt14numeric_limitsIfE3maxEv() #5 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { 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 #4 = { 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 = { 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 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 16}
!12 = !{!"_ZTSN14NAMESPACE_MAIN18DataSetInteractionE", !13, i64 0, !13, i64 8, !6, i64 16, !14, i64 24}
!13 = !{!"long", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!12, !13, i64 8}
!16 = !{!14, !14, i64 0}
!17 = !{!7, !7, i64 0}
!18 = !{!19, !13, i64 0}
!19 = !{!"_ZTSN14NAMESPACE_MAIN21DataSubsetInteractionE", !13, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!20 = !{!13, !13, i64 0}
!21 = !{!19, !6, i64 8}
!22 = !{!23, !13, i64 128}
!23 = !{!"_ZTS16ObjectiveWrapper", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !10, i64 36, !10, 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, !10, i64 112, !13, i64 120, !13, i64 128, !13, i64 136, !10, i64 144, !6, i64 152}
!24 = !{!19, !6, i64 32}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!28, !28, i64 0}
!28 = !{!"float", !7, i64 0}
!29 = distinct !{!29, !26}
!30 = distinct !{!30, !26}
!31 = !{!12, !14, i64 24}


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

@g_traceLevel = external local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [92 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.9 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [20 x i8], align 1
@_ZZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKaE13LOG__sMessage = external hidden constant [40 x i8], align 16
@__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa = external hidden unnamed_addr constant [12 x i8], align 1
@__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa = external hidden unnamed_addr constant [106 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [26 x i8], align 1
@_ZZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKaE13LOG__sMessage_0 = external hidden constant [110 x i8], align 16
@_ZZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKaE13LOG__sMessage_1 = external hidden constant [61 x i8], align 16
@.str.67 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.70 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.71 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.73 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.75 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.77 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.79 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.80 = external hidden unnamed_addr constant [53 x i8], align 1
@_ZZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKaE13LOG__sMessage_2 = external hidden constant [64 x i8], align 16
@_ZZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKaE13LOG__sMessage_3 = external hidden constant [39 x i8], align 16

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef, i64 noundef) local_unnamed_addr #2

declare ptr @AlignedAlloc(i64 noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa(ptr nocapture noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1, ptr noundef readonly %2) local_unnamed_addr #3 align 2 {
  %4 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 2
  br i1 %5, label %6, label %7

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

7:                                                ; preds = %6, %3
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %8, label %9

8:                                                ; preds = %7
  tail call void @LogAssertFailure(i64 noundef 285, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef nonnull @.str.9)
  tail call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str, i32 noundef 285, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #5
  unreachable

9:                                                ; preds = %7
  %10 = tail call noundef ptr @_ZN14NAMESPACE_MAIN22GetDataSetSharedWeightEPKhm(ptr noundef nonnull %1, i64 noundef 0)
  %.not96 = icmp eq ptr %10, null
  br i1 %.not96, label %11, label %12

11:                                               ; preds = %9
  tail call void @LogAssertFailure(i64 noundef 288, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef nonnull @.str.65)
  tail call void @__assert_fail(ptr noundef nonnull @.str.66, ptr noundef nonnull @.str, i32 noundef 288, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #5
  unreachable

12:                                               ; preds = %9
  %13 = getelementptr inbounds i8, ptr %0, i64 16
  %14 = load ptr, ptr %13, align 8, !tbaa !9
  %.not97 = icmp eq ptr %14, null
  br i1 %.not97, label %15, label %16

15:                                               ; preds = %12
  tail call void @LogAssertFailure(i64 noundef 290, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef nonnull @.str.13)
  tail call void @__assert_fail(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str, i32 noundef 290, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #5
  unreachable

16:                                               ; preds = %12
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  %18 = load i64, ptr %17, align 8, !tbaa !14
  %.not98 = icmp eq i64 %18, 0
  br i1 %.not98, label %19, label %20

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

20:                                               ; preds = %16
  %21 = getelementptr inbounds %"struct.NAMESPACE_MAIN::DataSubsetInteraction", ptr %14, i64 %18
  br label %22

22:                                               ; preds = %85, %20
  %.082 = phi double [ undef, %20 ], [ %.284, %85 ]
  %.076 = phi i8 [ 0, %20 ], [ %84, %85 ]
  %.071 = phi double [ 0.000000e+00, %20 ], [ %86, %85 ]
  %.063 = phi ptr [ %2, %20 ], [ %.467, %85 ]
  %.060 = phi ptr [ %14, %20 ], [ %87, %85 ]
  %.055 = phi ptr [ %10, %20 ], [ %.4, %85 ]
  %23 = load i64, ptr %.060, align 8, !tbaa !15
  %.not99 = icmp eq i64 %23, 0
  br i1 %.not99, label %24, label %25

24:                                               ; preds = %22
  tail call void @LogAssertFailure(i64 noundef 303, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef nonnull @.str.5)
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str, i32 noundef 303, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #5
  unreachable

25:                                               ; preds = %22
  %26 = getelementptr inbounds i8, ptr %.060, i64 8
  %27 = load ptr, ptr %26, align 8, !tbaa !17
  %28 = getelementptr inbounds i8, ptr %27, i64 128
  %29 = load i64, ptr %28, align 8, !tbaa !18
  %30 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef %29, i64 noundef %23) #6
  br i1 %30, label %31, label %35

31:                                               ; preds = %25
  %32 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %33 = icmp sgt i32 %32, 1
  br i1 %33, label %34, label %.thread

34:                                               ; preds = %31
  tail call void @InteralLogWithoutArguments(i32 noundef 2, ptr noundef nonnull @_ZZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKaE13LOG__sMessage_0)
  br label %.thread

35:                                               ; preds = %25
  %36 = load ptr, ptr %26, align 8, !tbaa !17
  %37 = getelementptr inbounds i8, ptr %36, i64 128
  %38 = load i64, ptr %37, align 8, !tbaa !18
  %39 = mul i64 %38, %23
  %40 = tail call ptr @AlignedAlloc(i64 noundef %39)
  %41 = icmp eq ptr %40, null
  br i1 %41, label %42, label %46

42:                                               ; preds = %35
  %43 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %44 = icmp sgt i32 %43, 1
  br i1 %44, label %45, label %.thread

45:                                               ; preds = %42
  tail call void @InteralLogWithoutArguments(i32 noundef 2, ptr noundef nonnull @_ZZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKaE13LOG__sMessage_1)
  br label %.thread

46:                                               ; preds = %35
  %47 = getelementptr inbounds i8, ptr %.060, i64 32
  store ptr %40, ptr %47, align 8, !tbaa !20
  %48 = tail call noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIvEEPT_S2_m(ptr noundef nonnull %40, i64 noundef %39) #6
  br label %49

49:                                               ; preds = %82, %46
  %.183 = phi double [ %.082, %46 ], [ %.284, %82 ]
  %.177 = phi i8 [ %.076, %46 ], [ %84, %82 ]
  %.070 = phi ptr [ %40, %46 ], [ %83, %82 ]
  %.164 = phi ptr [ %.063, %46 ], [ %.467, %82 ]
  %.059 = phi double [ 0.000000e+00, %46 ], [ %74, %82 ]
  %.156 = phi ptr [ %.055, %46 ], [ %.4, %82 ]
  %50 = icmp eq i8 %.177, 0
  br i1 %50, label %51, label %73

51:                                               ; preds = %49
  %.not100 = icmp eq ptr %.164, null
  br i1 %.not100, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %51, %.preheader
  %.265 = phi ptr [ %53, %.preheader ], [ %.164, %51 ]
  %.257 = phi ptr [ %54, %.preheader ], [ %.156, %51 ]
  %52 = load i8, ptr %.265, align 1, !tbaa !21
  %53 = getelementptr inbounds i8, ptr %.265, i64 1
  %54 = getelementptr inbounds i8, ptr %.257, i64 8
  %55 = icmp slt i8 %52, 1
  br i1 %55, label %.preheader, label %.loopexit, !llvm.loop !22

.loopexit:                                        ; preds = %.preheader, %51
  %.278 = phi i8 [ 1, %51 ], [ %52, %.preheader ]
  %.366 = phi ptr [ null, %51 ], [ %53, %.preheader ]
  %.358 = phi ptr [ %.156, %51 ], [ %.257, %.preheader ]
  %56 = load double, ptr %.358, align 8, !tbaa !24
  %57 = getelementptr inbounds i8, ptr %.358, i64 8
  %58 = tail call noundef zeroext i1 @_ZSt5isnand(double noundef %56)
  br i1 %58, label %59, label %60

59:                                               ; preds = %.loopexit
  tail call void @LogAssertFailure(i64 noundef 338, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef nonnull @.str.67)
  tail call void @__assert_fail(ptr noundef nonnull @.str.68, ptr noundef nonnull @.str, i32 noundef 338, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #5
  unreachable

60:                                               ; preds = %.loopexit
  %61 = tail call noundef zeroext i1 @_ZSt5isinfd(double noundef %56)
  br i1 %61, label %62, label %63

62:                                               ; preds = %60
  tail call void @LogAssertFailure(i64 noundef 339, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef nonnull @.str.69)
  tail call void @__assert_fail(ptr noundef nonnull @.str.70, ptr noundef nonnull @.str, i32 noundef 339, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #5
  unreachable

63:                                               ; preds = %60
  %64 = tail call noundef float @_ZNSt14numeric_limitsIfE3minEv() #6
  %65 = fpext float %64 to double
  %66 = fcmp ult double %56, %65
  br i1 %66, label %67, label %68

67:                                               ; preds = %63
  tail call void @LogAssertFailure(i64 noundef 340, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef nonnull @.str.71)
  tail call void @__assert_fail(ptr noundef nonnull @.str.72, ptr noundef nonnull @.str, i32 noundef 340, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #5
  unreachable

68:                                               ; preds = %63
  %69 = tail call noundef float @_ZNSt14numeric_limitsIfE3maxEv() #6
  %70 = fpext float %69 to double
  %71 = fcmp ugt double %56, %70
  br i1 %71, label %72, label %73

72:                                               ; preds = %68
  tail call void @LogAssertFailure(i64 noundef 341, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef nonnull @.str.73)
  tail call void @__assert_fail(ptr noundef nonnull @.str.74, ptr noundef nonnull @.str, i32 noundef 341, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #5
  unreachable

73:                                               ; preds = %68, %49
  %.284 = phi double [ %56, %68 ], [ %.183, %49 ]
  %.379 = phi i8 [ %.278, %68 ], [ %.177, %49 ]
  %.467 = phi ptr [ %.366, %68 ], [ %.164, %49 ]
  %.4 = phi ptr [ %57, %68 ], [ %.156, %49 ]
  %74 = fadd double %.059, %.284
  %75 = load ptr, ptr %26, align 8, !tbaa !17
  %76 = getelementptr inbounds i8, ptr %75, i64 128
  %77 = load i64, ptr %76, align 8, !tbaa !18
  switch i64 %77, label %79 [
    i64 8, label %78
    i64 4, label %80
  ]

78:                                               ; preds = %73
  store double %.284, ptr %.070, align 8, !tbaa !24
  br label %82

79:                                               ; preds = %73
  tail call void @LogAssertFailure(i64 noundef 349, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef nonnull @.str.75)
  tail call void @__assert_fail(ptr noundef nonnull @.str.76, ptr noundef nonnull @.str, i32 noundef 349, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #5
  unreachable

80:                                               ; preds = %73
  %81 = fptrunc double %.284 to float
  store float %81, ptr %.070, align 4, !tbaa !25
  br label %82

82:                                               ; preds = %80, %78
  %83 = tail call noundef ptr @_ZN14NAMESPACE_MAINL9IndexByteIvEEPT_S2_m(ptr noundef nonnull %.070, i64 noundef %77) #6
  %84 = add i8 %.379, -1
  %.not101 = icmp eq ptr %48, %83
  br i1 %.not101, label %85, label %49, !llvm.loop !27

85:                                               ; preds = %82
  %86 = fadd double %.071, %74
  %87 = getelementptr inbounds i8, ptr %.060, i64 40
  %.not102 = icmp eq ptr %21, %87
  br i1 %.not102, label %88, label %22, !llvm.loop !28

88:                                               ; preds = %85
  %89 = icmp eq i8 %84, 0
  br i1 %89, label %91, label %90

90:                                               ; preds = %88
  tail call void @LogAssertFailure(i64 noundef 361, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef nonnull @.str.63)
  tail call void @__assert_fail(ptr noundef nonnull @.str.64, ptr noundef nonnull @.str, i32 noundef 361, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #5
  unreachable

91:                                               ; preds = %88
  %92 = tail call noundef zeroext i1 @_ZSt5isnand(double noundef %86)
  br i1 %92, label %93, label %94

93:                                               ; preds = %91
  tail call void @LogAssertFailure(i64 noundef 363, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef nonnull @.str.77)
  tail call void @__assert_fail(ptr noundef nonnull @.str.78, ptr noundef nonnull @.str, i32 noundef 363, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #5
  unreachable

94:                                               ; preds = %91
  %95 = tail call noundef double @_ZNSt14numeric_limitsIdE3minEv() #6
  %96 = fcmp ugt double %95, %86
  br i1 %96, label %97, label %98

97:                                               ; preds = %94
  tail call void @LogAssertFailure(i64 noundef 364, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa, ptr noundef nonnull @.str.79)
  tail call void @__assert_fail(ptr noundef nonnull @.str.80, ptr noundef nonnull @.str, i32 noundef 364, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKa) #5
  unreachable

98:                                               ; preds = %94
  %99 = tail call noundef zeroext i1 @_ZSt5isinfd(double noundef %86)
  br i1 %99, label %100, label %104

100:                                              ; preds = %98
  %101 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %102 = icmp sgt i32 %101, 1
  br i1 %102, label %103, label %.thread

103:                                              ; preds = %100
  tail call void @InteralLogWithoutArguments(i32 noundef 2, ptr noundef nonnull @_ZZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKaE13LOG__sMessage_2)
  br label %.thread

104:                                              ; preds = %98
  %105 = getelementptr inbounds i8, ptr %0, i64 24
  store double %86, ptr %105, align 8, !tbaa !29
  %106 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %107 = icmp sgt i32 %106, 2
  br i1 %107, label %108, label %.thread

108:                                              ; preds = %104
  tail call void @InteralLogWithoutArguments(i32 noundef 3, ptr noundef nonnull @_ZZN14NAMESPACE_MAIN18DataSetInteraction11InitWeightsEPKhPKaE13LOG__sMessage_3)
  br label %.thread

.thread:                                          ; preds = %42, %45, %31, %34, %104, %108, %100, %103
  %.3 = phi i32 [ -4, %103 ], [ -4, %100 ], [ 0, %108 ], [ 0, %104 ], [ -1, %34 ], [ -1, %31 ], [ -1, %45 ], [ -1, %42 ]
  ret i32 %.3
}

declare noundef ptr @_ZN14NAMESPACE_MAIN22GetDataSetSharedWeightEPKhm(ptr noundef, i64 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNSt14numeric_limitsIfE3minEv() local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNSt14numeric_limitsIfE3maxEv() local_unnamed_addr #4 align 2

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

attributes #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 = { 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 #2 = { 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 #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { noreturn nounwind }
attributes #6 = { nounwind }

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

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


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