; LLVM IR from NVIDIA/DALI :: dali/operators/ssd (box_encoder)

; 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::vec" = type { %"struct.dali::vec_base" }
%"struct.dali::vec_base" = type { %union.anon.0 }
%union.anon.0 = type { [2 x float] }
%"class.dali::BoxEncoder" = type <{ %"class.dali::StatelessOperator", float, [4 x i8], %"class.std::vector.32", i8, [7 x i8], %"class.std::vector.37", %"class.std::vector.37", float, [4 x i8] }>
%"class.dali::StatelessOperator" = type { %"class.dali::Operator" }
%"class.dali::Operator" = type { %"class.dali::OperatorBase" }
%"class.dali::OperatorBase" = type { ptr, %"class.dali::OpSpec", i32, i32, %"class.std::unordered_map" }
%"class.dali::OpSpec" = type { %"class.std::__cxx11::basic_string", ptr, %"class.std::vector", %"class.std::map", %"class.std::vector.7", %"class.std::map", %"class.std::map.12", %"class.std::vector.17", %"class.std::vector.17", %"class.std::map.22" }
%"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] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::shared_ptr<dali::Argument>, std::allocator<std::shared_ptr<dali::Argument>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<dali::Argument>, std::allocator<std::shared_ptr<dali::Argument>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<dali::Argument>, std::allocator<std::shared_ptr<dali::Argument>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<dali::Argument>, std::allocator<std::shared_ptr<dali::Argument>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = type { %"struct.std::_Vector_base<std::pair<std::__cxx11::basic_string<char>, int>, std::allocator<std::pair<std::__cxx11::basic_string<char>, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::__cxx11::basic_string<char>, int>, std::allocator<std::pair<std::__cxx11::basic_string<char>, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::__cxx11::basic_string<char>, int>, std::allocator<std::pair<std::__cxx11::basic_string<char>, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::__cxx11::basic_string<char>, int>, std::allocator<std::pair<std::__cxx11::basic_string<char>, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int>>, std::less<void>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int>>, std::less<void>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::map.12" = type { %"class.std::_Rb_tree.13" }
%"class.std::_Rb_tree.13" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>, std::less<void>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>, std::less<void>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = type { %"struct.std::_Vector_base<dali::OpSpec::InOutDeviceDesc, std::allocator<dali::OpSpec::InOutDeviceDesc>>::_Vector_impl" }
%"struct.std::_Vector_base<dali::OpSpec::InOutDeviceDesc, std::allocator<dali::OpSpec::InOutDeviceDesc>>::_Vector_impl" = type { %"struct.std::_Vector_base<dali::OpSpec::InOutDeviceDesc, std::allocator<dali::OpSpec::InOutDeviceDesc>>::_Vector_impl_data" }
%"struct.std::_Vector_base<dali::OpSpec::InOutDeviceDesc, std::allocator<dali::OpSpec::InOutDeviceDesc>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map.22" = type { %"class.std::_Rb_tree.23" }
%"class.std::_Rb_tree.23" = type { %"struct.std::_Rb_tree<dali::OpSpec::InOutDeviceDesc, std::pair<const dali::OpSpec::InOutDeviceDesc, int>, std::_Select1st<std::pair<const dali::OpSpec::InOutDeviceDesc, int>>, std::less<void>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<dali::OpSpec::InOutDeviceDesc, std::pair<const dali::OpSpec::InOutDeviceDesc, int>, std::_Select1st<std::pair<const dali::OpSpec::InOutDeviceDesc, int>>, std::less<void>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::vector.32" = type { %"struct.std::_Vector_base.33" }
%"struct.std::_Vector_base.33" = type { %"struct.std::_Vector_base<dali::Box<2, float>, std::allocator<dali::Box<2, float>>>::_Vector_impl" }
%"struct.std::_Vector_base<dali::Box<2, float>, std::allocator<dali::Box<2, float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<dali::Box<2, float>, std::allocator<dali::Box<2, float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<dali::Box<2, float>, std::allocator<dali::Box<2, float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.37" = type { %"struct.std::_Vector_base.38" }
%"struct.std::_Vector_base.38" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_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 nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorIN4dali3BoxILi2EfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4dali10BoxEncoderINS_10CPUBackendEE20WriteAnchorsToOutputEPfPi(ptr noundef nonnull align 8 dereferenceable(492) %0, ptr noundef %1, ptr noundef %2) #2 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.dali::vec", align 4
  %11 = alloca %"struct.dali::vec", align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %12 = load ptr, ptr %4, align 8
  %13 = getelementptr inbounds %"class.dali::BoxEncoder", ptr %12, i32 0, i32 4
  %14 = load i8, ptr %13, align 8, !tbaa !9, !range !59, !noundef !60
  %15 = trunc i8 %14 to i1
  br i1 %15, label %16, label %25

16:                                               ; preds = %3
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %"class.dali::BoxEncoder", ptr %12, i32 0, i32 3
  %19 = call noundef i64 @_ZNKSt6vectorIN4dali3BoxILi2EfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #4
  %20 = mul i64 16, %19
  call void @llvm.memset.p0.i64(ptr align 4 %17, i8 0, i64 %20, i1 false)
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %"class.dali::BoxEncoder", ptr %12, i32 0, i32 3
  %23 = call noundef i64 @_ZNKSt6vectorIN4dali3BoxILi2EfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #4
  %24 = mul i64 4, %23
  call void @llvm.memset.p0.i64(ptr align 4 %21, i8 0, i64 %24, i1 false)
  br label %62

25:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !61
  br label %26

26:                                               ; preds = %58, %25
  %27 = load i32, ptr %7, align 4, !tbaa !61
  %28 = zext i32 %27 to i64
  %29 = getelementptr inbounds %"class.dali::BoxEncoder", ptr %12, i32 0, i32 3
  %30 = call noundef i64 @_ZNKSt6vectorIN4dali3BoxILi2EfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #4
  %31 = icmp ult i64 %28, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %61

33:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = load i32, ptr %7, align 4, !tbaa !61
  %36 = mul i32 %35, 4
  %37 = zext i32 %36 to i64
  %38 = getelementptr inbounds float, ptr %34, i64 %37
  store ptr %38, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %39 = getelementptr inbounds %"class.dali::BoxEncoder", ptr %12, i32 0, i32 3
  %40 = load i32, ptr %7, align 4, !tbaa !61
  %41 = zext i32 %40 to i64
  %42 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorIN4dali3BoxILi2EfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %41) #4
  store ptr %42, ptr %9, align 8, !tbaa !5
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %44 = load ptr, ptr %9, align 8, !tbaa !5
  %45 = call <2 x float> @_ZNK4dali3BoxILi2EfE8centroidEv(ptr noundef nonnull align 4 dereferenceable(16) %44)
  %46 = getelementptr inbounds %"struct.dali::vec", ptr %10, i32 0, i32 0
  %47 = getelementptr inbounds %"struct.dali::vec_base", ptr %46, i32 0, i32 0
  %48 = getelementptr inbounds %union.anon.0, ptr %47, i32 0, i32 0
  store <2 x float> %45, ptr %48, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %49 = load ptr, ptr %9, align 8, !tbaa !5
  %50 = call <2 x float> @_ZNK4dali3BoxILi2EfE6extentEv(ptr noundef nonnull align 4 dereferenceable(16) %49)
  %51 = getelementptr inbounds %"struct.dali::vec", ptr %11, i32 0, i32 0
  %52 = getelementptr inbounds %"struct.dali::vec_base", ptr %51, i32 0, i32 0
  %53 = getelementptr inbounds %union.anon.0, ptr %52, i32 0, i32 0
  store <2 x float> %50, ptr %53, align 4
  call void @_ZN4dali16WriteBoxToOutputILi2EEEvPfRKNS_3vecIXT_EfEES5_(ptr noundef %43, ptr noundef nonnull align 4 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = load i32, ptr %7, align 4, !tbaa !61
  %56 = zext i32 %55 to i64
  %57 = getelementptr inbounds i32, ptr %54, i64 %56
  store i32 0, ptr %57, align 4, !tbaa !61
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %58

58:                                               ; preds = %33
  %59 = load i32, ptr %7, align 4, !tbaa !61
  %60 = add i32 %59, 1
  store i32 %60, ptr %7, align 4, !tbaa !61
  br label %26, !llvm.loop !62

61:                                               ; preds = %32
  br label %62

62:                                               ; preds = %61, %16
  ret void
}

; 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 @_ZN4dali16WriteBoxToOutputILi2EEEvPfRKNS_3vecIXT_EfEES5_(ptr noundef, ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #1

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZNK4dali3BoxILi2EfE8centroidEv(ptr noundef nonnull align 4 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZNK4dali3BoxILi2EfE6extentEv(ptr noundef nonnull align 4 dereferenceable(16)) #2 align 2

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 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { 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, !54, i64 432}
!10 = !{!"_ZTSN4dali10BoxEncoderINS_10CPUBackendEEE", !11, i64 0, !49, i64 400, !50, i64 408, !54, i64 432, !55, i64 440, !55, i64 464, !49, i64 488}
!11 = !{!"_ZTSN4dali17StatelessOperatorINS_10CPUBackendEEE", !12, i64 0}
!12 = !{!"_ZTSN4dali8OperatorINS_10CPUBackendEEE", !13, i64 0}
!13 = !{!"_ZTSN4dali12OperatorBaseE", !14, i64 8, !44, i64 336, !44, i64 340, !45, i64 344}
!14 = !{!"_ZTSN4dali6OpSpecE", !15, i64 0, !6, i64 32, !18, i64 40, !22, i64 64, !30, i64 112, !22, i64 136, !34, i64 184, !37, i64 232, !37, i64 256, !41, i64 280}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !16, i64 0, !17, i64 8, !7, i64 16}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!"_ZTSSt6vectorISt10shared_ptrIN4dali8ArgumentEESaIS3_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN4dali8ArgumentEESaIS3_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN4dali8ArgumentEESaIS3_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN4dali8ArgumentEESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIvESaISt4pairIKS5_iEEE", !23, i64 0}
!23 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESt10_Select1stIS8_ESt4lessIvESaIS8_EE", !24, i64 0}
!24 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESt10_Select1stIS8_ESt4lessIvESaIS8_EE13_Rb_tree_implISC_Lb1EEE", !25, i64 0, !27, i64 8}
!25 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIvEE", !26, i64 0}
!26 = !{!"_ZTSSt4lessIvE"}
!27 = !{!"_ZTSSt15_Rb_tree_header", !28, i64 0, !17, i64 32}
!28 = !{!"_ZTSSt18_Rb_tree_node_base", !29, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!29 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!30 = !{!"_ZTSSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESaIS7_EE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESaIS7_EE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESaIS7_EE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESaIS7_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!34 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIvESaISt4pairIKS5_S5_EEE", !35, i64 0}
!35 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIvESaIS8_EE", !36, i64 0}
!36 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIvESaIS8_EE13_Rb_tree_implISC_Lb1EEE", !25, i64 0, !27, i64 8}
!37 = !{!"_ZTSSt6vectorIN4dali6OpSpec15InOutDeviceDescESaIS2_EE", !38, i64 0}
!38 = !{!"_ZTSSt12_Vector_baseIN4dali6OpSpec15InOutDeviceDescESaIS2_EE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIN4dali6OpSpec15InOutDeviceDescESaIS2_EE12_Vector_implE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIN4dali6OpSpec15InOutDeviceDescESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!41 = !{!"_ZTSSt3mapIN4dali6OpSpec15InOutDeviceDescEiSt4lessIvESaISt4pairIKS2_iEEE", !42, i64 0}
!42 = !{!"_ZTSSt8_Rb_treeIN4dali6OpSpec15InOutDeviceDescESt4pairIKS2_iESt10_Select1stIS5_ESt4lessIvESaIS5_EE", !43, i64 0}
!43 = !{!"_ZTSNSt8_Rb_treeIN4dali6OpSpec15InOutDeviceDescESt4pairIKS2_iESt10_Select1stIS5_ESt4lessIvESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !25, i64 0, !27, i64 8}
!44 = !{!"int", !7, i64 0}
!45 = !{!"_ZTSSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3anySt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S6_EEE", !46, i64 0}
!46 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St3anyESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE", !6, i64 0, !17, i64 8, !47, i64 16, !17, i64 24, !48, i64 32, !6, i64 48}
!47 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!48 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !49, i64 0, !17, i64 8}
!49 = !{!"float", !7, i64 0}
!50 = !{!"_ZTSSt6vectorIN4dali3BoxILi2EfEESaIS2_EE", !51, i64 0}
!51 = !{!"_ZTSSt12_Vector_baseIN4dali3BoxILi2EfEESaIS2_EE", !52, i64 0}
!52 = !{!"_ZTSNSt12_Vector_baseIN4dali3BoxILi2EfEESaIS2_EE12_Vector_implE", !53, i64 0}
!53 = !{!"_ZTSNSt12_Vector_baseIN4dali3BoxILi2EfEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!54 = !{!"bool", !7, i64 0}
!55 = !{!"_ZTSSt6vectorIfSaIfEE", !56, i64 0}
!56 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !57, i64 0}
!57 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !58, i64 0}
!58 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!59 = !{i8 0, i8 2}
!60 = !{}
!61 = !{!44, !44, i64 0}
!62 = distinct !{!62, !63}
!63 = !{!"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"

%"struct.dali::vec" = type { %"struct.dali::vec_base" }
%"struct.dali::vec_base" = type { %union.anon.0 }
%union.anon.0 = type { [2 x 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 nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorIN4dali3BoxILi2EfEESaIS2_EEixEm(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 @_ZNKSt6vectorIN4dali3BoxILi2EfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4dali10BoxEncoderINS_10CPUBackendEE20WriteAnchorsToOutputEPfPi(ptr noundef nonnull align 8 dereferenceable(492) %0, ptr noundef %1, ptr nocapture noundef writeonly %2) local_unnamed_addr #2 align 2 {
  %4 = alloca %"struct.dali::vec", align 8
  %5 = alloca %"struct.dali::vec", align 8
  %6 = getelementptr inbounds i8, ptr %0, i64 432
  %7 = load i8, ptr %6, align 8, !tbaa !5, !range !58, !noundef !59
  %8 = trunc nuw i8 %7 to i1
  %9 = getelementptr inbounds i8, ptr %0, i64 408
  br i1 %8, label %11, label %.preheader

.preheader:                                       ; preds = %3
  %10 = tail call noundef i64 @_ZNKSt6vectorIN4dali3BoxILi2EfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  %.not = icmp eq i64 %10, 0
  br i1 %.not, label %.loopexit, label %.lr.ph

11:                                               ; preds = %3
  %12 = tail call noundef i64 @_ZNKSt6vectorIN4dali3BoxILi2EfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  %13 = shl i64 %12, 4
  tail call void @llvm.memset.p0.i64(ptr align 4 %1, i8 0, i64 %13, i1 false)
  %14 = tail call noundef i64 @_ZNKSt6vectorIN4dali3BoxILi2EfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  %15 = shl i64 %14, 2
  tail call void @llvm.memset.p0.i64(ptr align 4 %2, i8 0, i64 %15, i1 false)
  br label %.loopexit

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %16 = phi i64 [ %25, %.lr.ph ], [ 0, %.preheader ]
  %.013 = phi i32 [ %24, %.lr.ph ], [ 0, %.preheader ]
  %17 = shl i32 %.013, 2
  %18 = zext i32 %17 to i64
  %19 = getelementptr inbounds float, ptr %1, i64 %18
  %20 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorIN4dali3BoxILi2EfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %21 = call <2 x float> @_ZNK4dali3BoxILi2EfE8centroidEv(ptr noundef nonnull align 4 dereferenceable(16) %20)
  store <2 x float> %21, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %22 = call <2 x float> @_ZNK4dali3BoxILi2EfE6extentEv(ptr noundef nonnull align 4 dereferenceable(16) %20)
  store <2 x float> %22, ptr %5, align 8
  call void @_ZN4dali16WriteBoxToOutputILi2EEEvPfRKNS_3vecIXT_EfEES5_(ptr noundef %19, ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %23 = getelementptr inbounds i32, ptr %2, i64 %16
  store i32 0, ptr %23, align 4, !tbaa !60
  %24 = add i32 %.013, 1
  %25 = zext i32 %24 to i64
  %26 = call noundef i64 @_ZNKSt6vectorIN4dali3BoxILi2EfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  %27 = icmp ugt i64 %26, %25
  br i1 %27, label %.lr.ph, label %.loopexit, !llvm.loop !61

.loopexit:                                        ; preds = %.lr.ph, %.preheader, %11
  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) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4dali16WriteBoxToOutputILi2EEEvPfRKNS_3vecIXT_EfEES5_(ptr noundef, ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZNK4dali3BoxILi2EfE8centroidEv(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZNK4dali3BoxILi2EfE6extentEv(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #2 align 2

attributes #0 = { mustprogress 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 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { 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, !53, i64 432}
!6 = !{!"_ZTSN4dali10BoxEncoderINS_10CPUBackendEEE", !7, i64 0, !48, i64 400, !49, i64 408, !53, i64 432, !54, i64 440, !54, i64 464, !48, i64 488}
!7 = !{!"_ZTSN4dali17StatelessOperatorINS_10CPUBackendEEE", !8, i64 0}
!8 = !{!"_ZTSN4dali8OperatorINS_10CPUBackendEEE", !9, i64 0}
!9 = !{!"_ZTSN4dali12OperatorBaseE", !10, i64 8, !43, i64 336, !43, i64 340, !44, i64 344}
!10 = !{!"_ZTSN4dali6OpSpecE", !11, i64 0, !13, i64 32, !17, i64 40, !21, i64 64, !29, i64 112, !21, i64 136, !33, i64 184, !36, i64 232, !36, i64 256, !40, i64 280}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !16, i64 8, !14, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !13, i64 0}
!13 = !{!"any pointer", !14, i64 0}
!14 = !{!"omnipotent char", !15, i64 0}
!15 = !{!"Simple C++ TBAA"}
!16 = !{!"long", !14, i64 0}
!17 = !{!"_ZTSSt6vectorISt10shared_ptrIN4dali8ArgumentEESaIS3_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN4dali8ArgumentEESaIS3_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN4dali8ArgumentEESaIS3_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN4dali8ArgumentEESaIS3_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!21 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIvESaISt4pairIKS5_iEEE", !22, i64 0}
!22 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESt10_Select1stIS8_ESt4lessIvESaIS8_EE", !23, i64 0}
!23 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESt10_Select1stIS8_ESt4lessIvESaIS8_EE13_Rb_tree_implISC_Lb1EEE", !24, i64 0, !26, i64 8}
!24 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIvEE", !25, i64 0}
!25 = !{!"_ZTSSt4lessIvE"}
!26 = !{!"_ZTSSt15_Rb_tree_header", !27, i64 0, !16, i64 32}
!27 = !{!"_ZTSSt18_Rb_tree_node_base", !28, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!28 = !{!"_ZTSSt14_Rb_tree_color", !14, i64 0}
!29 = !{!"_ZTSSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESaIS7_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESaIS7_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESaIS7_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiESaIS7_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!33 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIvESaISt4pairIKS5_S5_EEE", !34, i64 0}
!34 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIvESaIS8_EE", !35, i64 0}
!35 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIvESaIS8_EE13_Rb_tree_implISC_Lb1EEE", !24, i64 0, !26, i64 8}
!36 = !{!"_ZTSSt6vectorIN4dali6OpSpec15InOutDeviceDescESaIS2_EE", !37, i64 0}
!37 = !{!"_ZTSSt12_Vector_baseIN4dali6OpSpec15InOutDeviceDescESaIS2_EE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIN4dali6OpSpec15InOutDeviceDescESaIS2_EE12_Vector_implE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIN4dali6OpSpec15InOutDeviceDescESaIS2_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!40 = !{!"_ZTSSt3mapIN4dali6OpSpec15InOutDeviceDescEiSt4lessIvESaISt4pairIKS2_iEEE", !41, i64 0}
!41 = !{!"_ZTSSt8_Rb_treeIN4dali6OpSpec15InOutDeviceDescESt4pairIKS2_iESt10_Select1stIS5_ESt4lessIvESaIS5_EE", !42, i64 0}
!42 = !{!"_ZTSNSt8_Rb_treeIN4dali6OpSpec15InOutDeviceDescESt4pairIKS2_iESt10_Select1stIS5_ESt4lessIvESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !24, i64 0, !26, i64 8}
!43 = !{!"int", !14, i64 0}
!44 = !{!"_ZTSSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3anySt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S6_EEE", !45, i64 0}
!45 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St3anyESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE", !13, i64 0, !16, i64 8, !46, i64 16, !16, i64 24, !47, i64 32, !13, i64 48}
!46 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !13, i64 0}
!47 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !48, i64 0, !16, i64 8}
!48 = !{!"float", !14, i64 0}
!49 = !{!"_ZTSSt6vectorIN4dali3BoxILi2EfEESaIS2_EE", !50, i64 0}
!50 = !{!"_ZTSSt12_Vector_baseIN4dali3BoxILi2EfEESaIS2_EE", !51, i64 0}
!51 = !{!"_ZTSNSt12_Vector_baseIN4dali3BoxILi2EfEESaIS2_EE12_Vector_implE", !52, i64 0}
!52 = !{!"_ZTSNSt12_Vector_baseIN4dali3BoxILi2EfEESaIS2_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!53 = !{!"bool", !14, i64 0}
!54 = !{!"_ZTSSt6vectorIfSaIfEE", !55, i64 0}
!55 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !56, i64 0}
!56 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !57, i64 0}
!57 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!58 = !{i8 0, i8 2}
!59 = !{}
!60 = !{!43, !43, i64 0}
!61 = distinct !{!61, !62}
!62 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass