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

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

@.str = external hidden unnamed_addr constant [103 x i8], align 1
@__func__._ZN14NAMESPACE_MAIN29PartitionMultiDimensionalTreeEbmmmimddddPKNS_7BinBaseEPS0_PNS_6TensorEPvPKmPdS9_S9_S9_mS6_S2_S2_ = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1
@__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN29PartitionMultiDimensionalTreeEbmmmimddddPKNS_7BinBaseEPS0_PNS_6TensorEPvPKmPdS9_S9_S9_mS6_S2_S2_ = external hidden unnamed_addr constant [431 x i8], align 1

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

61:                                               ; preds = %78, %23
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #4
  %62 = load ptr, ptr %51, align 8, !tbaa !15
  %63 = load i64, ptr %62, align 8, !tbaa !9
  %64 = sub i64 %63, 1
  store i64 %64, ptr %53, align 8, !tbaa !9
  %65 = load i64, ptr %53, align 8, !tbaa !9
  %66 = icmp ne i64 0, %65
  br i1 %66, label %67, label %75

67:                                               ; preds = %61
  %68 = load ptr, ptr %48, align 8, !tbaa !15
  %69 = load ptr, ptr %50, align 8, !tbaa !15
  store ptr %68, ptr %69, align 8, !tbaa !15
  %70 = load i64, ptr %53, align 8, !tbaa !9
  %71 = load ptr, ptr %48, align 8, !tbaa !15
  %72 = getelementptr inbounds i8, ptr %71, i64 %70
  store ptr %72, ptr %48, align 8, !tbaa !15
  %73 = load ptr, ptr %50, align 8, !tbaa !15
  %74 = getelementptr inbounds ptr, ptr %73, i32 1
  store ptr %74, ptr %50, align 8, !tbaa !15
  br label %75

75:                                               ; preds = %67, %61
  %76 = load ptr, ptr %51, align 8, !tbaa !15
  %77 = getelementptr inbounds i64, ptr %76, i32 1
  store ptr %77, ptr %51, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #4
  br label %78

78:                                               ; preds = %75
  %79 = load ptr, ptr %52, align 8, !tbaa !15
  %80 = load ptr, ptr %51, align 8, !tbaa !15
  %81 = icmp ne ptr %79, %80
  br i1 %81, label %61, label %82, !llvm.loop !17

82:                                               ; preds = %78
  %83 = load i64, ptr %25, align 8, !tbaa !9
  %84 = icmp ule i64 1, %83
  br i1 %84, label %87, label %85

85:                                               ; preds = %82
  call void @LogAssertFailure(i64 noundef 1172, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN29PartitionMultiDimensionalTreeEbmmmimddddPKNS_7BinBaseEPS0_PNS_6TensorEPvPKmPdS9_S9_S9_mS6_S2_S2_, ptr noundef @.str.1)
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str, i32 noundef 1172, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN29PartitionMultiDimensionalTreeEbmmmimddddPKNS_7BinBaseEPS0_PNS_6TensorEPvPKmPdS9_S9_S9_mS6_S2_S2_) #5
  unreachable

86:                                               ; No predecessors!
  br label %87

87:                                               ; preds = %86, %82
  %88 = phi i1 [ true, %82 ], [ false, %86 ]
  %89 = load i8, ptr %24, align 1, !tbaa !5, !range !19, !noundef !20
  %90 = trunc i8 %89 to i1
  br i1 %90, label %91, label %143

91:                                               ; preds = %87
  %92 = load i64, ptr %25, align 8, !tbaa !9
  %93 = icmp ne i64 1, %92
  br i1 %93, label %94, label %118

94:                                               ; preds = %91
  %95 = load i64, ptr %25, align 8, !tbaa !9
  %96 = load i64, ptr %26, align 8, !tbaa !9
  %97 = load i64, ptr %27, align 8, !tbaa !9
  %98 = load i32, ptr %28, align 4, !tbaa !11
  %99 = load i64, ptr %29, align 8, !tbaa !9
  %100 = load double, ptr %30, align 8, !tbaa !13
  %101 = load double, ptr %31, align 8, !tbaa !13
  %102 = load double, ptr %32, align 8, !tbaa !13
  %103 = load double, ptr %33, align 8, !tbaa !13
  %104 = load ptr, ptr %34, align 8, !tbaa !15
  %105 = load ptr, ptr %35, align 8, !tbaa !15
  %106 = load ptr, ptr %36, align 8, !tbaa !15
  %107 = load ptr, ptr %37, align 8, !tbaa !15
  %108 = load ptr, ptr %38, align 8, !tbaa !15
  %109 = load ptr, ptr %39, align 8, !tbaa !15
  %110 = load ptr, ptr %40, align 8, !tbaa !15
  %111 = load ptr, ptr %41, align 8, !tbaa !15
  %112 = load ptr, ptr %42, align 8, !tbaa !15
  %113 = load i64, ptr %43, align 8, !tbaa !9
  %114 = getelementptr inbounds [30 x ptr], ptr %49, i64 0, i64 0
  %115 = load ptr, ptr %45, align 8, !tbaa !15
  %116 = load ptr, ptr %46, align 8, !tbaa !15
  %117 = call noundef i32 @_ZN14NAMESPACE_MAIN35PartitionMultiDimensionalTreeTargetILb1ELm3EE4FuncILb0EEEimmmimddddPKNS_7BinBaseEPS3_PNS_6TensorEPvPKmPdSC_SC_SC_mPPhS5_S5_(i64 noundef %95, i64 noundef %96, i64 noundef %97, i32 noundef %98, i64 noundef %99, double noundef %100, double noundef %101, double noundef %102, double noundef %103, ptr noundef %104, ptr noundef %105, ptr noundef %106, ptr noundef %107, ptr noundef %108, ptr noundef %109, ptr noundef %110, ptr noundef %111, ptr noundef %112, i64 noundef %113, ptr noundef %114, ptr noundef %115, ptr noundef %116)
  store i32 %117, ptr %47, align 4, !tbaa !11
  br label %142

118:                                              ; preds = %91
  %119 = load i64, ptr %25, align 8, !tbaa !9
  %120 = load i64, ptr %26, align 8, !tbaa !9
  %121 = load i64, ptr %27, align 8, !tbaa !9
  %122 = load i32, ptr %28, align 4, !tbaa !11
  %123 = load i64, ptr %29, align 8, !tbaa !9
  %124 = load double, ptr %30, align 8, !tbaa !13
  %125 = load double, ptr %31, align 8, !tbaa !13
  %126 = load double, ptr %32, align 8, !tbaa !13
  %127 = load double, ptr %33, align 8, !tbaa !13
  %128 = load ptr, ptr %34, align 8, !tbaa !15
  %129 = load ptr, ptr %35, align 8, !tbaa !15
  %130 = load ptr, ptr %36, align 8, !tbaa !15
  %131 = load ptr, ptr %37, align 8, !tbaa !15
  %132 = load ptr, ptr %38, align 8, !tbaa !15
  %133 = load ptr, ptr %39, align 8, !tbaa !15
  %134 = load ptr, ptr %40, align 8, !tbaa !15
  %135 = load ptr, ptr %41, align 8, !tbaa !15
  %136 = load ptr, ptr %42, align 8, !tbaa !15
  %137 = load i64, ptr %43, align 8, !tbaa !9
  %138 = getelementptr inbounds [30 x ptr], ptr %49, i64 0, i64 0
  %139 = load ptr, ptr %45, align 8, !tbaa !15
  %140 = load ptr, ptr %46, align 8, !tbaa !15
  %141 = call noundef i32 @_ZN14NAMESPACE_MAIN37PartitionMultiDimensionalTreeInternalILb1ELm1EE4FuncILb0EEEimmmimddddPKNS_7BinBaseEPS3_PNS_6TensorEPvPKmPdSC_SC_SC_mPPhS5_S5_(i64 noundef %119, i64 noundef %120, i64 noundef %121, i32 noundef %122, i64 noundef %123, double noundef %124, double noundef %125, double noundef %126, double noundef %127, ptr noundef %128, ptr noundef %129, ptr noundef %130, ptr noundef %131, ptr noundef %132, ptr noundef %133, ptr noundef %134, ptr noundef %135, ptr noundef %136, i64 noundef %137, ptr noundef %138, ptr noundef %139, ptr noundef %140)
  store i32 %141, ptr %47, align 4, !tbaa !11
  br label %142

142:                                              ; preds = %118, %94
  br label %195

143:                                              ; preds = %87
  %144 = load i64, ptr %25, align 8, !tbaa !9
  %145 = icmp ne i64 1, %144
  br i1 %145, label %146, label %170

146:                                              ; preds = %143
  %147 = load i64, ptr %25, align 8, !tbaa !9
  %148 = load i64, ptr %26, align 8, !tbaa !9
  %149 = load i64, ptr %27, align 8, !tbaa !9
  %150 = load i32, ptr %28, align 4, !tbaa !11
  %151 = load i64, ptr %29, align 8, !tbaa !9
  %152 = load double, ptr %30, align 8, !tbaa !13
  %153 = load double, ptr %31, align 8, !tbaa !13
  %154 = load double, ptr %32, align 8, !tbaa !13
  %155 = load double, ptr %33, align 8, !tbaa !13
  %156 = load ptr, ptr %34, align 8, !tbaa !15
  %157 = load ptr, ptr %35, align 8, !tbaa !15
  %158 = load ptr, ptr %36, align 8, !tbaa !15
  %159 = load ptr, ptr %37, align 8, !tbaa !15
  %160 = load ptr, ptr %38, align 8, !tbaa !15
  %161 = load ptr, ptr %39, align 8, !tbaa !15
  %162 = load ptr, ptr %40, align 8, !tbaa !15
  %163 = load ptr, ptr %41, align 8, !tbaa !15
  %164 = load ptr, ptr %42, align 8, !tbaa !15
  %165 = load i64, ptr %43, align 8, !tbaa !9
  %166 = getelementptr inbounds [30 x ptr], ptr %49, i64 0, i64 0
  %167 = load ptr, ptr %45, align 8, !tbaa !15
  %168 = load ptr, ptr %46, align 8, !tbaa !15
  %169 = call noundef i32 @_ZN14NAMESPACE_MAIN37PartitionMultiDimensionalTreeInternalILb0ELm0EE4FuncILb0EEEimmmimddddPKNS_7BinBaseEPS3_PNS_6TensorEPvPKmPdSC_SC_SC_mPPhS5_S5_(i64 noundef %147, i64 noundef %148, i64 noundef %149, i32 noundef %150, i64 noundef %151, double noundef %152, double noundef %153, double noundef %154, double noundef %155, ptr noundef %156, ptr noundef %157, ptr noundef %158, ptr noundef %159, ptr noundef %160, ptr noundef %161, ptr noundef %162, ptr noundef %163, ptr noundef %164, i64 noundef %165, ptr noundef %166, ptr noundef %167, ptr noundef %168)
  store i32 %169, ptr %47, align 4, !tbaa !11
  br label %194

170:                                              ; preds = %143
  %171 = load i64, ptr %25, align 8, !tbaa !9
  %172 = load i64, ptr %26, align 8, !tbaa !9
  %173 = load i64, ptr %27, align 8, !tbaa !9
  %174 = load i32, ptr %28, align 4, !tbaa !11
  %175 = load i64, ptr %29, align 8, !tbaa !9
  %176 = load double, ptr %30, align 8, !tbaa !13
  %177 = load double, ptr %31, align 8, !tbaa !13
  %178 = load double, ptr %32, align 8, !tbaa !13
  %179 = load double, ptr %33, align 8, !tbaa !13
  %180 = load ptr, ptr %34, align 8, !tbaa !15
  %181 = load ptr, ptr %35, align 8, !tbaa !15
  %182 = load ptr, ptr %36, align 8, !tbaa !15
  %183 = load ptr, ptr %37, align 8, !tbaa !15
  %184 = load ptr, ptr %38, align 8, !tbaa !15
  %185 = load ptr, ptr %39, align 8, !tbaa !15
  %186 = load ptr, ptr %40, align 8, !tbaa !15
  %187 = load ptr, ptr %41, align 8, !tbaa !15
  %188 = load ptr, ptr %42, align 8, !tbaa !15
  %189 = load i64, ptr %43, align 8, !tbaa !9
  %190 = getelementptr inbounds [30 x ptr], ptr %49, i64 0, i64 0
  %191 = load ptr, ptr %45, align 8, !tbaa !15
  %192 = load ptr, ptr %46, align 8, !tbaa !15
  %193 = call noundef i32 @_ZN14NAMESPACE_MAIN37PartitionMultiDimensionalTreeInternalILb0ELm1EE4FuncILb0EEEimmmimddddPKNS_7BinBaseEPS3_PNS_6TensorEPvPKmPdSC_SC_SC_mPPhS5_S5_(i64 noundef %171, i64 noundef %172, i64 noundef %173, i32 noundef %174, i64 noundef %175, double noundef %176, double noundef %177, double noundef %178, double noundef %179, ptr noundef %180, ptr noundef %181, ptr noundef %182, ptr noundef %183, ptr noundef %184, ptr noundef %185, ptr noundef %186, ptr noundef %187, ptr noundef %188, i64 noundef %189, ptr noundef %190, ptr noundef %191, ptr noundef %192)
  store i32 %193, ptr %47, align 4, !tbaa !11
  br label %194

194:                                              ; preds = %170, %146
  br label %195

195:                                              ; preds = %194, %142
  %196 = load i32, ptr %47, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #4
  call void @llvm.lifetime.end.p0(i64 240, ptr %49) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #4
  ret i32 %196
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN14NAMESPACE_MAIN35PartitionMultiDimensionalTreeTargetILb1ELm3EE4FuncILb0EEEimmmimddddPKNS_7BinBaseEPS3_PNS_6TensorEPvPKmPdSC_SC_SC_mPPhS5_S5_(i64 noundef, i64 noundef, i64 noundef, i32 noundef, i64 noundef, double noundef, double noundef, double noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN14NAMESPACE_MAIN37PartitionMultiDimensionalTreeInternalILb1ELm1EE4FuncILb0EEEimmmimddddPKNS_7BinBaseEPS3_PNS_6TensorEPvPKmPdSC_SC_SC_mPPhS5_S5_(i64 noundef, i64 noundef, i64 noundef, i32 noundef, i64 noundef, double noundef, double noundef, double noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN14NAMESPACE_MAIN37PartitionMultiDimensionalTreeInternalILb0ELm0EE4FuncILb0EEEimmmimddddPKNS_7BinBaseEPS3_PNS_6TensorEPvPKmPdSC_SC_SC_mPPhS5_S5_(i64 noundef, i64 noundef, i64 noundef, i32 noundef, i64 noundef, double noundef, double noundef, double noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN14NAMESPACE_MAIN37PartitionMultiDimensionalTreeInternalILb0ELm1EE4FuncILb0EEEimmmimddddPKNS_7BinBaseEPS3_PNS_6TensorEPvPKmPdSC_SC_SC_mPPhS5_S5_(i64 noundef, i64 noundef, i64 noundef, i32 noundef, i64 noundef, double noundef, double noundef, double noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) #0 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{i8 0, i8 2}
!20 = !{}


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

@.str = external hidden unnamed_addr constant [103 x i8], align 1
@__func__._ZN14NAMESPACE_MAIN29PartitionMultiDimensionalTreeEbmmmimddddPKNS_7BinBaseEPS0_PNS_6TensorEPvPKmPdS9_S9_S9_mS6_S2_S2_ = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1
@__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN29PartitionMultiDimensionalTreeEbmmmimddddPKNS_7BinBaseEPS0_PNS_6TensorEPvPKmPdS9_S9_S9_mS6_S2_S2_ = external hidden unnamed_addr constant [431 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN14NAMESPACE_MAIN29PartitionMultiDimensionalTreeEbmmmimddddPKNS_7BinBaseEPS0_PNS_6TensorEPvPKmPdS9_S9_S9_mS6_S2_S2_(i1 noundef zeroext %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, i32 noundef %4, i64 noundef %5, double noundef %6, double noundef %7, double noundef %8, double noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, i64 noundef %19, ptr noundef %20, ptr noundef %21, ptr noundef %22) local_unnamed_addr #0 {
  %24 = alloca [30 x ptr], align 16
  call void @llvm.lifetime.start.p0(i64 240, ptr nonnull %24) #4
  %25 = getelementptr inbounds i64, ptr %14, i64 %2
  br label %26

26:                                               ; preds = %32, %23
  %.0104 = phi ptr [ %24, %23 ], [ %.1105, %32 ]
  %.0103 = phi ptr [ %14, %23 ], [ %33, %32 ]
  %.0102 = phi ptr [ %20, %23 ], [ %.1, %32 ]
  %27 = load i64, ptr %.0103, align 8, !tbaa !5
  %28 = add i64 %27, -1
  %.not = icmp eq i64 %28, 0
  br i1 %.not, label %32, label %29

29:                                               ; preds = %26
  store ptr %.0102, ptr %.0104, align 8, !tbaa !9
  %30 = getelementptr inbounds i8, ptr %.0102, i64 %28
  %31 = getelementptr inbounds i8, ptr %.0104, i64 8
  br label %32

32:                                               ; preds = %29, %26
  %.1105 = phi ptr [ %31, %29 ], [ %.0104, %26 ]
  %.1 = phi ptr [ %30, %29 ], [ %.0102, %26 ]
  %33 = getelementptr inbounds i8, ptr %.0103, i64 8
  %.not109 = icmp eq ptr %25, %33
  br i1 %.not109, label %34, label %26, !llvm.loop !11

34:                                               ; preds = %32
  %.not110 = icmp eq i64 %1, 0
  br i1 %.not110, label %35, label %36

35:                                               ; preds = %34
  tail call void @LogAssertFailure(i64 noundef 1172, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN29PartitionMultiDimensionalTreeEbmmmimddddPKNS_7BinBaseEPS0_PNS_6TensorEPvPKmPdS9_S9_S9_mS6_S2_S2_, ptr noundef nonnull @.str.1)
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str, i32 noundef 1172, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN29PartitionMultiDimensionalTreeEbmmmimddddPKNS_7BinBaseEPS0_PNS_6TensorEPvPKmPdS9_S9_S9_mS6_S2_S2_) #5
  unreachable

36:                                               ; preds = %34
  %.not112 = icmp eq i64 %1, 1
  br i1 %0, label %37, label %42

37:                                               ; preds = %36
  br i1 %.not112, label %40, label %38

38:                                               ; preds = %37
  %39 = call noundef i32 @_ZN14NAMESPACE_MAIN35PartitionMultiDimensionalTreeTargetILb1ELm3EE4FuncILb0EEEimmmimddddPKNS_7BinBaseEPS3_PNS_6TensorEPvPKmPdSC_SC_SC_mPPhS5_S5_(i64 noundef %1, i64 noundef %2, i64 noundef %3, i32 noundef %4, i64 noundef %5, double noundef %6, double noundef %7, double noundef %8, double noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, i64 noundef %19, ptr noundef nonnull %24, ptr noundef %21, ptr noundef %22)
  br label %47

40:                                               ; preds = %37
  %41 = call noundef i32 @_ZN14NAMESPACE_MAIN37PartitionMultiDimensionalTreeInternalILb1ELm1EE4FuncILb0EEEimmmimddddPKNS_7BinBaseEPS3_PNS_6TensorEPvPKmPdSC_SC_SC_mPPhS5_S5_(i64 noundef 1, i64 noundef %2, i64 noundef %3, i32 noundef %4, i64 noundef %5, double noundef %6, double noundef %7, double noundef %8, double noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, i64 noundef %19, ptr noundef nonnull %24, ptr noundef %21, ptr noundef %22)
  br label %47

42:                                               ; preds = %36
  br i1 %.not112, label %45, label %43

43:                                               ; preds = %42
  %44 = call noundef i32 @_ZN14NAMESPACE_MAIN37PartitionMultiDimensionalTreeInternalILb0ELm0EE4FuncILb0EEEimmmimddddPKNS_7BinBaseEPS3_PNS_6TensorEPvPKmPdSC_SC_SC_mPPhS5_S5_(i64 noundef %1, i64 noundef %2, i64 noundef %3, i32 noundef %4, i64 noundef %5, double noundef %6, double noundef %7, double noundef %8, double noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, i64 noundef %19, ptr noundef nonnull %24, ptr noundef %21, ptr noundef %22)
  br label %47

45:                                               ; preds = %42
  %46 = call noundef i32 @_ZN14NAMESPACE_MAIN37PartitionMultiDimensionalTreeInternalILb0ELm1EE4FuncILb0EEEimmmimddddPKNS_7BinBaseEPS3_PNS_6TensorEPvPKmPdSC_SC_SC_mPPhS5_S5_(i64 noundef 1, i64 noundef %2, i64 noundef %3, i32 noundef %4, i64 noundef %5, double noundef %6, double noundef %7, double noundef %8, double noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, i64 noundef %19, ptr noundef nonnull %24, ptr noundef %21, ptr noundef %22)
  br label %47

47:                                               ; preds = %43, %45, %38, %40
  %.0 = phi i32 [ %39, %38 ], [ %41, %40 ], [ %44, %43 ], [ %46, %45 ]
  call void @llvm.lifetime.end.p0(i64 240, ptr nonnull %24) #4
  ret i32 %.0
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN14NAMESPACE_MAIN35PartitionMultiDimensionalTreeTargetILb1ELm3EE4FuncILb0EEEimmmimddddPKNS_7BinBaseEPS3_PNS_6TensorEPvPKmPdSC_SC_SC_mPPhS5_S5_(i64 noundef, i64 noundef, i64 noundef, i32 noundef, i64 noundef, double noundef, double noundef, double noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN14NAMESPACE_MAIN37PartitionMultiDimensionalTreeInternalILb1ELm1EE4FuncILb0EEEimmmimddddPKNS_7BinBaseEPS3_PNS_6TensorEPvPKmPdSC_SC_SC_mPPhS5_S5_(i64 noundef, i64 noundef, i64 noundef, i32 noundef, i64 noundef, double noundef, double noundef, double noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN14NAMESPACE_MAIN37PartitionMultiDimensionalTreeInternalILb0ELm0EE4FuncILb0EEEimmmimddddPKNS_7BinBaseEPS3_PNS_6TensorEPvPKmPdSC_SC_SC_mPPhS5_S5_(i64 noundef, i64 noundef, i64 noundef, i32 noundef, i64 noundef, double noundef, double noundef, double noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN14NAMESPACE_MAIN37PartitionMultiDimensionalTreeInternalILb0ELm1EE4FuncILb0EEEimmmimddddPKNS_7BinBaseEPS3_PNS_6TensorEPvPKmPdSC_SC_SC_mPPhS5_S5_(i64 noundef, i64 noundef, i64 noundef, i32 noundef, i64 noundef, double noundef, double noundef, double noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0 align 2

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


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