; LLVM IR from filipwasil/fillwave :: ext/nv_helpers_gl/nv_dds.ll (ZN6nv_dds9CDDSImage16upload_texture2DEjj)

; 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.nv_dds::CDDSImage" = type { i32, i32, i32, i32, i8, %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<nv_dds::CTexture, std::allocator<nv_dds::CTexture>>::_Deque_impl" }
%"struct.std::_Deque_base<nv_dds::CTexture, std::allocator<nv_dds::CTexture>>::_Deque_impl" = type { %"struct.std::_Deque_base<nv_dds::CTexture, std::allocator<nv_dds::CTexture>>::_Deque_impl_data" }
%"struct.std::_Deque_base<nv_dds::CTexture, std::allocator<nv_dds::CTexture>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [18 x i8], align 1
@glad_glGetIntegerv = external global ptr, align 8
@glad_glPixelStorei = external global ptr, align 8
@__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage16upload_texture2DEjj = external hidden unnamed_addr constant [63 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [114 x i8], align 1
@glad_glCompressedTexImage2D = external global ptr, align 8
@glad_glTexImage2D = external global ptr, align 8

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6nv_dds9CDDSImage13is_compressedEv(ptr noundef nonnull align 8 dereferenceable(104)) #2 align 2

; 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 noundef nonnull align 8 dereferenceable(112) ptr @_ZNSt5dequeIN6nv_dds8CTextureESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(80), i64 noundef) #3 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5dequeIN6nv_dds8CTextureESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) #3 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6nv_dds9CDDSImage16is_dword_alignedEv(ptr noundef nonnull align 8 dereferenceable(104)) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6nv_dds9CDDSImage16upload_texture2DEjj(ptr noundef nonnull align 8 dereferenceable(104) %0, i32 noundef %1, i32 noundef %2) #5 align 2 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  %15 = load ptr, ptr %5, align 8
  %16 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %15, i32 0, i32 4
  %17 = load i8, ptr %16, align 8, !tbaa !11, !range !21, !noundef !22
  %18 = trunc i8 %17 to i1
  br i1 %18, label %19, label %20

19:                                               ; preds = %3
  br label %22

20:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.18, ptr noundef @.str.1, i32 noundef 753, ptr noundef @__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage16upload_texture2DEjj) #6
  unreachable

21:                                               ; No predecessors!
  br label %22

22:                                               ; preds = %21, %19
  %23 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %15, i32 0, i32 5
  %24 = call noundef zeroext i1 @_ZNKSt5dequeIN6nv_dds8CTextureESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %23) #7
  %25 = xor i1 %24, true
  br i1 %25, label %26, label %27

26:                                               ; preds = %22
  br label %29

27:                                               ; preds = %22
  call void @__assert_fail(ptr noundef @.str.22, ptr noundef @.str.1, i32 noundef 754, ptr noundef @__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage16upload_texture2DEjj) #6
  unreachable

28:                                               ; No predecessors!
  br label %29

29:                                               ; preds = %28, %26
  %30 = load i32, ptr %6, align 4, !tbaa !9
  %31 = icmp ne i32 %30, 0
  br i1 %31, label %32, label %33

32:                                               ; preds = %29
  br label %35

33:                                               ; preds = %29
  call void @__assert_fail(ptr noundef @.str.25, ptr noundef @.str.1, i32 noundef 755, ptr noundef @__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage16upload_texture2DEjj) #6
  unreachable

34:                                               ; No predecessors!
  br label %35

35:                                               ; preds = %34, %32
  %36 = load i32, ptr %6, align 4, !tbaa !9
  %37 = zext i32 %36 to i64
  %38 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %15, i32 0, i32 5
  %39 = call noundef i64 @_ZNKSt5dequeIN6nv_dds8CTextureESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %38) #7
  %40 = icmp ult i64 %37, %39
  br i1 %40, label %41, label %42

41:                                               ; preds = %35
  br label %44

42:                                               ; preds = %35
  call void @__assert_fail(ptr noundef @.str.26, ptr noundef @.str.1, i32 noundef 756, ptr noundef @__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage16upload_texture2DEjj) #6
  unreachable

43:                                               ; No predecessors!
  br label %44

44:                                               ; preds = %43, %41
  %45 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %15, i32 0, i32 5
  %46 = load i32, ptr %6, align 4, !tbaa !9
  %47 = zext i32 %46 to i64
  %48 = call noundef nonnull align 8 dereferenceable(112) ptr @_ZNSt5dequeIN6nv_dds8CTextureESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %45, i64 noundef %47) #7
  %49 = call noundef ptr @_ZNK6nv_dds8CSurfacecvPhEv(ptr noundef nonnull align 8 dereferenceable(32) %48)
  %50 = icmp ne ptr %49, null
  br i1 %50, label %51, label %52

51:                                               ; preds = %44
  br label %54

52:                                               ; preds = %44
  call void @__assert_fail(ptr noundef @.str.27, ptr noundef @.str.1, i32 noundef 757, ptr noundef @__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage16upload_texture2DEjj) #6
  unreachable

53:                                               ; No predecessors!
  br label %54

54:                                               ; preds = %53, %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %55 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %15, i32 0, i32 5
  %56 = load i32, ptr %6, align 4, !tbaa !9
  %57 = zext i32 %56 to i64
  %58 = call noundef nonnull align 8 dereferenceable(112) ptr @_ZNSt5dequeIN6nv_dds8CTextureESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %55, i64 noundef %57) #7
  store ptr %58, ptr %8, align 8, !tbaa !5
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = call noundef i32 @_ZNK6nv_dds8CSurface10get_heightEv(ptr noundef nonnull align 8 dereferenceable(32) %59)
  %61 = icmp ugt i32 %60, 0
  br i1 %61, label %62, label %63

62:                                               ; preds = %54
  br label %65

63:                                               ; preds = %54
  call void @__assert_fail(ptr noundef @.str.28, ptr noundef @.str.1, i32 noundef 761, ptr noundef @__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage16upload_texture2DEjj) #6
  unreachable

64:                                               ; No predecessors!
  br label %65

65:                                               ; preds = %64, %62
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = call noundef i32 @_ZNK6nv_dds8CSurface9get_widthEv(ptr noundef nonnull align 8 dereferenceable(32) %66)
  %68 = icmp ugt i32 %67, 0
  br i1 %68, label %69, label %70

69:                                               ; preds = %65
  br label %72

70:                                               ; preds = %65
  call void @__assert_fail(ptr noundef @.str.29, ptr noundef @.str.1, i32 noundef 762, ptr noundef @__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage16upload_texture2DEjj) #6
  unreachable

71:                                               ; No predecessors!
  br label %72

72:                                               ; preds = %71, %69
  %73 = load i32, ptr %7, align 4, !tbaa !9
  %74 = icmp eq i32 %73, 3553
  br i1 %74, label %83, label %75

75:                                               ; preds = %72
  %76 = load i32, ptr %7, align 4, !tbaa !9
  %77 = icmp uge i32 %76, 34069
  br i1 %77, label %78, label %81

78:                                               ; preds = %75
  %79 = load i32, ptr %7, align 4, !tbaa !9
  %80 = icmp ule i32 %79, 34074
  br label %81

81:                                               ; preds = %78, %75
  %82 = phi i1 [ false, %75 ], [ %80, %78 ]
  br label %83

83:                                               ; preds = %81, %72
  %84 = phi i1 [ true, %72 ], [ %82, %81 ]
  br i1 %84, label %85, label %86

85:                                               ; preds = %83
  br label %88

86:                                               ; preds = %83
  call void @__assert_fail(ptr noundef @.str.30, ptr noundef @.str.1, i32 noundef 766, ptr noundef @__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage16upload_texture2DEjj) #6
  unreachable

87:                                               ; No predecessors!
  br label %88

88:                                               ; preds = %87, %85
  %89 = call noundef zeroext i1 @_ZN6nv_dds9CDDSImage13is_compressedEv(ptr noundef nonnull align 8 dereferenceable(104) %15)
  br i1 %89, label %90, label %135

90:                                               ; preds = %88
  %91 = load ptr, ptr @glad_glCompressedTexImage2D, align 8, !tbaa !5
  %92 = icmp eq ptr %91, null
  br i1 %92, label %93, label %94

93:                                               ; preds = %90
  store i1 false, ptr %4, align 1
  store i32 1, ptr %9, align 4
  br label %188

94:                                               ; preds = %90
  %95 = load ptr, ptr @glad_glCompressedTexImage2D, align 8, !tbaa !5
  %96 = load i32, ptr %7, align 4, !tbaa !9
  %97 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %15, i32 0, i32 0
  %98 = load i32, ptr %97, align 8, !tbaa !23
  %99 = load ptr, ptr %8, align 8, !tbaa !5
  %100 = call noundef i32 @_ZNK6nv_dds8CSurface9get_widthEv(ptr noundef nonnull align 8 dereferenceable(32) %99)
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = call noundef i32 @_ZNK6nv_dds8CSurface10get_heightEv(ptr noundef nonnull align 8 dereferenceable(32) %101)
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  %104 = call noundef i32 @_ZNK6nv_dds8CSurface8get_sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %103)
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = call noundef ptr @_ZNK6nv_dds8CSurfacecvPhEv(ptr noundef nonnull align 8 dereferenceable(32) %105)
  call void %95(i32 noundef %96, i32 noundef 0, i32 noundef %98, i32 noundef %100, i32 noundef %102, i32 noundef 0, i32 noundef %104, ptr noundef %106)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %107

107:                                              ; preds = %131, %94
  %108 = load i32, ptr %10, align 4, !tbaa !9
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = call noundef i32 @_ZNK6nv_dds8CTexture15get_num_mipmapsEv(ptr noundef nonnull align 8 dereferenceable(112) %109)
  %111 = icmp ult i32 %108, %110
  br i1 %111, label %113, label %112

112:                                              ; preds = %107
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %134

113:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %114 = load ptr, ptr %8, align 8, !tbaa !5
  %115 = load i32, ptr %10, align 4, !tbaa !9
  %116 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK6nv_dds8CTexture10get_mipmapEj(ptr noundef nonnull align 8 dereferenceable(112) %114, i32 noundef %115)
  store ptr %116, ptr %11, align 8, !tbaa !5
  %117 = load ptr, ptr @glad_glCompressedTexImage2D, align 8, !tbaa !5
  %118 = load i32, ptr %7, align 4, !tbaa !9
  %119 = load i32, ptr %10, align 4, !tbaa !9
  %120 = add i32 %119, 1
  %121 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %15, i32 0, i32 0
  %122 = load i32, ptr %121, align 8, !tbaa !23
  %123 = load ptr, ptr %11, align 8, !tbaa !5
  %124 = call noundef i32 @_ZNK6nv_dds8CSurface9get_widthEv(ptr noundef nonnull align 8 dereferenceable(32) %123)
  %125 = load ptr, ptr %11, align 8, !tbaa !5
  %126 = call noundef i32 @_ZNK6nv_dds8CSurface10get_heightEv(ptr noundef nonnull align 8 dereferenceable(32) %125)
  %127 = load ptr, ptr %11, align 8, !tbaa !5
  %128 = call noundef i32 @_ZNK6nv_dds8CSurface8get_sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %127)
  %129 = load ptr, ptr %11, align 8, !tbaa !5
  %130 = call noundef ptr @_ZNK6nv_dds8CSurfacecvPhEv(ptr noundef nonnull align 8 dereferenceable(32) %129)
  call void %117(i32 noundef %118, i32 noundef %120, i32 noundef %122, i32 noundef %124, i32 noundef %126, i32 noundef 0, i32 noundef %128, ptr noundef %130)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %131

131:                                              ; preds = %113
  %132 = load i32, ptr %10, align 4, !tbaa !9
  %133 = add i32 %132, 1
  store i32 %133, ptr %10, align 4, !tbaa !9
  br label %107, !llvm.loop !24

134:                                              ; preds = %112
  br label %187

135:                                              ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 -1, ptr %12, align 4, !tbaa !9
  %136 = call noundef zeroext i1 @_ZN6nv_dds9CDDSImage16is_dword_alignedEv(ptr noundef nonnull align 8 dereferenceable(104) %15)
  br i1 %136, label %140, label %137

137:                                              ; preds = %135
  %138 = load ptr, ptr @glad_glGetIntegerv, align 8, !tbaa !5
  call void %138(i32 noundef 3317, ptr noundef %12)
  %139 = load ptr, ptr @glad_glPixelStorei, align 8, !tbaa !5
  call void %139(i32 noundef 3317, i32 noundef 1)
  br label %140

140:                                              ; preds = %137, %135
  %141 = load ptr, ptr @glad_glTexImage2D, align 8, !tbaa !5
  %142 = load i32, ptr %7, align 4, !tbaa !9
  %143 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %15, i32 0, i32 1
  %144 = load i32, ptr %143, align 4, !tbaa !26
  %145 = load ptr, ptr %8, align 8, !tbaa !5
  %146 = call noundef i32 @_ZNK6nv_dds8CSurface9get_widthEv(ptr noundef nonnull align 8 dereferenceable(32) %145)
  %147 = load ptr, ptr %8, align 8, !tbaa !5
  %148 = call noundef i32 @_ZNK6nv_dds8CSurface10get_heightEv(ptr noundef nonnull align 8 dereferenceable(32) %147)
  %149 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %15, i32 0, i32 0
  %150 = load i32, ptr %149, align 8, !tbaa !23
  %151 = load ptr, ptr %8, align 8, !tbaa !5
  %152 = call noundef ptr @_ZNK6nv_dds8CSurfacecvPhEv(ptr noundef nonnull align 8 dereferenceable(32) %151)
  call void %141(i32 noundef %142, i32 noundef 0, i32 noundef %144, i32 noundef %146, i32 noundef %148, i32 noundef 0, i32 noundef %150, i32 noundef 5121, ptr noundef %152)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %153

153:                                              ; preds = %177, %140
  %154 = load i32, ptr %13, align 4, !tbaa !9
  %155 = load ptr, ptr %8, align 8, !tbaa !5
  %156 = call noundef i32 @_ZNK6nv_dds8CTexture15get_num_mipmapsEv(ptr noundef nonnull align 8 dereferenceable(112) %155)
  %157 = icmp ult i32 %154, %156
  br i1 %157, label %159, label %158

158:                                              ; preds = %153
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %180

159:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %160 = load ptr, ptr %8, align 8, !tbaa !5
  %161 = load i32, ptr %13, align 4, !tbaa !9
  %162 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK6nv_dds8CTexture10get_mipmapEj(ptr noundef nonnull align 8 dereferenceable(112) %160, i32 noundef %161)
  store ptr %162, ptr %14, align 8, !tbaa !5
  %163 = load ptr, ptr @glad_glTexImage2D, align 8, !tbaa !5
  %164 = load i32, ptr %7, align 4, !tbaa !9
  %165 = load i32, ptr %13, align 4, !tbaa !9
  %166 = add i32 %165, 1
  %167 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %15, i32 0, i32 1
  %168 = load i32, ptr %167, align 4, !tbaa !26
  %169 = load ptr, ptr %14, align 8, !tbaa !5
  %170 = call noundef i32 @_ZNK6nv_dds8CSurface9get_widthEv(ptr noundef nonnull align 8 dereferenceable(32) %169)
  %171 = load ptr, ptr %14, align 8, !tbaa !5
  %172 = call noundef i32 @_ZNK6nv_dds8CSurface10get_heightEv(ptr noundef nonnull align 8 dereferenceable(32) %171)
  %173 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %15, i32 0, i32 0
  %174 = load i32, ptr %173, align 8, !tbaa !23
  %175 = load ptr, ptr %14, align 8, !tbaa !5
  %176 = call noundef ptr @_ZNK6nv_dds8CSurfacecvPhEv(ptr noundef nonnull align 8 dereferenceable(32) %175)
  call void %163(i32 noundef %164, i32 noundef %166, i32 noundef %168, i32 noundef %170, i32 noundef %172, i32 noundef 0, i32 noundef %174, i32 noundef 5121, ptr noundef %176)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %177

177:                                              ; preds = %159
  %178 = load i32, ptr %13, align 4, !tbaa !9
  %179 = add i32 %178, 1
  store i32 %179, ptr %13, align 4, !tbaa !9
  br label %153, !llvm.loop !27

180:                                              ; preds = %158
  %181 = load i32, ptr %12, align 4, !tbaa !9
  %182 = icmp ne i32 %181, -1
  br i1 %182, label %183, label %186

183:                                              ; preds = %180
  %184 = load ptr, ptr @glad_glPixelStorei, align 8, !tbaa !5
  %185 = load i32, ptr %12, align 4, !tbaa !9
  call void %184(i32 noundef 3317, i32 noundef %185)
  br label %186

186:                                              ; preds = %183, %180
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %187

187:                                              ; preds = %186, %134
  store i1 true, ptr %4, align 1
  store i32 1, ptr %9, align 4
  br label %188

188:                                              ; preds = %187, %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  %189 = load i1, ptr %4, align 1
  ret i1 %189
}

attributes #0 = { noreturn 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { inlinehint 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 = { 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 #6 = { noreturn nounwind }
attributes #7 = { 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, !14, i64 16}
!12 = !{!"_ZTSN6nv_dds9CDDSImageE", !10, i64 0, !10, i64 4, !10, i64 8, !13, i64 12, !14, i64 16, !15, i64 24}
!13 = !{!"_ZTSN6nv_dds11TextureTypeE", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSSt5dequeIN6nv_dds8CTextureESaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSSt11_Deque_baseIN6nv_dds8CTextureESaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSNSt11_Deque_baseIN6nv_dds8CTextureESaIS1_EE11_Deque_implE", !18, i64 0}
!18 = !{!"_ZTSNSt11_Deque_baseIN6nv_dds8CTextureESaIS1_EE16_Deque_impl_dataE", !6, i64 0, !19, i64 8, !20, i64 16, !20, i64 48}
!19 = !{!"long", !7, i64 0}
!20 = !{!"_ZTSSt15_Deque_iteratorIN6nv_dds8CTextureERS1_PS1_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!12, !10, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!12, !10, i64 4}
!27 = distinct !{!27, !25}


; 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"

@.str.1 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [18 x i8], align 1
@glad_glGetIntegerv = external local_unnamed_addr global ptr, align 8
@glad_glPixelStorei = external local_unnamed_addr global ptr, align 8
@__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage16upload_texture2DEjj = external hidden unnamed_addr constant [63 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [114 x i8], align 1
@glad_glCompressedTexImage2D = external local_unnamed_addr global ptr, align 8
@glad_glTexImage2D = external local_unnamed_addr global ptr, align 8

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6nv_dds9CDDSImage13is_compressedEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #2 align 2

; 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 noundef nonnull align 8 dereferenceable(112) ptr @_ZNSt5dequeIN6nv_dds8CTextureESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(80), i64 noundef) local_unnamed_addr #3 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5dequeIN6nv_dds8CTextureESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6nv_dds9CDDSImage16is_dword_alignedEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6nv_dds9CDDSImage16upload_texture2DEjj(ptr noundef nonnull align 8 dereferenceable(104) %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #5 align 2 {
  %4 = alloca i32, align 4
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  %6 = load i8, ptr %5, align 8, !tbaa !5, !range !19, !noundef !20
  %7 = trunc nuw i8 %6 to i1
  br i1 %7, label %9, label %8

8:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.18, ptr noundef nonnull @.str.1, i32 noundef 753, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage16upload_texture2DEjj) #6
  unreachable

9:                                                ; preds = %3
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  %11 = tail call noundef zeroext i1 @_ZNKSt5dequeIN6nv_dds8CTextureESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %10) #7
  br i1 %11, label %12, label %13

12:                                               ; preds = %9
  tail call void @__assert_fail(ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.1, i32 noundef 754, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage16upload_texture2DEjj) #6
  unreachable

13:                                               ; preds = %9
  %.not = icmp eq i32 %1, 0
  br i1 %.not, label %14, label %15

14:                                               ; preds = %13
  tail call void @__assert_fail(ptr noundef nonnull @.str.25, ptr noundef nonnull @.str.1, i32 noundef 755, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage16upload_texture2DEjj) #6
  unreachable

15:                                               ; preds = %13
  %16 = zext i32 %1 to i64
  %17 = tail call noundef i64 @_ZNKSt5dequeIN6nv_dds8CTextureESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %10) #7
  %18 = icmp ugt i64 %17, %16
  br i1 %18, label %20, label %19

19:                                               ; preds = %15
  tail call void @__assert_fail(ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.1, i32 noundef 756, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage16upload_texture2DEjj) #6
  unreachable

20:                                               ; preds = %15
  %21 = tail call noundef nonnull align 8 dereferenceable(112) ptr @_ZNSt5dequeIN6nv_dds8CTextureESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %10, i64 noundef %16) #7
  %22 = tail call noundef ptr @_ZNK6nv_dds8CSurfacecvPhEv(ptr noundef nonnull align 8 dereferenceable(32) %21)
  %.not47 = icmp eq ptr %22, null
  br i1 %.not47, label %23, label %24

23:                                               ; preds = %20
  tail call void @__assert_fail(ptr noundef nonnull @.str.27, ptr noundef nonnull @.str.1, i32 noundef 757, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage16upload_texture2DEjj) #6
  unreachable

24:                                               ; preds = %20
  %25 = tail call noundef nonnull align 8 dereferenceable(112) ptr @_ZNSt5dequeIN6nv_dds8CTextureESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %10, i64 noundef %16) #7
  %26 = tail call noundef i32 @_ZNK6nv_dds8CSurface10get_heightEv(ptr noundef nonnull align 8 dereferenceable(32) %25)
  %.not48 = icmp eq i32 %26, 0
  br i1 %.not48, label %27, label %28

27:                                               ; preds = %24
  tail call void @__assert_fail(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.1, i32 noundef 761, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage16upload_texture2DEjj) #6
  unreachable

28:                                               ; preds = %24
  %29 = tail call noundef i32 @_ZNK6nv_dds8CSurface9get_widthEv(ptr noundef nonnull align 8 dereferenceable(32) %25)
  %.not49 = icmp eq i32 %29, 0
  br i1 %.not49, label %30, label %31

30:                                               ; preds = %28
  tail call void @__assert_fail(ptr noundef nonnull @.str.29, ptr noundef nonnull @.str.1, i32 noundef 762, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage16upload_texture2DEjj) #6
  unreachable

31:                                               ; preds = %28
  switch i32 %2, label %32 [
    i32 34074, label %.critedge
    i32 34073, label %.critedge
    i32 34072, label %.critedge
    i32 34071, label %.critedge
    i32 34070, label %.critedge
    i32 34069, label %.critedge
    i32 3553, label %.critedge
  ]

32:                                               ; preds = %31
  tail call void @__assert_fail(ptr noundef nonnull @.str.30, ptr noundef nonnull @.str.1, i32 noundef 766, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage16upload_texture2DEjj) #6
  unreachable

.critedge:                                        ; preds = %31, %31, %31, %31, %31, %31, %31
  %33 = tail call noundef zeroext i1 @_ZN6nv_dds9CDDSImage13is_compressedEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  br i1 %33, label %34, label %54

34:                                               ; preds = %.critedge
  %35 = load ptr, ptr @glad_glCompressedTexImage2D, align 8, !tbaa !21
  %36 = icmp eq ptr %35, null
  br i1 %36, label %.loopexit, label %37

37:                                               ; preds = %34
  %38 = load i32, ptr %0, align 8, !tbaa !22
  %39 = tail call noundef i32 @_ZNK6nv_dds8CSurface9get_widthEv(ptr noundef nonnull align 8 dereferenceable(32) %25)
  %40 = tail call noundef i32 @_ZNK6nv_dds8CSurface10get_heightEv(ptr noundef nonnull align 8 dereferenceable(32) %25)
  %41 = tail call noundef i32 @_ZNK6nv_dds8CSurface8get_sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %25)
  %42 = tail call noundef ptr @_ZNK6nv_dds8CSurfacecvPhEv(ptr noundef nonnull align 8 dereferenceable(32) %25)
  tail call void %35(i32 noundef %2, i32 noundef 0, i32 noundef %38, i32 noundef %39, i32 noundef %40, i32 noundef 0, i32 noundef %41, ptr noundef %42)
  %43 = tail call noundef i32 @_ZNK6nv_dds8CTexture15get_num_mipmapsEv(ptr noundef nonnull align 8 dereferenceable(112) %25)
  %.not57 = icmp eq i32 %43, 0
  br i1 %.not57, label %.loopexit, label %.lr.ph55

.lr.ph55:                                         ; preds = %37, %.lr.ph55
  %.04153 = phi i32 [ %46, %.lr.ph55 ], [ 0, %37 ]
  %44 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK6nv_dds8CTexture10get_mipmapEj(ptr noundef nonnull align 8 dereferenceable(112) %25, i32 noundef %.04153)
  %45 = load ptr, ptr @glad_glCompressedTexImage2D, align 8, !tbaa !21
  %46 = add nuw i32 %.04153, 1
  %47 = load i32, ptr %0, align 8, !tbaa !22
  %48 = tail call noundef i32 @_ZNK6nv_dds8CSurface9get_widthEv(ptr noundef nonnull align 8 dereferenceable(32) %44)
  %49 = tail call noundef i32 @_ZNK6nv_dds8CSurface10get_heightEv(ptr noundef nonnull align 8 dereferenceable(32) %44)
  %50 = tail call noundef i32 @_ZNK6nv_dds8CSurface8get_sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %44)
  %51 = tail call noundef ptr @_ZNK6nv_dds8CSurfacecvPhEv(ptr noundef nonnull align 8 dereferenceable(32) %44)
  tail call void %45(i32 noundef %2, i32 noundef %46, i32 noundef %47, i32 noundef %48, i32 noundef %49, i32 noundef 0, i32 noundef %50, ptr noundef %51)
  %52 = tail call noundef i32 @_ZNK6nv_dds8CTexture15get_num_mipmapsEv(ptr noundef nonnull align 8 dereferenceable(112) %25)
  %53 = icmp ult i32 %46, %52
  br i1 %53, label %.lr.ph55, label %.loopexit, !llvm.loop !23

54:                                               ; preds = %.critedge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 -1, ptr %4, align 4, !tbaa !25
  %55 = tail call noundef zeroext i1 @_ZN6nv_dds9CDDSImage16is_dword_alignedEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  br i1 %55, label %59, label %56

56:                                               ; preds = %54
  %57 = load ptr, ptr @glad_glGetIntegerv, align 8, !tbaa !21
  call void %57(i32 noundef 3317, ptr noundef nonnull %4)
  %58 = load ptr, ptr @glad_glPixelStorei, align 8, !tbaa !21
  call void %58(i32 noundef 3317, i32 noundef 1)
  br label %59

59:                                               ; preds = %56, %54
  %60 = load ptr, ptr @glad_glTexImage2D, align 8, !tbaa !21
  %61 = getelementptr inbounds i8, ptr %0, i64 4
  %62 = load i32, ptr %61, align 4, !tbaa !26
  %63 = call noundef i32 @_ZNK6nv_dds8CSurface9get_widthEv(ptr noundef nonnull align 8 dereferenceable(32) %25)
  %64 = call noundef i32 @_ZNK6nv_dds8CSurface10get_heightEv(ptr noundef nonnull align 8 dereferenceable(32) %25)
  %65 = load i32, ptr %0, align 8, !tbaa !22
  %66 = call noundef ptr @_ZNK6nv_dds8CSurfacecvPhEv(ptr noundef nonnull align 8 dereferenceable(32) %25)
  call void %60(i32 noundef %2, i32 noundef 0, i32 noundef %62, i32 noundef %63, i32 noundef %64, i32 noundef 0, i32 noundef %65, i32 noundef 5121, ptr noundef %66)
  %67 = call noundef i32 @_ZNK6nv_dds8CTexture15get_num_mipmapsEv(ptr noundef nonnull align 8 dereferenceable(112) %25)
  %.not56 = icmp eq i32 %67, 0
  br i1 %.not56, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %59
  %68 = load i32, ptr %4, align 4, !tbaa !25
  %.not50 = icmp eq i32 %68, -1
  br i1 %.not50, label %81, label %79

.lr.ph:                                           ; preds = %59, %.lr.ph
  %.04052 = phi i32 [ %71, %.lr.ph ], [ 0, %59 ]
  %69 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK6nv_dds8CTexture10get_mipmapEj(ptr noundef nonnull align 8 dereferenceable(112) %25, i32 noundef %.04052)
  %70 = load ptr, ptr @glad_glTexImage2D, align 8, !tbaa !21
  %71 = add nuw i32 %.04052, 1
  %72 = load i32, ptr %61, align 4, !tbaa !26
  %73 = call noundef i32 @_ZNK6nv_dds8CSurface9get_widthEv(ptr noundef nonnull align 8 dereferenceable(32) %69)
  %74 = call noundef i32 @_ZNK6nv_dds8CSurface10get_heightEv(ptr noundef nonnull align 8 dereferenceable(32) %69)
  %75 = load i32, ptr %0, align 8, !tbaa !22
  %76 = call noundef ptr @_ZNK6nv_dds8CSurfacecvPhEv(ptr noundef nonnull align 8 dereferenceable(32) %69)
  call void %70(i32 noundef %2, i32 noundef %71, i32 noundef %72, i32 noundef %73, i32 noundef %74, i32 noundef 0, i32 noundef %75, i32 noundef 5121, ptr noundef %76)
  %77 = call noundef i32 @_ZNK6nv_dds8CTexture15get_num_mipmapsEv(ptr noundef nonnull align 8 dereferenceable(112) %25)
  %78 = icmp ult i32 %71, %77
  br i1 %78, label %.lr.ph, label %._crit_edge, !llvm.loop !27

79:                                               ; preds = %._crit_edge
  %80 = load ptr, ptr @glad_glPixelStorei, align 8, !tbaa !21
  call void %80(i32 noundef 3317, i32 noundef %68)
  br label %81

81:                                               ; preds = %79, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph55, %37, %81, %34
  %.0 = phi i1 [ false, %34 ], [ true, %81 ], [ true, %37 ], [ true, %.lr.ph55 ]
  ret i1 %.0
}

attributes #0 = { noreturn 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { inlinehint 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 = { 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 #6 = { noreturn nounwind }
attributes #7 = { 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, !11, i64 16}
!6 = !{!"_ZTSN6nv_dds9CDDSImageE", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 12, !11, i64 16, !12, i64 24}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN6nv_dds11TextureTypeE", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"_ZTSSt5dequeIN6nv_dds8CTextureESaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSSt11_Deque_baseIN6nv_dds8CTextureESaIS1_EE", !14, i64 0}
!14 = !{!"_ZTSNSt11_Deque_baseIN6nv_dds8CTextureESaIS1_EE11_Deque_implE", !15, i64 0}
!15 = !{!"_ZTSNSt11_Deque_baseIN6nv_dds8CTextureESaIS1_EE16_Deque_impl_dataE", !16, i64 0, !17, i64 8, !18, i64 16, !18, i64 48}
!16 = !{!"any pointer", !8, i64 0}
!17 = !{!"long", !8, i64 0}
!18 = !{!"_ZTSSt15_Deque_iteratorIN6nv_dds8CTextureERS1_PS1_E", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!16, !16, i64 0}
!22 = !{!6, !7, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!7, !7, i64 0}
!26 = !{!6, !7, i64 4}
!27 = distinct !{!27, !24}


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