; LLVM IR from ronan-kerviche/glip-lib :: GLIP-Lib/src/Core/HdlFBO.ll (ZN4Glip6CoreGL6HdlFBOD2Ev)

; 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.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.Glip::CoreGL::HdlFBO" = type <{ %"class.Glip::CoreGL::HdlAbstractTextureFormat.base", [4 x i8], %"class.std::vector", i32, i8, [3 x i8], ptr, i8, [7 x i8] }>
%"class.Glip::CoreGL::HdlAbstractTextureFormat.base" = type <{ ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Glip::CoreGL::HdlTexture *, std::allocator<Glip::CoreGL::HdlTexture *>>::_Vector_impl" }
%"struct.std::_Vector_base<Glip::CoreGL::HdlTexture *, std::allocator<Glip::CoreGL::HdlTexture *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Glip::CoreGL::HdlTexture *, std::allocator<Glip::CoreGL::HdlTexture *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Glip::CoreGL::HdlTexture *, std::allocator<Glip::CoreGL::HdlTexture *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZTVN4Glip6CoreGL6HdlFBOE = external dso_local unnamed_addr constant { [7 x ptr] }, align 8
@__glewDeleteFramebuffers = external global ptr, align 8

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #0

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

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

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

; Function Attrs: nounwind
declare void @_ZN4Glip6CoreGL24HdlAbstractTextureFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(52)) unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN4Glip6CoreGL6HdlFBOD2Ev(ptr noundef nonnull align 8 dereferenceable(97) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %7 = load ptr, ptr %2, align 8
  store ptr getelementptr inbounds inrange(-16, 40) ({ [7 x ptr] }, ptr @_ZTVN4Glip6CoreGL6HdlFBOE, i32 0, i32 0, i32 2), ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !11
  br label %8

8:                                                ; preds = %18, %1
  %9 = load i32, ptr %3, align 4, !tbaa !11
  %10 = zext i32 %9 to i64
  %11 = getelementptr inbounds %"class.Glip::CoreGL::HdlFBO", ptr %7, i32 0, i32 2
  %12 = call noundef i64 @_ZNKSt6vectorIPN4Glip6CoreGL10HdlTextureESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  %13 = icmp ult i64 %10, %12
  br i1 %13, label %15, label %14

14:                                               ; preds = %8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %21

15:                                               ; preds = %8
  %16 = load i32, ptr %3, align 4, !tbaa !11
  invoke void @_ZN4Glip6CoreGL6HdlFBO20unbindTextureFromFBOEi(ptr noundef nonnull align 8 dereferenceable(97) %7, i32 noundef %16)
          to label %17 unwind label %57

17:                                               ; preds = %15
  br label %18

18:                                               ; preds = %17
  %19 = load i32, ptr %3, align 4, !tbaa !11
  %20 = add i32 %19, 1
  store i32 %20, ptr %3, align 4, !tbaa !11
  br label %8, !llvm.loop !13

21:                                               ; preds = %14
  invoke void @glFlush()
          to label %22 unwind label %57

22:                                               ; preds = %21
  %23 = load ptr, ptr @__glewDeleteFramebuffers, align 8, !tbaa !5
  %24 = getelementptr inbounds %"class.Glip::CoreGL::HdlFBO", ptr %7, i32 0, i32 3
  invoke void %23(i32 noundef 1, ptr noundef %24)
          to label %25 unwind label %57

25:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %26 = getelementptr inbounds %"class.Glip::CoreGL::HdlFBO", ptr %7, i32 0, i32 2
  %27 = call ptr @_ZNSt6vectorIPN4Glip6CoreGL10HdlTextureESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #7
  %28 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %4, i32 0, i32 0
  store ptr %27, ptr %28, align 8
  br label %29

29:                                               ; preds = %44, %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %30 = getelementptr inbounds %"class.Glip::CoreGL::HdlFBO", ptr %7, i32 0, i32 2
  %31 = call ptr @_ZNSt6vectorIPN4Glip6CoreGL10HdlTextureESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #7
  %32 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  store ptr %31, ptr %32, align 8
  %33 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN4Glip6CoreGL10HdlTextureESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br i1 %33, label %35, label %34

34:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %47

35:                                               ; preds = %29
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN4Glip6CoreGL10HdlTextureESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  %38 = icmp eq ptr %37, null
  br i1 %38, label %43, label %39

39:                                               ; preds = %35
  %40 = load ptr, ptr %37, align 8, !tbaa !9
  %41 = getelementptr inbounds ptr, ptr %40, i64 1
  %42 = load ptr, ptr %41, align 8
  call void %42(ptr noundef nonnull align 8 dereferenceable(57) %37) #7
  br label %43

43:                                               ; preds = %39, %35
  br label %44

44:                                               ; preds = %43
  %45 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN4Glip6CoreGL10HdlTextureESt6vectorIS4_SaIS4_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %4, i32 noundef 0) #7
  %46 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %45, ptr %46, align 8
  br label %29, !llvm.loop !15

47:                                               ; preds = %34
  %48 = getelementptr inbounds %"class.Glip::CoreGL::HdlFBO", ptr %7, i32 0, i32 6
  %49 = load ptr, ptr %48, align 8, !tbaa !16
  %50 = icmp eq ptr %49, null
  br i1 %50, label %55, label %51

51:                                               ; preds = %47
  %52 = load ptr, ptr %49, align 8, !tbaa !9
  %53 = getelementptr inbounds ptr, ptr %52, i64 1
  %54 = load ptr, ptr %53, align 8
  call void %54(ptr noundef nonnull align 8 dereferenceable(24) %49) #7
  br label %55

55:                                               ; preds = %51, %47
  %56 = getelementptr inbounds %"class.Glip::CoreGL::HdlFBO", ptr %7, i32 0, i32 2
  call void @_ZNSt6vectorIPN4Glip6CoreGL10HdlTextureESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %56) #7
  call void @_ZN4Glip6CoreGL24HdlAbstractTextureFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(52) %7) #7
  ret void

57:                                               ; preds = %22, %21, %15
  %58 = landingpad { ptr, i32 }
          catch ptr null
  %59 = extractvalue { ptr, i32 } %58, 0
  call void @__clang_call_terminate(ptr %59) #8
  unreachable
}

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

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

declare void @glFlush() #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPPN4Glip6CoreGL10HdlTextureESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

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

attributes #0 = { noinline noreturn nounwind uwtable "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 = { nounwind "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 = { 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 #5 = { "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 #6 = { inlinehint 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 #7 = { nounwind }
attributes #8 = { noreturn 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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!17, !6, i64 88}
!17 = !{!"_ZTSN4Glip6CoreGL6HdlFBOE", !18, i64 0, !19, i64 56, !12, i64 80, !23, i64 84, !6, i64 88, !23, i64 96}
!18 = !{!"_ZTSN4Glip6CoreGL24HdlAbstractTextureFormatE", !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48}
!19 = !{!"_ZTSSt6vectorIPN4Glip6CoreGL10HdlTextureESaIS3_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIPN4Glip6CoreGL10HdlTextureESaIS3_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIPN4Glip6CoreGL10HdlTextureESaIS3_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIPN4Glip6CoreGL10HdlTextureESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"bool", !7, i64 0}


; 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.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZTVN4Glip6CoreGL6HdlFBOE = external dso_local unnamed_addr constant { [7 x ptr] }, align 8
@__glewDeleteFramebuffers = external local_unnamed_addr global ptr, align 8

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #0

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

; Function Attrs: nounwind
declare void @_ZN4Glip6CoreGL24HdlAbstractTextureFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(52)) unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN4Glip6CoreGL6HdlFBOD2Ev(ptr noundef nonnull align 8 dereferenceable(97) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store ptr getelementptr inbounds inrange(-16, 40) (i8, ptr @_ZTVN4Glip6CoreGL6HdlFBOE, i64 16), ptr %0, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 56
  %5 = tail call noundef i64 @_ZNKSt6vectorIPN4Glip6CoreGL10HdlTextureESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %.not = icmp eq i64 %5, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %6, %1
  invoke void @glFlush()
          to label %11 unwind label %.loopexit.split-lp

.lr.ph:                                           ; preds = %1, %6
  %.06 = phi i32 [ %7, %6 ], [ 0, %1 ]
  invoke void @_ZN4Glip6CoreGL6HdlFBO20unbindTextureFromFBOEi(ptr noundef nonnull align 8 dereferenceable(97) %0, i32 noundef %.06)
          to label %6 unwind label %.loopexit

6:                                                ; preds = %.lr.ph
  %7 = add i32 %.06, 1
  %8 = zext i32 %7 to i64
  %9 = tail call noundef i64 @_ZNKSt6vectorIPN4Glip6CoreGL10HdlTextureESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %10 = icmp ugt i64 %9, %8
  br i1 %10, label %.lr.ph, label %._crit_edge, !llvm.loop !8

11:                                               ; preds = %._crit_edge
  %12 = load ptr, ptr @__glewDeleteFramebuffers, align 8, !tbaa !10
  %13 = getelementptr inbounds i8, ptr %0, i64 80
  invoke void %12(i32 noundef 1, ptr noundef nonnull %13)
          to label %14 unwind label %.loopexit.split-lp

14:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %15 = tail call ptr @_ZNSt6vectorIPN4Glip6CoreGL10HdlTextureESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  store ptr %15, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %16 = tail call ptr @_ZNSt6vectorIPN4Glip6CoreGL10HdlTextureESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  store ptr %16, ptr %3, align 8
  %17 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN4Glip6CoreGL10HdlTextureESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  br i1 %17, label %.lr.ph8, label %._crit_edge9

._crit_edge9:                                     ; preds = %28, %14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  %18 = getelementptr inbounds i8, ptr %0, i64 88
  %19 = load ptr, ptr %18, align 8, !tbaa !13
  %20 = icmp eq ptr %19, null
  br i1 %20, label %36, label %32

.lr.ph8:                                          ; preds = %14, %28
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN4Glip6CoreGL10HdlTextureESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #7
  %22 = load ptr, ptr %21, align 8, !tbaa !10
  %23 = icmp eq ptr %22, null
  br i1 %23, label %28, label %24

24:                                               ; preds = %.lr.ph8
  %25 = load ptr, ptr %22, align 8, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %25, i64 8
  %27 = load ptr, ptr %26, align 8
  call void %27(ptr noundef nonnull align 8 dereferenceable(57) %22) #7
  br label %28

28:                                               ; preds = %.lr.ph8, %24
  %29 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN4Glip6CoreGL10HdlTextureESt6vectorIS4_SaIS4_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %30 = call ptr @_ZNSt6vectorIPN4Glip6CoreGL10HdlTextureESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  store ptr %30, ptr %3, align 8
  %31 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN4Glip6CoreGL10HdlTextureESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  br i1 %31, label %.lr.ph8, label %._crit_edge9, !llvm.loop !22

32:                                               ; preds = %._crit_edge9
  %33 = load ptr, ptr %19, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %33, i64 8
  %35 = load ptr, ptr %34, align 8
  call void %35(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  br label %36

36:                                               ; preds = %32, %._crit_edge9
  call void @_ZNSt6vectorIPN4Glip6CoreGL10HdlTextureESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @_ZN4Glip6CoreGL24HdlAbstractTextureFormatD2Ev(ptr noundef nonnull align 8 dereferenceable(52) %0) #7
  ret void

.loopexit:                                        ; preds = %.lr.ph
  %lpad.loopexit = landingpad { ptr, i32 }
          catch ptr null
  br label %37

.loopexit.split-lp:                               ; preds = %._crit_edge, %11
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          catch ptr null
  br label %37

37:                                               ; preds = %.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  %38 = extractvalue { ptr, i32 } %lpad.phi, 0
  tail call void @__clang_call_terminate(ptr %38) #8
  unreachable
}

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

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

declare void @glFlush() local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPPN4Glip6CoreGL10HdlTextureESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

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

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

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

attributes #0 = { noinline noreturn nounwind uwtable "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 = { nounwind "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 = { 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 #5 = { "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 #6 = { inlinehint 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 #7 = { nounwind }
attributes #8 = { noreturn 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !7, i64 0}
!13 = !{!14, !11, i64 88}
!14 = !{!"_ZTSN4Glip6CoreGL6HdlFBOE", !15, i64 0, !17, i64 56, !16, i64 80, !21, i64 84, !11, i64 88, !21, i64 96}
!15 = !{!"_ZTSN4Glip6CoreGL24HdlAbstractTextureFormatE", !16, i64 8, !16, i64 12, !16, i64 16, !16, i64 20, !16, i64 24, !16, i64 28, !16, i64 32, !16, i64 36, !16, i64 40, !16, i64 44, !16, i64 48}
!16 = !{!"int", !12, i64 0}
!17 = !{!"_ZTSSt6vectorIPN4Glip6CoreGL10HdlTextureESaIS3_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIPN4Glip6CoreGL10HdlTextureESaIS3_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIPN4Glip6CoreGL10HdlTextureESaIS3_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIPN4Glip6CoreGL10HdlTextureESaIS3_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!21 = !{!"bool", !12, i64 0}
!22 = distinct !{!22, !9}


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