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

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

%"struct.nv_dds::DDS_HEADER" = type { i32, i32, i32, i32, i32, i32, i32, [11 x i32], %"struct.nv_dds::DDS_PIXELFORMAT", i32, i32, [3 x i32] }
%"struct.nv_dds::DDS_PIXELFORMAT" = type { i32, i32, i32, i32, i32, i32, i32, i32 }
%"class.nv_dds::CTexture" = type { %"class.nv_dds::CSurface", %"class.std::deque.0" }
%"class.nv_dds::CSurface" = type { ptr, i32, i32, i32, i32, ptr }
%"class.std::deque.0" = type { %"class.std::_Deque_base.1" }
%"class.std::_Deque_base.1" = type { %"struct.std::_Deque_base<nv_dds::CSurface, std::allocator<nv_dds::CSurface>>::_Deque_impl" }
%"struct.std::_Deque_base<nv_dds::CSurface, std::allocator<nv_dds::CSurface>>::_Deque_impl" = type { %"struct.std::_Deque_base<nv_dds::CSurface, std::allocator<nv_dds::CSurface>>::_Deque_impl_data" }
%"struct.std::_Deque_base<nv_dds::CSurface, std::allocator<nv_dds::CSurface>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator.5", %"struct.std::_Deque_iterator.5" }
%"struct.std::_Deque_iterator.5" = type { ptr, ptr, ptr, ptr }
%"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.15 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [8 x i8], align 1
@__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage4saveENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb = external hidden unnamed_addr constant [48 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [21 x i8], align 1

; 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

declare noalias ptr @fopen(ptr noundef, ptr noundef) #2

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

declare i32 @fclose(ptr noundef) #2

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

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) #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: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(112) ptr @_ZN6nv_dds8CTextureaSERKS0_(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(112)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6nv_dds9CDDSImage13write_textureERKNS_8CTextureEP8_IO_FILE(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(112), ptr noundef) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN6nv_dds9CDDSImage15get_num_mipmapsEv(ptr noundef nonnull align 8 dereferenceable(104)) #6 align 2

declare i64 @fwrite(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

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

22:                                               ; preds = %3
  br label %25

23:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.18, ptr noundef @.str.1, i32 noundef 547, ptr noundef @__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage4saveENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb) #8
  unreachable

24:                                               ; No predecessors!
  br label %25

25:                                               ; preds = %24, %22
  %26 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %18, i32 0, i32 3
  %27 = load i32, ptr %26, align 4, !tbaa !23
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %29, label %30

29:                                               ; preds = %25
  br label %32

30:                                               ; preds = %25
  call void @__assert_fail(ptr noundef @.str.19, ptr noundef @.str.1, i32 noundef 548, ptr noundef @__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage4saveENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb) #8
  unreachable

31:                                               ; No predecessors!
  br label %32

32:                                               ; preds = %31, %29
  call void @llvm.lifetime.start.p0(i64 124, ptr %8) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  store i32 124, ptr %9, align 4, !tbaa !24
  %33 = load i32, ptr %9, align 4, !tbaa !24
  %34 = zext i32 %33 to i64
  call void @llvm.memset.p0.i64(ptr align 4 %8, i8 0, i64 %34, i1 false)
  %35 = load i32, ptr %9, align 4, !tbaa !24
  %36 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 0
  store i32 %35, ptr %36, align 4, !tbaa !25
  %37 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 1
  store i32 4103, ptr %37, align 4, !tbaa !28
  %38 = call noundef i32 @_ZN6nv_dds9CDDSImage10get_heightEv(ptr noundef nonnull align 8 dereferenceable(104) %18)
  %39 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 2
  store i32 %38, ptr %39, align 4, !tbaa !29
  %40 = call noundef i32 @_ZN6nv_dds9CDDSImage9get_widthEv(ptr noundef nonnull align 8 dereferenceable(104) %18)
  %41 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 3
  store i32 %40, ptr %41, align 4, !tbaa !30
  %42 = call noundef zeroext i1 @_ZN6nv_dds9CDDSImage13is_compressedEv(ptr noundef nonnull align 8 dereferenceable(104) %18)
  br i1 %42, label %43, label %49

43:                                               ; preds = %32
  %44 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 1
  %45 = load i32, ptr %44, align 4, !tbaa !28
  %46 = or i32 %45, 524288
  store i32 %46, ptr %44, align 4, !tbaa !28
  %47 = call noundef i32 @_ZN6nv_dds9CDDSImage8get_sizeEv(ptr noundef nonnull align 8 dereferenceable(104) %18)
  %48 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 4
  store i32 %47, ptr %48, align 4, !tbaa !31
  br label %59

49:                                               ; preds = %32
  %50 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 1
  %51 = load i32, ptr %50, align 4, !tbaa !28
  %52 = or i32 %51, 8
  store i32 %52, ptr %50, align 4, !tbaa !28
  %53 = call noundef i32 @_ZN6nv_dds9CDDSImage9get_widthEv(ptr noundef nonnull align 8 dereferenceable(104) %18)
  %54 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %18, i32 0, i32 2
  %55 = load i32, ptr %54, align 8, !tbaa !32
  %56 = mul i32 %55, 8
  %57 = call noundef i32 @_ZN6nv_dds9CDDSImage26get_dword_aligned_linesizeEjj(ptr noundef nonnull align 8 dereferenceable(104) %18, i32 noundef %53, i32 noundef %56)
  %58 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 4
  store i32 %57, ptr %58, align 4, !tbaa !31
  br label %59

59:                                               ; preds = %49, %43
  %60 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %18, i32 0, i32 3
  %61 = load i32, ptr %60, align 4, !tbaa !23
  %62 = icmp eq i32 %61, 2
  br i1 %62, label %63, label %69

63:                                               ; preds = %59
  %64 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 1
  %65 = load i32, ptr %64, align 4, !tbaa !28
  %66 = or i32 %65, 8388608
  store i32 %66, ptr %64, align 4, !tbaa !28
  %67 = call noundef i32 @_ZN6nv_dds9CDDSImage9get_depthEv(ptr noundef nonnull align 8 dereferenceable(104) %18)
  %68 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 5
  store i32 %67, ptr %68, align 4, !tbaa !33
  br label %69

69:                                               ; preds = %63, %59
  %70 = call noundef i32 @_ZN6nv_dds9CDDSImage15get_num_mipmapsEv(ptr noundef nonnull align 8 dereferenceable(104) %18)
  %71 = icmp ugt i32 %70, 0
  br i1 %71, label %72, label %79

72:                                               ; preds = %69
  %73 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 1
  %74 = load i32, ptr %73, align 4, !tbaa !28
  %75 = or i32 %74, 131072
  store i32 %75, ptr %73, align 4, !tbaa !28
  %76 = call noundef i32 @_ZN6nv_dds9CDDSImage15get_num_mipmapsEv(ptr noundef nonnull align 8 dereferenceable(104) %18)
  %77 = add i32 %76, 1
  %78 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 6
  store i32 %77, ptr %78, align 4, !tbaa !34
  br label %79

79:                                               ; preds = %72, %69
  %80 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 8
  %81 = getelementptr inbounds %"struct.nv_dds::DDS_PIXELFORMAT", ptr %80, i32 0, i32 0
  store i32 32, ptr %81, align 4, !tbaa !35
  %82 = call noundef zeroext i1 @_ZN6nv_dds9CDDSImage13is_compressedEv(ptr noundef nonnull align 8 dereferenceable(104) %18)
  br i1 %82, label %83, label %107

83:                                               ; preds = %79
  %84 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 8
  %85 = getelementptr inbounds %"struct.nv_dds::DDS_PIXELFORMAT", ptr %84, i32 0, i32 1
  store i32 4, ptr %85, align 4, !tbaa !36
  %86 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %18, i32 0, i32 0
  %87 = load i32, ptr %86, align 8, !tbaa !37
  %88 = icmp eq i32 %87, 33777
  br i1 %88, label %89, label %92

89:                                               ; preds = %83
  %90 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 8
  %91 = getelementptr inbounds %"struct.nv_dds::DDS_PIXELFORMAT", ptr %90, i32 0, i32 2
  store i32 827611204, ptr %91, align 4, !tbaa !38
  br label %92

92:                                               ; preds = %89, %83
  %93 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %18, i32 0, i32 0
  %94 = load i32, ptr %93, align 8, !tbaa !37
  %95 = icmp eq i32 %94, 33778
  br i1 %95, label %96, label %99

96:                                               ; preds = %92
  %97 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 8
  %98 = getelementptr inbounds %"struct.nv_dds::DDS_PIXELFORMAT", ptr %97, i32 0, i32 2
  store i32 861165636, ptr %98, align 4, !tbaa !38
  br label %99

99:                                               ; preds = %96, %92
  %100 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %18, i32 0, i32 0
  %101 = load i32, ptr %100, align 8, !tbaa !37
  %102 = icmp eq i32 %101, 33779
  br i1 %102, label %103, label %106

103:                                              ; preds = %99
  %104 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 8
  %105 = getelementptr inbounds %"struct.nv_dds::DDS_PIXELFORMAT", ptr %104, i32 0, i32 2
  store i32 894720068, ptr %105, align 4, !tbaa !38
  br label %106

106:                                              ; preds = %103, %99
  br label %137

107:                                              ; preds = %79
  %108 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %18, i32 0, i32 2
  %109 = load i32, ptr %108, align 8, !tbaa !32
  %110 = icmp eq i32 %109, 4
  %111 = zext i1 %110 to i64
  %112 = select i1 %110, i32 65, i32 64
  %113 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 8
  %114 = getelementptr inbounds %"struct.nv_dds::DDS_PIXELFORMAT", ptr %113, i32 0, i32 1
  store i32 %112, ptr %114, align 4, !tbaa !36
  %115 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %18, i32 0, i32 2
  %116 = load i32, ptr %115, align 8, !tbaa !32
  %117 = mul i32 %116, 8
  %118 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 8
  %119 = getelementptr inbounds %"struct.nv_dds::DDS_PIXELFORMAT", ptr %118, i32 0, i32 3
  store i32 %117, ptr %119, align 4, !tbaa !39
  %120 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 8
  %121 = getelementptr inbounds %"struct.nv_dds::DDS_PIXELFORMAT", ptr %120, i32 0, i32 4
  store i32 16711680, ptr %121, align 4, !tbaa !40
  %122 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 8
  %123 = getelementptr inbounds %"struct.nv_dds::DDS_PIXELFORMAT", ptr %122, i32 0, i32 5
  store i32 65280, ptr %123, align 4, !tbaa !41
  %124 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 8
  %125 = getelementptr inbounds %"struct.nv_dds::DDS_PIXELFORMAT", ptr %124, i32 0, i32 6
  store i32 255, ptr %125, align 4, !tbaa !42
  %126 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %18, i32 0, i32 2
  %127 = load i32, ptr %126, align 8, !tbaa !32
  %128 = icmp eq i32 %127, 4
  br i1 %128, label %129, label %136

129:                                              ; preds = %107
  %130 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 8
  %131 = getelementptr inbounds %"struct.nv_dds::DDS_PIXELFORMAT", ptr %130, i32 0, i32 1
  %132 = load i32, ptr %131, align 4, !tbaa !36
  %133 = or i32 %132, 1
  store i32 %133, ptr %131, align 4, !tbaa !36
  %134 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 8
  %135 = getelementptr inbounds %"struct.nv_dds::DDS_PIXELFORMAT", ptr %134, i32 0, i32 7
  store i32 -16777216, ptr %135, align 4, !tbaa !43
  br label %136

136:                                              ; preds = %129, %107
  br label %137

137:                                              ; preds = %136, %106
  %138 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 9
  store i32 4096, ptr %138, align 4, !tbaa !44
  %139 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %18, i32 0, i32 3
  %140 = load i32, ptr %139, align 4, !tbaa !23
  %141 = icmp eq i32 %140, 3
  br i1 %141, label %142, label %147

142:                                              ; preds = %137
  %143 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 9
  %144 = load i32, ptr %143, align 4, !tbaa !44
  %145 = or i32 %144, 8
  store i32 %145, ptr %143, align 4, !tbaa !44
  %146 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 10
  store i32 65024, ptr %146, align 4, !tbaa !45
  br label %147

147:                                              ; preds = %142, %137
  %148 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %18, i32 0, i32 3
  %149 = load i32, ptr %148, align 4, !tbaa !23
  %150 = icmp eq i32 %149, 2
  br i1 %150, label %151, label %156

151:                                              ; preds = %147
  %152 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 9
  %153 = load i32, ptr %152, align 4, !tbaa !44
  %154 = or i32 %153, 8
  store i32 %154, ptr %152, align 4, !tbaa !44
  %155 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 10
  store i32 2097152, ptr %155, align 4, !tbaa !45
  br label %156

156:                                              ; preds = %151, %147
  %157 = call noundef i32 @_ZN6nv_dds9CDDSImage15get_num_mipmapsEv(ptr noundef nonnull align 8 dereferenceable(104) %18)
  %158 = icmp ugt i32 %157, 0
  br i1 %158, label %159, label %163

159:                                              ; preds = %156
  %160 = getelementptr inbounds %"struct.nv_dds::DDS_HEADER", ptr %8, i32 0, i32 9
  %161 = load i32, ptr %160, align 4, !tbaa !44
  %162 = or i32 %161, 4194312
  store i32 %162, ptr %160, align 4, !tbaa !44
  br label %163

163:                                              ; preds = %159, %156
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  %164 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #9
  %165 = call noalias ptr @fopen(ptr noundef %164, ptr noundef @.str.20)
  store ptr %165, ptr %10, align 8, !tbaa !5
  %166 = load ptr, ptr %10, align 8, !tbaa !5
  %167 = icmp eq ptr %166, null
  br i1 %167, label %168, label %169

168:                                              ; preds = %163
  store i1 false, ptr %4, align 1
  store i32 1, ptr %11, align 4
  br label %249

169:                                              ; preds = %163
  %170 = load ptr, ptr %10, align 8, !tbaa !5
  %171 = call i64 @fwrite(ptr noundef @.str.15, i64 noundef 1, i64 noundef 4, ptr noundef %170)
  %172 = load ptr, ptr %10, align 8, !tbaa !5
  %173 = call i64 @fwrite(ptr noundef %8, i64 noundef 1, i64 noundef 124, ptr noundef %172)
  %174 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %18, i32 0, i32 3
  %175 = load i32, ptr %174, align 4, !tbaa !23
  %176 = icmp ne i32 %175, 3
  br i1 %176, label %177, label %191

177:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 112, ptr %12) #9
  %178 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %18, i32 0, i32 5
  %179 = call noundef nonnull align 8 dereferenceable(112) ptr @_ZNSt5dequeIN6nv_dds8CTextureESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %178, i64 noundef 0) #9
  call void @_ZN6nv_dds8CTextureC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(112) %12, ptr noundef nonnull align 8 dereferenceable(112) %179)
  %180 = load i8, ptr %7, align 1, !tbaa !9, !range !21, !noundef !22
  %181 = trunc i8 %180 to i1
  br i1 %181, label %182, label %188

182:                                              ; preds = %177
  invoke void @_ZN6nv_dds9CDDSImage12flip_textureERNS_8CTextureE(ptr noundef nonnull align 8 dereferenceable(104) %18, ptr noundef nonnull align 8 dereferenceable(112) %12)
          to label %183 unwind label %184

183:                                              ; preds = %182
  br label %188

184:                                              ; preds = %188, %182
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %13, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %14, align 4
  call void @_ZN6nv_dds8CTextureD1Ev(ptr noundef nonnull align 8 dereferenceable(112) %12) #9
  call void @llvm.lifetime.end.p0(i64 112, ptr %12) #9
  br label %251

188:                                              ; preds = %183, %177
  %189 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN6nv_dds9CDDSImage13write_textureERKNS_8CTextureEP8_IO_FILE(ptr noundef nonnull align 8 dereferenceable(104) %18, ptr noundef nonnull align 8 dereferenceable(112) %12, ptr noundef %189)
          to label %190 unwind label %184

190:                                              ; preds = %188
  call void @_ZN6nv_dds8CTextureD1Ev(ptr noundef nonnull align 8 dereferenceable(112) %12) #9
  call void @llvm.lifetime.end.p0(i64 112, ptr %12) #9
  br label %246

191:                                              ; preds = %169
  %192 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %18, i32 0, i32 5
  %193 = call noundef i64 @_ZNKSt5dequeIN6nv_dds8CTextureESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %192) #9
  %194 = icmp eq i64 %193, 6
  br i1 %194, label %195, label %196

195:                                              ; preds = %191
  br label %198

196:                                              ; preds = %191
  call void @__assert_fail(ptr noundef @.str.21, ptr noundef @.str.1, i32 noundef 645, ptr noundef @__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage4saveENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb) #8
  unreachable

197:                                              ; No predecessors!
  br label %198

198:                                              ; preds = %197, %195
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  store i32 0, ptr %15, align 4, !tbaa !24
  br label %199

199:                                              ; preds = %242, %198
  %200 = load i32, ptr %15, align 4, !tbaa !24
  %201 = zext i32 %200 to i64
  %202 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %18, i32 0, i32 5
  %203 = call noundef i64 @_ZNKSt5dequeIN6nv_dds8CTextureESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %202) #9
  %204 = icmp ult i64 %201, %203
  br i1 %204, label %206, label %205

205:                                              ; preds = %199
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  br label %245

206:                                              ; preds = %199
  call void @llvm.lifetime.start.p0(i64 112, ptr %16) #9
  call void @_ZN6nv_dds8CTextureC1Ev(ptr noundef nonnull align 8 dereferenceable(112) %16)
  %207 = load i32, ptr %15, align 4, !tbaa !24
  %208 = icmp eq i32 %207, 2
  br i1 %208, label %209, label %218

209:                                              ; preds = %206
  %210 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %18, i32 0, i32 5
  %211 = call noundef nonnull align 8 dereferenceable(112) ptr @_ZNSt5dequeIN6nv_dds8CTextureESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %210, i64 noundef 3) #9
  %212 = invoke noundef nonnull align 8 dereferenceable(112) ptr @_ZN6nv_dds8CTextureaSERKS0_(ptr noundef nonnull align 8 dereferenceable(112) %16, ptr noundef nonnull align 8 dereferenceable(112) %211)
          to label %213 unwind label %214

213:                                              ; preds = %209
  br label %234

214:                                              ; preds = %239, %237, %226, %221, %209
  %215 = landingpad { ptr, i32 }
          cleanup
  %216 = extractvalue { ptr, i32 } %215, 0
  store ptr %216, ptr %13, align 8
  %217 = extractvalue { ptr, i32 } %215, 1
  store i32 %217, ptr %14, align 4
  call void @_ZN6nv_dds8CTextureD1Ev(ptr noundef nonnull align 8 dereferenceable(112) %16) #9
  call void @llvm.lifetime.end.p0(i64 112, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  br label %251

218:                                              ; preds = %206
  %219 = load i32, ptr %15, align 4, !tbaa !24
  %220 = icmp eq i32 %219, 3
  br i1 %220, label %221, label %226

221:                                              ; preds = %218
  %222 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %18, i32 0, i32 5
  %223 = call noundef nonnull align 8 dereferenceable(112) ptr @_ZNSt5dequeIN6nv_dds8CTextureESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %222, i64 noundef 2) #9
  %224 = invoke noundef nonnull align 8 dereferenceable(112) ptr @_ZN6nv_dds8CTextureaSERKS0_(ptr noundef nonnull align 8 dereferenceable(112) %16, ptr noundef nonnull align 8 dereferenceable(112) %223)
          to label %225 unwind label %214

225:                                              ; preds = %221
  br label %233

226:                                              ; preds = %218
  %227 = getelementptr inbounds %"class.nv_dds::CDDSImage", ptr %18, i32 0, i32 5
  %228 = load i32, ptr %15, align 4, !tbaa !24
  %229 = zext i32 %228 to i64
  %230 = call noundef nonnull align 8 dereferenceable(112) ptr @_ZNSt5dequeIN6nv_dds8CTextureESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %227, i64 noundef %229) #9
  %231 = invoke noundef nonnull align 8 dereferenceable(112) ptr @_ZN6nv_dds8CTextureaSERKS0_(ptr noundef nonnull align 8 dereferenceable(112) %16, ptr noundef nonnull align 8 dereferenceable(112) %230)
          to label %232 unwind label %214

232:                                              ; preds = %226
  br label %233

233:                                              ; preds = %232, %225
  br label %234

234:                                              ; preds = %233, %213
  %235 = load i8, ptr %7, align 1, !tbaa !9, !range !21, !noundef !22
  %236 = trunc i8 %235 to i1
  br i1 %236, label %237, label %239

237:                                              ; preds = %234
  invoke void @_ZN6nv_dds9CDDSImage12flip_textureERNS_8CTextureE(ptr noundef nonnull align 8 dereferenceable(104) %18, ptr noundef nonnull align 8 dereferenceable(112) %16)
          to label %238 unwind label %214

238:                                              ; preds = %237
  br label %239

239:                                              ; preds = %238, %234
  %240 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN6nv_dds9CDDSImage13write_textureERKNS_8CTextureEP8_IO_FILE(ptr noundef nonnull align 8 dereferenceable(104) %18, ptr noundef nonnull align 8 dereferenceable(112) %16, ptr noundef %240)
          to label %241 unwind label %214

241:                                              ; preds = %239
  call void @_ZN6nv_dds8CTextureD1Ev(ptr noundef nonnull align 8 dereferenceable(112) %16) #9
  call void @llvm.lifetime.end.p0(i64 112, ptr %16) #9
  br label %242

242:                                              ; preds = %241
  %243 = load i32, ptr %15, align 4, !tbaa !24
  %244 = add i32 %243, 1
  store i32 %244, ptr %15, align 4, !tbaa !24
  br label %199, !llvm.loop !46

245:                                              ; preds = %205
  br label %246

246:                                              ; preds = %245, %190
  %247 = load ptr, ptr %10, align 8, !tbaa !5
  %248 = call i32 @fclose(ptr noundef %247)
  store i1 true, ptr %4, align 1
  store i32 1, ptr %11, align 4
  br label %249

249:                                              ; preds = %246, %168
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 124, ptr %8) #9
  %250 = load i1, ptr %4, align 1
  ret i1 %250

251:                                              ; preds = %214, %184
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 124, ptr %8) #9
  br label %252

252:                                              ; preds = %251
  %253 = load ptr, ptr %13, align 8
  %254 = load i32, ptr %14, align 4
  %255 = insertvalue { ptr, i32 } poison, ptr %253, 0
  %256 = insertvalue { ptr, i32 } %255, i32 %254, 1
  resume { ptr, i32 } %256
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN6nv_dds9CDDSImage10get_heightEv(ptr noundef nonnull align 8 dereferenceable(104)) #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN6nv_dds9CDDSImage9get_widthEv(ptr noundef nonnull align 8 dereferenceable(104)) #6 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6nv_dds9CDDSImage12flip_textureERNS_8CTextureE(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(112)) #5 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

declare void @_ZN6nv_dds8CTextureC1Ev(ptr)

declare void @_ZN6nv_dds8CTextureD1Ev(ptr)

declare void @_ZN6nv_dds8CTextureC1ERKS0_(ptr, ptr)

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 = { "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 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 #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 = { 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 #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { noreturn nounwind }
attributes #9 = { 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !10, i64 16}
!12 = !{!"_ZTSN6nv_dds9CDDSImageE", !13, i64 0, !13, i64 4, !13, i64 8, !14, i64 12, !10, i64 16, !15, i64 24}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSN6nv_dds11TextureTypeE", !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, !14, i64 12}
!24 = !{!13, !13, i64 0}
!25 = !{!26, !13, i64 0}
!26 = !{!"_ZTSN6nv_dds10DDS_HEADERE", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !7, i64 28, !27, i64 72, !13, i64 104, !13, i64 108, !7, i64 112}
!27 = !{!"_ZTSN6nv_dds15DDS_PIXELFORMATE", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28}
!28 = !{!26, !13, i64 4}
!29 = !{!26, !13, i64 8}
!30 = !{!26, !13, i64 12}
!31 = !{!26, !13, i64 16}
!32 = !{!12, !13, i64 8}
!33 = !{!26, !13, i64 20}
!34 = !{!26, !13, i64 24}
!35 = !{!26, !13, i64 72}
!36 = !{!26, !13, i64 76}
!37 = !{!12, !13, i64 0}
!38 = !{!26, !13, i64 80}
!39 = !{!26, !13, i64 84}
!40 = !{!26, !13, i64 88}
!41 = !{!26, !13, i64 92}
!42 = !{!26, !13, i64 96}
!43 = !{!26, !13, i64 100}
!44 = !{!26, !13, i64 104}
!45 = !{!26, !13, i64 108}
!46 = distinct !{!46, !47}
!47 = !{!"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"

%"struct.nv_dds::DDS_HEADER" = type { i32, i32, i32, i32, i32, i32, i32, [11 x i32], %"struct.nv_dds::DDS_PIXELFORMAT", i32, i32, [3 x i32] }
%"struct.nv_dds::DDS_PIXELFORMAT" = type { i32, i32, i32, i32, i32, i32, i32, i32 }
%"class.nv_dds::CTexture" = type { %"class.nv_dds::CSurface", %"class.std::deque.0" }
%"class.nv_dds::CSurface" = type { ptr, i32, i32, i32, i32, ptr }
%"class.std::deque.0" = type { %"class.std::_Deque_base.1" }
%"class.std::_Deque_base.1" = type { %"struct.std::_Deque_base<nv_dds::CSurface, std::allocator<nv_dds::CSurface>>::_Deque_impl" }
%"struct.std::_Deque_base<nv_dds::CSurface, std::allocator<nv_dds::CSurface>>::_Deque_impl" = type { %"struct.std::_Deque_base<nv_dds::CSurface, std::allocator<nv_dds::CSurface>>::_Deque_impl_data" }
%"struct.std::_Deque_base<nv_dds::CSurface, std::allocator<nv_dds::CSurface>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator.5", %"struct.std::_Deque_iterator.5" }
%"struct.std::_Deque_iterator.5" = type { ptr, ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [8 x i8], align 1
@__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage4saveENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb = external hidden unnamed_addr constant [48 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [21 x i8], align 1

; 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: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #2

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

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #2

; 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 #4 align 2

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) #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: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(112) ptr @_ZN6nv_dds8CTextureaSERKS0_(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6nv_dds9CDDSImage13write_textureERKNS_8CTextureEP8_IO_FILE(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(112), ptr noundef) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN6nv_dds9CDDSImage15get_num_mipmapsEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #6 align 2

; Function Attrs: nofree nounwind
declare noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6nv_dds9CDDSImage4saveENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef %1, i1 noundef zeroext %2) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"struct.nv_dds::DDS_HEADER", align 4
  %5 = alloca %"class.nv_dds::CTexture", align 8
  %6 = alloca %"class.nv_dds::CTexture", align 8
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = load i8, ptr %7, align 8, !tbaa !5, !range !19, !noundef !20
  %9 = trunc nuw i8 %8 to i1
  %.sink35.sroa.gep = getelementptr inbounds i8, ptr %4, i64 100
  %.sink35.sroa.gep43 = getelementptr inbounds i8, ptr %4, i64 80
  br i1 %9, label %11, label %10

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

11:                                               ; preds = %3
  %12 = getelementptr inbounds i8, ptr %0, i64 12
  %13 = load i32, ptr %12, align 4, !tbaa !21
  %.not = icmp eq i32 %13, 0
  br i1 %.not, label %14, label %15

14:                                               ; preds = %11
  tail call void @__assert_fail(ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.1, i32 noundef 548, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage4saveENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb) #8
  unreachable

15:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 124, ptr nonnull %4) #9
  %16 = getelementptr inbounds i8, ptr %4, i64 4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(124) %16, i8 0, i64 120, i1 false)
  store i32 124, ptr %4, align 4, !tbaa !22
  %17 = getelementptr inbounds i8, ptr %4, i64 4
  %18 = tail call noundef i32 @_ZN6nv_dds9CDDSImage10get_heightEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  %19 = getelementptr inbounds i8, ptr %4, i64 8
  store i32 %18, ptr %19, align 4, !tbaa !25
  %20 = tail call noundef i32 @_ZN6nv_dds9CDDSImage9get_widthEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  %21 = getelementptr inbounds i8, ptr %4, i64 12
  store i32 %20, ptr %21, align 4, !tbaa !26
  %22 = tail call noundef zeroext i1 @_ZN6nv_dds9CDDSImage13is_compressedEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  br i1 %22, label %23, label %25

23:                                               ; preds = %15
  store i32 528391, ptr %17, align 4, !tbaa !27
  %24 = tail call noundef i32 @_ZN6nv_dds9CDDSImage8get_sizeEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  br label %31

25:                                               ; preds = %15
  store i32 4111, ptr %17, align 4, !tbaa !27
  %26 = tail call noundef i32 @_ZN6nv_dds9CDDSImage9get_widthEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  %27 = getelementptr inbounds i8, ptr %0, i64 8
  %28 = load i32, ptr %27, align 8, !tbaa !28
  %29 = shl i32 %28, 3
  %30 = tail call noundef i32 @_ZN6nv_dds9CDDSImage26get_dword_aligned_linesizeEjj(ptr noundef nonnull align 8 dereferenceable(104) %0, i32 noundef %26, i32 noundef %29)
  br label %31

31:                                               ; preds = %25, %23
  %32 = phi i32 [ 528391, %23 ], [ 4111, %25 ]
  %.sink = phi i32 [ %24, %23 ], [ %30, %25 ]
  %33 = getelementptr inbounds i8, ptr %4, i64 16
  store i32 %.sink, ptr %33, align 4
  %34 = load i32, ptr %12, align 4, !tbaa !21
  %35 = icmp eq i32 %34, 2
  br i1 %35, label %36, label %40

36:                                               ; preds = %31
  %37 = or disjoint i32 %32, 8388608
  store i32 %37, ptr %17, align 4, !tbaa !27
  %38 = tail call noundef i32 @_ZN6nv_dds9CDDSImage9get_depthEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  %39 = getelementptr inbounds i8, ptr %4, i64 20
  store i32 %38, ptr %39, align 4, !tbaa !29
  br label %40

40:                                               ; preds = %36, %31
  %41 = phi i32 [ %37, %36 ], [ %32, %31 ]
  %42 = tail call noundef i32 @_ZN6nv_dds9CDDSImage15get_num_mipmapsEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  %.not23 = icmp eq i32 %42, 0
  br i1 %.not23, label %48, label %43

43:                                               ; preds = %40
  %44 = or i32 %41, 131072
  store i32 %44, ptr %17, align 4, !tbaa !27
  %45 = tail call noundef i32 @_ZN6nv_dds9CDDSImage15get_num_mipmapsEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  %46 = add i32 %45, 1
  %47 = getelementptr inbounds i8, ptr %4, i64 24
  store i32 %46, ptr %47, align 4, !tbaa !30
  br label %48

48:                                               ; preds = %43, %40
  %49 = getelementptr inbounds i8, ptr %4, i64 72
  store i32 32, ptr %49, align 4, !tbaa !31
  %50 = tail call noundef zeroext i1 @_ZN6nv_dds9CDDSImage13is_compressedEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  br i1 %50, label %51, label %55

51:                                               ; preds = %48
  %52 = getelementptr inbounds i8, ptr %4, i64 76
  store i32 4, ptr %52, align 4, !tbaa !32
  %53 = load i32, ptr %0, align 8, !tbaa !33
  %switch.tableidx = add i32 %53, -33777
  %54 = icmp ult i32 %switch.tableidx, 3
  br i1 %54, label %switch.lookup, label %.thread27

55:                                               ; preds = %48
  %56 = getelementptr inbounds i8, ptr %0, i64 8
  %57 = load i32, ptr %56, align 8, !tbaa !28
  %58 = icmp eq i32 %57, 4
  %59 = select i1 %58, i32 65, i32 64
  %60 = getelementptr inbounds i8, ptr %4, i64 76
  store i32 %59, ptr %60, align 4, !tbaa !32
  %61 = shl i32 %57, 3
  %62 = getelementptr inbounds i8, ptr %4, i64 84
  store i32 %61, ptr %62, align 4, !tbaa !34
  %63 = getelementptr inbounds i8, ptr %4, i64 88
  store i32 16711680, ptr %63, align 4, !tbaa !35
  %64 = getelementptr inbounds i8, ptr %4, i64 92
  store i32 65280, ptr %64, align 4, !tbaa !36
  %65 = getelementptr inbounds i8, ptr %4, i64 96
  store i32 255, ptr %65, align 4, !tbaa !37
  br i1 %58, label %66, label %.thread27

66:                                               ; preds = %55
  store i32 65, ptr %60, align 4, !tbaa !32
  br label %.thread27.sink.split

switch.lookup:                                    ; preds = %51
  %switch.idx.mult = shl nuw nsw i32 %switch.tableidx, 25
  %switch.offset = or disjoint i32 %switch.idx.mult, 827611204
  br label %.thread27.sink.split

.thread27.sink.split:                             ; preds = %switch.lookup, %66
  %.sink35.sroa.phi = phi ptr [ %.sink35.sroa.gep, %66 ], [ %.sink35.sroa.gep43, %switch.lookup ]
  %.sink33 = phi i32 [ -16777216, %66 ], [ %switch.offset, %switch.lookup ]
  store i32 %.sink33, ptr %.sink35.sroa.phi, align 4, !tbaa !38
  br label %.thread27

.thread27:                                        ; preds = %51, %.thread27.sink.split, %55
  %67 = getelementptr inbounds i8, ptr %4, i64 104
  store i32 4096, ptr %67, align 4, !tbaa !39
  %68 = load i32, ptr %12, align 4, !tbaa !21
  switch i32 %68, label %71 [
    i32 3, label %.sink.split
    i32 2, label %69
  ]

69:                                               ; preds = %.thread27
  br label %.sink.split

.sink.split:                                      ; preds = %.thread27, %69
  %.sink36 = phi i32 [ 2097152, %69 ], [ 65024, %.thread27 ]
  store i32 4104, ptr %67, align 4, !tbaa !39
  %70 = getelementptr inbounds i8, ptr %4, i64 108
  store i32 %.sink36, ptr %70, align 4, !tbaa !40
  br label %71

71:                                               ; preds = %.sink.split, %.thread27
  %72 = tail call noundef i32 @_ZN6nv_dds9CDDSImage15get_num_mipmapsEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  %.not24 = icmp eq i32 %72, 0
  br i1 %.not24, label %74, label %73

73:                                               ; preds = %71
  store i32 4198408, ptr %67, align 4, !tbaa !39
  br label %74

74:                                               ; preds = %73, %71
  %75 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #9
  %76 = tail call noalias ptr @fopen(ptr noundef %75, ptr noundef nonnull @.str.20)
  %77 = icmp ne ptr %76, null
  br i1 %77, label %78, label %123

78:                                               ; preds = %74
  %79 = tail call i64 @fwrite(ptr noundef nonnull @.str.15, i64 noundef 1, i64 noundef 4, ptr noundef nonnull %76)
  %80 = call i64 @fwrite(ptr noundef nonnull %4, i64 noundef 1, i64 noundef 124, ptr noundef nonnull %76)
  %81 = load i32, ptr %12, align 4, !tbaa !21
  %.not25 = icmp eq i32 %81, 3
  br i1 %.not25, label %90, label %82

82:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %5) #9
  %83 = getelementptr inbounds i8, ptr %0, i64 24
  %84 = tail call noundef nonnull align 8 dereferenceable(112) ptr @_ZNSt5dequeIN6nv_dds8CTextureESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %83, i64 noundef 0) #9
  call void @_ZN6nv_dds8CTextureC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(112) %5, ptr noundef nonnull align 8 dereferenceable(112) %84)
  br i1 %2, label %85, label %88

85:                                               ; preds = %82
  invoke void @_ZN6nv_dds9CDDSImage12flip_textureERNS_8CTextureE(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 8 dereferenceable(112) %5)
          to label %88 unwind label %86

86:                                               ; preds = %88, %85
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6nv_dds8CTextureD1Ev(ptr noundef nonnull align 8 dereferenceable(112) %5) #9
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %5) #9
  br label %124

88:                                               ; preds = %85, %82
  invoke void @_ZN6nv_dds9CDDSImage13write_textureERKNS_8CTextureEP8_IO_FILE(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 8 dereferenceable(112) %5, ptr noundef nonnull %76)
          to label %89 unwind label %86

89:                                               ; preds = %88
  call void @_ZN6nv_dds8CTextureD1Ev(ptr noundef nonnull align 8 dereferenceable(112) %5) #9
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %5) #9
  br label %.loopexit

90:                                               ; preds = %78
  %91 = getelementptr inbounds i8, ptr %0, i64 24
  %92 = tail call noundef i64 @_ZNKSt5dequeIN6nv_dds8CTextureESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %91) #9
  %93 = icmp eq i64 %92, 6
  br i1 %93, label %.preheader, label %108

.preheader:                                       ; preds = %90
  %94 = tail call noundef i64 @_ZNKSt5dequeIN6nv_dds8CTextureESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %91) #9
  %.not30 = icmp eq i64 %94, 0
  br i1 %.not30, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  br i1 %2, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %102
  %95 = phi i64 [ %104, %102 ], [ 0, %.lr.ph ]
  %.029.us = phi i32 [ %103, %102 ], [ 0, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %6) #9
  call void @_ZN6nv_dds8CTextureC1Ev(ptr noundef nonnull align 8 dereferenceable(112) %6)
  switch i32 %.029.us, label %97 [
    i32 2, label %96
    i32 3, label %.invoke
  ]

96:                                               ; preds = %.lr.ph.split.us
  br label %.invoke

97:                                               ; preds = %.lr.ph.split.us
  br label %.invoke

.invoke:                                          ; preds = %.lr.ph.split.us, %96, %97
  %.sink40 = phi i64 [ 3, %96 ], [ %95, %97 ], [ 2, %.lr.ph.split.us ]
  %98 = call noundef nonnull align 8 dereferenceable(112) ptr @_ZNSt5dequeIN6nv_dds8CTextureESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %91, i64 noundef %.sink40) #9
  %99 = invoke noundef nonnull align 8 dereferenceable(112) ptr @_ZN6nv_dds8CTextureaSERKS0_(ptr noundef nonnull align 8 dereferenceable(112) %6, ptr noundef nonnull align 8 dereferenceable(112) %98)
          to label %100 unwind label %.split.us

100:                                              ; preds = %.invoke
  invoke void @_ZN6nv_dds9CDDSImage12flip_textureERNS_8CTextureE(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 8 dereferenceable(112) %6)
          to label %101 unwind label %.split.us

101:                                              ; preds = %100
  invoke void @_ZN6nv_dds9CDDSImage13write_textureERKNS_8CTextureEP8_IO_FILE(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 8 dereferenceable(112) %6, ptr noundef nonnull %76)
          to label %102 unwind label %.split.us

102:                                              ; preds = %101
  call void @_ZN6nv_dds8CTextureD1Ev(ptr noundef nonnull align 8 dereferenceable(112) %6) #9
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %6) #9
  %103 = add i32 %.029.us, 1
  %104 = zext i32 %103 to i64
  %105 = call noundef i64 @_ZNKSt5dequeIN6nv_dds8CTextureESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %91) #9
  %106 = icmp ugt i64 %105, %104
  br i1 %106, label %.lr.ph.split.us, label %.loopexit, !llvm.loop !41

.split.us:                                        ; preds = %.invoke, %101, %100
  %107 = landingpad { ptr, i32 }
          cleanup
  br label %111

108:                                              ; preds = %90
  tail call void @__assert_fail(ptr noundef nonnull @.str.21, ptr noundef nonnull @.str.1, i32 noundef 645, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6nv_dds9CDDSImage4saveENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb) #8
  unreachable

.lr.ph.split:                                     ; preds = %.lr.ph, %117
  %109 = phi i64 [ %119, %117 ], [ 0, %.lr.ph ]
  %.029 = phi i32 [ %118, %117 ], [ 0, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %6) #9
  call void @_ZN6nv_dds8CTextureC1Ev(ptr noundef nonnull align 8 dereferenceable(112) %6)
  switch i32 %.029, label %113 [
    i32 2, label %.invoke38
    i32 3, label %112
  ]

.split:                                           ; preds = %.invoke38, %116
  %110 = landingpad { ptr, i32 }
          cleanup
  br label %111

111:                                              ; preds = %.split.us, %.split
  %.us-phi = phi { ptr, i32 } [ %110, %.split ], [ %107, %.split.us ]
  call void @_ZN6nv_dds8CTextureD1Ev(ptr noundef nonnull align 8 dereferenceable(112) %6) #9
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %6) #9
  br label %124

112:                                              ; preds = %.lr.ph.split
  br label %.invoke38

113:                                              ; preds = %.lr.ph.split
  br label %.invoke38

.invoke38:                                        ; preds = %.lr.ph.split, %112, %113
  %.sink39 = phi i64 [ 2, %112 ], [ %109, %113 ], [ 3, %.lr.ph.split ]
  %114 = call noundef nonnull align 8 dereferenceable(112) ptr @_ZNSt5dequeIN6nv_dds8CTextureESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %91, i64 noundef %.sink39) #9
  %115 = invoke noundef nonnull align 8 dereferenceable(112) ptr @_ZN6nv_dds8CTextureaSERKS0_(ptr noundef nonnull align 8 dereferenceable(112) %6, ptr noundef nonnull align 8 dereferenceable(112) %114)
          to label %116 unwind label %.split

116:                                              ; preds = %.invoke38
  invoke void @_ZN6nv_dds9CDDSImage13write_textureERKNS_8CTextureEP8_IO_FILE(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 8 dereferenceable(112) %6, ptr noundef nonnull %76)
          to label %117 unwind label %.split

117:                                              ; preds = %116
  call void @_ZN6nv_dds8CTextureD1Ev(ptr noundef nonnull align 8 dereferenceable(112) %6) #9
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %6) #9
  %118 = add i32 %.029, 1
  %119 = zext i32 %118 to i64
  %120 = call noundef i64 @_ZNKSt5dequeIN6nv_dds8CTextureESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %91) #9
  %121 = icmp ugt i64 %120, %119
  br i1 %121, label %.lr.ph.split, label %.loopexit, !llvm.loop !41

.loopexit:                                        ; preds = %117, %102, %.preheader, %89
  %122 = call i32 @fclose(ptr noundef nonnull %76)
  br label %123

123:                                              ; preds = %74, %.loopexit
  call void @llvm.lifetime.end.p0(i64 124, ptr nonnull %4) #9
  ret i1 %77

124:                                              ; preds = %111, %86
  %.pn = phi { ptr, i32 } [ %87, %86 ], [ %.us-phi, %111 ]
  call void @llvm.lifetime.end.p0(i64 124, ptr nonnull %4) #9
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN6nv_dds9CDDSImage10get_heightEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN6nv_dds9CDDSImage9get_widthEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #6 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6nv_dds9CDDSImage12flip_textureERNS_8CTextureE(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #5 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

declare void @_ZN6nv_dds8CTextureC1Ev(ptr) local_unnamed_addr

declare void @_ZN6nv_dds8CTextureD1Ev(ptr) local_unnamed_addr

declare void @_ZN6nv_dds8CTextureC1ERKS0_(ptr, ptr) local_unnamed_addr

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 = { nofree 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 #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 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 #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 = { 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 #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { noreturn nounwind }
attributes #9 = { 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 = !{!6, !10, i64 12}
!22 = !{!23, !7, i64 0}
!23 = !{!"_ZTSN6nv_dds10DDS_HEADERE", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !8, i64 28, !24, i64 72, !7, i64 104, !7, i64 108, !8, i64 112}
!24 = !{!"_ZTSN6nv_dds15DDS_PIXELFORMATE", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28}
!25 = !{!23, !7, i64 8}
!26 = !{!23, !7, i64 12}
!27 = !{!23, !7, i64 4}
!28 = !{!6, !7, i64 8}
!29 = !{!23, !7, i64 20}
!30 = !{!23, !7, i64 24}
!31 = !{!23, !7, i64 72}
!32 = !{!23, !7, i64 76}
!33 = !{!6, !7, i64 0}
!34 = !{!23, !7, i64 84}
!35 = !{!23, !7, i64 88}
!36 = !{!23, !7, i64 92}
!37 = !{!23, !7, i64 96}
!38 = !{!7, !7, i64 0}
!39 = !{!23, !7, i64 104}
!40 = !{!23, !7, i64 108}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: BDCEPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,SROAPass,SimplifyCFGPass,TailCallElimPass