; LLVM IR from interpretml/interpret :: shared/libebm/Tensor.ll (ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE)

; 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::Tensor::DimensionInfoStackExpand" = type { ptr, i64, i64 }
%"class.NAMESPACE_MAIN::Tensor" = type { i64, i64, i64, i64, ptr, i8, [1 x %"struct.NAMESPACE_MAIN::Tensor::DimensionInfo"] }
%"struct.NAMESPACE_MAIN::Tensor::DimensionInfo" = type { i64, ptr, i64 }
%"struct.NAMESPACE_MAIN::TermFeature" = type { ptr, i64, i64 }

@.str = external hidden unnamed_addr constant [80 x i8], align 1
@g_traceLevel = external global i32, align 4
@_ZZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermEE13LOG__sMessage = external hidden constant [15 x i8], align 1
@_ZZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermEE13LOG__sMessage_0 = external hidden constant [14 x i8], align 1
@__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE = external hidden unnamed_addr constant [7 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [20 x i8], align 1
@__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE = external hidden unnamed_addr constant [59 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [37 x i8], align 1
@_ZZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermEE13LOG__sMessage_1 = external hidden constant [14 x i8], align 1

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN14NAMESPACE_MAIN6Tensor14SetCountSlicesEmm(ptr noundef nonnull align 8 dereferenceable(72), i64 noundef, i64 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN14NAMESPACE_MAIN6Tensor25EnsureTensorScoreCapacityEm(ptr noundef nonnull align 8 dereferenceable(72), i64 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef %1) #5 align 2 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca [30 x %"struct.NAMESPACE_MAIN::Tensor::DimensionInfoStackExpand"], align 16
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca i64, align 8
  %31 = alloca ptr, align 8
  %32 = alloca i64, align 8
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca i64, align 8
  %36 = alloca i8, align 1
  %37 = alloca i64, align 8
  %38 = alloca ptr, align 8
  %39 = alloca i64, align 8
  %40 = alloca ptr, align 8
  %41 = alloca i64, align 8
  %42 = alloca i64, align 8
  %43 = alloca ptr, align 8
  %44 = alloca ptr, align 8
  %45 = alloca i64, align 8
  %46 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %47 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  br label %48

48:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 4, ptr %7, align 4, !tbaa !9
  %49 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  %50 = icmp sle i32 4, %49
  br i1 %50, label %51, label %52

51:                                               ; preds = %48
  call void @InteralLogWithoutArguments(i32 noundef 4, ptr noundef @_ZZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermEE13LOG__sMessage)
  br label %52

52:                                               ; preds = %51, %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %53

53:                                               ; preds = %52
  br label %54

54:                                               ; preds = %53
  %55 = getelementptr inbounds %"class.NAMESPACE_MAIN::Tensor", ptr %47, i32 0, i32 5
  %56 = load i8, ptr %55, align 8, !tbaa !11, !range !15, !noundef !16
  %57 = trunc i8 %56 to i1
  br i1 %57, label %58, label %66

58:                                               ; preds = %54
  br label %59

59:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 4, ptr %8, align 4, !tbaa !9
  %60 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  %61 = icmp sle i32 4, %60
  br i1 %61, label %62, label %63

62:                                               ; preds = %59
  call void @InteralLogWithoutArguments(i32 noundef 4, ptr noundef @_ZZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermEE13LOG__sMessage_0)
  br label %63

63:                                               ; preds = %62, %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %64

64:                                               ; preds = %63
  br label %65

65:                                               ; preds = %64
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %475

66:                                               ; preds = %54
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = icmp ne ptr null, %67
  br i1 %68, label %71, label %69

69:                                               ; preds = %66
  call void @LogAssertFailure(i64 noundef 246, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef @.str.21)
  call void @__assert_fail(ptr noundef @.str.22, ptr noundef @.str, i32 noundef 246, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #7
  unreachable

70:                                               ; No predecessors!
  br label %71

71:                                               ; preds = %70, %66
  %72 = phi i1 [ true, %66 ], [ false, %70 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = call noundef i64 @_ZNK14NAMESPACE_MAIN4Term18GetCountDimensionsEv(ptr noundef nonnull align 8 dereferenceable(776) %73) #6
  store i64 %74, ptr %10, align 8, !tbaa !17
  %75 = load i64, ptr %10, align 8, !tbaa !17
  %76 = icmp ne i64 0, %75
  br i1 %76, label %77, label %465

77:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = call noundef ptr @_ZNK14NAMESPACE_MAIN4Term15GetTermFeaturesEv(ptr noundef nonnull align 8 dereferenceable(776) %78) #6
  store ptr %79, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %80 = load ptr, ptr %11, align 8, !tbaa !5
  %81 = load i64, ptr %10, align 8, !tbaa !17
  %82 = getelementptr inbounds %"struct.NAMESPACE_MAIN::TermFeature", ptr %80, i64 %81
  store ptr %82, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 720, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %83 = getelementptr inbounds [30 x %"struct.NAMESPACE_MAIN::Tensor::DimensionInfoStackExpand"], ptr %13, i64 0, i64 0
  store ptr %83, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %84 = call noundef ptr @_ZN14NAMESPACE_MAIN6Tensor13GetDimensionsEv(ptr noundef nonnull align 8 dereferenceable(72) %47)
  store ptr %84, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %85 = getelementptr inbounds %"class.NAMESPACE_MAIN::Tensor", ptr %47, i32 0, i32 1
  %86 = load i64, ptr %85, align 8, !tbaa !18
  store i64 %86, ptr %16, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %87 = getelementptr inbounds %"class.NAMESPACE_MAIN::Tensor", ptr %47, i32 0, i32 1
  %88 = load i64, ptr %87, align 8, !tbaa !18
  store i64 %88, ptr %17, align 8, !tbaa !17
  br label %89

89:                                               ; preds = %131, %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %90 = load ptr, ptr %11, align 8, !tbaa !5
  %91 = getelementptr inbounds %"struct.NAMESPACE_MAIN::TermFeature", ptr %90, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8, !tbaa !19
  store ptr %92, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %93 = load ptr, ptr %18, align 8, !tbaa !5
  %94 = call noundef i64 @_ZNK14NAMESPACE_MAIN15FeatureBoosting12GetCountBinsEv(ptr noundef nonnull align 8 dereferenceable(16) %93) #6
  store i64 %94, ptr %19, align 8, !tbaa !17
  %95 = load i64, ptr %19, align 8, !tbaa !17
  %96 = load i64, ptr %17, align 8, !tbaa !17
  %97 = mul i64 %96, %95
  store i64 %97, ptr %17, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %98 = load ptr, ptr %15, align 8, !tbaa !5
  %99 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfo", ptr %98, i32 0, i32 0
  %100 = load i64, ptr %99, align 8, !tbaa !21
  store i64 %100, ptr %20, align 8, !tbaa !17
  %101 = load i64, ptr %16, align 8, !tbaa !17
  %102 = load i64, ptr %20, align 8, !tbaa !17
  %103 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef %101, i64 noundef %102) #6
  br i1 %103, label %104, label %106

104:                                              ; preds = %89
  call void @LogAssertFailure(i64 noundef 270, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef @.str.23)
  call void @__assert_fail(ptr noundef @.str.24, ptr noundef @.str, i32 noundef 270, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #7
  unreachable

105:                                              ; No predecessors!
  br label %106

106:                                              ; preds = %105, %89
  %107 = phi i1 [ true, %89 ], [ false, %105 ]
  %108 = load i64, ptr %20, align 8, !tbaa !17
  %109 = load i64, ptr %16, align 8, !tbaa !17
  %110 = mul i64 %109, %108
  store i64 %110, ptr %16, align 8, !tbaa !17
  %111 = load ptr, ptr %15, align 8, !tbaa !5
  %112 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfo", ptr %111, i32 0, i32 1
  %113 = load ptr, ptr %112, align 8, !tbaa !23
  %114 = load i64, ptr %20, align 8, !tbaa !17
  %115 = sub i64 %114, 1
  %116 = getelementptr inbounds i64, ptr %113, i64 %115
  %117 = load ptr, ptr %14, align 8, !tbaa !5
  %118 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfoStackExpand", ptr %117, i32 0, i32 0
  store ptr %116, ptr %118, align 8, !tbaa !24
  %119 = load i64, ptr %19, align 8, !tbaa !17
  %120 = load ptr, ptr %14, align 8, !tbaa !5
  %121 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfoStackExpand", ptr %120, i32 0, i32 1
  store i64 %119, ptr %121, align 8, !tbaa !26
  %122 = load i64, ptr %19, align 8, !tbaa !17
  %123 = load ptr, ptr %14, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfoStackExpand", ptr %123, i32 0, i32 2
  store i64 %122, ptr %124, align 8, !tbaa !27
  %125 = load ptr, ptr %15, align 8, !tbaa !5
  %126 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfo", ptr %125, i32 1
  store ptr %126, ptr %15, align 8, !tbaa !5
  %127 = load ptr, ptr %14, align 8, !tbaa !5
  %128 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfoStackExpand", ptr %127, i32 1
  store ptr %128, ptr %14, align 8, !tbaa !5
  %129 = load ptr, ptr %11, align 8, !tbaa !5
  %130 = getelementptr inbounds %"struct.NAMESPACE_MAIN::TermFeature", ptr %129, i32 1
  store ptr %130, ptr %11, align 8, !tbaa !5
  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 8, ptr %18) #6
  br label %131

131:                                              ; preds = %106
  %132 = load ptr, ptr %12, align 8, !tbaa !5
  %133 = load ptr, ptr %11, align 8, !tbaa !5
  %134 = icmp ne ptr %132, %133
  br i1 %134, label %89, label %135, !llvm.loop !28

135:                                              ; preds = %131
  %136 = getelementptr inbounds %"class.NAMESPACE_MAIN::Tensor", ptr %47, i32 0, i32 1
  %137 = load i64, ptr %136, align 8, !tbaa !18
  %138 = load ptr, ptr %5, align 8, !tbaa !5
  %139 = call noundef i64 @_ZNK14NAMESPACE_MAIN4Term18GetCountTensorBinsEv(ptr noundef nonnull align 8 dereferenceable(776) %138) #6
  %140 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef %137, i64 noundef %139) #6
  br i1 %140, label %141, label %143

141:                                              ; preds = %135
  call void @LogAssertFailure(i64 noundef 283, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef @.str.25)
  call void @__assert_fail(ptr noundef @.str.26, ptr noundef @.str, i32 noundef 283, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #7
  unreachable

142:                                              ; No predecessors!
  br label %143

143:                                              ; preds = %142, %135
  %144 = phi i1 [ true, %135 ], [ false, %142 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %145 = getelementptr inbounds %"class.NAMESPACE_MAIN::Tensor", ptr %47, i32 0, i32 1
  %146 = load i64, ptr %145, align 8, !tbaa !18
  %147 = load ptr, ptr %5, align 8, !tbaa !5
  %148 = call noundef i64 @_ZNK14NAMESPACE_MAIN4Term18GetCountTensorBinsEv(ptr noundef nonnull align 8 dereferenceable(776) %147) #6
  %149 = mul i64 %146, %148
  store i64 %149, ptr %21, align 8, !tbaa !17
  %150 = load i64, ptr %17, align 8, !tbaa !17
  %151 = load i64, ptr %21, align 8, !tbaa !17
  %152 = icmp eq i64 %150, %151
  br i1 %152, label %155, label %153

153:                                              ; preds = %143
  call void @LogAssertFailure(i64 noundef 285, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef @.str.27)
  call void @__assert_fail(ptr noundef @.str.28, ptr noundef @.str, i32 noundef 285, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #7
  unreachable

154:                                              ; No predecessors!
  br label %155

155:                                              ; preds = %154, %143
  %156 = phi i1 [ true, %143 ], [ false, %154 ]
  %157 = load i64, ptr %21, align 8, !tbaa !17
  %158 = icmp ule i64 1, %157
  br i1 %158, label %161, label %159

159:                                              ; preds = %155
  call void @LogAssertFailure(i64 noundef 286, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef @.str.29)
  call void @__assert_fail(ptr noundef @.str.30, ptr noundef @.str, i32 noundef 286, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #7
  unreachable

160:                                              ; No predecessors!
  br label %161

161:                                              ; preds = %160, %155
  %162 = phi i1 [ true, %155 ], [ false, %160 ]
  %163 = load i64, ptr %21, align 8, !tbaa !17
  %164 = call noundef i32 @_ZN14NAMESPACE_MAIN6Tensor25EnsureTensorScoreCapacityEm(ptr noundef nonnull align 8 dereferenceable(72) %47, i64 noundef %163)
  store i32 %164, ptr %6, align 4, !tbaa !9
  %165 = load i32, ptr %6, align 4, !tbaa !9
  %166 = icmp ne i32 0, %165
  %167 = xor i1 %166, true
  %168 = xor i1 %167, true
  %169 = zext i1 %168 to i64
  %170 = call i64 @llvm.expect.i64(i64 %169, i64 0)
  %171 = icmp ne i64 %170, 0
  br i1 %171, label %172, label %174

172:                                              ; preds = %161
  %173 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %173, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %462

174:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %175 = getelementptr inbounds %"class.NAMESPACE_MAIN::Tensor", ptr %47, i32 0, i32 4
  %176 = load ptr, ptr %175, align 8, !tbaa !30
  store ptr %176, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %177 = call noundef ptr @_ZN14NAMESPACE_MAIN6Tensor13GetDimensionsEv(ptr noundef nonnull align 8 dereferenceable(72) %47)
  store ptr %177, ptr %23, align 8, !tbaa !5
  %178 = load i64, ptr %16, align 8, !tbaa !17
  %179 = load i64, ptr %21, align 8, !tbaa !17
  %180 = icmp ule i64 %178, %179
  br i1 %180, label %183, label %181

181:                                              ; preds = %174
  call void @LogAssertFailure(i64 noundef 299, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef @.str.31)
  call void @__assert_fail(ptr noundef @.str.32, ptr noundef @.str, i32 noundef 299, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #7
  unreachable

182:                                              ; No predecessors!
  br label %183

183:                                              ; preds = %182, %174
  %184 = phi i1 [ true, %174 ], [ false, %182 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %185 = load ptr, ptr %22, align 8, !tbaa !5
  %186 = load i64, ptr %16, align 8, !tbaa !17
  %187 = getelementptr inbounds double, ptr %185, i64 %186
  store ptr %187, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %188 = load ptr, ptr %22, align 8, !tbaa !5
  %189 = load i64, ptr %21, align 8, !tbaa !17
  %190 = getelementptr inbounds double, ptr %188, i64 %189
  store ptr %190, ptr %25, align 8, !tbaa !5
  br label %191

191:                                              ; preds = %362, %183
  br label %192

192:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %193 = load ptr, ptr %24, align 8, !tbaa !5
  store ptr %193, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %194 = load ptr, ptr %25, align 8, !tbaa !5
  %195 = getelementptr inbounds %"class.NAMESPACE_MAIN::Tensor", ptr %47, i32 0, i32 1
  %196 = load i64, ptr %195, align 8, !tbaa !18
  %197 = sub i64 0, %196
  %198 = getelementptr inbounds double, ptr %194, i64 %197
  store ptr %198, ptr %27, align 8, !tbaa !5
  br label %199

199:                                              ; preds = %221, %192
  %200 = load ptr, ptr %26, align 8, !tbaa !5
  %201 = getelementptr inbounds double, ptr %200, i32 -1
  store ptr %201, ptr %26, align 8, !tbaa !5
  %202 = load ptr, ptr %25, align 8, !tbaa !5
  %203 = getelementptr inbounds double, ptr %202, i32 -1
  store ptr %203, ptr %25, align 8, !tbaa !5
  %204 = load ptr, ptr %22, align 8, !tbaa !5
  %205 = load ptr, ptr %26, align 8, !tbaa !5
  %206 = icmp ule ptr %204, %205
  br i1 %206, label %209, label %207

207:                                              ; preds = %199
  call void @LogAssertFailure(i64 noundef 312, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef @.str.33)
  call void @__assert_fail(ptr noundef @.str.34, ptr noundef @.str, i32 noundef 312, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #7
  unreachable

208:                                              ; No predecessors!
  br label %209

209:                                              ; preds = %208, %199
  %210 = phi i1 [ true, %199 ], [ false, %208 ]
  %211 = load ptr, ptr %22, align 8, !tbaa !5
  %212 = load ptr, ptr %25, align 8, !tbaa !5
  %213 = icmp ule ptr %211, %212
  br i1 %213, label %216, label %214

214:                                              ; preds = %209
  call void @LogAssertFailure(i64 noundef 313, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef @.str.35)
  call void @__assert_fail(ptr noundef @.str.36, ptr noundef @.str, i32 noundef 313, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #7
  unreachable

215:                                              ; No predecessors!
  br label %216

216:                                              ; preds = %215, %209
  %217 = phi i1 [ true, %209 ], [ false, %215 ]
  %218 = load ptr, ptr %26, align 8, !tbaa !5
  %219 = load double, ptr %218, align 8, !tbaa !31
  %220 = load ptr, ptr %25, align 8, !tbaa !5
  store double %219, ptr %220, align 8, !tbaa !31
  br label %221

221:                                              ; preds = %216
  %222 = load ptr, ptr %27, align 8, !tbaa !5
  %223 = load ptr, ptr %25, align 8, !tbaa !5
  %224 = icmp ne ptr %222, %223
  br i1 %224, label %199, label %225, !llvm.loop !33

225:                                              ; preds = %221
  %226 = load ptr, ptr %22, align 8, !tbaa !5
  %227 = load ptr, ptr %25, align 8, !tbaa !5
  %228 = icmp eq ptr %226, %227
  %229 = xor i1 %228, true
  %230 = xor i1 %229, true
  %231 = zext i1 %230 to i64
  %232 = call i64 @llvm.expect.i64(i64 %231, i64 0)
  %233 = icmp ne i64 %232, 0
  br i1 %233, label %234, label %235

234:                                              ; preds = %225
  store i32 9, ptr %9, align 4
  br label %360

235:                                              ; preds = %225
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %236 = getelementptr inbounds [30 x %"struct.NAMESPACE_MAIN::Tensor::DimensionInfoStackExpand"], ptr %13, i64 0, i64 0
  store ptr %236, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %237 = load ptr, ptr %23, align 8, !tbaa !5
  store ptr %237, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %238 = getelementptr inbounds %"class.NAMESPACE_MAIN::Tensor", ptr %47, i32 0, i32 1
  %239 = load i64, ptr %238, align 8, !tbaa !18
  store i64 %239, ptr %30, align 8, !tbaa !17
  br label %240

240:                                              ; preds = %357, %235
  br label %241

241:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %242 = load ptr, ptr %28, align 8, !tbaa !5
  %243 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfoStackExpand", ptr %242, i32 0, i32 0
  %244 = load ptr, ptr %243, align 8, !tbaa !24
  store ptr %244, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  %245 = load ptr, ptr %28, align 8, !tbaa !5
  %246 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfoStackExpand", ptr %245, i32 0, i32 1
  %247 = load i64, ptr %246, align 8, !tbaa !26
  store i64 %247, ptr %32, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  %248 = load ptr, ptr %29, align 8, !tbaa !5
  %249 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfo", ptr %248, i32 0, i32 1
  %250 = load ptr, ptr %249, align 8, !tbaa !23
  store ptr %250, ptr %33, align 8, !tbaa !5
  %251 = load ptr, ptr %31, align 8, !tbaa !5
  %252 = load ptr, ptr %33, align 8, !tbaa !5
  %253 = ptrtoint ptr %251 to i64
  %254 = ptrtoint ptr %252 to i64
  %255 = sub i64 %253, %254
  %256 = sdiv exact i64 %255, 8
  %257 = load i64, ptr %32, align 8, !tbaa !17
  %258 = icmp ult i64 %256, %257
  br i1 %258, label %261, label %259

259:                                              ; preds = %241
  call void @LogAssertFailure(i64 noundef 338, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef @.str.37)
  call void @__assert_fail(ptr noundef @.str.38, ptr noundef @.str, i32 noundef 338, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #7
  unreachable

260:                                              ; No predecessors!
  br label %261

261:                                              ; preds = %260, %241
  %262 = phi i1 [ true, %241 ], [ false, %260 ]
  %263 = load ptr, ptr %33, align 8, !tbaa !5
  %264 = load ptr, ptr %31, align 8, !tbaa !5
  %265 = icmp ult ptr %263, %264
  %266 = xor i1 %265, true
  %267 = xor i1 %266, true
  br i1 %267, label %268, label %311, !unpredictable !16

268:                                              ; preds = %261
  %269 = load i64, ptr %32, align 8, !tbaa !17
  %270 = icmp ult i64 1, %269
  br i1 %270, label %273, label %271

271:                                              ; preds = %268
  call void @LogAssertFailure(i64 noundef 340, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef @.str.39)
  call void @__assert_fail(ptr noundef @.str.40, ptr noundef @.str, i32 noundef 340, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #7
  unreachable

272:                                              ; No predecessors!
  br label %273

273:                                              ; preds = %272, %268
  %274 = phi i1 [ true, %268 ], [ false, %272 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #6
  %275 = load ptr, ptr %31, align 8, !tbaa !5
  %276 = getelementptr inbounds i64, ptr %275, i64 -1
  store ptr %276, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #6
  %277 = load ptr, ptr %34, align 8, !tbaa !5
  %278 = load i64, ptr %277, align 8, !tbaa !17
  store i64 %278, ptr %35, align 8, !tbaa !17
  %279 = load i64, ptr %32, align 8, !tbaa !17
  %280 = add i64 %279, -1
  store i64 %280, ptr %32, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 1, ptr %36) #6
  %281 = load i64, ptr %32, align 8, !tbaa !17
  %282 = load i64, ptr %35, align 8, !tbaa !17
  %283 = icmp ule i64 %281, %282
  %284 = xor i1 %283, true
  %285 = xor i1 %284, true
  %286 = zext i1 %285 to i8
  store i8 %286, ptr %36, align 1, !tbaa !34
  %287 = load i8, ptr %36, align 1, !tbaa !34, !range !15, !noundef !16
  %288 = trunc i8 %287 to i1
  br i1 %288, label %289, label %291

289:                                              ; preds = %273
  %290 = load ptr, ptr %34, align 8, !tbaa !5
  br label %293

291:                                              ; preds = %273
  %292 = load ptr, ptr %31, align 8, !tbaa !5
  br label %293

293:                                              ; preds = %291, %289
  %294 = phi ptr [ %290, %289 ], [ %292, %291 ]
  %295 = load ptr, ptr %28, align 8, !tbaa !5
  %296 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfoStackExpand", ptr %295, i32 0, i32 0
  store ptr %294, ptr %296, align 8, !tbaa !24
  %297 = load i8, ptr %36, align 1, !tbaa !34, !range !15, !noundef !16
  %298 = trunc i8 %297 to i1
  br i1 %298, label %299, label %304

299:                                              ; preds = %293
  %300 = load ptr, ptr %24, align 8, !tbaa !5
  %301 = load i64, ptr %30, align 8, !tbaa !17
  %302 = sub i64 0, %301
  %303 = getelementptr inbounds double, ptr %300, i64 %302
  br label %306

304:                                              ; preds = %293
  %305 = load ptr, ptr %24, align 8, !tbaa !5
  br label %306

306:                                              ; preds = %304, %299
  %307 = phi ptr [ %303, %299 ], [ %305, %304 ]
  store ptr %307, ptr %24, align 8, !tbaa !5
  %308 = load i64, ptr %32, align 8, !tbaa !17
  %309 = load ptr, ptr %28, align 8, !tbaa !5
  %310 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfoStackExpand", ptr %309, i32 0, i32 1
  store i64 %308, ptr %310, align 8, !tbaa !26
  store i32 13, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  br label %357

311:                                              ; preds = %261
  %312 = load i64, ptr %32, align 8, !tbaa !17
  %313 = icmp ult i64 1, %312
  %314 = xor i1 %313, true
  %315 = xor i1 %314, true
  br i1 %315, label %316, label %321, !unpredictable !16

316:                                              ; preds = %311
  %317 = load i64, ptr %32, align 8, !tbaa !17
  %318 = sub i64 %317, 1
  %319 = load ptr, ptr %28, align 8, !tbaa !5
  %320 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfoStackExpand", ptr %319, i32 0, i32 1
  store i64 %318, ptr %320, align 8, !tbaa !26
  store i32 13, ptr %9, align 4
  br label %357

321:                                              ; preds = %311
  %322 = load i64, ptr %30, align 8, !tbaa !17
  %323 = load ptr, ptr %24, align 8, !tbaa !5
  %324 = sub i64 0, %322
  %325 = getelementptr inbounds double, ptr %323, i64 %324
  store ptr %325, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #6
  %326 = load ptr, ptr %29, align 8, !tbaa !5
  %327 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfo", ptr %326, i32 0, i32 0
  %328 = load i64, ptr %327, align 8, !tbaa !21
  store i64 %328, ptr %37, align 8, !tbaa !17
  %329 = load i64, ptr %30, align 8, !tbaa !17
  %330 = load i64, ptr %37, align 8, !tbaa !17
  %331 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef %329, i64 noundef %330) #6
  br i1 %331, label %332, label %334

332:                                              ; preds = %321
  call void @LogAssertFailure(i64 noundef 365, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef @.str.41)
  call void @__assert_fail(ptr noundef @.str.42, ptr noundef @.str, i32 noundef 365, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #7
  unreachable

333:                                              ; No predecessors!
  br label %334

334:                                              ; preds = %333, %321
  %335 = phi i1 [ true, %321 ], [ false, %333 ]
  %336 = load i64, ptr %37, align 8, !tbaa !17
  %337 = load i64, ptr %30, align 8, !tbaa !17
  %338 = mul i64 %337, %336
  store i64 %338, ptr %30, align 8, !tbaa !17
  %339 = load i64, ptr %30, align 8, !tbaa !17
  %340 = load ptr, ptr %24, align 8, !tbaa !5
  %341 = getelementptr inbounds double, ptr %340, i64 %339
  store ptr %341, ptr %24, align 8, !tbaa !5
  %342 = load ptr, ptr %33, align 8, !tbaa !5
  %343 = load i64, ptr %37, align 8, !tbaa !17
  %344 = sub i64 %343, 1
  %345 = getelementptr inbounds i64, ptr %342, i64 %344
  %346 = load ptr, ptr %28, align 8, !tbaa !5
  %347 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfoStackExpand", ptr %346, i32 0, i32 0
  store ptr %345, ptr %347, align 8, !tbaa !24
  %348 = load ptr, ptr %28, align 8, !tbaa !5
  %349 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfoStackExpand", ptr %348, i32 0, i32 2
  %350 = load i64, ptr %349, align 8, !tbaa !27
  %351 = load ptr, ptr %28, align 8, !tbaa !5
  %352 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfoStackExpand", ptr %351, i32 0, i32 1
  store i64 %350, ptr %352, align 8, !tbaa !26
  %353 = load ptr, ptr %29, align 8, !tbaa !5
  %354 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfo", ptr %353, i32 1
  store ptr %354, ptr %29, align 8, !tbaa !5
  %355 = load ptr, ptr %28, align 8, !tbaa !5
  %356 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfoStackExpand", ptr %355, i32 1
  store ptr %356, ptr %28, align 8, !tbaa !5
  store i32 12, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #6
  br label %357

357:                                              ; preds = %334, %316, %306
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  %358 = load i32, ptr %9, align 4
  switch i32 %358, label %477 [
    i32 13, label %359
    i32 12, label %240
  ]

359:                                              ; preds = %357
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  store i32 0, ptr %9, align 4
  br label %360

360:                                              ; preds = %359, %234
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  %361 = load i32, ptr %9, align 4
  switch i32 %361, label %477 [
    i32 0, label %362
    i32 9, label %363
  ]

362:                                              ; preds = %360
  br label %191, !llvm.loop !35

363:                                              ; preds = %360
  %364 = load ptr, ptr %25, align 8, !tbaa !5
  %365 = getelementptr inbounds %"class.NAMESPACE_MAIN::Tensor", ptr %47, i32 0, i32 4
  %366 = load ptr, ptr %365, align 8, !tbaa !30
  %367 = icmp eq ptr %364, %366
  br i1 %367, label %370, label %368

368:                                              ; preds = %363
  call void @LogAssertFailure(i64 noundef 383, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef @.str.43)
  call void @__assert_fail(ptr noundef @.str.44, ptr noundef @.str, i32 noundef 383, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #7
  unreachable

369:                                              ; No predecessors!
  br label %370

370:                                              ; preds = %369, %363
  %371 = phi i1 [ true, %363 ], [ false, %369 ]
  %372 = load ptr, ptr %24, align 8, !tbaa !5
  %373 = getelementptr inbounds %"class.NAMESPACE_MAIN::Tensor", ptr %47, i32 0, i32 4
  %374 = load ptr, ptr %373, align 8, !tbaa !30
  %375 = getelementptr inbounds %"class.NAMESPACE_MAIN::Tensor", ptr %47, i32 0, i32 1
  %376 = load i64, ptr %375, align 8, !tbaa !18
  %377 = getelementptr inbounds double, ptr %374, i64 %376
  %378 = icmp eq ptr %372, %377
  br i1 %378, label %381, label %379

379:                                              ; preds = %370
  call void @LogAssertFailure(i64 noundef 384, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef @.str.45)
  call void @__assert_fail(ptr noundef @.str.46, ptr noundef @.str, i32 noundef 384, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #7
  unreachable

380:                                              ; No predecessors!
  br label %381

381:                                              ; preds = %380, %370
  %382 = phi i1 [ true, %370 ], [ false, %380 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #6
  %383 = load ptr, ptr %5, align 8, !tbaa !5
  %384 = call noundef ptr @_ZNK14NAMESPACE_MAIN4Term15GetTermFeaturesEv(ptr noundef nonnull align 8 dereferenceable(776) %383) #6
  store ptr %384, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #6
  store i64 0, ptr %39, align 8, !tbaa !17
  br label %385

385:                                              ; preds = %456, %381
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #6
  %386 = load ptr, ptr %38, align 8, !tbaa !5
  %387 = getelementptr inbounds %"struct.NAMESPACE_MAIN::TermFeature", ptr %386, i32 0, i32 0
  %388 = load ptr, ptr %387, align 8, !tbaa !19
  store ptr %388, ptr %40, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #6
  %389 = load ptr, ptr %40, align 8, !tbaa !5
  %390 = call noundef i64 @_ZNK14NAMESPACE_MAIN15FeatureBoosting12GetCountBinsEv(ptr noundef nonnull align 8 dereferenceable(16) %389) #6
  store i64 %390, ptr %41, align 8, !tbaa !17
  %391 = load i64, ptr %41, align 8, !tbaa !17
  %392 = icmp ule i64 1, %391
  br i1 %392, label %395, label %393

393:                                              ; preds = %385
  call void @LogAssertFailure(i64 noundef 391, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef @.str.47)
  call void @__assert_fail(ptr noundef @.str.48, ptr noundef @.str, i32 noundef 391, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #7
  unreachable

394:                                              ; No predecessors!
  br label %395

395:                                              ; preds = %394, %385
  %396 = phi i1 [ true, %385 ], [ false, %394 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #6
  %397 = load i64, ptr %41, align 8, !tbaa !17
  store i64 %397, ptr %42, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #6
  %398 = load ptr, ptr %23, align 8, !tbaa !5
  %399 = load i64, ptr %39, align 8, !tbaa !17
  %400 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfo", ptr %398, i64 %399
  store ptr %400, ptr %43, align 8, !tbaa !5
  %401 = load i64, ptr %42, align 8, !tbaa !17
  %402 = load ptr, ptr %43, align 8, !tbaa !5
  %403 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfo", ptr %402, i32 0, i32 0
  %404 = load i64, ptr %403, align 8, !tbaa !21
  %405 = icmp ne i64 %401, %404
  br i1 %405, label %406, label %448

406:                                              ; preds = %395
  %407 = load i64, ptr %39, align 8, !tbaa !17
  %408 = load i64, ptr %42, align 8, !tbaa !17
  %409 = call noundef i32 @_ZN14NAMESPACE_MAIN6Tensor14SetCountSlicesEmm(ptr noundef nonnull align 8 dereferenceable(72) %47, i64 noundef %407, i64 noundef %408)
  store i32 %409, ptr %6, align 4, !tbaa !9
  %410 = load i32, ptr %6, align 4, !tbaa !9
  %411 = icmp ne i32 0, %410
  %412 = xor i1 %411, true
  %413 = xor i1 %412, true
  %414 = zext i1 %413 to i64
  %415 = call i64 @llvm.expect.i64(i64 %414, i64 0)
  %416 = icmp ne i64 %415, 0
  br i1 %416, label %417, label %419

417:                                              ; preds = %406
  %418 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %418, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %453

419:                                              ; preds = %406
  %420 = load i64, ptr %42, align 8, !tbaa !17
  %421 = icmp ule i64 2, %420
  br i1 %421, label %424, label %422

422:                                              ; preds = %419
  call void @LogAssertFailure(i64 noundef 402, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef @.str.49)
  call void @__assert_fail(ptr noundef @.str.50, ptr noundef @.str, i32 noundef 402, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #7
  unreachable

423:                                              ; No predecessors!
  br label %424

424:                                              ; preds = %423, %419
  %425 = phi i1 [ true, %419 ], [ false, %423 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #6
  %426 = load ptr, ptr %43, align 8, !tbaa !5
  %427 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfo", ptr %426, i32 0, i32 1
  %428 = load ptr, ptr %427, align 8, !tbaa !23
  store ptr %428, ptr %44, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #6
  store i64 1, ptr %45, align 8, !tbaa !17
  br label %429

429:                                              ; preds = %443, %424
  %430 = load i64, ptr %45, align 8, !tbaa !17
  %431 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImmEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuentsr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef %430) #6
  br i1 %431, label %432, label %434

432:                                              ; preds = %429
  call void @LogAssertFailure(i64 noundef 408, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef @.str.51)
  call void @__assert_fail(ptr noundef @.str.52, ptr noundef @.str, i32 noundef 408, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #7
  unreachable

433:                                              ; No predecessors!
  br label %434

434:                                              ; preds = %433, %429
  %435 = phi i1 [ true, %429 ], [ false, %433 ]
  %436 = load i64, ptr %45, align 8, !tbaa !17
  %437 = load ptr, ptr %44, align 8, !tbaa !5
  %438 = load i64, ptr %45, align 8, !tbaa !17
  %439 = sub i64 %438, 1
  %440 = getelementptr inbounds i64, ptr %437, i64 %439
  store i64 %436, ptr %440, align 8, !tbaa !17
  %441 = load i64, ptr %45, align 8, !tbaa !17
  %442 = add i64 %441, 1
  store i64 %442, ptr %45, align 8, !tbaa !17
  br label %443

443:                                              ; preds = %434
  %444 = load i64, ptr %42, align 8, !tbaa !17
  %445 = load i64, ptr %45, align 8, !tbaa !17
  %446 = icmp ne i64 %444, %445
  br i1 %446, label %429, label %447, !llvm.loop !36

447:                                              ; preds = %443
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #6
  br label %448

448:                                              ; preds = %447, %395
  %449 = load i64, ptr %39, align 8, !tbaa !17
  %450 = add i64 %449, 1
  store i64 %450, ptr %39, align 8, !tbaa !17
  %451 = load ptr, ptr %38, align 8, !tbaa !5
  %452 = getelementptr inbounds %"struct.NAMESPACE_MAIN::TermFeature", ptr %451, i32 1
  store ptr %452, ptr %38, align 8, !tbaa !5
  store i32 0, ptr %9, align 4
  br label %453

453:                                              ; preds = %448, %417
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #6
  %454 = load i32, ptr %9, align 4
  switch i32 %454, label %461 [
    i32 0, label %455
  ]

455:                                              ; preds = %453
  br label %456

456:                                              ; preds = %455
  %457 = load ptr, ptr %12, align 8, !tbaa !5
  %458 = load ptr, ptr %38, align 8, !tbaa !5
  %459 = icmp ne ptr %457, %458
  br i1 %459, label %385, label %460, !llvm.loop !37

460:                                              ; preds = %456
  store i32 0, ptr %9, align 4
  br label %461

461:                                              ; preds = %460, %453
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %462

462:                                              ; preds = %461, %172
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #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
  call void @llvm.lifetime.end.p0(i64 720, 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
  %463 = load i32, ptr %9, align 4
  switch i32 %463, label %474 [
    i32 0, label %464
  ]

464:                                              ; preds = %462
  br label %465

465:                                              ; preds = %464, %71
  %466 = getelementptr inbounds %"class.NAMESPACE_MAIN::Tensor", ptr %47, i32 0, i32 5
  store i8 1, ptr %466, align 8, !tbaa !11
  br label %467

467:                                              ; preds = %465
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #6
  store i32 4, ptr %46, align 4, !tbaa !9
  %468 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  %469 = icmp sle i32 4, %468
  br i1 %469, label %470, label %471

470:                                              ; preds = %467
  call void @InteralLogWithoutArguments(i32 noundef 4, ptr noundef @_ZZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermEE13LOG__sMessage_1)
  br label %471

471:                                              ; preds = %470, %467
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #6
  br label %472

472:                                              ; preds = %471
  br label %473

473:                                              ; preds = %472
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %474

474:                                              ; preds = %473, %462
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %475

475:                                              ; preds = %474, %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %476 = load i32, ptr %3, align 4
  ret i32 %476

477:                                              ; preds = %360, %357
  unreachable
}

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImmEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuentsr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #5 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !14, i64 40}
!12 = !{!"_ZTSN14NAMESPACE_MAIN6TensorE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !6, i64 32, !14, i64 40, !7, i64 48}
!13 = !{!"long", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!13, !13, i64 0}
!18 = !{!12, !13, i64 8}
!19 = !{!20, !6, i64 0}
!20 = !{!"_ZTSN14NAMESPACE_MAIN11TermFeatureE", !6, i64 0, !13, i64 8, !13, i64 16}
!21 = !{!22, !13, i64 0}
!22 = !{!"_ZTSN14NAMESPACE_MAIN6Tensor13DimensionInfoE", !13, i64 0, !6, i64 8, !13, i64 16}
!23 = !{!22, !6, i64 8}
!24 = !{!25, !6, i64 0}
!25 = !{!"_ZTSN14NAMESPACE_MAIN6Tensor24DimensionInfoStackExpandE", !6, i64 0, !13, i64 8, !13, i64 16}
!26 = !{!25, !13, i64 8}
!27 = !{!25, !13, i64 16}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!12, !6, i64 32}
!31 = !{!32, !32, i64 0}
!32 = !{!"double", !7, i64 0}
!33 = distinct !{!33, !29}
!34 = !{!14, !14, i64 0}
!35 = distinct !{!35, !29}
!36 = distinct !{!36, !29}
!37 = distinct !{!37, !29}


; 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::Tensor::DimensionInfoStackExpand" = type { ptr, i64, i64 }
%"struct.NAMESPACE_MAIN::TermFeature" = type { ptr, i64, i64 }
%"struct.NAMESPACE_MAIN::Tensor::DimensionInfo" = type { i64, ptr, i64 }

@.str = external hidden unnamed_addr constant [80 x i8], align 1
@g_traceLevel = external local_unnamed_addr global i32, align 4
@_ZZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermEE13LOG__sMessage = external hidden constant [15 x i8], align 1
@_ZZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermEE13LOG__sMessage_0 = external hidden constant [14 x i8], align 1
@__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE = external hidden unnamed_addr constant [7 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [20 x i8], align 1
@__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE = external hidden unnamed_addr constant [59 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [37 x i8], align 1
@_ZZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermEE13LOG__sMessage_1 = external hidden constant [14 x i8], align 1

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN14NAMESPACE_MAIN6Tensor14SetCountSlicesEmm(ptr noundef nonnull align 8 dereferenceable(72), i64 noundef, i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN14NAMESPACE_MAIN6Tensor25EnsureTensorScoreCapacityEm(ptr noundef nonnull align 8 dereferenceable(72), i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef %1) local_unnamed_addr #4 align 2 {
  %3 = alloca [30 x %"struct.NAMESPACE_MAIN::Tensor::DimensionInfoStackExpand"], align 16
  %4 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 3
  br i1 %5, label %6, label %7

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

7:                                                ; preds = %6, %2
  %8 = getelementptr inbounds i8, ptr %0, i64 40
  %9 = load i8, ptr %8, align 8, !tbaa !9, !range !14, !noundef !15
  %10 = trunc nuw i8 %9 to i1
  br i1 %10, label %11, label %15

11:                                               ; preds = %7
  %12 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %13 = icmp sgt i32 %12, 3
  br i1 %13, label %14, label %170

14:                                               ; preds = %11
  tail call void @InteralLogWithoutArguments(i32 noundef 4, ptr noundef nonnull @_ZZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermEE13LOG__sMessage_0)
  br label %170

15:                                               ; preds = %7
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %16, label %17

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

17:                                               ; preds = %15
  %18 = tail call noundef i64 @_ZNK14NAMESPACE_MAIN4Term18GetCountDimensionsEv(ptr noundef nonnull align 8 dereferenceable(776) %1) #6
  %.not178 = icmp eq i64 %18, 0
  br i1 %.not178, label %166, label %19

19:                                               ; preds = %17
  %20 = tail call noundef ptr @_ZNK14NAMESPACE_MAIN4Term15GetTermFeaturesEv(ptr noundef nonnull align 8 dereferenceable(776) %1) #6
  %21 = getelementptr inbounds %"struct.NAMESPACE_MAIN::TermFeature", ptr %20, i64 %18
  call void @llvm.lifetime.start.p0(i64 720, ptr nonnull %3) #6
  %22 = tail call noundef ptr @_ZN14NAMESPACE_MAIN6Tensor13GetDimensionsEv(ptr noundef nonnull align 8 dereferenceable(72) %0)
  %23 = getelementptr inbounds i8, ptr %0, i64 8
  %24 = load i64, ptr %23, align 8, !tbaa !16
  br label %25

25:                                               ; preds = %31, %19
  %.0147 = phi i64 [ %24, %19 ], [ %32, %31 ]
  %.0146 = phi i64 [ %24, %19 ], [ %33, %31 ]
  %.0141 = phi ptr [ %22, %19 ], [ %40, %31 ]
  %.0140 = phi ptr [ %3, %19 ], [ %41, %31 ]
  %.0139 = phi ptr [ %20, %19 ], [ %42, %31 ]
  %26 = load ptr, ptr %.0139, align 8, !tbaa !17
  %27 = tail call noundef i64 @_ZNK14NAMESPACE_MAIN15FeatureBoosting12GetCountBinsEv(ptr noundef nonnull align 8 dereferenceable(16) %26) #6
  %28 = load i64, ptr %.0141, align 8, !tbaa !19
  %29 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef %.0146, i64 noundef %28) #6
  br i1 %29, label %30, label %31

30:                                               ; preds = %25
  tail call void @LogAssertFailure(i64 noundef 270, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef nonnull @.str.23)
  tail call void @__assert_fail(ptr noundef nonnull @.str.24, ptr noundef nonnull @.str, i32 noundef 270, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #5
  unreachable

31:                                               ; preds = %25
  %32 = mul i64 %27, %.0147
  %33 = mul i64 %28, %.0146
  %34 = getelementptr inbounds i8, ptr %.0141, i64 8
  %35 = load ptr, ptr %34, align 8, !tbaa !21
  %36 = getelementptr i64, ptr %35, i64 %28
  %37 = getelementptr i8, ptr %36, i64 -8
  store ptr %37, ptr %.0140, align 8, !tbaa !22
  %38 = getelementptr inbounds i8, ptr %.0140, i64 8
  store i64 %27, ptr %38, align 8, !tbaa !24
  %39 = getelementptr inbounds i8, ptr %.0140, i64 16
  store i64 %27, ptr %39, align 8, !tbaa !25
  %40 = getelementptr inbounds i8, ptr %.0141, i64 24
  %41 = getelementptr inbounds i8, ptr %.0140, i64 24
  %42 = getelementptr inbounds i8, ptr %.0139, i64 24
  %.not179 = icmp eq ptr %21, %42
  br i1 %.not179, label %43, label %25, !llvm.loop !26

43:                                               ; preds = %31
  %44 = load i64, ptr %23, align 8, !tbaa !16
  %45 = tail call noundef i64 @_ZNK14NAMESPACE_MAIN4Term18GetCountTensorBinsEv(ptr noundef nonnull align 8 dereferenceable(776) %1) #6
  %46 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef %44, i64 noundef %45) #6
  br i1 %46, label %47, label %48

47:                                               ; preds = %43
  tail call void @LogAssertFailure(i64 noundef 283, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef nonnull @.str.25)
  tail call void @__assert_fail(ptr noundef nonnull @.str.26, ptr noundef nonnull @.str, i32 noundef 283, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #5
  unreachable

48:                                               ; preds = %43
  %49 = load i64, ptr %23, align 8, !tbaa !16
  %50 = tail call noundef i64 @_ZNK14NAMESPACE_MAIN4Term18GetCountTensorBinsEv(ptr noundef nonnull align 8 dereferenceable(776) %1) #6
  %51 = mul i64 %50, %49
  %52 = icmp eq i64 %32, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %48
  tail call void @LogAssertFailure(i64 noundef 285, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef nonnull @.str.27)
  tail call void @__assert_fail(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str, i32 noundef 285, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #5
  unreachable

54:                                               ; preds = %48
  %.not180 = icmp eq i64 %32, 0
  br i1 %.not180, label %55, label %56

55:                                               ; preds = %54
  tail call void @LogAssertFailure(i64 noundef 286, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef nonnull @.str.29)
  tail call void @__assert_fail(ptr noundef nonnull @.str.30, ptr noundef nonnull @.str, i32 noundef 286, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #5
  unreachable

56:                                               ; preds = %54
  %57 = tail call noundef i32 @_ZN14NAMESPACE_MAIN6Tensor25EnsureTensorScoreCapacityEm(ptr noundef nonnull align 8 dereferenceable(72) %0, i64 noundef %32)
  %.not181 = icmp eq i32 %57, 0
  br i1 %.not181, label %58, label %.thread216, !prof !28

58:                                               ; preds = %56
  %59 = getelementptr inbounds i8, ptr %0, i64 32
  %60 = load ptr, ptr %59, align 8, !tbaa !29
  %61 = tail call noundef ptr @_ZN14NAMESPACE_MAIN6Tensor13GetDimensionsEv(ptr noundef nonnull align 8 dereferenceable(72) %0)
  %.not182 = icmp ugt i64 %33, %32
  br i1 %.not182, label %62, label %63

62:                                               ; preds = %58
  tail call void @LogAssertFailure(i64 noundef 299, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef nonnull @.str.31)
  tail call void @__assert_fail(ptr noundef nonnull @.str.32, ptr noundef nonnull @.str, i32 noundef 299, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #5
  unreachable

63:                                               ; preds = %58
  %64 = getelementptr inbounds double, ptr %60, i64 %33
  %65 = getelementptr inbounds double, ptr %60, i64 %32
  %66 = getelementptr inbounds i8, ptr %3, i64 8
  %67 = getelementptr inbounds i8, ptr %61, i64 8
  br label %68

68:                                               ; preds = %133, %63
  %.0152 = phi ptr [ %65, %63 ], [ %71, %133 ]
  %.0148 = phi ptr [ %64, %63 ], [ %.2150.ph, %133 ]
  %69 = load i64, ptr %23, align 8, !tbaa !16
  %70 = sub i64 0, %69
  %71 = getelementptr inbounds double, ptr %.0152, i64 %70
  br label %72

72:                                               ; preds = %78, %68
  %.0154 = phi ptr [ %.0148, %68 ], [ %73, %78 ]
  %.1153 = phi ptr [ %.0152, %68 ], [ %74, %78 ]
  %73 = getelementptr inbounds i8, ptr %.0154, i64 -8
  %74 = getelementptr inbounds i8, ptr %.1153, i64 -8
  %.not183 = icmp ugt ptr %60, %73
  br i1 %.not183, label %75, label %76

75:                                               ; preds = %72
  tail call void @LogAssertFailure(i64 noundef 312, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef nonnull @.str.33)
  tail call void @__assert_fail(ptr noundef nonnull @.str.34, ptr noundef nonnull @.str, i32 noundef 312, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #5
  unreachable

76:                                               ; preds = %72
  %.not184 = icmp ugt ptr %60, %74
  br i1 %.not184, label %77, label %78

77:                                               ; preds = %76
  tail call void @LogAssertFailure(i64 noundef 313, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef nonnull @.str.35)
  tail call void @__assert_fail(ptr noundef nonnull @.str.36, ptr noundef nonnull @.str, i32 noundef 313, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #5
  unreachable

78:                                               ; preds = %76
  %79 = load double, ptr %73, align 8, !tbaa !30
  store double %79, ptr %74, align 8, !tbaa !30
  %.not185 = icmp eq ptr %71, %74
  br i1 %.not185, label %80, label %72, !llvm.loop !32

80:                                               ; preds = %78
  %81 = icmp eq ptr %60, %71
  br i1 %81, label %134, label %.preheader, !prof !33

.preheader:                                       ; preds = %80
  %82 = load ptr, ptr %3, align 16, !tbaa !22
  %83 = load i64, ptr %66, align 8, !tbaa !24
  %84 = load ptr, ptr %67, align 8, !tbaa !21
  %85 = ptrtoint ptr %82 to i64
  %86 = ptrtoint ptr %84 to i64
  %87 = sub i64 %85, %86
  %88 = ashr exact i64 %87, 3
  %89 = icmp ult i64 %88, %83
  br i1 %89, label %.lr.ph, label %.preheader._crit_edge

.preheader._crit_edge:                            ; preds = %.preheader, %112
  tail call void @LogAssertFailure(i64 noundef 338, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef nonnull @.str.37)
  tail call void @__assert_fail(ptr noundef nonnull @.str.38, ptr noundef nonnull @.str, i32 noundef 338, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #5
  unreachable

.lr.ph:                                           ; preds = %.preheader, %112
  %90 = phi ptr [ %127, %112 ], [ %84, %.preheader ]
  %91 = phi i64 [ %125, %112 ], [ %83, %.preheader ]
  %92 = phi ptr [ %124, %112 ], [ %66, %.preheader ]
  %93 = phi ptr [ %123, %112 ], [ %82, %.preheader ]
  %.1149259 = phi ptr [ %116, %112 ], [ %.0148, %.preheader ]
  %.0155258 = phi ptr [ %122, %112 ], [ %3, %.preheader ]
  %.0157257 = phi i64 [ %115, %112 ], [ %69, %.preheader ]
  %.0159256 = phi ptr [ %121, %112 ], [ %61, %.preheader ]
  %94 = icmp ult ptr %90, %93
  %95 = icmp ugt i64 %91, 1
  br i1 %94, label %96, label %105, !unpredictable !15

96:                                               ; preds = %.lr.ph
  br i1 %95, label %98, label %97

97:                                               ; preds = %96
  tail call void @LogAssertFailure(i64 noundef 340, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef nonnull @.str.39)
  tail call void @__assert_fail(ptr noundef nonnull @.str.40, ptr noundef nonnull @.str, i32 noundef 340, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #5
  unreachable

98:                                               ; preds = %96
  %99 = getelementptr inbounds i8, ptr %93, i64 -8
  %100 = load i64, ptr %99, align 8, !tbaa !34
  %101 = add i64 %91, -1
  %.not186 = icmp ugt i64 %101, %100
  %102 = select i1 %.not186, ptr %93, ptr %99
  store ptr %102, ptr %.0155258, align 8, !tbaa !22
  %103 = sub i64 0, %.0157257
  %.idx = select i1 %.not186, i64 0, i64 %103
  %104 = getelementptr inbounds double, ptr %.1149259, i64 %.idx
  br label %133

105:                                              ; preds = %.lr.ph
  br i1 %95, label %106, label %108, !unpredictable !15

106:                                              ; preds = %105
  %107 = add i64 %91, -1
  br label %133

108:                                              ; preds = %105
  %109 = load i64, ptr %.0159256, align 8, !tbaa !19
  %110 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL15IsMultiplyErrorImEEbT_S1_(i64 noundef %.0157257, i64 noundef %109) #6
  br i1 %110, label %111, label %112

111:                                              ; preds = %108
  tail call void @LogAssertFailure(i64 noundef 365, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef nonnull @.str.41)
  tail call void @__assert_fail(ptr noundef nonnull @.str.42, ptr noundef nonnull @.str, i32 noundef 365, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #5
  unreachable

112:                                              ; preds = %108
  %113 = sub i64 0, %.0157257
  %114 = getelementptr inbounds double, ptr %.1149259, i64 %113
  %115 = mul i64 %109, %.0157257
  %116 = getelementptr inbounds double, ptr %114, i64 %115
  %117 = getelementptr i64, ptr %90, i64 %109
  %118 = getelementptr i8, ptr %117, i64 -8
  store ptr %118, ptr %.0155258, align 8, !tbaa !22
  %119 = getelementptr inbounds i8, ptr %.0155258, i64 16
  %120 = load i64, ptr %119, align 8, !tbaa !25
  store i64 %120, ptr %92, align 8, !tbaa !24
  %121 = getelementptr inbounds i8, ptr %.0159256, i64 24
  %122 = getelementptr inbounds i8, ptr %.0155258, i64 24
  %123 = load ptr, ptr %122, align 8, !tbaa !22
  %124 = getelementptr inbounds i8, ptr %.0155258, i64 32
  %125 = load i64, ptr %124, align 8, !tbaa !24
  %126 = getelementptr inbounds i8, ptr %.0159256, i64 32
  %127 = load ptr, ptr %126, align 8, !tbaa !21
  %128 = ptrtoint ptr %123 to i64
  %129 = ptrtoint ptr %127 to i64
  %130 = sub i64 %128, %129
  %131 = ashr exact i64 %130, 3
  %132 = icmp ult i64 %131, %125
  br i1 %132, label %.lr.ph, label %.preheader._crit_edge

133:                                              ; preds = %98, %106
  %storemerge = phi i64 [ %107, %106 ], [ %101, %98 ]
  %.2150.ph = phi ptr [ %.1149259, %106 ], [ %104, %98 ]
  store i64 %storemerge, ptr %92, align 8, !tbaa !24
  br label %68

134:                                              ; preds = %80
  %135 = load ptr, ptr %59, align 8, !tbaa !29
  %136 = icmp eq ptr %60, %135
  br i1 %136, label %138, label %137

137:                                              ; preds = %134
  tail call void @LogAssertFailure(i64 noundef 383, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef nonnull @.str.43)
  tail call void @__assert_fail(ptr noundef nonnull @.str.44, ptr noundef nonnull @.str, i32 noundef 383, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #5
  unreachable

138:                                              ; preds = %134
  %139 = getelementptr inbounds double, ptr %135, i64 %69
  %140 = icmp eq ptr %.0148, %139
  br i1 %140, label %142, label %141

141:                                              ; preds = %138
  tail call void @LogAssertFailure(i64 noundef 384, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef nonnull @.str.45)
  tail call void @__assert_fail(ptr noundef nonnull @.str.46, ptr noundef nonnull @.str, i32 noundef 384, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #5
  unreachable

142:                                              ; preds = %138
  %143 = tail call noundef ptr @_ZNK14NAMESPACE_MAIN4Term15GetTermFeaturesEv(ptr noundef nonnull align 8 dereferenceable(776) %1) #6
  br label %144

144:                                              ; preds = %.loopexit, %142
  %.0144 = phi ptr [ %143, %142 ], [ %164, %.loopexit ]
  %.0142 = phi i64 [ 0, %142 ], [ %163, %.loopexit ]
  %145 = load ptr, ptr %.0144, align 8, !tbaa !17
  %146 = tail call noundef i64 @_ZNK14NAMESPACE_MAIN15FeatureBoosting12GetCountBinsEv(ptr noundef nonnull align 8 dereferenceable(16) %145) #6
  %.not187 = icmp eq i64 %146, 0
  br i1 %.not187, label %147, label %148

147:                                              ; preds = %144
  tail call void @LogAssertFailure(i64 noundef 391, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef nonnull @.str.47)
  tail call void @__assert_fail(ptr noundef nonnull @.str.48, ptr noundef nonnull @.str, i32 noundef 391, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #5
  unreachable

148:                                              ; preds = %144
  %149 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfo", ptr %61, i64 %.0142
  %150 = load i64, ptr %149, align 8, !tbaa !19
  %.not188 = icmp eq i64 %146, %150
  br i1 %.not188, label %.loopexit, label %151

151:                                              ; preds = %148
  %152 = tail call noundef i32 @_ZN14NAMESPACE_MAIN6Tensor14SetCountSlicesEmm(ptr noundef nonnull align 8 dereferenceable(72) %0, i64 noundef %.0142, i64 noundef %146)
  %.not189 = icmp eq i32 %152, 0
  br i1 %.not189, label %153, label %.thread216, !prof !28

153:                                              ; preds = %151
  %.not190 = icmp eq i64 %146, 1
  br i1 %.not190, label %154, label %155

154:                                              ; preds = %153
  tail call void @LogAssertFailure(i64 noundef 402, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef nonnull @.str.49)
  tail call void @__assert_fail(ptr noundef nonnull @.str.50, ptr noundef nonnull @.str, i32 noundef 402, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #5
  unreachable

155:                                              ; preds = %153
  %156 = getelementptr inbounds i8, ptr %149, i64 8
  %157 = load ptr, ptr %156, align 8, !tbaa !21
  %invariant.gep = getelementptr i8, ptr %157, i64 -8
  br label %158

158:                                              ; preds = %161, %155
  %.0133 = phi i64 [ 1, %155 ], [ %162, %161 ]
  %159 = tail call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImmEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuentsr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef %.0133) #6
  br i1 %159, label %160, label %161

160:                                              ; preds = %158
  tail call void @LogAssertFailure(i64 noundef 408, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE, ptr noundef nonnull @.str.51)
  tail call void @__assert_fail(ptr noundef nonnull @.str.52, ptr noundef nonnull @.str, i32 noundef 408, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermE) #5
  unreachable

161:                                              ; preds = %158
  %gep = getelementptr i64, ptr %invariant.gep, i64 %.0133
  store i64 %.0133, ptr %gep, align 8, !tbaa !34
  %162 = add i64 %.0133, 1
  %.not191 = icmp eq i64 %146, %162
  br i1 %.not191, label %.loopexit, label %158, !llvm.loop !35

.loopexit:                                        ; preds = %161, %148
  %163 = add i64 %.0142, 1
  %164 = getelementptr inbounds i8, ptr %.0144, i64 24
  %.not192 = icmp eq ptr %21, %164
  br i1 %.not192, label %165, label %144, !llvm.loop !36

.thread216:                                       ; preds = %151, %56
  %.2.ph = phi i32 [ %57, %56 ], [ %152, %151 ]
  call void @llvm.lifetime.end.p0(i64 720, ptr nonnull %3) #6
  br label %170

165:                                              ; preds = %.loopexit
  call void @llvm.lifetime.end.p0(i64 720, ptr nonnull %3) #6
  br label %166

166:                                              ; preds = %165, %17
  store i8 1, ptr %8, align 8, !tbaa !9
  %167 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %168 = icmp sgt i32 %167, 3
  br i1 %168, label %169, label %170

169:                                              ; preds = %166
  tail call void @InteralLogWithoutArguments(i32 noundef 4, ptr noundef nonnull @_ZZN14NAMESPACE_MAIN6Tensor6ExpandEPKNS_4TermEE13LOG__sMessage_1)
  br label %170

170:                                              ; preds = %.thread216, %169, %166, %11, %14
  %.4 = phi i32 [ 0, %14 ], [ 0, %11 ], [ 0, %169 ], [ 0, %166 ], [ %.2.ph, %.thread216 ]
  ret i32 %.4
}

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImmEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuentsr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef) local_unnamed_addr #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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, !13, i64 40}
!10 = !{!"_ZTSN14NAMESPACE_MAIN6TensorE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !12, i64 32, !13, i64 40, !7, i64 48}
!11 = !{!"long", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!10, !11, i64 8}
!17 = !{!18, !12, i64 0}
!18 = !{!"_ZTSN14NAMESPACE_MAIN11TermFeatureE", !12, i64 0, !11, i64 8, !11, i64 16}
!19 = !{!20, !11, i64 0}
!20 = !{!"_ZTSN14NAMESPACE_MAIN6Tensor13DimensionInfoE", !11, i64 0, !12, i64 8, !11, i64 16}
!21 = !{!20, !12, i64 8}
!22 = !{!23, !12, i64 0}
!23 = !{!"_ZTSN14NAMESPACE_MAIN6Tensor24DimensionInfoStackExpandE", !12, i64 0, !11, i64 8, !11, i64 16}
!24 = !{!23, !11, i64 8}
!25 = !{!23, !11, i64 16}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!29 = !{!10, !12, i64 32}
!30 = !{!31, !31, i64 0}
!31 = !{!"double", !7, i64 0}
!32 = distinct !{!32, !27}
!33 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!34 = !{!11, !11, i64 0}
!35 = distinct !{!35, !27}
!36 = distinct !{!36, !27}


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