; LLVM IR from paroj/gltut :: Tut 15 Many Images/ManyImages.ll (Z17LoadMipmapTexturev)

; 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.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@g_mipmapTestTexture = external dso_local global i32, align 4
@_funcptr_glGenTextures = external global ptr, align 8
@_funcptr_glBindTexture = external global ptr, align 8
@_funcptr_glGetIntegerv = external global ptr, align 8
@_funcptr_glPixelStorei = external global ptr, align 8
@_ZL12mipmapColors = external hidden constant [24 x i8], align 16
@_funcptr_glTexImage2D = external global ptr, align 8
@_funcptr_glTexParameteri = 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
declare dso_local void @_Z13FillWithColorRSt6vectorIhSaIhEEhhhii(ptr noundef nonnull align 8 dereferenceable(24), i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17LoadMipmapTexturev() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector.3", align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = load ptr, ptr @_funcptr_glGenTextures, align 8, !tbaa !5
  call void %9(i32 noundef 1, ptr noundef @g_mipmapTestTexture)
  %10 = load ptr, ptr @_funcptr_glBindTexture, align 8, !tbaa !5
  %11 = load i32, ptr @g_mipmapTestTexture, align 4, !tbaa !9
  call void %10(i32 noundef 3553, i32 noundef %11)
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #3
  store i32 0, ptr %1, align 4, !tbaa !9
  %12 = load ptr, ptr @_funcptr_glGetIntegerv, align 8, !tbaa !5
  call void %12(i32 noundef 3317, ptr noundef %1)
  %13 = load ptr, ptr @_funcptr_glPixelStorei, align 8, !tbaa !5
  call void %13(i32 noundef 3317, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  store i32 0, ptr %2, align 4, !tbaa !9
  br label %14

14:                                               ; preds = %45, %0
  %15 = load i32, ptr %2, align 4, !tbaa !9
  %16 = icmp slt i32 %15, 8
  br i1 %16, label %18, label %17

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

18:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  %19 = load i32, ptr %2, align 4, !tbaa !9
  %20 = ashr i32 128, %19
  store i32 %20, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  %21 = load i32, ptr %2, align 4, !tbaa !9
  %22 = ashr i32 128, %21
  store i32 %22, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #3
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %23 = load i32, ptr %2, align 4, !tbaa !9
  %24 = mul nsw i32 %23, 3
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [24 x i8], ptr @_ZL12mipmapColors, i64 0, i64 %25
  store ptr %26, ptr %6, align 8, !tbaa !5
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %27, i64 0
  %29 = load i8, ptr %28, align 1, !tbaa !11
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %30, i64 1
  %32 = load i8, ptr %31, align 1, !tbaa !11
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %33, i64 2
  %35 = load i8, ptr %34, align 1, !tbaa !11
  %36 = load i32, ptr %3, align 4, !tbaa !9
  %37 = load i32, ptr %4, align 4, !tbaa !9
  invoke void @_Z13FillWithColorRSt6vectorIhSaIhEEhhhii(ptr noundef nonnull align 8 dereferenceable(24) %5, i8 noundef zeroext %29, i8 noundef zeroext %32, i8 noundef zeroext %35, i32 noundef %36, i32 noundef %37)
          to label %38 unwind label %48

38:                                               ; preds = %18
  %39 = load ptr, ptr @_funcptr_glTexImage2D, align 8, !tbaa !5
  %40 = load i32, ptr %2, align 4, !tbaa !9
  %41 = load i32, ptr %3, align 4, !tbaa !9
  %42 = load i32, ptr %4, align 4, !tbaa !9
  %43 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 0) #3
  invoke void %39(i32 noundef 3553, i32 noundef %40, i32 noundef 32849, i32 noundef %41, i32 noundef %42, i32 noundef 0, i32 noundef 6407, i32 noundef 5121, ptr noundef %43)
          to label %44 unwind label %48

44:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  br label %45

45:                                               ; preds = %44
  %46 = load i32, ptr %2, align 4, !tbaa !9
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %2, align 4, !tbaa !9
  br label %14, !llvm.loop !12

48:                                               ; preds = %38, %18
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %7, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #3
  br label %58

52:                                               ; preds = %17
  %53 = load ptr, ptr @_funcptr_glPixelStorei, align 8, !tbaa !5
  %54 = load i32, ptr %1, align 4, !tbaa !9
  call void %53(i32 noundef 3317, i32 noundef %54)
  %55 = load ptr, ptr @_funcptr_glTexParameteri, align 8, !tbaa !5
  call void %55(i32 noundef 3553, i32 noundef 33084, i32 noundef 0)
  %56 = load ptr, ptr @_funcptr_glTexParameteri, align 8, !tbaa !5
  call void %56(i32 noundef 3553, i32 noundef 33085, i32 noundef 7)
  %57 = load ptr, ptr @_funcptr_glBindTexture, align 8, !tbaa !5
  call void %57(i32 noundef 3553, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #3
  ret void

58:                                               ; preds = %48
  %59 = load ptr, ptr %7, align 8
  %60 = load i32, ptr %8, align 4
  %61 = insertvalue { ptr, i32 } poison, ptr %59, 0
  %62 = insertvalue { ptr, i32 } %61, i32 %60, 1
  resume { ptr, i32 } %62
}

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

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

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

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 = { 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 }

!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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"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.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@g_mipmapTestTexture = external dso_local global i32, align 4
@_funcptr_glGenTextures = external local_unnamed_addr global ptr, align 8
@_funcptr_glBindTexture = external local_unnamed_addr global ptr, align 8
@_funcptr_glGetIntegerv = external local_unnamed_addr global ptr, align 8
@_funcptr_glPixelStorei = external local_unnamed_addr global ptr, align 8
@_ZL12mipmapColors = external hidden local_unnamed_addr constant [24 x i8], align 16
@_funcptr_glTexImage2D = external local_unnamed_addr global ptr, align 8
@_funcptr_glTexParameteri = external local_unnamed_addr global ptr, align 8

; 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 uwtable
declare dso_local void @_Z13FillWithColorRSt6vectorIhSaIhEEhhhii(ptr noundef nonnull align 8 dereferenceable(24), i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17LoadMipmapTexturev() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::vector.3", align 8
  %3 = load ptr, ptr @_funcptr_glGenTextures, align 8, !tbaa !5
  tail call void %3(i32 noundef 1, ptr noundef nonnull @g_mipmapTestTexture)
  %4 = load ptr, ptr @_funcptr_glBindTexture, align 8, !tbaa !5
  %5 = load i32, ptr @g_mipmapTestTexture, align 4, !tbaa !9
  tail call void %4(i32 noundef 3553, i32 noundef %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #3
  store i32 0, ptr %1, align 4, !tbaa !9
  %6 = load ptr, ptr @_funcptr_glGetIntegerv, align 8, !tbaa !5
  call void %6(i32 noundef 3317, ptr noundef nonnull %1)
  %7 = load ptr, ptr @_funcptr_glPixelStorei, align 8, !tbaa !5
  call void %7(i32 noundef 3317, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #3
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  %8 = load i8, ptr @_ZL12mipmapColors, align 16, !tbaa !11
  %9 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL12mipmapColors, i64 1), align 1, !tbaa !11
  %10 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL12mipmapColors, i64 2), align 2, !tbaa !11
  invoke void @_Z13FillWithColorRSt6vectorIhSaIhEEhhhii(ptr noundef nonnull align 8 dereferenceable(24) %2, i8 noundef zeroext %8, i8 noundef zeroext %9, i8 noundef zeroext %10, i32 noundef 128, i32 noundef 128)
          to label %11 unwind label %69

11:                                               ; preds = %0
  %12 = load ptr, ptr @_funcptr_glTexImage2D, align 8, !tbaa !5
  %13 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #3
  invoke void %12(i32 noundef 3553, i32 noundef 0, i32 noundef 32849, i32 noundef 128, i32 noundef 128, i32 noundef 0, i32 noundef 6407, i32 noundef 5121, ptr noundef nonnull %13)
          to label %14 unwind label %69

14:                                               ; preds = %11
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #3
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  %15 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL12mipmapColors, i64 3), align 1, !tbaa !11
  %16 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL12mipmapColors, i64 4), align 4, !tbaa !11
  %17 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL12mipmapColors, i64 5), align 1, !tbaa !11
  invoke void @_Z13FillWithColorRSt6vectorIhSaIhEEhhhii(ptr noundef nonnull align 8 dereferenceable(24) %2, i8 noundef zeroext %15, i8 noundef zeroext %16, i8 noundef zeroext %17, i32 noundef 64, i32 noundef 64)
          to label %18 unwind label %69

18:                                               ; preds = %14
  %19 = load ptr, ptr @_funcptr_glTexImage2D, align 8, !tbaa !5
  %20 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #3
  invoke void %19(i32 noundef 3553, i32 noundef 1, i32 noundef 32849, i32 noundef 64, i32 noundef 64, i32 noundef 0, i32 noundef 6407, i32 noundef 5121, ptr noundef nonnull %20)
          to label %21 unwind label %69

21:                                               ; preds = %18
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #3
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  %22 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL12mipmapColors, i64 6), align 2, !tbaa !11
  %23 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL12mipmapColors, i64 7), align 1, !tbaa !11
  %24 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL12mipmapColors, i64 8), align 8, !tbaa !11
  invoke void @_Z13FillWithColorRSt6vectorIhSaIhEEhhhii(ptr noundef nonnull align 8 dereferenceable(24) %2, i8 noundef zeroext %22, i8 noundef zeroext %23, i8 noundef zeroext %24, i32 noundef 32, i32 noundef 32)
          to label %25 unwind label %69

25:                                               ; preds = %21
  %26 = load ptr, ptr @_funcptr_glTexImage2D, align 8, !tbaa !5
  %27 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #3
  invoke void %26(i32 noundef 3553, i32 noundef 2, i32 noundef 32849, i32 noundef 32, i32 noundef 32, i32 noundef 0, i32 noundef 6407, i32 noundef 5121, ptr noundef nonnull %27)
          to label %28 unwind label %69

28:                                               ; preds = %25
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #3
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  %29 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL12mipmapColors, i64 9), align 1, !tbaa !11
  %30 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL12mipmapColors, i64 10), align 2, !tbaa !11
  %31 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL12mipmapColors, i64 11), align 1, !tbaa !11
  invoke void @_Z13FillWithColorRSt6vectorIhSaIhEEhhhii(ptr noundef nonnull align 8 dereferenceable(24) %2, i8 noundef zeroext %29, i8 noundef zeroext %30, i8 noundef zeroext %31, i32 noundef 16, i32 noundef 16)
          to label %32 unwind label %69

32:                                               ; preds = %28
  %33 = load ptr, ptr @_funcptr_glTexImage2D, align 8, !tbaa !5
  %34 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #3
  invoke void %33(i32 noundef 3553, i32 noundef 3, i32 noundef 32849, i32 noundef 16, i32 noundef 16, i32 noundef 0, i32 noundef 6407, i32 noundef 5121, ptr noundef nonnull %34)
          to label %35 unwind label %69

35:                                               ; preds = %32
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #3
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  %36 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL12mipmapColors, i64 12), align 4, !tbaa !11
  %37 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL12mipmapColors, i64 13), align 1, !tbaa !11
  %38 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL12mipmapColors, i64 14), align 2, !tbaa !11
  invoke void @_Z13FillWithColorRSt6vectorIhSaIhEEhhhii(ptr noundef nonnull align 8 dereferenceable(24) %2, i8 noundef zeroext %36, i8 noundef zeroext %37, i8 noundef zeroext %38, i32 noundef 8, i32 noundef 8)
          to label %39 unwind label %69

39:                                               ; preds = %35
  %40 = load ptr, ptr @_funcptr_glTexImage2D, align 8, !tbaa !5
  %41 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #3
  invoke void %40(i32 noundef 3553, i32 noundef 4, i32 noundef 32849, i32 noundef 8, i32 noundef 8, i32 noundef 0, i32 noundef 6407, i32 noundef 5121, ptr noundef nonnull %41)
          to label %42 unwind label %69

42:                                               ; preds = %39
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #3
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  %43 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL12mipmapColors, i64 15), align 1, !tbaa !11
  %44 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL12mipmapColors, i64 16), align 16, !tbaa !11
  %45 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL12mipmapColors, i64 17), align 1, !tbaa !11
  invoke void @_Z13FillWithColorRSt6vectorIhSaIhEEhhhii(ptr noundef nonnull align 8 dereferenceable(24) %2, i8 noundef zeroext %43, i8 noundef zeroext %44, i8 noundef zeroext %45, i32 noundef 4, i32 noundef 4)
          to label %46 unwind label %69

46:                                               ; preds = %42
  %47 = load ptr, ptr @_funcptr_glTexImage2D, align 8, !tbaa !5
  %48 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #3
  invoke void %47(i32 noundef 3553, i32 noundef 5, i32 noundef 32849, i32 noundef 4, i32 noundef 4, i32 noundef 0, i32 noundef 6407, i32 noundef 5121, ptr noundef nonnull %48)
          to label %49 unwind label %69

49:                                               ; preds = %46
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #3
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  %50 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL12mipmapColors, i64 18), align 2, !tbaa !11
  %51 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL12mipmapColors, i64 19), align 1, !tbaa !11
  %52 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL12mipmapColors, i64 20), align 4, !tbaa !11
  invoke void @_Z13FillWithColorRSt6vectorIhSaIhEEhhhii(ptr noundef nonnull align 8 dereferenceable(24) %2, i8 noundef zeroext %50, i8 noundef zeroext %51, i8 noundef zeroext %52, i32 noundef 2, i32 noundef 2)
          to label %53 unwind label %69

53:                                               ; preds = %49
  %54 = load ptr, ptr @_funcptr_glTexImage2D, align 8, !tbaa !5
  %55 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #3
  invoke void %54(i32 noundef 3553, i32 noundef 6, i32 noundef 32849, i32 noundef 2, i32 noundef 2, i32 noundef 0, i32 noundef 6407, i32 noundef 5121, ptr noundef nonnull %55)
          to label %56 unwind label %69

56:                                               ; preds = %53
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #3
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  %57 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL12mipmapColors, i64 21), align 1, !tbaa !11
  %58 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL12mipmapColors, i64 22), align 2, !tbaa !11
  %59 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL12mipmapColors, i64 23), align 1, !tbaa !11
  invoke void @_Z13FillWithColorRSt6vectorIhSaIhEEhhhii(ptr noundef nonnull align 8 dereferenceable(24) %2, i8 noundef zeroext %57, i8 noundef zeroext %58, i8 noundef zeroext %59, i32 noundef 1, i32 noundef 1)
          to label %60 unwind label %69

60:                                               ; preds = %56
  %61 = load ptr, ptr @_funcptr_glTexImage2D, align 8, !tbaa !5
  %62 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #3
  invoke void %61(i32 noundef 3553, i32 noundef 7, i32 noundef 32849, i32 noundef 1, i32 noundef 1, i32 noundef 0, i32 noundef 6407, i32 noundef 5121, ptr noundef nonnull %62)
          to label %63 unwind label %69

63:                                               ; preds = %60
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #3
  %64 = load ptr, ptr @_funcptr_glPixelStorei, align 8, !tbaa !5
  %65 = load i32, ptr %1, align 4, !tbaa !9
  call void %64(i32 noundef 3317, i32 noundef %65)
  %66 = load ptr, ptr @_funcptr_glTexParameteri, align 8, !tbaa !5
  call void %66(i32 noundef 3553, i32 noundef 33084, i32 noundef 0)
  %67 = load ptr, ptr @_funcptr_glTexParameteri, align 8, !tbaa !5
  call void %67(i32 noundef 3553, i32 noundef 33085, i32 noundef 7)
  %68 = load ptr, ptr @_funcptr_glBindTexture, align 8, !tbaa !5
  call void %68(i32 noundef 3553, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #3
  ret void

69:                                               ; preds = %60, %56, %53, %49, %46, %42, %39, %35, %32, %28, %25, %21, %18, %14, %11, %0
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #3
  resume { ptr, i32 } %70
}

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

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

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

attributes #0 = { mustprogress 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 = { 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 }

!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 = !{!7, !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,SROAPass,SimplifyCFGPass,TailCallElimPass