; LLVM IR from facebookresearch/habitat-sim :: src/deps/basis-universal/encoder (basisu_frontend)

; 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.basisu::gpu_image" = type { i32, i32, i32, i32, i32, i32, i32, i32, %"class.basisu::vector.96" }
%"class.basisu::vector.96" = type { ptr, i32, i32 }
%"class.basisu::image" = type { i32, i32, i32, %"class.basisu::vector.87" }
%"class.basisu::vector.87" = type { ptr, i32, i32 }

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #0

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 dereferenceable(4) ptr @_ZNK6basisu15basisu_frontend35get_endpoint_cluster_unscaled_colorEjb(ptr noundef nonnull align 8 dereferenceable(496), i32 noundef, i1 noundef zeroext) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6basisu15basisu_frontend32get_endpoint_cluster_inten_tableEjb(ptr noundef nonnull align 8 dereferenceable(496), i32 noundef, i1 noundef zeroext) #4 align 2

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

declare noundef zeroext i1 @_ZN6basisu8save_pngEPKcRKNS_5imageEjj(ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) #5

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6basisu15basisu_frontend13get_diff_flagEj(ptr noundef nonnull align 8 dereferenceable(496), i32 noundef) #4 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6basisu15basisu_frontend16dump_debug_imageEPKcjjjb(ptr noundef nonnull align 8 dereferenceable(496) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i1 noundef zeroext %5) #3 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca %"class.basisu::gpu_image", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i8, align 1
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca %"class.basisu::image", align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !9
  store i32 %3, ptr %10, align 4, !tbaa !9
  store i32 %4, ptr %11, align 4, !tbaa !9
  %26 = zext i1 %5 to i8
  store i8 %26, ptr %12, align 1, !tbaa !11
  %27 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr %13) #7
  call void @_ZN6basisu9gpu_imageC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13)
  %28 = load i32, ptr %10, align 4, !tbaa !9
  %29 = mul i32 %28, 4
  %30 = load i32, ptr %11, align 4, !tbaa !9
  %31 = mul i32 %30, 4
  invoke void @_ZN6basisu9gpu_image4initENS_14texture_formatEjj(ptr noundef nonnull align 8 dereferenceable(48) %13, i32 noundef 0, i32 noundef %29, i32 noundef %31)
          to label %32 unwind label %38

32:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %160, %32
  %34 = load i32, ptr %16, align 4, !tbaa !9
  %35 = load i32, ptr %11, align 4, !tbaa !9
  %36 = icmp ult i32 %34, %35
  br i1 %36, label %42, label %37

37:                                               ; preds = %33
  store i32 2, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %163

38:                                               ; preds = %6
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %14, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %15, align 4
  br label %179

42:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %43

43:                                               ; preds = %155, %42
  %44 = load i32, ptr %18, align 4, !tbaa !9
  %45 = load i32, ptr %10, align 4, !tbaa !9
  %46 = icmp ult i32 %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  store i32 5, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %159

48:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %49 = load i32, ptr %9, align 4, !tbaa !9
  %50 = load i32, ptr %18, align 4, !tbaa !9
  %51 = add i32 %49, %50
  %52 = load i32, ptr %16, align 4, !tbaa !9
  %53 = load i32, ptr %10, align 4, !tbaa !9
  %54 = mul i32 %52, %53
  %55 = add i32 %51, %54
  store i32 %55, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %56 = load i32, ptr %18, align 4, !tbaa !9
  %57 = load i32, ptr %16, align 4, !tbaa !9
  %58 = invoke noundef ptr @_ZN6basisu9gpu_image13get_block_ptrEjjj(ptr noundef nonnull align 8 dereferenceable(48) %13, i32 noundef %56, i32 noundef %57, i32 noundef 0)
          to label %59 unwind label %67

59:                                               ; preds = %48
  store ptr %58, ptr %20, align 8, !tbaa !5
  %60 = load i8, ptr %12, align 1, !tbaa !11, !range !13, !noundef !14
  %61 = trunc i8 %60 to i1
  br i1 %61, label %62, label %71

62:                                               ; preds = %59
  %63 = load i32, ptr %19, align 4, !tbaa !9
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6basisu15basisu_frontend16get_output_blockEj(ptr noundef nonnull align 8 dereferenceable(496) %27, i32 noundef %63)
          to label %65 unwind label %67

65:                                               ; preds = %62
  %66 = load ptr, ptr %20, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %66, ptr align 8 %64, i64 8, i1 false), !tbaa.struct !15
  br label %154

67:                                               ; preds = %62, %48
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %14, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %15, align 4
  br label %158

71:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #7
  %72 = load i32, ptr %19, align 4, !tbaa !9
  %73 = invoke noundef zeroext i1 @_ZNK6basisu15basisu_frontend13get_diff_flagEj(ptr noundef nonnull align 8 dereferenceable(496) %27, i32 noundef %72)
          to label %74 unwind label %99

74:                                               ; preds = %71
  %75 = zext i1 %73 to i8
  store i8 %75, ptr %21, align 1, !tbaa !11
  %76 = load ptr, ptr %20, align 8, !tbaa !5
  %77 = load i8, ptr %21, align 1, !tbaa !11, !range !13, !noundef !14
  %78 = trunc i8 %77 to i1
  invoke void @_ZN6basisu9etc_block12set_diff_bitEb(ptr noundef nonnull align 8 dereferenceable(8) %76, i1 noundef zeroext %78)
          to label %79 unwind label %99

79:                                               ; preds = %74
  %80 = load ptr, ptr %20, align 8, !tbaa !5
  invoke void @_ZN6basisu9etc_block12set_flip_bitEb(ptr noundef nonnull align 8 dereferenceable(8) %80, i1 noundef zeroext true)
          to label %81 unwind label %99

81:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %82 = load i32, ptr %19, align 4, !tbaa !9
  %83 = invoke noundef i32 @_ZNK6basisu15basisu_frontend35get_subblock_endpoint_cluster_indexEjj(ptr noundef nonnull align 8 dereferenceable(496) %27, i32 noundef %82, i32 noundef 0)
          to label %84 unwind label %103

84:                                               ; preds = %81
  store i32 %83, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %85 = load i32, ptr %19, align 4, !tbaa !9
  %86 = invoke noundef i32 @_ZNK6basisu15basisu_frontend35get_subblock_endpoint_cluster_indexEjj(ptr noundef nonnull align 8 dereferenceable(496) %27, i32 noundef %85, i32 noundef 1)
          to label %87 unwind label %107

87:                                               ; preds = %84
  store i32 %86, ptr %23, align 4, !tbaa !9
  %88 = load i8, ptr %21, align 1, !tbaa !11, !range !13, !noundef !14
  %89 = trunc i8 %88 to i1
  br i1 %89, label %90, label %111

90:                                               ; preds = %87
  %91 = load ptr, ptr %20, align 8, !tbaa !5
  %92 = load i32, ptr %22, align 4, !tbaa !9
  %93 = invoke noundef nonnull align 1 dereferenceable(4) ptr @_ZNK6basisu15basisu_frontend35get_endpoint_cluster_unscaled_colorEjb(ptr noundef nonnull align 8 dereferenceable(496) %27, i32 noundef %92, i1 noundef zeroext false)
          to label %94 unwind label %107

94:                                               ; preds = %90
  %95 = load i32, ptr %23, align 4, !tbaa !9
  %96 = invoke noundef nonnull align 1 dereferenceable(4) ptr @_ZNK6basisu15basisu_frontend35get_endpoint_cluster_unscaled_colorEjb(ptr noundef nonnull align 8 dereferenceable(496) %27, i32 noundef %95, i1 noundef zeroext false)
          to label %97 unwind label %107

97:                                               ; preds = %94
  invoke void @_ZN6basisu9etc_block16set_block_color5ERKNS_10color_rgbaES3_(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef nonnull align 1 dereferenceable(4) %93, ptr noundef nonnull align 1 dereferenceable(4) %96)
          to label %98 unwind label %107

98:                                               ; preds = %97
  br label %120

99:                                               ; preds = %79, %74, %71
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %14, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %15, align 4
  br label %153

103:                                              ; preds = %81
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %14, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %15, align 4
  br label %152

107:                                              ; preds = %135, %128, %127, %120, %118, %115, %111, %97, %94, %90, %84
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %14, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %15, align 4
  br label %151

111:                                              ; preds = %87
  %112 = load ptr, ptr %20, align 8, !tbaa !5
  %113 = load i32, ptr %22, align 4, !tbaa !9
  %114 = invoke noundef nonnull align 1 dereferenceable(4) ptr @_ZNK6basisu15basisu_frontend35get_endpoint_cluster_unscaled_colorEjb(ptr noundef nonnull align 8 dereferenceable(496) %27, i32 noundef %113, i1 noundef zeroext true)
          to label %115 unwind label %107

115:                                              ; preds = %111
  %116 = load i32, ptr %23, align 4, !tbaa !9
  %117 = invoke noundef nonnull align 1 dereferenceable(4) ptr @_ZNK6basisu15basisu_frontend35get_endpoint_cluster_unscaled_colorEjb(ptr noundef nonnull align 8 dereferenceable(496) %27, i32 noundef %116, i1 noundef zeroext true)
          to label %118 unwind label %107

118:                                              ; preds = %115
  invoke void @_ZN6basisu9etc_block16set_block_color4ERKNS_10color_rgbaES3_(ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef nonnull align 1 dereferenceable(4) %114, ptr noundef nonnull align 1 dereferenceable(4) %117)
          to label %119 unwind label %107

119:                                              ; preds = %118
  br label %120

120:                                              ; preds = %119, %98
  %121 = load ptr, ptr %20, align 8, !tbaa !5
  %122 = load i32, ptr %22, align 4, !tbaa !9
  %123 = load i8, ptr %21, align 1, !tbaa !11, !range !13, !noundef !14
  %124 = trunc i8 %123 to i1
  %125 = xor i1 %124, true
  %126 = invoke noundef i32 @_ZNK6basisu15basisu_frontend32get_endpoint_cluster_inten_tableEjb(ptr noundef nonnull align 8 dereferenceable(496) %27, i32 noundef %122, i1 noundef zeroext %125)
          to label %127 unwind label %107

127:                                              ; preds = %120
  invoke void @_ZN6basisu9etc_block15set_inten_tableEjj(ptr noundef nonnull align 8 dereferenceable(8) %121, i32 noundef 0, i32 noundef %126)
          to label %128 unwind label %107

128:                                              ; preds = %127
  %129 = load ptr, ptr %20, align 8, !tbaa !5
  %130 = load i32, ptr %23, align 4, !tbaa !9
  %131 = load i8, ptr %21, align 1, !tbaa !11, !range !13, !noundef !14
  %132 = trunc i8 %131 to i1
  %133 = xor i1 %132, true
  %134 = invoke noundef i32 @_ZNK6basisu15basisu_frontend32get_endpoint_cluster_inten_tableEjb(ptr noundef nonnull align 8 dereferenceable(496) %27, i32 noundef %130, i1 noundef zeroext %133)
          to label %135 unwind label %107

135:                                              ; preds = %128
  invoke void @_ZN6basisu9etc_block15set_inten_tableEjj(ptr noundef nonnull align 8 dereferenceable(8) %129, i32 noundef 1, i32 noundef %134)
          to label %136 unwind label %107

136:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %137 = load i32, ptr %19, align 4, !tbaa !9
  %138 = invoke noundef i32 @_ZNK6basisu15basisu_frontend32get_block_selector_cluster_indexEj(ptr noundef nonnull align 8 dereferenceable(496) %27, i32 noundef %137)
          to label %139 unwind label %147

139:                                              ; preds = %136
  store i32 %138, ptr %24, align 4, !tbaa !9
  %140 = load ptr, ptr %20, align 8, !tbaa !5
  %141 = load i32, ptr %24, align 4, !tbaa !9
  %142 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6basisu15basisu_frontend34get_selector_cluster_selector_bitsEj(ptr noundef nonnull align 8 dereferenceable(496) %27, i32 noundef %141)
          to label %143 unwind label %147

143:                                              ; preds = %139
  %144 = invoke noundef i32 @_ZNK6basisu9etc_block21get_raw_selector_bitsEv(ptr noundef nonnull align 8 dereferenceable(8) %142)
          to label %145 unwind label %147

145:                                              ; preds = %143
  invoke void @_ZN6basisu9etc_block21set_raw_selector_bitsEj(ptr noundef nonnull align 8 dereferenceable(8) %140, i32 noundef %144)
          to label %146 unwind label %147

146:                                              ; preds = %145
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #7
  br label %154

147:                                              ; preds = %145, %143, %139, %136
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %14, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %151

151:                                              ; preds = %147, %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %152

152:                                              ; preds = %151, %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %153

153:                                              ; preds = %152, %99
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #7
  br label %158

154:                                              ; preds = %146, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %155

155:                                              ; preds = %154
  %156 = load i32, ptr %18, align 4, !tbaa !9
  %157 = add i32 %156, 1
  store i32 %157, ptr %18, align 4, !tbaa !9
  br label %43, !llvm.loop !17

158:                                              ; preds = %153, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %179

159:                                              ; preds = %47
  br label %160

160:                                              ; preds = %159
  %161 = load i32, ptr %16, align 4, !tbaa !9
  %162 = add i32 %161, 1
  store i32 %162, ptr %16, align 4, !tbaa !9
  br label %33, !llvm.loop !19

163:                                              ; preds = %37
  call void @llvm.lifetime.start.p0(i64 32, ptr %25) #7
  invoke void @_ZN6basisu5imageC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25)
          to label %164 unwind label %170

164:                                              ; preds = %163
  %165 = invoke noundef zeroext i1 @_ZNK6basisu9gpu_image6unpackERNS_5imageE(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 8 dereferenceable(32) %25)
          to label %166 unwind label %174

166:                                              ; preds = %164
  %167 = load ptr, ptr %8, align 8, !tbaa !5
  %168 = invoke noundef zeroext i1 @_ZN6basisu8save_pngEPKcRKNS_5imageEjj(ptr noundef %167, ptr noundef nonnull align 8 dereferenceable(32) %25, i32 noundef 0, i32 noundef 0)
          to label %169 unwind label %174

169:                                              ; preds = %166
  call void @_ZN6basisu5imageD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #7
  call void @_ZN6basisu9gpu_imageD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #7
  ret void

170:                                              ; preds = %163
  %171 = landingpad { ptr, i32 }
          cleanup
  %172 = extractvalue { ptr, i32 } %171, 0
  store ptr %172, ptr %14, align 8
  %173 = extractvalue { ptr, i32 } %171, 1
  store i32 %173, ptr %15, align 4
  br label %178

174:                                              ; preds = %166, %164
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %14, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %15, align 4
  call void @_ZN6basisu5imageD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #7
  br label %178

178:                                              ; preds = %174, %170
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #7
  br label %179

179:                                              ; preds = %178, %158, %38
  call void @_ZN6basisu9gpu_imageD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #7
  br label %180

180:                                              ; preds = %179
  %181 = load ptr, ptr %14, align 8
  %182 = load i32, ptr %15, align 4
  %183 = insertvalue { ptr, i32 } poison, ptr %181, 0
  %184 = insertvalue { ptr, i32 } %183, i32 %182, 1
  resume { ptr, i32 } %184
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu9gpu_image4initENS_14texture_formatEjj(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef, i32 noundef, i32 noundef) #3 align 2

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

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

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

declare noundef zeroext i1 @_ZNK6basisu9gpu_image6unpackERNS_5imageE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) #5

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

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 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 = { 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 = { "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 = { 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, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{i64 0, i64 8, !16}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.basisu::gpu_image" = type { i32, i32, i32, i32, i32, i32, i32, i32, %"class.basisu::vector.96" }
%"class.basisu::vector.96" = type { ptr, i32, i32 }
%"class.basisu::image" = type { i32, i32, i32, %"class.basisu::vector.87" }
%"class.basisu::vector.87" = type { ptr, i32, i32 }

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 dereferenceable(4) ptr @_ZNK6basisu15basisu_frontend35get_endpoint_cluster_unscaled_colorEjb(ptr noundef nonnull align 8 dereferenceable(496), i32 noundef, i1 noundef zeroext) local_unnamed_addr #2 align 2

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

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

declare noundef zeroext i1 @_ZN6basisu8save_pngEPKcRKNS_5imageEjj(ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) local_unnamed_addr #4

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6basisu15basisu_frontend16dump_debug_imageEPKcjjjb(ptr noundef nonnull align 8 dereferenceable(496) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i1 noundef zeroext %5) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca %"class.basisu::gpu_image", align 8
  %8 = alloca %"class.basisu::image", align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %7) #6
  call void @_ZN6basisu9gpu_imageC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7)
  %9 = shl i32 %3, 2
  %10 = shl i32 %4, 2
  invoke void @_ZN6basisu9gpu_image4initENS_14texture_formatEjj(ptr noundef nonnull align 8 dereferenceable(48) %7, i32 noundef 0, i32 noundef %9, i32 noundef %10)
          to label %.preheader56 unwind label %58

.preheader56:                                     ; preds = %6
  %.not = icmp eq i32 %4, 0
  %.not76 = icmp eq i32 %3, 0
  %or.cond = or i1 %.not, %.not76
  br i1 %or.cond, label %._crit_edge60, label %.preheader.lr.ph.split.us

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

.preheader.us.us:                                 ; preds = %.preheader.lr.ph.split.us, %._crit_edge.split.us.us.us
  %.04758.us.us = phi i32 [ %20, %._crit_edge.split.us.us.us ], [ 0, %.preheader.lr.ph.split.us ]
  %11 = mul i32 %.04758.us.us, %3
  %12 = add i32 %11, %2
  br label %13

13:                                               ; preds = %15, %.preheader.us.us
  %.04857.us.us.us = phi i32 [ 0, %.preheader.us.us ], [ %19, %15 ]
  %14 = invoke noundef ptr @_ZN6basisu9gpu_image13get_block_ptrEjjj(ptr noundef nonnull align 8 dereferenceable(48) %7, i32 noundef %.04857.us.us.us, i32 noundef %.04758.us.us, i32 noundef 0)
          to label %15 unwind label %.split.us.split.us.split.us

15:                                               ; preds = %13
  %16 = add i32 %12, %.04857.us.us.us
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6basisu15basisu_frontend16get_output_blockEj(ptr noundef nonnull align 8 dereferenceable(496) %0, i32 noundef %16)
  %18 = load i64, ptr %17, align 8, !tbaa !5
  store i64 %18, ptr %14, align 8, !tbaa !5
  %19 = add nuw i32 %.04857.us.us.us, 1
  %exitcond80.not = icmp eq i32 %19, %3
  br i1 %exitcond80.not, label %._crit_edge.split.us.us.us, label %13, !llvm.loop !8

._crit_edge.split.us.us.us:                       ; preds = %15
  %20 = add nuw i32 %.04758.us.us, 1
  %exitcond81.not = icmp eq i32 %20, %4
  br i1 %exitcond81.not, label %._crit_edge60, label %.preheader.us.us, !llvm.loop !10

.split.us.split.us.split.us:                      ; preds = %13
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %70

.preheader.us:                                    ; preds = %.preheader.lr.ph.split.us, %._crit_edge.split.us62
  %.04758.us = phi i32 [ %53, %._crit_edge.split.us62 ], [ 0, %.preheader.lr.ph.split.us ]
  %22 = mul i32 %.04758.us, %3
  %23 = add i32 %22, %2
  br label %24

24:                                               ; preds = %.preheader.us, %50
  %.04857.us61 = phi i32 [ 0, %.preheader.us ], [ %52, %50 ]
  %25 = add i32 %23, %.04857.us61
  %26 = invoke noundef ptr @_ZN6basisu9gpu_image13get_block_ptrEjjj(ptr noundef nonnull align 8 dereferenceable(48) %7, i32 noundef %.04857.us61, i32 noundef %.04758.us, i32 noundef 0)
          to label %27 unwind label %.split.split.us

27:                                               ; preds = %24
  %28 = call noundef zeroext i1 @_ZNK6basisu15basisu_frontend13get_diff_flagEj(ptr noundef nonnull align 8 dereferenceable(496) %0, i32 noundef %25)
  call void @_ZN6basisu9etc_block12set_diff_bitEb(ptr noundef nonnull align 8 dereferenceable(8) %26, i1 noundef zeroext %28)
  call void @_ZN6basisu9etc_block12set_flip_bitEb(ptr noundef nonnull align 8 dereferenceable(8) %26, i1 noundef zeroext true)
  %29 = invoke noundef i32 @_ZNK6basisu15basisu_frontend35get_subblock_endpoint_cluster_indexEjj(ptr noundef nonnull align 8 dereferenceable(496) %0, i32 noundef %25, i32 noundef 0)
          to label %30 unwind label %.split66.us

30:                                               ; preds = %27
  %31 = invoke noundef i32 @_ZNK6basisu15basisu_frontend35get_subblock_endpoint_cluster_indexEjj(ptr noundef nonnull align 8 dereferenceable(496) %0, i32 noundef %25, i32 noundef 1)
          to label %32 unwind label %.split69.us

32:                                               ; preds = %30
  br i1 %28, label %38, label %33

33:                                               ; preds = %32
  %34 = invoke noundef nonnull align 1 dereferenceable(4) ptr @_ZNK6basisu15basisu_frontend35get_endpoint_cluster_unscaled_colorEjb(ptr noundef nonnull align 8 dereferenceable(496) %0, i32 noundef %29, i1 noundef zeroext true)
          to label %35 unwind label %.split69.us

35:                                               ; preds = %33
  %36 = invoke noundef nonnull align 1 dereferenceable(4) ptr @_ZNK6basisu15basisu_frontend35get_endpoint_cluster_unscaled_colorEjb(ptr noundef nonnull align 8 dereferenceable(496) %0, i32 noundef %31, i1 noundef zeroext true)
          to label %37 unwind label %.split69.us

37:                                               ; preds = %35
  invoke void @_ZN6basisu9etc_block16set_block_color4ERKNS_10color_rgbaES3_(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 1 dereferenceable(4) %34, ptr noundef nonnull align 1 dereferenceable(4) %36)
          to label %43 unwind label %.split69.us

38:                                               ; preds = %32
  %39 = invoke noundef nonnull align 1 dereferenceable(4) ptr @_ZNK6basisu15basisu_frontend35get_endpoint_cluster_unscaled_colorEjb(ptr noundef nonnull align 8 dereferenceable(496) %0, i32 noundef %29, i1 noundef zeroext false)
          to label %40 unwind label %.split69.us

40:                                               ; preds = %38
  %41 = invoke noundef nonnull align 1 dereferenceable(4) ptr @_ZNK6basisu15basisu_frontend35get_endpoint_cluster_unscaled_colorEjb(ptr noundef nonnull align 8 dereferenceable(496) %0, i32 noundef %31, i1 noundef zeroext false)
          to label %42 unwind label %.split69.us

42:                                               ; preds = %40
  invoke void @_ZN6basisu9etc_block16set_block_color5ERKNS_10color_rgbaES3_(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 1 dereferenceable(4) %39, ptr noundef nonnull align 1 dereferenceable(4) %41)
          to label %43 unwind label %.split69.us

43:                                               ; preds = %42, %37
  %44 = xor i1 %28, true
  %45 = call noundef i32 @_ZNK6basisu15basisu_frontend32get_endpoint_cluster_inten_tableEjb(ptr noundef nonnull align 8 dereferenceable(496) %0, i32 noundef %29, i1 noundef zeroext %44)
  call void @_ZN6basisu9etc_block15set_inten_tableEjj(ptr noundef nonnull align 8 dereferenceable(8) %26, i32 noundef 0, i32 noundef %45)
  %46 = call noundef i32 @_ZNK6basisu15basisu_frontend32get_endpoint_cluster_inten_tableEjb(ptr noundef nonnull align 8 dereferenceable(496) %0, i32 noundef %31, i1 noundef zeroext %44)
  call void @_ZN6basisu9etc_block15set_inten_tableEjj(ptr noundef nonnull align 8 dereferenceable(8) %26, i32 noundef 1, i32 noundef %46)
  %47 = invoke noundef i32 @_ZNK6basisu15basisu_frontend32get_block_selector_cluster_indexEj(ptr noundef nonnull align 8 dereferenceable(496) %0, i32 noundef %25)
          to label %48 unwind label %.split72.us

48:                                               ; preds = %43
  %49 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6basisu15basisu_frontend34get_selector_cluster_selector_bitsEj(ptr noundef nonnull align 8 dereferenceable(496) %0, i32 noundef %47)
          to label %50 unwind label %.split72.us

50:                                               ; preds = %48
  %51 = call noundef i32 @_ZNK6basisu9etc_block21get_raw_selector_bitsEv(ptr noundef nonnull align 8 dereferenceable(8) %49)
  call void @_ZN6basisu9etc_block21set_raw_selector_bitsEj(ptr noundef nonnull align 8 dereferenceable(8) %26, i32 noundef %51)
  %52 = add nuw i32 %.04857.us61, 1
  %exitcond.not = icmp eq i32 %52, %3
  br i1 %exitcond.not, label %._crit_edge.split.us62, label %24, !llvm.loop !8

._crit_edge.split.us62:                           ; preds = %50
  %53 = add nuw i32 %.04758.us, 1
  %exitcond79.not = icmp eq i32 %53, %4
  br i1 %exitcond79.not, label %._crit_edge60, label %.preheader.us, !llvm.loop !10

.split.split.us:                                  ; preds = %24
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %70

.split66.us:                                      ; preds = %27
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %70

.split69.us:                                      ; preds = %42, %40, %38, %37, %35, %33, %30
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %70

.split72.us:                                      ; preds = %48, %43
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %70

._crit_edge60:                                    ; preds = %._crit_edge.split.us62, %._crit_edge.split.us.us.us, %.preheader56
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #6
  invoke void @_ZN6basisu5imageC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %60 unwind label %65

58:                                               ; preds = %6
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %70

60:                                               ; preds = %._crit_edge60
  %61 = invoke noundef zeroext i1 @_ZNK6basisu9gpu_image6unpackERNS_5imageE(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %62 unwind label %67

62:                                               ; preds = %60
  %63 = invoke noundef zeroext i1 @_ZN6basisu8save_pngEPKcRKNS_5imageEjj(ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef 0, i32 noundef 0)
          to label %64 unwind label %67

64:                                               ; preds = %62
  call void @_ZN6basisu5imageD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  call void @_ZN6basisu9gpu_imageD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #6
  ret void

65:                                               ; preds = %._crit_edge60
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %69

67:                                               ; preds = %62, %60
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6basisu5imageD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  br label %69

69:                                               ; preds = %67, %65
  %.pn = phi { ptr, i32 } [ %68, %67 ], [ %66, %65 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  br label %70

70:                                               ; preds = %.split.split.us, %.split.us.split.us.split.us, %.split69.us, %.split72.us, %.split66.us, %69, %58
  %.pn51.pn.pn.pn = phi { ptr, i32 } [ %.pn, %69 ], [ %59, %58 ], [ %55, %.split66.us ], [ %57, %.split72.us ], [ %56, %.split69.us ], [ %54, %.split.split.us ], [ %21, %.split.us.split.us.split.us ]
  call void @_ZN6basisu9gpu_imageD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #6
  resume { ptr, i32 } %.pn51.pn.pn.pn
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN6basisu9gpu_image13get_block_ptrEjjj(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #5 align 2

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

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

declare noundef zeroext i1 @_ZNK6basisu9gpu_image6unpackERNS_5imageE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = { "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 = { 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 #6 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass