; LLVM IR from Lut1n/ImpGears :: src/OGLPlugin/Pipeline.ll (ZN3imp8Pipeline3runEi)

; 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.std::_Bit_reference" = type { ptr, i64 }
%"class.imp::Pipeline" = type { %"class.imp::Object", ptr, %"class.std::vector.60", %"class.std::vector.65", %"class.std::vector.70", %"class.std::vector.74", %"class.std::vector.79", i8, %"class.std::vector", %"class.imp::Vec4" }
%"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::vector.60" = type { %"struct.std::_Vector_base.61" }
%"struct.std::_Vector_base.61" = type { %"struct.std::_Vector_base<std::shared_ptr<imp::FrameOperation>, std::allocator<std::shared_ptr<imp::FrameOperation>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<imp::FrameOperation>, std::allocator<std::shared_ptr<imp::FrameOperation>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<imp::FrameOperation>, std::allocator<std::shared_ptr<imp::FrameOperation>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<imp::FrameOperation>, std::allocator<std::shared_ptr<imp::FrameOperation>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.65" = type { %"struct.std::_Vector_base.66" }
%"struct.std::_Vector_base.66" = type { %"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.70" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::vector.74" = type { %"struct.std::_Vector_base.75" }
%"struct.std::_Vector_base.75" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.79" = type { %"struct.std::_Vector_base.80" }
%"struct.std::_Vector_base.80" = type { %"struct.std::_Vector_base<imp::Pipeline::Binding, std::allocator<imp::Pipeline::Binding>>::_Vector_impl" }
%"struct.std::_Vector_base<imp::Pipeline::Binding, std::allocator<imp::Pipeline::Binding>>::_Vector_impl" = type { %"struct.std::_Vector_base<imp::Pipeline::Binding, std::allocator<imp::Pipeline::Binding>>::_Vector_impl_data" }
%"struct.std::_Vector_base<imp::Pipeline::Binding, std::allocator<imp::Pipeline::Binding>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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.imp::Vec4" = type { %"class.imp::Vec" }
%"class.imp::Vec" = type { %"class.imp::Object", [4 x float] }

; 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 i64 @_ZNKSt6vectorISt10shared_ptrIN3imp14FrameOperationEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp8Pipeline3runEi(ptr noundef nonnull align 8 dereferenceable(240) %0, i32 noundef %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca %"struct.std::_Bit_reference", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %10 = load ptr, ptr %3, align 8
  %11 = load i32, ptr %4, align 4, !tbaa !9
  %12 = icmp slt i32 %11, 0
  br i1 %12, label %19, label %13

13:                                               ; preds = %2
  %14 = load i32, ptr %4, align 4, !tbaa !9
  %15 = getelementptr inbounds %"class.imp::Pipeline", ptr %10, i32 0, i32 2
  %16 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3imp14FrameOperationEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #3
  %17 = trunc i64 %16 to i32
  %18 = icmp sge i32 %14, %17
  br i1 %18, label %19, label %20

19:                                               ; preds = %13, %2
  br label %87

20:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %21

21:                                               ; preds = %73, %20
  %22 = load i32, ptr %5, align 4, !tbaa !9
  %23 = getelementptr inbounds %"class.imp::Pipeline", ptr %10, i32 0, i32 2
  %24 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3imp14FrameOperationEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #3
  %25 = trunc i64 %24 to i32
  %26 = icmp slt i32 %22, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %21
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  br label %76

28:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  %29 = getelementptr inbounds %"class.imp::Pipeline", ptr %10, i32 0, i32 5
  %30 = load i32, ptr %5, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %31) #3
  %33 = load i32, ptr %32, align 4, !tbaa !9
  store i32 %33, ptr %7, align 4, !tbaa !9
  %34 = load i32, ptr %7, align 4, !tbaa !9
  %35 = load i32, ptr %4, align 4, !tbaa !9
  %36 = icmp eq i32 %34, %35
  br i1 %36, label %37, label %38

37:                                               ; preds = %28
  store i32 4, ptr %6, align 4
  br label %70

38:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #3
  %39 = load i32, ptr %7, align 4, !tbaa !9
  %40 = getelementptr inbounds %"class.imp::Pipeline", ptr %10, i32 0, i32 4
  %41 = call noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %40) #3
  %42 = trunc i64 %41 to i32
  %43 = icmp slt i32 %39, %42
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #3
  br i1 %43, label %44, label %55

44:                                               ; preds = %38
  %45 = getelementptr inbounds %"class.imp::Pipeline", ptr %10, i32 0, i32 4
  %46 = load i32, ptr %7, align 4, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = call { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %45, i64 noundef %47)
  %49 = getelementptr inbounds { ptr, i64 }, ptr %9, i32 0, i32 0
  %50 = extractvalue { ptr, i64 } %48, 0
  store ptr %50, ptr %49, align 8
  %51 = getelementptr inbounds { ptr, i64 }, ptr %9, i32 0, i32 1
  %52 = extractvalue { ptr, i64 } %48, 1
  store i64 %52, ptr %51, align 8
  %53 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %9) #3
  %54 = xor i1 %53, true
  br label %55

55:                                               ; preds = %44, %38
  %56 = phi i1 [ false, %38 ], [ %54, %44 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #3
  %57 = zext i1 %56 to i8
  store i8 %57, ptr %8, align 1, !tbaa !11
  %58 = getelementptr inbounds %"class.imp::Pipeline", ptr %10, i32 0, i32 2
  %59 = load i32, ptr %7, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN3imp14FrameOperationEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %60) #3
  %62 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp14FrameOperationELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %61) #3
  %63 = getelementptr inbounds %"class.imp::Pipeline", ptr %10, i32 0, i32 1
  %64 = load ptr, ptr %63, align 8, !tbaa !13
  %65 = load i8, ptr %8, align 1, !tbaa !11, !range !47, !noundef !48
  %66 = trunc i8 %65 to i1
  %67 = load ptr, ptr %62, align 8, !tbaa !49
  %68 = getelementptr inbounds ptr, ptr %67, i64 4
  %69 = load ptr, ptr %68, align 8
  call void %69(ptr noundef nonnull align 8 dereferenceable(120) %62, ptr noundef %64, i1 noundef zeroext %66)
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #3
  store i32 0, ptr %6, align 4
  br label %70

70:                                               ; preds = %55, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  %71 = load i32, ptr %6, align 4
  switch i32 %71, label %88 [
    i32 0, label %72
    i32 4, label %73
  ]

72:                                               ; preds = %70
  br label %73

73:                                               ; preds = %72, %70
  %74 = load i32, ptr %5, align 4, !tbaa !9
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %5, align 4, !tbaa !9
  br label %21, !llvm.loop !51

76:                                               ; preds = %27
  %77 = getelementptr inbounds %"class.imp::Pipeline", ptr %10, i32 0, i32 2
  %78 = load i32, ptr %4, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN3imp14FrameOperationEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %77, i64 noundef %79) #3
  %81 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp14FrameOperationELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %80) #3
  %82 = getelementptr inbounds %"class.imp::Pipeline", ptr %10, i32 0, i32 1
  %83 = load ptr, ptr %82, align 8, !tbaa !13
  %84 = load ptr, ptr %81, align 8, !tbaa !49
  %85 = getelementptr inbounds ptr, ptr %84, i64 4
  %86 = load ptr, ptr %85, align 8
  call void %86(ptr noundef nonnull align 8 dereferenceable(120) %81, ptr noundef %83, i1 noundef zeroext false)
  br label %87

87:                                               ; preds = %76, %19
  ret void

88:                                               ; preds = %70
  unreachable
}

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"="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 = { 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, !6, i64 24}
!14 = !{!"_ZTSN3imp8PipelineE", !15, i64 0, !6, i64 24, !19, i64 32, !23, i64 56, !27, i64 80, !33, i64 120, !37, i64 144, !12, i64 168, !41, i64 176, !45, i64 200}
!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_ptrIN3imp14FrameOperationEESaIS3_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN3imp14FrameOperationEESaIS3_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3imp14FrameOperationEESaIS3_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3imp14FrameOperationEESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSSt6vectorIS_IbSaIbEESaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseISt6vectorIbSaIbEESaIS2_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseISt6vectorIbSaIbEESaIS2_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseISt6vectorIbSaIbEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!"_ZTSSt6vectorIbSaIbEE", !28, i64 0}
!28 = !{!"_ZTSSt13_Bvector_baseISaIbEE", !29, i64 0}
!29 = !{!"_ZTSNSt13_Bvector_baseISaIbEE13_Bvector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt13_Bvector_baseISaIbEE18_Bvector_impl_dataE", !31, i64 0, !31, i64 16, !6, i64 32}
!31 = !{!"_ZTSSt13_Bit_iterator", !32, i64 0}
!32 = !{!"_ZTSSt18_Bit_iterator_base", !6, i64 0, !10, i64 8}
!33 = !{!"_ZTSSt6vectorIiSaIiEE", !34, i64 0}
!34 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!37 = !{!"_ZTSSt6vectorIN3imp8Pipeline7BindingESaIS2_EE", !38, i64 0}
!38 = !{!"_ZTSSt12_Vector_baseIN3imp8Pipeline7BindingESaIS2_EE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIN3imp8Pipeline7BindingESaIS2_EE12_Vector_implE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIN3imp8Pipeline7BindingESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!41 = !{!"_ZTSSt6vectorISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EE", !42, i64 0}
!42 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EE12_Vector_implE", !44, i64 0}
!44 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!45 = !{!"_ZTSN3imp4Vec4E", !46, i64 0}
!46 = !{!"_ZTSN3imp3VecILi4EfEE", !15, i64 0, !7, i64 24}
!47 = !{i8 0, i8 2}
!48 = !{}
!49 = !{!50, !50, i64 0}
!50 = !{!"vtable pointer", !8, i64 0}
!51 = distinct !{!51, !52}
!52 = !{!"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.std::_Bit_reference" = type { ptr, i64 }

; 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 i64 @_ZNKSt6vectorISt10shared_ptrIN3imp14FrameOperationEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN3imp14FrameOperationEESaIS3_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 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp8Pipeline3runEi(ptr noundef nonnull align 8 dereferenceable(240) %0, i32 noundef %1) local_unnamed_addr #2 align 2 {
  %3 = alloca %"struct.std::_Bit_reference", align 8
  %4 = icmp slt i32 %1, 0
  br i1 %4, label %50, label %5

5:                                                ; preds = %2
  %6 = getelementptr inbounds i8, ptr %0, i64 32
  %7 = tail call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3imp14FrameOperationEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  %8 = trunc i64 %7 to i32
  %.not = icmp sgt i32 %8, %1
  br i1 %.not, label %.preheader, label %50

.preheader:                                       ; preds = %5
  %9 = tail call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3imp14FrameOperationEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  %10 = trunc i64 %9 to i32
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %12 = getelementptr inbounds i8, ptr %0, i64 120
  %13 = getelementptr inbounds i8, ptr %0, i64 80
  %14 = getelementptr inbounds i8, ptr %3, i64 8
  %15 = getelementptr inbounds i8, ptr %0, i64 24
  br label %24

._crit_edge:                                      ; preds = %46, %.preheader
  %16 = zext nneg i32 %1 to i64
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN3imp14FrameOperationEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %16) #3
  %18 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp14FrameOperationELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %17) #3
  %19 = getelementptr inbounds i8, ptr %0, i64 24
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  %21 = load ptr, ptr %18, align 8, !tbaa !44
  %22 = getelementptr inbounds i8, ptr %21, i64 32
  %23 = load ptr, ptr %22, align 8
  call void %23(ptr noundef nonnull align 8 dereferenceable(120) %18, ptr noundef %20, i1 noundef zeroext false)
  br label %50

24:                                               ; preds = %.lr.ph, %46
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %46 ]
  %25 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %indvars.iv) #3
  %26 = load i32, ptr %25, align 4, !tbaa !46
  %27 = icmp eq i32 %26, %1
  br i1 %27, label %46, label %28

28:                                               ; preds = %24
  %29 = call noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %13) #3
  %30 = trunc i64 %29 to i32
  %31 = icmp slt i32 %26, %30
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #3
  %32 = sext i32 %26 to i64
  br i1 %31, label %33, label %._crit_edge16

33:                                               ; preds = %28
  %34 = call { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %13, i64 noundef %32)
  %35 = extractvalue { ptr, i64 } %34, 0
  store ptr %35, ptr %3, align 8
  %36 = extractvalue { ptr, i64 } %34, 1
  store i64 %36, ptr %14, align 8
  %37 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %3) #3
  %38 = xor i1 %37, true
  br label %._crit_edge16

._crit_edge16:                                    ; preds = %28, %33
  %39 = phi i1 [ %38, %33 ], [ false, %28 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #3
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt10shared_ptrIN3imp14FrameOperationEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %32) #3
  %41 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3imp14FrameOperationELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %40) #3
  %42 = load ptr, ptr %15, align 8, !tbaa !5
  %43 = load ptr, ptr %41, align 8, !tbaa !44
  %44 = getelementptr inbounds i8, ptr %43, i64 32
  %45 = load ptr, ptr %44, align 8
  call void %45(ptr noundef nonnull align 8 dereferenceable(120) %41, ptr noundef %42, i1 noundef zeroext %39)
  br label %46

46:                                               ; preds = %24, %._crit_edge16
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %47 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN3imp14FrameOperationEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  %sext = shl i64 %47, 32
  %48 = ashr exact i64 %sext, 32
  %49 = icmp slt i64 %indvars.iv.next, %48
  br i1 %49, label %24, label %._crit_edge, !llvm.loop !47

50:                                               ; preds = %2, %5, %._crit_edge
  ret void
}

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"="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 = { 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, !10, i64 24}
!6 = !{!"_ZTSN3imp8PipelineE", !7, i64 0, !10, i64 24, !14, i64 32, !18, i64 56, !22, i64 80, !29, i64 120, !33, i64 144, !37, i64 168, !38, i64 176, !42, i64 200}
!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_ptrIN3imp14FrameOperationEESaIS3_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN3imp14FrameOperationEESaIS3_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3imp14FrameOperationEESaIS3_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3imp14FrameOperationEESaIS3_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!18 = !{!"_ZTSSt6vectorIS_IbSaIbEESaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseISt6vectorIbSaIbEESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseISt6vectorIbSaIbEESaIS2_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseISt6vectorIbSaIbEESaIS2_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!22 = !{!"_ZTSSt6vectorIbSaIbEE", !23, i64 0}
!23 = !{!"_ZTSSt13_Bvector_baseISaIbEE", !24, i64 0}
!24 = !{!"_ZTSNSt13_Bvector_baseISaIbEE13_Bvector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt13_Bvector_baseISaIbEE18_Bvector_impl_dataE", !26, i64 0, !26, i64 16, !10, i64 32}
!26 = !{!"_ZTSSt13_Bit_iterator", !27, i64 0}
!27 = !{!"_ZTSSt18_Bit_iterator_base", !10, i64 0, !28, i64 8}
!28 = !{!"int", !11, i64 0}
!29 = !{!"_ZTSSt6vectorIiSaIiEE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!33 = !{!"_ZTSSt6vectorIN3imp8Pipeline7BindingESaIS2_EE", !34, i64 0}
!34 = !{!"_ZTSSt12_Vector_baseIN3imp8Pipeline7BindingESaIS2_EE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIN3imp8Pipeline7BindingESaIS2_EE12_Vector_implE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIN3imp8Pipeline7BindingESaIS2_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!37 = !{!"bool", !11, i64 0}
!38 = !{!"_ZTSSt6vectorISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EE", !39, i64 0}
!39 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EE12_Vector_implE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3imp12ImageSamplerEESaIS3_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!42 = !{!"_ZTSN3imp4Vec4E", !43, i64 0}
!43 = !{!"_ZTSN3imp3VecILi4EfEE", !7, i64 0, !11, i64 24}
!44 = !{!45, !45, i64 0}
!45 = !{!"vtable pointer", !12, i64 0}
!46 = !{!28, !28, i64 0}
!47 = distinct !{!47, !48}
!48 = !{!"llvm.loop.mustprogress"}


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