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

; 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.basist::etc1_selector_palette_entry" = type { [16 x i8] }
%"class.basisu::basisu_backend" = type { ptr, %"struct.basisu::basisu_backend_params", %"class.basisu::vector", %"struct.basisu::basisu_backend_output", ptr, %"class.basisu::vector.6", %"class.basisu::vector.8", %"class.basisu::vector.10", %"class.basisu::vector.12", %"class.basisu::vector.14", %"class.basisu::vector.14", %"class.basisu::vector.16", %"class.basisu::vector.16", %"class.basisu::vector.14", %"class.basisu::vector.14" }
%"struct.basisu::basisu_backend_params" = type <{ i8, i8, i8, i8, float, float, i32, i8, [3 x i8], i32, i32, i8, i8, [2 x i8] }>
%"class.basisu::vector" = type { ptr, i32, i32 }
%"struct.basisu::basisu_backend_output" = type { i32, i8, i8, i8, i32, i32, %"class.basisu::vector.0", %"class.basisu::vector.0", %"class.basisu::vector", %"class.basisu::vector.0", %"class.basisu::vector.2", %"class.basisu::vector.4" }
%"class.basisu::vector.0" = type { ptr, i32, i32 }
%"class.basisu::vector.2" = type { ptr, i32, i32 }
%"class.basisu::vector.4" = type { ptr, i32, i32 }
%"class.basisu::vector.6" = type { ptr, i32, i32 }
%"class.basisu::vector.8" = type { ptr, i32, i32 }
%"class.basisu::vector.10" = type { ptr, i32, i32 }
%"class.basisu::vector.12" = type { ptr, i32, i32 }
%"class.basisu::vector.16" = type { ptr, i32, i32 }
%"class.basisu::vector.14" = type { ptr, i32, i32 }
%"struct.basist::etc1_global_selector_codebook_entry_id" = type <{ i32, %"class.basist::etc1_global_palette_entry_modifier", [3 x i8] }>
%"class.basist::etc1_global_palette_entry_modifier" = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
%"struct.basisu::basisu_backend::etc1_global_selector_cb_entry_desc" = type { i32, i32, i8 }

@.str.5 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [114 x i8], align 1
@__PRETTY_FUNCTION__._ZN6basisu14basisu_backend23create_selector_paletteEv = external hidden unnamed_addr constant [55 x i8], align 1

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

; 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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6basisu14basisu_backend23create_selector_paletteEv(ptr noundef nonnull align 8 dereferenceable(336) %0) #2 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.basist::etc1_selector_palette_entry", align 1
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %20 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %21 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %20, i32 0, i32 0
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  store ptr %22, ptr %3, align 8, !tbaa !5
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = call noundef i32 @_ZNK6basisu15basisu_frontend27get_total_selector_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %23)
  %25 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %20, i32 0, i32 3
  %26 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %25, i32 0, i32 5
  store i32 %24, ptr %26, align 4, !tbaa !27
  %27 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %20, i32 0, i32 6
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = call noundef i32 @_ZNK6basisu15basisu_frontend27get_total_selector_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %28)
  %30 = zext i32 %29 to i64
  call void @_ZN6basisu6vectorIN6basist27etc1_selector_palette_entryEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16) %27, i64 noundef %30, i1 noundef zeroext false)
  %31 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %20, i32 0, i32 1
  %32 = getelementptr inbounds %"struct.basisu::basisu_backend_params", ptr %31, i32 0, i32 7
  %33 = load i8, ptr %32, align 8, !tbaa !28, !range !29, !noundef !30
  %34 = trunc i8 %33 to i1
  br i1 %34, label %35, label %191

35:                                               ; preds = %1
  %36 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %20, i32 0, i32 7
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = call noundef i32 @_ZNK6basisu15basisu_frontend27get_total_selector_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %37)
  %39 = zext i32 %38 to i64
  call void @_ZN6basisu6vectorINS_14basisu_backend34etc1_global_selector_cb_entry_descEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16) %36, i64 noundef %39, i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !31
  br label %40

40:                                               ; preds = %187, %35
  %41 = load i32, ptr %4, align 4, !tbaa !31
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = call noundef i32 @_ZNK6basisu15basisu_frontend27get_total_selector_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %42)
  %44 = icmp slt i32 %41, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %40
  store i32 2, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %190

46:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %47 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %20, i32 0, i32 6
  %48 = load i32, ptr %4, align 4, !tbaa !31
  %49 = sext i32 %48 to i64
  %50 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZN6basisu6vectorIN6basist27etc1_selector_palette_entryEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %47, i64 noundef %49)
  store ptr %50, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %51 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %20, i32 0, i32 7
  %52 = load i32, ptr %4, align 4, !tbaa !31
  %53 = sext i32 %52 to i64
  %54 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu6vectorINS_14basisu_backend34etc1_global_selector_cb_entry_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %51, i64 noundef %53)
  store ptr %54, ptr %7, align 8, !tbaa !5
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6basisu15basisu_frontend46get_selector_cluster_global_selector_entry_idsEv(ptr noundef nonnull align 8 dereferenceable(496) %55)
  %57 = load i32, ptr %4, align 4, !tbaa !31
  %58 = sext i32 %57 to i64
  %59 = call noundef nonnull align 4 dereferenceable(17) ptr @_ZNK6basisu6vectorIN6basist38etc1_global_selector_codebook_entry_idEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %56, i64 noundef %58)
  %60 = getelementptr inbounds %"struct.basist::etc1_global_selector_codebook_entry_id", ptr %59, i32 0, i32 0
  %61 = load i32, ptr %60, align 4, !tbaa !32
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.basisu::basisu_backend::etc1_global_selector_cb_entry_desc", ptr %62, i32 0, i32 0
  store i32 %61, ptr %63, align 4, !tbaa !35
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6basisu15basisu_frontend46get_selector_cluster_global_selector_entry_idsEv(ptr noundef nonnull align 8 dereferenceable(496) %64)
  %66 = load i32, ptr %4, align 4, !tbaa !31
  %67 = sext i32 %66 to i64
  %68 = call noundef nonnull align 4 dereferenceable(17) ptr @_ZNK6basisu6vectorIN6basist38etc1_global_selector_codebook_entry_idEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %65, i64 noundef %67)
  %69 = getelementptr inbounds %"struct.basist::etc1_global_selector_codebook_entry_id", ptr %68, i32 0, i32 1
  %70 = call noundef i32 @_ZNK6basist34etc1_global_palette_entry_modifier9get_indexEv(ptr noundef nonnull align 1 dereferenceable(13) %69)
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.basisu::basisu_backend::etc1_global_selector_cb_entry_desc", ptr %71, i32 0, i32 1
  store i32 %70, ptr %72, align 4, !tbaa !37
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.basisu::basisu_backend::etc1_global_selector_cb_entry_desc", ptr %73, i32 0, i32 2
  store i8 1, ptr %74, align 4, !tbaa !38
  %75 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %20, i32 0, i32 1
  %76 = getelementptr inbounds %"struct.basisu::basisu_backend_params", ptr %75, i32 0, i32 11
  %77 = load i8, ptr %76, align 4, !tbaa !39, !range !29, !noundef !30
  %78 = trunc i8 %77 to i1
  br i1 %78, label %79, label %90

79:                                               ; preds = %46
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6basisu15basisu_frontend39get_selector_cluster_uses_global_cb_vecEv(ptr noundef nonnull align 8 dereferenceable(496) %80)
  %82 = load i32, ptr %4, align 4, !tbaa !31
  %83 = sext i32 %82 to i64
  %84 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu6vectorIbEixEm(ptr noundef nonnull align 8 dereferenceable(16) %81, i64 noundef %83)
  %85 = load i8, ptr %84, align 1, !tbaa !40, !range !29, !noundef !30
  %86 = trunc i8 %85 to i1
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.basisu::basisu_backend::etc1_global_selector_cb_entry_desc", ptr %87, i32 0, i32 2
  %89 = zext i1 %86 to i8
  store i8 %89, ptr %88, align 4, !tbaa !38
  br label %90

90:                                               ; preds = %79, %46
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.basisu::basisu_backend::etc1_global_selector_cb_entry_desc", ptr %91, i32 0, i32 2
  %93 = load i8, ptr %92, align 4, !tbaa !38, !range !29, !noundef !30
  %94 = trunc i8 %93 to i1
  br i1 %94, label %95, label %153

95:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = load i32, ptr %4, align 4, !tbaa !31
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6basisu15basisu_frontend34get_selector_cluster_selector_bitsEj(ptr noundef nonnull align 8 dereferenceable(496) %96, i32 noundef %97)
  store ptr %98, ptr %8, align 8, !tbaa !5
  %99 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  %100 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %20, i32 0, i32 4
  %101 = load ptr, ptr %100, align 8, !tbaa !41
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6basisu15basisu_frontend46get_selector_cluster_global_selector_entry_idsEv(ptr noundef nonnull align 8 dereferenceable(496) %102)
  %104 = load i32, ptr %4, align 4, !tbaa !31
  %105 = sext i32 %104 to i64
  %106 = call noundef nonnull align 4 dereferenceable(17) ptr @_ZNK6basisu6vectorIN6basist38etc1_global_selector_codebook_entry_idEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %103, i64 noundef %105)
  %107 = call { i64, i64 } @_ZNK6basist29etc1_global_selector_codebook9get_entryERKNS_38etc1_global_selector_codebook_entry_idE(ptr noundef nonnull align 8 dereferenceable(16) %101, ptr noundef nonnull align 4 dereferenceable(17) %106)
  %108 = getelementptr inbounds %"struct.basist::etc1_selector_palette_entry", ptr %9, i32 0, i32 0
  %109 = getelementptr inbounds { i64, i64 }, ptr %108, i32 0, i32 0
  %110 = extractvalue { i64, i64 } %107, 0
  store i64 %110, ptr %109, align 1
  %111 = getelementptr inbounds { i64, i64 }, ptr %108, i32 0, i32 1
  %112 = extractvalue { i64, i64 } %107, 1
  store i64 %112, ptr %111, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !31
  br label %113

113:                                              ; preds = %149, %95
  %114 = load i32, ptr %10, align 4, !tbaa !31
  %115 = icmp ult i32 %114, 4
  br i1 %115, label %117, label %116

116:                                              ; preds = %113
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %152

117:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !31
  br label %118

118:                                              ; preds = %145, %117
  %119 = load i32, ptr %11, align 4, !tbaa !31
  %120 = icmp ult i32 %119, 4
  br i1 %120, label %122, label %121

121:                                              ; preds = %118
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %148

122:                                              ; preds = %118
  %123 = load i32, ptr %11, align 4, !tbaa !31
  %124 = load i32, ptr %10, align 4, !tbaa !31
  %125 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryclEjj(ptr noundef nonnull align 1 dereferenceable(16) %9, i32 noundef %123, i32 noundef %124)
  %126 = load i8, ptr %125, align 1, !tbaa !42
  %127 = load ptr, ptr %6, align 8, !tbaa !5
  %128 = load i32, ptr %11, align 4, !tbaa !31
  %129 = load i32, ptr %10, align 4, !tbaa !31
  %130 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryclEjj(ptr noundef nonnull align 1 dereferenceable(16) %127, i32 noundef %128, i32 noundef %129)
  store i8 %126, ptr %130, align 1, !tbaa !42
  %131 = load ptr, ptr %8, align 8, !tbaa !5
  %132 = load i32, ptr %11, align 4, !tbaa !31
  %133 = load i32, ptr %10, align 4, !tbaa !31
  %134 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %131, i32 noundef %132, i32 noundef %133)
  %135 = load i32, ptr %11, align 4, !tbaa !31
  %136 = load i32, ptr %10, align 4, !tbaa !31
  %137 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryclEjj(ptr noundef nonnull align 1 dereferenceable(16) %9, i32 noundef %135, i32 noundef %136)
  %138 = load i8, ptr %137, align 1, !tbaa !42
  %139 = zext i8 %138 to i32
  %140 = icmp eq i32 %134, %139
  br i1 %140, label %141, label %142

141:                                              ; preds = %122
  br label %144

142:                                              ; preds = %122
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.6, i32 noundef 138, ptr noundef @__PRETTY_FUNCTION__._ZN6basisu14basisu_backend23create_selector_paletteEv) #7
  unreachable

143:                                              ; No predecessors!
  br label %144

144:                                              ; preds = %143, %141
  br label %145

145:                                              ; preds = %144
  %146 = load i32, ptr %11, align 4, !tbaa !31
  %147 = add i32 %146, 1
  store i32 %147, ptr %11, align 4, !tbaa !31
  br label %118, !llvm.loop !43

148:                                              ; preds = %121
  br label %149

149:                                              ; preds = %148
  %150 = load i32, ptr %10, align 4, !tbaa !31
  %151 = add i32 %150, 1
  store i32 %151, ptr %10, align 4, !tbaa !31
  br label %113, !llvm.loop !45

152:                                              ; preds = %116
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %186

153:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %154 = load ptr, ptr %3, align 8, !tbaa !5
  %155 = load i32, ptr %4, align 4, !tbaa !31
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6basisu15basisu_frontend34get_selector_cluster_selector_bitsEj(ptr noundef nonnull align 8 dereferenceable(496) %154, i32 noundef %155)
  store ptr %156, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !31
  br label %157

157:                                              ; preds = %182, %153
  %158 = load i32, ptr %13, align 4, !tbaa !31
  %159 = icmp ult i32 %158, 4
  br i1 %159, label %161, label %160

160:                                              ; preds = %157
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %185

161:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !31
  br label %162

162:                                              ; preds = %178, %161
  %163 = load i32, ptr %14, align 4, !tbaa !31
  %164 = icmp ult i32 %163, 4
  br i1 %164, label %166, label %165

165:                                              ; preds = %162
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %181

166:                                              ; preds = %162
  %167 = load ptr, ptr %12, align 8, !tbaa !5
  %168 = load i32, ptr %14, align 4, !tbaa !31
  %169 = load i32, ptr %13, align 4, !tbaa !31
  %170 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %167, i32 noundef %168, i32 noundef %169)
  %171 = trunc i32 %170 to i8
  %172 = load ptr, ptr %6, align 8, !tbaa !5
  %173 = load i32, ptr %13, align 4, !tbaa !31
  %174 = mul i32 %173, 4
  %175 = load i32, ptr %14, align 4, !tbaa !31
  %176 = add i32 %174, %175
  %177 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %172, i32 noundef %176)
  store i8 %171, ptr %177, align 1, !tbaa !42
  br label %178

178:                                              ; preds = %166
  %179 = load i32, ptr %14, align 4, !tbaa !31
  %180 = add i32 %179, 1
  store i32 %180, ptr %14, align 4, !tbaa !31
  br label %162, !llvm.loop !46

181:                                              ; preds = %165
  br label %182

182:                                              ; preds = %181
  %183 = load i32, ptr %13, align 4, !tbaa !31
  %184 = add i32 %183, 1
  store i32 %184, ptr %13, align 4, !tbaa !31
  br label %157, !llvm.loop !47

185:                                              ; preds = %160
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %186

186:                                              ; preds = %185, %152
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %187

187:                                              ; preds = %186
  %188 = load i32, ptr %4, align 4, !tbaa !31
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %4, align 4, !tbaa !31
  br label %40, !llvm.loop !48

190:                                              ; preds = %45
  br label %239

191:                                              ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !31
  br label %192

192:                                              ; preds = %235, %191
  %193 = load i32, ptr %15, align 4, !tbaa !31
  %194 = load ptr, ptr %3, align 8, !tbaa !5
  %195 = call noundef i32 @_ZNK6basisu15basisu_frontend27get_total_selector_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %194)
  %196 = icmp ult i32 %193, %195
  br i1 %196, label %198, label %197

197:                                              ; preds = %192
  store i32 17, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %238

198:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %199 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %20, i32 0, i32 6
  %200 = load i32, ptr %15, align 4, !tbaa !31
  %201 = zext i32 %200 to i64
  %202 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZN6basisu6vectorIN6basist27etc1_selector_palette_entryEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %199, i64 noundef %201)
  store ptr %202, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %203 = load ptr, ptr %3, align 8, !tbaa !5
  %204 = load i32, ptr %15, align 4, !tbaa !31
  %205 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6basisu15basisu_frontend34get_selector_cluster_selector_bitsEj(ptr noundef nonnull align 8 dereferenceable(496) %203, i32 noundef %204)
  store ptr %205, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !31
  br label %206

206:                                              ; preds = %231, %198
  %207 = load i32, ptr %18, align 4, !tbaa !31
  %208 = icmp ult i32 %207, 4
  br i1 %208, label %210, label %209

209:                                              ; preds = %206
  store i32 20, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %234

210:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !31
  br label %211

211:                                              ; preds = %227, %210
  %212 = load i32, ptr %19, align 4, !tbaa !31
  %213 = icmp ult i32 %212, 4
  br i1 %213, label %215, label %214

214:                                              ; preds = %211
  store i32 23, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %230

215:                                              ; preds = %211
  %216 = load ptr, ptr %17, align 8, !tbaa !5
  %217 = load i32, ptr %19, align 4, !tbaa !31
  %218 = load i32, ptr %18, align 4, !tbaa !31
  %219 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %216, i32 noundef %217, i32 noundef %218)
  %220 = trunc i32 %219 to i8
  %221 = load ptr, ptr %16, align 8, !tbaa !5
  %222 = load i32, ptr %18, align 4, !tbaa !31
  %223 = mul i32 %222, 4
  %224 = load i32, ptr %19, align 4, !tbaa !31
  %225 = add i32 %223, %224
  %226 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %221, i32 noundef %225)
  store i8 %220, ptr %226, align 1, !tbaa !42
  br label %227

227:                                              ; preds = %215
  %228 = load i32, ptr %19, align 4, !tbaa !31
  %229 = add i32 %228, 1
  store i32 %229, ptr %19, align 4, !tbaa !31
  br label %211, !llvm.loop !49

230:                                              ; preds = %214
  br label %231

231:                                              ; preds = %230
  %232 = load i32, ptr %18, align 4, !tbaa !31
  %233 = add i32 %232, 1
  store i32 %233, ptr %18, align 4, !tbaa !31
  br label %206, !llvm.loop !50

234:                                              ; preds = %209
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %235

235:                                              ; preds = %234
  %236 = load i32, ptr %15, align 4, !tbaa !31
  %237 = add i32 %236, 1
  store i32 %237, ptr %15, align 4, !tbaa !31
  br label %192, !llvm.loop !51

238:                                              ; preds = %197
  br label %239

239:                                              ; preds = %238, %190
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  ret void
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(16) ptr @_ZN6basisu6vectorIN6basist27etc1_selector_palette_entryEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu6vectorINS_14basisu_backend34etc1_global_selector_cb_entry_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6basisu15basisu_frontend46get_selector_cluster_global_selector_entry_idsEv(ptr noundef nonnull align 8 dereferenceable(496)) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(17) ptr @_ZNK6basisu6vectorIN6basist38etc1_global_selector_codebook_entry_idEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6basist34etc1_global_palette_entry_modifier9get_indexEv(ptr noundef nonnull align 1 dereferenceable(13)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6basisu15basisu_frontend39get_selector_cluster_uses_global_cb_vecEv(ptr noundef nonnull align 8 dereferenceable(496)) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu6vectorIbEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #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) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZNK6basist29etc1_global_selector_codebook9get_entryERKNS_38etc1_global_selector_codebook_entry_idE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(17)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryclEjj(ptr noundef nonnull align 1 dereferenceable(16), i32 noundef, i32 noundef) #0 align 2

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16), i32 noundef) #0 align 2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = { 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 #6 = { nounwind }
attributes #7 = { noreturn 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, !6, i64 0}
!10 = !{!"_ZTSN6basisu14basisu_backendE", !6, i64 0, !11, i64 8, !15, i64 40, !16, i64 56, !6, i64 168, !21, i64 176, !22, i64 192, !23, i64 208, !24, i64 224, !25, i64 240, !25, i64 256, !26, i64 272, !26, i64 288, !25, i64 304, !25, i64 320}
!11 = !{!"_ZTSN6basisu21basisu_backend_paramsE", !12, i64 0, !12, i64 1, !12, i64 2, !13, i64 4, !13, i64 8, !14, i64 12, !12, i64 16, !14, i64 20, !14, i64 24, !12, i64 28, !12, i64 29}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSN6basisu6vectorINS_25basisu_backend_slice_descEEE", !6, i64 0, !14, i64 8, !14, i64 12}
!16 = !{!"_ZTSN6basisu21basisu_backend_outputE", !17, i64 0, !12, i64 4, !12, i64 5, !12, i64 6, !14, i64 8, !14, i64 12, !18, i64 16, !18, i64 32, !15, i64 48, !18, i64 64, !19, i64 80, !20, i64 96}
!17 = !{!"_ZTSN6basist16basis_tex_formatE", !7, i64 0}
!18 = !{!"_ZTSN6basisu6vectorIhEE", !6, i64 0, !14, i64 8, !14, i64 12}
!19 = !{!"_ZTSN6basisu6vectorINS0_IhEEEE", !6, i64 0, !14, i64 8, !14, i64 12}
!20 = !{!"_ZTSN6basisu6vectorItEE", !6, i64 0, !14, i64 8, !14, i64 12}
!21 = !{!"_ZTSN6basisu6vectorINS_27etc1_endpoint_palette_entryEEE", !6, i64 0, !14, i64 8, !14, i64 12}
!22 = !{!"_ZTSN6basisu6vectorIN6basist27etc1_selector_palette_entryEEE", !6, i64 0, !14, i64 8, !14, i64 12}
!23 = !{!"_ZTSN6basisu6vectorINS_14basisu_backend34etc1_global_selector_cb_entry_descEEE", !6, i64 0, !14, i64 8, !14, i64 12}
!24 = !{!"_ZTSN6basisu6vectorINS_8vector2DINS_13encoder_blockEEEEE", !6, i64 0, !14, i64 8, !14, i64 12}
!25 = !{!"_ZTSN6basisu6vectorIjEE", !6, i64 0, !14, i64 8, !14, i64 12}
!26 = !{!"_ZTSN6basisu6vectorIbEE", !6, i64 0, !14, i64 8, !14, i64 12}
!27 = !{!10, !14, i64 68}
!28 = !{!10, !12, i64 24}
!29 = !{i8 0, i8 2}
!30 = !{}
!31 = !{!14, !14, i64 0}
!32 = !{!33, !14, i64 0}
!33 = !{!"_ZTSN6basist38etc1_global_selector_codebook_entry_idE", !14, i64 0, !34, i64 4}
!34 = !{!"_ZTSN6basist34etc1_global_palette_entry_modifierE", !7, i64 0, !12, i64 1, !12, i64 2, !12, i64 3, !12, i64 4, !12, i64 5, !12, i64 6, !12, i64 7, !12, i64 8, !12, i64 9, !12, i64 10, !12, i64 11, !7, i64 12}
!35 = !{!36, !14, i64 0}
!36 = !{!"_ZTSN6basisu14basisu_backend34etc1_global_selector_cb_entry_descE", !14, i64 0, !14, i64 4, !12, i64 8}
!37 = !{!36, !14, i64 4}
!38 = !{!36, !12, i64 8}
!39 = !{!10, !12, i64 36}
!40 = !{!12, !12, i64 0}
!41 = !{!10, !6, i64 168}
!42 = !{!7, !7, i64 0}
!43 = distinct !{!43, !44}
!44 = !{!"llvm.loop.mustprogress"}
!45 = distinct !{!45, !44}
!46 = distinct !{!46, !44}
!47 = distinct !{!47, !44}
!48 = distinct !{!48, !44}
!49 = distinct !{!49, !44}
!50 = distinct !{!50, !44}
!51 = distinct !{!51, !44}


; 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.basist::etc1_selector_palette_entry" = type { [16 x i8] }

@.str.5 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [114 x i8], align 1
@__PRETTY_FUNCTION__._ZN6basisu14basisu_backend23create_selector_paletteEv = external hidden unnamed_addr constant [55 x i8], align 1

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

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

; 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 uwtable
define dso_local void @_ZN6basisu14basisu_backend23create_selector_paletteEv(ptr noundef nonnull align 8 dereferenceable(336) %0) local_unnamed_addr #2 align 2 {
  %2 = alloca %"struct.basist::etc1_selector_palette_entry", align 8
  %3 = load ptr, ptr %0, align 8, !tbaa !5
  %4 = tail call noundef i32 @_ZNK6basisu15basisu_frontend27get_total_selector_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %3)
  %5 = getelementptr inbounds i8, ptr %0, i64 68
  store i32 %4, ptr %5, align 4, !tbaa !26
  %6 = getelementptr inbounds i8, ptr %0, i64 192
  %7 = tail call noundef i32 @_ZNK6basisu15basisu_frontend27get_total_selector_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %3)
  %8 = zext i32 %7 to i64
  tail call void @_ZN6basisu6vectorIN6basist27etc1_selector_palette_entryEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %8, i1 noundef zeroext false)
  %9 = getelementptr inbounds i8, ptr %0, i64 24
  %10 = load i8, ptr %9, align 8, !tbaa !27, !range !28, !noundef !29
  %11 = trunc nuw i8 %10 to i1
  br i1 %11, label %13, label %.preheader76

.preheader76:                                     ; preds = %1
  %12 = tail call noundef i32 @_ZNK6basisu15basisu_frontend27get_total_selector_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %3)
  %.not = icmp eq i32 %12, 0
  br i1 %.not, label %.loopexit74, label %.lr.ph

13:                                               ; preds = %1
  %14 = getelementptr inbounds i8, ptr %0, i64 208
  %15 = tail call noundef i32 @_ZNK6basisu15basisu_frontend27get_total_selector_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %3)
  %16 = zext i32 %15 to i64
  tail call void @_ZN6basisu6vectorINS_14basisu_backend34etc1_global_selector_cb_entry_descEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16) %14, i64 noundef %16, i1 noundef zeroext false)
  %17 = tail call noundef i32 @_ZNK6basisu15basisu_frontend27get_total_selector_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %3)
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph86, label %.loopexit74

.lr.ph86:                                         ; preds = %13
  %19 = getelementptr inbounds i8, ptr %0, i64 36
  %20 = getelementptr inbounds i8, ptr %0, i64 168
  %21 = getelementptr inbounds i8, ptr %2, i64 8
  br label %22

22:                                               ; preds = %.lr.ph86, %.loopexit
  %indvars.iv89 = phi i64 [ 0, %.lr.ph86 ], [ %indvars.iv.next90, %.loopexit ]
  %23 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZN6basisu6vectorIN6basist27etc1_selector_palette_entryEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %indvars.iv89)
  %24 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu6vectorINS_14basisu_backend34etc1_global_selector_cb_entry_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %14, i64 noundef %indvars.iv89)
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6basisu15basisu_frontend46get_selector_cluster_global_selector_entry_idsEv(ptr noundef nonnull align 8 dereferenceable(496) %3)
  %26 = call noundef nonnull align 4 dereferenceable(17) ptr @_ZNK6basisu6vectorIN6basist38etc1_global_selector_codebook_entry_idEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %25, i64 noundef %indvars.iv89)
  %27 = load i32, ptr %26, align 4, !tbaa !30
  store i32 %27, ptr %24, align 4, !tbaa !33
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6basisu15basisu_frontend46get_selector_cluster_global_selector_entry_idsEv(ptr noundef nonnull align 8 dereferenceable(496) %3)
  %29 = call noundef nonnull align 4 dereferenceable(17) ptr @_ZNK6basisu6vectorIN6basist38etc1_global_selector_codebook_entry_idEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %28, i64 noundef %indvars.iv89)
  %30 = getelementptr inbounds i8, ptr %29, i64 4
  %31 = call noundef i32 @_ZNK6basist34etc1_global_palette_entry_modifier9get_indexEv(ptr noundef nonnull align 1 dereferenceable(13) %30)
  %32 = getelementptr inbounds i8, ptr %24, i64 4
  store i32 %31, ptr %32, align 4, !tbaa !35
  %33 = getelementptr inbounds i8, ptr %24, i64 8
  store i8 1, ptr %33, align 4, !tbaa !36
  %34 = load i8, ptr %19, align 4, !tbaa !37, !range !28, !noundef !29
  %35 = trunc nuw i8 %34 to i1
  br i1 %35, label %36, label %.thread

36:                                               ; preds = %22
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6basisu15basisu_frontend39get_selector_cluster_uses_global_cb_vecEv(ptr noundef nonnull align 8 dereferenceable(496) %3)
  %38 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu6vectorIbEixEm(ptr noundef nonnull align 8 dereferenceable(16) %37, i64 noundef %indvars.iv89)
  %39 = load i8, ptr %38, align 1, !tbaa !38, !range !28, !noundef !29
  store i8 %39, ptr %33, align 4, !tbaa !36
  %40 = trunc nuw i8 %39 to i1
  br i1 %40, label %.thread, label %.preheader73

.thread:                                          ; preds = %22, %36
  %41 = trunc nuw nsw i64 %indvars.iv89 to i32
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6basisu15basisu_frontend34get_selector_cluster_selector_bitsEj(ptr noundef nonnull align 8 dereferenceable(496) %3, i32 noundef %41)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #6
  %43 = load ptr, ptr %20, align 8, !tbaa !39
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6basisu15basisu_frontend46get_selector_cluster_global_selector_entry_idsEv(ptr noundef nonnull align 8 dereferenceable(496) %3)
  %45 = call noundef nonnull align 4 dereferenceable(17) ptr @_ZNK6basisu6vectorIN6basist38etc1_global_selector_codebook_entry_idEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %44, i64 noundef %indvars.iv89)
  %46 = call { i64, i64 } @_ZNK6basist29etc1_global_selector_codebook9get_entryERKNS_38etc1_global_selector_codebook_entry_idE(ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 4 dereferenceable(17) %45)
  %47 = extractvalue { i64, i64 } %46, 0
  store i64 %47, ptr %2, align 8
  %48 = extractvalue { i64, i64 } %46, 1
  store i64 %48, ptr %21, align 8
  br label %.preheader

.preheader:                                       ; preds = %.thread, %85
  %.07184 = phi i32 [ 0, %.thread ], [ %86, %85 ]
  %49 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryclEjj(ptr noundef nonnull align 1 dereferenceable(16) %2, i32 noundef 0, i32 noundef %.07184)
  %50 = load i8, ptr %49, align 1, !tbaa !40
  %51 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryclEjj(ptr noundef nonnull align 1 dereferenceable(16) %23, i32 noundef 0, i32 noundef %.07184)
  store i8 %50, ptr %51, align 1, !tbaa !40
  %52 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %42, i32 noundef 0, i32 noundef %.07184)
  %53 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryclEjj(ptr noundef nonnull align 1 dereferenceable(16) %2, i32 noundef 0, i32 noundef %.07184)
  %54 = load i8, ptr %53, align 1, !tbaa !40
  %55 = zext i8 %54 to i32
  %56 = icmp eq i32 %52, %55
  br i1 %56, label %58, label %87

57:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #6
  br label %.loopexit

58:                                               ; preds = %.preheader
  %59 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryclEjj(ptr noundef nonnull align 1 dereferenceable(16) %2, i32 noundef 1, i32 noundef %.07184)
  %60 = load i8, ptr %59, align 1, !tbaa !40
  %61 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryclEjj(ptr noundef nonnull align 1 dereferenceable(16) %23, i32 noundef 1, i32 noundef %.07184)
  store i8 %60, ptr %61, align 1, !tbaa !40
  %62 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %42, i32 noundef 1, i32 noundef %.07184)
  %63 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryclEjj(ptr noundef nonnull align 1 dereferenceable(16) %2, i32 noundef 1, i32 noundef %.07184)
  %64 = load i8, ptr %63, align 1, !tbaa !40
  %65 = zext i8 %64 to i32
  %66 = icmp eq i32 %62, %65
  br i1 %66, label %67, label %87

67:                                               ; preds = %58
  %68 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryclEjj(ptr noundef nonnull align 1 dereferenceable(16) %2, i32 noundef 2, i32 noundef %.07184)
  %69 = load i8, ptr %68, align 1, !tbaa !40
  %70 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryclEjj(ptr noundef nonnull align 1 dereferenceable(16) %23, i32 noundef 2, i32 noundef %.07184)
  store i8 %69, ptr %70, align 1, !tbaa !40
  %71 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %42, i32 noundef 2, i32 noundef %.07184)
  %72 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryclEjj(ptr noundef nonnull align 1 dereferenceable(16) %2, i32 noundef 2, i32 noundef %.07184)
  %73 = load i8, ptr %72, align 1, !tbaa !40
  %74 = zext i8 %73 to i32
  %75 = icmp eq i32 %71, %74
  br i1 %75, label %76, label %87

76:                                               ; preds = %67
  %77 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryclEjj(ptr noundef nonnull align 1 dereferenceable(16) %2, i32 noundef 3, i32 noundef %.07184)
  %78 = load i8, ptr %77, align 1, !tbaa !40
  %79 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryclEjj(ptr noundef nonnull align 1 dereferenceable(16) %23, i32 noundef 3, i32 noundef %.07184)
  store i8 %78, ptr %79, align 1, !tbaa !40
  %80 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %42, i32 noundef 3, i32 noundef %.07184)
  %81 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryclEjj(ptr noundef nonnull align 1 dereferenceable(16) %2, i32 noundef 3, i32 noundef %.07184)
  %82 = load i8, ptr %81, align 1, !tbaa !40
  %83 = zext i8 %82 to i32
  %84 = icmp eq i32 %80, %83
  br i1 %84, label %85, label %87

85:                                               ; preds = %76
  %86 = add nuw nsw i32 %.07184, 1
  %exitcond.not = icmp eq i32 %86, 4
  br i1 %exitcond.not, label %57, label %.preheader, !llvm.loop !41

87:                                               ; preds = %76, %67, %58, %.preheader
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, i32 noundef 138, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6basisu14basisu_backend23create_selector_paletteEv) #7
  unreachable

.preheader73:                                     ; preds = %36
  %88 = trunc nuw nsw i64 %indvars.iv89 to i32
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6basisu15basisu_frontend34get_selector_cluster_selector_bitsEj(ptr noundef nonnull align 8 dereferenceable(496) %3, i32 noundef %88)
  %90 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %89, i32 noundef 0, i32 noundef 0)
  %91 = trunc i32 %90 to i8
  %92 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %23, i32 noundef 0)
  store i8 %91, ptr %92, align 1, !tbaa !40
  %93 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %89, i32 noundef 1, i32 noundef 0)
  %94 = trunc i32 %93 to i8
  %95 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %23, i32 noundef 1)
  store i8 %94, ptr %95, align 1, !tbaa !40
  %96 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %89, i32 noundef 2, i32 noundef 0)
  %97 = trunc i32 %96 to i8
  %98 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %23, i32 noundef 2)
  store i8 %97, ptr %98, align 1, !tbaa !40
  %99 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %89, i32 noundef 3, i32 noundef 0)
  %100 = trunc i32 %99 to i8
  %101 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %23, i32 noundef 3)
  store i8 %100, ptr %101, align 1, !tbaa !40
  %102 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %89, i32 noundef 0, i32 noundef 1)
  %103 = trunc i32 %102 to i8
  %104 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %23, i32 noundef 4)
  store i8 %103, ptr %104, align 1, !tbaa !40
  %105 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %89, i32 noundef 1, i32 noundef 1)
  %106 = trunc i32 %105 to i8
  %107 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %23, i32 noundef 5)
  store i8 %106, ptr %107, align 1, !tbaa !40
  %108 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %89, i32 noundef 2, i32 noundef 1)
  %109 = trunc i32 %108 to i8
  %110 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %23, i32 noundef 6)
  store i8 %109, ptr %110, align 1, !tbaa !40
  %111 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %89, i32 noundef 3, i32 noundef 1)
  %112 = trunc i32 %111 to i8
  %113 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %23, i32 noundef 7)
  store i8 %112, ptr %113, align 1, !tbaa !40
  %114 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %89, i32 noundef 0, i32 noundef 2)
  %115 = trunc i32 %114 to i8
  %116 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %23, i32 noundef 8)
  store i8 %115, ptr %116, align 1, !tbaa !40
  %117 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %89, i32 noundef 1, i32 noundef 2)
  %118 = trunc i32 %117 to i8
  %119 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %23, i32 noundef 9)
  store i8 %118, ptr %119, align 1, !tbaa !40
  %120 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %89, i32 noundef 2, i32 noundef 2)
  %121 = trunc i32 %120 to i8
  %122 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %23, i32 noundef 10)
  store i8 %121, ptr %122, align 1, !tbaa !40
  %123 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %89, i32 noundef 3, i32 noundef 2)
  %124 = trunc i32 %123 to i8
  %125 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %23, i32 noundef 11)
  store i8 %124, ptr %125, align 1, !tbaa !40
  %126 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %89, i32 noundef 0, i32 noundef 3)
  %127 = trunc i32 %126 to i8
  %128 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %23, i32 noundef 12)
  store i8 %127, ptr %128, align 1, !tbaa !40
  %129 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %89, i32 noundef 1, i32 noundef 3)
  %130 = trunc i32 %129 to i8
  %131 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %23, i32 noundef 13)
  store i8 %130, ptr %131, align 1, !tbaa !40
  %132 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %89, i32 noundef 2, i32 noundef 3)
  %133 = trunc i32 %132 to i8
  %134 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %23, i32 noundef 14)
  store i8 %133, ptr %134, align 1, !tbaa !40
  %135 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %89, i32 noundef 3, i32 noundef 3)
  %136 = trunc i32 %135 to i8
  %137 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %23, i32 noundef 15)
  store i8 %136, ptr %137, align 1, !tbaa !40
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader73, %57
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %138 = call noundef i32 @_ZNK6basisu15basisu_frontend27get_total_selector_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %3)
  %139 = sext i32 %138 to i64
  %140 = icmp slt i64 %indvars.iv.next90, %139
  br i1 %140, label %22, label %.loopexit74, !llvm.loop !43

.lr.ph:                                           ; preds = %.preheader76, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader76 ]
  %141 = tail call noundef nonnull align 1 dereferenceable(16) ptr @_ZN6basisu6vectorIN6basist27etc1_selector_palette_entryEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %indvars.iv)
  %142 = trunc nuw i64 %indvars.iv to i32
  %143 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6basisu15basisu_frontend34get_selector_cluster_selector_bitsEj(ptr noundef nonnull align 8 dereferenceable(496) %3, i32 noundef %142)
  %144 = tail call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %143, i32 noundef 0, i32 noundef 0)
  %145 = trunc i32 %144 to i8
  %146 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %141, i32 noundef 0)
  store i8 %145, ptr %146, align 1, !tbaa !40
  %147 = tail call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %143, i32 noundef 1, i32 noundef 0)
  %148 = trunc i32 %147 to i8
  %149 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %141, i32 noundef 1)
  store i8 %148, ptr %149, align 1, !tbaa !40
  %150 = tail call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %143, i32 noundef 2, i32 noundef 0)
  %151 = trunc i32 %150 to i8
  %152 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %141, i32 noundef 2)
  store i8 %151, ptr %152, align 1, !tbaa !40
  %153 = tail call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %143, i32 noundef 3, i32 noundef 0)
  %154 = trunc i32 %153 to i8
  %155 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %141, i32 noundef 3)
  store i8 %154, ptr %155, align 1, !tbaa !40
  %156 = tail call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %143, i32 noundef 0, i32 noundef 1)
  %157 = trunc i32 %156 to i8
  %158 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %141, i32 noundef 4)
  store i8 %157, ptr %158, align 1, !tbaa !40
  %159 = tail call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %143, i32 noundef 1, i32 noundef 1)
  %160 = trunc i32 %159 to i8
  %161 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %141, i32 noundef 5)
  store i8 %160, ptr %161, align 1, !tbaa !40
  %162 = tail call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %143, i32 noundef 2, i32 noundef 1)
  %163 = trunc i32 %162 to i8
  %164 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %141, i32 noundef 6)
  store i8 %163, ptr %164, align 1, !tbaa !40
  %165 = tail call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %143, i32 noundef 3, i32 noundef 1)
  %166 = trunc i32 %165 to i8
  %167 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %141, i32 noundef 7)
  store i8 %166, ptr %167, align 1, !tbaa !40
  %168 = tail call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %143, i32 noundef 0, i32 noundef 2)
  %169 = trunc i32 %168 to i8
  %170 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %141, i32 noundef 8)
  store i8 %169, ptr %170, align 1, !tbaa !40
  %171 = tail call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %143, i32 noundef 1, i32 noundef 2)
  %172 = trunc i32 %171 to i8
  %173 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %141, i32 noundef 9)
  store i8 %172, ptr %173, align 1, !tbaa !40
  %174 = tail call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %143, i32 noundef 2, i32 noundef 2)
  %175 = trunc i32 %174 to i8
  %176 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %141, i32 noundef 10)
  store i8 %175, ptr %176, align 1, !tbaa !40
  %177 = tail call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %143, i32 noundef 3, i32 noundef 2)
  %178 = trunc i32 %177 to i8
  %179 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %141, i32 noundef 11)
  store i8 %178, ptr %179, align 1, !tbaa !40
  %180 = tail call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %143, i32 noundef 0, i32 noundef 3)
  %181 = trunc i32 %180 to i8
  %182 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %141, i32 noundef 12)
  store i8 %181, ptr %182, align 1, !tbaa !40
  %183 = tail call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %143, i32 noundef 1, i32 noundef 3)
  %184 = trunc i32 %183 to i8
  %185 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %141, i32 noundef 13)
  store i8 %184, ptr %185, align 1, !tbaa !40
  %186 = tail call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %143, i32 noundef 2, i32 noundef 3)
  %187 = trunc i32 %186 to i8
  %188 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %141, i32 noundef 14)
  store i8 %187, ptr %188, align 1, !tbaa !40
  %189 = tail call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %143, i32 noundef 3, i32 noundef 3)
  %190 = trunc i32 %189 to i8
  %191 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16) %141, i32 noundef 15)
  store i8 %190, ptr %191, align 1, !tbaa !40
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %192 = tail call noundef i32 @_ZNK6basisu15basisu_frontend27get_total_selector_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %3)
  %193 = zext i32 %192 to i64
  %194 = icmp ult i64 %indvars.iv.next, %193
  br i1 %194, label %.lr.ph, label %.loopexit74, !llvm.loop !44

.loopexit74:                                      ; preds = %.lr.ph, %.loopexit, %.preheader76, %13
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu6vectorIN6basist27etc1_selector_palette_entryEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i1 noundef zeroext) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu6vectorINS_14basisu_backend34etc1_global_selector_cb_entry_descEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i1 noundef zeroext) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu6vectorINS_14basisu_backend34etc1_global_selector_cb_entry_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6basisu15basisu_frontend46get_selector_cluster_global_selector_entry_idsEv(ptr noundef nonnull align 8 dereferenceable(496)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(17) ptr @_ZNK6basisu6vectorIN6basist38etc1_global_selector_codebook_entry_idEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6basist34etc1_global_palette_entry_modifier9get_indexEv(ptr noundef nonnull align 1 dereferenceable(13)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6basisu15basisu_frontend39get_selector_cluster_uses_global_cb_vecEv(ptr noundef nonnull align 8 dereferenceable(496)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu6vectorIbEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #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) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZNK6basist29etc1_global_selector_codebook9get_entryERKNS_38etc1_global_selector_codebook_entry_idE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(17)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryclEjj(ptr noundef nonnull align 1 dereferenceable(16), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryixEj(ptr noundef nonnull align 1 dereferenceable(16), i32 noundef) local_unnamed_addr #0 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = { 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 #6 = { nounwind }
attributes #7 = { noreturn 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, !7, i64 0}
!6 = !{!"_ZTSN6basisu14basisu_backendE", !7, i64 0, !10, i64 8, !14, i64 40, !15, i64 56, !7, i64 168, !20, i64 176, !21, i64 192, !22, i64 208, !23, i64 224, !24, i64 240, !24, i64 256, !25, i64 272, !25, i64 288, !24, i64 304, !24, i64 320}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN6basisu21basisu_backend_paramsE", !11, i64 0, !11, i64 1, !11, i64 2, !12, i64 4, !12, i64 8, !13, i64 12, !11, i64 16, !13, i64 20, !13, i64 24, !11, i64 28, !11, i64 29}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"float", !8, i64 0}
!13 = !{!"int", !8, i64 0}
!14 = !{!"_ZTSN6basisu6vectorINS_25basisu_backend_slice_descEEE", !7, i64 0, !13, i64 8, !13, i64 12}
!15 = !{!"_ZTSN6basisu21basisu_backend_outputE", !16, i64 0, !11, i64 4, !11, i64 5, !11, i64 6, !13, i64 8, !13, i64 12, !17, i64 16, !17, i64 32, !14, i64 48, !17, i64 64, !18, i64 80, !19, i64 96}
!16 = !{!"_ZTSN6basist16basis_tex_formatE", !8, i64 0}
!17 = !{!"_ZTSN6basisu6vectorIhEE", !7, i64 0, !13, i64 8, !13, i64 12}
!18 = !{!"_ZTSN6basisu6vectorINS0_IhEEEE", !7, i64 0, !13, i64 8, !13, i64 12}
!19 = !{!"_ZTSN6basisu6vectorItEE", !7, i64 0, !13, i64 8, !13, i64 12}
!20 = !{!"_ZTSN6basisu6vectorINS_27etc1_endpoint_palette_entryEEE", !7, i64 0, !13, i64 8, !13, i64 12}
!21 = !{!"_ZTSN6basisu6vectorIN6basist27etc1_selector_palette_entryEEE", !7, i64 0, !13, i64 8, !13, i64 12}
!22 = !{!"_ZTSN6basisu6vectorINS_14basisu_backend34etc1_global_selector_cb_entry_descEEE", !7, i64 0, !13, i64 8, !13, i64 12}
!23 = !{!"_ZTSN6basisu6vectorINS_8vector2DINS_13encoder_blockEEEEE", !7, i64 0, !13, i64 8, !13, i64 12}
!24 = !{!"_ZTSN6basisu6vectorIjEE", !7, i64 0, !13, i64 8, !13, i64 12}
!25 = !{!"_ZTSN6basisu6vectorIbEE", !7, i64 0, !13, i64 8, !13, i64 12}
!26 = !{!6, !13, i64 68}
!27 = !{!6, !11, i64 24}
!28 = !{i8 0, i8 2}
!29 = !{}
!30 = !{!31, !13, i64 0}
!31 = !{!"_ZTSN6basist38etc1_global_selector_codebook_entry_idE", !13, i64 0, !32, i64 4}
!32 = !{!"_ZTSN6basist34etc1_global_palette_entry_modifierE", !8, i64 0, !11, i64 1, !11, i64 2, !11, i64 3, !11, i64 4, !11, i64 5, !11, i64 6, !11, i64 7, !11, i64 8, !11, i64 9, !11, i64 10, !11, i64 11, !8, i64 12}
!33 = !{!34, !13, i64 0}
!34 = !{!"_ZTSN6basisu14basisu_backend34etc1_global_selector_cb_entry_descE", !13, i64 0, !13, i64 4, !11, i64 8}
!35 = !{!34, !13, i64 4}
!36 = !{!34, !11, i64 8}
!37 = !{!6, !11, i64 36}
!38 = !{!11, !11, i64 0}
!39 = !{!6, !7, i64 168}
!40 = !{!8, !8, i64 0}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.mustprogress"}
!43 = distinct !{!43, !42}
!44 = distinct !{!44, !42}


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