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

; 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.basisu::bc7enc_vec4F" = type { [4 x float] }
%"struct.basisu::color_cell_compressor_results" = type { i64, %"struct.basist::color_quad_u8", %"struct.basist::color_quad_u8", [2 x i32], ptr, ptr, %"struct.basist::color_quad_u8", %"struct.basist::color_quad_u8" }
%"struct.basist::color_quad_u8" = type { [4 x i8] }
%"struct.basisu::color_cell_compressor_params" = type { i32, ptr, i32, ptr, ptr, i32, ptr, i32, [4 x i32], i8, i8, i8, i8 }
%"struct.basisu::bc7enc_compress_block_params" = type { i32, [4 x i32], i32, i8, i32 }

@.str.3 = external hidden unnamed_addr constant [113 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [39 x i8], align 1
@__PRETTY_FUNCTION__._ZN6basisu22color_cell_compressionEjPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEPKNS_28bc7enc_compress_block_paramsE = external hidden unnamed_addr constant [159 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [72 x i8], align 1

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

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

; 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) #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN6basisu22color_cell_compressionEjPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEPKNS_28bc7enc_compress_block_paramsE(i32 noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #3 {
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %16 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %17 = alloca i32, align 4
  %18 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %19 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %20 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %21 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %22 = alloca i32, align 4
  %23 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %24 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %25 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %26 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %27 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %28 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %29 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %30 = alloca [6 x float], align 16
  %31 = alloca i32, align 4
  %32 = alloca ptr, align 8
  %33 = alloca float, align 4
  %34 = alloca float, align 4
  %35 = alloca float, align 4
  %36 = alloca float, align 4
  %37 = alloca float, align 4
  %38 = alloca float, align 4
  %39 = alloca i32, align 4
  %40 = alloca float, align 4
  %41 = alloca float, align 4
  %42 = alloca float, align 4
  %43 = alloca float, align 4
  %44 = alloca float, align 4
  %45 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %46 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %47 = alloca float, align 4
  %48 = alloca float, align 4
  %49 = alloca i32, align 4
  %50 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %51 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %52 = alloca float, align 4
  %53 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %54 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %55 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %56 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %57 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %58 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %59 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %60 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %61 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %62 = alloca i32, align 4
  %63 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %64 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %65 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %66 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %67 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %68 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %69 = alloca [16 x i8], align 16
  %70 = alloca [16 x i8], align 16
  %71 = alloca i32, align 4
  %72 = alloca i32, align 4
  %73 = alloca i32, align 4
  %74 = alloca i32, align 4
  %75 = alloca i32, align 4
  %76 = alloca i32, align 4
  %77 = alloca i32, align 4
  %78 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %79 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %80 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %81 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %82 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %83 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %84 = alloca i32, align 4
  %85 = alloca i32, align 4
  %86 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %87 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %88 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %89 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %90 = alloca i32, align 4
  %91 = alloca i32, align 4
  %92 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %93 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %94 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %95 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %96 = alloca i32, align 4
  %97 = alloca i32, align 4
  %98 = alloca i32, align 4
  %99 = alloca i32, align 4
  %100 = alloca i32, align 4
  %101 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %102 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %103 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %104 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %105 = alloca %"struct.basisu::color_cell_compressor_results", align 8
  %106 = alloca i32, align 4
  %107 = alloca i32, align 4
  %108 = alloca i32, align 4
  %109 = alloca i64, align 8
  %110 = alloca %"struct.basisu::color_cell_compressor_results", align 8
  %111 = alloca i32, align 4
  %112 = alloca i32, align 4
  %113 = alloca i32, align 4
  %114 = alloca i64, align 8
  %115 = alloca %"struct.basisu::color_cell_compressor_results", align 8
  %116 = alloca i32, align 4
  %117 = alloca i32, align 4
  %118 = alloca i32, align 4
  %119 = alloca i64, align 8
  %120 = alloca %"struct.basisu::color_cell_compressor_results", align 8
  %121 = alloca i32, align 4
  %122 = alloca i32, align 4
  %123 = alloca i32, align 4
  %124 = alloca i32, align 4
  %125 = alloca i64, align 8
  %126 = alloca %"struct.basisu::color_cell_compressor_results", align 8
  %127 = alloca i32, align 4
  %128 = alloca i32, align 4
  %129 = alloca i32, align 4
  %130 = alloca i64, align 8
  %131 = alloca %"struct.basisu::color_cell_compressor_results", align 8
  %132 = alloca i32, align 4
  %133 = alloca i32, align 4
  %134 = alloca i32, align 4
  %135 = alloca i64, align 8
  store i32 %0, ptr %6, align 4, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !9
  %136 = load ptr, ptr %7, align 8, !tbaa !9
  %137 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %136, i32 0, i32 7
  %138 = load i32, ptr %137, align 8, !tbaa !11
  %139 = icmp ne i32 %138, 0
  br i1 %139, label %155, label %140

140:                                              ; preds = %4
  %141 = load i32, ptr %6, align 4, !tbaa !5
  %142 = icmp eq i32 %141, 6
  br i1 %142, label %149, label %143

143:                                              ; preds = %140
  %144 = load ptr, ptr %7, align 8, !tbaa !9
  %145 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %144, i32 0, i32 9
  %146 = load i8, ptr %145, align 4, !tbaa !13
  %147 = icmp ne i8 %146, 0
  %148 = xor i1 %147, true
  br label %149

149:                                              ; preds = %143, %140
  %150 = phi i1 [ true, %140 ], [ %148, %143 ]
  br i1 %150, label %151, label %152

151:                                              ; preds = %149
  br label %154

152:                                              ; preds = %149
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.3, i32 noundef 1365, ptr noundef @__PRETTY_FUNCTION__._ZN6basisu22color_cell_compressionEjPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEPKNS_28bc7enc_compress_block_paramsE) #11
  unreachable

153:                                              ; No predecessors!
  br label %154

154:                                              ; preds = %153, %151
  br label %155

155:                                              ; preds = %154, %4
  %156 = load ptr, ptr %7, align 8, !tbaa !9
  %157 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %156, i32 0, i32 2
  %158 = load i32, ptr %157, align 8, !tbaa !14
  %159 = icmp uge i32 %158, 1
  br i1 %159, label %160, label %165

160:                                              ; preds = %155
  %161 = load ptr, ptr %7, align 8, !tbaa !9
  %162 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %161, i32 0, i32 2
  %163 = load i32, ptr %162, align 8, !tbaa !14
  %164 = icmp ule i32 %163, 32
  br label %165

165:                                              ; preds = %160, %155
  %166 = phi i1 [ false, %155 ], [ %164, %160 ]
  br i1 %166, label %167, label %168

167:                                              ; preds = %165
  br label %170

168:                                              ; preds = %165
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.3, i32 noundef 1367, ptr noundef @__PRETTY_FUNCTION__._ZN6basisu22color_cell_compressionEjPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEPKNS_28bc7enc_compress_block_paramsE) #11
  unreachable

169:                                              ; No predecessors!
  br label %170

170:                                              ; preds = %169, %167
  %171 = load ptr, ptr %7, align 8, !tbaa !9
  %172 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %171, i32 0, i32 3
  %173 = load ptr, ptr %172, align 8, !tbaa !15
  %174 = getelementptr inbounds i32, ptr %173, i64 0
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %176 = icmp eq i32 %175, 0
  br i1 %176, label %177, label %178

177:                                              ; preds = %170
  br label %180

178:                                              ; preds = %170
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.3, i32 noundef 1368, ptr noundef @__PRETTY_FUNCTION__._ZN6basisu22color_cell_compressionEjPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEPKNS_28bc7enc_compress_block_paramsE) #11
  unreachable

179:                                              ; No predecessors!
  br label %180

180:                                              ; preds = %179, %177
  %181 = load ptr, ptr %7, align 8, !tbaa !9
  %182 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %181, i32 0, i32 3
  %183 = load ptr, ptr %182, align 8, !tbaa !15
  %184 = load ptr, ptr %7, align 8, !tbaa !9
  %185 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %184, i32 0, i32 2
  %186 = load i32, ptr %185, align 8, !tbaa !14
  %187 = sub i32 %186, 1
  %188 = zext i32 %187 to i64
  %189 = getelementptr inbounds i32, ptr %183, i64 %188
  %190 = load i32, ptr %189, align 4, !tbaa !5
  %191 = icmp eq i32 %190, 64
  br i1 %191, label %192, label %193

192:                                              ; preds = %180
  br label %195

193:                                              ; preds = %180
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.3, i32 noundef 1369, ptr noundef @__PRETTY_FUNCTION__._ZN6basisu22color_cell_compressionEjPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEPKNS_28bc7enc_compress_block_paramsE) #11
  unreachable

194:                                              ; No predecessors!
  br label %195

195:                                              ; preds = %194, %192
  %196 = load ptr, ptr %8, align 8, !tbaa !9
  %197 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %196, i32 0, i32 0
  store i64 -1, ptr %197, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #12
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #12
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #12
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #12
  %198 = load ptr, ptr %7, align 8, !tbaa !9
  %199 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %198, i32 0, i32 6
  %200 = load ptr, ptr %199, align 8, !tbaa !20
  %201 = icmp ne ptr %200, null
  br i1 %201, label %371, label %202

202:                                              ; preds = %195
  %203 = load i32, ptr %6, align 4, !tbaa !5
  %204 = icmp eq i32 %203, 1
  br i1 %204, label %205, label %219

205:                                              ; preds = %202
  %206 = load ptr, ptr %7, align 8, !tbaa !9
  %207 = call noundef zeroext i1 @_ZN6basisuL12is_solid_rgbEPKNS_28color_cell_compressor_paramsERjS3_S3_(ptr noundef %206, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  br i1 %207, label %208, label %218

208:                                              ; preds = %205
  %209 = load ptr, ptr %7, align 8, !tbaa !9
  %210 = load ptr, ptr %8, align 8, !tbaa !9
  %211 = load i32, ptr %10, align 4, !tbaa !5
  %212 = load i32, ptr %11, align 4, !tbaa !5
  %213 = load i32, ptr %12, align 4, !tbaa !5
  %214 = load ptr, ptr %8, align 8, !tbaa !9
  %215 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %214, i32 0, i32 4
  %216 = load ptr, ptr %215, align 8, !tbaa !21
  %217 = call noundef i64 @_ZN6basisuL23pack_mode1_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef %209, ptr noundef %210, i32 noundef %211, i32 noundef %212, i32 noundef %213, ptr noundef %216)
  store i64 %217, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %1802

218:                                              ; preds = %205
  br label %370

219:                                              ; preds = %202
  %220 = load ptr, ptr %7, align 8, !tbaa !9
  %221 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %220, i32 0, i32 7
  %222 = load i32, ptr %221, align 8, !tbaa !11
  %223 = icmp eq i32 %222, 8
  br i1 %223, label %224, label %248

224:                                              ; preds = %219
  %225 = load ptr, ptr %7, align 8, !tbaa !9
  %226 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %225, i32 0, i32 2
  %227 = load i32, ptr %226, align 8, !tbaa !14
  %228 = icmp eq i32 %227, 8
  br i1 %228, label %229, label %248

229:                                              ; preds = %224
  %230 = load ptr, ptr %7, align 8, !tbaa !9
  %231 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %230, i32 0, i32 9
  %232 = load i8, ptr %231, align 4, !tbaa !13
  %233 = icmp ne i8 %232, 0
  br i1 %233, label %248, label %234

234:                                              ; preds = %229
  %235 = load ptr, ptr %7, align 8, !tbaa !9
  %236 = call noundef zeroext i1 @_ZN6basisuL12is_solid_rgbEPKNS_28color_cell_compressor_paramsERjS3_S3_(ptr noundef %235, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  br i1 %236, label %237, label %247

237:                                              ; preds = %234
  %238 = load ptr, ptr %7, align 8, !tbaa !9
  %239 = load ptr, ptr %8, align 8, !tbaa !9
  %240 = load i32, ptr %10, align 4, !tbaa !5
  %241 = load i32, ptr %11, align 4, !tbaa !5
  %242 = load i32, ptr %12, align 4, !tbaa !5
  %243 = load ptr, ptr %8, align 8, !tbaa !9
  %244 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %243, i32 0, i32 4
  %245 = load ptr, ptr %244, align 8, !tbaa !21
  %246 = call noundef i64 @_ZN6basisuL32pack_astc_4bit_3bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef %238, ptr noundef %239, i32 noundef %240, i32 noundef %241, i32 noundef %242, ptr noundef %245)
  store i64 %246, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %1802

247:                                              ; preds = %234
  br label %369

248:                                              ; preds = %229, %224, %219
  %249 = load ptr, ptr %7, align 8, !tbaa !9
  %250 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %249, i32 0, i32 7
  %251 = load i32, ptr %250, align 8, !tbaa !11
  %252 = icmp eq i32 %251, 7
  br i1 %252, label %253, label %277

253:                                              ; preds = %248
  %254 = load ptr, ptr %7, align 8, !tbaa !9
  %255 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %254, i32 0, i32 2
  %256 = load i32, ptr %255, align 8, !tbaa !14
  %257 = icmp eq i32 %256, 4
  br i1 %257, label %258, label %277

258:                                              ; preds = %253
  %259 = load ptr, ptr %7, align 8, !tbaa !9
  %260 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %259, i32 0, i32 9
  %261 = load i8, ptr %260, align 4, !tbaa !13
  %262 = icmp ne i8 %261, 0
  br i1 %262, label %277, label %263

263:                                              ; preds = %258
  %264 = load ptr, ptr %7, align 8, !tbaa !9
  %265 = call noundef zeroext i1 @_ZN6basisuL12is_solid_rgbEPKNS_28color_cell_compressor_paramsERjS3_S3_(ptr noundef %264, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  br i1 %265, label %266, label %276

266:                                              ; preds = %263
  %267 = load ptr, ptr %7, align 8, !tbaa !9
  %268 = load ptr, ptr %8, align 8, !tbaa !9
  %269 = load i32, ptr %10, align 4, !tbaa !5
  %270 = load i32, ptr %11, align 4, !tbaa !5
  %271 = load i32, ptr %12, align 4, !tbaa !5
  %272 = load ptr, ptr %8, align 8, !tbaa !9
  %273 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %272, i32 0, i32 4
  %274 = load ptr, ptr %273, align 8, !tbaa !21
  %275 = call noundef i64 @_ZN6basisuL34pack_astc_range7_2bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef %267, ptr noundef %268, i32 noundef %269, i32 noundef %270, i32 noundef %271, ptr noundef %274)
  store i64 %275, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %1802

276:                                              ; preds = %263
  br label %368

277:                                              ; preds = %258, %253, %248
  %278 = load ptr, ptr %7, align 8, !tbaa !9
  %279 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %278, i32 0, i32 7
  %280 = load i32, ptr %279, align 8, !tbaa !11
  %281 = icmp eq i32 %280, 8
  br i1 %281, label %282, label %307

282:                                              ; preds = %277
  %283 = load ptr, ptr %7, align 8, !tbaa !9
  %284 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %283, i32 0, i32 2
  %285 = load i32, ptr %284, align 8, !tbaa !14
  %286 = icmp eq i32 %285, 4
  br i1 %286, label %287, label %307

287:                                              ; preds = %282
  %288 = load ptr, ptr %7, align 8, !tbaa !9
  %289 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %288, i32 0, i32 9
  %290 = load i8, ptr %289, align 4, !tbaa !13
  %291 = icmp ne i8 %290, 0
  br i1 %291, label %292, label %307

292:                                              ; preds = %287
  %293 = load ptr, ptr %7, align 8, !tbaa !9
  %294 = call noundef zeroext i1 @_ZN6basisuL13is_solid_rgbaEPKNS_28color_cell_compressor_paramsERjS3_S3_S3_(ptr noundef %293, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
  br i1 %294, label %295, label %306

295:                                              ; preds = %292
  %296 = load ptr, ptr %7, align 8, !tbaa !9
  %297 = load ptr, ptr %8, align 8, !tbaa !9
  %298 = load i32, ptr %10, align 4, !tbaa !5
  %299 = load i32, ptr %11, align 4, !tbaa !5
  %300 = load i32, ptr %12, align 4, !tbaa !5
  %301 = load i32, ptr %13, align 4, !tbaa !5
  %302 = load ptr, ptr %8, align 8, !tbaa !9
  %303 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %302, i32 0, i32 4
  %304 = load ptr, ptr %303, align 8, !tbaa !21
  %305 = call noundef i64 @_ZN6basisuL37pack_astc_4bit_2bit_to_one_color_rgbaEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjjPh(ptr noundef %296, ptr noundef %297, i32 noundef %298, i32 noundef %299, i32 noundef %300, i32 noundef %301, ptr noundef %304)
  store i64 %305, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %1802

306:                                              ; preds = %292
  br label %367

307:                                              ; preds = %287, %282, %277
  %308 = load ptr, ptr %7, align 8, !tbaa !9
  %309 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %308, i32 0, i32 7
  %310 = load i32, ptr %309, align 8, !tbaa !11
  %311 = icmp eq i32 %310, 13
  br i1 %311, label %312, label %336

312:                                              ; preds = %307
  %313 = load ptr, ptr %7, align 8, !tbaa !9
  %314 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %313, i32 0, i32 2
  %315 = load i32, ptr %314, align 8, !tbaa !14
  %316 = icmp eq i32 %315, 4
  br i1 %316, label %317, label %336

317:                                              ; preds = %312
  %318 = load ptr, ptr %7, align 8, !tbaa !9
  %319 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %318, i32 0, i32 9
  %320 = load i8, ptr %319, align 4, !tbaa !13
  %321 = icmp ne i8 %320, 0
  br i1 %321, label %336, label %322

322:                                              ; preds = %317
  %323 = load ptr, ptr %7, align 8, !tbaa !9
  %324 = call noundef zeroext i1 @_ZN6basisuL12is_solid_rgbEPKNS_28color_cell_compressor_paramsERjS3_S3_(ptr noundef %323, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  br i1 %324, label %325, label %335

325:                                              ; preds = %322
  %326 = load ptr, ptr %7, align 8, !tbaa !9
  %327 = load ptr, ptr %8, align 8, !tbaa !9
  %328 = load i32, ptr %10, align 4, !tbaa !5
  %329 = load i32, ptr %11, align 4, !tbaa !5
  %330 = load i32, ptr %12, align 4, !tbaa !5
  %331 = load ptr, ptr %8, align 8, !tbaa !9
  %332 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %331, i32 0, i32 4
  %333 = load ptr, ptr %332, align 8, !tbaa !21
  %334 = call noundef i64 @_ZN6basisuL35pack_astc_range13_2bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef %326, ptr noundef %327, i32 noundef %328, i32 noundef %329, i32 noundef %330, ptr noundef %333)
  store i64 %334, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %1802

335:                                              ; preds = %322
  br label %366

336:                                              ; preds = %317, %312, %307
  %337 = load ptr, ptr %7, align 8, !tbaa !9
  %338 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %337, i32 0, i32 7
  %339 = load i32, ptr %338, align 8, !tbaa !11
  %340 = icmp eq i32 %339, 11
  br i1 %340, label %341, label %365

341:                                              ; preds = %336
  %342 = load ptr, ptr %7, align 8, !tbaa !9
  %343 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %342, i32 0, i32 2
  %344 = load i32, ptr %343, align 8, !tbaa !14
  %345 = icmp eq i32 %344, 32
  br i1 %345, label %346, label %365

346:                                              ; preds = %341
  %347 = load ptr, ptr %7, align 8, !tbaa !9
  %348 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %347, i32 0, i32 9
  %349 = load i8, ptr %348, align 4, !tbaa !13
  %350 = icmp ne i8 %349, 0
  br i1 %350, label %365, label %351

351:                                              ; preds = %346
  %352 = load ptr, ptr %7, align 8, !tbaa !9
  %353 = call noundef zeroext i1 @_ZN6basisuL12is_solid_rgbEPKNS_28color_cell_compressor_paramsERjS3_S3_(ptr noundef %352, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  br i1 %353, label %354, label %364

354:                                              ; preds = %351
  %355 = load ptr, ptr %7, align 8, !tbaa !9
  %356 = load ptr, ptr %8, align 8, !tbaa !9
  %357 = load i32, ptr %10, align 4, !tbaa !5
  %358 = load i32, ptr %11, align 4, !tbaa !5
  %359 = load i32, ptr %12, align 4, !tbaa !5
  %360 = load ptr, ptr %8, align 8, !tbaa !9
  %361 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %360, i32 0, i32 4
  %362 = load ptr, ptr %361, align 8, !tbaa !21
  %363 = call noundef i64 @_ZN6basisuL35pack_astc_range11_5bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef %355, ptr noundef %356, i32 noundef %357, i32 noundef %358, i32 noundef %359, ptr noundef %362)
  store i64 %363, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %1802

364:                                              ; preds = %351
  br label %365

365:                                              ; preds = %364, %346, %341, %336
  br label %366

366:                                              ; preds = %365, %335
  br label %367

367:                                              ; preds = %366, %306
  br label %368

368:                                              ; preds = %367, %276
  br label %369

369:                                              ; preds = %368, %247
  br label %370

370:                                              ; preds = %369, %218
  br label %371

371:                                              ; preds = %370, %195
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #12
  %372 = call noundef ptr @_ZN6basisuL16vec4F_set_scalarEPNS_12bc7enc_vec4FEf(ptr noundef %15, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #12
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %373

373:                                              ; preds = %399, %371
  %374 = load i32, ptr %17, align 4, !tbaa !5
  %375 = load ptr, ptr %7, align 8, !tbaa !9
  %376 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %375, i32 0, i32 0
  %377 = load i32, ptr %376, align 8, !tbaa !22
  %378 = icmp ult i32 %374, %377
  br i1 %378, label %380, label %379

379:                                              ; preds = %373
  store i32 2, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #12
  br label %402

380:                                              ; preds = %373
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #12
  %381 = load ptr, ptr %7, align 8, !tbaa !9
  %382 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %381, i32 0, i32 1
  %383 = load ptr, ptr %382, align 8, !tbaa !23
  %384 = load i32, ptr %17, align 4, !tbaa !5
  %385 = zext i32 %384 to i64
  %386 = getelementptr inbounds %"struct.basist::color_quad_u8", ptr %383, i64 %385
  %387 = call { <2 x float>, <2 x float> } @_ZN6basisuL16vec4F_from_colorEPKN6basist13color_quad_u8E(ptr noundef %386)
  %388 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %18, i32 0, i32 0
  %389 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %388, i32 0, i32 0
  %390 = extractvalue { <2 x float>, <2 x float> } %387, 0
  store <2 x float> %390, ptr %389, align 4
  %391 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %388, i32 0, i32 1
  %392 = extractvalue { <2 x float>, <2 x float> } %387, 1
  store <2 x float> %392, ptr %391, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #12
  %393 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_addEPKNS_12bc7enc_vec4FES2_(ptr noundef %15, ptr noundef %18)
  %394 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %19, i32 0, i32 0
  %395 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %394, i32 0, i32 0
  %396 = extractvalue { <2 x float>, <2 x float> } %393, 0
  store <2 x float> %396, ptr %395, align 4
  %397 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %394, i32 0, i32 1
  %398 = extractvalue { <2 x float>, <2 x float> } %393, 1
  store <2 x float> %398, ptr %397, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 %19, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #12
  br label %399

399:                                              ; preds = %380
  %400 = load i32, ptr %17, align 4, !tbaa !5
  %401 = add i32 %400, 1
  store i32 %401, ptr %17, align 4, !tbaa !5
  br label %373, !llvm.loop !26

402:                                              ; preds = %379
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #12
  %403 = load ptr, ptr %7, align 8, !tbaa !9
  %404 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %403, i32 0, i32 0
  %405 = load i32, ptr %404, align 8, !tbaa !22
  %406 = uitofp i32 %405 to float
  %407 = fdiv float 1.000000e+00, %406
  %408 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef %15, float noundef %407)
  %409 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %20, i32 0, i32 0
  %410 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %409, i32 0, i32 0
  %411 = extractvalue { <2 x float>, <2 x float> } %408, 0
  store <2 x float> %411, ptr %410, align 4
  %412 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %409, i32 0, i32 1
  %413 = extractvalue { <2 x float>, <2 x float> } %408, 1
  store <2 x float> %413, ptr %412, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #12
  %414 = load ptr, ptr %7, align 8, !tbaa !9
  %415 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %414, i32 0, i32 0
  %416 = load i32, ptr %415, align 8, !tbaa !22
  %417 = uitofp i32 %416 to float
  %418 = fmul float %417, 2.550000e+02
  %419 = fdiv float 1.000000e+00, %418
  %420 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef %15, float noundef %419)
  %421 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %21, i32 0, i32 0
  %422 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %421, i32 0, i32 0
  %423 = extractvalue { <2 x float>, <2 x float> } %420, 0
  store <2 x float> %423, ptr %422, align 4
  %424 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %421, i32 0, i32 1
  %425 = extractvalue { <2 x float>, <2 x float> } %420, 1
  store <2 x float> %425, ptr %424, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 %21, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #12
  %426 = call noundef ptr @_ZN6basisuL23vec4F_saturate_in_placeEPNS_12bc7enc_vec4FE(ptr noundef %15)
  %427 = load ptr, ptr %7, align 8, !tbaa !9
  %428 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %427, i32 0, i32 9
  %429 = load i8, ptr %428, align 4, !tbaa !13
  %430 = icmp ne i8 %429, 0
  br i1 %430, label %431, label %527

431:                                              ; preds = %402
  %432 = call noundef ptr @_ZN6basisuL16vec4F_set_scalarEPNS_12bc7enc_vec4FEf(ptr noundef %16, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #12
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %433

433:                                              ; preds = %522, %431
  %434 = load i32, ptr %22, align 4, !tbaa !5
  %435 = load ptr, ptr %7, align 8, !tbaa !9
  %436 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %435, i32 0, i32 0
  %437 = load i32, ptr %436, align 8, !tbaa !22
  %438 = icmp ult i32 %434, %437
  br i1 %438, label %440, label %439

439:                                              ; preds = %433
  store i32 5, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #12
  br label %525

440:                                              ; preds = %433
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #12
  %441 = load ptr, ptr %7, align 8, !tbaa !9
  %442 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %441, i32 0, i32 1
  %443 = load ptr, ptr %442, align 8, !tbaa !23
  %444 = load i32, ptr %22, align 4, !tbaa !5
  %445 = zext i32 %444 to i64
  %446 = getelementptr inbounds %"struct.basist::color_quad_u8", ptr %443, i64 %445
  %447 = call { <2 x float>, <2 x float> } @_ZN6basisuL16vec4F_from_colorEPKN6basist13color_quad_u8E(ptr noundef %446)
  %448 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %23, i32 0, i32 0
  %449 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %448, i32 0, i32 0
  %450 = extractvalue { <2 x float>, <2 x float> } %447, 0
  store <2 x float> %450, ptr %449, align 4
  %451 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %448, i32 0, i32 1
  %452 = extractvalue { <2 x float>, <2 x float> } %447, 1
  store <2 x float> %452, ptr %451, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #12
  %453 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_subEPKNS_12bc7enc_vec4FES2_(ptr noundef %23, ptr noundef %20)
  %454 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %24, i32 0, i32 0
  %455 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %454, i32 0, i32 0
  %456 = extractvalue { <2 x float>, <2 x float> } %453, 0
  store <2 x float> %456, ptr %455, align 4
  %457 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %454, i32 0, i32 1
  %458 = extractvalue { <2 x float>, <2 x float> } %453, 1
  store <2 x float> %458, ptr %457, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 4 %24, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #12
  %459 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %23, i32 0, i32 0
  %460 = getelementptr inbounds [4 x float], ptr %459, i64 0, i64 0
  %461 = load float, ptr %460, align 4, !tbaa !28
  %462 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef %23, float noundef %461)
  %463 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %25, i32 0, i32 0
  %464 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %463, i32 0, i32 0
  %465 = extractvalue { <2 x float>, <2 x float> } %462, 0
  store <2 x float> %465, ptr %464, align 4
  %466 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %463, i32 0, i32 1
  %467 = extractvalue { <2 x float>, <2 x float> } %462, 1
  store <2 x float> %467, ptr %466, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #12
  %468 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %23, i32 0, i32 0
  %469 = getelementptr inbounds [4 x float], ptr %468, i64 0, i64 1
  %470 = load float, ptr %469, align 4, !tbaa !28
  %471 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef %23, float noundef %470)
  %472 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %26, i32 0, i32 0
  %473 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %472, i32 0, i32 0
  %474 = extractvalue { <2 x float>, <2 x float> } %471, 0
  store <2 x float> %474, ptr %473, align 4
  %475 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %472, i32 0, i32 1
  %476 = extractvalue { <2 x float>, <2 x float> } %471, 1
  store <2 x float> %476, ptr %475, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #12
  %477 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %23, i32 0, i32 0
  %478 = getelementptr inbounds [4 x float], ptr %477, i64 0, i64 2
  %479 = load float, ptr %478, align 4, !tbaa !28
  %480 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef %23, float noundef %479)
  %481 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %27, i32 0, i32 0
  %482 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %481, i32 0, i32 0
  %483 = extractvalue { <2 x float>, <2 x float> } %480, 0
  store <2 x float> %483, ptr %482, align 4
  %484 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %481, i32 0, i32 1
  %485 = extractvalue { <2 x float>, <2 x float> } %480, 1
  store <2 x float> %485, ptr %484, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #12
  %486 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %23, i32 0, i32 0
  %487 = getelementptr inbounds [4 x float], ptr %486, i64 0, i64 3
  %488 = load float, ptr %487, align 4, !tbaa !28
  %489 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef %23, float noundef %488)
  %490 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %28, i32 0, i32 0
  %491 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %490, i32 0, i32 0
  %492 = extractvalue { <2 x float>, <2 x float> } %489, 0
  store <2 x float> %492, ptr %491, align 4
  %493 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %490, i32 0, i32 1
  %494 = extractvalue { <2 x float>, <2 x float> } %489, 1
  store <2 x float> %494, ptr %493, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #12
  %495 = load i32, ptr %22, align 4, !tbaa !5
  %496 = icmp ne i32 %495, 0
  br i1 %496, label %497, label %498

497:                                              ; preds = %440
  br label %499

498:                                              ; preds = %440
  br label %499

499:                                              ; preds = %498, %497
  %500 = phi ptr [ %16, %497 ], [ %23, %498 ]
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 %500, i64 16, i1 false), !tbaa.struct !24
  %501 = call noundef ptr @_ZN6basisuL24vec4F_normalize_in_placeEPNS_12bc7enc_vec4FE(ptr noundef %29)
  %502 = call noundef float @_ZN6basisuL9vec4F_dotEPKNS_12bc7enc_vec4FES2_(ptr noundef %25, ptr noundef %29)
  %503 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %16, i32 0, i32 0
  %504 = getelementptr inbounds [4 x float], ptr %503, i64 0, i64 0
  %505 = load float, ptr %504, align 4, !tbaa !28
  %506 = fadd float %505, %502
  store float %506, ptr %504, align 4, !tbaa !28
  %507 = call noundef float @_ZN6basisuL9vec4F_dotEPKNS_12bc7enc_vec4FES2_(ptr noundef %26, ptr noundef %29)
  %508 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %16, i32 0, i32 0
  %509 = getelementptr inbounds [4 x float], ptr %508, i64 0, i64 1
  %510 = load float, ptr %509, align 4, !tbaa !28
  %511 = fadd float %510, %507
  store float %511, ptr %509, align 4, !tbaa !28
  %512 = call noundef float @_ZN6basisuL9vec4F_dotEPKNS_12bc7enc_vec4FES2_(ptr noundef %27, ptr noundef %29)
  %513 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %16, i32 0, i32 0
  %514 = getelementptr inbounds [4 x float], ptr %513, i64 0, i64 2
  %515 = load float, ptr %514, align 4, !tbaa !28
  %516 = fadd float %515, %512
  store float %516, ptr %514, align 4, !tbaa !28
  %517 = call noundef float @_ZN6basisuL9vec4F_dotEPKNS_12bc7enc_vec4FES2_(ptr noundef %28, ptr noundef %29)
  %518 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %16, i32 0, i32 0
  %519 = getelementptr inbounds [4 x float], ptr %518, i64 0, i64 3
  %520 = load float, ptr %519, align 4, !tbaa !28
  %521 = fadd float %520, %517
  store float %521, ptr %519, align 4, !tbaa !28
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #12
  br label %522

522:                                              ; preds = %499
  %523 = load i32, ptr %22, align 4, !tbaa !5
  %524 = add i32 %523, 1
  store i32 %524, ptr %22, align 4, !tbaa !5
  br label %433, !llvm.loop !30

525:                                              ; preds = %439
  %526 = call noundef ptr @_ZN6basisuL24vec4F_normalize_in_placeEPNS_12bc7enc_vec4FE(ptr noundef %16)
  br label %708

527:                                              ; preds = %402
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #12
  call void @llvm.memset.p0.i64(ptr align 16 %30, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #12
  store i32 0, ptr %31, align 4, !tbaa !5
  br label %528

528:                                              ; preds = %602, %527
  %529 = load i32, ptr %31, align 4, !tbaa !5
  %530 = load ptr, ptr %7, align 8, !tbaa !9
  %531 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %530, i32 0, i32 0
  %532 = load i32, ptr %531, align 8, !tbaa !22
  %533 = icmp ult i32 %529, %532
  br i1 %533, label %535, label %534

534:                                              ; preds = %528
  store i32 8, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #12
  br label %605

535:                                              ; preds = %528
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #12
  %536 = load ptr, ptr %7, align 8, !tbaa !9
  %537 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %536, i32 0, i32 1
  %538 = load ptr, ptr %537, align 8, !tbaa !23
  %539 = load i32, ptr %31, align 4, !tbaa !5
  %540 = zext i32 %539 to i64
  %541 = getelementptr inbounds %"struct.basist::color_quad_u8", ptr %538, i64 %540
  store ptr %541, ptr %32, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #12
  %542 = load ptr, ptr %32, align 8, !tbaa !9
  %543 = getelementptr inbounds %"struct.basist::color_quad_u8", ptr %542, i32 0, i32 0
  %544 = getelementptr inbounds [4 x i8], ptr %543, i64 0, i64 0
  %545 = load i8, ptr %544, align 1, !tbaa !25
  %546 = zext i8 %545 to i32
  %547 = sitofp i32 %546 to float
  %548 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %20, i32 0, i32 0
  %549 = getelementptr inbounds [4 x float], ptr %548, i64 0, i64 0
  %550 = load float, ptr %549, align 4, !tbaa !28
  %551 = fsub float %547, %550
  store float %551, ptr %33, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #12
  %552 = load ptr, ptr %32, align 8, !tbaa !9
  %553 = getelementptr inbounds %"struct.basist::color_quad_u8", ptr %552, i32 0, i32 0
  %554 = getelementptr inbounds [4 x i8], ptr %553, i64 0, i64 1
  %555 = load i8, ptr %554, align 1, !tbaa !25
  %556 = zext i8 %555 to i32
  %557 = sitofp i32 %556 to float
  %558 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %20, i32 0, i32 0
  %559 = getelementptr inbounds [4 x float], ptr %558, i64 0, i64 1
  %560 = load float, ptr %559, align 4, !tbaa !28
  %561 = fsub float %557, %560
  store float %561, ptr %34, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #12
  %562 = load ptr, ptr %32, align 8, !tbaa !9
  %563 = getelementptr inbounds %"struct.basist::color_quad_u8", ptr %562, i32 0, i32 0
  %564 = getelementptr inbounds [4 x i8], ptr %563, i64 0, i64 2
  %565 = load i8, ptr %564, align 1, !tbaa !25
  %566 = zext i8 %565 to i32
  %567 = sitofp i32 %566 to float
  %568 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %20, i32 0, i32 0
  %569 = getelementptr inbounds [4 x float], ptr %568, i64 0, i64 2
  %570 = load float, ptr %569, align 4, !tbaa !28
  %571 = fsub float %567, %570
  store float %571, ptr %35, align 4, !tbaa !28
  %572 = load float, ptr %33, align 4, !tbaa !28
  %573 = load float, ptr %33, align 4, !tbaa !28
  %574 = getelementptr inbounds [6 x float], ptr %30, i64 0, i64 0
  %575 = load float, ptr %574, align 16, !tbaa !28
  %576 = call float @llvm.fmuladd.f32(float %572, float %573, float %575)
  store float %576, ptr %574, align 16, !tbaa !28
  %577 = load float, ptr %33, align 4, !tbaa !28
  %578 = load float, ptr %34, align 4, !tbaa !28
  %579 = getelementptr inbounds [6 x float], ptr %30, i64 0, i64 1
  %580 = load float, ptr %579, align 4, !tbaa !28
  %581 = call float @llvm.fmuladd.f32(float %577, float %578, float %580)
  store float %581, ptr %579, align 4, !tbaa !28
  %582 = load float, ptr %33, align 4, !tbaa !28
  %583 = load float, ptr %35, align 4, !tbaa !28
  %584 = getelementptr inbounds [6 x float], ptr %30, i64 0, i64 2
  %585 = load float, ptr %584, align 8, !tbaa !28
  %586 = call float @llvm.fmuladd.f32(float %582, float %583, float %585)
  store float %586, ptr %584, align 8, !tbaa !28
  %587 = load float, ptr %34, align 4, !tbaa !28
  %588 = load float, ptr %34, align 4, !tbaa !28
  %589 = getelementptr inbounds [6 x float], ptr %30, i64 0, i64 3
  %590 = load float, ptr %589, align 4, !tbaa !28
  %591 = call float @llvm.fmuladd.f32(float %587, float %588, float %590)
  store float %591, ptr %589, align 4, !tbaa !28
  %592 = load float, ptr %34, align 4, !tbaa !28
  %593 = load float, ptr %35, align 4, !tbaa !28
  %594 = getelementptr inbounds [6 x float], ptr %30, i64 0, i64 4
  %595 = load float, ptr %594, align 16, !tbaa !28
  %596 = call float @llvm.fmuladd.f32(float %592, float %593, float %595)
  store float %596, ptr %594, align 16, !tbaa !28
  %597 = load float, ptr %35, align 4, !tbaa !28
  %598 = load float, ptr %35, align 4, !tbaa !28
  %599 = getelementptr inbounds [6 x float], ptr %30, i64 0, i64 5
  %600 = load float, ptr %599, align 4, !tbaa !28
  %601 = call float @llvm.fmuladd.f32(float %597, float %598, float %600)
  store float %601, ptr %599, align 4, !tbaa !28
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #12
  br label %602

602:                                              ; preds = %535
  %603 = load i32, ptr %31, align 4, !tbaa !5
  %604 = add i32 %603, 1
  store i32 %604, ptr %31, align 4, !tbaa !5
  br label %528, !llvm.loop !31

605:                                              ; preds = %534
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #12
  store float 0x3FECCCCCC0000000, ptr %36, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #12
  store float 1.000000e+00, ptr %37, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #12
  store float 0x3FE6666660000000, ptr %38, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #12
  store i32 0, ptr %39, align 4, !tbaa !5
  br label %606

606:                                              ; preds = %673, %605
  %607 = load i32, ptr %39, align 4, !tbaa !5
  %608 = icmp ult i32 %607, 3
  br i1 %608, label %610, label %609

609:                                              ; preds = %606
  store i32 11, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #12
  br label %676

610:                                              ; preds = %606
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #12
  %611 = load float, ptr %36, align 4, !tbaa !28
  %612 = getelementptr inbounds [6 x float], ptr %30, i64 0, i64 0
  %613 = load float, ptr %612, align 16, !tbaa !28
  %614 = load float, ptr %37, align 4, !tbaa !28
  %615 = getelementptr inbounds [6 x float], ptr %30, i64 0, i64 1
  %616 = load float, ptr %615, align 4, !tbaa !28
  %617 = fmul float %614, %616
  %618 = call float @llvm.fmuladd.f32(float %611, float %613, float %617)
  %619 = load float, ptr %38, align 4, !tbaa !28
  %620 = getelementptr inbounds [6 x float], ptr %30, i64 0, i64 2
  %621 = load float, ptr %620, align 8, !tbaa !28
  %622 = call float @llvm.fmuladd.f32(float %619, float %621, float %618)
  store float %622, ptr %40, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #12
  %623 = load float, ptr %36, align 4, !tbaa !28
  %624 = getelementptr inbounds [6 x float], ptr %30, i64 0, i64 1
  %625 = load float, ptr %624, align 4, !tbaa !28
  %626 = load float, ptr %37, align 4, !tbaa !28
  %627 = getelementptr inbounds [6 x float], ptr %30, i64 0, i64 3
  %628 = load float, ptr %627, align 4, !tbaa !28
  %629 = fmul float %626, %628
  %630 = call float @llvm.fmuladd.f32(float %623, float %625, float %629)
  %631 = load float, ptr %38, align 4, !tbaa !28
  %632 = getelementptr inbounds [6 x float], ptr %30, i64 0, i64 4
  %633 = load float, ptr %632, align 16, !tbaa !28
  %634 = call float @llvm.fmuladd.f32(float %631, float %633, float %630)
  store float %634, ptr %41, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #12
  %635 = load float, ptr %36, align 4, !tbaa !28
  %636 = getelementptr inbounds [6 x float], ptr %30, i64 0, i64 2
  %637 = load float, ptr %636, align 8, !tbaa !28
  %638 = load float, ptr %37, align 4, !tbaa !28
  %639 = getelementptr inbounds [6 x float], ptr %30, i64 0, i64 4
  %640 = load float, ptr %639, align 16, !tbaa !28
  %641 = fmul float %638, %640
  %642 = call float @llvm.fmuladd.f32(float %635, float %637, float %641)
  %643 = load float, ptr %38, align 4, !tbaa !28
  %644 = getelementptr inbounds [6 x float], ptr %30, i64 0, i64 5
  %645 = load float, ptr %644, align 4, !tbaa !28
  %646 = call float @llvm.fmuladd.f32(float %643, float %645, float %642)
  store float %646, ptr %42, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #12
  %647 = load float, ptr %40, align 4, !tbaa !28
  %648 = call float @llvm.fabs.f32(float %647)
  %649 = load float, ptr %41, align 4, !tbaa !28
  %650 = call float @llvm.fabs.f32(float %649)
  %651 = call noundef float @_ZN6basisu8maximumfEff(float noundef %648, float noundef %650)
  %652 = load float, ptr %42, align 4, !tbaa !28
  %653 = call float @llvm.fabs.f32(float %652)
  %654 = call noundef float @_ZN6basisu8maximumfEff(float noundef %651, float noundef %653)
  store float %654, ptr %43, align 4, !tbaa !28
  %655 = load float, ptr %43, align 4, !tbaa !28
  %656 = fcmp ogt float %655, 0x3DDB7CDFE0000000
  br i1 %656, label %657, label %669

657:                                              ; preds = %610
  %658 = load float, ptr %43, align 4, !tbaa !28
  %659 = fdiv float 1.000000e+00, %658
  store float %659, ptr %43, align 4, !tbaa !28
  %660 = load float, ptr %43, align 4, !tbaa !28
  %661 = load float, ptr %40, align 4, !tbaa !28
  %662 = fmul float %661, %660
  store float %662, ptr %40, align 4, !tbaa !28
  %663 = load float, ptr %43, align 4, !tbaa !28
  %664 = load float, ptr %41, align 4, !tbaa !28
  %665 = fmul float %664, %663
  store float %665, ptr %41, align 4, !tbaa !28
  %666 = load float, ptr %43, align 4, !tbaa !28
  %667 = load float, ptr %42, align 4, !tbaa !28
  %668 = fmul float %667, %666
  store float %668, ptr %42, align 4, !tbaa !28
  br label %669

669:                                              ; preds = %657, %610
  %670 = load float, ptr %40, align 4, !tbaa !28
  store float %670, ptr %36, align 4, !tbaa !28
  %671 = load float, ptr %41, align 4, !tbaa !28
  store float %671, ptr %37, align 4, !tbaa !28
  %672 = load float, ptr %42, align 4, !tbaa !28
  store float %672, ptr %38, align 4, !tbaa !28
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #12
  br label %673

673:                                              ; preds = %669
  %674 = load i32, ptr %39, align 4, !tbaa !5
  %675 = add i32 %674, 1
  store i32 %675, ptr %39, align 4, !tbaa !5
  br label %606, !llvm.loop !32

676:                                              ; preds = %609
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #12
  %677 = load float, ptr %36, align 4, !tbaa !28
  %678 = load float, ptr %36, align 4, !tbaa !28
  %679 = load float, ptr %37, align 4, !tbaa !28
  %680 = load float, ptr %37, align 4, !tbaa !28
  %681 = fmul float %679, %680
  %682 = call float @llvm.fmuladd.f32(float %677, float %678, float %681)
  %683 = load float, ptr %38, align 4, !tbaa !28
  %684 = load float, ptr %38, align 4, !tbaa !28
  %685 = call float @llvm.fmuladd.f32(float %683, float %684, float %682)
  store float %685, ptr %44, align 4, !tbaa !28
  %686 = load float, ptr %44, align 4, !tbaa !28
  %687 = fcmp olt float %686, 0x3DDB7CDFE0000000
  br i1 %687, label %688, label %690

688:                                              ; preds = %676
  %689 = call noundef ptr @_ZN6basisuL16vec4F_set_scalarEPNS_12bc7enc_vec4FEf(ptr noundef %16, float noundef 0.000000e+00)
  br label %707

690:                                              ; preds = %676
  %691 = load float, ptr %44, align 4, !tbaa !28
  %692 = call float @sqrtf(float noundef %691) #12
  %693 = fdiv float 1.000000e+00, %692
  store float %693, ptr %44, align 4, !tbaa !28
  %694 = load float, ptr %44, align 4, !tbaa !28
  %695 = load float, ptr %36, align 4, !tbaa !28
  %696 = fmul float %695, %694
  store float %696, ptr %36, align 4, !tbaa !28
  %697 = load float, ptr %44, align 4, !tbaa !28
  %698 = load float, ptr %37, align 4, !tbaa !28
  %699 = fmul float %698, %697
  store float %699, ptr %37, align 4, !tbaa !28
  %700 = load float, ptr %44, align 4, !tbaa !28
  %701 = load float, ptr %38, align 4, !tbaa !28
  %702 = fmul float %701, %700
  store float %702, ptr %38, align 4, !tbaa !28
  %703 = load float, ptr %36, align 4, !tbaa !28
  %704 = load float, ptr %37, align 4, !tbaa !28
  %705 = load float, ptr %38, align 4, !tbaa !28
  %706 = call noundef ptr @_ZN6basisuL9vec4F_setEPNS_12bc7enc_vec4FEffff(ptr noundef %16, float noundef %703, float noundef %704, float noundef %705, float noundef 0.000000e+00)
  br label %707

707:                                              ; preds = %690, %688
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #12
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #12
  br label %708

708:                                              ; preds = %707, %525
  %709 = call noundef float @_ZN6basisuL9vec4F_dotEPKNS_12bc7enc_vec4FES2_(ptr noundef %16, ptr noundef %16)
  %710 = fcmp olt float %709, 5.000000e-01
  br i1 %710, label %711, label %734

711:                                              ; preds = %708
  %712 = load ptr, ptr %7, align 8, !tbaa !9
  %713 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %712, i32 0, i32 12
  %714 = load i8, ptr %713, align 1, !tbaa !33
  %715 = icmp ne i8 %714, 0
  br i1 %715, label %716, label %724

716:                                              ; preds = %711
  %717 = load ptr, ptr %7, align 8, !tbaa !9
  %718 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %717, i32 0, i32 9
  %719 = load i8, ptr %718, align 4, !tbaa !13
  %720 = icmp ne i8 %719, 0
  %721 = zext i1 %720 to i64
  %722 = select i1 %720, float 0x3FE6E147A0000000, float 0.000000e+00
  %723 = call noundef ptr @_ZN6basisuL9vec4F_setEPNS_12bc7enc_vec4FEffff(ptr noundef %16, float noundef 0x3FCB439580000000, float noundef 0x3FE6E147A0000000, float noundef 0x3FB26E9780000000, float noundef %722)
  br label %732

724:                                              ; preds = %711
  %725 = load ptr, ptr %7, align 8, !tbaa !9
  %726 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %725, i32 0, i32 9
  %727 = load i8, ptr %726, align 4, !tbaa !13
  %728 = icmp ne i8 %727, 0
  %729 = zext i1 %728 to i64
  %730 = select i1 %728, float 1.000000e+00, float 0.000000e+00
  %731 = call noundef ptr @_ZN6basisuL9vec4F_setEPNS_12bc7enc_vec4FEffff(ptr noundef %16, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef %730)
  br label %732

732:                                              ; preds = %724, %716
  %733 = call noundef ptr @_ZN6basisuL24vec4F_normalize_in_placeEPNS_12bc7enc_vec4FE(ptr noundef %16)
  br label %734

734:                                              ; preds = %732, %708
  call void @llvm.lifetime.start.p0(i64 16, ptr %45) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %46) #12
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #12
  store float 1.000000e+09, ptr %47, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #12
  store float -1.000000e+09, ptr %48, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #12
  store i32 0, ptr %49, align 4, !tbaa !5
  br label %735

735:                                              ; preds = %768, %734
  %736 = load i32, ptr %49, align 4, !tbaa !5
  %737 = load ptr, ptr %7, align 8, !tbaa !9
  %738 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %737, i32 0, i32 0
  %739 = load i32, ptr %738, align 8, !tbaa !22
  %740 = icmp ult i32 %736, %739
  br i1 %740, label %742, label %741

741:                                              ; preds = %735
  store i32 14, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #12
  br label %771

742:                                              ; preds = %735
  call void @llvm.lifetime.start.p0(i64 16, ptr %50) #12
  %743 = load ptr, ptr %7, align 8, !tbaa !9
  %744 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %743, i32 0, i32 1
  %745 = load ptr, ptr %744, align 8, !tbaa !23
  %746 = load i32, ptr %49, align 4, !tbaa !5
  %747 = zext i32 %746 to i64
  %748 = getelementptr inbounds %"struct.basist::color_quad_u8", ptr %745, i64 %747
  %749 = call { <2 x float>, <2 x float> } @_ZN6basisuL16vec4F_from_colorEPKN6basist13color_quad_u8E(ptr noundef %748)
  %750 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %50, i32 0, i32 0
  %751 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %750, i32 0, i32 0
  %752 = extractvalue { <2 x float>, <2 x float> } %749, 0
  store <2 x float> %752, ptr %751, align 4
  %753 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %750, i32 0, i32 1
  %754 = extractvalue { <2 x float>, <2 x float> } %749, 1
  store <2 x float> %754, ptr %753, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %51) #12
  %755 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_subEPKNS_12bc7enc_vec4FES2_(ptr noundef %50, ptr noundef %20)
  %756 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %51, i32 0, i32 0
  %757 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %756, i32 0, i32 0
  %758 = extractvalue { <2 x float>, <2 x float> } %755, 0
  store <2 x float> %758, ptr %757, align 4
  %759 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %756, i32 0, i32 1
  %760 = extractvalue { <2 x float>, <2 x float> } %755, 1
  store <2 x float> %760, ptr %759, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #12
  %761 = call noundef float @_ZN6basisuL9vec4F_dotEPKNS_12bc7enc_vec4FES2_(ptr noundef %51, ptr noundef %16)
  store float %761, ptr %52, align 4, !tbaa !28
  %762 = load float, ptr %47, align 4, !tbaa !28
  %763 = load float, ptr %52, align 4, !tbaa !28
  %764 = call noundef float @_ZN6basisu8minimumfEff(float noundef %762, float noundef %763)
  store float %764, ptr %47, align 4, !tbaa !28
  %765 = load float, ptr %48, align 4, !tbaa !28
  %766 = load float, ptr %52, align 4, !tbaa !28
  %767 = call noundef float @_ZN6basisu8maximumfEff(float noundef %765, float noundef %766)
  store float %767, ptr %48, align 4, !tbaa !28
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %51) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %50) #12
  br label %768

768:                                              ; preds = %742
  %769 = load i32, ptr %49, align 4, !tbaa !5
  %770 = add i32 %769, 1
  store i32 %770, ptr %49, align 4, !tbaa !5
  br label %735, !llvm.loop !34

771:                                              ; preds = %741
  %772 = load float, ptr %47, align 4, !tbaa !28
  %773 = fmul float %772, 0x3F70101020000000
  store float %773, ptr %47, align 4, !tbaa !28
  %774 = load float, ptr %48, align 4, !tbaa !28
  %775 = fmul float %774, 0x3F70101020000000
  store float %775, ptr %48, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 16, ptr %53) #12
  %776 = load float, ptr %47, align 4, !tbaa !28
  %777 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef %16, float noundef %776)
  %778 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %53, i32 0, i32 0
  %779 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %778, i32 0, i32 0
  %780 = extractvalue { <2 x float>, <2 x float> } %777, 0
  store <2 x float> %780, ptr %779, align 4
  %781 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %778, i32 0, i32 1
  %782 = extractvalue { <2 x float>, <2 x float> } %777, 1
  store <2 x float> %782, ptr %781, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %54) #12
  %783 = load float, ptr %48, align 4, !tbaa !28
  %784 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef %16, float noundef %783)
  %785 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %54, i32 0, i32 0
  %786 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %785, i32 0, i32 0
  %787 = extractvalue { <2 x float>, <2 x float> } %784, 0
  store <2 x float> %787, ptr %786, align 4
  %788 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %785, i32 0, i32 1
  %789 = extractvalue { <2 x float>, <2 x float> } %784, 1
  store <2 x float> %789, ptr %788, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %55) #12
  %790 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_addEPKNS_12bc7enc_vec4FES2_(ptr noundef %15, ptr noundef %53)
  %791 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %55, i32 0, i32 0
  %792 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %791, i32 0, i32 0
  %793 = extractvalue { <2 x float>, <2 x float> } %790, 0
  store <2 x float> %793, ptr %792, align 4
  %794 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %791, i32 0, i32 1
  %795 = extractvalue { <2 x float>, <2 x float> } %790, 1
  store <2 x float> %795, ptr %794, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %56) #12
  %796 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_addEPKNS_12bc7enc_vec4FES2_(ptr noundef %15, ptr noundef %54)
  %797 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %56, i32 0, i32 0
  %798 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %797, i32 0, i32 0
  %799 = extractvalue { <2 x float>, <2 x float> } %796, 0
  store <2 x float> %799, ptr %798, align 4
  %800 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %797, i32 0, i32 1
  %801 = extractvalue { <2 x float>, <2 x float> } %796, 1
  store <2 x float> %801, ptr %800, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %57) #12
  %802 = call { <2 x float>, <2 x float> } @_ZN6basisuL14vec4F_saturateEPKNS_12bc7enc_vec4FE(ptr noundef %55)
  %803 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %57, i32 0, i32 0
  %804 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %803, i32 0, i32 0
  %805 = extractvalue { <2 x float>, <2 x float> } %802, 0
  store <2 x float> %805, ptr %804, align 4
  %806 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %803, i32 0, i32 1
  %807 = extractvalue { <2 x float>, <2 x float> } %802, 1
  store <2 x float> %807, ptr %806, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %45, ptr align 4 %57, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 16, ptr %57) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %58) #12
  %808 = call { <2 x float>, <2 x float> } @_ZN6basisuL14vec4F_saturateEPKNS_12bc7enc_vec4FE(ptr noundef %56)
  %809 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %58, i32 0, i32 0
  %810 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %809, i32 0, i32 0
  %811 = extractvalue { <2 x float>, <2 x float> } %808, 0
  store <2 x float> %811, ptr %810, align 4
  %812 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %809, i32 0, i32 1
  %813 = extractvalue { <2 x float>, <2 x float> } %808, 1
  store <2 x float> %813, ptr %812, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %46, ptr align 4 %58, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 16, ptr %58) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %59) #12
  %814 = call noundef ptr @_ZN6basisuL16vec4F_set_scalarEPNS_12bc7enc_vec4FEf(ptr noundef %59, float noundef 1.000000e+00)
  %815 = call noundef float @_ZN6basisuL9vec4F_dotEPKNS_12bc7enc_vec4FES2_(ptr noundef %45, ptr noundef %59)
  %816 = call noundef float @_ZN6basisuL9vec4F_dotEPKNS_12bc7enc_vec4FES2_(ptr noundef %46, ptr noundef %59)
  %817 = fcmp ogt float %815, %816
  br i1 %817, label %818, label %835

818:                                              ; preds = %771
  %819 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %45, i32 0, i32 0
  %820 = getelementptr inbounds [4 x float], ptr %819, i64 0, i64 0
  %821 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %46, i32 0, i32 0
  %822 = getelementptr inbounds [4 x float], ptr %821, i64 0, i64 0
  call void @_ZSt4swapIfENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %820, ptr noundef nonnull align 4 dereferenceable(4) %822) #12
  %823 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %45, i32 0, i32 0
  %824 = getelementptr inbounds [4 x float], ptr %823, i64 0, i64 1
  %825 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %46, i32 0, i32 0
  %826 = getelementptr inbounds [4 x float], ptr %825, i64 0, i64 1
  call void @_ZSt4swapIfENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %824, ptr noundef nonnull align 4 dereferenceable(4) %826) #12
  %827 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %45, i32 0, i32 0
  %828 = getelementptr inbounds [4 x float], ptr %827, i64 0, i64 2
  %829 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %46, i32 0, i32 0
  %830 = getelementptr inbounds [4 x float], ptr %829, i64 0, i64 2
  call void @_ZSt4swapIfENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %828, ptr noundef nonnull align 4 dereferenceable(4) %830) #12
  %831 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %45, i32 0, i32 0
  %832 = getelementptr inbounds [4 x float], ptr %831, i64 0, i64 3
  %833 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %46, i32 0, i32 0
  %834 = getelementptr inbounds [4 x float], ptr %833, i64 0, i64 3
  call void @_ZSt4swapIfENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %832, ptr noundef nonnull align 4 dereferenceable(4) %834) #12
  br label %835

835:                                              ; preds = %818, %771
  %836 = load i32, ptr %6, align 4, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %60, ptr align 4 %45, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %61, ptr align 4 %46, i64 16, i1 false), !tbaa.struct !24
  %837 = load ptr, ptr %7, align 8, !tbaa !9
  %838 = load ptr, ptr %8, align 8, !tbaa !9
  %839 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %60, i32 0, i32 0
  %840 = load <2 x float>, ptr %839, align 4
  %841 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %60, i32 0, i32 1
  %842 = load <2 x float>, ptr %841, align 4
  %843 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %61, i32 0, i32 0
  %844 = load <2 x float>, ptr %843, align 4
  %845 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %61, i32 0, i32 1
  %846 = load <2 x float>, ptr %845, align 4
  %847 = call noundef i64 @_ZN6basisuL21find_optimal_solutionEjNS_12bc7enc_vec4FES0_PKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsE(i32 noundef %836, <2 x float> %840, <2 x float> %842, <2 x float> %844, <2 x float> %846, ptr noundef %837, ptr noundef %838)
  %848 = icmp ne i64 %847, 0
  br i1 %848, label %850, label %849

849:                                              ; preds = %835
  store i64 0, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %1801

850:                                              ; preds = %835
  call void @llvm.lifetime.start.p0(i64 4, ptr %62) #12
  store i32 0, ptr %62, align 4, !tbaa !5
  br label %851

851:                                              ; preds = %922, %850
  %852 = load i32, ptr %62, align 4, !tbaa !5
  %853 = load ptr, ptr %9, align 8, !tbaa !9
  %854 = getelementptr inbounds %"struct.basisu::bc7enc_compress_block_params", ptr %853, i32 0, i32 4
  %855 = load i32, ptr %854, align 4, !tbaa !35
  %856 = icmp ult i32 %852, %855
  br i1 %856, label %858, label %857

857:                                              ; preds = %851
  store i32 17, ptr %14, align 4
  br label %925

858:                                              ; preds = %851
  call void @llvm.lifetime.start.p0(i64 16, ptr %63) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %64) #12
  %859 = call noundef ptr @_ZN6basisuL16vec4F_set_scalarEPNS_12bc7enc_vec4FEf(ptr noundef %63, float noundef 0.000000e+00)
  %860 = call noundef ptr @_ZN6basisuL16vec4F_set_scalarEPNS_12bc7enc_vec4FEf(ptr noundef %64, float noundef 0.000000e+00)
  %861 = load ptr, ptr %7, align 8, !tbaa !9
  %862 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %861, i32 0, i32 9
  %863 = load i8, ptr %862, align 4, !tbaa !13
  %864 = icmp ne i8 %863, 0
  br i1 %864, label %865, label %878

865:                                              ; preds = %858
  %866 = load ptr, ptr %7, align 8, !tbaa !9
  %867 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %866, i32 0, i32 0
  %868 = load i32, ptr %867, align 8, !tbaa !22
  %869 = load ptr, ptr %8, align 8, !tbaa !9
  %870 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %869, i32 0, i32 4
  %871 = load ptr, ptr %870, align 8, !tbaa !21
  %872 = load ptr, ptr %7, align 8, !tbaa !9
  %873 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %872, i32 0, i32 4
  %874 = load ptr, ptr %873, align 8, !tbaa !37
  %875 = load ptr, ptr %7, align 8, !tbaa !9
  %876 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %875, i32 0, i32 1
  %877 = load ptr, ptr %876, align 8, !tbaa !23
  call void @_ZN6basisuL36compute_least_squares_endpoints_rgbaEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef %868, ptr noundef %871, ptr noundef %874, ptr noundef %63, ptr noundef %64, ptr noundef %877)
  br label %891

878:                                              ; preds = %858
  %879 = load ptr, ptr %7, align 8, !tbaa !9
  %880 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %879, i32 0, i32 0
  %881 = load i32, ptr %880, align 8, !tbaa !22
  %882 = load ptr, ptr %8, align 8, !tbaa !9
  %883 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %882, i32 0, i32 4
  %884 = load ptr, ptr %883, align 8, !tbaa !21
  %885 = load ptr, ptr %7, align 8, !tbaa !9
  %886 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %885, i32 0, i32 4
  %887 = load ptr, ptr %886, align 8, !tbaa !37
  %888 = load ptr, ptr %7, align 8, !tbaa !9
  %889 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %888, i32 0, i32 1
  %890 = load ptr, ptr %889, align 8, !tbaa !23
  call void @_ZN6basisuL35compute_least_squares_endpoints_rgbEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef %881, ptr noundef %884, ptr noundef %887, ptr noundef %63, ptr noundef %64, ptr noundef %890)
  br label %891

891:                                              ; preds = %878, %865
  call void @llvm.lifetime.start.p0(i64 16, ptr %65) #12
  %892 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef %63, float noundef 0x3F70101020000000)
  %893 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %65, i32 0, i32 0
  %894 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %893, i32 0, i32 0
  %895 = extractvalue { <2 x float>, <2 x float> } %892, 0
  store <2 x float> %895, ptr %894, align 4
  %896 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %893, i32 0, i32 1
  %897 = extractvalue { <2 x float>, <2 x float> } %892, 1
  store <2 x float> %897, ptr %896, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %63, ptr align 4 %65, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 16, ptr %65) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %66) #12
  %898 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef %64, float noundef 0x3F70101020000000)
  %899 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %66, i32 0, i32 0
  %900 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %899, i32 0, i32 0
  %901 = extractvalue { <2 x float>, <2 x float> } %898, 0
  store <2 x float> %901, ptr %900, align 4
  %902 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %899, i32 0, i32 1
  %903 = extractvalue { <2 x float>, <2 x float> } %898, 1
  store <2 x float> %903, ptr %902, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %64, ptr align 4 %66, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 16, ptr %66) #12
  %904 = load i32, ptr %6, align 4, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %67, ptr align 4 %63, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %68, ptr align 4 %64, i64 16, i1 false), !tbaa.struct !24
  %905 = load ptr, ptr %7, align 8, !tbaa !9
  %906 = load ptr, ptr %8, align 8, !tbaa !9
  %907 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %67, i32 0, i32 0
  %908 = load <2 x float>, ptr %907, align 4
  %909 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %67, i32 0, i32 1
  %910 = load <2 x float>, ptr %909, align 4
  %911 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %68, i32 0, i32 0
  %912 = load <2 x float>, ptr %911, align 4
  %913 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %68, i32 0, i32 1
  %914 = load <2 x float>, ptr %913, align 4
  %915 = call noundef i64 @_ZN6basisuL21find_optimal_solutionEjNS_12bc7enc_vec4FES0_PKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsE(i32 noundef %904, <2 x float> %908, <2 x float> %910, <2 x float> %912, <2 x float> %914, ptr noundef %905, ptr noundef %906)
  %916 = icmp ne i64 %915, 0
  br i1 %916, label %918, label %917

917:                                              ; preds = %891
  store i64 0, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %919

918:                                              ; preds = %891
  store i32 0, ptr %14, align 4
  br label %919

919:                                              ; preds = %918, %917
  call void @llvm.lifetime.end.p0(i64 16, ptr %64) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %63) #12
  %920 = load i32, ptr %14, align 4
  switch i32 %920, label %925 [
    i32 0, label %921
  ]

921:                                              ; preds = %919
  br label %922

922:                                              ; preds = %921
  %923 = load i32, ptr %62, align 4, !tbaa !5
  %924 = add i32 %923, 1
  store i32 %924, ptr %62, align 4, !tbaa !5
  br label %851, !llvm.loop !38

925:                                              ; preds = %919, %857
  call void @llvm.lifetime.end.p0(i64 4, ptr %62) #12
  %926 = load i32, ptr %14, align 4
  switch i32 %926, label %1801 [
    i32 17, label %927
  ]

927:                                              ; preds = %925
  %928 = load ptr, ptr %7, align 8, !tbaa !9
  %929 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %928, i32 0, i32 6
  %930 = load ptr, ptr %929, align 8, !tbaa !20
  %931 = icmp ne ptr %930, null
  br i1 %931, label %1420, label %932

932:                                              ; preds = %927
  %933 = load ptr, ptr %9, align 8, !tbaa !9
  %934 = getelementptr inbounds %"struct.basisu::bc7enc_compress_block_params", ptr %933, i32 0, i32 2
  %935 = load i32, ptr %934, align 4, !tbaa !39
  %936 = icmp ugt i32 %935, 0
  br i1 %936, label %937, label %1420

937:                                              ; preds = %932
  call void @llvm.lifetime.start.p0(i64 16, ptr %69) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %70) #12
  %938 = getelementptr inbounds [16 x i8], ptr %69, i64 0, i64 0
  %939 = load ptr, ptr %8, align 8, !tbaa !9
  %940 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %939, i32 0, i32 4
  %941 = load ptr, ptr %940, align 8, !tbaa !21
  %942 = load ptr, ptr %7, align 8, !tbaa !9
  %943 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %942, i32 0, i32 0
  %944 = load i32, ptr %943, align 8, !tbaa !22
  %945 = zext i32 %944 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %938, ptr align 1 %941, i64 %945, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %71) #12
  %946 = load ptr, ptr %7, align 8, !tbaa !9
  %947 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %946, i32 0, i32 2
  %948 = load i32, ptr %947, align 8, !tbaa !14
  %949 = sub i32 %948, 1
  store i32 %949, ptr %71, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %72) #12
  store i32 256, ptr %72, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %73) #12
  store i32 0, ptr %73, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %74) #12
  store i32 0, ptr %74, align 4, !tbaa !5
  br label %950

950:                                              ; preds = %969, %937
  %951 = load i32, ptr %74, align 4, !tbaa !5
  %952 = load ptr, ptr %7, align 8, !tbaa !9
  %953 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %952, i32 0, i32 0
  %954 = load i32, ptr %953, align 8, !tbaa !22
  %955 = icmp ult i32 %951, %954
  br i1 %955, label %957, label %956

956:                                              ; preds = %950
  store i32 20, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %74) #12
  br label %972

957:                                              ; preds = %950
  call void @llvm.lifetime.start.p0(i64 4, ptr %75) #12
  %958 = load i32, ptr %74, align 4, !tbaa !5
  %959 = zext i32 %958 to i64
  %960 = getelementptr inbounds [16 x i8], ptr %69, i64 0, i64 %959
  %961 = load i8, ptr %960, align 1, !tbaa !25
  %962 = zext i8 %961 to i32
  store i32 %962, ptr %75, align 4, !tbaa !5
  %963 = load i32, ptr %72, align 4, !tbaa !5
  %964 = load i32, ptr %75, align 4, !tbaa !5
  %965 = call noundef i32 @_ZN6basisu8minimumuEjj(i32 noundef %963, i32 noundef %964)
  store i32 %965, ptr %72, align 4, !tbaa !5
  %966 = load i32, ptr %73, align 4, !tbaa !5
  %967 = load i32, ptr %75, align 4, !tbaa !5
  %968 = call noundef i32 @_ZN6basisu8maximumuEjj(i32 noundef %966, i32 noundef %967)
  store i32 %968, ptr %73, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %75) #12
  br label %969

969:                                              ; preds = %957
  %970 = load i32, ptr %74, align 4, !tbaa !5
  %971 = add i32 %970, 1
  store i32 %971, ptr %74, align 4, !tbaa !5
  br label %950, !llvm.loop !40

972:                                              ; preds = %956
  call void @llvm.lifetime.start.p0(i64 4, ptr %76) #12
  store i32 0, ptr %76, align 4, !tbaa !5
  br label %973

973:                                              ; preds = %1005, %972
  %974 = load i32, ptr %76, align 4, !tbaa !5
  %975 = load ptr, ptr %7, align 8, !tbaa !9
  %976 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %975, i32 0, i32 0
  %977 = load i32, ptr %976, align 8, !tbaa !22
  %978 = icmp ult i32 %974, %977
  br i1 %978, label %980, label %979

979:                                              ; preds = %973
  store i32 23, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %76) #12
  br label %1008

980:                                              ; preds = %973
  call void @llvm.lifetime.start.p0(i64 4, ptr %77) #12
  %981 = load i32, ptr %76, align 4, !tbaa !5
  %982 = zext i32 %981 to i64
  %983 = getelementptr inbounds [16 x i8], ptr %69, i64 0, i64 %982
  %984 = load i8, ptr %983, align 1, !tbaa !25
  %985 = zext i8 %984 to i32
  store i32 %985, ptr %77, align 4, !tbaa !5
  %986 = load i32, ptr %77, align 4, !tbaa !5
  %987 = load i32, ptr %72, align 4, !tbaa !5
  %988 = icmp eq i32 %986, %987
  br i1 %988, label %989, label %999

989:                                              ; preds = %980
  %990 = load i32, ptr %77, align 4, !tbaa !5
  %991 = load ptr, ptr %7, align 8, !tbaa !9
  %992 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %991, i32 0, i32 2
  %993 = load i32, ptr %992, align 8, !tbaa !14
  %994 = sub i32 %993, 1
  %995 = icmp ult i32 %990, %994
  br i1 %995, label %996, label %999

996:                                              ; preds = %989
  %997 = load i32, ptr %77, align 4, !tbaa !5
  %998 = add i32 %997, 1
  store i32 %998, ptr %77, align 4, !tbaa !5
  br label %999

999:                                              ; preds = %996, %989, %980
  %1000 = load i32, ptr %77, align 4, !tbaa !5
  %1001 = trunc i32 %1000 to i8
  %1002 = load i32, ptr %76, align 4, !tbaa !5
  %1003 = zext i32 %1002 to i64
  %1004 = getelementptr inbounds [16 x i8], ptr %70, i64 0, i64 %1003
  store i8 %1001, ptr %1004, align 1, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 4, ptr %77) #12
  br label %1005

1005:                                             ; preds = %999
  %1006 = load i32, ptr %76, align 4, !tbaa !5
  %1007 = add i32 %1006, 1
  store i32 %1007, ptr %76, align 4, !tbaa !5
  br label %973, !llvm.loop !41

1008:                                             ; preds = %979
  call void @llvm.lifetime.start.p0(i64 16, ptr %78) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %79) #12
  %1009 = call noundef ptr @_ZN6basisuL16vec4F_set_scalarEPNS_12bc7enc_vec4FEf(ptr noundef %78, float noundef 0.000000e+00)
  %1010 = call noundef ptr @_ZN6basisuL16vec4F_set_scalarEPNS_12bc7enc_vec4FEf(ptr noundef %79, float noundef 0.000000e+00)
  %1011 = load ptr, ptr %7, align 8, !tbaa !9
  %1012 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1011, i32 0, i32 9
  %1013 = load i8, ptr %1012, align 4, !tbaa !13
  %1014 = icmp ne i8 %1013, 0
  br i1 %1014, label %1015, label %1026

1015:                                             ; preds = %1008
  %1016 = load ptr, ptr %7, align 8, !tbaa !9
  %1017 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1016, i32 0, i32 0
  %1018 = load i32, ptr %1017, align 8, !tbaa !22
  %1019 = getelementptr inbounds [16 x i8], ptr %70, i64 0, i64 0
  %1020 = load ptr, ptr %7, align 8, !tbaa !9
  %1021 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1020, i32 0, i32 4
  %1022 = load ptr, ptr %1021, align 8, !tbaa !37
  %1023 = load ptr, ptr %7, align 8, !tbaa !9
  %1024 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1023, i32 0, i32 1
  %1025 = load ptr, ptr %1024, align 8, !tbaa !23
  call void @_ZN6basisuL36compute_least_squares_endpoints_rgbaEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef %1018, ptr noundef %1019, ptr noundef %1022, ptr noundef %78, ptr noundef %79, ptr noundef %1025)
  br label %1037

1026:                                             ; preds = %1008
  %1027 = load ptr, ptr %7, align 8, !tbaa !9
  %1028 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1027, i32 0, i32 0
  %1029 = load i32, ptr %1028, align 8, !tbaa !22
  %1030 = getelementptr inbounds [16 x i8], ptr %70, i64 0, i64 0
  %1031 = load ptr, ptr %7, align 8, !tbaa !9
  %1032 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1031, i32 0, i32 4
  %1033 = load ptr, ptr %1032, align 8, !tbaa !37
  %1034 = load ptr, ptr %7, align 8, !tbaa !9
  %1035 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1034, i32 0, i32 1
  %1036 = load ptr, ptr %1035, align 8, !tbaa !23
  call void @_ZN6basisuL35compute_least_squares_endpoints_rgbEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef %1029, ptr noundef %1030, ptr noundef %1033, ptr noundef %78, ptr noundef %79, ptr noundef %1036)
  br label %1037

1037:                                             ; preds = %1026, %1015
  call void @llvm.lifetime.start.p0(i64 16, ptr %80) #12
  %1038 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef %78, float noundef 0x3F70101020000000)
  %1039 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %80, i32 0, i32 0
  %1040 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %1039, i32 0, i32 0
  %1041 = extractvalue { <2 x float>, <2 x float> } %1038, 0
  store <2 x float> %1041, ptr %1040, align 4
  %1042 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %1039, i32 0, i32 1
  %1043 = extractvalue { <2 x float>, <2 x float> } %1038, 1
  store <2 x float> %1043, ptr %1042, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %78, ptr align 4 %80, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 16, ptr %80) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %81) #12
  %1044 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef %79, float noundef 0x3F70101020000000)
  %1045 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %81, i32 0, i32 0
  %1046 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %1045, i32 0, i32 0
  %1047 = extractvalue { <2 x float>, <2 x float> } %1044, 0
  store <2 x float> %1047, ptr %1046, align 4
  %1048 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %1045, i32 0, i32 1
  %1049 = extractvalue { <2 x float>, <2 x float> } %1044, 1
  store <2 x float> %1049, ptr %1048, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %79, ptr align 4 %81, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 16, ptr %81) #12
  %1050 = load i32, ptr %6, align 4, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %82, ptr align 4 %78, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %83, ptr align 4 %79, i64 16, i1 false), !tbaa.struct !24
  %1051 = load ptr, ptr %7, align 8, !tbaa !9
  %1052 = load ptr, ptr %8, align 8, !tbaa !9
  %1053 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %82, i32 0, i32 0
  %1054 = load <2 x float>, ptr %1053, align 4
  %1055 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %82, i32 0, i32 1
  %1056 = load <2 x float>, ptr %1055, align 4
  %1057 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %83, i32 0, i32 0
  %1058 = load <2 x float>, ptr %1057, align 4
  %1059 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %83, i32 0, i32 1
  %1060 = load <2 x float>, ptr %1059, align 4
  %1061 = call noundef i64 @_ZN6basisuL21find_optimal_solutionEjNS_12bc7enc_vec4FES0_PKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsE(i32 noundef %1050, <2 x float> %1054, <2 x float> %1056, <2 x float> %1058, <2 x float> %1060, ptr noundef %1051, ptr noundef %1052)
  %1062 = icmp ne i64 %1061, 0
  br i1 %1062, label %1064, label %1063

1063:                                             ; preds = %1037
  store i64 0, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %1417

1064:                                             ; preds = %1037
  call void @llvm.lifetime.start.p0(i64 4, ptr %84) #12
  store i32 0, ptr %84, align 4, !tbaa !5
  br label %1065

1065:                                             ; preds = %1093, %1064
  %1066 = load i32, ptr %84, align 4, !tbaa !5
  %1067 = load ptr, ptr %7, align 8, !tbaa !9
  %1068 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1067, i32 0, i32 0
  %1069 = load i32, ptr %1068, align 8, !tbaa !22
  %1070 = icmp ult i32 %1066, %1069
  br i1 %1070, label %1072, label %1071

1071:                                             ; preds = %1065
  store i32 26, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %84) #12
  br label %1096

1072:                                             ; preds = %1065
  call void @llvm.lifetime.start.p0(i64 4, ptr %85) #12
  %1073 = load i32, ptr %84, align 4, !tbaa !5
  %1074 = zext i32 %1073 to i64
  %1075 = getelementptr inbounds [16 x i8], ptr %69, i64 0, i64 %1074
  %1076 = load i8, ptr %1075, align 1, !tbaa !25
  %1077 = zext i8 %1076 to i32
  store i32 %1077, ptr %85, align 4, !tbaa !5
  %1078 = load i32, ptr %85, align 4, !tbaa !5
  %1079 = load i32, ptr %73, align 4, !tbaa !5
  %1080 = icmp eq i32 %1078, %1079
  br i1 %1080, label %1081, label %1087

1081:                                             ; preds = %1072
  %1082 = load i32, ptr %85, align 4, !tbaa !5
  %1083 = icmp ugt i32 %1082, 0
  br i1 %1083, label %1084, label %1087

1084:                                             ; preds = %1081
  %1085 = load i32, ptr %85, align 4, !tbaa !5
  %1086 = add i32 %1085, -1
  store i32 %1086, ptr %85, align 4, !tbaa !5
  br label %1087

1087:                                             ; preds = %1084, %1081, %1072
  %1088 = load i32, ptr %85, align 4, !tbaa !5
  %1089 = trunc i32 %1088 to i8
  %1090 = load i32, ptr %84, align 4, !tbaa !5
  %1091 = zext i32 %1090 to i64
  %1092 = getelementptr inbounds [16 x i8], ptr %70, i64 0, i64 %1091
  store i8 %1089, ptr %1092, align 1, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 4, ptr %85) #12
  br label %1093

1093:                                             ; preds = %1087
  %1094 = load i32, ptr %84, align 4, !tbaa !5
  %1095 = add i32 %1094, 1
  store i32 %1095, ptr %84, align 4, !tbaa !5
  br label %1065, !llvm.loop !42

1096:                                             ; preds = %1071
  %1097 = load ptr, ptr %7, align 8, !tbaa !9
  %1098 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1097, i32 0, i32 9
  %1099 = load i8, ptr %1098, align 4, !tbaa !13
  %1100 = icmp ne i8 %1099, 0
  br i1 %1100, label %1101, label %1112

1101:                                             ; preds = %1096
  %1102 = load ptr, ptr %7, align 8, !tbaa !9
  %1103 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1102, i32 0, i32 0
  %1104 = load i32, ptr %1103, align 8, !tbaa !22
  %1105 = getelementptr inbounds [16 x i8], ptr %70, i64 0, i64 0
  %1106 = load ptr, ptr %7, align 8, !tbaa !9
  %1107 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1106, i32 0, i32 4
  %1108 = load ptr, ptr %1107, align 8, !tbaa !37
  %1109 = load ptr, ptr %7, align 8, !tbaa !9
  %1110 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1109, i32 0, i32 1
  %1111 = load ptr, ptr %1110, align 8, !tbaa !23
  call void @_ZN6basisuL36compute_least_squares_endpoints_rgbaEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef %1104, ptr noundef %1105, ptr noundef %1108, ptr noundef %78, ptr noundef %79, ptr noundef %1111)
  br label %1123

1112:                                             ; preds = %1096
  %1113 = load ptr, ptr %7, align 8, !tbaa !9
  %1114 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1113, i32 0, i32 0
  %1115 = load i32, ptr %1114, align 8, !tbaa !22
  %1116 = getelementptr inbounds [16 x i8], ptr %70, i64 0, i64 0
  %1117 = load ptr, ptr %7, align 8, !tbaa !9
  %1118 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1117, i32 0, i32 4
  %1119 = load ptr, ptr %1118, align 8, !tbaa !37
  %1120 = load ptr, ptr %7, align 8, !tbaa !9
  %1121 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1120, i32 0, i32 1
  %1122 = load ptr, ptr %1121, align 8, !tbaa !23
  call void @_ZN6basisuL35compute_least_squares_endpoints_rgbEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef %1115, ptr noundef %1116, ptr noundef %1119, ptr noundef %78, ptr noundef %79, ptr noundef %1122)
  br label %1123

1123:                                             ; preds = %1112, %1101
  call void @llvm.lifetime.start.p0(i64 16, ptr %86) #12
  %1124 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef %78, float noundef 0x3F70101020000000)
  %1125 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %86, i32 0, i32 0
  %1126 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %1125, i32 0, i32 0
  %1127 = extractvalue { <2 x float>, <2 x float> } %1124, 0
  store <2 x float> %1127, ptr %1126, align 4
  %1128 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %1125, i32 0, i32 1
  %1129 = extractvalue { <2 x float>, <2 x float> } %1124, 1
  store <2 x float> %1129, ptr %1128, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %78, ptr align 4 %86, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 16, ptr %86) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %87) #12
  %1130 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef %79, float noundef 0x3F70101020000000)
  %1131 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %87, i32 0, i32 0
  %1132 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %1131, i32 0, i32 0
  %1133 = extractvalue { <2 x float>, <2 x float> } %1130, 0
  store <2 x float> %1133, ptr %1132, align 4
  %1134 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %1131, i32 0, i32 1
  %1135 = extractvalue { <2 x float>, <2 x float> } %1130, 1
  store <2 x float> %1135, ptr %1134, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %79, ptr align 4 %87, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 16, ptr %87) #12
  %1136 = load i32, ptr %6, align 4, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %88, ptr align 4 %78, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %89, ptr align 4 %79, i64 16, i1 false), !tbaa.struct !24
  %1137 = load ptr, ptr %7, align 8, !tbaa !9
  %1138 = load ptr, ptr %8, align 8, !tbaa !9
  %1139 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %88, i32 0, i32 0
  %1140 = load <2 x float>, ptr %1139, align 4
  %1141 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %88, i32 0, i32 1
  %1142 = load <2 x float>, ptr %1141, align 4
  %1143 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %89, i32 0, i32 0
  %1144 = load <2 x float>, ptr %1143, align 4
  %1145 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %89, i32 0, i32 1
  %1146 = load <2 x float>, ptr %1145, align 4
  %1147 = call noundef i64 @_ZN6basisuL21find_optimal_solutionEjNS_12bc7enc_vec4FES0_PKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsE(i32 noundef %1136, <2 x float> %1140, <2 x float> %1142, <2 x float> %1144, <2 x float> %1146, ptr noundef %1137, ptr noundef %1138)
  %1148 = icmp ne i64 %1147, 0
  br i1 %1148, label %1150, label %1149

1149:                                             ; preds = %1123
  store i64 0, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %1417

1150:                                             ; preds = %1123
  call void @llvm.lifetime.start.p0(i64 4, ptr %90) #12
  store i32 0, ptr %90, align 4, !tbaa !5
  br label %1151

1151:                                             ; preds = %1194, %1150
  %1152 = load i32, ptr %90, align 4, !tbaa !5
  %1153 = load ptr, ptr %7, align 8, !tbaa !9
  %1154 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1153, i32 0, i32 0
  %1155 = load i32, ptr %1154, align 8, !tbaa !22
  %1156 = icmp ult i32 %1152, %1155
  br i1 %1156, label %1158, label %1157

1157:                                             ; preds = %1151
  store i32 29, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %90) #12
  br label %1197

1158:                                             ; preds = %1151
  call void @llvm.lifetime.start.p0(i64 4, ptr %91) #12
  %1159 = load i32, ptr %90, align 4, !tbaa !5
  %1160 = zext i32 %1159 to i64
  %1161 = getelementptr inbounds [16 x i8], ptr %69, i64 0, i64 %1160
  %1162 = load i8, ptr %1161, align 1, !tbaa !25
  %1163 = zext i8 %1162 to i32
  store i32 %1163, ptr %91, align 4, !tbaa !5
  %1164 = load i32, ptr %91, align 4, !tbaa !5
  %1165 = load i32, ptr %72, align 4, !tbaa !5
  %1166 = icmp eq i32 %1164, %1165
  br i1 %1166, label %1167, label %1177

1167:                                             ; preds = %1158
  %1168 = load i32, ptr %91, align 4, !tbaa !5
  %1169 = load ptr, ptr %7, align 8, !tbaa !9
  %1170 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1169, i32 0, i32 2
  %1171 = load i32, ptr %1170, align 8, !tbaa !14
  %1172 = sub i32 %1171, 1
  %1173 = icmp ult i32 %1168, %1172
  br i1 %1173, label %1174, label %1177

1174:                                             ; preds = %1167
  %1175 = load i32, ptr %91, align 4, !tbaa !5
  %1176 = add i32 %1175, 1
  store i32 %1176, ptr %91, align 4, !tbaa !5
  br label %1188

1177:                                             ; preds = %1167, %1158
  %1178 = load i32, ptr %91, align 4, !tbaa !5
  %1179 = load i32, ptr %73, align 4, !tbaa !5
  %1180 = icmp eq i32 %1178, %1179
  br i1 %1180, label %1181, label %1187

1181:                                             ; preds = %1177
  %1182 = load i32, ptr %91, align 4, !tbaa !5
  %1183 = icmp ugt i32 %1182, 0
  br i1 %1183, label %1184, label %1187

1184:                                             ; preds = %1181
  %1185 = load i32, ptr %91, align 4, !tbaa !5
  %1186 = add i32 %1185, -1
  store i32 %1186, ptr %91, align 4, !tbaa !5
  br label %1187

1187:                                             ; preds = %1184, %1181, %1177
  br label %1188

1188:                                             ; preds = %1187, %1174
  %1189 = load i32, ptr %91, align 4, !tbaa !5
  %1190 = trunc i32 %1189 to i8
  %1191 = load i32, ptr %90, align 4, !tbaa !5
  %1192 = zext i32 %1191 to i64
  %1193 = getelementptr inbounds [16 x i8], ptr %70, i64 0, i64 %1192
  store i8 %1190, ptr %1193, align 1, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 4, ptr %91) #12
  br label %1194

1194:                                             ; preds = %1188
  %1195 = load i32, ptr %90, align 4, !tbaa !5
  %1196 = add i32 %1195, 1
  store i32 %1196, ptr %90, align 4, !tbaa !5
  br label %1151, !llvm.loop !43

1197:                                             ; preds = %1157
  %1198 = load ptr, ptr %7, align 8, !tbaa !9
  %1199 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1198, i32 0, i32 9
  %1200 = load i8, ptr %1199, align 4, !tbaa !13
  %1201 = icmp ne i8 %1200, 0
  br i1 %1201, label %1202, label %1213

1202:                                             ; preds = %1197
  %1203 = load ptr, ptr %7, align 8, !tbaa !9
  %1204 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1203, i32 0, i32 0
  %1205 = load i32, ptr %1204, align 8, !tbaa !22
  %1206 = getelementptr inbounds [16 x i8], ptr %70, i64 0, i64 0
  %1207 = load ptr, ptr %7, align 8, !tbaa !9
  %1208 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1207, i32 0, i32 4
  %1209 = load ptr, ptr %1208, align 8, !tbaa !37
  %1210 = load ptr, ptr %7, align 8, !tbaa !9
  %1211 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1210, i32 0, i32 1
  %1212 = load ptr, ptr %1211, align 8, !tbaa !23
  call void @_ZN6basisuL36compute_least_squares_endpoints_rgbaEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef %1205, ptr noundef %1206, ptr noundef %1209, ptr noundef %78, ptr noundef %79, ptr noundef %1212)
  br label %1224

1213:                                             ; preds = %1197
  %1214 = load ptr, ptr %7, align 8, !tbaa !9
  %1215 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1214, i32 0, i32 0
  %1216 = load i32, ptr %1215, align 8, !tbaa !22
  %1217 = getelementptr inbounds [16 x i8], ptr %70, i64 0, i64 0
  %1218 = load ptr, ptr %7, align 8, !tbaa !9
  %1219 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1218, i32 0, i32 4
  %1220 = load ptr, ptr %1219, align 8, !tbaa !37
  %1221 = load ptr, ptr %7, align 8, !tbaa !9
  %1222 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1221, i32 0, i32 1
  %1223 = load ptr, ptr %1222, align 8, !tbaa !23
  call void @_ZN6basisuL35compute_least_squares_endpoints_rgbEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef %1216, ptr noundef %1217, ptr noundef %1220, ptr noundef %78, ptr noundef %79, ptr noundef %1223)
  br label %1224

1224:                                             ; preds = %1213, %1202
  call void @llvm.lifetime.start.p0(i64 16, ptr %92) #12
  %1225 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef %78, float noundef 0x3F70101020000000)
  %1226 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %92, i32 0, i32 0
  %1227 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %1226, i32 0, i32 0
  %1228 = extractvalue { <2 x float>, <2 x float> } %1225, 0
  store <2 x float> %1228, ptr %1227, align 4
  %1229 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %1226, i32 0, i32 1
  %1230 = extractvalue { <2 x float>, <2 x float> } %1225, 1
  store <2 x float> %1230, ptr %1229, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %78, ptr align 4 %92, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 16, ptr %92) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %93) #12
  %1231 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef %79, float noundef 0x3F70101020000000)
  %1232 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %93, i32 0, i32 0
  %1233 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %1232, i32 0, i32 0
  %1234 = extractvalue { <2 x float>, <2 x float> } %1231, 0
  store <2 x float> %1234, ptr %1233, align 4
  %1235 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %1232, i32 0, i32 1
  %1236 = extractvalue { <2 x float>, <2 x float> } %1231, 1
  store <2 x float> %1236, ptr %1235, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %79, ptr align 4 %93, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 16, ptr %93) #12
  %1237 = load i32, ptr %6, align 4, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %94, ptr align 4 %78, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %95, ptr align 4 %79, i64 16, i1 false), !tbaa.struct !24
  %1238 = load ptr, ptr %7, align 8, !tbaa !9
  %1239 = load ptr, ptr %8, align 8, !tbaa !9
  %1240 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %94, i32 0, i32 0
  %1241 = load <2 x float>, ptr %1240, align 4
  %1242 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %94, i32 0, i32 1
  %1243 = load <2 x float>, ptr %1242, align 4
  %1244 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %95, i32 0, i32 0
  %1245 = load <2 x float>, ptr %1244, align 4
  %1246 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %95, i32 0, i32 1
  %1247 = load <2 x float>, ptr %1246, align 4
  %1248 = call noundef i64 @_ZN6basisuL21find_optimal_solutionEjNS_12bc7enc_vec4FES0_PKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsE(i32 noundef %1237, <2 x float> %1241, <2 x float> %1243, <2 x float> %1245, <2 x float> %1247, ptr noundef %1238, ptr noundef %1239)
  %1249 = icmp ne i64 %1248, 0
  br i1 %1249, label %1251, label %1250

1250:                                             ; preds = %1224
  store i64 0, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %1417

1251:                                             ; preds = %1224
  call void @llvm.lifetime.start.p0(i64 4, ptr %96) #12
  %1252 = load ptr, ptr %7, align 8, !tbaa !9
  %1253 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1252, i32 0, i32 0
  %1254 = load i32, ptr %1253, align 8, !tbaa !22
  %1255 = mul i32 %1254, 56
  %1256 = lshr i32 %1255, 4
  store i32 %1256, ptr %96, align 4, !tbaa !5
  %1257 = load ptr, ptr %9, align 8, !tbaa !9
  %1258 = getelementptr inbounds %"struct.basisu::bc7enc_compress_block_params", ptr %1257, i32 0, i32 2
  %1259 = load i32, ptr %1258, align 4, !tbaa !39
  %1260 = icmp uge i32 %1259, 2
  br i1 %1260, label %1261, label %1415

1261:                                             ; preds = %1251
  %1262 = load ptr, ptr %8, align 8, !tbaa !9
  %1263 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1262, i32 0, i32 0
  %1264 = load i64, ptr %1263, align 8, !tbaa !16
  %1265 = load i32, ptr %96, align 4, !tbaa !5
  %1266 = zext i32 %1265 to i64
  %1267 = icmp ugt i64 %1264, %1266
  br i1 %1267, label %1268, label %1415

1268:                                             ; preds = %1261
  call void @llvm.lifetime.start.p0(i64 4, ptr %97) #12
  %1269 = load ptr, ptr %9, align 8, !tbaa !9
  %1270 = getelementptr inbounds %"struct.basisu::bc7enc_compress_block_params", ptr %1269, i32 0, i32 2
  %1271 = load i32, ptr %1270, align 4, !tbaa !39
  %1272 = icmp uge i32 %1271, 4
  br i1 %1272, label %1273, label %1278

1273:                                             ; preds = %1268
  %1274 = load ptr, ptr %9, align 8, !tbaa !9
  %1275 = getelementptr inbounds %"struct.basisu::bc7enc_compress_block_params", ptr %1274, i32 0, i32 2
  %1276 = load i32, ptr %1275, align 4, !tbaa !39
  %1277 = sub i32 %1276, 2
  br label %1279

1278:                                             ; preds = %1268
  br label %1279

1279:                                             ; preds = %1278, %1273
  %1280 = phi i32 [ %1277, %1273 ], [ 1, %1278 ]
  store i32 %1280, ptr %97, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %98) #12
  %1281 = load i32, ptr %97, align 4, !tbaa !5
  %1282 = sub nsw i32 0, %1281
  store i32 %1282, ptr %98, align 4, !tbaa !5
  br label %1283

1283:                                             ; preds = %1406, %1279
  %1284 = load i32, ptr %98, align 4, !tbaa !5
  %1285 = icmp sle i32 %1284, 1
  br i1 %1285, label %1287, label %1286

1286:                                             ; preds = %1283
  store i32 32, ptr %14, align 4
  br label %1409

1287:                                             ; preds = %1283
  call void @llvm.lifetime.start.p0(i64 4, ptr %99) #12
  %1288 = load i32, ptr %71, align 4, !tbaa !5
  %1289 = sub nsw i32 %1288, 1
  store i32 %1289, ptr %99, align 4, !tbaa !5
  br label %1290

1290:                                             ; preds = %1400, %1287
  %1291 = load i32, ptr %99, align 4, !tbaa !5
  %1292 = load i32, ptr %71, align 4, !tbaa !5
  %1293 = load i32, ptr %97, align 4, !tbaa !5
  %1294 = add nsw i32 %1292, %1293
  %1295 = icmp sle i32 %1291, %1294
  br i1 %1295, label %1297, label %1296

1296:                                             ; preds = %1290
  store i32 35, ptr %14, align 4
  br label %1403

1297:                                             ; preds = %1290
  %1298 = load i32, ptr %98, align 4, !tbaa !5
  %1299 = icmp eq i32 %1298, 0
  br i1 %1299, label %1300, label %1305

1300:                                             ; preds = %1297
  %1301 = load i32, ptr %99, align 4, !tbaa !5
  %1302 = load i32, ptr %71, align 4, !tbaa !5
  %1303 = icmp eq i32 %1301, %1302
  br i1 %1303, label %1304, label %1305

1304:                                             ; preds = %1300
  br label %1400

1305:                                             ; preds = %1300, %1297
  call void @llvm.lifetime.start.p0(i64 4, ptr %100) #12
  store i32 0, ptr %100, align 4, !tbaa !5
  br label %1306

1306:                                             ; preds = %1340, %1305
  %1307 = load i32, ptr %100, align 4, !tbaa !5
  %1308 = load ptr, ptr %7, align 8, !tbaa !9
  %1309 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1308, i32 0, i32 0
  %1310 = load i32, ptr %1309, align 8, !tbaa !22
  %1311 = icmp ult i32 %1307, %1310
  br i1 %1311, label %1313, label %1312

1312:                                             ; preds = %1306
  store i32 38, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %100) #12
  br label %1343

1313:                                             ; preds = %1306
  %1314 = load i32, ptr %71, align 4, !tbaa !5
  %1315 = sitofp i32 %1314 to float
  %1316 = load i32, ptr %100, align 4, !tbaa !5
  %1317 = zext i32 %1316 to i64
  %1318 = getelementptr inbounds [16 x i8], ptr %69, i64 0, i64 %1317
  %1319 = load i8, ptr %1318, align 1, !tbaa !25
  %1320 = uitofp i8 %1319 to float
  %1321 = load i32, ptr %98, align 4, !tbaa !5
  %1322 = sitofp i32 %1321 to float
  %1323 = fsub float %1320, %1322
  %1324 = fmul float %1315, %1323
  %1325 = load i32, ptr %99, align 4, !tbaa !5
  %1326 = sitofp i32 %1325 to float
  %1327 = load i32, ptr %98, align 4, !tbaa !5
  %1328 = sitofp i32 %1327 to float
  %1329 = fsub float %1326, %1328
  %1330 = fdiv float %1324, %1329
  %1331 = fadd float %1330, 5.000000e-01
  %1332 = call float @llvm.floor.f32(float %1331)
  %1333 = load i32, ptr %71, align 4, !tbaa !5
  %1334 = sitofp i32 %1333 to float
  %1335 = call noundef float @_ZN6basisu6clampfEfff(float noundef %1332, float noundef 0.000000e+00, float noundef %1334)
  %1336 = fptoui float %1335 to i8
  %1337 = load i32, ptr %100, align 4, !tbaa !5
  %1338 = zext i32 %1337 to i64
  %1339 = getelementptr inbounds [16 x i8], ptr %70, i64 0, i64 %1338
  store i8 %1336, ptr %1339, align 1, !tbaa !25
  br label %1340

1340:                                             ; preds = %1313
  %1341 = load i32, ptr %100, align 4, !tbaa !5
  %1342 = add i32 %1341, 1
  store i32 %1342, ptr %100, align 4, !tbaa !5
  br label %1306, !llvm.loop !44

1343:                                             ; preds = %1312
  %1344 = call noundef ptr @_ZN6basisuL16vec4F_set_scalarEPNS_12bc7enc_vec4FEf(ptr noundef %78, float noundef 0.000000e+00)
  %1345 = call noundef ptr @_ZN6basisuL16vec4F_set_scalarEPNS_12bc7enc_vec4FEf(ptr noundef %79, float noundef 0.000000e+00)
  %1346 = load ptr, ptr %7, align 8, !tbaa !9
  %1347 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1346, i32 0, i32 9
  %1348 = load i8, ptr %1347, align 4, !tbaa !13
  %1349 = icmp ne i8 %1348, 0
  br i1 %1349, label %1350, label %1361

1350:                                             ; preds = %1343
  %1351 = load ptr, ptr %7, align 8, !tbaa !9
  %1352 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1351, i32 0, i32 0
  %1353 = load i32, ptr %1352, align 8, !tbaa !22
  %1354 = getelementptr inbounds [16 x i8], ptr %70, i64 0, i64 0
  %1355 = load ptr, ptr %7, align 8, !tbaa !9
  %1356 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1355, i32 0, i32 4
  %1357 = load ptr, ptr %1356, align 8, !tbaa !37
  %1358 = load ptr, ptr %7, align 8, !tbaa !9
  %1359 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1358, i32 0, i32 1
  %1360 = load ptr, ptr %1359, align 8, !tbaa !23
  call void @_ZN6basisuL36compute_least_squares_endpoints_rgbaEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef %1353, ptr noundef %1354, ptr noundef %1357, ptr noundef %78, ptr noundef %79, ptr noundef %1360)
  br label %1372

1361:                                             ; preds = %1343
  %1362 = load ptr, ptr %7, align 8, !tbaa !9
  %1363 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1362, i32 0, i32 0
  %1364 = load i32, ptr %1363, align 8, !tbaa !22
  %1365 = getelementptr inbounds [16 x i8], ptr %70, i64 0, i64 0
  %1366 = load ptr, ptr %7, align 8, !tbaa !9
  %1367 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1366, i32 0, i32 4
  %1368 = load ptr, ptr %1367, align 8, !tbaa !37
  %1369 = load ptr, ptr %7, align 8, !tbaa !9
  %1370 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1369, i32 0, i32 1
  %1371 = load ptr, ptr %1370, align 8, !tbaa !23
  call void @_ZN6basisuL35compute_least_squares_endpoints_rgbEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef %1364, ptr noundef %1365, ptr noundef %1368, ptr noundef %78, ptr noundef %79, ptr noundef %1371)
  br label %1372

1372:                                             ; preds = %1361, %1350
  call void @llvm.lifetime.start.p0(i64 16, ptr %101) #12
  %1373 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef %78, float noundef 0x3F70101020000000)
  %1374 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %101, i32 0, i32 0
  %1375 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %1374, i32 0, i32 0
  %1376 = extractvalue { <2 x float>, <2 x float> } %1373, 0
  store <2 x float> %1376, ptr %1375, align 4
  %1377 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %1374, i32 0, i32 1
  %1378 = extractvalue { <2 x float>, <2 x float> } %1373, 1
  store <2 x float> %1378, ptr %1377, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %78, ptr align 4 %101, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 16, ptr %101) #12
  call void @llvm.lifetime.start.p0(i64 16, ptr %102) #12
  %1379 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef %79, float noundef 0x3F70101020000000)
  %1380 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %102, i32 0, i32 0
  %1381 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %1380, i32 0, i32 0
  %1382 = extractvalue { <2 x float>, <2 x float> } %1379, 0
  store <2 x float> %1382, ptr %1381, align 4
  %1383 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %1380, i32 0, i32 1
  %1384 = extractvalue { <2 x float>, <2 x float> } %1379, 1
  store <2 x float> %1384, ptr %1383, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %79, ptr align 4 %102, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 16, ptr %102) #12
  %1385 = load i32, ptr %6, align 4, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %103, ptr align 4 %78, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %104, ptr align 4 %79, i64 16, i1 false), !tbaa.struct !24
  %1386 = load ptr, ptr %7, align 8, !tbaa !9
  %1387 = load ptr, ptr %8, align 8, !tbaa !9
  %1388 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %103, i32 0, i32 0
  %1389 = load <2 x float>, ptr %1388, align 4
  %1390 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %103, i32 0, i32 1
  %1391 = load <2 x float>, ptr %1390, align 4
  %1392 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %104, i32 0, i32 0
  %1393 = load <2 x float>, ptr %1392, align 4
  %1394 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %104, i32 0, i32 1
  %1395 = load <2 x float>, ptr %1394, align 4
  %1396 = call noundef i64 @_ZN6basisuL21find_optimal_solutionEjNS_12bc7enc_vec4FES0_PKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsE(i32 noundef %1385, <2 x float> %1389, <2 x float> %1391, <2 x float> %1393, <2 x float> %1395, ptr noundef %1386, ptr noundef %1387)
  %1397 = icmp ne i64 %1396, 0
  br i1 %1397, label %1399, label %1398

1398:                                             ; preds = %1372
  store i64 0, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %1403

1399:                                             ; preds = %1372
  br label %1400

1400:                                             ; preds = %1399, %1304
  %1401 = load i32, ptr %99, align 4, !tbaa !5
  %1402 = add nsw i32 %1401, 1
  store i32 %1402, ptr %99, align 4, !tbaa !5
  br label %1290, !llvm.loop !45

1403:                                             ; preds = %1398, %1296
  call void @llvm.lifetime.end.p0(i64 4, ptr %99) #12
  %1404 = load i32, ptr %14, align 4
  switch i32 %1404, label %1409 [
    i32 35, label %1405
  ]

1405:                                             ; preds = %1403
  br label %1406

1406:                                             ; preds = %1405
  %1407 = load i32, ptr %98, align 4, !tbaa !5
  %1408 = add nsw i32 %1407, 1
  store i32 %1408, ptr %98, align 4, !tbaa !5
  br label %1283, !llvm.loop !46

1409:                                             ; preds = %1403, %1286
  call void @llvm.lifetime.end.p0(i64 4, ptr %98) #12
  %1410 = load i32, ptr %14, align 4
  switch i32 %1410, label %1412 [
    i32 32, label %1411
  ]

1411:                                             ; preds = %1409
  store i32 0, ptr %14, align 4
  br label %1412

1412:                                             ; preds = %1411, %1409
  call void @llvm.lifetime.end.p0(i64 4, ptr %97) #12
  %1413 = load i32, ptr %14, align 4
  switch i32 %1413, label %1416 [
    i32 0, label %1414
  ]

1414:                                             ; preds = %1412
  br label %1415

1415:                                             ; preds = %1414, %1261, %1251
  store i32 0, ptr %14, align 4
  br label %1416

1416:                                             ; preds = %1415, %1412
  call void @llvm.lifetime.end.p0(i64 4, ptr %96) #12
  br label %1417

1417:                                             ; preds = %1416, %1250, %1149, %1063
  call void @llvm.lifetime.end.p0(i64 16, ptr %79) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %78) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %73) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %72) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %71) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %70) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %69) #12
  %1418 = load i32, ptr %14, align 4
  switch i32 %1418, label %1801 [
    i32 0, label %1419
  ]

1419:                                             ; preds = %1417
  br label %1420

1420:                                             ; preds = %1419, %932, %927
  %1421 = load ptr, ptr %7, align 8, !tbaa !9
  %1422 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1421, i32 0, i32 6
  %1423 = load ptr, ptr %1422, align 8, !tbaa !20
  %1424 = icmp ne ptr %1423, null
  br i1 %1424, label %1797, label %1425

1425:                                             ; preds = %1420
  %1426 = load i32, ptr %6, align 4, !tbaa !5
  %1427 = icmp eq i32 %1426, 1
  br i1 %1427, label %1428, label %1475

1428:                                             ; preds = %1425
  call void @llvm.lifetime.start.p0(i64 48, ptr %105) #12
  %1429 = load ptr, ptr %8, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %105, ptr align 8 %1429, i64 48, i1 false), !tbaa.struct !47
  call void @llvm.lifetime.start.p0(i64 4, ptr %106) #12
  %1430 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %15, i32 0, i32 0
  %1431 = getelementptr inbounds [4 x float], ptr %1430, i64 0, i64 0
  %1432 = load float, ptr %1431, align 4, !tbaa !28
  %1433 = call float @llvm.fmuladd.f32(float %1432, float 2.550000e+02, float 5.000000e-01)
  %1434 = fptosi float %1433 to i32
  store i32 %1434, ptr %106, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %107) #12
  %1435 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %15, i32 0, i32 0
  %1436 = getelementptr inbounds [4 x float], ptr %1435, i64 0, i64 1
  %1437 = load float, ptr %1436, align 4, !tbaa !28
  %1438 = call float @llvm.fmuladd.f32(float %1437, float 2.550000e+02, float 5.000000e-01)
  %1439 = fptosi float %1438 to i32
  store i32 %1439, ptr %107, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %108) #12
  %1440 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %15, i32 0, i32 0
  %1441 = getelementptr inbounds [4 x float], ptr %1440, i64 0, i64 2
  %1442 = load float, ptr %1441, align 4, !tbaa !28
  %1443 = call float @llvm.fmuladd.f32(float %1442, float 2.550000e+02, float 5.000000e-01)
  %1444 = fptosi float %1443 to i32
  store i32 %1444, ptr %108, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %109) #12
  %1445 = load ptr, ptr %7, align 8, !tbaa !9
  %1446 = load i32, ptr %106, align 4, !tbaa !5
  %1447 = load i32, ptr %107, align 4, !tbaa !5
  %1448 = load i32, ptr %108, align 4, !tbaa !5
  %1449 = load ptr, ptr %8, align 8, !tbaa !9
  %1450 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1449, i32 0, i32 5
  %1451 = load ptr, ptr %1450, align 8, !tbaa !49
  %1452 = call noundef i64 @_ZN6basisuL23pack_mode1_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef %1445, ptr noundef %105, i32 noundef %1446, i32 noundef %1447, i32 noundef %1448, ptr noundef %1451)
  store i64 %1452, ptr %109, align 8, !tbaa !48
  %1453 = load i64, ptr %109, align 8, !tbaa !48
  %1454 = load ptr, ptr %8, align 8, !tbaa !9
  %1455 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1454, i32 0, i32 0
  %1456 = load i64, ptr %1455, align 8, !tbaa !16
  %1457 = icmp ult i64 %1453, %1456
  br i1 %1457, label %1458, label %1474

1458:                                             ; preds = %1428
  %1459 = load ptr, ptr %8, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %1459, ptr align 8 %105, i64 48, i1 false), !tbaa.struct !47
  %1460 = load ptr, ptr %8, align 8, !tbaa !9
  %1461 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1460, i32 0, i32 4
  %1462 = load ptr, ptr %1461, align 8, !tbaa !21
  %1463 = load ptr, ptr %8, align 8, !tbaa !9
  %1464 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1463, i32 0, i32 5
  %1465 = load ptr, ptr %1464, align 8, !tbaa !49
  %1466 = load ptr, ptr %7, align 8, !tbaa !9
  %1467 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1466, i32 0, i32 0
  %1468 = load i32, ptr %1467, align 8, !tbaa !22
  %1469 = zext i32 %1468 to i64
  %1470 = mul i64 1, %1469
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %1462, ptr align 1 %1465, i64 %1470, i1 false)
  %1471 = load i64, ptr %109, align 8, !tbaa !48
  %1472 = load ptr, ptr %8, align 8, !tbaa !9
  %1473 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1472, i32 0, i32 0
  store i64 %1471, ptr %1473, align 8, !tbaa !16
  br label %1474

1474:                                             ; preds = %1458, %1428
  call void @llvm.lifetime.end.p0(i64 8, ptr %109) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %108) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %107) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %106) #12
  call void @llvm.lifetime.end.p0(i64 48, ptr %105) #12
  br label %1796

1475:                                             ; preds = %1425
  %1476 = load ptr, ptr %7, align 8, !tbaa !9
  %1477 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1476, i32 0, i32 7
  %1478 = load i32, ptr %1477, align 8, !tbaa !11
  %1479 = icmp eq i32 %1478, 8
  br i1 %1479, label %1480, label %1537

1480:                                             ; preds = %1475
  %1481 = load ptr, ptr %7, align 8, !tbaa !9
  %1482 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1481, i32 0, i32 2
  %1483 = load i32, ptr %1482, align 8, !tbaa !14
  %1484 = icmp eq i32 %1483, 8
  br i1 %1484, label %1485, label %1537

1485:                                             ; preds = %1480
  %1486 = load ptr, ptr %7, align 8, !tbaa !9
  %1487 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1486, i32 0, i32 9
  %1488 = load i8, ptr %1487, align 4, !tbaa !13
  %1489 = icmp ne i8 %1488, 0
  br i1 %1489, label %1537, label %1490

1490:                                             ; preds = %1485
  call void @llvm.lifetime.start.p0(i64 48, ptr %110) #12
  %1491 = load ptr, ptr %8, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %110, ptr align 8 %1491, i64 48, i1 false), !tbaa.struct !47
  call void @llvm.lifetime.start.p0(i64 4, ptr %111) #12
  %1492 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %15, i32 0, i32 0
  %1493 = getelementptr inbounds [4 x float], ptr %1492, i64 0, i64 0
  %1494 = load float, ptr %1493, align 4, !tbaa !28
  %1495 = call float @llvm.fmuladd.f32(float %1494, float 2.550000e+02, float 5.000000e-01)
  %1496 = fptosi float %1495 to i32
  store i32 %1496, ptr %111, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %112) #12
  %1497 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %15, i32 0, i32 0
  %1498 = getelementptr inbounds [4 x float], ptr %1497, i64 0, i64 1
  %1499 = load float, ptr %1498, align 4, !tbaa !28
  %1500 = call float @llvm.fmuladd.f32(float %1499, float 2.550000e+02, float 5.000000e-01)
  %1501 = fptosi float %1500 to i32
  store i32 %1501, ptr %112, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %113) #12
  %1502 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %15, i32 0, i32 0
  %1503 = getelementptr inbounds [4 x float], ptr %1502, i64 0, i64 2
  %1504 = load float, ptr %1503, align 4, !tbaa !28
  %1505 = call float @llvm.fmuladd.f32(float %1504, float 2.550000e+02, float 5.000000e-01)
  %1506 = fptosi float %1505 to i32
  store i32 %1506, ptr %113, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %114) #12
  %1507 = load ptr, ptr %7, align 8, !tbaa !9
  %1508 = load i32, ptr %111, align 4, !tbaa !5
  %1509 = load i32, ptr %112, align 4, !tbaa !5
  %1510 = load i32, ptr %113, align 4, !tbaa !5
  %1511 = load ptr, ptr %8, align 8, !tbaa !9
  %1512 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1511, i32 0, i32 5
  %1513 = load ptr, ptr %1512, align 8, !tbaa !49
  %1514 = call noundef i64 @_ZN6basisuL32pack_astc_4bit_3bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef %1507, ptr noundef %110, i32 noundef %1508, i32 noundef %1509, i32 noundef %1510, ptr noundef %1513)
  store i64 %1514, ptr %114, align 8, !tbaa !48
  %1515 = load i64, ptr %114, align 8, !tbaa !48
  %1516 = load ptr, ptr %8, align 8, !tbaa !9
  %1517 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1516, i32 0, i32 0
  %1518 = load i64, ptr %1517, align 8, !tbaa !16
  %1519 = icmp ult i64 %1515, %1518
  br i1 %1519, label %1520, label %1536

1520:                                             ; preds = %1490
  %1521 = load ptr, ptr %8, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %1521, ptr align 8 %110, i64 48, i1 false), !tbaa.struct !47
  %1522 = load ptr, ptr %8, align 8, !tbaa !9
  %1523 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1522, i32 0, i32 4
  %1524 = load ptr, ptr %1523, align 8, !tbaa !21
  %1525 = load ptr, ptr %8, align 8, !tbaa !9
  %1526 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1525, i32 0, i32 5
  %1527 = load ptr, ptr %1526, align 8, !tbaa !49
  %1528 = load ptr, ptr %7, align 8, !tbaa !9
  %1529 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1528, i32 0, i32 0
  %1530 = load i32, ptr %1529, align 8, !tbaa !22
  %1531 = zext i32 %1530 to i64
  %1532 = mul i64 1, %1531
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %1524, ptr align 1 %1527, i64 %1532, i1 false)
  %1533 = load i64, ptr %114, align 8, !tbaa !48
  %1534 = load ptr, ptr %8, align 8, !tbaa !9
  %1535 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1534, i32 0, i32 0
  store i64 %1533, ptr %1535, align 8, !tbaa !16
  br label %1536

1536:                                             ; preds = %1520, %1490
  call void @llvm.lifetime.end.p0(i64 8, ptr %114) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %113) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %112) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %111) #12
  call void @llvm.lifetime.end.p0(i64 48, ptr %110) #12
  br label %1795

1537:                                             ; preds = %1485, %1480, %1475
  %1538 = load ptr, ptr %7, align 8, !tbaa !9
  %1539 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1538, i32 0, i32 7
  %1540 = load i32, ptr %1539, align 8, !tbaa !11
  %1541 = icmp eq i32 %1540, 7
  br i1 %1541, label %1542, label %1599

1542:                                             ; preds = %1537
  %1543 = load ptr, ptr %7, align 8, !tbaa !9
  %1544 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1543, i32 0, i32 2
  %1545 = load i32, ptr %1544, align 8, !tbaa !14
  %1546 = icmp eq i32 %1545, 4
  br i1 %1546, label %1547, label %1599

1547:                                             ; preds = %1542
  %1548 = load ptr, ptr %7, align 8, !tbaa !9
  %1549 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1548, i32 0, i32 9
  %1550 = load i8, ptr %1549, align 4, !tbaa !13
  %1551 = icmp ne i8 %1550, 0
  br i1 %1551, label %1599, label %1552

1552:                                             ; preds = %1547
  call void @llvm.lifetime.start.p0(i64 48, ptr %115) #12
  %1553 = load ptr, ptr %8, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %115, ptr align 8 %1553, i64 48, i1 false), !tbaa.struct !47
  call void @llvm.lifetime.start.p0(i64 4, ptr %116) #12
  %1554 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %15, i32 0, i32 0
  %1555 = getelementptr inbounds [4 x float], ptr %1554, i64 0, i64 0
  %1556 = load float, ptr %1555, align 4, !tbaa !28
  %1557 = call float @llvm.fmuladd.f32(float %1556, float 2.550000e+02, float 5.000000e-01)
  %1558 = fptosi float %1557 to i32
  store i32 %1558, ptr %116, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %117) #12
  %1559 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %15, i32 0, i32 0
  %1560 = getelementptr inbounds [4 x float], ptr %1559, i64 0, i64 1
  %1561 = load float, ptr %1560, align 4, !tbaa !28
  %1562 = call float @llvm.fmuladd.f32(float %1561, float 2.550000e+02, float 5.000000e-01)
  %1563 = fptosi float %1562 to i32
  store i32 %1563, ptr %117, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %118) #12
  %1564 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %15, i32 0, i32 0
  %1565 = getelementptr inbounds [4 x float], ptr %1564, i64 0, i64 2
  %1566 = load float, ptr %1565, align 4, !tbaa !28
  %1567 = call float @llvm.fmuladd.f32(float %1566, float 2.550000e+02, float 5.000000e-01)
  %1568 = fptosi float %1567 to i32
  store i32 %1568, ptr %118, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %119) #12
  %1569 = load ptr, ptr %7, align 8, !tbaa !9
  %1570 = load i32, ptr %116, align 4, !tbaa !5
  %1571 = load i32, ptr %117, align 4, !tbaa !5
  %1572 = load i32, ptr %118, align 4, !tbaa !5
  %1573 = load ptr, ptr %8, align 8, !tbaa !9
  %1574 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1573, i32 0, i32 5
  %1575 = load ptr, ptr %1574, align 8, !tbaa !49
  %1576 = call noundef i64 @_ZN6basisuL34pack_astc_range7_2bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef %1569, ptr noundef %115, i32 noundef %1570, i32 noundef %1571, i32 noundef %1572, ptr noundef %1575)
  store i64 %1576, ptr %119, align 8, !tbaa !48
  %1577 = load i64, ptr %119, align 8, !tbaa !48
  %1578 = load ptr, ptr %8, align 8, !tbaa !9
  %1579 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1578, i32 0, i32 0
  %1580 = load i64, ptr %1579, align 8, !tbaa !16
  %1581 = icmp ult i64 %1577, %1580
  br i1 %1581, label %1582, label %1598

1582:                                             ; preds = %1552
  %1583 = load ptr, ptr %8, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %1583, ptr align 8 %115, i64 48, i1 false), !tbaa.struct !47
  %1584 = load ptr, ptr %8, align 8, !tbaa !9
  %1585 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1584, i32 0, i32 4
  %1586 = load ptr, ptr %1585, align 8, !tbaa !21
  %1587 = load ptr, ptr %8, align 8, !tbaa !9
  %1588 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1587, i32 0, i32 5
  %1589 = load ptr, ptr %1588, align 8, !tbaa !49
  %1590 = load ptr, ptr %7, align 8, !tbaa !9
  %1591 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1590, i32 0, i32 0
  %1592 = load i32, ptr %1591, align 8, !tbaa !22
  %1593 = zext i32 %1592 to i64
  %1594 = mul i64 1, %1593
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %1586, ptr align 1 %1589, i64 %1594, i1 false)
  %1595 = load i64, ptr %119, align 8, !tbaa !48
  %1596 = load ptr, ptr %8, align 8, !tbaa !9
  %1597 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1596, i32 0, i32 0
  store i64 %1595, ptr %1597, align 8, !tbaa !16
  br label %1598

1598:                                             ; preds = %1582, %1552
  call void @llvm.lifetime.end.p0(i64 8, ptr %119) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %118) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %117) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %116) #12
  call void @llvm.lifetime.end.p0(i64 48, ptr %115) #12
  br label %1794

1599:                                             ; preds = %1547, %1542, %1537
  %1600 = load ptr, ptr %7, align 8, !tbaa !9
  %1601 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1600, i32 0, i32 7
  %1602 = load i32, ptr %1601, align 8, !tbaa !11
  %1603 = icmp eq i32 %1602, 8
  br i1 %1603, label %1604, label %1667

1604:                                             ; preds = %1599
  %1605 = load ptr, ptr %7, align 8, !tbaa !9
  %1606 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1605, i32 0, i32 2
  %1607 = load i32, ptr %1606, align 8, !tbaa !14
  %1608 = icmp eq i32 %1607, 4
  br i1 %1608, label %1609, label %1667

1609:                                             ; preds = %1604
  %1610 = load ptr, ptr %7, align 8, !tbaa !9
  %1611 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1610, i32 0, i32 9
  %1612 = load i8, ptr %1611, align 4, !tbaa !13
  %1613 = icmp ne i8 %1612, 0
  br i1 %1613, label %1614, label %1667

1614:                                             ; preds = %1609
  call void @llvm.lifetime.start.p0(i64 48, ptr %120) #12
  %1615 = load ptr, ptr %8, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %120, ptr align 8 %1615, i64 48, i1 false), !tbaa.struct !47
  call void @llvm.lifetime.start.p0(i64 4, ptr %121) #12
  %1616 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %15, i32 0, i32 0
  %1617 = getelementptr inbounds [4 x float], ptr %1616, i64 0, i64 0
  %1618 = load float, ptr %1617, align 4, !tbaa !28
  %1619 = call float @llvm.fmuladd.f32(float %1618, float 2.550000e+02, float 5.000000e-01)
  %1620 = fptosi float %1619 to i32
  store i32 %1620, ptr %121, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %122) #12
  %1621 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %15, i32 0, i32 0
  %1622 = getelementptr inbounds [4 x float], ptr %1621, i64 0, i64 1
  %1623 = load float, ptr %1622, align 4, !tbaa !28
  %1624 = call float @llvm.fmuladd.f32(float %1623, float 2.550000e+02, float 5.000000e-01)
  %1625 = fptosi float %1624 to i32
  store i32 %1625, ptr %122, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %123) #12
  %1626 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %15, i32 0, i32 0
  %1627 = getelementptr inbounds [4 x float], ptr %1626, i64 0, i64 2
  %1628 = load float, ptr %1627, align 4, !tbaa !28
  %1629 = call float @llvm.fmuladd.f32(float %1628, float 2.550000e+02, float 5.000000e-01)
  %1630 = fptosi float %1629 to i32
  store i32 %1630, ptr %123, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %124) #12
  %1631 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %15, i32 0, i32 0
  %1632 = getelementptr inbounds [4 x float], ptr %1631, i64 0, i64 3
  %1633 = load float, ptr %1632, align 4, !tbaa !28
  %1634 = call float @llvm.fmuladd.f32(float %1633, float 2.550000e+02, float 5.000000e-01)
  %1635 = fptosi float %1634 to i32
  store i32 %1635, ptr %124, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %125) #12
  %1636 = load ptr, ptr %7, align 8, !tbaa !9
  %1637 = load i32, ptr %121, align 4, !tbaa !5
  %1638 = load i32, ptr %122, align 4, !tbaa !5
  %1639 = load i32, ptr %123, align 4, !tbaa !5
  %1640 = load i32, ptr %124, align 4, !tbaa !5
  %1641 = load ptr, ptr %8, align 8, !tbaa !9
  %1642 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1641, i32 0, i32 5
  %1643 = load ptr, ptr %1642, align 8, !tbaa !49
  %1644 = call noundef i64 @_ZN6basisuL37pack_astc_4bit_2bit_to_one_color_rgbaEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjjPh(ptr noundef %1636, ptr noundef %120, i32 noundef %1637, i32 noundef %1638, i32 noundef %1639, i32 noundef %1640, ptr noundef %1643)
  store i64 %1644, ptr %125, align 8, !tbaa !48
  %1645 = load i64, ptr %125, align 8, !tbaa !48
  %1646 = load ptr, ptr %8, align 8, !tbaa !9
  %1647 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1646, i32 0, i32 0
  %1648 = load i64, ptr %1647, align 8, !tbaa !16
  %1649 = icmp ult i64 %1645, %1648
  br i1 %1649, label %1650, label %1666

1650:                                             ; preds = %1614
  %1651 = load ptr, ptr %8, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %1651, ptr align 8 %120, i64 48, i1 false), !tbaa.struct !47
  %1652 = load ptr, ptr %8, align 8, !tbaa !9
  %1653 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1652, i32 0, i32 4
  %1654 = load ptr, ptr %1653, align 8, !tbaa !21
  %1655 = load ptr, ptr %8, align 8, !tbaa !9
  %1656 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1655, i32 0, i32 5
  %1657 = load ptr, ptr %1656, align 8, !tbaa !49
  %1658 = load ptr, ptr %7, align 8, !tbaa !9
  %1659 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1658, i32 0, i32 0
  %1660 = load i32, ptr %1659, align 8, !tbaa !22
  %1661 = zext i32 %1660 to i64
  %1662 = mul i64 1, %1661
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %1654, ptr align 1 %1657, i64 %1662, i1 false)
  %1663 = load i64, ptr %125, align 8, !tbaa !48
  %1664 = load ptr, ptr %8, align 8, !tbaa !9
  %1665 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1664, i32 0, i32 0
  store i64 %1663, ptr %1665, align 8, !tbaa !16
  br label %1666

1666:                                             ; preds = %1650, %1614
  call void @llvm.lifetime.end.p0(i64 8, ptr %125) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %124) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %123) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %122) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %121) #12
  call void @llvm.lifetime.end.p0(i64 48, ptr %120) #12
  br label %1793

1667:                                             ; preds = %1609, %1604, %1599
  %1668 = load ptr, ptr %7, align 8, !tbaa !9
  %1669 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1668, i32 0, i32 7
  %1670 = load i32, ptr %1669, align 8, !tbaa !11
  %1671 = icmp eq i32 %1670, 13
  br i1 %1671, label %1672, label %1729

1672:                                             ; preds = %1667
  %1673 = load ptr, ptr %7, align 8, !tbaa !9
  %1674 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1673, i32 0, i32 2
  %1675 = load i32, ptr %1674, align 8, !tbaa !14
  %1676 = icmp eq i32 %1675, 4
  br i1 %1676, label %1677, label %1729

1677:                                             ; preds = %1672
  %1678 = load ptr, ptr %7, align 8, !tbaa !9
  %1679 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1678, i32 0, i32 9
  %1680 = load i8, ptr %1679, align 4, !tbaa !13
  %1681 = icmp ne i8 %1680, 0
  br i1 %1681, label %1729, label %1682

1682:                                             ; preds = %1677
  call void @llvm.lifetime.start.p0(i64 48, ptr %126) #12
  %1683 = load ptr, ptr %8, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %126, ptr align 8 %1683, i64 48, i1 false), !tbaa.struct !47
  call void @llvm.lifetime.start.p0(i64 4, ptr %127) #12
  %1684 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %15, i32 0, i32 0
  %1685 = getelementptr inbounds [4 x float], ptr %1684, i64 0, i64 0
  %1686 = load float, ptr %1685, align 4, !tbaa !28
  %1687 = call float @llvm.fmuladd.f32(float %1686, float 2.550000e+02, float 5.000000e-01)
  %1688 = fptosi float %1687 to i32
  store i32 %1688, ptr %127, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %128) #12
  %1689 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %15, i32 0, i32 0
  %1690 = getelementptr inbounds [4 x float], ptr %1689, i64 0, i64 1
  %1691 = load float, ptr %1690, align 4, !tbaa !28
  %1692 = call float @llvm.fmuladd.f32(float %1691, float 2.550000e+02, float 5.000000e-01)
  %1693 = fptosi float %1692 to i32
  store i32 %1693, ptr %128, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %129) #12
  %1694 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %15, i32 0, i32 0
  %1695 = getelementptr inbounds [4 x float], ptr %1694, i64 0, i64 2
  %1696 = load float, ptr %1695, align 4, !tbaa !28
  %1697 = call float @llvm.fmuladd.f32(float %1696, float 2.550000e+02, float 5.000000e-01)
  %1698 = fptosi float %1697 to i32
  store i32 %1698, ptr %129, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %130) #12
  %1699 = load ptr, ptr %7, align 8, !tbaa !9
  %1700 = load i32, ptr %127, align 4, !tbaa !5
  %1701 = load i32, ptr %128, align 4, !tbaa !5
  %1702 = load i32, ptr %129, align 4, !tbaa !5
  %1703 = load ptr, ptr %8, align 8, !tbaa !9
  %1704 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1703, i32 0, i32 5
  %1705 = load ptr, ptr %1704, align 8, !tbaa !49
  %1706 = call noundef i64 @_ZN6basisuL35pack_astc_range13_2bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef %1699, ptr noundef %126, i32 noundef %1700, i32 noundef %1701, i32 noundef %1702, ptr noundef %1705)
  store i64 %1706, ptr %130, align 8, !tbaa !48
  %1707 = load i64, ptr %130, align 8, !tbaa !48
  %1708 = load ptr, ptr %8, align 8, !tbaa !9
  %1709 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1708, i32 0, i32 0
  %1710 = load i64, ptr %1709, align 8, !tbaa !16
  %1711 = icmp ult i64 %1707, %1710
  br i1 %1711, label %1712, label %1728

1712:                                             ; preds = %1682
  %1713 = load ptr, ptr %8, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %1713, ptr align 8 %126, i64 48, i1 false), !tbaa.struct !47
  %1714 = load ptr, ptr %8, align 8, !tbaa !9
  %1715 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1714, i32 0, i32 4
  %1716 = load ptr, ptr %1715, align 8, !tbaa !21
  %1717 = load ptr, ptr %8, align 8, !tbaa !9
  %1718 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1717, i32 0, i32 5
  %1719 = load ptr, ptr %1718, align 8, !tbaa !49
  %1720 = load ptr, ptr %7, align 8, !tbaa !9
  %1721 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1720, i32 0, i32 0
  %1722 = load i32, ptr %1721, align 8, !tbaa !22
  %1723 = zext i32 %1722 to i64
  %1724 = mul i64 1, %1723
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %1716, ptr align 1 %1719, i64 %1724, i1 false)
  %1725 = load i64, ptr %130, align 8, !tbaa !48
  %1726 = load ptr, ptr %8, align 8, !tbaa !9
  %1727 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1726, i32 0, i32 0
  store i64 %1725, ptr %1727, align 8, !tbaa !16
  br label %1728

1728:                                             ; preds = %1712, %1682
  call void @llvm.lifetime.end.p0(i64 8, ptr %130) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %129) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %128) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %127) #12
  call void @llvm.lifetime.end.p0(i64 48, ptr %126) #12
  br label %1792

1729:                                             ; preds = %1677, %1672, %1667
  %1730 = load ptr, ptr %7, align 8, !tbaa !9
  %1731 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1730, i32 0, i32 7
  %1732 = load i32, ptr %1731, align 8, !tbaa !11
  %1733 = icmp eq i32 %1732, 11
  br i1 %1733, label %1734, label %1791

1734:                                             ; preds = %1729
  %1735 = load ptr, ptr %7, align 8, !tbaa !9
  %1736 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1735, i32 0, i32 2
  %1737 = load i32, ptr %1736, align 8, !tbaa !14
  %1738 = icmp eq i32 %1737, 32
  br i1 %1738, label %1739, label %1791

1739:                                             ; preds = %1734
  %1740 = load ptr, ptr %7, align 8, !tbaa !9
  %1741 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1740, i32 0, i32 9
  %1742 = load i8, ptr %1741, align 4, !tbaa !13
  %1743 = icmp ne i8 %1742, 0
  br i1 %1743, label %1791, label %1744

1744:                                             ; preds = %1739
  call void @llvm.lifetime.start.p0(i64 48, ptr %131) #12
  %1745 = load ptr, ptr %8, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %131, ptr align 8 %1745, i64 48, i1 false), !tbaa.struct !47
  call void @llvm.lifetime.start.p0(i64 4, ptr %132) #12
  %1746 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %15, i32 0, i32 0
  %1747 = getelementptr inbounds [4 x float], ptr %1746, i64 0, i64 0
  %1748 = load float, ptr %1747, align 4, !tbaa !28
  %1749 = call float @llvm.fmuladd.f32(float %1748, float 2.550000e+02, float 5.000000e-01)
  %1750 = fptosi float %1749 to i32
  store i32 %1750, ptr %132, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %133) #12
  %1751 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %15, i32 0, i32 0
  %1752 = getelementptr inbounds [4 x float], ptr %1751, i64 0, i64 1
  %1753 = load float, ptr %1752, align 4, !tbaa !28
  %1754 = call float @llvm.fmuladd.f32(float %1753, float 2.550000e+02, float 5.000000e-01)
  %1755 = fptosi float %1754 to i32
  store i32 %1755, ptr %133, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %134) #12
  %1756 = getelementptr inbounds %"struct.basisu::bc7enc_vec4F", ptr %15, i32 0, i32 0
  %1757 = getelementptr inbounds [4 x float], ptr %1756, i64 0, i64 2
  %1758 = load float, ptr %1757, align 4, !tbaa !28
  %1759 = call float @llvm.fmuladd.f32(float %1758, float 2.550000e+02, float 5.000000e-01)
  %1760 = fptosi float %1759 to i32
  store i32 %1760, ptr %134, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %135) #12
  %1761 = load ptr, ptr %7, align 8, !tbaa !9
  %1762 = load i32, ptr %132, align 4, !tbaa !5
  %1763 = load i32, ptr %133, align 4, !tbaa !5
  %1764 = load i32, ptr %134, align 4, !tbaa !5
  %1765 = load ptr, ptr %8, align 8, !tbaa !9
  %1766 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1765, i32 0, i32 5
  %1767 = load ptr, ptr %1766, align 8, !tbaa !49
  %1768 = call noundef i64 @_ZN6basisuL35pack_astc_range11_5bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef %1761, ptr noundef %131, i32 noundef %1762, i32 noundef %1763, i32 noundef %1764, ptr noundef %1767)
  store i64 %1768, ptr %135, align 8, !tbaa !48
  %1769 = load i64, ptr %135, align 8, !tbaa !48
  %1770 = load ptr, ptr %8, align 8, !tbaa !9
  %1771 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1770, i32 0, i32 0
  %1772 = load i64, ptr %1771, align 8, !tbaa !16
  %1773 = icmp ult i64 %1769, %1772
  br i1 %1773, label %1774, label %1790

1774:                                             ; preds = %1744
  %1775 = load ptr, ptr %8, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %1775, ptr align 8 %131, i64 48, i1 false), !tbaa.struct !47
  %1776 = load ptr, ptr %8, align 8, !tbaa !9
  %1777 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1776, i32 0, i32 4
  %1778 = load ptr, ptr %1777, align 8, !tbaa !21
  %1779 = load ptr, ptr %8, align 8, !tbaa !9
  %1780 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1779, i32 0, i32 5
  %1781 = load ptr, ptr %1780, align 8, !tbaa !49
  %1782 = load ptr, ptr %7, align 8, !tbaa !9
  %1783 = getelementptr inbounds %"struct.basisu::color_cell_compressor_params", ptr %1782, i32 0, i32 0
  %1784 = load i32, ptr %1783, align 8, !tbaa !22
  %1785 = zext i32 %1784 to i64
  %1786 = mul i64 1, %1785
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %1778, ptr align 1 %1781, i64 %1786, i1 false)
  %1787 = load i64, ptr %135, align 8, !tbaa !48
  %1788 = load ptr, ptr %8, align 8, !tbaa !9
  %1789 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1788, i32 0, i32 0
  store i64 %1787, ptr %1789, align 8, !tbaa !16
  br label %1790

1790:                                             ; preds = %1774, %1744
  call void @llvm.lifetime.end.p0(i64 8, ptr %135) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %134) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %133) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %132) #12
  call void @llvm.lifetime.end.p0(i64 48, ptr %131) #12
  br label %1791

1791:                                             ; preds = %1790, %1739, %1734, %1729
  br label %1792

1792:                                             ; preds = %1791, %1728
  br label %1793

1793:                                             ; preds = %1792, %1666
  br label %1794

1794:                                             ; preds = %1793, %1598
  br label %1795

1795:                                             ; preds = %1794, %1536
  br label %1796

1796:                                             ; preds = %1795, %1474
  br label %1797

1797:                                             ; preds = %1796, %1420
  %1798 = load ptr, ptr %8, align 8, !tbaa !9
  %1799 = getelementptr inbounds %"struct.basisu::color_cell_compressor_results", ptr %1798, i32 0, i32 0
  %1800 = load i64, ptr %1799, align 8, !tbaa !16
  store i64 %1800, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %1801

1801:                                             ; preds = %1797, %1417, %925, %849
  call void @llvm.lifetime.end.p0(i64 16, ptr %59) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %56) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %55) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %54) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %53) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %46) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %45) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #12
  br label %1802

1802:                                             ; preds = %1801, %354, %325, %295, %266, %237, %208
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #12
  %1803 = load i64, ptr %5, align 8
  ret i64 %1803
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN6basisuL12is_solid_rgbEPKNS_28color_cell_compressor_paramsERjS3_S3_(ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN6basisuL23pack_mode1_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN6basisuL32pack_astc_4bit_3bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN6basisuL34pack_astc_range7_2bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) #5

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN6basisuL13is_solid_rgbaEPKNS_28color_cell_compressor_paramsERjS3_S3_S3_(ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN6basisuL37pack_astc_4bit_2bit_to_one_color_rgbaEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjjPh(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN6basisuL35pack_astc_range13_2bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN6basisuL35pack_astc_range11_5bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN6basisuL16vec4F_set_scalarEPNS_12bc7enc_vec4FEf(ptr noundef, float noundef) #6

; Function Attrs: inlinehint mustprogress uwtable
declare hidden { <2 x float>, <2 x float> } @_ZN6basisuL16vec4F_from_colorEPKN6basist13color_quad_u8E(ptr noundef) #7

; Function Attrs: inlinehint mustprogress uwtable
declare hidden { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_addEPKNS_12bc7enc_vec4FES2_(ptr noundef, ptr noundef) #7

; Function Attrs: inlinehint mustprogress uwtable
declare hidden { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef, float noundef) #7

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef ptr @_ZN6basisuL23vec4F_saturate_in_placeEPNS_12bc7enc_vec4FE(ptr noundef) #7

; Function Attrs: inlinehint mustprogress uwtable
declare hidden { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_subEPKNS_12bc7enc_vec4FES2_(ptr noundef, ptr noundef) #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN6basisuL24vec4F_normalize_in_placeEPNS_12bc7enc_vec4FE(ptr noundef) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef float @_ZN6basisuL9vec4F_dotEPKNS_12bc7enc_vec4FES2_(ptr noundef, ptr noundef) #6

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #9

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZN6basisu8maximumfEff(float noundef, float noundef) #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fabs.f32(float) #9

; Function Attrs: nounwind
declare float @sqrtf(float noundef) #10

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN6basisuL9vec4F_setEPNS_12bc7enc_vec4FEffff(ptr noundef, float noundef, float noundef, float noundef, float noundef) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZN6basisu8minimumfEff(float noundef, float noundef) #6

; Function Attrs: inlinehint mustprogress uwtable
declare hidden { <2 x float>, <2 x float> } @_ZN6basisuL14vec4F_saturateEPKNS_12bc7enc_vec4FE(ptr noundef) #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIfENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #6

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN6basisuL21find_optimal_solutionEjNS_12bc7enc_vec4FES0_PKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsE(i32 noundef, <2 x float>, <2 x float>, <2 x float>, <2 x float>, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL36compute_least_squares_endpoints_rgbaEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL35compute_least_squares_endpoints_rgbEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6basisu8minimumuEjj(i32 noundef, i32 noundef) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6basisu8maximumuEjj(i32 noundef, i32 noundef) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZN6basisu6clampfEfff(float noundef, float noundef, float noundef) #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.floor.f32(float) #9

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress 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 #7 = { 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 #8 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #10 = { 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 #11 = { noreturn nounwind }
attributes #12 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 56}
!12 = !{!"_ZTSN6basisu28color_cell_compressor_paramsE", !6, i64 0, !10, i64 8, !6, i64 16, !10, i64 24, !10, i64 32, !6, i64 40, !10, i64 48, !6, i64 56, !7, i64 60, !7, i64 76, !7, i64 77, !7, i64 78, !7, i64 79}
!13 = !{!12, !7, i64 76}
!14 = !{!12, !6, i64 16}
!15 = !{!12, !10, i64 24}
!16 = !{!17, !18, i64 0}
!17 = !{!"_ZTSN6basisu29color_cell_compressor_resultsE", !18, i64 0, !19, i64 8, !19, i64 12, !7, i64 16, !10, i64 24, !10, i64 32, !19, i64 40, !19, i64 44}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSN6basist13color_quad_u8E", !7, i64 0}
!20 = !{!12, !10, i64 48}
!21 = !{!17, !10, i64 24}
!22 = !{!12, !6, i64 0}
!23 = !{!12, !10, i64 8}
!24 = !{i64 0, i64 16, !25}
!25 = !{!7, !7, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!29, !29, i64 0}
!29 = !{!"float", !7, i64 0}
!30 = distinct !{!30, !27}
!31 = distinct !{!31, !27}
!32 = distinct !{!32, !27}
!33 = !{!12, !7, i64 79}
!34 = distinct !{!34, !27}
!35 = !{!36, !6, i64 28}
!36 = !{!"_ZTSN6basisu28bc7enc_compress_block_paramsE", !6, i64 0, !7, i64 4, !6, i64 20, !7, i64 24, !6, i64 28}
!37 = !{!12, !10, i64 32}
!38 = distinct !{!38, !27}
!39 = !{!36, !6, i64 20}
!40 = distinct !{!40, !27}
!41 = distinct !{!41, !27}
!42 = distinct !{!42, !27}
!43 = distinct !{!43, !27}
!44 = distinct !{!44, !27}
!45 = distinct !{!45, !27}
!46 = distinct !{!46, !27}
!47 = !{i64 0, i64 8, !48, i64 8, i64 4, !25, i64 12, i64 4, !25, i64 16, i64 8, !25, i64 24, i64 8, !9, i64 32, i64 8, !9, i64 40, i64 4, !25, i64 44, i64 4, !25}
!48 = !{!18, !18, i64 0}
!49 = !{!17, !10, i64 32}


; 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.basisu::bc7enc_vec4F" = type { [4 x float] }
%"struct.basisu::color_cell_compressor_results" = type { i64, %"struct.basist::color_quad_u8", %"struct.basist::color_quad_u8", [2 x i32], ptr, ptr, %"struct.basist::color_quad_u8", %"struct.basist::color_quad_u8" }
%"struct.basist::color_quad_u8" = type { [4 x i8] }

@.str.3 = external hidden unnamed_addr constant [113 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [39 x i8], align 1
@__PRETTY_FUNCTION__._ZN6basisu22color_cell_compressionEjPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEPKNS_28bc7enc_compress_block_paramsE = external hidden unnamed_addr constant [159 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [72 x i8], align 1

; 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

; Function Attrs: mustprogress 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) #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN6basisu22color_cell_compressionEjPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEPKNS_28bc7enc_compress_block_paramsE(i32 noundef %0, ptr noundef %1, ptr noundef %2, ptr nocapture noundef readonly %3) local_unnamed_addr #3 {
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.basisu::bc7enc_vec4F", align 8
  %10 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %11 = alloca %"struct.basisu::bc7enc_vec4F", align 8
  %12 = alloca %"struct.basisu::bc7enc_vec4F", align 8
  %13 = alloca %"struct.basisu::bc7enc_vec4F", align 8
  %14 = alloca %"struct.basisu::bc7enc_vec4F", align 8
  %15 = alloca %"struct.basisu::bc7enc_vec4F", align 8
  %16 = alloca %"struct.basisu::bc7enc_vec4F", align 8
  %17 = alloca %"struct.basisu::bc7enc_vec4F", align 8
  %18 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %19 = alloca %"struct.basisu::bc7enc_vec4F", align 8
  %20 = alloca %"struct.basisu::bc7enc_vec4F", align 8
  %21 = alloca %"struct.basisu::bc7enc_vec4F", align 8
  %22 = alloca %"struct.basisu::bc7enc_vec4F", align 8
  %23 = alloca %"struct.basisu::bc7enc_vec4F", align 8
  %24 = alloca %"struct.basisu::bc7enc_vec4F", align 8
  %25 = alloca %"struct.basisu::bc7enc_vec4F", align 8
  %26 = alloca %"struct.basisu::bc7enc_vec4F", align 8
  %27 = alloca %"struct.basisu::bc7enc_vec4F", align 4
  %28 = alloca %"struct.basisu::bc7enc_vec4F", align 8
  %29 = alloca %"struct.basisu::bc7enc_vec4F", align 8
  %30 = alloca [16 x i8], align 16
  %31 = alloca [16 x i8], align 16
  %32 = alloca %"struct.basisu::bc7enc_vec4F", align 8
  %33 = alloca %"struct.basisu::bc7enc_vec4F", align 8
  %34 = alloca %"struct.basisu::color_cell_compressor_results", align 8
  %35 = alloca %"struct.basisu::color_cell_compressor_results", align 8
  %36 = alloca %"struct.basisu::color_cell_compressor_results", align 8
  %37 = alloca %"struct.basisu::color_cell_compressor_results", align 8
  %38 = alloca %"struct.basisu::color_cell_compressor_results", align 8
  %39 = alloca %"struct.basisu::color_cell_compressor_results", align 8
  %40 = getelementptr inbounds i8, ptr %1, i64 56
  %41 = load i32, ptr %40, align 8, !tbaa !5
  %42 = icmp ne i32 %41, 0
  %43 = icmp eq i32 %0, 6
  %or.cond12 = or i1 %43, %42
  br i1 %or.cond12, label %.critedge, label %44

44:                                               ; preds = %4
  %45 = getelementptr inbounds i8, ptr %1, i64 76
  %46 = load i8, ptr %45, align 4, !tbaa !11
  %.not = icmp eq i8 %46, 0
  br i1 %.not, label %.critedge, label %47

47:                                               ; preds = %44
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.3, i32 noundef 1365, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6basisu22color_cell_compressionEjPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEPKNS_28bc7enc_compress_block_paramsE) #10
  unreachable

.critedge:                                        ; preds = %44, %4
  %48 = getelementptr inbounds i8, ptr %1, i64 16
  %49 = load i32, ptr %48, align 8, !tbaa !12
  %50 = add i32 %49, -1
  %or.cond540 = icmp ult i32 %50, 32
  br i1 %or.cond540, label %51, label %.critedge7

.critedge7:                                       ; preds = %.critedge
  tail call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.3, i32 noundef 1367, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6basisu22color_cell_compressionEjPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEPKNS_28bc7enc_compress_block_paramsE) #10
  unreachable

51:                                               ; preds = %.critedge
  %52 = getelementptr inbounds i8, ptr %1, i64 24
  %53 = load ptr, ptr %52, align 8, !tbaa !13
  %54 = load i32, ptr %53, align 4, !tbaa !14
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %57, label %56

56:                                               ; preds = %51
  tail call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.3, i32 noundef 1368, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6basisu22color_cell_compressionEjPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEPKNS_28bc7enc_compress_block_paramsE) #10
  unreachable

57:                                               ; preds = %51
  %58 = zext nneg i32 %49 to i64
  %59 = getelementptr i32, ptr %53, i64 %58
  %60 = getelementptr i8, ptr %59, i64 -4
  %61 = load i32, ptr %60, align 4, !tbaa !14
  %62 = icmp eq i32 %61, 64
  br i1 %62, label %64, label %63

63:                                               ; preds = %57
  tail call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.3, i32 noundef 1369, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6basisu22color_cell_compressionEjPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEPKNS_28bc7enc_compress_block_paramsE) #10
  unreachable

64:                                               ; preds = %57
  store i64 -1, ptr %2, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #11
  %65 = getelementptr inbounds i8, ptr %1, i64 48
  %66 = load ptr, ptr %65, align 8, !tbaa !19
  %.not508 = icmp eq ptr %66, null
  br i1 %.not508, label %67, label %.thread555

67:                                               ; preds = %64
  %68 = icmp eq i32 %0, 1
  br i1 %68, label %69, label %78

69:                                               ; preds = %67
  %70 = call noundef zeroext i1 @_ZN6basisuL12is_solid_rgbEPKNS_28color_cell_compressor_paramsERjS3_S3_(ptr noundef nonnull %1, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  br i1 %70, label %71, label %.thread555

71:                                               ; preds = %69
  %72 = load i32, ptr %5, align 4, !tbaa !14
  %73 = load i32, ptr %6, align 4, !tbaa !14
  %74 = load i32, ptr %7, align 4, !tbaa !14
  %75 = getelementptr inbounds i8, ptr %2, i64 24
  %76 = load ptr, ptr %75, align 8, !tbaa !20
  %77 = call noundef i64 @_ZN6basisuL23pack_mode1_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef nonnull %1, ptr noundef nonnull %2, i32 noundef %72, i32 noundef %73, i32 noundef %74, ptr noundef %76)
  br label %837

78:                                               ; preds = %67
  switch i32 %41, label %.thread555 [
    i32 8, label %79
    i32 7, label %92
    i32 13, label %119
    i32 11, label %133
  ]

79:                                               ; preds = %78
  switch i32 %49, label %.thread555 [
    i32 8, label %80
    i32 4, label %106
  ]

80:                                               ; preds = %79
  %81 = getelementptr inbounds i8, ptr %1, i64 76
  %82 = load i8, ptr %81, align 4, !tbaa !11
  %.not509 = icmp eq i8 %82, 0
  br i1 %.not509, label %83, label %.thread555

83:                                               ; preds = %80
  %84 = call noundef zeroext i1 @_ZN6basisuL12is_solid_rgbEPKNS_28color_cell_compressor_paramsERjS3_S3_(ptr noundef nonnull %1, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  br i1 %84, label %85, label %.thread555

85:                                               ; preds = %83
  %86 = load i32, ptr %5, align 4, !tbaa !14
  %87 = load i32, ptr %6, align 4, !tbaa !14
  %88 = load i32, ptr %7, align 4, !tbaa !14
  %89 = getelementptr inbounds i8, ptr %2, i64 24
  %90 = load ptr, ptr %89, align 8, !tbaa !20
  %91 = call noundef i64 @_ZN6basisuL32pack_astc_4bit_3bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef nonnull %1, ptr noundef nonnull %2, i32 noundef %86, i32 noundef %87, i32 noundef %88, ptr noundef %90)
  br label %837

92:                                               ; preds = %78
  %93 = icmp eq i32 %49, 4
  br i1 %93, label %94, label %.thread555

94:                                               ; preds = %92
  %95 = getelementptr inbounds i8, ptr %1, i64 76
  %96 = load i8, ptr %95, align 4, !tbaa !11
  %.not510 = icmp eq i8 %96, 0
  br i1 %.not510, label %97, label %.thread555

97:                                               ; preds = %94
  %98 = call noundef zeroext i1 @_ZN6basisuL12is_solid_rgbEPKNS_28color_cell_compressor_paramsERjS3_S3_(ptr noundef nonnull %1, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  br i1 %98, label %99, label %.thread555

99:                                               ; preds = %97
  %100 = load i32, ptr %5, align 4, !tbaa !14
  %101 = load i32, ptr %6, align 4, !tbaa !14
  %102 = load i32, ptr %7, align 4, !tbaa !14
  %103 = getelementptr inbounds i8, ptr %2, i64 24
  %104 = load ptr, ptr %103, align 8, !tbaa !20
  %105 = call noundef i64 @_ZN6basisuL34pack_astc_range7_2bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef nonnull %1, ptr noundef nonnull %2, i32 noundef %100, i32 noundef %101, i32 noundef %102, ptr noundef %104)
  br label %837

106:                                              ; preds = %79
  %107 = getelementptr inbounds i8, ptr %1, i64 76
  %108 = load i8, ptr %107, align 4, !tbaa !11
  %.not511 = icmp eq i8 %108, 0
  br i1 %.not511, label %.thread555, label %109

109:                                              ; preds = %106
  %110 = call noundef zeroext i1 @_ZN6basisuL13is_solid_rgbaEPKNS_28color_cell_compressor_paramsERjS3_S3_S3_(ptr noundef nonnull %1, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  br i1 %110, label %111, label %.thread555

111:                                              ; preds = %109
  %112 = load i32, ptr %5, align 4, !tbaa !14
  %113 = load i32, ptr %6, align 4, !tbaa !14
  %114 = load i32, ptr %7, align 4, !tbaa !14
  %115 = load i32, ptr %8, align 4, !tbaa !14
  %116 = getelementptr inbounds i8, ptr %2, i64 24
  %117 = load ptr, ptr %116, align 8, !tbaa !20
  %118 = call noundef i64 @_ZN6basisuL37pack_astc_4bit_2bit_to_one_color_rgbaEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjjPh(ptr noundef nonnull %1, ptr noundef nonnull %2, i32 noundef %112, i32 noundef %113, i32 noundef %114, i32 noundef %115, ptr noundef %117)
  br label %837

119:                                              ; preds = %78
  %120 = icmp eq i32 %49, 4
  br i1 %120, label %121, label %.thread555

121:                                              ; preds = %119
  %122 = getelementptr inbounds i8, ptr %1, i64 76
  %123 = load i8, ptr %122, align 4, !tbaa !11
  %.not512 = icmp eq i8 %123, 0
  br i1 %.not512, label %124, label %.thread555

124:                                              ; preds = %121
  %125 = call noundef zeroext i1 @_ZN6basisuL12is_solid_rgbEPKNS_28color_cell_compressor_paramsERjS3_S3_(ptr noundef nonnull %1, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  br i1 %125, label %126, label %.thread555

126:                                              ; preds = %124
  %127 = load i32, ptr %5, align 4, !tbaa !14
  %128 = load i32, ptr %6, align 4, !tbaa !14
  %129 = load i32, ptr %7, align 4, !tbaa !14
  %130 = getelementptr inbounds i8, ptr %2, i64 24
  %131 = load ptr, ptr %130, align 8, !tbaa !20
  %132 = call noundef i64 @_ZN6basisuL35pack_astc_range13_2bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef nonnull %1, ptr noundef nonnull %2, i32 noundef %127, i32 noundef %128, i32 noundef %129, ptr noundef %131)
  br label %837

133:                                              ; preds = %78
  %134 = icmp eq i32 %49, 32
  br i1 %134, label %135, label %.thread555

135:                                              ; preds = %133
  %136 = getelementptr inbounds i8, ptr %1, i64 76
  %137 = load i8, ptr %136, align 4, !tbaa !11
  %.not513 = icmp eq i8 %137, 0
  br i1 %.not513, label %138, label %.thread555

138:                                              ; preds = %135
  %139 = call noundef zeroext i1 @_ZN6basisuL12is_solid_rgbEPKNS_28color_cell_compressor_paramsERjS3_S3_(ptr noundef nonnull %1, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  br i1 %139, label %140, label %.thread555

140:                                              ; preds = %138
  %141 = load i32, ptr %5, align 4, !tbaa !14
  %142 = load i32, ptr %6, align 4, !tbaa !14
  %143 = load i32, ptr %7, align 4, !tbaa !14
  %144 = getelementptr inbounds i8, ptr %2, i64 24
  %145 = load ptr, ptr %144, align 8, !tbaa !20
  %146 = call noundef i64 @_ZN6basisuL35pack_astc_range11_5bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef nonnull %1, ptr noundef nonnull %2, i32 noundef %141, i32 noundef %142, i32 noundef %143, ptr noundef %145)
  br label %837

.thread555:                                       ; preds = %78, %79, %92, %94, %80, %106, %119, %121, %69, %97, %124, %138, %135, %133, %109, %83, %64
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #11
  %147 = call noundef ptr @_ZN6basisuL16vec4F_set_scalarEPNS_12bc7enc_vec4FEf(ptr noundef nonnull %9, float noundef 0.000000e+00)
  %148 = load i32, ptr %1, align 8, !tbaa !21
  %.not653 = icmp eq i32 %148, 0
  br i1 %.not653, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.thread555
  %149 = getelementptr inbounds i8, ptr %1, i64 8
  %150 = getelementptr inbounds i8, ptr %11, i64 8
  %.sroa.4238.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  br label %173

._crit_edge:                                      ; preds = %173, %.thread555
  %.lcssa588 = phi i32 [ 0, %.thread555 ], [ %182, %173 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #11
  %151 = uitofp i32 %.lcssa588 to float
  %152 = fdiv float 1.000000e+00, %151
  %153 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef nonnull %9, float noundef %152)
  %154 = extractvalue { <2 x float>, <2 x float> } %153, 0
  store <2 x float> %154, ptr %12, align 8
  %155 = getelementptr inbounds i8, ptr %12, i64 8
  %156 = extractvalue { <2 x float>, <2 x float> } %153, 1
  store <2 x float> %156, ptr %155, align 8
  %157 = load i32, ptr %1, align 8, !tbaa !21
  %158 = uitofp i32 %157 to float
  %159 = fmul float %158, 2.550000e+02
  %160 = fdiv float 1.000000e+00, %159
  %161 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef nonnull %9, float noundef %160)
  %162 = extractvalue { <2 x float>, <2 x float> } %161, 0
  %163 = extractvalue { <2 x float>, <2 x float> } %161, 1
  store <2 x float> %162, ptr %9, align 8
  %.sroa.4236.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  store <2 x float> %163, ptr %.sroa.4236.0..sroa_idx, align 8, !tbaa !22
  %164 = call noundef ptr @_ZN6basisuL23vec4F_saturate_in_placeEPNS_12bc7enc_vec4FE(ptr noundef nonnull %9)
  %165 = getelementptr inbounds i8, ptr %1, i64 76
  %166 = load i8, ptr %165, align 4, !tbaa !11
  %.not514 = icmp eq i8 %166, 0
  br i1 %.not514, label %.preheader585, label %185

.preheader585:                                    ; preds = %._crit_edge
  %167 = load i32, ptr %1, align 8, !tbaa !21
  %.not655 = icmp eq i32 %167, 0
  br i1 %.not655, label %.preheader584, label %.lr.ph601

.lr.ph601:                                        ; preds = %.preheader585
  %168 = getelementptr inbounds i8, ptr %1, i64 8
  %169 = load ptr, ptr %168, align 8, !tbaa !23
  %170 = load float, ptr %12, align 8, !tbaa !24
  %171 = getelementptr inbounds i8, ptr %12, i64 4
  %172 = load <2 x float>, ptr %171, align 4, !tbaa !24
  %wide.trip.count = zext i32 %167 to i64
  br label %343

173:                                              ; preds = %.lr.ph, %173
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %173 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #11
  %174 = load ptr, ptr %149, align 8, !tbaa !23
  %175 = getelementptr inbounds %"struct.basist::color_quad_u8", ptr %174, i64 %indvars.iv
  %176 = call { <2 x float>, <2 x float> } @_ZN6basisuL16vec4F_from_colorEPKN6basist13color_quad_u8E(ptr noundef %175)
  %177 = extractvalue { <2 x float>, <2 x float> } %176, 0
  store <2 x float> %177, ptr %11, align 8
  %178 = extractvalue { <2 x float>, <2 x float> } %176, 1
  store <2 x float> %178, ptr %150, align 8
  %179 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_addEPKNS_12bc7enc_vec4FES2_(ptr noundef nonnull %9, ptr noundef nonnull %11)
  %180 = extractvalue { <2 x float>, <2 x float> } %179, 0
  %181 = extractvalue { <2 x float>, <2 x float> } %179, 1
  store <2 x float> %180, ptr %9, align 8
  store <2 x float> %181, ptr %.sroa.4238.0..sroa_idx, align 8, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #11
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %182 = load i32, ptr %1, align 8, !tbaa !21
  %183 = zext i32 %182 to i64
  %184 = icmp ult i64 %indvars.iv.next, %183
  br i1 %184, label %173, label %._crit_edge, !llvm.loop !26

185:                                              ; preds = %._crit_edge
  %186 = call noundef ptr @_ZN6basisuL16vec4F_set_scalarEPNS_12bc7enc_vec4FEf(ptr noundef nonnull %10, float noundef 0.000000e+00)
  %187 = load i32, ptr %1, align 8, !tbaa !21
  %.not654 = icmp eq i32 %187, 0
  br i1 %.not654, label %._crit_edge593, label %.lr.ph592

.lr.ph592:                                        ; preds = %185
  %188 = getelementptr inbounds i8, ptr %1, i64 8
  %189 = getelementptr inbounds i8, ptr %13, i64 8
  %190 = getelementptr inbounds i8, ptr %14, i64 8
  %191 = getelementptr inbounds i8, ptr %13, i64 4
  %192 = getelementptr inbounds i8, ptr %15, i64 8
  %193 = getelementptr inbounds i8, ptr %16, i64 8
  %194 = getelementptr inbounds i8, ptr %13, i64 12
  %195 = getelementptr inbounds i8, ptr %17, i64 8
  %196 = getelementptr inbounds i8, ptr %10, i64 4
  %197 = getelementptr inbounds i8, ptr %10, i64 8
  %198 = getelementptr inbounds i8, ptr %10, i64 12
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #11
  %199 = load ptr, ptr %188, align 8, !tbaa !23
  %200 = call { <2 x float>, <2 x float> } @_ZN6basisuL16vec4F_from_colorEPKN6basist13color_quad_u8E(ptr noundef %199)
  %201 = extractvalue { <2 x float>, <2 x float> } %200, 0
  store <2 x float> %201, ptr %13, align 8
  %202 = extractvalue { <2 x float>, <2 x float> } %200, 1
  store <2 x float> %202, ptr %189, align 8
  %203 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_subEPKNS_12bc7enc_vec4FES2_(ptr noundef nonnull %13, ptr noundef nonnull %12)
  %204 = extractvalue { <2 x float>, <2 x float> } %203, 0
  %205 = extractvalue { <2 x float>, <2 x float> } %203, 1
  store <2 x float> %204, ptr %13, align 8
  store <2 x float> %205, ptr %189, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #11
  %206 = extractelement <2 x float> %204, i64 0
  %207 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef nonnull %13, float noundef %206)
  %208 = extractvalue { <2 x float>, <2 x float> } %207, 0
  store <2 x float> %208, ptr %14, align 8
  %209 = extractvalue { <2 x float>, <2 x float> } %207, 1
  store <2 x float> %209, ptr %190, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #11
  %210 = load float, ptr %191, align 4, !tbaa !24
  %211 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef nonnull %13, float noundef %210)
  %212 = extractvalue { <2 x float>, <2 x float> } %211, 0
  store <2 x float> %212, ptr %15, align 8
  %213 = extractvalue { <2 x float>, <2 x float> } %211, 1
  store <2 x float> %213, ptr %192, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #11
  %214 = load float, ptr %189, align 8, !tbaa !24
  %215 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef nonnull %13, float noundef %214)
  %216 = extractvalue { <2 x float>, <2 x float> } %215, 0
  store <2 x float> %216, ptr %16, align 8
  %217 = extractvalue { <2 x float>, <2 x float> } %215, 1
  store <2 x float> %217, ptr %193, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #11
  %218 = load float, ptr %194, align 4, !tbaa !24
  %219 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef nonnull %13, float noundef %218)
  %220 = extractvalue { <2 x float>, <2 x float> } %219, 0
  store <2 x float> %220, ptr %17, align 8
  %221 = extractvalue { <2 x float>, <2 x float> } %219, 1
  store <2 x float> %221, ptr %195, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #11
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %13, i64 16, i1 false), !tbaa.struct !28
  %222 = call noundef ptr @_ZN6basisuL24vec4F_normalize_in_placeEPNS_12bc7enc_vec4FE(ptr noundef nonnull %18)
  %223 = call noundef float @_ZN6basisuL9vec4F_dotEPKNS_12bc7enc_vec4FES2_(ptr noundef nonnull %14, ptr noundef nonnull %18)
  %224 = load float, ptr %10, align 4, !tbaa !24
  %225 = fadd float %223, %224
  store float %225, ptr %10, align 4, !tbaa !24
  %226 = call noundef float @_ZN6basisuL9vec4F_dotEPKNS_12bc7enc_vec4FES2_(ptr noundef nonnull %15, ptr noundef nonnull %18)
  %227 = load float, ptr %196, align 4, !tbaa !24
  %228 = fadd float %226, %227
  store float %228, ptr %196, align 4, !tbaa !24
  %229 = call noundef float @_ZN6basisuL9vec4F_dotEPKNS_12bc7enc_vec4FES2_(ptr noundef nonnull %16, ptr noundef nonnull %18)
  %230 = load float, ptr %197, align 4, !tbaa !24
  %231 = fadd float %229, %230
  store float %231, ptr %197, align 4, !tbaa !24
  %232 = call noundef float @_ZN6basisuL9vec4F_dotEPKNS_12bc7enc_vec4FES2_(ptr noundef nonnull %17, ptr noundef nonnull %18)
  %233 = load float, ptr %198, align 4, !tbaa !24
  %234 = fadd float %232, %233
  store float %234, ptr %198, align 4, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #11
  %235 = load i32, ptr %1, align 8, !tbaa !21
  %236 = icmp ugt i32 %235, 1
  br i1 %236, label %.peel.next, label %._crit_edge593

._crit_edge593:                                   ; preds = %.peel.next, %.lr.ph592, %185
  %237 = call noundef ptr @_ZN6basisuL24vec4F_normalize_in_placeEPNS_12bc7enc_vec4FE(ptr noundef nonnull %10)
  br label %371

.peel.next:                                       ; preds = %.lr.ph592, %.peel.next
  %indvars.iv675 = phi i64 [ %indvars.iv.next676, %.peel.next ], [ 1, %.lr.ph592 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #11
  %238 = load ptr, ptr %188, align 8, !tbaa !23
  %239 = getelementptr inbounds %"struct.basist::color_quad_u8", ptr %238, i64 %indvars.iv675
  %240 = call { <2 x float>, <2 x float> } @_ZN6basisuL16vec4F_from_colorEPKN6basist13color_quad_u8E(ptr noundef nonnull %239)
  %241 = extractvalue { <2 x float>, <2 x float> } %240, 0
  store <2 x float> %241, ptr %13, align 8
  %242 = extractvalue { <2 x float>, <2 x float> } %240, 1
  store <2 x float> %242, ptr %189, align 8
  %243 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_subEPKNS_12bc7enc_vec4FES2_(ptr noundef nonnull %13, ptr noundef nonnull %12)
  %244 = extractvalue { <2 x float>, <2 x float> } %243, 0
  %245 = extractvalue { <2 x float>, <2 x float> } %243, 1
  store <2 x float> %244, ptr %13, align 8
  store <2 x float> %245, ptr %189, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #11
  %246 = extractelement <2 x float> %244, i64 0
  %247 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef nonnull %13, float noundef %246)
  %248 = extractvalue { <2 x float>, <2 x float> } %247, 0
  store <2 x float> %248, ptr %14, align 8
  %249 = extractvalue { <2 x float>, <2 x float> } %247, 1
  store <2 x float> %249, ptr %190, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #11
  %250 = load float, ptr %191, align 4, !tbaa !24
  %251 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef nonnull %13, float noundef %250)
  %252 = extractvalue { <2 x float>, <2 x float> } %251, 0
  store <2 x float> %252, ptr %15, align 8
  %253 = extractvalue { <2 x float>, <2 x float> } %251, 1
  store <2 x float> %253, ptr %192, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #11
  %254 = load float, ptr %189, align 8, !tbaa !24
  %255 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef nonnull %13, float noundef %254)
  %256 = extractvalue { <2 x float>, <2 x float> } %255, 0
  store <2 x float> %256, ptr %16, align 8
  %257 = extractvalue { <2 x float>, <2 x float> } %255, 1
  store <2 x float> %257, ptr %193, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #11
  %258 = load float, ptr %194, align 4, !tbaa !24
  %259 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef nonnull %13, float noundef %258)
  %260 = extractvalue { <2 x float>, <2 x float> } %259, 0
  store <2 x float> %260, ptr %17, align 8
  %261 = extractvalue { <2 x float>, <2 x float> } %259, 1
  store <2 x float> %261, ptr %195, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #11
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %18, ptr noundef nonnull align 4 dereferenceable(16) %10, i64 16, i1 false), !tbaa.struct !28
  %262 = call noundef ptr @_ZN6basisuL24vec4F_normalize_in_placeEPNS_12bc7enc_vec4FE(ptr noundef nonnull %18)
  %263 = call noundef float @_ZN6basisuL9vec4F_dotEPKNS_12bc7enc_vec4FES2_(ptr noundef nonnull %14, ptr noundef nonnull %18)
  %264 = load float, ptr %10, align 4, !tbaa !24
  %265 = fadd float %263, %264
  store float %265, ptr %10, align 4, !tbaa !24
  %266 = call noundef float @_ZN6basisuL9vec4F_dotEPKNS_12bc7enc_vec4FES2_(ptr noundef nonnull %15, ptr noundef nonnull %18)
  %267 = load float, ptr %196, align 4, !tbaa !24
  %268 = fadd float %266, %267
  store float %268, ptr %196, align 4, !tbaa !24
  %269 = call noundef float @_ZN6basisuL9vec4F_dotEPKNS_12bc7enc_vec4FES2_(ptr noundef nonnull %16, ptr noundef nonnull %18)
  %270 = load float, ptr %197, align 4, !tbaa !24
  %271 = fadd float %269, %270
  store float %271, ptr %197, align 4, !tbaa !24
  %272 = call noundef float @_ZN6basisuL9vec4F_dotEPKNS_12bc7enc_vec4FES2_(ptr noundef nonnull %17, ptr noundef nonnull %18)
  %273 = load float, ptr %198, align 4, !tbaa !24
  %274 = fadd float %272, %273
  store float %274, ptr %198, align 4, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #11
  %indvars.iv.next676 = add nuw nsw i64 %indvars.iv675, 1
  %275 = load i32, ptr %1, align 8, !tbaa !21
  %276 = zext i32 %275 to i64
  %277 = icmp ult i64 %indvars.iv.next676, %276
  br i1 %277, label %.peel.next, label %._crit_edge593, !llvm.loop !29

.preheader584.loopexit:                           ; preds = %343
  %278 = extractelement <2 x float> %359, i64 1
  %279 = extractelement <2 x float> %359, i64 0
  br label %.preheader584

.preheader584:                                    ; preds = %.preheader584.loopexit, %.preheader585
  %.sroa.6.0.lcssa = phi float [ 0.000000e+00, %.preheader585 ], [ %278, %.preheader584.loopexit ]
  %.sroa.0219.0.lcssa = phi float [ 0.000000e+00, %.preheader585 ], [ %279, %.preheader584.loopexit ]
  %280 = phi <4 x float> [ zeroinitializer, %.preheader585 ], [ %362, %.preheader584.loopexit ]
  %281 = call float @llvm.fmuladd.f32(float %.sroa.0219.0.lcssa, float 0x3FECCCCCC0000000, float %.sroa.6.0.lcssa)
  %282 = extractelement <4 x float> %280, i64 3
  %283 = call float @llvm.fmuladd.f32(float %282, float 0x3FE6666660000000, float %281)
  %284 = extractelement <4 x float> %280, i64 1
  %285 = call float @llvm.fmuladd.f32(float %.sroa.6.0.lcssa, float 0x3FECCCCCC0000000, float %284)
  %286 = extractelement <4 x float> %280, i64 2
  %287 = call float @llvm.fmuladd.f32(float %286, float 0x3FE6666660000000, float %285)
  %288 = call float @llvm.fmuladd.f32(float %282, float 0x3FECCCCCC0000000, float %286)
  %289 = extractelement <4 x float> %280, i64 0
  %290 = call float @llvm.fmuladd.f32(float %289, float 0x3FE6666660000000, float %288)
  %291 = call float @llvm.fabs.f32(float %283)
  %292 = call float @llvm.fabs.f32(float %287)
  %293 = call noundef float @_ZN6basisu8maximumfEff(float noundef %291, float noundef %292)
  %294 = call float @llvm.fabs.f32(float %290)
  %295 = call noundef float @_ZN6basisu8maximumfEff(float noundef %293, float noundef %294)
  %296 = fcmp ogt float %295, 0x3DDB7CDFE0000000
  %297 = fdiv float 1.000000e+00, %295
  %298 = fmul float %283, %297
  %299 = fmul float %287, %297
  %300 = fmul float %290, %297
  %.0473 = select i1 %296, float %300, float %290
  %.0472 = select i1 %296, float %299, float %287
  %.0471 = select i1 %296, float %298, float %283
  %301 = fmul float %.sroa.6.0.lcssa, %.0472
  %302 = call float @llvm.fmuladd.f32(float %.0471, float %.sroa.0219.0.lcssa, float %301)
  %303 = call float @llvm.fmuladd.f32(float %.0473, float %282, float %302)
  %304 = fmul float %284, %.0472
  %305 = call float @llvm.fmuladd.f32(float %.0471, float %.sroa.6.0.lcssa, float %304)
  %306 = call float @llvm.fmuladd.f32(float %.0473, float %286, float %305)
  %307 = fmul float %286, %.0472
  %308 = call float @llvm.fmuladd.f32(float %.0471, float %282, float %307)
  %309 = call float @llvm.fmuladd.f32(float %.0473, float %289, float %308)
  %310 = call float @llvm.fabs.f32(float %303)
  %311 = call float @llvm.fabs.f32(float %306)
  %312 = call noundef float @_ZN6basisu8maximumfEff(float noundef %310, float noundef %311)
  %313 = call float @llvm.fabs.f32(float %309)
  %314 = call noundef float @_ZN6basisu8maximumfEff(float noundef %312, float noundef %313)
  %315 = fcmp ogt float %314, 0x3DDB7CDFE0000000
  %316 = fdiv float 1.000000e+00, %314
  %317 = fmul float %303, %316
  %318 = fmul float %306, %316
  %319 = fmul float %309, %316
  %.0473.1 = select i1 %315, float %319, float %309
  %.0472.1 = select i1 %315, float %318, float %306
  %.0471.1 = select i1 %315, float %317, float %303
  %320 = fmul float %.sroa.6.0.lcssa, %.0472.1
  %321 = call float @llvm.fmuladd.f32(float %.0471.1, float %.sroa.0219.0.lcssa, float %320)
  %322 = call float @llvm.fmuladd.f32(float %.0473.1, float %282, float %321)
  %323 = fmul float %284, %.0472.1
  %324 = call float @llvm.fmuladd.f32(float %.0471.1, float %.sroa.6.0.lcssa, float %323)
  %325 = call float @llvm.fmuladd.f32(float %.0473.1, float %286, float %324)
  %326 = fmul float %286, %.0472.1
  %327 = call float @llvm.fmuladd.f32(float %.0471.1, float %282, float %326)
  %328 = call float @llvm.fmuladd.f32(float %.0473.1, float %289, float %327)
  %329 = call float @llvm.fabs.f32(float %322)
  %330 = call float @llvm.fabs.f32(float %325)
  %331 = call noundef float @_ZN6basisu8maximumfEff(float noundef %329, float noundef %330)
  %332 = call float @llvm.fabs.f32(float %328)
  %333 = call noundef float @_ZN6basisu8maximumfEff(float noundef %331, float noundef %332)
  %334 = fcmp ogt float %333, 0x3DDB7CDFE0000000
  %335 = fdiv float 1.000000e+00, %333
  %336 = fmul float %322, %335
  %337 = fmul float %325, %335
  %338 = fmul float %328, %335
  %.0473.2 = select i1 %334, float %338, float %328
  %.0472.2 = select i1 %334, float %337, float %325
  %.0471.2 = select i1 %334, float %336, float %322
  %339 = fmul float %.0472.2, %.0472.2
  %340 = call float @llvm.fmuladd.f32(float %.0471.2, float %.0471.2, float %339)
  %341 = call float @llvm.fmuladd.f32(float %.0473.2, float %.0473.2, float %340)
  %342 = fcmp olt float %341, 0x3DDB7CDFE0000000
  br i1 %342, label %363, label %365

343:                                              ; preds = %.lr.ph601, %343
  %indvars.iv679 = phi i64 [ 0, %.lr.ph601 ], [ %indvars.iv.next680, %343 ]
  %344 = phi <4 x float> [ zeroinitializer, %.lr.ph601 ], [ %362, %343 ]
  %345 = phi <2 x float> [ zeroinitializer, %.lr.ph601 ], [ %359, %343 ]
  %346 = getelementptr inbounds %"struct.basist::color_quad_u8", ptr %169, i64 %indvars.iv679
  %347 = load i8, ptr %346, align 1, !tbaa !22
  %348 = uitofp i8 %347 to float
  %349 = fsub float %348, %170
  %350 = getelementptr inbounds i8, ptr %346, i64 1
  %351 = load <2 x i8>, ptr %350, align 1, !tbaa !22
  %352 = uitofp <2 x i8> %351 to <2 x float>
  %353 = fsub <2 x float> %352, %172
  %354 = shufflevector <2 x float> %353, <2 x float> poison, <4 x i32> <i32 1, i32 0, i32 0, i32 1>
  %355 = insertelement <2 x float> poison, float %349, i64 0
  %356 = shufflevector <2 x float> %355, <2 x float> poison, <2 x i32> zeroinitializer
  %357 = shufflevector <2 x float> %353, <2 x float> poison, <2 x i32> <i32 poison, i32 0>
  %358 = insertelement <2 x float> %357, float %349, i64 0
  %359 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %356, <2 x float> %358, <2 x float> %345)
  %360 = shufflevector <2 x float> %353, <2 x float> poison, <4 x i32> <i32 1, i32 0, i32 1, i32 poison>
  %361 = insertelement <4 x float> %360, float %349, i64 3
  %362 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %361, <4 x float> %354, <4 x float> %344)
  %indvars.iv.next680 = add nuw nsw i64 %indvars.iv679, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next680, %wide.trip.count
  br i1 %exitcond.not, label %.preheader584.loopexit, label %343, !llvm.loop !31

363:                                              ; preds = %.preheader584
  %364 = call noundef ptr @_ZN6basisuL16vec4F_set_scalarEPNS_12bc7enc_vec4FEf(ptr noundef nonnull %10, float noundef 0.000000e+00)
  br label %371

365:                                              ; preds = %.preheader584
  %sqrt = call float @llvm.sqrt.f32(float %341)
  %366 = fdiv float 1.000000e+00, %sqrt
  %367 = fmul float %.0471.2, %366
  %368 = fmul float %.0472.2, %366
  %369 = fmul float %.0473.2, %366
  %370 = call noundef ptr @_ZN6basisuL9vec4F_setEPNS_12bc7enc_vec4FEffff(ptr noundef nonnull %10, float noundef %367, float noundef %368, float noundef %369, float noundef 0.000000e+00)
  br label %371

371:                                              ; preds = %363, %365, %._crit_edge593
  %372 = call noundef float @_ZN6basisuL9vec4F_dotEPKNS_12bc7enc_vec4FES2_(ptr noundef nonnull %10, ptr noundef nonnull %10)
  %373 = fcmp olt float %372, 5.000000e-01
  br i1 %373, label %374, label %386

374:                                              ; preds = %371
  %375 = getelementptr inbounds i8, ptr %1, i64 79
  %376 = load i8, ptr %375, align 1, !tbaa !32
  %.not515 = icmp eq i8 %376, 0
  %377 = load i8, ptr %165, align 4, !tbaa !11
  %.not516 = icmp eq i8 %377, 0
  br i1 %.not515, label %381, label %378

378:                                              ; preds = %374
  %379 = select i1 %.not516, float 0.000000e+00, float 0x3FE6E147A0000000
  %380 = call noundef ptr @_ZN6basisuL9vec4F_setEPNS_12bc7enc_vec4FEffff(ptr noundef nonnull %10, float noundef 0x3FCB439580000000, float noundef 0x3FE6E147A0000000, float noundef 0x3FB26E9780000000, float noundef %379)
  br label %384

381:                                              ; preds = %374
  %382 = select i1 %.not516, float 0.000000e+00, float 1.000000e+00
  %383 = call noundef ptr @_ZN6basisuL9vec4F_setEPNS_12bc7enc_vec4FEffff(ptr noundef nonnull %10, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef %382)
  br label %384

384:                                              ; preds = %381, %378
  %385 = call noundef ptr @_ZN6basisuL24vec4F_normalize_in_placeEPNS_12bc7enc_vec4FE(ptr noundef nonnull %10)
  br label %386

386:                                              ; preds = %384, %371
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #11
  %387 = load i32, ptr %1, align 8, !tbaa !21
  %.not656 = icmp eq i32 %387, 0
  br i1 %.not656, label %._crit_edge617, label %.lr.ph616

.lr.ph616:                                        ; preds = %386
  %388 = getelementptr inbounds i8, ptr %1, i64 8
  %389 = getelementptr inbounds i8, ptr %21, i64 8
  %390 = getelementptr inbounds i8, ptr %22, i64 8
  br label %419

._crit_edge617:                                   ; preds = %419, %386
  %.0475.lcssa = phi float [ -1.000000e+09, %386 ], [ %430, %419 ]
  %.0474.lcssa = phi float [ 1.000000e+09, %386 ], [ %429, %419 ]
  %391 = fmul float %.0474.lcssa, 0x3F70101020000000
  %392 = fmul float %.0475.lcssa, 0x3F70101020000000
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %23) #11
  %393 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef nonnull %10, float noundef %391)
  %394 = extractvalue { <2 x float>, <2 x float> } %393, 0
  store <2 x float> %394, ptr %23, align 8
  %395 = getelementptr inbounds i8, ptr %23, i64 8
  %396 = extractvalue { <2 x float>, <2 x float> } %393, 1
  store <2 x float> %396, ptr %395, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %24) #11
  %397 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef nonnull %10, float noundef %392)
  %398 = extractvalue { <2 x float>, <2 x float> } %397, 0
  store <2 x float> %398, ptr %24, align 8
  %399 = getelementptr inbounds i8, ptr %24, i64 8
  %400 = extractvalue { <2 x float>, <2 x float> } %397, 1
  store <2 x float> %400, ptr %399, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %25) #11
  %401 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_addEPKNS_12bc7enc_vec4FES2_(ptr noundef nonnull %9, ptr noundef nonnull %23)
  %402 = extractvalue { <2 x float>, <2 x float> } %401, 0
  store <2 x float> %402, ptr %25, align 8
  %403 = getelementptr inbounds i8, ptr %25, i64 8
  %404 = extractvalue { <2 x float>, <2 x float> } %401, 1
  store <2 x float> %404, ptr %403, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %26) #11
  %405 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_addEPKNS_12bc7enc_vec4FES2_(ptr noundef nonnull %9, ptr noundef nonnull %24)
  %406 = extractvalue { <2 x float>, <2 x float> } %405, 0
  store <2 x float> %406, ptr %26, align 8
  %407 = getelementptr inbounds i8, ptr %26, i64 8
  %408 = extractvalue { <2 x float>, <2 x float> } %405, 1
  store <2 x float> %408, ptr %407, align 8
  %409 = call { <2 x float>, <2 x float> } @_ZN6basisuL14vec4F_saturateEPKNS_12bc7enc_vec4FE(ptr noundef nonnull %25)
  %410 = extractvalue { <2 x float>, <2 x float> } %409, 0
  %411 = extractvalue { <2 x float>, <2 x float> } %409, 1
  store <2 x float> %410, ptr %19, align 8
  %.sroa.4148.0..sroa_idx = getelementptr inbounds i8, ptr %19, i64 8
  store <2 x float> %411, ptr %.sroa.4148.0..sroa_idx, align 8, !tbaa !22
  %412 = call { <2 x float>, <2 x float> } @_ZN6basisuL14vec4F_saturateEPKNS_12bc7enc_vec4FE(ptr noundef nonnull %26)
  %413 = extractvalue { <2 x float>, <2 x float> } %412, 0
  %414 = extractvalue { <2 x float>, <2 x float> } %412, 1
  store <2 x float> %413, ptr %20, align 8
  %.sroa.4146.0..sroa_idx = getelementptr inbounds i8, ptr %20, i64 8
  store <2 x float> %414, ptr %.sroa.4146.0..sroa_idx, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %27) #11
  %415 = call noundef ptr @_ZN6basisuL16vec4F_set_scalarEPNS_12bc7enc_vec4FEf(ptr noundef nonnull %27, float noundef 1.000000e+00)
  %416 = call noundef float @_ZN6basisuL9vec4F_dotEPKNS_12bc7enc_vec4FES2_(ptr noundef nonnull %19, ptr noundef nonnull %27)
  %417 = call noundef float @_ZN6basisuL9vec4F_dotEPKNS_12bc7enc_vec4FES2_(ptr noundef nonnull %20, ptr noundef nonnull %27)
  %418 = fcmp ogt float %416, %417
  br i1 %418, label %434, label %439

419:                                              ; preds = %.lr.ph616, %419
  %indvars.iv683 = phi i64 [ 0, %.lr.ph616 ], [ %indvars.iv.next684, %419 ]
  %.0474614 = phi float [ 1.000000e+09, %.lr.ph616 ], [ %429, %419 ]
  %.0475613 = phi float [ -1.000000e+09, %.lr.ph616 ], [ %430, %419 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %21) #11
  %420 = load ptr, ptr %388, align 8, !tbaa !23
  %421 = getelementptr inbounds %"struct.basist::color_quad_u8", ptr %420, i64 %indvars.iv683
  %422 = call { <2 x float>, <2 x float> } @_ZN6basisuL16vec4F_from_colorEPKN6basist13color_quad_u8E(ptr noundef %421)
  %423 = extractvalue { <2 x float>, <2 x float> } %422, 0
  store <2 x float> %423, ptr %21, align 8
  %424 = extractvalue { <2 x float>, <2 x float> } %422, 1
  store <2 x float> %424, ptr %389, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %22) #11
  %425 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_subEPKNS_12bc7enc_vec4FES2_(ptr noundef nonnull %21, ptr noundef nonnull %12)
  %426 = extractvalue { <2 x float>, <2 x float> } %425, 0
  store <2 x float> %426, ptr %22, align 8
  %427 = extractvalue { <2 x float>, <2 x float> } %425, 1
  store <2 x float> %427, ptr %390, align 8
  %428 = call noundef float @_ZN6basisuL9vec4F_dotEPKNS_12bc7enc_vec4FES2_(ptr noundef nonnull %22, ptr noundef nonnull %10)
  %429 = call noundef float @_ZN6basisu8minimumfEff(float noundef %.0474614, float noundef %428)
  %430 = call noundef float @_ZN6basisu8maximumfEff(float noundef %.0475613, float noundef %428)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #11
  %indvars.iv.next684 = add nuw nsw i64 %indvars.iv683, 1
  %431 = load i32, ptr %1, align 8, !tbaa !21
  %432 = zext i32 %431 to i64
  %433 = icmp ult i64 %indvars.iv.next684, %432
  br i1 %433, label %419, label %._crit_edge617, !llvm.loop !33

434:                                              ; preds = %._crit_edge617
  call void @_ZSt4swapIfENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20) #11
  %435 = getelementptr inbounds i8, ptr %19, i64 4
  %436 = getelementptr inbounds i8, ptr %20, i64 4
  call void @_ZSt4swapIfENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %435, ptr noundef nonnull align 4 dereferenceable(4) %436) #11
  call void @_ZSt4swapIfENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %.sroa.4148.0..sroa_idx, ptr noundef nonnull align 4 dereferenceable(4) %.sroa.4146.0..sroa_idx) #11
  %437 = getelementptr inbounds i8, ptr %19, i64 12
  %438 = getelementptr inbounds i8, ptr %20, i64 12
  call void @_ZSt4swapIfENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %437, ptr noundef nonnull align 4 dereferenceable(4) %438) #11
  br label %439

439:                                              ; preds = %434, %._crit_edge617
  %.sroa.0143.0.copyload = load <2 x float>, ptr %19, align 8
  %.sroa.2144.0.copyload = load <2 x float>, ptr %.sroa.4148.0..sroa_idx, align 8, !tbaa !22
  %.sroa.0141.0.copyload = load <2 x float>, ptr %20, align 8
  %.sroa.2142.0.copyload = load <2 x float>, ptr %.sroa.4146.0..sroa_idx, align 8, !tbaa !22
  %440 = call noundef i64 @_ZN6basisuL21find_optimal_solutionEjNS_12bc7enc_vec4FES0_PKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsE(i32 noundef %0, <2 x float> %.sroa.0143.0.copyload, <2 x float> %.sroa.2144.0.copyload, <2 x float> %.sroa.0141.0.copyload, <2 x float> %.sroa.2142.0.copyload, ptr noundef nonnull %1, ptr noundef %2)
  %.not518 = icmp eq i64 %440, 0
  br i1 %.not518, label %.loopexit583, label %.preheader582

.preheader582:                                    ; preds = %439
  %441 = getelementptr inbounds i8, ptr %3, i64 28
  %442 = load i32, ptr %441, align 4, !tbaa !34
  %.not521620.not = icmp eq i32 %442, 0
  br i1 %.not521620.not, label %.critedge542, label %.lr.ph622

.lr.ph622:                                        ; preds = %.preheader582
  %443 = getelementptr inbounds i8, ptr %2, i64 24
  %444 = getelementptr inbounds i8, ptr %1, i64 32
  %445 = getelementptr inbounds i8, ptr %1, i64 8
  %.sroa.4138.0..sroa_idx = getelementptr inbounds i8, ptr %28, i64 8
  %.sroa.4136.0..sroa_idx = getelementptr inbounds i8, ptr %29, i64 8
  br label %449

446:                                              ; preds = %459
  %447 = add nuw i32 %.0477621, 1
  %448 = load i32, ptr %441, align 4, !tbaa !34
  %.not521 = icmp ult i32 %447, %448
  br i1 %.not521, label %449, label %.critedge542, !llvm.loop !36

449:                                              ; preds = %.lr.ph622, %446
  %.0477621 = phi i32 [ 0, %.lr.ph622 ], [ %447, %446 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %28) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %29) #11
  %450 = call noundef ptr @_ZN6basisuL16vec4F_set_scalarEPNS_12bc7enc_vec4FEf(ptr noundef nonnull %28, float noundef 0.000000e+00)
  %451 = call noundef ptr @_ZN6basisuL16vec4F_set_scalarEPNS_12bc7enc_vec4FEf(ptr noundef nonnull %29, float noundef 0.000000e+00)
  %452 = load i8, ptr %165, align 4, !tbaa !11
  %.not519 = icmp eq i8 %452, 0
  %453 = load i32, ptr %1, align 8, !tbaa !21
  %454 = load ptr, ptr %443, align 8, !tbaa !20
  %455 = load ptr, ptr %444, align 8, !tbaa !37
  %456 = load ptr, ptr %445, align 8, !tbaa !23
  br i1 %.not519, label %458, label %457

457:                                              ; preds = %449
  call void @_ZN6basisuL36compute_least_squares_endpoints_rgbaEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef %453, ptr noundef %454, ptr noundef %455, ptr noundef nonnull %28, ptr noundef nonnull %29, ptr noundef %456)
  br label %459

458:                                              ; preds = %449
  call void @_ZN6basisuL35compute_least_squares_endpoints_rgbEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef %453, ptr noundef %454, ptr noundef %455, ptr noundef nonnull %28, ptr noundef nonnull %29, ptr noundef %456)
  br label %459

459:                                              ; preds = %458, %457
  %460 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef nonnull %28, float noundef 0x3F70101020000000)
  %461 = extractvalue { <2 x float>, <2 x float> } %460, 0
  %462 = extractvalue { <2 x float>, <2 x float> } %460, 1
  store <2 x float> %461, ptr %28, align 8
  store <2 x float> %462, ptr %.sroa.4138.0..sroa_idx, align 8, !tbaa !22
  %463 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef nonnull %29, float noundef 0x3F70101020000000)
  %464 = extractvalue { <2 x float>, <2 x float> } %463, 0
  %465 = extractvalue { <2 x float>, <2 x float> } %463, 1
  store <2 x float> %464, ptr %29, align 8
  store <2 x float> %465, ptr %.sroa.4136.0..sroa_idx, align 8, !tbaa !22
  %.sroa.0133.0.copyload = load <2 x float>, ptr %28, align 8
  %.sroa.2134.0.copyload = load <2 x float>, ptr %.sroa.4138.0..sroa_idx, align 8, !tbaa !22
  %466 = call noundef i64 @_ZN6basisuL21find_optimal_solutionEjNS_12bc7enc_vec4FES0_PKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsE(i32 noundef %0, <2 x float> %.sroa.0133.0.copyload, <2 x float> %.sroa.2134.0.copyload, <2 x float> %464, <2 x float> %465, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %.not520.not = icmp eq i64 %466, 0
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %29) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %28) #11
  br i1 %.not520.not, label %.loopexit583, label %446

.critedge542:                                     ; preds = %446, %.preheader582
  %467 = load ptr, ptr %65, align 8, !tbaa !19
  %.not522 = icmp eq ptr %467, null
  br i1 %.not522, label %468, label %.thread566

468:                                              ; preds = %.critedge542
  %469 = getelementptr inbounds i8, ptr %3, i64 20
  %470 = load i32, ptr %469, align 4, !tbaa !38
  %.not523 = icmp eq i32 %470, 0
  br i1 %.not523, label %.thread, label %471

471:                                              ; preds = %468
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %30) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %31) #11
  %472 = getelementptr inbounds i8, ptr %2, i64 24
  %473 = load ptr, ptr %472, align 8, !tbaa !20
  %474 = load i32, ptr %1, align 8, !tbaa !21
  %475 = zext i32 %474 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %30, ptr align 1 %473, i64 %475, i1 false)
  %476 = load i32, ptr %48, align 8, !tbaa !12
  %477 = add i32 %476, -1
  %.not657 = icmp eq i32 %474, 0
  br i1 %.not657, label %._crit_edge633, label %.lr.ph627

.preheader581:                                    ; preds = %.lr.ph627
  %.not658 = icmp eq i32 %484, 0
  br i1 %.not658, label %._crit_edge633, label %.lr.ph632.preheader

.lr.ph632.preheader:                              ; preds = %.preheader581
  %wide.trip.count692 = zext i32 %484 to i64
  %xtraiter = and i64 %wide.trip.count692, 1
  %478 = icmp eq i32 %484, 1
  br i1 %478, label %._crit_edge633.loopexit.unr-lcssa, label %.lr.ph632.preheader.new

.lr.ph632.preheader.new:                          ; preds = %.lr.ph632.preheader
  %unroll_iter = and i64 %wide.trip.count692, 4294967294
  br label %.lr.ph632

.lr.ph627:                                        ; preds = %471, %.lr.ph627
  %indvars.iv686 = phi i64 [ %indvars.iv.next687, %.lr.ph627 ], [ 0, %471 ]
  %.0478625 = phi i32 [ %482, %.lr.ph627 ], [ 256, %471 ]
  %.0479624 = phi i32 [ %483, %.lr.ph627 ], [ 0, %471 ]
  %479 = getelementptr inbounds [16 x i8], ptr %30, i64 0, i64 %indvars.iv686
  %480 = load i8, ptr %479, align 1, !tbaa !22
  %481 = zext i8 %480 to i32
  %482 = call noundef i32 @_ZN6basisu8minimumuEjj(i32 noundef %.0478625, i32 noundef %481)
  %483 = call noundef i32 @_ZN6basisu8maximumuEjj(i32 noundef %.0479624, i32 noundef %481)
  %indvars.iv.next687 = add nuw nsw i64 %indvars.iv686, 1
  %484 = load i32, ptr %1, align 8, !tbaa !21
  %485 = zext i32 %484 to i64
  %486 = icmp ult i64 %indvars.iv.next687, %485
  br i1 %486, label %.lr.ph627, label %.preheader581, !llvm.loop !39

._crit_edge633.loopexit.unr-lcssa:                ; preds = %524, %.lr.ph632.preheader
  %indvars.iv689.unr = phi i64 [ 0, %.lr.ph632.preheader ], [ %indvars.iv.next690.1, %524 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge633, label %.lr.ph632.epil

.lr.ph632.epil:                                   ; preds = %._crit_edge633.loopexit.unr-lcssa
  %487 = getelementptr inbounds [16 x i8], ptr %30, i64 0, i64 %indvars.iv689.unr
  %488 = load i8, ptr %487, align 1, !tbaa !22
  %489 = zext i8 %488 to i32
  %490 = icmp eq i32 %482, %489
  br i1 %490, label %491, label %._crit_edge633.loopexit.epilog-lcssa

491:                                              ; preds = %.lr.ph632.epil
  %492 = load i32, ptr %48, align 8, !tbaa !12
  %493 = add i32 %492, -1
  %494 = icmp ugt i32 %493, %482
  %495 = zext i1 %494 to i8
  %spec.select.epil = add i8 %488, %495
  br label %._crit_edge633.loopexit.epilog-lcssa

._crit_edge633.loopexit.epilog-lcssa:             ; preds = %491, %.lr.ph632.epil
  %.0482.epil = phi i8 [ %488, %.lr.ph632.epil ], [ %spec.select.epil, %491 ]
  %496 = getelementptr inbounds [16 x i8], ptr %31, i64 0, i64 %indvars.iv689.unr
  store i8 %.0482.epil, ptr %496, align 1, !tbaa !22
  br label %._crit_edge633

._crit_edge633:                                   ; preds = %._crit_edge633.loopexit.epilog-lcssa, %._crit_edge633.loopexit.unr-lcssa, %471, %.preheader581
  %.0478.lcssa717 = phi i32 [ %482, %.preheader581 ], [ 256, %471 ], [ %482, %._crit_edge633.loopexit.unr-lcssa ], [ %482, %._crit_edge633.loopexit.epilog-lcssa ]
  %.0479.lcssa716 = phi i32 [ %483, %.preheader581 ], [ 0, %471 ], [ %483, %._crit_edge633.loopexit.unr-lcssa ], [ %483, %._crit_edge633.loopexit.epilog-lcssa ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %32) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %33) #11
  %497 = call noundef ptr @_ZN6basisuL16vec4F_set_scalarEPNS_12bc7enc_vec4FEf(ptr noundef nonnull %32, float noundef 0.000000e+00)
  %498 = call noundef ptr @_ZN6basisuL16vec4F_set_scalarEPNS_12bc7enc_vec4FEf(ptr noundef nonnull %33, float noundef 0.000000e+00)
  %499 = load i8, ptr %165, align 4, !tbaa !11
  %.not524 = icmp eq i8 %499, 0
  %500 = load i32, ptr %1, align 8, !tbaa !21
  %501 = getelementptr inbounds i8, ptr %1, i64 32
  %502 = load ptr, ptr %501, align 8, !tbaa !37
  %503 = getelementptr inbounds i8, ptr %1, i64 8
  %504 = load ptr, ptr %503, align 8, !tbaa !23
  br i1 %.not524, label %527, label %526

.lr.ph632:                                        ; preds = %524, %.lr.ph632.preheader.new
  %indvars.iv689 = phi i64 [ 0, %.lr.ph632.preheader.new ], [ %indvars.iv.next690.1, %524 ]
  %niter = phi i64 [ 0, %.lr.ph632.preheader.new ], [ %niter.next.1, %524 ]
  %505 = getelementptr inbounds [16 x i8], ptr %30, i64 0, i64 %indvars.iv689
  %506 = load i8, ptr %505, align 2, !tbaa !22
  %507 = zext i8 %506 to i32
  %508 = icmp eq i32 %482, %507
  br i1 %508, label %509, label %.lr.ph632.1

509:                                              ; preds = %.lr.ph632
  %510 = load i32, ptr %48, align 8, !tbaa !12
  %511 = add i32 %510, -1
  %512 = icmp ugt i32 %511, %482
  %513 = zext i1 %512 to i8
  %spec.select = add i8 %506, %513
  br label %.lr.ph632.1

.lr.ph632.1:                                      ; preds = %509, %.lr.ph632
  %.0482 = phi i8 [ %506, %.lr.ph632 ], [ %spec.select, %509 ]
  %514 = getelementptr inbounds [16 x i8], ptr %31, i64 0, i64 %indvars.iv689
  store i8 %.0482, ptr %514, align 2, !tbaa !22
  %indvars.iv.next690 = or disjoint i64 %indvars.iv689, 1
  %515 = getelementptr inbounds [16 x i8], ptr %30, i64 0, i64 %indvars.iv.next690
  %516 = load i8, ptr %515, align 1, !tbaa !22
  %517 = zext i8 %516 to i32
  %518 = icmp eq i32 %482, %517
  br i1 %518, label %519, label %524

519:                                              ; preds = %.lr.ph632.1
  %520 = load i32, ptr %48, align 8, !tbaa !12
  %521 = add i32 %520, -1
  %522 = icmp ugt i32 %521, %482
  %523 = zext i1 %522 to i8
  %spec.select.1 = add i8 %516, %523
  br label %524

524:                                              ; preds = %519, %.lr.ph632.1
  %.0482.1 = phi i8 [ %516, %.lr.ph632.1 ], [ %spec.select.1, %519 ]
  %525 = getelementptr inbounds [16 x i8], ptr %31, i64 0, i64 %indvars.iv.next690
  store i8 %.0482.1, ptr %525, align 1, !tbaa !22
  %indvars.iv.next690.1 = add nuw nsw i64 %indvars.iv689, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge633.loopexit.unr-lcssa, label %.lr.ph632, !llvm.loop !40

526:                                              ; preds = %._crit_edge633
  call void @_ZN6basisuL36compute_least_squares_endpoints_rgbaEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef %500, ptr noundef nonnull %31, ptr noundef %502, ptr noundef nonnull %32, ptr noundef nonnull %33, ptr noundef %504)
  br label %528

527:                                              ; preds = %._crit_edge633
  call void @_ZN6basisuL35compute_least_squares_endpoints_rgbEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef %500, ptr noundef nonnull %31, ptr noundef %502, ptr noundef nonnull %32, ptr noundef nonnull %33, ptr noundef %504)
  br label %528

528:                                              ; preds = %527, %526
  %529 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef nonnull %32, float noundef 0x3F70101020000000)
  %530 = extractvalue { <2 x float>, <2 x float> } %529, 0
  %531 = extractvalue { <2 x float>, <2 x float> } %529, 1
  store <2 x float> %530, ptr %32, align 8
  %.sroa.4106.0..sroa_idx = getelementptr inbounds i8, ptr %32, i64 8
  store <2 x float> %531, ptr %.sroa.4106.0..sroa_idx, align 8, !tbaa !22
  %532 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef nonnull %33, float noundef 0x3F70101020000000)
  %533 = extractvalue { <2 x float>, <2 x float> } %532, 0
  %534 = extractvalue { <2 x float>, <2 x float> } %532, 1
  store <2 x float> %533, ptr %33, align 8
  %.sroa.4104.0..sroa_idx = getelementptr inbounds i8, ptr %33, i64 8
  store <2 x float> %534, ptr %.sroa.4104.0..sroa_idx, align 8, !tbaa !22
  %.sroa.0101.0.copyload = load <2 x float>, ptr %32, align 8
  %.sroa.2102.0.copyload = load <2 x float>, ptr %.sroa.4106.0..sroa_idx, align 8, !tbaa !22
  %535 = call noundef i64 @_ZN6basisuL21find_optimal_solutionEjNS_12bc7enc_vec4FES0_PKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsE(i32 noundef %0, <2 x float> %.sroa.0101.0.copyload, <2 x float> %.sroa.2102.0.copyload, <2 x float> %533, <2 x float> %534, ptr noundef nonnull %1, ptr noundef %2)
  %.not525 = icmp eq i64 %535, 0
  br i1 %.not525, label %.loopexit, label %.preheader580

.preheader580:                                    ; preds = %528
  %536 = load i32, ptr %1, align 8, !tbaa !21
  %.not659 = icmp eq i32 %536, 0
  br i1 %.not659, label %._crit_edge636, label %iter.check

iter.check:                                       ; preds = %.preheader580
  %wide.trip.count697 = zext i32 %536 to i64
  %min.iters.check = icmp ult i32 %536, 8
  br i1 %min.iters.check, label %.lr.ph635.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  %min.iters.check743 = icmp ult i32 %536, 16
  br i1 %min.iters.check743, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %wide.trip.count697, 4294967280
  %broadcast.splatinsert = insertelement <16 x i32> poison, i32 %.0479.lcssa716, i64 0
  %broadcast.splat = shufflevector <16 x i32> %broadcast.splatinsert, <16 x i32> poison, <16 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %537 = getelementptr inbounds [16 x i8], ptr %30, i64 0, i64 %index
  %wide.load = load <16 x i8>, ptr %537, align 16, !tbaa !22
  %538 = zext <16 x i8> %wide.load to <16 x i32>
  %539 = icmp eq <16 x i32> %broadcast.splat, %538
  %540 = icmp ne <16 x i8> %wide.load, zeroinitializer
  %541 = and <16 x i1> %540, %539
  %542 = sext <16 x i1> %541 to <16 x i8>
  %543 = add <16 x i8> %wide.load, %542
  %544 = getelementptr inbounds [16 x i8], ptr %31, i64 0, i64 %index
  store <16 x i8> %543, ptr %544, align 16, !tbaa !22
  %index.next = add nuw i64 %index, 16
  %545 = icmp eq i64 %index.next, %n.vec
  br i1 %545, label %middle.block, label %vector.body, !llvm.loop !41

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count697
  br i1 %cmp.n, label %._crit_edge636, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %n.vec.remaining = and i64 %wide.trip.count697, 8
  %min.epilog.iters.check.not.not = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check.not.not, label %.lr.ph635.preheader, label %vec.epilog.ph

.lr.ph635.preheader:                              ; preds = %vec.epilog.middle.block, %iter.check, %vec.epilog.iter.check
  %indvars.iv694.ph = phi i64 [ 0, %iter.check ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec745, %vec.epilog.middle.block ]
  br label %.lr.ph635

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.vec745 = and i64 %wide.trip.count697, 4294967288
  %broadcast.splatinsert748 = insertelement <8 x i32> poison, i32 %.0479.lcssa716, i64 0
  %broadcast.splat749 = shufflevector <8 x i32> %broadcast.splatinsert748, <8 x i32> poison, <8 x i32> zeroinitializer
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index746 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next750, %vec.epilog.vector.body ]
  %546 = getelementptr inbounds [16 x i8], ptr %30, i64 0, i64 %index746
  %wide.load747 = load <8 x i8>, ptr %546, align 8, !tbaa !22
  %547 = zext <8 x i8> %wide.load747 to <8 x i32>
  %548 = icmp eq <8 x i32> %broadcast.splat749, %547
  %549 = icmp ne <8 x i8> %wide.load747, zeroinitializer
  %550 = and <8 x i1> %549, %548
  %551 = sext <8 x i1> %550 to <8 x i8>
  %552 = add <8 x i8> %wide.load747, %551
  %553 = getelementptr inbounds [16 x i8], ptr %31, i64 0, i64 %index746
  store <8 x i8> %552, ptr %553, align 8, !tbaa !22
  %index.next750 = add nuw i64 %index746, 8
  %554 = icmp eq i64 %index.next750, %n.vec745
  br i1 %554, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !44

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n751 = icmp eq i64 %n.vec745, %wide.trip.count697
  br i1 %cmp.n751, label %._crit_edge636, label %.lr.ph635.preheader

._crit_edge636:                                   ; preds = %.lr.ph635, %middle.block, %vec.epilog.middle.block, %.preheader580
  %555 = load i8, ptr %165, align 4, !tbaa !11
  %.not526 = icmp eq i8 %555, 0
  %556 = getelementptr inbounds i8, ptr %1, i64 32
  %557 = load ptr, ptr %556, align 8, !tbaa !37
  %558 = getelementptr inbounds i8, ptr %1, i64 8
  %559 = load ptr, ptr %558, align 8, !tbaa !23
  br i1 %.not526, label %568, label %567

.lr.ph635:                                        ; preds = %.lr.ph635.preheader, %.lr.ph635
  %indvars.iv694 = phi i64 [ %indvars.iv.next695, %.lr.ph635 ], [ %indvars.iv694.ph, %.lr.ph635.preheader ]
  %560 = getelementptr inbounds [16 x i8], ptr %30, i64 0, i64 %indvars.iv694
  %561 = load i8, ptr %560, align 1, !tbaa !22
  %562 = zext i8 %561 to i32
  %563 = icmp eq i32 %.0479.lcssa716, %562
  %564 = icmp ne i8 %561, 0
  %or.cond = and i1 %564, %563
  %565 = sext i1 %or.cond to i8
  %spec.select543 = add i8 %561, %565
  %566 = getelementptr inbounds [16 x i8], ptr %31, i64 0, i64 %indvars.iv694
  store i8 %spec.select543, ptr %566, align 1, !tbaa !22
  %indvars.iv.next695 = add nuw nsw i64 %indvars.iv694, 1
  %exitcond698.not = icmp eq i64 %indvars.iv.next695, %wide.trip.count697
  br i1 %exitcond698.not, label %._crit_edge636, label %.lr.ph635, !llvm.loop !45

567:                                              ; preds = %._crit_edge636
  call void @_ZN6basisuL36compute_least_squares_endpoints_rgbaEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef %536, ptr noundef nonnull %31, ptr noundef %557, ptr noundef nonnull %32, ptr noundef nonnull %33, ptr noundef %559)
  br label %569

568:                                              ; preds = %._crit_edge636
  call void @_ZN6basisuL35compute_least_squares_endpoints_rgbEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef %536, ptr noundef nonnull %31, ptr noundef %557, ptr noundef nonnull %32, ptr noundef nonnull %33, ptr noundef %559)
  br label %569

569:                                              ; preds = %568, %567
  %570 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef nonnull %32, float noundef 0x3F70101020000000)
  %571 = extractvalue { <2 x float>, <2 x float> } %570, 0
  %572 = extractvalue { <2 x float>, <2 x float> } %570, 1
  store <2 x float> %571, ptr %32, align 8
  store <2 x float> %572, ptr %.sroa.4106.0..sroa_idx, align 8, !tbaa !22
  %573 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef nonnull %33, float noundef 0x3F70101020000000)
  %574 = extractvalue { <2 x float>, <2 x float> } %573, 0
  %575 = extractvalue { <2 x float>, <2 x float> } %573, 1
  store <2 x float> %574, ptr %33, align 8
  store <2 x float> %575, ptr %.sroa.4104.0..sroa_idx, align 8, !tbaa !22
  %.sroa.085.0.copyload = load <2 x float>, ptr %32, align 8
  %.sroa.286.0.copyload = load <2 x float>, ptr %.sroa.4106.0..sroa_idx, align 8, !tbaa !22
  %576 = call noundef i64 @_ZN6basisuL21find_optimal_solutionEjNS_12bc7enc_vec4FES0_PKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsE(i32 noundef %0, <2 x float> %.sroa.085.0.copyload, <2 x float> %.sroa.286.0.copyload, <2 x float> %574, <2 x float> %575, ptr noundef nonnull %1, ptr noundef %2)
  %.not527 = icmp eq i64 %576, 0
  br i1 %.not527, label %.loopexit, label %.preheader579

.preheader579:                                    ; preds = %569
  %577 = load i32, ptr %1, align 8, !tbaa !21
  %.not660 = icmp eq i32 %577, 0
  br i1 %.not660, label %._crit_edge640, label %.lr.ph639.preheader

.lr.ph639.preheader:                              ; preds = %.preheader579
  %wide.trip.count702 = zext i32 %577 to i64
  br label %.lr.ph639

._crit_edge640:                                   ; preds = %595, %.preheader579
  %578 = load i8, ptr %165, align 4, !tbaa !11
  %.not528 = icmp eq i8 %578, 0
  %579 = getelementptr inbounds i8, ptr %1, i64 32
  %580 = load ptr, ptr %579, align 8, !tbaa !37
  %581 = getelementptr inbounds i8, ptr %1, i64 8
  %582 = load ptr, ptr %581, align 8, !tbaa !23
  br i1 %.not528, label %598, label %597

.lr.ph639:                                        ; preds = %.lr.ph639.preheader, %595
  %indvars.iv699 = phi i64 [ 0, %.lr.ph639.preheader ], [ %indvars.iv.next700, %595 ]
  %583 = getelementptr inbounds [16 x i8], ptr %30, i64 0, i64 %indvars.iv699
  %584 = load i8, ptr %583, align 1, !tbaa !22
  %585 = zext i8 %584 to i32
  %586 = icmp eq i32 %.0478.lcssa717, %585
  br i1 %586, label %587, label %591

587:                                              ; preds = %.lr.ph639
  %588 = load i32, ptr %48, align 8, !tbaa !12
  %589 = add i32 %588, -1
  %590 = icmp ugt i32 %589, %.0478.lcssa717
  br i1 %590, label %595, label %591

591:                                              ; preds = %587, %.lr.ph639
  %592 = icmp eq i32 %.0479.lcssa716, %585
  %593 = icmp ne i8 %584, 0
  %or.cond10 = and i1 %593, %592
  %594 = sext i1 %or.cond10 to i8
  br label %595

595:                                              ; preds = %587, %591
  %.sink = phi i8 [ %594, %591 ], [ 1, %587 ]
  %spec.select544 = add i8 %584, %.sink
  %596 = getelementptr inbounds [16 x i8], ptr %31, i64 0, i64 %indvars.iv699
  store i8 %spec.select544, ptr %596, align 1, !tbaa !22
  %indvars.iv.next700 = add nuw nsw i64 %indvars.iv699, 1
  %exitcond703.not = icmp eq i64 %indvars.iv.next700, %wide.trip.count702
  br i1 %exitcond703.not, label %._crit_edge640, label %.lr.ph639, !llvm.loop !46

597:                                              ; preds = %._crit_edge640
  call void @_ZN6basisuL36compute_least_squares_endpoints_rgbaEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef %577, ptr noundef nonnull %31, ptr noundef %580, ptr noundef nonnull %32, ptr noundef nonnull %33, ptr noundef %582)
  br label %599

598:                                              ; preds = %._crit_edge640
  call void @_ZN6basisuL35compute_least_squares_endpoints_rgbEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef %577, ptr noundef nonnull %31, ptr noundef %580, ptr noundef nonnull %32, ptr noundef nonnull %33, ptr noundef %582)
  br label %599

599:                                              ; preds = %598, %597
  %600 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef nonnull %32, float noundef 0x3F70101020000000)
  %601 = extractvalue { <2 x float>, <2 x float> } %600, 0
  %602 = extractvalue { <2 x float>, <2 x float> } %600, 1
  store <2 x float> %601, ptr %32, align 8
  store <2 x float> %602, ptr %.sroa.4106.0..sroa_idx, align 8, !tbaa !22
  %603 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef nonnull %33, float noundef 0x3F70101020000000)
  %604 = extractvalue { <2 x float>, <2 x float> } %603, 0
  %605 = extractvalue { <2 x float>, <2 x float> } %603, 1
  store <2 x float> %604, ptr %33, align 8
  store <2 x float> %605, ptr %.sroa.4104.0..sroa_idx, align 8, !tbaa !22
  %.sroa.066.0.copyload = load <2 x float>, ptr %32, align 8
  %.sroa.267.0.copyload = load <2 x float>, ptr %.sroa.4106.0..sroa_idx, align 8, !tbaa !22
  %606 = call noundef i64 @_ZN6basisuL21find_optimal_solutionEjNS_12bc7enc_vec4FES0_PKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsE(i32 noundef %0, <2 x float> %.sroa.066.0.copyload, <2 x float> %.sroa.267.0.copyload, <2 x float> %604, <2 x float> %605, ptr noundef nonnull %1, ptr noundef %2)
  %.not529 = icmp eq i64 %606, 0
  br i1 %.not529, label %.loopexit, label %607

607:                                              ; preds = %599
  %608 = load i32, ptr %469, align 4, !tbaa !38
  %609 = icmp ugt i32 %608, 1
  br i1 %609, label %610, label %.loopexit720

610:                                              ; preds = %607
  %611 = load i32, ptr %1, align 8, !tbaa !21
  %612 = mul i32 %611, 56
  %613 = lshr i32 %612, 4
  %614 = load i64, ptr %2, align 8, !tbaa !15
  %615 = zext nneg i32 %613 to i64
  %616 = icmp ugt i64 %614, %615
  br i1 %616, label %617, label %.loopexit720

617:                                              ; preds = %610
  %618 = icmp ugt i32 %608, 3
  %619 = add i32 %608, -2
  %spec.select545 = select i1 %618, i32 %619, i32 1
  %620 = icmp sgt i32 %spec.select545, -2
  br i1 %620, label %.lr.ph652, label %.loopexit720

.lr.ph652:                                        ; preds = %617
  %621 = add i32 %476, -2
  %622 = add nsw i32 %spec.select545, %477
  %.not530645 = icmp sgt i32 %621, %622
  %623 = sitofp i32 %477 to float
  %624 = getelementptr inbounds i8, ptr %1, i64 32
  %625 = getelementptr inbounds i8, ptr %1, i64 8
  br i1 %.not530645, label %.loopexit720, label %.lr.ph648.preheader

.lr.ph648.preheader:                              ; preds = %.lr.ph652
  %626 = sub nsw i32 0, %spec.select545
  %umax = call i32 @llvm.umax.i32(i32 %608, i32 3)
  %627 = add i32 %476, %umax
  %628 = add i32 %627, -3
  br label %.lr.ph648

.lr.ph648:                                        ; preds = %.lr.ph648.preheader, %.thread556
  %.0489649 = phi i32 [ %669, %.thread556 ], [ %626, %.lr.ph648.preheader ]
  %629 = icmp eq i32 %.0489649, 0
  %630 = sitofp i32 %.0489649 to float
  br label %631

631:                                              ; preds = %.lr.ph648, %667
  %.0488646 = phi i32 [ %621, %.lr.ph648 ], [ %668, %667 ]
  %632 = icmp eq i32 %.0488646, %477
  %or.cond546 = select i1 %629, i1 %632, i1 false
  br i1 %or.cond546, label %667, label %.preheader

.preheader:                                       ; preds = %631
  %633 = load i32, ptr %1, align 8, !tbaa !21
  %.not661 = icmp eq i32 %633, 0
  br i1 %.not661, label %._crit_edge644, label %.lr.ph643

.lr.ph643:                                        ; preds = %.preheader
  %634 = sitofp i32 %.0488646 to float
  %635 = fsub float %634, %630
  br label %642

._crit_edge644:                                   ; preds = %642, %.preheader
  %636 = call noundef ptr @_ZN6basisuL16vec4F_set_scalarEPNS_12bc7enc_vec4FEf(ptr noundef nonnull %32, float noundef 0.000000e+00)
  %637 = call noundef ptr @_ZN6basisuL16vec4F_set_scalarEPNS_12bc7enc_vec4FEf(ptr noundef nonnull %33, float noundef 0.000000e+00)
  %638 = load i8, ptr %165, align 4, !tbaa !11
  %.not531 = icmp eq i8 %638, 0
  %639 = load i32, ptr %1, align 8, !tbaa !21
  %640 = load ptr, ptr %624, align 8, !tbaa !37
  %641 = load ptr, ptr %625, align 8, !tbaa !23
  br i1 %.not531, label %658, label %657

642:                                              ; preds = %.lr.ph643, %642
  %indvars.iv704 = phi i64 [ 0, %.lr.ph643 ], [ %indvars.iv.next705, %642 ]
  %643 = getelementptr inbounds [16 x i8], ptr %30, i64 0, i64 %indvars.iv704
  %644 = load i8, ptr %643, align 1, !tbaa !22
  %645 = uitofp i8 %644 to float
  %646 = fsub float %645, %630
  %647 = fmul float %646, %623
  %648 = fdiv float %647, %635
  %649 = fadd float %648, 5.000000e-01
  %650 = call float @llvm.floor.f32(float %649)
  %651 = call noundef float @_ZN6basisu6clampfEfff(float noundef %650, float noundef 0.000000e+00, float noundef %623)
  %652 = fptoui float %651 to i8
  %653 = getelementptr inbounds [16 x i8], ptr %31, i64 0, i64 %indvars.iv704
  store i8 %652, ptr %653, align 1, !tbaa !22
  %indvars.iv.next705 = add nuw nsw i64 %indvars.iv704, 1
  %654 = load i32, ptr %1, align 8, !tbaa !21
  %655 = zext i32 %654 to i64
  %656 = icmp ult i64 %indvars.iv.next705, %655
  br i1 %656, label %642, label %._crit_edge644, !llvm.loop !47

657:                                              ; preds = %._crit_edge644
  call void @_ZN6basisuL36compute_least_squares_endpoints_rgbaEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef %639, ptr noundef nonnull %31, ptr noundef %640, ptr noundef nonnull %32, ptr noundef nonnull %33, ptr noundef %641)
  br label %659

658:                                              ; preds = %._crit_edge644
  call void @_ZN6basisuL35compute_least_squares_endpoints_rgbEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef %639, ptr noundef nonnull %31, ptr noundef %640, ptr noundef nonnull %32, ptr noundef nonnull %33, ptr noundef %641)
  br label %659

659:                                              ; preds = %658, %657
  %660 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef nonnull %32, float noundef 0x3F70101020000000)
  %661 = extractvalue { <2 x float>, <2 x float> } %660, 0
  %662 = extractvalue { <2 x float>, <2 x float> } %660, 1
  store <2 x float> %661, ptr %32, align 8
  store <2 x float> %662, ptr %.sroa.4106.0..sroa_idx, align 8, !tbaa !22
  %663 = call { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef nonnull %33, float noundef 0x3F70101020000000)
  %664 = extractvalue { <2 x float>, <2 x float> } %663, 0
  %665 = extractvalue { <2 x float>, <2 x float> } %663, 1
  store <2 x float> %664, ptr %33, align 8
  store <2 x float> %665, ptr %.sroa.4104.0..sroa_idx, align 8, !tbaa !22
  %.sroa.043.0.copyload = load <2 x float>, ptr %32, align 8
  %.sroa.244.0.copyload = load <2 x float>, ptr %.sroa.4106.0..sroa_idx, align 8, !tbaa !22
  %666 = call noundef i64 @_ZN6basisuL21find_optimal_solutionEjNS_12bc7enc_vec4FES0_PKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsE(i32 noundef %0, <2 x float> %.sroa.043.0.copyload, <2 x float> %.sroa.244.0.copyload, <2 x float> %664, <2 x float> %665, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %.not532 = icmp eq i64 %666, 0
  br i1 %.not532, label %.loopexit, label %667

667:                                              ; preds = %631, %659
  %668 = add i32 %.0488646, 1
  %exitcond707.not = icmp eq i32 %.0488646, %628
  br i1 %exitcond707.not, label %.thread556, label %631, !llvm.loop !48

.thread556:                                       ; preds = %667
  %669 = add i32 %.0489649, 1
  %exitcond708.not = icmp eq i32 %669, 2
  br i1 %exitcond708.not, label %.loopexit720, label %.lr.ph648, !llvm.loop !49

.loopexit:                                        ; preds = %659, %599, %569, %528
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %33) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %32) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %31) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %30) #11
  br label %.loopexit583

.loopexit720:                                     ; preds = %.thread556, %607, %610, %617, %.lr.ph652
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %33) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %32) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %31) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %30) #11
  %.pr.pre = load ptr, ptr %65, align 8, !tbaa !19
  %.not533 = icmp eq ptr %.pr.pre, null
  br i1 %.not533, label %.thread, label %.thread566

.thread:                                          ; preds = %468, %.loopexit720
  %670 = icmp eq i32 %0, 1
  br i1 %670, label %671, label %694

671:                                              ; preds = %.thread
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %34) #11
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %34, ptr noundef nonnull align 8 dereferenceable(48) %2, i64 48, i1 false), !tbaa.struct !50
  %672 = load float, ptr %9, align 8, !tbaa !24
  %673 = call float @llvm.fmuladd.f32(float %672, float 2.550000e+02, float 5.000000e-01)
  %674 = fptosi float %673 to i32
  %675 = getelementptr inbounds i8, ptr %9, i64 4
  %676 = load float, ptr %675, align 4, !tbaa !24
  %677 = call float @llvm.fmuladd.f32(float %676, float 2.550000e+02, float 5.000000e-01)
  %678 = fptosi float %677 to i32
  %679 = load float, ptr %.sroa.4236.0..sroa_idx, align 8, !tbaa !24
  %680 = call float @llvm.fmuladd.f32(float %679, float 2.550000e+02, float 5.000000e-01)
  %681 = fptosi float %680 to i32
  %682 = getelementptr inbounds i8, ptr %2, i64 32
  %683 = load ptr, ptr %682, align 8, !tbaa !53
  %684 = call noundef i64 @_ZN6basisuL23pack_mode1_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef nonnull %1, ptr noundef nonnull %34, i32 noundef %674, i32 noundef %678, i32 noundef %681, ptr noundef %683)
  %685 = load i64, ptr %2, align 8, !tbaa !15
  %686 = icmp ult i64 %684, %685
  br i1 %686, label %687, label %693

687:                                              ; preds = %671
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) %34, i64 48, i1 false), !tbaa.struct !50
  %688 = getelementptr inbounds i8, ptr %2, i64 24
  %689 = load ptr, ptr %688, align 8, !tbaa !20
  %690 = load ptr, ptr %682, align 8, !tbaa !53
  %691 = load i32, ptr %1, align 8, !tbaa !21
  %692 = zext i32 %691 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %689, ptr align 1 %690, i64 %692, i1 false)
  store i64 %684, ptr %2, align 8, !tbaa !15
  br label %693

693:                                              ; preds = %687, %671
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %34) #11
  br label %.thread566

694:                                              ; preds = %.thread
  %695 = load i32, ptr %40, align 8, !tbaa !5
  switch i32 %695, label %.thread566 [
    i32 8, label %696
    i32 7, label %723
    i32 13, label %780
    i32 11, label %808
  ]

696:                                              ; preds = %694
  %697 = load i32, ptr %48, align 8, !tbaa !12
  switch i32 %697, label %.thread566 [
    i32 8, label %698
    i32 4, label %751
  ]

698:                                              ; preds = %696
  %699 = load i8, ptr %165, align 4, !tbaa !11
  %.not534 = icmp eq i8 %699, 0
  br i1 %.not534, label %700, label %.thread566

700:                                              ; preds = %698
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %35) #11
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %35, ptr noundef nonnull align 8 dereferenceable(48) %2, i64 48, i1 false), !tbaa.struct !50
  %701 = load float, ptr %9, align 8, !tbaa !24
  %702 = call float @llvm.fmuladd.f32(float %701, float 2.550000e+02, float 5.000000e-01)
  %703 = fptosi float %702 to i32
  %704 = getelementptr inbounds i8, ptr %9, i64 4
  %705 = load float, ptr %704, align 4, !tbaa !24
  %706 = call float @llvm.fmuladd.f32(float %705, float 2.550000e+02, float 5.000000e-01)
  %707 = fptosi float %706 to i32
  %708 = load float, ptr %.sroa.4236.0..sroa_idx, align 8, !tbaa !24
  %709 = call float @llvm.fmuladd.f32(float %708, float 2.550000e+02, float 5.000000e-01)
  %710 = fptosi float %709 to i32
  %711 = getelementptr inbounds i8, ptr %2, i64 32
  %712 = load ptr, ptr %711, align 8, !tbaa !53
  %713 = call noundef i64 @_ZN6basisuL32pack_astc_4bit_3bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef nonnull %1, ptr noundef nonnull %35, i32 noundef %703, i32 noundef %707, i32 noundef %710, ptr noundef %712)
  %714 = load i64, ptr %2, align 8, !tbaa !15
  %715 = icmp ult i64 %713, %714
  br i1 %715, label %716, label %722

716:                                              ; preds = %700
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) %35, i64 48, i1 false), !tbaa.struct !50
  %717 = getelementptr inbounds i8, ptr %2, i64 24
  %718 = load ptr, ptr %717, align 8, !tbaa !20
  %719 = load ptr, ptr %711, align 8, !tbaa !53
  %720 = load i32, ptr %1, align 8, !tbaa !21
  %721 = zext i32 %720 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %718, ptr align 1 %719, i64 %721, i1 false)
  store i64 %713, ptr %2, align 8, !tbaa !15
  br label %722

722:                                              ; preds = %716, %700
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %35) #11
  br label %.thread566

723:                                              ; preds = %694
  %724 = load i32, ptr %48, align 8, !tbaa !12
  %725 = icmp eq i32 %724, 4
  br i1 %725, label %726, label %.thread566

726:                                              ; preds = %723
  %727 = load i8, ptr %165, align 4, !tbaa !11
  %.not535 = icmp eq i8 %727, 0
  br i1 %.not535, label %728, label %.thread566

728:                                              ; preds = %726
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %36) #11
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %36, ptr noundef nonnull align 8 dereferenceable(48) %2, i64 48, i1 false), !tbaa.struct !50
  %729 = load float, ptr %9, align 8, !tbaa !24
  %730 = call float @llvm.fmuladd.f32(float %729, float 2.550000e+02, float 5.000000e-01)
  %731 = fptosi float %730 to i32
  %732 = getelementptr inbounds i8, ptr %9, i64 4
  %733 = load float, ptr %732, align 4, !tbaa !24
  %734 = call float @llvm.fmuladd.f32(float %733, float 2.550000e+02, float 5.000000e-01)
  %735 = fptosi float %734 to i32
  %736 = load float, ptr %.sroa.4236.0..sroa_idx, align 8, !tbaa !24
  %737 = call float @llvm.fmuladd.f32(float %736, float 2.550000e+02, float 5.000000e-01)
  %738 = fptosi float %737 to i32
  %739 = getelementptr inbounds i8, ptr %2, i64 32
  %740 = load ptr, ptr %739, align 8, !tbaa !53
  %741 = call noundef i64 @_ZN6basisuL34pack_astc_range7_2bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef nonnull %1, ptr noundef nonnull %36, i32 noundef %731, i32 noundef %735, i32 noundef %738, ptr noundef %740)
  %742 = load i64, ptr %2, align 8, !tbaa !15
  %743 = icmp ult i64 %741, %742
  br i1 %743, label %744, label %750

744:                                              ; preds = %728
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) %36, i64 48, i1 false), !tbaa.struct !50
  %745 = getelementptr inbounds i8, ptr %2, i64 24
  %746 = load ptr, ptr %745, align 8, !tbaa !20
  %747 = load ptr, ptr %739, align 8, !tbaa !53
  %748 = load i32, ptr %1, align 8, !tbaa !21
  %749 = zext i32 %748 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %746, ptr align 1 %747, i64 %749, i1 false)
  store i64 %741, ptr %2, align 8, !tbaa !15
  br label %750

750:                                              ; preds = %744, %728
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %36) #11
  br label %.thread566

751:                                              ; preds = %696
  %752 = load i8, ptr %165, align 4, !tbaa !11
  %.not536 = icmp eq i8 %752, 0
  br i1 %.not536, label %.thread566, label %753

753:                                              ; preds = %751
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %37) #11
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %37, ptr noundef nonnull align 8 dereferenceable(48) %2, i64 48, i1 false), !tbaa.struct !50
  %754 = load float, ptr %9, align 8, !tbaa !24
  %755 = call float @llvm.fmuladd.f32(float %754, float 2.550000e+02, float 5.000000e-01)
  %756 = fptosi float %755 to i32
  %757 = getelementptr inbounds i8, ptr %9, i64 4
  %758 = load float, ptr %757, align 4, !tbaa !24
  %759 = call float @llvm.fmuladd.f32(float %758, float 2.550000e+02, float 5.000000e-01)
  %760 = fptosi float %759 to i32
  %761 = load float, ptr %.sroa.4236.0..sroa_idx, align 8, !tbaa !24
  %762 = call float @llvm.fmuladd.f32(float %761, float 2.550000e+02, float 5.000000e-01)
  %763 = fptosi float %762 to i32
  %764 = getelementptr inbounds i8, ptr %9, i64 12
  %765 = load float, ptr %764, align 4, !tbaa !24
  %766 = call float @llvm.fmuladd.f32(float %765, float 2.550000e+02, float 5.000000e-01)
  %767 = fptosi float %766 to i32
  %768 = getelementptr inbounds i8, ptr %2, i64 32
  %769 = load ptr, ptr %768, align 8, !tbaa !53
  %770 = call noundef i64 @_ZN6basisuL37pack_astc_4bit_2bit_to_one_color_rgbaEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjjPh(ptr noundef nonnull %1, ptr noundef nonnull %37, i32 noundef %756, i32 noundef %760, i32 noundef %763, i32 noundef %767, ptr noundef %769)
  %771 = load i64, ptr %2, align 8, !tbaa !15
  %772 = icmp ult i64 %770, %771
  br i1 %772, label %773, label %779

773:                                              ; preds = %753
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) %37, i64 48, i1 false), !tbaa.struct !50
  %774 = getelementptr inbounds i8, ptr %2, i64 24
  %775 = load ptr, ptr %774, align 8, !tbaa !20
  %776 = load ptr, ptr %768, align 8, !tbaa !53
  %777 = load i32, ptr %1, align 8, !tbaa !21
  %778 = zext i32 %777 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %775, ptr align 1 %776, i64 %778, i1 false)
  store i64 %770, ptr %2, align 8, !tbaa !15
  br label %779

779:                                              ; preds = %773, %753
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %37) #11
  br label %.thread566

780:                                              ; preds = %694
  %781 = load i32, ptr %48, align 8, !tbaa !12
  %782 = icmp eq i32 %781, 4
  br i1 %782, label %783, label %.thread566

783:                                              ; preds = %780
  %784 = load i8, ptr %165, align 4, !tbaa !11
  %.not537 = icmp eq i8 %784, 0
  br i1 %.not537, label %785, label %.thread566

785:                                              ; preds = %783
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %38) #11
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %38, ptr noundef nonnull align 8 dereferenceable(48) %2, i64 48, i1 false), !tbaa.struct !50
  %786 = load float, ptr %9, align 8, !tbaa !24
  %787 = call float @llvm.fmuladd.f32(float %786, float 2.550000e+02, float 5.000000e-01)
  %788 = fptosi float %787 to i32
  %789 = getelementptr inbounds i8, ptr %9, i64 4
  %790 = load float, ptr %789, align 4, !tbaa !24
  %791 = call float @llvm.fmuladd.f32(float %790, float 2.550000e+02, float 5.000000e-01)
  %792 = fptosi float %791 to i32
  %793 = load float, ptr %.sroa.4236.0..sroa_idx, align 8, !tbaa !24
  %794 = call float @llvm.fmuladd.f32(float %793, float 2.550000e+02, float 5.000000e-01)
  %795 = fptosi float %794 to i32
  %796 = getelementptr inbounds i8, ptr %2, i64 32
  %797 = load ptr, ptr %796, align 8, !tbaa !53
  %798 = call noundef i64 @_ZN6basisuL35pack_astc_range13_2bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef nonnull %1, ptr noundef nonnull %38, i32 noundef %788, i32 noundef %792, i32 noundef %795, ptr noundef %797)
  %799 = load i64, ptr %2, align 8, !tbaa !15
  %800 = icmp ult i64 %798, %799
  br i1 %800, label %801, label %807

801:                                              ; preds = %785
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) %38, i64 48, i1 false), !tbaa.struct !50
  %802 = getelementptr inbounds i8, ptr %2, i64 24
  %803 = load ptr, ptr %802, align 8, !tbaa !20
  %804 = load ptr, ptr %796, align 8, !tbaa !53
  %805 = load i32, ptr %1, align 8, !tbaa !21
  %806 = zext i32 %805 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %803, ptr align 1 %804, i64 %806, i1 false)
  store i64 %798, ptr %2, align 8, !tbaa !15
  br label %807

807:                                              ; preds = %801, %785
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %38) #11
  br label %.thread566

808:                                              ; preds = %694
  %809 = load i32, ptr %48, align 8, !tbaa !12
  %810 = icmp eq i32 %809, 32
  br i1 %810, label %811, label %.thread566

811:                                              ; preds = %808
  %812 = load i8, ptr %165, align 4, !tbaa !11
  %.not538 = icmp eq i8 %812, 0
  br i1 %.not538, label %813, label %.thread566

813:                                              ; preds = %811
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %39) #11
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %39, ptr noundef nonnull align 8 dereferenceable(48) %2, i64 48, i1 false), !tbaa.struct !50
  %814 = load float, ptr %9, align 8, !tbaa !24
  %815 = call float @llvm.fmuladd.f32(float %814, float 2.550000e+02, float 5.000000e-01)
  %816 = fptosi float %815 to i32
  %817 = getelementptr inbounds i8, ptr %9, i64 4
  %818 = load float, ptr %817, align 4, !tbaa !24
  %819 = call float @llvm.fmuladd.f32(float %818, float 2.550000e+02, float 5.000000e-01)
  %820 = fptosi float %819 to i32
  %821 = load float, ptr %.sroa.4236.0..sroa_idx, align 8, !tbaa !24
  %822 = call float @llvm.fmuladd.f32(float %821, float 2.550000e+02, float 5.000000e-01)
  %823 = fptosi float %822 to i32
  %824 = getelementptr inbounds i8, ptr %2, i64 32
  %825 = load ptr, ptr %824, align 8, !tbaa !53
  %826 = call noundef i64 @_ZN6basisuL35pack_astc_range11_5bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef nonnull %1, ptr noundef nonnull %39, i32 noundef %816, i32 noundef %820, i32 noundef %823, ptr noundef %825)
  %827 = load i64, ptr %2, align 8, !tbaa !15
  %828 = icmp ult i64 %826, %827
  br i1 %828, label %829, label %835

829:                                              ; preds = %813
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(48) %39, i64 48, i1 false), !tbaa.struct !50
  %830 = getelementptr inbounds i8, ptr %2, i64 24
  %831 = load ptr, ptr %830, align 8, !tbaa !20
  %832 = load ptr, ptr %824, align 8, !tbaa !53
  %833 = load i32, ptr %1, align 8, !tbaa !21
  %834 = zext i32 %833 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %831, ptr align 1 %832, i64 %834, i1 false)
  store i64 %826, ptr %2, align 8, !tbaa !15
  br label %835

835:                                              ; preds = %829, %813
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %39) #11
  br label %.thread566

.thread566:                                       ; preds = %694, %696, %723, %726, %698, %751, %780, %783, %.critedge542, %693, %750, %807, %835, %811, %808, %779, %722, %.loopexit720
  %836 = load i64, ptr %2, align 8, !tbaa !15
  br label %.loopexit583

.loopexit583:                                     ; preds = %459, %.loopexit, %439, %.thread566
  %.9 = phi i64 [ %836, %.thread566 ], [ 0, %.loopexit ], [ 0, %439 ], [ 0, %459 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %27) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %26) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %25) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %24) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #11
  br label %837

837:                                              ; preds = %.loopexit583, %140, %126, %111, %99, %85, %71
  %.10 = phi i64 [ %.9, %.loopexit583 ], [ %77, %71 ], [ %118, %111 ], [ %146, %140 ], [ %132, %126 ], [ %105, %99 ], [ %91, %85 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #11
  ret i64 %.10
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN6basisuL12is_solid_rgbEPKNS_28color_cell_compressor_paramsERjS3_S3_(ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN6basisuL23pack_mode1_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN6basisuL32pack_astc_4bit_3bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN6basisuL34pack_astc_range7_2bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN6basisuL13is_solid_rgbaEPKNS_28color_cell_compressor_paramsERjS3_S3_S3_(ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN6basisuL37pack_astc_4bit_2bit_to_one_color_rgbaEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjjPh(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN6basisuL35pack_astc_range13_2bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN6basisuL35pack_astc_range11_5bit_to_one_colorEPKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsEjjjPh(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN6basisuL16vec4F_set_scalarEPNS_12bc7enc_vec4FEf(ptr noundef, float noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare hidden { <2 x float>, <2 x float> } @_ZN6basisuL16vec4F_from_colorEPKN6basist13color_quad_u8E(ptr noundef) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare hidden { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_addEPKNS_12bc7enc_vec4FES2_(ptr noundef, ptr noundef) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare hidden { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_mulEPKNS_12bc7enc_vec4FEf(ptr noundef, float noundef) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef ptr @_ZN6basisuL23vec4F_saturate_in_placeEPNS_12bc7enc_vec4FE(ptr noundef) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare hidden { <2 x float>, <2 x float> } @_ZN6basisuL9vec4F_subEPKNS_12bc7enc_vec4FES2_(ptr noundef, ptr noundef) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN6basisuL24vec4F_normalize_in_placeEPNS_12bc7enc_vec4FE(ptr noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef float @_ZN6basisuL9vec4F_dotEPKNS_12bc7enc_vec4FES2_(ptr noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #8

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZN6basisu8maximumfEff(float noundef, float noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fabs.f32(float) #8

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN6basisuL9vec4F_setEPNS_12bc7enc_vec4FEffff(ptr noundef, float noundef, float noundef, float noundef, float noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZN6basisu8minimumfEff(float noundef, float noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare hidden { <2 x float>, <2 x float> } @_ZN6basisuL14vec4F_saturateEPKNS_12bc7enc_vec4FE(ptr noundef) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIfENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN6basisuL21find_optimal_solutionEjNS_12bc7enc_vec4FES0_PKNS_28color_cell_compressor_paramsEPNS_29color_cell_compressor_resultsE(i32 noundef, <2 x float>, <2 x float>, <2 x float>, <2 x float>, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL36compute_least_squares_endpoints_rgbaEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL35compute_least_squares_endpoints_rgbEjPKhPKNS_12bc7enc_vec4FEPS2_S5_PKN6basist13color_quad_u8E(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6basisu8minimumuEjj(i32 noundef, i32 noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6basisu8maximumuEjj(i32 noundef, i32 noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZN6basisu6clampfEfff(float noundef, float noundef, float noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.floor.f32(float) #8

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.sqrt.f32(float) #9

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #9

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x float> @llvm.fmuladd.v4f32(<4 x float>, <4 x float>, <4 x float>) #9

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x float> @llvm.fmuladd.v2f32(<2 x float>, <2 x float>, <2 x float>) #9

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress 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 #7 = { 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 #8 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #10 = { noreturn nounwind }
attributes #11 = { 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 56}
!6 = !{!"_ZTSN6basisu28color_cell_compressor_paramsE", !7, i64 0, !10, i64 8, !7, i64 16, !10, i64 24, !10, i64 32, !7, i64 40, !10, i64 48, !7, i64 56, !8, i64 60, !8, i64 76, !8, i64 77, !8, i64 78, !8, i64 79}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !8, i64 76}
!12 = !{!6, !7, i64 16}
!13 = !{!6, !10, i64 24}
!14 = !{!7, !7, i64 0}
!15 = !{!16, !17, i64 0}
!16 = !{!"_ZTSN6basisu29color_cell_compressor_resultsE", !17, i64 0, !18, i64 8, !18, i64 12, !8, i64 16, !10, i64 24, !10, i64 32, !18, i64 40, !18, i64 44}
!17 = !{!"long", !8, i64 0}
!18 = !{!"_ZTSN6basist13color_quad_u8E", !8, i64 0}
!19 = !{!6, !10, i64 48}
!20 = !{!16, !10, i64 24}
!21 = !{!6, !7, i64 0}
!22 = !{!8, !8, i64 0}
!23 = !{!6, !10, i64 8}
!24 = !{!25, !25, i64 0}
!25 = !{!"float", !8, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{i64 0, i64 16, !22}
!29 = distinct !{!29, !27, !30}
!30 = !{!"llvm.loop.peeled.count", i32 1}
!31 = distinct !{!31, !27}
!32 = !{!6, !8, i64 79}
!33 = distinct !{!33, !27}
!34 = !{!35, !7, i64 28}
!35 = !{!"_ZTSN6basisu28bc7enc_compress_block_paramsE", !7, i64 0, !8, i64 4, !7, i64 20, !8, i64 24, !7, i64 28}
!36 = distinct !{!36, !27}
!37 = !{!6, !10, i64 32}
!38 = !{!35, !7, i64 20}
!39 = distinct !{!39, !27}
!40 = distinct !{!40, !27}
!41 = distinct !{!41, !27, !42, !43}
!42 = !{!"llvm.loop.isvectorized", i32 1}
!43 = !{!"llvm.loop.unroll.runtime.disable"}
!44 = distinct !{!44, !27, !42, !43}
!45 = distinct !{!45, !27, !43, !42}
!46 = distinct !{!46, !27}
!47 = distinct !{!47, !27}
!48 = distinct !{!48, !27}
!49 = distinct !{!49, !27}
!50 = !{i64 0, i64 8, !51, i64 8, i64 4, !22, i64 12, i64 4, !22, i64 16, i64 8, !22, i64 24, i64 8, !52, i64 32, i64 8, !52, i64 40, i64 4, !22, i64 44, i64 4, !22}
!51 = !{!17, !17, i64 0}
!52 = !{!10, !10, i64 0}
!53 = !{!16, !10, i64 32}


; Effective O3 passes: AggressiveInstCombinePass,ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass