; LLVM IR from NVIDIA/DALI :: dali/operators/sequence/optical_flow/optical_flow_impl (optical_flow_impl)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.dali::optical_flow::OpticalFlowParams" = type <{ float, i32, i32, i8, i8, [2 x i8] }>
%struct._NV_OF_INIT_PARAMS = type { i32, i32, i32, i32, i32, i32, i32, i32, ptr, i32, i32 }
%"class.dali::optical_flow::OpticalFlowImpl" = type <{ %"class.dali::optical_flow::OpticalFlowAdapter", %"class.std::__cxx11::basic_string", i64, i64, i64, i32, i32, i32, [4 x i8], ptr, ptr, ptr, %struct._NV_OF_CUDA_API_FUNCTION_LIST, %struct._NV_OF_INIT_PARAMS, %struct._NV_OF_INIT_PARAMS, %"class.std::unique_ptr", %"class.std::unique_ptr", %"class.std::unique_ptr", %"class.std::unique_ptr", i32, [4 x i8], %"class.std::unique_ptr.6", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", i8, [7 x i8] }>
%"class.dali::optical_flow::OpticalFlowAdapter" = type { ptr, %"struct.dali::optical_flow::OpticalFlowParams" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%struct._NV_OF_CUDA_API_FUNCTION_LIST = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.5" }
%"struct.std::_Head_base.5" = type { ptr }
%"class.std::unique_ptr.6" = type { %"struct.std::__uniq_ptr_data.7" }
%"struct.std::__uniq_ptr_data.7" = type { %"class.std::__uniq_ptr_impl.8" }
%"class.std::__uniq_ptr_impl.8" = type { %"class.std::tuple.9" }
%"class.std::tuple.9" = type { %"struct.std::_Tuple_impl.10" }
%"struct.std::_Tuple_impl.10" = type { %"struct.std::_Tuple_impl.11", %"struct.std::_Head_base.13" }
%"struct.std::_Tuple_impl.11" = type { %"struct.std::_Head_base.12" }
%"struct.std::_Head_base.12" = type { %"class.std::function" }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"struct.std::_Head_base.13" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_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 nounwind uwtable
declare dso_local noundef i32 @_ZN4dali12optical_flow17OutGridSizeToEnumEi(i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4dali12optical_flow18HintGridSizeToEnumEi(i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN4dali12optical_flow15OpticalFlowImpl13SetInitParamsENS0_17OpticalFlowParamsE(ptr noundef nonnull align 8 dereferenceable(489) %0, i64 %1, i64 %2) #1 align 2 {
  %4 = alloca %"struct.dali::optical_flow::OpticalFlowParams", align 4
  %5 = alloca ptr, align 8
  %6 = alloca %struct._NV_OF_INIT_PARAMS, align 8
  %7 = alloca %struct._NV_OF_INIT_PARAMS, align 8
  %8 = getelementptr inbounds { i64, i64 }, ptr %4, i32 0, i32 0
  store i64 %1, ptr %8, align 4
  %9 = getelementptr inbounds { i64, i64 }, ptr %4, i32 0, i32 1
  store i64 %2, ptr %9, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  %10 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr %6) #4
  call void @llvm.memset.p0.i64(ptr align 8 %6, i8 0, i64 48, i1 false)
  %11 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %6, i32 0, i32 0
  %12 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %6, i32 0, i32 1
  %13 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %6, i32 0, i32 2
  %14 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %6, i32 0, i32 3
  %15 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %6, i32 0, i32 4
  %16 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %6, i32 0, i32 5
  %17 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %6, i32 0, i32 6
  %18 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %6, i32 0, i32 7
  %19 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %6, i32 0, i32 8
  %20 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %6, i32 0, i32 9
  %21 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %6, i32 0, i32 10
  %22 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 13
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 8 %6, i64 48, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 48, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 48, ptr %7) #4
  call void @llvm.memset.p0.i64(ptr align 8 %7, i8 0, i64 48, i1 false)
  %23 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %7, i32 0, i32 0
  %24 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %7, i32 0, i32 1
  %25 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %7, i32 0, i32 2
  %26 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %7, i32 0, i32 3
  %27 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %7, i32 0, i32 4
  %28 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %7, i32 0, i32 5
  %29 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %7, i32 0, i32 6
  %30 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %7, i32 0, i32 7
  %31 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %7, i32 0, i32 8
  %32 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %7, i32 0, i32 9
  %33 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %7, i32 0, i32 10
  %34 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 14
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %34, ptr align 8 %7, i64 48, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 48, ptr %7) #4
  %35 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 2
  %36 = load i64, ptr %35, align 8, !tbaa !24
  %37 = trunc i64 %36 to i32
  %38 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 13
  %39 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %38, i32 0, i32 0
  store i32 %37, ptr %39, align 8, !tbaa !56
  %40 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 3
  %41 = load i64, ptr %40, align 8, !tbaa !57
  %42 = trunc i64 %41 to i32
  %43 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 13
  %44 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %43, i32 0, i32 1
  store i32 %42, ptr %44, align 4, !tbaa !58
  %45 = getelementptr inbounds %"struct.dali::optical_flow::OpticalFlowParams", ptr %4, i32 0, i32 1
  %46 = load i32, ptr %45, align 4, !tbaa !59
  %47 = call noundef i32 @_ZN4dali12optical_flow17OutGridSizeToEnumEi(i32 noundef %46)
  %48 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 13
  %49 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %48, i32 0, i32 2
  store i32 %47, ptr %49, align 8, !tbaa !60
  %50 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowAdapter", ptr %10, i32 0, i32 1
  %51 = getelementptr inbounds %"struct.dali::optical_flow::OpticalFlowParams", ptr %50, i32 0, i32 4
  %52 = load i8, ptr %51, align 1, !tbaa !61, !range !62, !noundef !63
  %53 = trunc i8 %52 to i1
  %54 = zext i1 %53 to i64
  %55 = select i1 %53, i32 1, i32 0
  %56 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 13
  %57 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %56, i32 0, i32 6
  store i32 %55, ptr %57, align 8, !tbaa !64
  %58 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowAdapter", ptr %10, i32 0, i32 1
  %59 = getelementptr inbounds %"struct.dali::optical_flow::OpticalFlowParams", ptr %58, i32 0, i32 4
  %60 = load i8, ptr %59, align 1, !tbaa !61, !range !62, !noundef !63
  %61 = trunc i8 %60 to i1
  br i1 %61, label %62, label %68

62:                                               ; preds = %3
  %63 = getelementptr inbounds %"struct.dali::optical_flow::OpticalFlowParams", ptr %4, i32 0, i32 2
  %64 = load i32, ptr %63, align 4, !tbaa !65
  %65 = call noundef i32 @_ZN4dali12optical_flow18HintGridSizeToEnumEi(i32 noundef %64)
  %66 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 13
  %67 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %66, i32 0, i32 3
  store i32 %65, ptr %67, align 4, !tbaa !66
  br label %72

68:                                               ; preds = %3
  %69 = call noundef i32 @_ZN4dali12optical_flow18HintGridSizeToEnumEi(i32 noundef -1)
  %70 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 13
  %71 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %70, i32 0, i32 3
  store i32 %69, ptr %71, align 4, !tbaa !66
  br label %72

72:                                               ; preds = %68, %62
  %73 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 14
  %74 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %73, i32 0, i32 3
  store i32 0, ptr %74, align 4, !tbaa !67
  %75 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 13
  %76 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %75, i32 0, i32 4
  store i32 1, ptr %76, align 8, !tbaa !68
  %77 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 14
  %78 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %77, i32 0, i32 4
  store i32 1, ptr %78, align 8, !tbaa !69
  %79 = getelementptr inbounds %"struct.dali::optical_flow::OpticalFlowParams", ptr %4, i32 0, i32 0
  %80 = load float, ptr %79, align 4, !tbaa !70
  %81 = fpext float %80 to double
  %82 = fcmp oge double %81, 0.000000e+00
  br i1 %82, label %83, label %90

83:                                               ; preds = %72
  %84 = getelementptr inbounds %"struct.dali::optical_flow::OpticalFlowParams", ptr %4, i32 0, i32 0
  %85 = load float, ptr %84, align 4, !tbaa !70
  %86 = fcmp olt float %85, 3.750000e-01
  br i1 %86, label %87, label %90

87:                                               ; preds = %83
  %88 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 13
  %89 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %88, i32 0, i32 5
  store i32 5, ptr %89, align 4, !tbaa !71
  br label %109

90:                                               ; preds = %83, %72
  %91 = getelementptr inbounds %"struct.dali::optical_flow::OpticalFlowParams", ptr %4, i32 0, i32 0
  %92 = load float, ptr %91, align 4, !tbaa !70
  %93 = fcmp olt float %92, 7.500000e-01
  br i1 %93, label %94, label %97

94:                                               ; preds = %90
  %95 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 13
  %96 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %95, i32 0, i32 5
  store i32 10, ptr %96, align 4, !tbaa !71
  br label %108

97:                                               ; preds = %90
  %98 = getelementptr inbounds %"struct.dali::optical_flow::OpticalFlowParams", ptr %4, i32 0, i32 0
  %99 = load float, ptr %98, align 4, !tbaa !70
  %100 = fcmp ole float %99, 1.000000e+00
  br i1 %100, label %101, label %104

101:                                              ; preds = %97
  %102 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 13
  %103 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %102, i32 0, i32 5
  store i32 20, ptr %103, align 4, !tbaa !71
  br label %107

104:                                              ; preds = %97
  %105 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 13
  %106 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %105, i32 0, i32 5
  store i32 0, ptr %106, align 4, !tbaa !71
  br label %107

107:                                              ; preds = %104, %101
  br label %108

108:                                              ; preds = %107, %94
  br label %109

109:                                              ; preds = %108, %87
  %110 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 14
  %111 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %110, i32 0, i32 5
  store i32 5, ptr %111, align 4, !tbaa !72
  %112 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 13
  %113 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %112, i32 0, i32 7
  store i32 0, ptr %113, align 4, !tbaa !73
  %114 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 13
  %115 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %114, i32 0, i32 8
  store ptr null, ptr %115, align 8, !tbaa !74
  %116 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 13
  %117 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %116, i32 0, i32 9
  store i32 0, ptr %117, align 8, !tbaa !75
  %118 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 14
  %119 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %118, i32 0, i32 6
  store i32 0, ptr %119, align 8, !tbaa !76
  %120 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 14
  %121 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %120, i32 0, i32 7
  store i32 0, ptr %121, align 4, !tbaa !77
  %122 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 14
  %123 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %122, i32 0, i32 8
  store ptr null, ptr %123, align 8, !tbaa !78
  %124 = getelementptr inbounds %"class.dali::optical_flow::OpticalFlowImpl", ptr %10, i32 0, i32 14
  %125 = getelementptr inbounds %struct._NV_OF_INIT_PARAMS, ptr %124, i32 0, i32 9
  store i32 0, ptr %125, align 8, !tbaa !79
  ret void
}

; 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) #2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 = !{i64 0, i64 4, !10, i64 4, i64 4, !10, i64 8, i64 4, !12, i64 12, i64 4, !14, i64 16, i64 4, !16, i64 20, i64 4, !18, i64 24, i64 4, !20, i64 28, i64 4, !20, i64 32, i64 8, !5, i64 40, i64 4, !22, i64 44, i64 4, !20}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"_ZTS30_NV_OF_OUTPUT_VECTOR_GRID_SIZE", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"_ZTS28_NV_OF_HINT_VECTOR_GRID_SIZE", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"_ZTS11_NV_OF_MODE", !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"_ZTS17_NV_OF_PERF_LEVEL", !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"_ZTS11_NV_OF_BOOL", !7, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"_ZTS29_NV_OF_STEREO_DISPARITY_RANGE", !7, i64 0}
!24 = !{!25, !32, i64 56}
!25 = !{!"_ZTSN4dali12optical_flow15OpticalFlowImplE", !26, i64 0, !30, i64 24, !32, i64 56, !32, i64 64, !32, i64 72, !11, i64 80, !11, i64 84, !11, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !33, i64 120, !34, i64 216, !34, i64 264, !35, i64 312, !35, i64 320, !35, i64 328, !35, i64 336, !41, i64 344, !42, i64 352, !52, i64 392, !52, i64 416, !52, i64 440, !52, i64 464, !29, i64 488}
!26 = !{!"_ZTSN4dali12optical_flow18OpticalFlowAdapterINS_10ComputeGPUEEE", !27, i64 8}
!27 = !{!"_ZTSN4dali12optical_flow17OpticalFlowParamsE", !28, i64 0, !11, i64 4, !11, i64 8, !29, i64 12, !29, i64 13}
!28 = !{!"float", !7, i64 0}
!29 = !{!"bool", !7, i64 0}
!30 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !31, i64 0, !32, i64 8, !7, i64 16}
!31 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!32 = !{!"long", !7, i64 0}
!33 = !{!"_ZTS29_NV_OF_CUDA_API_FUNCTION_LIST", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88}
!34 = !{!"_ZTS18_NV_OF_INIT_PARAMS", !11, i64 0, !11, i64 4, !13, i64 8, !15, i64 12, !17, i64 16, !19, i64 20, !21, i64 24, !21, i64 28, !6, i64 32, !23, i64 40, !21, i64 44}
!35 = !{!"_ZTSSt10unique_ptrIN4dali12optical_flow17OpticalFlowBufferESt14default_deleteIS2_EE", !36, i64 0}
!36 = !{!"_ZTSSt15__uniq_ptr_dataIN4dali12optical_flow17OpticalFlowBufferESt14default_deleteIS2_ELb1ELb1EE", !37, i64 0}
!37 = !{!"_ZTSSt15__uniq_ptr_implIN4dali12optical_flow17OpticalFlowBufferESt14default_deleteIS2_EE", !38, i64 0}
!38 = !{!"_ZTSSt5tupleIJPN4dali12optical_flow17OpticalFlowBufferESt14default_deleteIS2_EEE", !39, i64 0}
!39 = !{!"_ZTSSt11_Tuple_implILm0EJPN4dali12optical_flow17OpticalFlowBufferESt14default_deleteIS2_EEE", !40, i64 0}
!40 = !{!"_ZTSSt10_Head_baseILm0EPN4dali12optical_flow17OpticalFlowBufferELb0EE", !6, i64 0}
!41 = !{!"_ZTSN4dali13DALIImageTypeE", !7, i64 0}
!42 = !{!"_ZTSSt10unique_ptrIvSt8functionIFvPvEEE", !43, i64 0}
!43 = !{!"_ZTSSt15__uniq_ptr_dataIvSt8functionIFvPvEELb1ELb1EE", !44, i64 0}
!44 = !{!"_ZTSSt15__uniq_ptr_implIvSt8functionIFvPvEEE", !45, i64 0}
!45 = !{!"_ZTSSt5tupleIJPvSt8functionIFvS0_EEEE", !46, i64 0}
!46 = !{!"_ZTSSt11_Tuple_implILm0EJPvSt8functionIFvS0_EEEE", !47, i64 0, !51, i64 32}
!47 = !{!"_ZTSSt11_Tuple_implILm1EJSt8functionIFvPvEEEE", !48, i64 0}
!48 = !{!"_ZTSSt10_Head_baseILm1ESt8functionIFvPvEELb0EE", !49, i64 0}
!49 = !{!"_ZTSSt8functionIFvPvEE", !50, i64 0, !6, i64 24}
!50 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!51 = !{!"_ZTSSt10_Head_baseILm0EPvLb0EE", !6, i64 0}
!52 = !{!"_ZTSSt6vectorIjSaIjEE", !53, i64 0}
!53 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !54, i64 0}
!54 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !55, i64 0}
!55 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!56 = !{!25, !11, i64 216}
!57 = !{!25, !32, i64 64}
!58 = !{!25, !11, i64 220}
!59 = !{!27, !11, i64 4}
!60 = !{!25, !13, i64 224}
!61 = !{!26, !29, i64 21}
!62 = !{i8 0, i8 2}
!63 = !{}
!64 = !{!25, !21, i64 240}
!65 = !{!27, !11, i64 8}
!66 = !{!25, !15, i64 228}
!67 = !{!25, !15, i64 276}
!68 = !{!25, !17, i64 232}
!69 = !{!25, !17, i64 280}
!70 = !{!27, !28, i64 0}
!71 = !{!25, !19, i64 236}
!72 = !{!25, !19, i64 284}
!73 = !{!25, !21, i64 244}
!74 = !{!25, !6, i64 248}
!75 = !{!25, !23, i64 256}
!76 = !{!25, !21, i64 288}
!77 = !{!25, !21, i64 292}
!78 = !{!25, !6, i64 296}
!79 = !{!25, !23, i64 304}


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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4dali12optical_flow17OutGridSizeToEnumEi(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4dali12optical_flow18HintGridSizeToEnumEi(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN4dali12optical_flow15OpticalFlowImpl13SetInitParamsENS0_17OpticalFlowParamsE(ptr nocapture noundef nonnull align 8 dereferenceable(489) %0, i64 %1, i64 %2) local_unnamed_addr #0 align 2 {
  %.sroa.0.0.extract.trunc = trunc i64 %1 to i32
  %4 = bitcast i32 %.sroa.0.0.extract.trunc to float
  %.sroa.5.0.extract.shift = lshr i64 %1, 32
  %.sroa.5.0.extract.trunc = trunc nuw i64 %.sroa.5.0.extract.shift to i32
  %5 = getelementptr inbounds i8, ptr %0, i64 216
  %6 = getelementptr inbounds i8, ptr %0, i64 224
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %6, i8 0, i64 40, i1 false)
  %7 = getelementptr inbounds i8, ptr %0, i64 264
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %7, i8 0, i64 48, i1 false)
  %8 = getelementptr inbounds i8, ptr %0, i64 56
  %9 = load <2 x i64>, ptr %8, align 8, !tbaa !5
  %10 = trunc <2 x i64> %9 to <2 x i32>
  store <2 x i32> %10, ptr %5, align 8, !tbaa !9
  %11 = tail call noundef i32 @_ZN4dali12optical_flow17OutGridSizeToEnumEi(i32 noundef %.sroa.5.0.extract.trunc)
  %12 = getelementptr inbounds i8, ptr %0, i64 224
  store i32 %11, ptr %12, align 8, !tbaa !11
  %13 = getelementptr inbounds i8, ptr %0, i64 21
  %14 = load i8, ptr %13, align 1, !tbaa !49, !range !50, !noundef !51
  %15 = zext nneg i8 %14 to i32
  %16 = getelementptr inbounds i8, ptr %0, i64 240
  store i32 %15, ptr %16, align 8, !tbaa !52
  %17 = trunc nuw i8 %14 to i1
  %.sroa.6.8.extract.trunc = trunc i64 %2 to i32
  %.sink6 = select i1 %17, i32 %.sroa.6.8.extract.trunc, i32 -1
  %18 = tail call noundef i32 @_ZN4dali12optical_flow18HintGridSizeToEnumEi(i32 noundef %.sink6)
  %19 = getelementptr inbounds i8, ptr %0, i64 228
  store i32 %18, ptr %19, align 4
  %20 = getelementptr inbounds i8, ptr %0, i64 276
  store i32 0, ptr %20, align 4, !tbaa !53
  %21 = getelementptr inbounds i8, ptr %0, i64 232
  store i32 1, ptr %21, align 8, !tbaa !54
  %22 = getelementptr inbounds i8, ptr %0, i64 280
  store i32 1, ptr %22, align 8, !tbaa !55
  %23 = fcmp oge float %4, 0.000000e+00
  %24 = fcmp olt float %4, 3.750000e-01
  %or.cond = and i1 %23, %24
  br i1 %or.cond, label %25, label %27

25:                                               ; preds = %3
  %26 = getelementptr inbounds i8, ptr %0, i64 236
  store i32 5, ptr %26, align 4, !tbaa !56
  br label %36

27:                                               ; preds = %3
  %28 = fcmp olt float %4, 7.500000e-01
  br i1 %28, label %29, label %31

29:                                               ; preds = %27
  %30 = getelementptr inbounds i8, ptr %0, i64 236
  store i32 10, ptr %30, align 4, !tbaa !56
  br label %36

31:                                               ; preds = %27
  %32 = fcmp ugt float %4, 1.000000e+00
  %33 = getelementptr inbounds i8, ptr %0, i64 236
  br i1 %32, label %35, label %34

34:                                               ; preds = %31
  store i32 20, ptr %33, align 4, !tbaa !56
  br label %36

35:                                               ; preds = %31
  store i32 0, ptr %33, align 4, !tbaa !56
  br label %36

36:                                               ; preds = %29, %35, %34, %25
  %37 = getelementptr inbounds i8, ptr %0, i64 284
  store i32 5, ptr %37, align 4, !tbaa !57
  %38 = getelementptr inbounds i8, ptr %0, i64 244
  %39 = getelementptr inbounds i8, ptr %0, i64 288
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %38, i8 0, i64 16, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %39, i8 0, i64 20, i1 false)
  ret void
}

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }

!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 = !{!"int", !7, i64 0}
!11 = !{!12, !22, i64 224}
!12 = !{!"_ZTSN4dali12optical_flow15OpticalFlowImplE", !13, i64 0, !17, i64 24, !6, i64 56, !6, i64 64, !6, i64 72, !10, i64 80, !10, i64 84, !10, i64 88, !19, i64 96, !19, i64 104, !19, i64 112, !20, i64 120, !21, i64 216, !21, i64 264, !28, i64 312, !28, i64 320, !28, i64 328, !28, i64 336, !34, i64 344, !35, i64 352, !45, i64 392, !45, i64 416, !45, i64 440, !45, i64 464, !16, i64 488}
!13 = !{!"_ZTSN4dali12optical_flow18OpticalFlowAdapterINS_10ComputeGPUEEE", !14, i64 8}
!14 = !{!"_ZTSN4dali12optical_flow17OpticalFlowParamsE", !15, i64 0, !10, i64 4, !10, i64 8, !16, i64 12, !16, i64 13}
!15 = !{!"float", !7, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !18, i64 0, !6, i64 8, !7, i64 16}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !19, i64 0}
!19 = !{!"any pointer", !7, i64 0}
!20 = !{!"_ZTS29_NV_OF_CUDA_API_FUNCTION_LIST", !19, i64 0, !19, i64 8, !19, i64 16, !19, i64 24, !19, i64 32, !19, i64 40, !19, i64 48, !19, i64 56, !19, i64 64, !19, i64 72, !19, i64 80, !19, i64 88}
!21 = !{!"_ZTS18_NV_OF_INIT_PARAMS", !10, i64 0, !10, i64 4, !22, i64 8, !23, i64 12, !24, i64 16, !25, i64 20, !26, i64 24, !26, i64 28, !19, i64 32, !27, i64 40, !26, i64 44}
!22 = !{!"_ZTS30_NV_OF_OUTPUT_VECTOR_GRID_SIZE", !7, i64 0}
!23 = !{!"_ZTS28_NV_OF_HINT_VECTOR_GRID_SIZE", !7, i64 0}
!24 = !{!"_ZTS11_NV_OF_MODE", !7, i64 0}
!25 = !{!"_ZTS17_NV_OF_PERF_LEVEL", !7, i64 0}
!26 = !{!"_ZTS11_NV_OF_BOOL", !7, i64 0}
!27 = !{!"_ZTS29_NV_OF_STEREO_DISPARITY_RANGE", !7, i64 0}
!28 = !{!"_ZTSSt10unique_ptrIN4dali12optical_flow17OpticalFlowBufferESt14default_deleteIS2_EE", !29, i64 0}
!29 = !{!"_ZTSSt15__uniq_ptr_dataIN4dali12optical_flow17OpticalFlowBufferESt14default_deleteIS2_ELb1ELb1EE", !30, i64 0}
!30 = !{!"_ZTSSt15__uniq_ptr_implIN4dali12optical_flow17OpticalFlowBufferESt14default_deleteIS2_EE", !31, i64 0}
!31 = !{!"_ZTSSt5tupleIJPN4dali12optical_flow17OpticalFlowBufferESt14default_deleteIS2_EEE", !32, i64 0}
!32 = !{!"_ZTSSt11_Tuple_implILm0EJPN4dali12optical_flow17OpticalFlowBufferESt14default_deleteIS2_EEE", !33, i64 0}
!33 = !{!"_ZTSSt10_Head_baseILm0EPN4dali12optical_flow17OpticalFlowBufferELb0EE", !19, i64 0}
!34 = !{!"_ZTSN4dali13DALIImageTypeE", !7, i64 0}
!35 = !{!"_ZTSSt10unique_ptrIvSt8functionIFvPvEEE", !36, i64 0}
!36 = !{!"_ZTSSt15__uniq_ptr_dataIvSt8functionIFvPvEELb1ELb1EE", !37, i64 0}
!37 = !{!"_ZTSSt15__uniq_ptr_implIvSt8functionIFvPvEEE", !38, i64 0}
!38 = !{!"_ZTSSt5tupleIJPvSt8functionIFvS0_EEEE", !39, i64 0}
!39 = !{!"_ZTSSt11_Tuple_implILm0EJPvSt8functionIFvS0_EEEE", !40, i64 0, !44, i64 32}
!40 = !{!"_ZTSSt11_Tuple_implILm1EJSt8functionIFvPvEEEE", !41, i64 0}
!41 = !{!"_ZTSSt10_Head_baseILm1ESt8functionIFvPvEELb0EE", !42, i64 0}
!42 = !{!"_ZTSSt8functionIFvPvEE", !43, i64 0, !19, i64 24}
!43 = !{!"_ZTSSt14_Function_base", !7, i64 0, !19, i64 16}
!44 = !{!"_ZTSSt10_Head_baseILm0EPvLb0EE", !19, i64 0}
!45 = !{!"_ZTSSt6vectorIjSaIjEE", !46, i64 0}
!46 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !48, i64 0}
!48 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !19, i64 0, !19, i64 8, !19, i64 16}
!49 = !{!13, !16, i64 21}
!50 = !{i8 0, i8 2}
!51 = !{}
!52 = !{!12, !26, i64 240}
!53 = !{!12, !23, i64 276}
!54 = !{!12, !24, i64 232}
!55 = !{!12, !24, i64 280}
!56 = !{!12, !25, i64 236}
!57 = !{!12, !25, i64 284}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,MergedLoadStoreMotionPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass