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

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

%"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 }

@.str = external hidden unnamed_addr constant [80 x i8], align 1
@__func__._ZN14NAMESPACE_MAIN6Tensor33AddExpandedWithBadValueProtectionEPKd = external hidden unnamed_addr constant [34 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [15 x i8], align 1
@__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor33AddExpandedWithBadValueProtectionEPKd = external hidden unnamed_addr constant [88 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14NAMESPACE_MAIN6Tensor33AddExpandedWithBadValueProtectionEPKd(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef %1) #5 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %12 = load ptr, ptr %3, align 8
  %13 = getelementptr inbounds %"class.NAMESPACE_MAIN::Tensor", ptr %12, i32 0, i32 5
  %14 = load i8, ptr %13, align 8, !tbaa !9, !range !13, !noundef !14
  %15 = trunc i8 %14 to i1
  br i1 %15, label %18, label %16

16:                                               ; preds = %2
  call void @LogAssertFailure(i64 noundef 424, ptr noundef @.str, ptr noundef @__func__._ZN14NAMESPACE_MAIN6Tensor33AddExpandedWithBadValueProtectionEPKd, ptr noundef @.str.53)
  call void @__assert_fail(ptr noundef @.str.54, ptr noundef @.str, i32 noundef 424, ptr noundef @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor33AddExpandedWithBadValueProtectionEPKd) #6
  unreachable

17:                                               ; No predecessors!
  br label %18

18:                                               ; preds = %17, %2
  %19 = phi i1 [ true, %2 ], [ false, %17 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %20 = getelementptr inbounds %"class.NAMESPACE_MAIN::Tensor", ptr %12, i32 0, i32 1
  %21 = load i64, ptr %20, align 8, !tbaa !15
  store i64 %21, ptr %5, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %22 = call noundef ptr @_ZN14NAMESPACE_MAIN6Tensor13GetDimensionsEv(ptr noundef nonnull align 8 dereferenceable(72) %12)
  store ptr %22, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store i64 0, ptr %7, align 8, !tbaa !16
  br label %23

23:                                               ; preds = %37, %18
  %24 = load i64, ptr %7, align 8, !tbaa !16
  %25 = getelementptr inbounds %"class.NAMESPACE_MAIN::Tensor", ptr %12, i32 0, i32 3
  %26 = load i64, ptr %25, align 8, !tbaa !17
  %27 = icmp ult i64 %24, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %40

29:                                               ; preds = %23
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = load i64, ptr %7, align 8, !tbaa !16
  %32 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfo", ptr %30, i64 %31
  %33 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfo", ptr %32, i32 0, i32 0
  %34 = load i64, ptr %33, align 8, !tbaa !18
  %35 = load i64, ptr %5, align 8, !tbaa !16
  %36 = mul i64 %35, %34
  store i64 %36, ptr %5, align 8, !tbaa !16
  br label %37

37:                                               ; preds = %29
  %38 = load i64, ptr %7, align 8, !tbaa !16
  %39 = add i64 %38, 1
  store i64 %39, ptr %7, align 8, !tbaa !16
  br label %23, !llvm.loop !20

40:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %41, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %42 = getelementptr inbounds %"class.NAMESPACE_MAIN::Tensor", ptr %12, i32 0, i32 4
  %43 = load ptr, ptr %42, align 8, !tbaa !22
  store ptr %43, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %44 = getelementptr inbounds %"class.NAMESPACE_MAIN::Tensor", ptr %12, i32 0, i32 4
  %45 = load ptr, ptr %44, align 8, !tbaa !22
  %46 = load i64, ptr %5, align 8, !tbaa !16
  %47 = getelementptr inbounds double, ptr %45, i64 %46
  store ptr %47, ptr %10, align 8, !tbaa !5
  br label %48

48:                                               ; preds = %86, %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = load double, ptr %49, align 8, !tbaa !23
  store double %50, ptr %11, align 8, !tbaa !23
  %51 = load double, ptr %11, align 8, !tbaa !23
  %52 = call noundef zeroext i1 @_ZSt5isnand(double noundef %51)
  br i1 %52, label %53, label %54

53:                                               ; preds = %48
  br label %56

54:                                               ; preds = %48
  %55 = load double, ptr %11, align 8, !tbaa !23
  br label %56

56:                                               ; preds = %54, %53
  %57 = phi double [ 0.000000e+00, %53 ], [ %55, %54 ]
  store double %57, ptr %11, align 8, !tbaa !23
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = load double, ptr %58, align 8, !tbaa !23
  %60 = load double, ptr %11, align 8, !tbaa !23
  %61 = fadd double %59, %60
  store double %61, ptr %11, align 8, !tbaa !23
  %62 = load double, ptr %11, align 8, !tbaa !23
  %63 = call noundef double @_ZNSt14numeric_limitsIdE6lowestEv() #7
  %64 = fcmp ole double %62, %63
  br i1 %64, label %65, label %67

65:                                               ; preds = %56
  %66 = call noundef double @_ZNSt14numeric_limitsIdE6lowestEv() #7
  br label %69

67:                                               ; preds = %56
  %68 = load double, ptr %11, align 8, !tbaa !23
  br label %69

69:                                               ; preds = %67, %65
  %70 = phi double [ %66, %65 ], [ %68, %67 ]
  store double %70, ptr %11, align 8, !tbaa !23
  %71 = call noundef double @_ZNSt14numeric_limitsIdE3maxEv() #7
  %72 = load double, ptr %11, align 8, !tbaa !23
  %73 = fcmp ole double %71, %72
  br i1 %73, label %74, label %76

74:                                               ; preds = %69
  %75 = call noundef double @_ZNSt14numeric_limitsIdE3maxEv() #7
  br label %78

76:                                               ; preds = %69
  %77 = load double, ptr %11, align 8, !tbaa !23
  br label %78

78:                                               ; preds = %76, %74
  %79 = phi double [ %75, %74 ], [ %77, %76 ]
  store double %79, ptr %11, align 8, !tbaa !23
  %80 = load double, ptr %11, align 8, !tbaa !23
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  store double %80, ptr %81, align 8, !tbaa !23
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = getelementptr inbounds double, ptr %82, i32 1
  store ptr %83, ptr %8, align 8, !tbaa !5
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  %85 = getelementptr inbounds double, ptr %84, i32 1
  store ptr %85, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %86

86:                                               ; preds = %78
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = load ptr, ptr %9, align 8, !tbaa !5
  %89 = icmp ne ptr %87, %88
  br i1 %89, label %48, label %90, !llvm.loop !25

90:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  ret void
}

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

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

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { noreturn nounwind }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 40}
!10 = !{!"_ZTSN14NAMESPACE_MAIN6TensorE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !6, i64 32, !12, i64 40, !7, i64 48}
!11 = !{!"long", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!10, !11, i64 8}
!16 = !{!11, !11, i64 0}
!17 = !{!10, !11, i64 24}
!18 = !{!19, !11, i64 0}
!19 = !{!"_ZTSN14NAMESPACE_MAIN6Tensor13DimensionInfoE", !11, i64 0, !6, i64 8, !11, i64 16}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!10, !6, i64 32}
!23 = !{!24, !24, i64 0}
!24 = !{!"double", !7, i64 0}
!25 = distinct !{!25, !21}


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

@.str = external hidden unnamed_addr constant [80 x i8], align 1
@__func__._ZN14NAMESPACE_MAIN6Tensor33AddExpandedWithBadValueProtectionEPKd = external hidden unnamed_addr constant [34 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [15 x i8], align 1
@__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor33AddExpandedWithBadValueProtectionEPKd = external hidden unnamed_addr constant [88 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 dso_local noundef ptr @_ZN14NAMESPACE_MAIN6Tensor13GetDimensionsEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14NAMESPACE_MAIN6Tensor33AddExpandedWithBadValueProtectionEPKd(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr nocapture noundef readonly %1) local_unnamed_addr #4 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 40
  %4 = load i8, ptr %3, align 8, !tbaa !5, !range !12, !noundef !13
  %5 = trunc nuw i8 %4 to i1
  br i1 %5, label %7, label %6

6:                                                ; preds = %2
  tail call void @LogAssertFailure(i64 noundef 424, ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN14NAMESPACE_MAIN6Tensor33AddExpandedWithBadValueProtectionEPKd, ptr noundef nonnull @.str.53)
  tail call void @__assert_fail(ptr noundef nonnull @.str.54, ptr noundef nonnull @.str, i32 noundef 424, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN14NAMESPACE_MAIN6Tensor33AddExpandedWithBadValueProtectionEPKd) #5
  unreachable

7:                                                ; preds = %2
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load i64, ptr %8, align 8, !tbaa !14
  %10 = tail call noundef ptr @_ZN14NAMESPACE_MAIN6Tensor13GetDimensionsEv(ptr noundef nonnull align 8 dereferenceable(72) %0)
  %11 = getelementptr inbounds i8, ptr %0, i64 24
  %12 = load i64, ptr %11, align 8, !tbaa !15
  %.not30 = icmp eq i64 %12, 0
  br i1 %.not30, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %7
  %xtraiter = and i64 %12, 3
  %13 = icmp ult i64 %12, 4
  br i1 %13, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %12, -4
  br label %.lr.ph

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph, %.lr.ph.preheader
  %.lcssa.ph = phi i64 [ poison, %.lr.ph.preheader ], [ %35, %.lr.ph ]
  %.029.unr = phi i64 [ %9, %.lr.ph.preheader ], [ %35, %.lr.ph ]
  %.02428.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %36, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil
  %.029.epil = phi i64 [ %16, %.lr.ph.epil ], [ %.029.unr, %._crit_edge.loopexit.unr-lcssa ]
  %.02428.epil = phi i64 [ %17, %.lr.ph.epil ], [ %.02428.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %14 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfo", ptr %10, i64 %.02428.epil
  %15 = load i64, ptr %14, align 8, !tbaa !16
  %16 = mul i64 %15, %.029.epil
  %17 = add nuw i64 %.02428.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.lr.ph.epil, !llvm.loop !18

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil, %7
  %.0.lcssa = phi i64 [ %9, %7 ], [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %16, %.lr.ph.epil ]
  %18 = getelementptr inbounds i8, ptr %0, i64 32
  %19 = load ptr, ptr %18, align 8, !tbaa !20
  %20 = getelementptr inbounds double, ptr %19, i64 %.0.lcssa
  br label %37

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %.029 = phi i64 [ %9, %.lr.ph.preheader.new ], [ %35, %.lr.ph ]
  %.02428 = phi i64 [ 0, %.lr.ph.preheader.new ], [ %36, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %21 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfo", ptr %10, i64 %.02428
  %22 = load i64, ptr %21, align 8, !tbaa !16
  %23 = mul i64 %22, %.029
  %24 = or disjoint i64 %.02428, 1
  %25 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfo", ptr %10, i64 %24
  %26 = load i64, ptr %25, align 8, !tbaa !16
  %27 = mul i64 %26, %23
  %28 = or disjoint i64 %.02428, 2
  %29 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfo", ptr %10, i64 %28
  %30 = load i64, ptr %29, align 8, !tbaa !16
  %31 = mul i64 %30, %27
  %32 = or disjoint i64 %.02428, 3
  %33 = getelementptr inbounds %"struct.NAMESPACE_MAIN::Tensor::DimensionInfo", ptr %10, i64 %32
  %34 = load i64, ptr %33, align 8, !tbaa !16
  %35 = mul i64 %34, %31
  %36 = add nuw i64 %.02428, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !21

37:                                               ; preds = %53, %._crit_edge
  %.023 = phi ptr [ %1, %._crit_edge ], [ %55, %53 ]
  %.022 = phi ptr [ %19, %._crit_edge ], [ %56, %53 ]
  %38 = load double, ptr %.023, align 8, !tbaa !23
  %39 = tail call noundef zeroext i1 @_ZSt5isnand(double noundef %38)
  %40 = select i1 %39, double 0.000000e+00, double %38
  %41 = load double, ptr %.022, align 8, !tbaa !23
  %42 = fadd double %41, %40
  %43 = tail call noundef double @_ZNSt14numeric_limitsIdE6lowestEv() #6
  %44 = fcmp ugt double %42, %43
  br i1 %44, label %47, label %45

45:                                               ; preds = %37
  %46 = tail call noundef double @_ZNSt14numeric_limitsIdE6lowestEv() #6
  br label %47

47:                                               ; preds = %37, %45
  %48 = phi double [ %46, %45 ], [ %42, %37 ]
  %49 = tail call noundef double @_ZNSt14numeric_limitsIdE3maxEv() #6
  %50 = fcmp ugt double %49, %48
  br i1 %50, label %53, label %51

51:                                               ; preds = %47
  %52 = tail call noundef double @_ZNSt14numeric_limitsIdE3maxEv() #6
  br label %53

53:                                               ; preds = %47, %51
  %54 = phi double [ %52, %51 ], [ %48, %47 ]
  store double %54, ptr %.022, align 8, !tbaa !23
  %55 = getelementptr inbounds i8, ptr %.023, i64 8
  %56 = getelementptr inbounds i8, ptr %.022, i64 8
  %.not = icmp eq ptr %20, %56
  br i1 %.not, label %57, label %37, !llvm.loop !25

57:                                               ; preds = %53
  ret void
}

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

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

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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, !11, i64 40}
!6 = !{!"_ZTSN14NAMESPACE_MAIN6TensorE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !11, i64 40, !8, i64 48}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{i8 0, i8 2}
!13 = !{}
!14 = !{!6, !7, i64 8}
!15 = !{!6, !7, i64 24}
!16 = !{!17, !7, i64 0}
!17 = !{!"_ZTSN14NAMESPACE_MAIN6Tensor13DimensionInfoE", !7, i64 0, !10, i64 8, !7, i64 16}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.unroll.disable"}
!20 = !{!6, !10, i64 32}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!24, !24, i64 0}
!24 = !{!"double", !8, i64 0}
!25 = distinct !{!25, !22}


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