; LLVM IR from filipwasil/fillwave :: src/flc/texturing (Texture2D)

; 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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.flw::flc::Texture2D" = type { %"class.flw::flc::Texture", %"class.std::unique_ptr", %"class.std::vector" }
%"class.flw::flc::Texture" = type { i32, [10 x i32] }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.1" }
%"struct.std::_Head_base.1" = type { ptr }

@glad_glGenTextures = external global ptr, align 8

; 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 uwtable
define dso_local void @_ZN3flw3flc9Texture2DC2EPNS0_13TextureConfigERSt6vectorISt4pairIjjESaIS6_EEj(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %3) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::vector", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !9
  %13 = load ptr, ptr %5, align 8
  %14 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %13, i32 0, i32 0
  %15 = load i32, ptr %8, align 4, !tbaa !9
  call void @_ZN3flw3flc7TextureC1Ei(ptr noundef nonnull align 4 dereferenceable(44) %14, i32 noundef %15)
  %16 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %13, i32 0, i32 1
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZNSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEC2IS4_vEEPS2_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef %17) #5
  %18 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %13, i32 0, i32 2
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZNSt6vectorISt4pairIjjESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(24) %19)
          to label %20 unwind label %36

20:                                               ; preds = %4
  %21 = load ptr, ptr @glad_glGenTextures, align 8, !tbaa !5
  %22 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %13, i32 0, i32 0
  %23 = getelementptr inbounds %"class.flw::flc::Texture", ptr %22, i32 0, i32 0
  %24 = load i32, ptr %23, align 8, !tbaa !11
  %25 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %13, i32 0, i32 0
  %26 = getelementptr inbounds %"class.flw::flc::Texture", ptr %25, i32 0, i32 1
  %27 = getelementptr inbounds [10 x i32], ptr %26, i64 0, i64 0
  invoke void %21(i32 noundef %24, ptr noundef %27)
          to label %28 unwind label %40

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

29:                                               ; preds = %52, %28
  %30 = load i32, ptr %11, align 4, !tbaa !9
  %31 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %13, i32 0, i32 0
  %32 = getelementptr inbounds %"class.flw::flc::Texture", ptr %31, i32 0, i32 0
  %33 = load i32, ptr %32, align 8, !tbaa !11
  %34 = icmp slt i32 %30, %33
  br i1 %34, label %44, label %35

35:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %64

36:                                               ; preds = %4
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %9, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %10, align 4
  br label %66

40:                                               ; preds = %20
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %9, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %10, align 4
  br label %65

44:                                               ; preds = %29
  %45 = load i32, ptr %11, align 4, !tbaa !9
  invoke void @_ZN3flw3flc9Texture2D4bindEij(ptr noundef nonnull align 8 dereferenceable(80) %13, i32 noundef %45, i32 noundef 0)
          to label %46 unwind label %55

46:                                               ; preds = %44
  %47 = getelementptr inbounds %"class.flw::flc::Texture2D", ptr %13, i32 0, i32 2
  invoke void @_ZNSt6vectorISt4pairIjjESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %47)
          to label %48 unwind label %55

48:                                               ; preds = %46
  invoke void @_ZN3flw3flc9Texture2D13setParametersESt6vectorISt4pairIjjESaIS4_EE(ptr noundef nonnull align 8 dereferenceable(80) %13, ptr noundef %12)
          to label %49 unwind label %59

49:                                               ; preds = %48
  call void @_ZNSt6vectorISt4pairIjjESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  invoke void @_ZN3flw3flc9Texture2D8sendDataEPh(ptr noundef nonnull align 8 dereferenceable(80) %13, ptr noundef null)
          to label %50 unwind label %55

50:                                               ; preds = %49
  invoke void @_ZN3flw3flc9Texture2D15generateMipMapsEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
          to label %51 unwind label %55

51:                                               ; preds = %50
  br label %52

52:                                               ; preds = %51
  %53 = load i32, ptr %11, align 4, !tbaa !9
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %11, align 4, !tbaa !9
  br label %29, !llvm.loop !24

55:                                               ; preds = %50, %49, %46, %44
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %9, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %10, align 4
  br label %63

59:                                               ; preds = %48
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %9, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %10, align 4
  call void @_ZNSt6vectorISt4pairIjjESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  br label %63

63:                                               ; preds = %59, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %65

64:                                               ; preds = %35
  ret void

65:                                               ; preds = %63, %40
  call void @_ZNSt6vectorISt4pairIjjESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  br label %66

66:                                               ; preds = %65, %36
  call void @_ZNSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #5
  call void @_ZN3flw3flc7TextureD1Ev(ptr noundef nonnull align 4 dereferenceable(44) %14) #5
  br label %67

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

declare void @_ZN3flw3flc7TextureC1Ei(ptr noundef nonnull align 4 dereferenceable(44), i32 noundef) unnamed_addr #2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3flw3flc9Texture2D15generateMipMapsEv(ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

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

; Function Attrs: nounwind
declare void @_ZN3flw3flc7TextureD1Ev(ptr noundef nonnull align 4 dereferenceable(44)) unnamed_addr #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = { 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 #4 = { 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 #5 = { 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, !10, i64 0}
!12 = !{!"_ZTSN3flw3flc9Texture2DE", !13, i64 0, !14, i64 48, !20, i64 56}
!13 = !{!"_ZTSN3flw3flc7TextureE", !10, i64 0, !7, i64 4}
!14 = !{!"_ZTSSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EE", !15, i64 0}
!15 = !{!"_ZTSSt15__uniq_ptr_dataIN3flw3flc13TextureConfigESt14default_deleteIS2_ELb1ELb1EE", !16, i64 0}
!16 = !{!"_ZTSSt15__uniq_ptr_implIN3flw3flc13TextureConfigESt14default_deleteIS2_EE", !17, i64 0}
!17 = !{!"_ZTSSt5tupleIJPN3flw3flc13TextureConfigESt14default_deleteIS2_EEE", !18, i64 0}
!18 = !{!"_ZTSSt11_Tuple_implILm0EJPN3flw3flc13TextureConfigESt14default_deleteIS2_EEE", !19, i64 0}
!19 = !{!"_ZTSSt10_Head_baseILm0EPN3flw3flc13TextureConfigELb0EE", !6, i64 0}
!20 = !{!"_ZTSSt6vectorISt4pairIjjESaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseISt4pairIjjESaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseISt4pairIjjESaIS1_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseISt4pairIjjESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = distinct !{!24, !25}
!25 = !{!"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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@glad_glGenTextures = external local_unnamed_addr global ptr, align 8

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3flw3flc9Texture2DC2EPNS0_13TextureConfigERSt6vectorISt4pairIjjESaIS6_EEj(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::vector", align 8
  tail call void @_ZN3flw3flc7TextureC1Ei(ptr noundef nonnull align 4 dereferenceable(44) %0, i32 noundef %3)
  %6 = getelementptr inbounds i8, ptr %0, i64 48
  tail call void @_ZNSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EEC2IS4_vEEPS2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef %1) #4
  %7 = getelementptr inbounds i8, ptr %0, i64 56
  invoke void @_ZNSt6vectorISt4pairIjjESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %8 unwind label %14

8:                                                ; preds = %4
  %9 = load ptr, ptr @glad_glGenTextures, align 8, !tbaa !5
  %10 = load i32, ptr %0, align 8, !tbaa !9
  %11 = getelementptr inbounds i8, ptr %0, i64 4
  invoke void %9(i32 noundef %10, ptr noundef nonnull %11)
          to label %.preheader unwind label %16

.preheader:                                       ; preds = %8
  %12 = load i32, ptr %0, align 8, !tbaa !9
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %22, %.preheader
  ret void

14:                                               ; preds = %4
  %15 = landingpad { ptr, i32 }
          cleanup
  br label %31

16:                                               ; preds = %8
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %30

.lr.ph:                                           ; preds = %.preheader, %22
  %.015 = phi i32 [ %23, %22 ], [ 0, %.preheader ]
  invoke void @_ZN3flw3flc9Texture2D4bindEij(ptr noundef nonnull align 8 dereferenceable(80) %0, i32 noundef %.015, i32 noundef 0)
          to label %18 unwind label %26

18:                                               ; preds = %.lr.ph
  invoke void @_ZNSt6vectorISt4pairIjjESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %19 unwind label %26

19:                                               ; preds = %18
  invoke void @_ZN3flw3flc9Texture2D13setParametersESt6vectorISt4pairIjjESaIS4_EE(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef nonnull %5)
          to label %20 unwind label %28

20:                                               ; preds = %19
  call void @_ZNSt6vectorISt4pairIjjESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  invoke void @_ZN3flw3flc9Texture2D8sendDataEPh(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef null)
          to label %21 unwind label %26

21:                                               ; preds = %20
  invoke void @_ZN3flw3flc9Texture2D15generateMipMapsEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
          to label %22 unwind label %26

22:                                               ; preds = %21
  %23 = add nuw nsw i32 %.015, 1
  %24 = load i32, ptr %0, align 8, !tbaa !9
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %.lr.ph, label %._crit_edge, !llvm.loop !23

26:                                               ; preds = %21, %20, %18, %.lr.ph
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %30

28:                                               ; preds = %19
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorISt4pairIjjESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  br label %30

30:                                               ; preds = %26, %28, %16
  %.pn.pn = phi { ptr, i32 } [ %17, %16 ], [ %27, %26 ], [ %29, %28 ]
  call void @_ZNSt6vectorISt4pairIjjESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  br label %31

31:                                               ; preds = %30, %14
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %30 ], [ %15, %14 ]
  call void @_ZNSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @_ZN3flw3flc7TextureD1Ev(ptr noundef nonnull align 4 dereferenceable(44) %0) #4
  resume { ptr, i32 } %.pn.pn.pn
}

declare void @_ZN3flw3flc7TextureC1Ei(ptr noundef nonnull align 4 dereferenceable(44), i32 noundef) unnamed_addr #1

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3flw3flc9Texture2D15generateMipMapsEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #0 align 2

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

; Function Attrs: nounwind
declare void @_ZN3flw3flc7TextureD1Ev(ptr noundef nonnull align 4 dereferenceable(44)) unnamed_addr #3

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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, !12, i64 0}
!10 = !{!"_ZTSN3flw3flc9Texture2DE", !11, i64 0, !13, i64 48, !19, i64 56}
!11 = !{!"_ZTSN3flw3flc7TextureE", !12, i64 0, !7, i64 4}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSSt10unique_ptrIN3flw3flc13TextureConfigESt14default_deleteIS2_EE", !14, i64 0}
!14 = !{!"_ZTSSt15__uniq_ptr_dataIN3flw3flc13TextureConfigESt14default_deleteIS2_ELb1ELb1EE", !15, i64 0}
!15 = !{!"_ZTSSt15__uniq_ptr_implIN3flw3flc13TextureConfigESt14default_deleteIS2_EE", !16, i64 0}
!16 = !{!"_ZTSSt5tupleIJPN3flw3flc13TextureConfigESt14default_deleteIS2_EEE", !17, i64 0}
!17 = !{!"_ZTSSt11_Tuple_implILm0EJPN3flw3flc13TextureConfigESt14default_deleteIS2_EEE", !18, i64 0}
!18 = !{!"_ZTSSt10_Head_baseILm0EPN3flw3flc13TextureConfigELb0EE", !6, i64 0}
!19 = !{!"_ZTSSt6vectorISt4pairIjjESaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseISt4pairIjjESaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseISt4pairIjjESaIS1_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseISt4pairIjjESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


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