; LLVM IR from NVIDIA/DALI :: dali/operators/image/resize (resampling_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.69" = type { ptr, i64 }
%"struct.dali::kernels::ResamplingParams::ROI" = type { i8, float, float }
%"struct.dali::kernels::FilterDesc" = type { i8, i8, float }
%"struct.dali::kernels::ResamplingParams" = type { %"struct.dali::kernels::FilterDesc", %"struct.dali::kernels::FilterDesc", i32, %"struct.dali::kernels::ResamplingParams::ROI" }
%"struct.dali::ResizeParams" = type { %"class.dali::SmallVector.70", %"class.dali::SmallVector.75", %"class.dali::SmallVector.75" }
%"class.dali::SmallVector.70" = type { %union.anon.73, i64 }
%union.anon.73 = type { %struct.anon.74, [8 x i8] }
%struct.anon.74 = type { ptr, i64 }
%"class.dali::SmallVector.75" = type { %union.anon.78, i64 }
%union.anon.78 = type { %struct.anon.79, [8 x i8] }
%struct.anon.79 = type { ptr, i64 }
%"class.dali::ResamplingFilterAttr" = type <{ %"class.std::vector.28", %"class.std::vector.28", %"class.std::vector.33", %"class.std::vector.33", %"class.std::vector.33", i32, i8, [3 x i8] }>
%"class.std::vector.28" = type { %"struct.std::_Vector_base.29" }
%"struct.std::_Vector_base.29" = type { %"struct.std::_Vector_base<dali::kernels::ResamplingFilterType, std::allocator<dali::kernels::ResamplingFilterType>>::_Vector_impl" }
%"struct.std::_Vector_base<dali::kernels::ResamplingFilterType, std::allocator<dali::kernels::ResamplingFilterType>>::_Vector_impl" = type { %"struct.std::_Vector_base<dali::kernels::ResamplingFilterType, std::allocator<dali::kernels::ResamplingFilterType>>::_Vector_impl_data" }
%"struct.std::_Vector_base<dali::kernels::ResamplingFilterType, std::allocator<dali::kernels::ResamplingFilterType>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.33" = type { %"struct.std::_Vector_base.34" }
%"struct.std::_Vector_base.34" = type { %"struct.std::_Vector_base<dali::DALIInterpType, std::allocator<dali::DALIInterpType>>::_Vector_impl" }
%"struct.std::_Vector_base<dali::DALIInterpType, std::allocator<dali::DALIInterpType>>::_Vector_impl" = type { %"struct.std::_Vector_base<dali::DALIInterpType, std::allocator<dali::DALIInterpType>>::_Vector_impl_data" }
%"struct.std::_Vector_base<dali::DALIInterpType, std::allocator<dali::DALIInterpType>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; 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 @_ZNK4dali20ResamplingFilterAttr19GetResamplingParamsENS_4spanINS_7kernels16ResamplingParamsELln1EEENS1_IKNS_12ResizeParamsELln1EEE(ptr noundef nonnull align 8 dereferenceable(125) %0, ptr %1, i64 %2, ptr %3, i64 %4) #1 align 2 {
  %6 = alloca %"class.dali::span", align 8
  %7 = alloca %"class.dali::span.69", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca %"struct.dali::kernels::ResamplingParams::ROI", align 4
  %16 = alloca %"struct.dali::kernels::ResamplingParams::ROI", align 4
  %17 = alloca %"struct.dali::kernels::FilterDesc", align 4
  %18 = alloca %"struct.dali::kernels::FilterDesc", align 4
  %19 = getelementptr inbounds { ptr, i64 }, ptr %6, i32 0, i32 0
  store ptr %1, ptr %19, align 8
  %20 = getelementptr inbounds { ptr, i64 }, ptr %6, i32 0, i32 1
  store i64 %2, ptr %20, align 8
  %21 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 0
  store ptr %3, ptr %21, align 8
  %22 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 1
  store i64 %4, ptr %22, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  %23 = load ptr, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %24

24:                                               ; preds = %105, %5
  %25 = load i32, ptr %9, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = call noundef i64 @_ZNK4dali4spanIKNS_12ResizeParamsELln1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  %28 = icmp slt i64 %26, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %24
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %108

30:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %31 = load i32, ptr %9, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNK4dali4spanIKNS_12ResizeParamsELln1EEixEl(ptr noundef nonnull align 8 dereferenceable(16) %7, i64 noundef %32)
  store ptr %33, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %34

34:                                               ; preds = %101, %30
  %35 = load i32, ptr %13, align 4, !tbaa !9
  %36 = load ptr, ptr %12, align 8, !tbaa !5
  %37 = call noundef i32 @_ZNK4dali12ResizeParams4sizeEv(ptr noundef nonnull align 8 dereferenceable(96) %36)
  %38 = icmp slt i32 %35, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %34
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %104

40:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %41 = load i32, ptr %10, align 4, !tbaa !9
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %10, align 4, !tbaa !9
  %43 = sext i32 %41 to i64
  %44 = call noundef nonnull align 4 dereferenceable(32) ptr @_ZNK4dali4spanINS_7kernels16ResamplingParamsELln1EEixEl(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %43)
  store ptr %44, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %15) #6
  call void @llvm.memset.p0.i64(ptr align 4 %15, i8 0, i64 12, i1 false)
  call void @_ZN4dali7kernels16ResamplingParams3ROIC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %15) #6
  %45 = load ptr, ptr %14, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.dali::kernels::ResamplingParams", ptr %45, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %46, ptr align 4 %15, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #6
  %47 = load ptr, ptr %12, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.dali::ResizeParams", ptr %47, i32 0, i32 1
  %49 = load i32, ptr %13, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4dali11SmallVectorIfLm6ESaIfEEixEl(ptr noundef nonnull align 8 dereferenceable(32) %48, i64 noundef %50)
  %52 = load float, ptr %51, align 4, !tbaa !14
  %53 = load ptr, ptr %12, align 8, !tbaa !5
  %54 = getelementptr inbounds %"struct.dali::ResizeParams", ptr %53, i32 0, i32 2
  %55 = load i32, ptr %13, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4dali11SmallVectorIfLm6ESaIfEEixEl(ptr noundef nonnull align 8 dereferenceable(32) %54, i64 noundef %56)
  %58 = load float, ptr %57, align 4, !tbaa !14
  %59 = fcmp une float %52, %58
  br i1 %59, label %60, label %75

60:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #6
  %61 = load ptr, ptr %12, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.dali::ResizeParams", ptr %61, i32 0, i32 1
  %63 = load i32, ptr %13, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4dali11SmallVectorIfLm6ESaIfEEixEl(ptr noundef nonnull align 8 dereferenceable(32) %62, i64 noundef %64)
  %66 = load float, ptr %65, align 4, !tbaa !14
  %67 = load ptr, ptr %12, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.dali::ResizeParams", ptr %67, i32 0, i32 2
  %69 = load i32, ptr %13, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4dali11SmallVectorIfLm6ESaIfEEixEl(ptr noundef nonnull align 8 dereferenceable(32) %68, i64 noundef %70)
  %72 = load float, ptr %71, align 4, !tbaa !14
  call void @_ZN4dali7kernels16ResamplingParams3ROIC2Eff(ptr noundef nonnull align 4 dereferenceable(12) %16, float noundef %66, float noundef %72)
  %73 = load ptr, ptr %14, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.dali::kernels::ResamplingParams", ptr %73, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %74, ptr align 4 %16, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #6
  br label %75

75:                                               ; preds = %60, %40
  %76 = load ptr, ptr %12, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.dali::ResizeParams", ptr %76, i32 0, i32 0
  %78 = load i32, ptr %13, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4dali11SmallVectorIiLm6ESaIiEEixEl(ptr noundef nonnull align 8 dereferenceable(32) %77, i64 noundef %79)
  %81 = load i32, ptr %80, align 4, !tbaa !9
  %82 = load ptr, ptr %14, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.dali::kernels::ResamplingParams", ptr %82, i32 0, i32 2
  store i32 %81, ptr %83, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %84 = getelementptr inbounds %"class.dali::ResamplingFilterAttr", ptr %23, i32 0, i32 0
  %85 = load i32, ptr %9, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIN4dali7kernels20ResamplingFilterTypeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %84, i64 noundef %86) #6
  %88 = load i8, ptr %87, align 1, !tbaa !21
  %89 = getelementptr inbounds %"class.dali::ResamplingFilterAttr", ptr %23, i32 0, i32 6
  %90 = load i8, ptr %89, align 4, !tbaa !22, !range !33, !noundef !34
  %91 = trunc i8 %90 to i1
  call void @_ZN4dali7kernels10FilterDescC2ENS0_20ResamplingFilterTypeEbf(ptr noundef nonnull align 4 dereferenceable(8) %17, i8 noundef zeroext %88, i1 noundef zeroext %91, float noundef 0.000000e+00)
  %92 = load ptr, ptr %14, align 8, !tbaa !5
  %93 = getelementptr inbounds %"struct.dali::kernels::ResamplingParams", ptr %92, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %93, ptr align 4 %17, i64 8, i1 false), !tbaa.struct !35
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %94 = getelementptr inbounds %"class.dali::ResamplingFilterAttr", ptr %23, i32 0, i32 1
  %95 = load i32, ptr %9, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIN4dali7kernels20ResamplingFilterTypeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %94, i64 noundef %96) #6
  %98 = load i8, ptr %97, align 1, !tbaa !21
  call void @_ZN4dali7kernels10FilterDescC2ENS0_20ResamplingFilterTypeEbf(ptr noundef nonnull align 4 dereferenceable(8) %18, i8 noundef zeroext %98, i1 noundef zeroext false, float noundef 0.000000e+00)
  %99 = load ptr, ptr %14, align 8, !tbaa !5
  %100 = getelementptr inbounds %"struct.dali::kernels::ResamplingParams", ptr %99, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %100, ptr align 4 %18, i64 8, i1 false), !tbaa.struct !35
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %101

101:                                              ; preds = %75
  %102 = load i32, ptr %13, align 4, !tbaa !9
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %13, align 4, !tbaa !9
  br label %34, !llvm.loop !36

104:                                              ; preds = %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %105

105:                                              ; preds = %104
  %106 = load i32, ptr %9, align 4, !tbaa !9
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %9, align 4, !tbaa !9
  br label %24, !llvm.loop !38

108:                                              ; preds = %29
  ret void
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK4dali12ResizeParams4sizeEv(ptr noundef nonnull align 8 dereferenceable(96)) #1 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4dali7kernels16ResamplingParams3ROIC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #2 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4dali7kernels16ResamplingParams3ROIC2Eff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef) unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4dali7kernels10FilterDescC2ENS0_20ResamplingFilterTypeEbf(ptr noundef nonnull align 4 dereferenceable(8), i8 noundef zeroext, i1 noundef zeroext, float noundef) unnamed_addr #2 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 }

!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 = !{i64 0, i64 1, !12, i64 4, i64 4, !14, i64 8, i64 4, !14}
!12 = !{!13, !13, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!17, !10, i64 16}
!17 = !{!"_ZTSN4dali7kernels16ResamplingParamsE", !18, i64 0, !18, i64 8, !10, i64 16, !20, i64 20}
!18 = !{!"_ZTSN4dali7kernels10FilterDescE", !19, i64 0, !13, i64 1, !15, i64 4}
!19 = !{!"_ZTSN4dali7kernels20ResamplingFilterTypeE", !7, i64 0}
!20 = !{!"_ZTSN4dali7kernels16ResamplingParams3ROIE", !13, i64 0, !15, i64 4, !15, i64 8}
!21 = !{!19, !19, i64 0}
!22 = !{!23, !13, i64 124}
!23 = !{!"_ZTSN4dali20ResamplingFilterAttrE", !24, i64 0, !24, i64 24, !28, i64 48, !28, i64 72, !28, i64 96, !32, i64 120, !13, i64 124}
!24 = !{!"_ZTSSt6vectorIN4dali7kernels20ResamplingFilterTypeESaIS2_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIN4dali7kernels20ResamplingFilterTypeESaIS2_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIN4dali7kernels20ResamplingFilterTypeESaIS2_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIN4dali7kernels20ResamplingFilterTypeESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!"_ZTSSt6vectorIN4dali14DALIInterpTypeESaIS1_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseIN4dali14DALIInterpTypeESaIS1_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIN4dali14DALIInterpTypeESaIS1_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIN4dali14DALIInterpTypeESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!32 = !{!"_ZTS13_DALIDataType", !7, i64 0}
!33 = !{i8 0, i8 2}
!34 = !{}
!35 = !{i64 0, i64 1, !21, i64 1, i64 1, !12, i64 4, i64 4, !14}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = distinct !{!38, !37}


; 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.69" = type { ptr, i64 }
%"struct.dali::kernels::ResamplingParams::ROI" = type { i8, float, float }
%"struct.dali::kernels::FilterDesc" = type { i8, i8, float }

; 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 @_ZNK4dali20ResamplingFilterAttr19GetResamplingParamsENS_4spanINS_7kernels16ResamplingParamsELln1EEENS1_IKNS_12ResizeParamsELln1EEE(ptr noundef nonnull align 8 dereferenceable(125) %0, ptr %1, i64 %2, ptr %3, i64 %4) local_unnamed_addr #1 align 2 {
  %6 = alloca %"class.dali::span", align 8
  %7 = alloca %"class.dali::span.69", align 8
  %8 = alloca %"struct.dali::kernels::ResamplingParams::ROI", align 4
  %9 = alloca %"struct.dali::kernels::ResamplingParams::ROI", align 4
  %10 = alloca %"struct.dali::kernels::FilterDesc", align 8
  %11 = alloca %"struct.dali::kernels::FilterDesc", align 8
  store ptr %1, ptr %6, align 8
  %12 = getelementptr inbounds i8, ptr %6, i64 8
  store i64 %2, ptr %12, align 8
  store ptr %3, ptr %7, align 8
  %13 = getelementptr inbounds i8, ptr %7, i64 8
  store i64 %4, ptr %13, align 8
  %14 = call noundef i64 @_ZNK4dali4spanIKNS_12ResizeParamsELln1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  %15 = icmp sgt i64 %14, 0
  br i1 %15, label %.lr.ph32, label %._crit_edge33

.lr.ph32:                                         ; preds = %5
  %16 = getelementptr inbounds i8, ptr %0, i64 124
  %17 = getelementptr inbounds i8, ptr %0, i64 24
  br label %18

._crit_edge33:                                    ; preds = %._crit_edge, %5
  ret void

18:                                               ; preds = %.lr.ph32, %._crit_edge
  %indvars.iv39 = phi i64 [ 0, %.lr.ph32 ], [ %indvars.iv.next40, %._crit_edge ]
  %.02529 = phi i32 [ 0, %.lr.ph32 ], [ %.1.lcssa, %._crit_edge ]
  %19 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNK4dali4spanIKNS_12ResizeParamsELln1EEixEl(ptr noundef nonnull align 8 dereferenceable(16) %7, i64 noundef %indvars.iv39)
  %20 = call noundef i32 @_ZNK4dali12ResizeParams4sizeEv(ptr noundef nonnull align 8 dereferenceable(96) %19)
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %18
  %22 = getelementptr inbounds i8, ptr %19, i64 32
  %23 = getelementptr inbounds i8, ptr %19, i64 64
  %24 = sext i32 %.02529 to i64
  br label %28

._crit_edge.loopexit:                             ; preds = %41
  %25 = trunc nsw i64 %indvars.iv.next35 to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %18
  %.1.lcssa = phi i32 [ %.02529, %18 ], [ %25, %._crit_edge.loopexit ]
  %indvars.iv.next40 = add nuw nsw i64 %indvars.iv39, 1
  %26 = call noundef i64 @_ZNK4dali4spanIKNS_12ResizeParamsELln1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  %27 = icmp sgt i64 %26, %indvars.iv.next40
  br i1 %27, label %18, label %._crit_edge33, !llvm.loop !5

28:                                               ; preds = %.lr.ph, %41
  %indvars.iv34 = phi i64 [ %24, %.lr.ph ], [ %indvars.iv.next35, %41 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %41 ]
  %indvars.iv.next35 = add nsw i64 %indvars.iv34, 1
  %29 = call noundef nonnull align 4 dereferenceable(32) ptr @_ZNK4dali4spanINS_7kernels16ResamplingParamsELln1EEixEl(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %indvars.iv34)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %8, i8 0, i64 12, i1 false)
  call void @_ZN4dali7kernels16ResamplingParams3ROIC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %8) #6
  %30 = getelementptr inbounds i8, ptr %29, i64 20
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %30, ptr noundef nonnull align 4 dereferenceable(12) %8, i64 12, i1 false), !tbaa.struct !7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #6
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4dali11SmallVectorIfLm6ESaIfEEixEl(ptr noundef nonnull align 8 dereferenceable(32) %22, i64 noundef %indvars.iv)
  %32 = load float, ptr %31, align 4, !tbaa !12
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4dali11SmallVectorIfLm6ESaIfEEixEl(ptr noundef nonnull align 8 dereferenceable(32) %23, i64 noundef %indvars.iv)
  %34 = load float, ptr %33, align 4, !tbaa !12
  %35 = fcmp une float %32, %34
  br i1 %35, label %36, label %41

36:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #6
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4dali11SmallVectorIfLm6ESaIfEEixEl(ptr noundef nonnull align 8 dereferenceable(32) %22, i64 noundef %indvars.iv)
  %38 = load float, ptr %37, align 4, !tbaa !12
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4dali11SmallVectorIfLm6ESaIfEEixEl(ptr noundef nonnull align 8 dereferenceable(32) %23, i64 noundef %indvars.iv)
  %40 = load float, ptr %39, align 4, !tbaa !12
  call void @_ZN4dali7kernels16ResamplingParams3ROIC2Eff(ptr noundef nonnull align 4 dereferenceable(12) %9, float noundef %38, float noundef %40)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %30, ptr noundef nonnull align 4 dereferenceable(12) %9, i64 12, i1 false), !tbaa.struct !7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #6
  br label %41

41:                                               ; preds = %36, %28
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK4dali11SmallVectorIiLm6ESaIiEEixEl(ptr noundef nonnull align 8 dereferenceable(32) %19, i64 noundef %indvars.iv)
  %43 = load i32, ptr %42, align 4, !tbaa !14
  %44 = getelementptr inbounds i8, ptr %29, i64 16
  store i32 %43, ptr %44, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %45 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIN4dali7kernels20ResamplingFilterTypeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv39) #6
  %46 = load i8, ptr %45, align 1, !tbaa !21
  %47 = load i8, ptr %16, align 4, !tbaa !22, !range !34, !noundef !35
  %48 = trunc nuw i8 %47 to i1
  call void @_ZN4dali7kernels10FilterDescC2ENS0_20ResamplingFilterTypeEbf(ptr noundef nonnull align 4 dereferenceable(8) %10, i8 noundef zeroext %46, i1 noundef zeroext %48, float noundef 0.000000e+00)
  %49 = load i64, ptr %10, align 8
  store i64 %49, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %50 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIN4dali7kernels20ResamplingFilterTypeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv39) #6
  %51 = load i8, ptr %50, align 1, !tbaa !21
  call void @_ZN4dali7kernels10FilterDescC2ENS0_20ResamplingFilterTypeEbf(ptr noundef nonnull align 4 dereferenceable(8) %11, i8 noundef zeroext %51, i1 noundef zeroext false, float noundef 0.000000e+00)
  %52 = getelementptr inbounds i8, ptr %29, i64 8
  %53 = load i64, ptr %11, align 8
  store i64 %53, ptr %52, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %54 = call noundef i32 @_ZNK4dali12ResizeParams4sizeEv(ptr noundef nonnull align 8 dereferenceable(96) %19)
  %55 = sext i32 %54 to i64
  %56 = icmp slt i64 %indvars.iv.next, %55
  br i1 %56, label %28, label %._crit_edge.loopexit, !llvm.loop !36
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK4dali12ResizeParams4sizeEv(ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4dali7kernels16ResamplingParams3ROIC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4dali7kernels16ResamplingParams3ROIC2Eff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef) unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4dali7kernels10FilterDescC2ENS0_20ResamplingFilterTypeEbf(ptr noundef nonnull align 4 dereferenceable(8), i8 noundef zeroext, i1 noundef zeroext, float noundef) unnamed_addr #2 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 }

!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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{i64 0, i64 1, !8, i64 4, i64 4, !12, i64 8, i64 4, !12}
!8 = !{!9, !9, i64 0}
!9 = !{!"bool", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !10, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !10, i64 0}
!16 = !{!17, !15, i64 16}
!17 = !{!"_ZTSN4dali7kernels16ResamplingParamsE", !18, i64 0, !18, i64 8, !15, i64 16, !20, i64 20}
!18 = !{!"_ZTSN4dali7kernels10FilterDescE", !19, i64 0, !9, i64 1, !13, i64 4}
!19 = !{!"_ZTSN4dali7kernels20ResamplingFilterTypeE", !10, i64 0}
!20 = !{!"_ZTSN4dali7kernels16ResamplingParams3ROIE", !9, i64 0, !13, i64 4, !13, i64 8}
!21 = !{!19, !19, i64 0}
!22 = !{!23, !9, i64 124}
!23 = !{!"_ZTSN4dali20ResamplingFilterAttrE", !24, i64 0, !24, i64 24, !29, i64 48, !29, i64 72, !29, i64 96, !33, i64 120, !9, i64 124}
!24 = !{!"_ZTSSt6vectorIN4dali7kernels20ResamplingFilterTypeESaIS2_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIN4dali7kernels20ResamplingFilterTypeESaIS2_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIN4dali7kernels20ResamplingFilterTypeESaIS2_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIN4dali7kernels20ResamplingFilterTypeESaIS2_EE17_Vector_impl_dataE", !28, i64 0, !28, i64 8, !28, i64 16}
!28 = !{!"any pointer", !10, i64 0}
!29 = !{!"_ZTSSt6vectorIN4dali14DALIInterpTypeESaIS1_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseIN4dali14DALIInterpTypeESaIS1_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIN4dali14DALIInterpTypeESaIS1_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIN4dali14DALIInterpTypeESaIS1_EE17_Vector_impl_dataE", !28, i64 0, !28, i64 8, !28, i64 16}
!33 = !{!"_ZTS13_DALIDataType", !10, i64 0}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = distinct !{!36, !6}


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