; LLVM IR from Lut1n/ImpGears :: src/ImpGears/Renderer/RenderTarget.ll (ZN3imp12RenderTarget5buildEiiibb)

; 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" }
%"class.imp::Vec" = 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.std::shared_ptr.8" = type { %"class.std::__shared_ptr.9" }
%"class.std::__shared_ptr.9" = type { ptr, %"class.std::__shared_count" }
%"class.imp::RenderTarget" = type <{ %"class.imp::Object", %"class.std::vector", %"class.std::vector.0", %"struct.std::pair", i8, i8, i8, [5 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::shared_ptr<imp::ImageSampler>, std::allocator<std::shared_ptr<imp::ImageSampler>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<imp::ImageSampler>, std::allocator<std::shared_ptr<imp::ImageSampler>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<imp::ImageSampler>, std::allocator<std::shared_ptr<imp::ImageSampler>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<imp::ImageSampler>, std::allocator<std::shared_ptr<imp::ImageSampler>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<imp::Vec4, std::allocator<imp::Vec4>>::_Vector_impl" }
%"struct.std::_Vector_base<imp::Vec4, std::allocator<imp::Vec4>>::_Vector_impl" = type { %"struct.std::_Vector_base<imp::Vec4, std::allocator<imp::Vec4>>::_Vector_impl_data" }
%"struct.std::_Vector_base<imp::Vec4, std::allocator<imp::Vec4>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type <{ %"class.std::shared_ptr.5", i32, [4 x i8] }>
%"class.std::shared_ptr.5" = type { %"class.std::__shared_ptr.6" }
%"class.std::__shared_ptr.6" = type { ptr, %"class.std::__shared_count" }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp12RenderTarget5buildEiiibb(ptr noundef nonnull align 8 dereferenceable(99) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i1 noundef zeroext %4, i1 noundef zeroext %5) #0 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  %13 = alloca %"class.imp::Vec4", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::shared_ptr.8", align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store i32 %2, ptr %9, align 4, !tbaa !9
  store i32 %3, ptr %10, align 4, !tbaa !9
  %18 = zext i1 %4 to i8
  store i8 %18, ptr %11, align 1, !tbaa !11
  %19 = zext i1 %5 to i8
  store i8 %19, ptr %12, align 1, !tbaa !11
  %20 = load ptr, ptr %7, align 8
  %21 = getelementptr inbounds %"class.imp::RenderTarget", ptr %20, i32 0, i32 4
  store i8 0, ptr %21, align 8, !tbaa !13
  %22 = getelementptr inbounds %"class.imp::RenderTarget", ptr %20, i32 0, i32 1
  %23 = load i32, ptr %10, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  call void @_ZNSt6vectorISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %24)
  %25 = getelementptr inbounds %"class.imp::RenderTarget", ptr %20, i32 0, i32 2
  %26 = load i32, ptr %10, align 4, !tbaa !9
  %27 = sext i32 %26 to i64
  call void @llvm.lifetime.start.p0(i64 40, ptr %13) #4
  call void @_ZN3imp4Vec4C2Ef(ptr noundef nonnull align 8 dereferenceable(40) %13, float noundef 0.000000e+00)
  invoke void @_ZNSt6vectorIN3imp4Vec4ESaIS1_EE6resizeEmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %27, ptr noundef nonnull align 8 dereferenceable(40) %13)
          to label %28 unwind label %34

28:                                               ; preds = %6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %29

29:                                               ; preds = %58, %28
  %30 = load i32, ptr %16, align 4, !tbaa !9
  %31 = load i32, ptr %10, align 4, !tbaa !9
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %38, label %33

33:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %61

34:                                               ; preds = %6
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %14, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %15, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #4
  br label %66

38:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #4
  call void @_ZN3imp12ImageSampler6createIJEEESt10shared_ptrIS0_EDpOT_(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.8") align 8 %17)
  %39 = getelementptr inbounds %"class.imp::RenderTarget", ptr %20, i32 0, i32 1
  %40 = load i32, ptr %16, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %41) #4
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN3imp12ImageSamplerEEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(16) %42, ptr noundef nonnull align 8 dereferenceable(16) %17) #4
  call void @_ZNSt12__shared_ptrIN3imp12ImageSamplerELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #4
  %44 = getelementptr inbounds %"class.imp::RenderTarget", ptr %20, i32 0, i32 1
  %45 = load i32, ptr %16, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %46) #4
  %48 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp12ImageSamplerELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %47) #4
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN3imp12ImageSampler14setInternalSrcEiii(ptr noundef nonnull align 8 dereferenceable(89) %48, i32 noundef %49, i32 noundef %50, i32 noundef 4)
  %51 = getelementptr inbounds %"class.imp::RenderTarget", ptr %20, i32 0, i32 1
  %52 = load i32, ptr %16, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef %53) #4
  %55 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp12ImageSamplerELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %54) #4
  %56 = load i8, ptr %12, align 1, !tbaa !11, !range !30, !noundef !31
  %57 = trunc i8 %56 to i1
  call void @_ZN3imp12ImageSampler7setMSAAEb(ptr noundef nonnull align 8 dereferenceable(89) %55, i1 noundef zeroext %57)
  br label %58

58:                                               ; preds = %38
  %59 = load i32, ptr %16, align 4, !tbaa !9
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %16, align 4, !tbaa !9
  br label %29, !llvm.loop !32

61:                                               ; preds = %33
  %62 = load i8, ptr %11, align 1, !tbaa !11, !range !30, !noundef !31
  %63 = trunc i8 %62 to i1
  %64 = getelementptr inbounds %"class.imp::RenderTarget", ptr %20, i32 0, i32 5
  %65 = zext i1 %63 to i8
  store i8 %65, ptr %64, align 1, !tbaa !34
  ret void

66:                                               ; preds = %34
  %67 = load ptr, ptr %14, align 8
  %68 = load i32, ptr %15, align 4
  %69 = insertvalue { ptr, i32 } poison, ptr %67, 0
  %70 = insertvalue { ptr, i32 } %69, i32 %68, 1
  resume { ptr, i32 } %70
}

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp12ImageSampler6createIJEEESt10shared_ptrIS0_EDpOT_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.8") align 8) #0 align 2

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

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

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

declare void @_ZN3imp12ImageSampler14setInternalSrcEiii(ptr noundef nonnull align 8 dereferenceable(89), i32 noundef, i32 noundef, i32 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3imp12ImageSampler7setMSAAEb(ptr noundef nonnull align 8 dereferenceable(89), i1 noundef zeroext) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !12, i64 96}
!14 = !{!"_ZTSN3imp12RenderTargetE", !15, i64 0, !19, i64 24, !23, i64 48, !27, i64 72, !12, i64 96, !12, i64 97, !12, i64 98}
!15 = !{!"_ZTSN3imp6ObjectE", !16, i64 8}
!16 = !{!"_ZTSSt10shared_ptrIN3imp6ObjectEE", !17, i64 0}
!17 = !{!"_ZTSSt12__shared_ptrIN3imp6ObjectELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !18, i64 8}
!18 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!19 = !{!"_ZTSSt6vectorISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSSt6vectorIN3imp4Vec4ESaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIN3imp4Vec4ESaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIN3imp4Vec4ESaIS1_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIN3imp4Vec4ESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!"_ZTSSt4pairISt10shared_ptrIN3imp14CubeMapSamplerEEiE", !28, i64 0, !10, i64 16}
!28 = !{!"_ZTSSt10shared_ptrIN3imp14CubeMapSamplerEE", !29, i64 0}
!29 = !{!"_ZTSSt12__shared_ptrIN3imp14CubeMapSamplerELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !18, i64 8}
!30 = !{i8 0, i8 2}
!31 = !{}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!14, !12, i64 97}


; 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" }
%"class.imp::Vec" = 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.std::shared_ptr.8" = type { %"class.std::__shared_ptr.9" }
%"class.std::__shared_ptr.9" = type { ptr, %"class.std::__shared_count" }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp12RenderTarget5buildEiiibb(ptr noundef nonnull align 8 dereferenceable(99) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i1 noundef zeroext %4, i1 noundef zeroext %5) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca %"class.imp::Vec4", align 8
  %8 = alloca %"class.std::shared_ptr.8", align 8
  %9 = getelementptr inbounds i8, ptr %0, i64 96
  store i8 0, ptr %9, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  %11 = sext i32 %3 to i64
  tail call void @_ZNSt6vectorISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %11)
  %12 = getelementptr inbounds i8, ptr %0, i64 48
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #4
  call void @_ZN3imp4Vec4C2Ef(ptr noundef nonnull align 8 dereferenceable(40) %7, float noundef 0.000000e+00)
  invoke void @_ZNSt6vectorIN3imp4Vec4ESaIS1_EE6resizeEmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %11, ptr noundef nonnull align 8 dereferenceable(40) %7)
          to label %13 unwind label %17

13:                                               ; preds = %6
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #4
  %14 = icmp sgt i32 %3, 0
  br i1 %14, label %.lr.ph.preheader, label %._crit_edge

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

._crit_edge:                                      ; preds = %.lr.ph, %13
  %15 = zext i1 %4 to i8
  %16 = getelementptr inbounds i8, ptr %0, i64 97
  store i8 %15, ptr %16, align 1, !tbaa !27
  ret void

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

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #4
  call void @_ZN3imp12ImageSampler6createIJEEESt10shared_ptrIS0_EDpOT_(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.8") align 8 %8)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv) #4
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN3imp12ImageSamplerEEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(16) %8) #4
  call void @_ZNSt12__shared_ptrIN3imp12ImageSamplerELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #4
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv) #4
  %22 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp12ImageSamplerELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %21) #4
  call void @_ZN3imp12ImageSampler14setInternalSrcEiii(ptr noundef nonnull align 8 dereferenceable(89) %22, i32 noundef %1, i32 noundef %2, i32 noundef 4)
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv) #4
  %24 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp12ImageSamplerELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %23) #4
  call void @_ZN3imp12ImageSampler7setMSAAEb(ptr noundef nonnull align 8 dereferenceable(89) %24, i1 noundef zeroext %5)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !28
}

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp12ImageSampler6createIJEEESt10shared_ptrIS0_EDpOT_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.8") align 8) local_unnamed_addr #0 align 2

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

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

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

declare void @_ZN3imp12ImageSampler14setInternalSrcEiii(ptr noundef nonnull align 8 dereferenceable(89), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3imp12ImageSampler7setMSAAEb(ptr noundef nonnull align 8 dereferenceable(89), i1 noundef zeroext) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !26, i64 96}
!6 = !{!"_ZTSN3imp12RenderTargetE", !7, i64 0, !14, i64 24, !18, i64 48, !22, i64 72, !26, i64 96, !26, i64 97, !26, i64 98}
!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 = !{!"_ZTSSt6vectorISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!18 = !{!"_ZTSSt6vectorIN3imp4Vec4ESaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIN3imp4Vec4ESaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN3imp4Vec4ESaIS1_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN3imp4Vec4ESaIS1_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!22 = !{!"_ZTSSt4pairISt10shared_ptrIN3imp14CubeMapSamplerEEiE", !23, i64 0, !25, i64 16}
!23 = !{!"_ZTSSt10shared_ptrIN3imp14CubeMapSamplerEE", !24, i64 0}
!24 = !{!"_ZTSSt12__shared_ptrIN3imp14CubeMapSamplerELN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0, !13, i64 8}
!25 = !{!"int", !11, i64 0}
!26 = !{!"bool", !11, i64 0}
!27 = !{!6, !26, i64 97}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}


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