; LLVM IR from NVIDIA/DALI :: dali/operators/image/resize (resize_attr)

; 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.dali::span" = type { ptr, i64 }
%"class.dali::span.70" = type { ptr, i64 }

@.str.36 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [88 x i8], align 1
@__PRETTY_FUNCTION__._ZN4dali17CalculateInputRoIERNS_11SmallVectorIfLm3ESaIfEEES3_bbNS_4spanIKfLln1EEES6_RKNS_15TensorListShapeILin1EEEiii = external hidden unnamed_addr constant [171 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [64 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali17CalculateInputRoIERNS_11SmallVectorIfLm3ESaIfEEES3_bbNS_4spanIKfLln1EEES6_RKNS_15TensorListShapeILin1EEEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i1 noundef zeroext %2, i1 noundef zeroext %3, ptr %4, i64 %5, ptr noundef byval(%"class.dali::span") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %8, i32 noundef %9, i32 noundef %10) #1 {
  %12 = alloca %"class.dali::span", align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i8, align 1
  %16 = alloca i8, align 1
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca %"class.dali::span.70", align 8
  %23 = alloca i32, align 4
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca float, align 4
  %27 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 0
  store ptr %4, ptr %27, align 8
  %28 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 1
  store i64 %5, ptr %28, align 8
  store ptr %0, ptr %13, align 8, !tbaa !5
  store ptr %1, ptr %14, align 8, !tbaa !5
  %29 = zext i1 %2 to i8
  store i8 %29, ptr %15, align 1, !tbaa !9
  %30 = zext i1 %3 to i8
  store i8 %30, ptr %16, align 1, !tbaa !9
  store ptr %7, ptr %17, align 8, !tbaa !5
  store i32 %8, ptr %18, align 4, !tbaa !11
  store i32 %9, ptr %19, align 4, !tbaa !11
  store i32 %10, ptr %20, align 4, !tbaa !11
  %31 = load ptr, ptr %13, align 8, !tbaa !5
  %32 = load i32, ptr %19, align 4, !tbaa !11
  %33 = sext i32 %32 to i64
  call void @_ZN4dali11SmallVectorIfLm3ESaIfEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %33)
  %34 = load ptr, ptr %14, align 8, !tbaa !5
  %35 = load i32, ptr %19, align 4, !tbaa !11
  %36 = sext i32 %35 to i64
  call void @_ZN4dali11SmallVectorIfLm3ESaIfEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef %36)
  %37 = call noundef i64 @_ZNK4dali4spanIKfLln1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  %38 = call noundef i64 @_ZNK4dali4spanIKfLln1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  %39 = icmp eq i64 %37, %38
  br i1 %39, label %40, label %41

40:                                               ; preds = %11
  br label %43

41:                                               ; preds = %11
  call void @__assert_fail(ptr noundef @.str.36, ptr noundef @.str.37, i32 noundef 130, ptr noundef @__PRETTY_FUNCTION__._ZN4dali17CalculateInputRoIERNS_11SmallVectorIfLm3ESaIfEEES3_bbNS_4spanIKfLln1EEES6_RKNS_15TensorListShapeILin1EEEiii) #7
  unreachable

42:                                               ; No predecessors!
  br label %43

43:                                               ; preds = %42, %40
  %44 = load i8, ptr %15, align 1, !tbaa !9, !range !13, !noundef !14
  %45 = trunc i8 %44 to i1
  br i1 %45, label %46, label %54

46:                                               ; preds = %43
  %47 = call noundef i64 @_ZNK4dali4spanIKfLln1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  %48 = load i32, ptr %19, align 4, !tbaa !11
  %49 = load i32, ptr %18, align 4, !tbaa !11
  %50 = add nsw i32 %49, 1
  %51 = mul nsw i32 %48, %50
  %52 = sext i32 %51 to i64
  %53 = icmp sge i64 %47, %52
  br label %54

54:                                               ; preds = %46, %43
  %55 = phi i1 [ true, %43 ], [ %53, %46 ]
  br i1 %55, label %56, label %57

56:                                               ; preds = %54
  br label %59

57:                                               ; preds = %54
  call void @__assert_fail(ptr noundef @.str.38, ptr noundef @.str.37, i32 noundef 131, ptr noundef @__PRETTY_FUNCTION__._ZN4dali17CalculateInputRoIERNS_11SmallVectorIfLm3ESaIfEEES3_bbNS_4spanIKfLln1EEES6_RKNS_15TensorListShapeILin1EEEiii) #7
  unreachable

58:                                               ; No predecessors!
  br label %59

59:                                               ; preds = %58, %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #6
  %60 = load ptr, ptr %17, align 8, !tbaa !5
  %61 = load i32, ptr %18, align 4, !tbaa !11
  %62 = sext i32 %61 to i64
  %63 = call { ptr, i64 } @_ZNK4dali19TensorListShapeBaseINS_15TensorListShapeILin1EEELin1EE17tensor_shape_spanEl(ptr noundef nonnull align 8 dereferenceable(28) %60, i64 noundef %62)
  %64 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 0
  %65 = extractvalue { ptr, i64 } %63, 0
  store ptr %65, ptr %64, align 8
  %66 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 1
  %67 = extractvalue { ptr, i64 } %63, 1
  store i64 %67, ptr %66, align 8
  %68 = load i32, ptr %20, align 4, !tbaa !11
  %69 = sext i32 %68 to i64
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4dali4spanIKlLln1EEixEl(ptr noundef nonnull align 8 dereferenceable(16) %22, i64 noundef %69)
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #6
  store ptr %70, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !11
  br label %71

71:                                               ; preds = %173, %59
  %72 = load i32, ptr %23, align 4, !tbaa !11
  %73 = load i32, ptr %19, align 4, !tbaa !11
  %74 = icmp slt i32 %72, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %176

76:                                               ; preds = %71
  %77 = load i8, ptr %15, align 1, !tbaa !9, !range !13, !noundef !14
  %78 = trunc i8 %77 to i1
  br i1 %78, label %79, label %157

79:                                               ; preds = %76
  %80 = load ptr, ptr %21, align 8, !tbaa !5
  %81 = load i32, ptr %23, align 4, !tbaa !11
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds i64, ptr %80, i64 %82
  %84 = load i64, ptr %83, align 8, !tbaa !15
  %85 = icmp sgt i64 %84, 0
  br i1 %85, label %86, label %157

86:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %87 = load i32, ptr %19, align 4, !tbaa !11
  %88 = load i32, ptr %18, align 4, !tbaa !11
  %89 = mul nsw i32 %87, %88
  %90 = load i32, ptr %23, align 4, !tbaa !11
  %91 = add nsw i32 %89, %90
  %92 = sext i32 %91 to i64
  %93 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4dali4spanIKfLln1EEixEl(ptr noundef nonnull align 8 dereferenceable(16) %12, i64 noundef %92)
  %94 = load float, ptr %93, align 4, !tbaa !17
  %95 = fpext float %94 to double
  store double %95, ptr %24, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %96 = load i32, ptr %19, align 4, !tbaa !11
  %97 = load i32, ptr %18, align 4, !tbaa !11
  %98 = mul nsw i32 %96, %97
  %99 = load i32, ptr %23, align 4, !tbaa !11
  %100 = add nsw i32 %98, %99
  %101 = sext i32 %100 to i64
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4dali4spanIKfLln1EEixEl(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %101)
  %103 = load float, ptr %102, align 4, !tbaa !17
  %104 = fpext float %103 to double
  store double %104, ptr %25, align 8, !tbaa !19
  %105 = load i8, ptr %16, align 1, !tbaa !9, !range !13, !noundef !14
  %106 = trunc i8 %105 to i1
  br i1 %106, label %107, label %124

107:                                              ; preds = %86
  %108 = load ptr, ptr %21, align 8, !tbaa !5
  %109 = load i32, ptr %23, align 4, !tbaa !11
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds i64, ptr %108, i64 %110
  %112 = load i64, ptr %111, align 8, !tbaa !15
  %113 = sitofp i64 %112 to double
  %114 = load double, ptr %24, align 8, !tbaa !19
  %115 = fmul double %114, %113
  store double %115, ptr %24, align 8, !tbaa !19
  %116 = load ptr, ptr %21, align 8, !tbaa !5
  %117 = load i32, ptr %23, align 4, !tbaa !11
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds i64, ptr %116, i64 %118
  %120 = load i64, ptr %119, align 8, !tbaa !15
  %121 = sitofp i64 %120 to double
  %122 = load double, ptr %25, align 8, !tbaa !19
  %123 = fmul double %122, %121
  store double %123, ptr %25, align 8, !tbaa !19
  br label %124

124:                                              ; preds = %107, %86
  %125 = load double, ptr %25, align 8, !tbaa !19
  %126 = load double, ptr %24, align 8, !tbaa !19
  %127 = fsub double %125, %126
  %128 = call double @llvm.fabs.f64(double %127)
  %129 = fcmp olt double %128, 0x3F50624DE0000000
  br i1 %129, label %130, label %144

130:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %131 = load double, ptr %24, align 8, !tbaa !19
  %132 = load double, ptr %25, align 8, !tbaa !19
  %133 = fcmp ole double %131, %132
  %134 = zext i1 %133 to i64
  %135 = select i1 %133, float 0x3F40624DE0000000, float 0xBF40624DE0000000
  store float %135, ptr %26, align 4, !tbaa !17
  %136 = load float, ptr %26, align 4, !tbaa !17
  %137 = fpext float %136 to double
  %138 = load double, ptr %24, align 8, !tbaa !19
  %139 = fsub double %138, %137
  store double %139, ptr %24, align 8, !tbaa !19
  %140 = load float, ptr %26, align 4, !tbaa !17
  %141 = fpext float %140 to double
  %142 = load double, ptr %25, align 8, !tbaa !19
  %143 = fadd double %142, %141
  store double %143, ptr %25, align 8, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %144

144:                                              ; preds = %130, %124
  %145 = load double, ptr %24, align 8, !tbaa !19
  %146 = fptrunc double %145 to float
  %147 = load ptr, ptr %13, align 8, !tbaa !5
  %148 = load i32, ptr %23, align 4, !tbaa !11
  %149 = sext i32 %148 to i64
  %150 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIfLm3ESaIfEEixEl(ptr noundef nonnull align 8 dereferenceable(24) %147, i64 noundef %149)
  store float %146, ptr %150, align 4, !tbaa !17
  %151 = load double, ptr %25, align 8, !tbaa !19
  %152 = fptrunc double %151 to float
  %153 = load ptr, ptr %14, align 8, !tbaa !5
  %154 = load i32, ptr %23, align 4, !tbaa !11
  %155 = sext i32 %154 to i64
  %156 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIfLm3ESaIfEEixEl(ptr noundef nonnull align 8 dereferenceable(24) %153, i64 noundef %155)
  store float %152, ptr %156, align 4, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %172

157:                                              ; preds = %79, %76
  %158 = load ptr, ptr %13, align 8, !tbaa !5
  %159 = load i32, ptr %23, align 4, !tbaa !11
  %160 = sext i32 %159 to i64
  %161 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIfLm3ESaIfEEixEl(ptr noundef nonnull align 8 dereferenceable(24) %158, i64 noundef %160)
  store float 0.000000e+00, ptr %161, align 4, !tbaa !17
  %162 = load ptr, ptr %21, align 8, !tbaa !5
  %163 = load i32, ptr %23, align 4, !tbaa !11
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds i64, ptr %162, i64 %164
  %166 = load i64, ptr %165, align 8, !tbaa !15
  %167 = sitofp i64 %166 to float
  %168 = load ptr, ptr %14, align 8, !tbaa !5
  %169 = load i32, ptr %23, align 4, !tbaa !11
  %170 = sext i32 %169 to i64
  %171 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIfLm3ESaIfEEixEl(ptr noundef nonnull align 8 dereferenceable(24) %168, i64 noundef %170)
  store float %167, ptr %171, align 4, !tbaa !17
  br label %172

172:                                              ; preds = %157, %144
  br label %173

173:                                              ; preds = %172
  %174 = load i32, ptr %23, align 4, !tbaa !11
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %23, align 4, !tbaa !11
  br label %71, !llvm.loop !21

176:                                              ; preds = %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali11SmallVectorIfLm3ESaIfEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK4dali4spanIKfLln1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 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 { ptr, i64 } @_ZNK4dali19TensorListShapeBaseINS_15TensorListShapeILin1EEELin1EE17tensor_shape_spanEl(ptr noundef nonnull align 8 dereferenceable(28), i64 noundef) #1 align 2

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIfLm3ESaIfEEixEl(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

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

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

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


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

%"class.dali::span" = type { ptr, i64 }
%"class.dali::span.70" = type { ptr, i64 }

@.str.36 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [88 x i8], align 1
@__PRETTY_FUNCTION__._ZN4dali17CalculateInputRoIERNS_11SmallVectorIfLm3ESaIfEEES3_bbNS_4spanIKfLln1EEES6_RKNS_15TensorListShapeILin1EEEiii = external hidden unnamed_addr constant [171 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [64 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali17CalculateInputRoIERNS_11SmallVectorIfLm3ESaIfEEES3_bbNS_4spanIKfLln1EEES6_RKNS_15TensorListShapeILin1EEEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i1 noundef zeroext %2, i1 noundef zeroext %3, ptr %4, i64 %5, ptr noundef byval(%"class.dali::span") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %8, i32 noundef %9, i32 noundef %10) local_unnamed_addr #1 {
  %12 = alloca %"class.dali::span", align 8
  %13 = alloca %"class.dali::span.70", align 8
  store ptr %4, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr %12, i64 8
  store i64 %5, ptr %14, align 8
  %15 = sext i32 %9 to i64
  tail call void @_ZN4dali11SmallVectorIfLm3ESaIfEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %15)
  tail call void @_ZN4dali11SmallVectorIfLm3ESaIfEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %15)
  %16 = call noundef i64 @_ZNK4dali4spanIKfLln1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  %17 = call noundef i64 @_ZNK4dali4spanIKfLln1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  %18 = icmp eq i64 %16, %17
  br i1 %18, label %20, label %19

19:                                               ; preds = %11
  call void @__assert_fail(ptr noundef nonnull @.str.36, ptr noundef nonnull @.str.37, i32 noundef 130, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4dali17CalculateInputRoIERNS_11SmallVectorIfLm3ESaIfEEES3_bbNS_4spanIKfLln1EEES6_RKNS_15TensorListShapeILin1EEEiii) #7
  unreachable

20:                                               ; preds = %11
  br i1 %2, label %21, label %.critedge

21:                                               ; preds = %20
  %22 = call noundef i64 @_ZNK4dali4spanIKfLln1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  %23 = add nsw i32 %8, 1
  %24 = mul nsw i32 %23, %9
  %25 = sext i32 %24 to i64
  %.not = icmp slt i64 %22, %25
  br i1 %.not, label %26, label %.critedge

26:                                               ; preds = %21
  call void @__assert_fail(ptr noundef nonnull @.str.38, ptr noundef nonnull @.str.37, i32 noundef 131, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4dali17CalculateInputRoIERNS_11SmallVectorIfLm3ESaIfEEES3_bbNS_4spanIKfLln1EEES6_RKNS_15TensorListShapeILin1EEEiii) #7
  unreachable

.critedge:                                        ; preds = %20, %21
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #6
  %27 = sext i32 %8 to i64
  %28 = call { ptr, i64 } @_ZNK4dali19TensorListShapeBaseINS_15TensorListShapeILin1EEELin1EE17tensor_shape_spanEl(ptr noundef nonnull align 8 dereferenceable(28) %7, i64 noundef %27)
  %29 = extractvalue { ptr, i64 } %28, 0
  store ptr %29, ptr %13, align 8
  %30 = getelementptr inbounds i8, ptr %13, i64 8
  %31 = extractvalue { ptr, i64 } %28, 1
  store i64 %31, ptr %30, align 8
  %32 = sext i32 %10 to i64
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK4dali4spanIKlLln1EEixEl(ptr noundef nonnull align 8 dereferenceable(16) %13, i64 noundef %32)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #6
  %34 = icmp sgt i32 %9, 0
  br i1 %34, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.critedge
  br i1 %2, label %.lr.ph.split.us.preheader, label %.lr.ph.split.preheader

.lr.ph.split.preheader:                           ; preds = %.lr.ph
  %wide.trip.count = zext nneg i32 %9 to i64
  br label %.lr.ph.split

.lr.ph.split.us.preheader:                        ; preds = %.lr.ph
  %35 = mul nsw i32 %9, %8
  %36 = sext i32 %35 to i64
  %wide.trip.count58 = zext nneg i32 %9 to i64
  br label %.lr.ph.split.us

.lr.ph.split.us:                                  ; preds = %.lr.ph.split.us.preheader, %70
  %indvars.iv55 = phi i64 [ 0, %.lr.ph.split.us.preheader ], [ %indvars.iv.next56, %70 ]
  %37 = getelementptr inbounds i64, ptr %33, i64 %indvars.iv55
  %38 = load i64, ptr %37, align 8, !tbaa !5
  %39 = icmp sgt i64 %38, 0
  br i1 %39, label %44, label %40

40:                                               ; preds = %.lr.ph.split.us
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIfLm3ESaIfEEixEl(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv55)
  store float 0.000000e+00, ptr %41, align 4, !tbaa !9
  %42 = load i64, ptr %37, align 8, !tbaa !5
  %43 = sitofp i64 %42 to float
  br label %70

44:                                               ; preds = %.lr.ph.split.us
  %45 = add nsw i64 %indvars.iv55, %36
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4dali4spanIKfLln1EEixEl(ptr noundef nonnull align 8 dereferenceable(16) %12, i64 noundef %45)
  %47 = load float, ptr %46, align 4, !tbaa !9
  %48 = fpext float %47 to double
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4dali4spanIKfLln1EEixEl(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %45)
  %50 = load float, ptr %49, align 4, !tbaa !9
  %51 = fpext float %50 to double
  br i1 %3, label %52, label %57

52:                                               ; preds = %44
  %53 = load i64, ptr %37, align 8, !tbaa !5
  %54 = sitofp i64 %53 to double
  %55 = fmul double %48, %54
  %56 = fmul double %51, %54
  br label %57

57:                                               ; preds = %52, %44
  %.049.us = phi double [ %55, %52 ], [ %48, %44 ]
  %.048.us = phi double [ %56, %52 ], [ %51, %44 ]
  %58 = fsub double %.048.us, %.049.us
  %59 = call double @llvm.fabs.f64(double %58)
  %60 = fcmp olt double %59, 0x3F50624DE0000000
  br i1 %60, label %61, label %66

61:                                               ; preds = %57
  %62 = fcmp ole double %.049.us, %.048.us
  %63 = select i1 %62, double 0x3F40624DE0000000, double 0xBF40624DE0000000
  %64 = fsub double %.049.us, %63
  %65 = fadd double %.048.us, %63
  br label %66

66:                                               ; preds = %61, %57
  %.150.us = phi double [ %64, %61 ], [ %.049.us, %57 ]
  %.1.us = phi double [ %65, %61 ], [ %.048.us, %57 ]
  %67 = fptrunc double %.150.us to float
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIfLm3ESaIfEEixEl(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv55)
  store float %67, ptr %68, align 4, !tbaa !9
  %69 = fptrunc double %.1.us to float
  br label %70

70:                                               ; preds = %66, %40
  %.sink = phi float [ %69, %66 ], [ %43, %40 ]
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIfLm3ESaIfEEixEl(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv55)
  store float %.sink, ptr %71, align 4, !tbaa !9
  %indvars.iv.next56 = add nuw nsw i64 %indvars.iv55, 1
  %exitcond59.not = icmp eq i64 %indvars.iv.next56, %wide.trip.count58
  br i1 %exitcond59.not, label %._crit_edge, label %.lr.ph.split.us, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph.split, %70, %.critedge
  ret void

.lr.ph.split:                                     ; preds = %.lr.ph.split.preheader, %.lr.ph.split
  %indvars.iv = phi i64 [ 0, %.lr.ph.split.preheader ], [ %indvars.iv.next, %.lr.ph.split ]
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIfLm3ESaIfEEixEl(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv)
  store float 0.000000e+00, ptr %72, align 4, !tbaa !9
  %73 = getelementptr inbounds i64, ptr %33, i64 %indvars.iv
  %74 = load i64, ptr %73, align 8, !tbaa !5
  %75 = sitofp i64 %74 to float
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIfLm3ESaIfEEixEl(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv)
  store float %75, ptr %76, align 4, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph.split, !llvm.loop !11
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali11SmallVectorIfLm3ESaIfEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK4dali4spanIKfLln1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 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 { ptr, i64 } @_ZNK4dali19TensorListShapeBaseINS_15TensorListShapeILin1EEELin1EE17tensor_shape_spanEl(ptr noundef nonnull align 8 dereferenceable(28), i64 noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN4dali11SmallVectorIfLm3ESaIfEEixEl(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #5 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass