; LLVM IR from Lut1n/ImpGears :: src/ImpGears/Renderer/GeometryRenderer.ll (ZN3imp16GeometryRenderer12clearTargetsEv)

; 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.imp::Vec4" = type { %"class.imp::Vec.12" }
%"class.imp::Vec.12" = type { %"class.imp::Object", [4 x float] }
%"class.imp::Object" = type { ptr, %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.imp::GeometryRenderer" = type <{ %"class.imp::Object", %"class.std::map", %"class.std::map.0", %"struct.imp::UniformMap", %"class.std::shared_ptr.16", %"class.std::shared_ptr.19", %"class.imp::Rasterizer", %"class.imp::Matrix4", %"class.imp::Matrix4", %"class.imp::Matrix4", %"class.imp::Vec4", i32, [4 x i8], %"class.std::shared_ptr.25", i8, [7 x i8] }>
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, std::shared_ptr<imp::Image>>, std::_Select1st<std::pair<const int, std::shared_ptr<imp::Image>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, std::shared_ptr<imp::Image>>, std::_Select1st<std::pair<const int, std::shared_ptr<imp::Image>>>, std::less<int>>::_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.0" = type { %"class.std::_Rb_tree.1" }
%"class.std::_Rb_tree.1" = type { %"struct.std::_Rb_tree<int, std::pair<const int, imp::Vec4>, std::_Select1st<std::pair<const int, imp::Vec4>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, imp::Vec4>, std::_Select1st<std::pair<const int, imp::Vec4>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.imp::UniformMap" = type { %"class.std::map.5", %"class.imp::Matrix3", %"class.imp::Matrix4", %"class.imp::Vec3", %"class.imp::Vec4", %"class.std::shared_ptr.13" }
%"class.std::map.5" = type { %"class.std::_Rb_tree.6" }
%"class.std::_Rb_tree.6" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::shared_ptr<imp::Uniform>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::shared_ptr<imp::Uniform>>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::shared_ptr<imp::Uniform>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::shared_ptr<imp::Uniform>>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.imp::Matrix3" = type { %"class.imp::Matrix.base", [4 x i8] }
%"class.imp::Matrix.base" = type <{ %"class.imp::Object", [9 x float] }>
%"class.imp::Vec3" = type { %"class.imp::Vec.base", [4 x i8] }
%"class.imp::Vec.base" = type <{ %"class.imp::Object", [3 x float] }>
%"class.std::shared_ptr.13" = type { %"class.std::__shared_ptr.14" }
%"class.std::__shared_ptr.14" = type { ptr, %"class.std::__shared_count" }
%"class.std::shared_ptr.16" = type { %"class.std::__shared_ptr.17" }
%"class.std::__shared_ptr.17" = type { ptr, %"class.std::__shared_count" }
%"class.std::shared_ptr.19" = type { %"class.std::__shared_ptr.20" }
%"class.std::__shared_ptr.20" = type { ptr, %"class.std::__shared_count" }
%"class.imp::Rasterizer" = type { %"class.imp::Object", %"class.std::map", %"class.std::vector", %"class.std::vector", %"struct.imp::UniformMap", %"class.imp::Vec4", %"class.std::shared_ptr.19" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<imp::Varyings, std::allocator<imp::Varyings>>::_Vector_impl" }
%"struct.std::_Vector_base<imp::Varyings, std::allocator<imp::Varyings>>::_Vector_impl" = type { %"struct.std::_Vector_base<imp::Varyings, std::allocator<imp::Varyings>>::_Vector_impl_data" }
%"struct.std::_Vector_base<imp::Varyings, std::allocator<imp::Varyings>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.imp::Matrix4" = type { %"class.imp::Matrix.11" }
%"class.imp::Matrix.11" = type { %"class.imp::Object", [16 x float] }
%"class.std::shared_ptr.25" = type { %"class.std::__shared_ptr.26" }
%"class.std::__shared_ptr.26" = type { ptr, %"class.std::__shared_count" }

declare i32 @__gxx_personality_v0(...)

; 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 @_ZN3imp16GeometryRenderer12clearTargetsEv(ptr noundef nonnull align 8 dereferenceable(1249) %0) #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.imp::Vec4", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %7 = load ptr, ptr %2, align 8
  %8 = getelementptr inbounds %"class.imp::GeometryRenderer", ptr %7, i32 0, i32 14
  %9 = load i8, ptr %8, align 8, !tbaa !9, !range !56, !noundef !57
  %10 = trunc i8 %9 to i1
  br i1 %10, label %11, label %19

11:                                               ; preds = %1
  %12 = getelementptr inbounds %"class.imp::GeometryRenderer", ptr %7, i32 0, i32 13
  %13 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp10FloatImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %12) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %3) #4
  call void @_ZN3imp4Vec4C2Ef(ptr noundef nonnull align 8 dereferenceable(40) %3, float noundef 2.550000e+02)
  invoke void @_ZN3imp10FloatImage4fillERKNS_4Vec4E(ptr noundef nonnull align 8 dereferenceable(88) %13, ptr noundef nonnull align 8 dereferenceable(40) %3)
          to label %14 unwind label %15

14:                                               ; preds = %11
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %3) #4
  br label %19

15:                                               ; preds = %11
  %16 = landingpad { ptr, i32 }
          cleanup
  %17 = extractvalue { ptr, i32 } %16, 0
  store ptr %17, ptr %4, align 8
  %18 = extractvalue { ptr, i32 } %16, 1
  store i32 %18, ptr %5, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %3) #4
  br label %37

19:                                               ; preds = %14, %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !58
  br label %20

20:                                               ; preds = %33, %19
  %21 = load i32, ptr %6, align 4, !tbaa !58
  %22 = getelementptr inbounds %"class.imp::GeometryRenderer", ptr %7, i32 0, i32 1
  %23 = call noundef i64 @_ZNKSt3mapIiSt10shared_ptrIN3imp5ImageEESt4lessIiESaISt4pairIKiS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %22) #4
  %24 = trunc i64 %23 to i32
  %25 = icmp slt i32 %21, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %36

27:                                               ; preds = %20
  %28 = getelementptr inbounds %"class.imp::GeometryRenderer", ptr %7, i32 0, i32 1
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt3mapIiSt10shared_ptrIN3imp5ImageEESt4lessIiESaISt4pairIKiS3_EEEixERS7_(ptr noundef nonnull align 8 dereferenceable(48) %28, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %30 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %29) #4
  %31 = getelementptr inbounds %"class.imp::GeometryRenderer", ptr %7, i32 0, i32 2
  %32 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt3mapIiN3imp4Vec4ESt4lessIiESaISt4pairIKiS1_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(48) %31, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @_ZN3imp5Image4fillERKNS_4Vec4E(ptr noundef nonnull align 8 dereferenceable(88) %30, ptr noundef nonnull align 8 dereferenceable(40) %32)
  br label %33

33:                                               ; preds = %27
  %34 = load i32, ptr %6, align 4, !tbaa !58
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %6, align 4, !tbaa !58
  br label %20, !llvm.loop !60

36:                                               ; preds = %26
  ret void

37:                                               ; preds = %15
  %38 = load ptr, ptr %4, align 8
  %39 = load i32, ptr %5, align 4
  %40 = insertvalue { ptr, i32 } poison, ptr %38, 0
  %41 = insertvalue { ptr, i32 } %40, i32 %39, 1
  resume { ptr, i32 } %41
}

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

declare void @_ZN3imp10FloatImage4fillERKNS_4Vec4E(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(40)) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp4Vec4C2Ef(ptr noundef nonnull align 8 dereferenceable(40), float noundef) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt3mapIiSt10shared_ptrIN3imp5ImageEESt4lessIiESaISt4pairIKiS3_EEEixERS7_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

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

declare void @_ZN3imp5Image4fillERKNS_4Vec4E(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(40)) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt3mapIiN3imp4Vec4ESt4lessIiESaISt4pairIKiS1_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !55, i64 1248}
!10 = !{!"_ZTSN3imp16GeometryRendererE", !11, i64 0, !15, i64 24, !24, i64 72, !27, i64 120, !43, i64 416, !45, i64 432, !47, i64 448, !35, i64 920, !35, i64 1008, !35, i64 1096, !39, i64 1184, !52, i64 1224, !53, i64 1232, !55, i64 1248}
!11 = !{!"_ZTSN3imp6ObjectE", !12, i64 8}
!12 = !{!"_ZTSSt10shared_ptrIN3imp6ObjectEE", !13, i64 0}
!13 = !{!"_ZTSSt12__shared_ptrIN3imp6ObjectELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !14, i64 8}
!14 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!15 = !{!"_ZTSSt3mapIiSt10shared_ptrIN3imp5ImageEESt4lessIiESaISt4pairIKiS3_EEE", !16, i64 0}
!16 = !{!"_ZTSSt8_Rb_treeIiSt4pairIKiSt10shared_ptrIN3imp5ImageEEESt10_Select1stIS6_ESt4lessIiESaIS6_EE", !17, i64 0}
!17 = !{!"_ZTSNSt8_Rb_treeIiSt4pairIKiSt10shared_ptrIN3imp5ImageEEESt10_Select1stIS6_ESt4lessIiESaIS6_EE13_Rb_tree_implISA_Lb1EEE", !18, i64 0, !20, i64 8}
!18 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIiEE", !19, i64 0}
!19 = !{!"_ZTSSt4lessIiE"}
!20 = !{!"_ZTSSt15_Rb_tree_header", !21, i64 0, !23, i64 32}
!21 = !{!"_ZTSSt18_Rb_tree_node_base", !22, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!22 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!23 = !{!"long", !7, i64 0}
!24 = !{!"_ZTSSt3mapIiN3imp4Vec4ESt4lessIiESaISt4pairIKiS1_EEE", !25, i64 0}
!25 = !{!"_ZTSSt8_Rb_treeIiSt4pairIKiN3imp4Vec4EESt10_Select1stIS4_ESt4lessIiESaIS4_EE", !26, i64 0}
!26 = !{!"_ZTSNSt8_Rb_treeIiSt4pairIKiN3imp4Vec4EESt10_Select1stIS4_ESt4lessIiESaIS4_EE13_Rb_tree_implIS8_Lb1EEE", !18, i64 0, !20, i64 8}
!27 = !{!"_ZTSN3imp10UniformMapE", !28, i64 0, !33, i64 48, !35, i64 112, !37, i64 200, !39, i64 240, !41, i64 280}
!28 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN3imp7UniformEESt4lessIS5_ESaISt4pairIKS5_S9_EEE", !29, i64 0}
!29 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St10shared_ptrIN3imp7UniformEEESt10_Select1stISC_ESt4lessIS5_ESaISC_EE", !30, i64 0}
!30 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St10shared_ptrIN3imp7UniformEEESt10_Select1stISC_ESt4lessIS5_ESaISC_EE13_Rb_tree_implISG_Lb1EEE", !31, i64 0, !20, i64 8}
!31 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !32, i64 0}
!32 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!33 = !{!"_ZTSN3imp7Matrix3E", !34, i64 0}
!34 = !{!"_ZTSN3imp6MatrixILi3ELi3EfEE", !11, i64 0, !7, i64 24}
!35 = !{!"_ZTSN3imp7Matrix4E", !36, i64 0}
!36 = !{!"_ZTSN3imp6MatrixILi4ELi4EfEE", !11, i64 0, !7, i64 24}
!37 = !{!"_ZTSN3imp4Vec3E", !38, i64 0}
!38 = !{!"_ZTSN3imp3VecILi3EfEE", !11, i64 0, !7, i64 24}
!39 = !{!"_ZTSN3imp4Vec4E", !40, i64 0}
!40 = !{!"_ZTSN3imp3VecILi4EfEE", !11, i64 0, !7, i64 24}
!41 = !{!"_ZTSSt10shared_ptrIN3imp12ImageSamplerEE", !42, i64 0}
!42 = !{!"_ZTSSt12__shared_ptrIN3imp12ImageSamplerELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !14, i64 8}
!43 = !{!"_ZTSSt10shared_ptrIN3imp16GeometryRenderer12VertCallbackEE", !44, i64 0}
!44 = !{!"_ZTSSt12__shared_ptrIN3imp16GeometryRenderer12VertCallbackELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !14, i64 8}
!45 = !{!"_ZTSSt10shared_ptrIN3imp12FragCallbackEE", !46, i64 0}
!46 = !{!"_ZTSSt12__shared_ptrIN3imp12FragCallbackELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !14, i64 8}
!47 = !{!"_ZTSN3imp10RasterizerE", !11, i64 0, !15, i64 24, !48, i64 72, !48, i64 96, !27, i64 120, !39, i64 416, !45, i64 456}
!48 = !{!"_ZTSSt6vectorIN3imp8VaryingsESaIS1_EE", !49, i64 0}
!49 = !{!"_ZTSSt12_Vector_baseIN3imp8VaryingsESaIS1_EE", !50, i64 0}
!50 = !{!"_ZTSNSt12_Vector_baseIN3imp8VaryingsESaIS1_EE12_Vector_implE", !51, i64 0}
!51 = !{!"_ZTSNSt12_Vector_baseIN3imp8VaryingsESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!52 = !{!"_ZTSN3imp16GeometryRenderer4CullE", !7, i64 0}
!53 = !{!"_ZTSSt10shared_ptrIN3imp10FloatImageEE", !54, i64 0}
!54 = !{!"_ZTSSt12__shared_ptrIN3imp10FloatImageELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !14, i64 8}
!55 = !{!"bool", !7, i64 0}
!56 = !{i8 0, i8 2}
!57 = !{}
!58 = !{!59, !59, i64 0}
!59 = !{!"int", !7, i64 0}
!60 = distinct !{!60, !61}
!61 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.imp::Vec4" = type { %"class.imp::Vec.12" }
%"class.imp::Vec.12" = type { %"class.imp::Object", [4 x float] }
%"class.imp::Object" = type { ptr, %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }

declare i32 @__gxx_personality_v0(...)

; 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 @_ZN3imp16GeometryRenderer12clearTargetsEv(ptr noundef nonnull align 8 dereferenceable(1249) %0) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.imp::Vec4", align 8
  %3 = alloca i32, align 4
  %4 = getelementptr inbounds i8, ptr %0, i64 1248
  %5 = load i8, ptr %4, align 8, !tbaa !5, !range !55, !noundef !56
  %6 = trunc nuw i8 %5 to i1
  br i1 %6, label %7, label %13

7:                                                ; preds = %1
  %8 = getelementptr inbounds i8, ptr %0, i64 1232
  %9 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp10FloatImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %8) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %2) #4
  call void @_ZN3imp4Vec4C2Ef(ptr noundef nonnull align 8 dereferenceable(40) %2, float noundef 2.550000e+02)
  invoke void @_ZN3imp10FloatImage4fillERKNS_4Vec4E(ptr noundef nonnull align 8 dereferenceable(88) %9, ptr noundef nonnull align 8 dereferenceable(40) %2)
          to label %10 unwind label %11

10:                                               ; preds = %7
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #4
  br label %13

11:                                               ; preds = %7
  %12 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #4
  resume { ptr, i32 } %12

13:                                               ; preds = %10, %1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  %14 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 0, ptr %3, align 4, !tbaa !57
  %15 = call noundef i64 @_ZNKSt3mapIiSt10shared_ptrIN3imp5ImageEESt4lessIiESaISt4pairIKiS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %14) #4
  %16 = trunc i64 %15 to i32
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %13
  %18 = getelementptr inbounds i8, ptr %0, i64 72
  br label %19

._crit_edge:                                      ; preds = %19, %13
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  ret void

19:                                               ; preds = %.lr.ph, %19
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt3mapIiSt10shared_ptrIN3imp5ImageEESt4lessIiESaISt4pairIKiS3_EEEixERS7_(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %21 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %20) #4
  %22 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt3mapIiN3imp4Vec4ESt4lessIiESaISt4pairIKiS1_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(48) %18, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @_ZN3imp5Image4fillERKNS_4Vec4E(ptr noundef nonnull align 8 dereferenceable(88) %21, ptr noundef nonnull align 8 dereferenceable(40) %22)
  %23 = load i32, ptr %3, align 4, !tbaa !57
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %3, align 4, !tbaa !57
  %25 = call noundef i64 @_ZNKSt3mapIiSt10shared_ptrIN3imp5ImageEESt4lessIiESaISt4pairIKiS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %14) #4
  %26 = trunc i64 %25 to i32
  %27 = icmp slt i32 %24, %26
  br i1 %27, label %19, label %._crit_edge, !llvm.loop !59
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp10FloatImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2 align 2

declare void @_ZN3imp10FloatImage4fillERKNS_4Vec4E(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp4Vec4C2Ef(ptr noundef nonnull align 8 dereferenceable(40), float noundef) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt3mapIiSt10shared_ptrIN3imp5ImageEESt4lessIiESaISt4pairIKiS3_EEEixERS7_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp5ImageELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2 align 2

declare void @_ZN3imp5Image4fillERKNS_4Vec4E(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt3mapIiN3imp4Vec4ESt4lessIiESaISt4pairIKiS1_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !54, i64 1248}
!6 = !{!"_ZTSN3imp16GeometryRendererE", !7, i64 0, !14, i64 24, !23, i64 72, !26, i64 120, !42, i64 416, !44, i64 432, !46, i64 448, !34, i64 920, !34, i64 1008, !34, i64 1096, !38, i64 1184, !51, i64 1224, !52, i64 1232, !54, i64 1248}
!7 = !{!"_ZTSN3imp6ObjectE", !8, i64 8}
!8 = !{!"_ZTSSt10shared_ptrIN3imp6ObjectEE", !9, i64 0}
!9 = !{!"_ZTSSt12__shared_ptrIN3imp6ObjectELN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0, !13, i64 8}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0}
!14 = !{!"_ZTSSt3mapIiSt10shared_ptrIN3imp5ImageEESt4lessIiESaISt4pairIKiS3_EEE", !15, i64 0}
!15 = !{!"_ZTSSt8_Rb_treeIiSt4pairIKiSt10shared_ptrIN3imp5ImageEEESt10_Select1stIS6_ESt4lessIiESaIS6_EE", !16, i64 0}
!16 = !{!"_ZTSNSt8_Rb_treeIiSt4pairIKiSt10shared_ptrIN3imp5ImageEEESt10_Select1stIS6_ESt4lessIiESaIS6_EE13_Rb_tree_implISA_Lb1EEE", !17, i64 0, !19, i64 8}
!17 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIiEE", !18, i64 0}
!18 = !{!"_ZTSSt4lessIiE"}
!19 = !{!"_ZTSSt15_Rb_tree_header", !20, i64 0, !22, i64 32}
!20 = !{!"_ZTSSt18_Rb_tree_node_base", !21, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!21 = !{!"_ZTSSt14_Rb_tree_color", !11, i64 0}
!22 = !{!"long", !11, i64 0}
!23 = !{!"_ZTSSt3mapIiN3imp4Vec4ESt4lessIiESaISt4pairIKiS1_EEE", !24, i64 0}
!24 = !{!"_ZTSSt8_Rb_treeIiSt4pairIKiN3imp4Vec4EESt10_Select1stIS4_ESt4lessIiESaIS4_EE", !25, i64 0}
!25 = !{!"_ZTSNSt8_Rb_treeIiSt4pairIKiN3imp4Vec4EESt10_Select1stIS4_ESt4lessIiESaIS4_EE13_Rb_tree_implIS8_Lb1EEE", !17, i64 0, !19, i64 8}
!26 = !{!"_ZTSN3imp10UniformMapE", !27, i64 0, !32, i64 48, !34, i64 112, !36, i64 200, !38, i64 240, !40, i64 280}
!27 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN3imp7UniformEESt4lessIS5_ESaISt4pairIKS5_S9_EEE", !28, i64 0}
!28 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St10shared_ptrIN3imp7UniformEEESt10_Select1stISC_ESt4lessIS5_ESaISC_EE", !29, i64 0}
!29 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St10shared_ptrIN3imp7UniformEEESt10_Select1stISC_ESt4lessIS5_ESaISC_EE13_Rb_tree_implISG_Lb1EEE", !30, i64 0, !19, i64 8}
!30 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !31, i64 0}
!31 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!32 = !{!"_ZTSN3imp7Matrix3E", !33, i64 0}
!33 = !{!"_ZTSN3imp6MatrixILi3ELi3EfEE", !7, i64 0, !11, i64 24}
!34 = !{!"_ZTSN3imp7Matrix4E", !35, i64 0}
!35 = !{!"_ZTSN3imp6MatrixILi4ELi4EfEE", !7, i64 0, !11, i64 24}
!36 = !{!"_ZTSN3imp4Vec3E", !37, i64 0}
!37 = !{!"_ZTSN3imp3VecILi3EfEE", !7, i64 0, !11, i64 24}
!38 = !{!"_ZTSN3imp4Vec4E", !39, i64 0}
!39 = !{!"_ZTSN3imp3VecILi4EfEE", !7, i64 0, !11, i64 24}
!40 = !{!"_ZTSSt10shared_ptrIN3imp12ImageSamplerEE", !41, i64 0}
!41 = !{!"_ZTSSt12__shared_ptrIN3imp12ImageSamplerELN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0, !13, i64 8}
!42 = !{!"_ZTSSt10shared_ptrIN3imp16GeometryRenderer12VertCallbackEE", !43, i64 0}
!43 = !{!"_ZTSSt12__shared_ptrIN3imp16GeometryRenderer12VertCallbackELN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0, !13, i64 8}
!44 = !{!"_ZTSSt10shared_ptrIN3imp12FragCallbackEE", !45, i64 0}
!45 = !{!"_ZTSSt12__shared_ptrIN3imp12FragCallbackELN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0, !13, i64 8}
!46 = !{!"_ZTSN3imp10RasterizerE", !7, i64 0, !14, i64 24, !47, i64 72, !47, i64 96, !26, i64 120, !38, i64 416, !44, i64 456}
!47 = !{!"_ZTSSt6vectorIN3imp8VaryingsESaIS1_EE", !48, i64 0}
!48 = !{!"_ZTSSt12_Vector_baseIN3imp8VaryingsESaIS1_EE", !49, i64 0}
!49 = !{!"_ZTSNSt12_Vector_baseIN3imp8VaryingsESaIS1_EE12_Vector_implE", !50, i64 0}
!50 = !{!"_ZTSNSt12_Vector_baseIN3imp8VaryingsESaIS1_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!51 = !{!"_ZTSN3imp16GeometryRenderer4CullE", !11, i64 0}
!52 = !{!"_ZTSSt10shared_ptrIN3imp10FloatImageEE", !53, i64 0}
!53 = !{!"_ZTSSt12__shared_ptrIN3imp10FloatImageELN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0, !13, i64 8}
!54 = !{!"bool", !11, i64 0}
!55 = !{i8 0, i8 2}
!56 = !{}
!57 = !{!58, !58, i64 0}
!58 = !{!"int", !11, i64 0}
!59 = distinct !{!59, !60}
!60 = !{!"llvm.loop.mustprogress"}


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