; LLVM IR from Razakhel/RaZ :: src/RaZ/Render/BloomRenderProcess.ll (ZN3Raz18BloomRenderProcess13resizeBuffersEjj)

; 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.Raz::Vector" = type { %"struct.std::array" }
%"struct.std::array" = type { [2 x float] }
%"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::allocator.15" = type { i8 }
%"class.Raz::BloomRenderProcess" = type { %"class.Raz::RenderProcess", ptr, %"class.std::vector", %"class.std::vector.5", %"class.std::vector", %"class.std::vector.5", ptr }
%"class.Raz::RenderProcess" = type { ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Raz::RenderPass *, std::allocator<Raz::RenderPass *>>::_Vector_impl" }
%"struct.std::_Vector_base<Raz::RenderPass *, std::allocator<Raz::RenderPass *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Raz::RenderPass *, std::allocator<Raz::RenderPass *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Raz::RenderPass *, std::allocator<Raz::RenderPass *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<std::weak_ptr<Raz::Texture2D>, std::allocator<std::weak_ptr<Raz::Texture2D>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::weak_ptr<Raz::Texture2D>, std::allocator<std::weak_ptr<Raz::Texture2D>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::weak_ptr<Raz::Texture2D>, std::allocator<std::weak_ptr<Raz::Texture2D>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::weak_ptr<Raz::Texture2D>, std::allocator<std::weak_ptr<Raz::Texture2D>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.27 = external hidden unnamed_addr constant [17 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; 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 8 dereferenceable(384) ptr @_ZN3Raz10RenderPass10getProgramEv(ptr noundef nonnull align 8 dereferenceable(536)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Raz18BloomRenderProcess13resizeBuffersEjj(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %1, i32 noundef %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.Raz::Vector", align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator.15", align 1
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator.15", align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  %19 = load ptr, ptr %4, align 8
  %20 = getelementptr inbounds %"class.Raz::BloomRenderProcess", ptr %19, i32 0, i32 1
  %21 = load ptr, ptr %20, align 8, !tbaa !11
  %22 = load i32, ptr %5, align 4, !tbaa !9
  %23 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN3Raz10RenderPass18resizeWriteBuffersEjj(ptr noundef nonnull align 8 dereferenceable(536) %21, i32 noundef %22, i32 noundef %23)
  %24 = getelementptr inbounds %"class.Raz::BloomRenderProcess", ptr %19, i32 0, i32 6
  %25 = load ptr, ptr %24, align 8, !tbaa !22
  %26 = load i32, ptr %5, align 4, !tbaa !9
  %27 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN3Raz10RenderPass18resizeWriteBuffersEjj(ptr noundef nonnull align 8 dereferenceable(536) %25, i32 noundef %26, i32 noundef %27)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store i64 0, ptr %7, align 8, !tbaa !23
  br label %28

28:                                               ; preds = %104, %3
  %29 = load i64, ptr %7, align 8, !tbaa !23
  %30 = getelementptr inbounds %"class.Raz::BloomRenderProcess", ptr %19, i32 0, i32 3
  %31 = call noundef i64 @_ZNKSt6vectorISt8weak_ptrIN3Raz9Texture2DEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  %32 = icmp ult i64 %29, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %28
  store i32 2, ptr %8, align 4
  br label %117

34:                                               ; preds = %28
  %35 = load i32, ptr %5, align 4, !tbaa !9
  %36 = udiv i32 %35, 2
  store i32 %36, ptr %5, align 4, !tbaa !9
  %37 = load i32, ptr %6, align 4, !tbaa !9
  %38 = udiv i32 %37, 2
  store i32 %38, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %39 = load i32, ptr %5, align 4, !tbaa !9
  %40 = uitofp i32 %39 to float
  %41 = fdiv float 1.000000e+00, %40
  store float %41, ptr %10, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %42 = load i32, ptr %6, align 4, !tbaa !9
  %43 = uitofp i32 %42 to float
  %44 = fdiv float 1.000000e+00, %43
  store float %44, ptr %11, align 4, !tbaa !25
  call void @_ZN3Raz6VectorIfLm2EEC2IJffEvvEEDpOT_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  %45 = getelementptr inbounds %"class.Raz::BloomRenderProcess", ptr %19, i32 0, i32 2
  %46 = load i64, ptr %7, align 8, !tbaa !23
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN3Raz10RenderPassESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %46) #4
  %48 = load ptr, ptr %47, align 8, !tbaa !5
  %49 = load i32, ptr %5, align 4, !tbaa !9
  %50 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN3Raz10RenderPass18resizeWriteBuffersEjj(ptr noundef nonnull align 8 dereferenceable(536) %48, i32 noundef %49, i32 noundef %50)
  %51 = getelementptr inbounds %"class.Raz::BloomRenderProcess", ptr %19, i32 0, i32 2
  %52 = load i64, ptr %7, align 8, !tbaa !23
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN3Raz10RenderPassESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef %52) #4
  %54 = load ptr, ptr %53, align 8, !tbaa !5
  %55 = call noundef nonnull align 8 dereferenceable(384) ptr @_ZN3Raz10RenderPass10getProgramEv(ptr noundef nonnull align 8 dereferenceable(536) %54)
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.27, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %56 unwind label %68

56:                                               ; preds = %34
  invoke void @_ZN3Raz13ShaderProgram12setAttributeIRKNS_6VectorIfLm2EEEEEvOT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(120) %55, ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %57 unwind label %72

57:                                               ; preds = %56
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #4
  %58 = getelementptr inbounds %"class.Raz::BloomRenderProcess", ptr %19, i32 0, i32 2
  %59 = load i64, ptr %7, align 8, !tbaa !23
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN3Raz10RenderPassESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %59) #4
  %61 = load ptr, ptr %60, align 8, !tbaa !5
  %62 = call noundef nonnull align 8 dereferenceable(384) ptr @_ZN3Raz10RenderPass10getProgramEv(ptr noundef nonnull align 8 dereferenceable(536) %61)
  call void @_ZNK3Raz13ShaderProgram14sendAttributesEv(ptr noundef nonnull align 8 dereferenceable(120) %62)
  %63 = load i64, ptr %7, align 8, !tbaa !23
  %64 = getelementptr inbounds %"class.Raz::BloomRenderProcess", ptr %19, i32 0, i32 4
  %65 = call noundef i64 @_ZNKSt6vectorIPN3Raz10RenderPassESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %64) #4
  %66 = icmp uge i64 %63, %65
  br i1 %66, label %67, label %77

67:                                               ; preds = %57
  store i32 2, ptr %8, align 4
  br label %101

68:                                               ; preds = %34
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %14, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %15, align 4
  br label %76

72:                                               ; preds = %56
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %14, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %15, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  br label %76

76:                                               ; preds = %72, %68
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #4
  br label %116

77:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %78 = getelementptr inbounds %"class.Raz::BloomRenderProcess", ptr %19, i32 0, i32 3
  %79 = call noundef i64 @_ZNKSt6vectorISt8weak_ptrIN3Raz9Texture2DEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %78) #4
  %80 = load i64, ptr %7, align 8, !tbaa !23
  %81 = sub i64 %79, %80
  %82 = sub i64 %81, 2
  store i64 %82, ptr %16, align 8, !tbaa !23
  %83 = getelementptr inbounds %"class.Raz::BloomRenderProcess", ptr %19, i32 0, i32 4
  %84 = load i64, ptr %16, align 8, !tbaa !23
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN3Raz10RenderPassESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef %84) #4
  %86 = load ptr, ptr %85, align 8, !tbaa !5
  %87 = load i32, ptr %5, align 4, !tbaa !9
  %88 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN3Raz10RenderPass18resizeWriteBuffersEjj(ptr noundef nonnull align 8 dereferenceable(536) %86, i32 noundef %87, i32 noundef %88)
  %89 = getelementptr inbounds %"class.Raz::BloomRenderProcess", ptr %19, i32 0, i32 4
  %90 = load i64, ptr %16, align 8, !tbaa !23
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN3Raz10RenderPassESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %89, i64 noundef %90) #4
  %92 = load ptr, ptr %91, align 8, !tbaa !5
  %93 = call noundef nonnull align 8 dereferenceable(384) ptr @_ZN3Raz10RenderPass10getProgramEv(ptr noundef nonnull align 8 dereferenceable(536) %92)
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @.str.27, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %94 unwind label %107

94:                                               ; preds = %77
  invoke void @_ZN3Raz13ShaderProgram12setAttributeIRKNS_6VectorIfLm2EEEEEvOT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(120) %93, ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %95 unwind label %111

95:                                               ; preds = %94
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #4
  %96 = getelementptr inbounds %"class.Raz::BloomRenderProcess", ptr %19, i32 0, i32 4
  %97 = load i64, ptr %16, align 8, !tbaa !23
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN3Raz10RenderPassESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %96, i64 noundef %97) #4
  %99 = load ptr, ptr %98, align 8, !tbaa !5
  %100 = call noundef nonnull align 8 dereferenceable(384) ptr @_ZN3Raz10RenderPass10getProgramEv(ptr noundef nonnull align 8 dereferenceable(536) %99)
  call void @_ZNK3Raz13ShaderProgram14sendAttributesEv(ptr noundef nonnull align 8 dereferenceable(120) %100)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  store i32 0, ptr %8, align 4
  br label %101

101:                                              ; preds = %95, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  %102 = load i32, ptr %8, align 4
  switch i32 %102, label %117 [
    i32 0, label %103
  ]

103:                                              ; preds = %101
  br label %104

104:                                              ; preds = %103
  %105 = load i64, ptr %7, align 8, !tbaa !23
  %106 = add i64 %105, 1
  store i64 %106, ptr %7, align 8, !tbaa !23
  br label %28, !llvm.loop !27

107:                                              ; preds = %77
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %14, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %15, align 4
  br label %115

111:                                              ; preds = %94
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %14, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %15, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #4
  br label %115

115:                                              ; preds = %111, %107
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  br label %116

116:                                              ; preds = %115, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %119

117:                                              ; preds = %101, %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %118

118:                                              ; preds = %117
  ret void

119:                                              ; preds = %116
  %120 = load ptr, ptr %14, align 8
  %121 = load i32, ptr %15, align 4
  %122 = insertvalue { ptr, i32 } poison, ptr %120, 0
  %123 = insertvalue { ptr, i32 } %122, i32 %121, 1
  resume { ptr, i32 } %123
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Raz10RenderPass18resizeWriteBuffersEjj(ptr noundef nonnull align 8 dereferenceable(536), i32 noundef, i32 noundef) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Raz13ShaderProgram12setAttributeIRKNS_6VectorIfLm2EEEEEvOT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

declare void @_ZNK3Raz13ShaderProgram14sendAttributesEv(ptr noundef nonnull align 8 dereferenceable(120)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIPN3Raz10RenderPassESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 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"="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, !6, i64 16}
!12 = !{!"_ZTSN3Raz18BloomRenderProcessE", !13, i64 0, !6, i64 16, !14, i64 24, !18, i64 48, !14, i64 72, !18, i64 96, !6, i64 120}
!13 = !{!"_ZTSN3Raz13RenderProcessE", !6, i64 8}
!14 = !{!"_ZTSSt6vectorIPN3Raz10RenderPassESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIPN3Raz10RenderPassESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIPN3Raz10RenderPassESaIS2_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIPN3Raz10RenderPassESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"_ZTSSt6vectorISt8weak_ptrIN3Raz9Texture2DEESaIS3_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseISt8weak_ptrIN3Raz9Texture2DEESaIS3_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseISt8weak_ptrIN3Raz9Texture2DEESaIS3_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseISt8weak_ptrIN3Raz9Texture2DEESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!12, !6, i64 120}
!23 = !{!24, !24, i64 0}
!24 = !{!"long", !7, i64 0}
!25 = !{!26, !26, i64 0}
!26 = !{!"float", !7, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"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.Raz::Vector" = type { %"struct.std::array" }
%"struct.std::array" = type { [2 x float] }
%"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::allocator.15" = type { i8 }

@.str.27 = external hidden unnamed_addr constant [17 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; 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 8 dereferenceable(384) ptr @_ZN3Raz10RenderPass10getProgramEv(ptr noundef nonnull align 8 dereferenceable(536)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Raz18BloomRenderProcess13resizeBuffersEjj(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %1, i32 noundef %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.Raz::Vector", align 4
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator.15", align 1
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator.15", align 1
  %11 = getelementptr inbounds i8, ptr %0, i64 16
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  tail call void @_ZN3Raz10RenderPass18resizeWriteBuffersEjj(ptr noundef nonnull align 8 dereferenceable(536) %12, i32 noundef %1, i32 noundef %2)
  %13 = getelementptr inbounds i8, ptr %0, i64 120
  %14 = load ptr, ptr %13, align 8, !tbaa !19
  tail call void @_ZN3Raz10RenderPass18resizeWriteBuffersEjj(ptr noundef nonnull align 8 dereferenceable(536) %14, i32 noundef %1, i32 noundef %2)
  %15 = getelementptr inbounds i8, ptr %0, i64 48
  %16 = tail call noundef i64 @_ZNKSt6vectorISt8weak_ptrIN3Raz9Texture2DEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  %.not39 = icmp eq i64 %16, 0
  br i1 %.not39, label %.loopexit, label %.lr.ph

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

19:                                               ; preds = %.lr.ph, %52
  %.038 = phi i32 [ %1, %.lr.ph ], [ %20, %52 ]
  %.03037 = phi i64 [ 0, %.lr.ph ], [ %56, %52 ]
  %.03136 = phi i32 [ %2, %.lr.ph ], [ %21, %52 ]
  %20 = lshr i32 %.038, 1
  %21 = lshr i32 %.03136, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %22 = uitofp nneg i32 %20 to float
  %23 = fdiv float 1.000000e+00, %22
  store float %23, ptr %5, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  %24 = uitofp nneg i32 %21 to float
  %25 = fdiv float 1.000000e+00, %24
  store float %25, ptr %6, align 4, !tbaa !20
  call void @_ZN3Raz6VectorIfLm2EEC2IJffEvvEEDpOT_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN3Raz10RenderPassESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %.03037) #4
  %27 = load ptr, ptr %26, align 8, !tbaa !22
  call void @_ZN3Raz10RenderPass18resizeWriteBuffersEjj(ptr noundef nonnull align 8 dereferenceable(536) %27, i32 noundef %20, i32 noundef %21)
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN3Raz10RenderPassESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %.03037) #4
  %29 = load ptr, ptr %28, align 8, !tbaa !22
  %30 = call noundef nonnull align 8 dereferenceable(384) ptr @_ZN3Raz10RenderPass10getProgramEv(ptr noundef nonnull align 8 dereferenceable(536) %29)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.27, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %31 unwind label %37

31:                                               ; preds = %19
  invoke void @_ZN3Raz13ShaderProgram12setAttributeIRKNS_6VectorIfLm2EEEEEvOT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(120) %30, ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %32 unwind label %39

32:                                               ; preds = %31
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN3Raz10RenderPassESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %.03037) #4
  %34 = load ptr, ptr %33, align 8, !tbaa !22
  %35 = call noundef nonnull align 8 dereferenceable(384) ptr @_ZN3Raz10RenderPass10getProgramEv(ptr noundef nonnull align 8 dereferenceable(536) %34)
  call void @_ZNK3Raz13ShaderProgram14sendAttributesEv(ptr noundef nonnull align 8 dereferenceable(120) %35)
  %36 = call noundef i64 @_ZNKSt6vectorIPN3Raz10RenderPassESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #4
  %.not = icmp ult i64 %.03037, %36
  br i1 %.not, label %42, label %.critedge

37:                                               ; preds = %19
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %41

39:                                               ; preds = %31
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  br label %41

41:                                               ; preds = %39, %37
  %.pn = phi { ptr, i32 } [ %40, %39 ], [ %38, %37 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  br label %64

42:                                               ; preds = %32
  %43 = call noundef i64 @_ZNKSt6vectorISt8weak_ptrIN3Raz9Texture2DEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  %44 = sub i64 %43, %.03037
  %45 = add i64 %44, -2
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN3Raz10RenderPassESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %45) #4
  %47 = load ptr, ptr %46, align 8, !tbaa !22
  call void @_ZN3Raz10RenderPass18resizeWriteBuffersEjj(ptr noundef nonnull align 8 dereferenceable(536) %47, i32 noundef %20, i32 noundef %21)
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN3Raz10RenderPassESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %45) #4
  %49 = load ptr, ptr %48, align 8, !tbaa !22
  %50 = call noundef nonnull align 8 dereferenceable(384) ptr @_ZN3Raz10RenderPass10getProgramEv(ptr noundef nonnull align 8 dereferenceable(536) %49)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.27, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %51 unwind label %59

51:                                               ; preds = %42
  invoke void @_ZN3Raz13ShaderProgram12setAttributeIRKNS_6VectorIfLm2EEEEEvOT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(120) %50, ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %52 unwind label %61

52:                                               ; preds = %51
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN3Raz10RenderPassESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %45) #4
  %54 = load ptr, ptr %53, align 8, !tbaa !22
  %55 = call noundef nonnull align 8 dereferenceable(384) ptr @_ZN3Raz10RenderPass10getProgramEv(ptr noundef nonnull align 8 dereferenceable(536) %54)
  call void @_ZNK3Raz13ShaderProgram14sendAttributesEv(ptr noundef nonnull align 8 dereferenceable(120) %55)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %56 = add nuw i64 %.03037, 1
  %57 = call noundef i64 @_ZNKSt6vectorISt8weak_ptrIN3Raz9Texture2DEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  %58 = icmp ult i64 %56, %57
  br i1 %58, label %19, label %.loopexit, !llvm.loop !23

59:                                               ; preds = %42
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %63

61:                                               ; preds = %51
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  br label %63

63:                                               ; preds = %61, %59
  %.pn33 = phi { ptr, i32 } [ %62, %61 ], [ %60, %59 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  br label %64

64:                                               ; preds = %63, %41
  %.pn33.pn = phi { ptr, i32 } [ %.pn33, %63 ], [ %.pn, %41 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  resume { ptr, i32 } %.pn33.pn

.critedge:                                        ; preds = %32
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br label %.loopexit

.loopexit:                                        ; preds = %52, %3, %.critedge
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Raz10RenderPass18resizeWriteBuffersEjj(ptr noundef nonnull align 8 dereferenceable(536), i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Raz13ShaderProgram12setAttributeIRKNS_6VectorIfLm2EEEEEvOT_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

declare void @_ZNK3Raz13ShaderProgram14sendAttributesEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIPN3Raz10RenderPassESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 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"="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, !8, i64 16}
!6 = !{!"_ZTSN3Raz18BloomRenderProcessE", !7, i64 0, !8, i64 16, !11, i64 24, !15, i64 48, !11, i64 72, !15, i64 96, !8, i64 120}
!7 = !{!"_ZTSN3Raz13RenderProcessE", !8, i64 8}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSSt6vectorIPN3Raz10RenderPassESaIS2_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIPN3Raz10RenderPassESaIS2_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIPN3Raz10RenderPassESaIS2_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIPN3Raz10RenderPassESaIS2_EE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!15 = !{!"_ZTSSt6vectorISt8weak_ptrIN3Raz9Texture2DEESaIS3_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseISt8weak_ptrIN3Raz9Texture2DEESaIS3_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseISt8weak_ptrIN3Raz9Texture2DEESaIS3_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseISt8weak_ptrIN3Raz9Texture2DEESaIS3_EE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!19 = !{!6, !8, i64 120}
!20 = !{!21, !21, i64 0}
!21 = !{!"float", !9, i64 0}
!22 = !{!8, !8, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


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