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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.basisu::color_rgba" = type { %union.anon }
%union.anon = type { [4 x i8] }
%"struct.basisu::uastc_encode_results" = type { i32, i32, %"struct.basist::astc_block_desc", %"class.basisu::color_rgba", i64 }
%"struct.basist::astc_block_desc" = type { i32, i32, i32, i32, i32, i8, [18 x i8], [64 x i8] }
%"struct.basisu::etc_block" = type { %union.anon.0 }
%union.anon.0 = type { i64 }
%"struct.basisu::eac_a8_block" = type { i16, [6 x i8] }
%"struct.basisu::bc7enc_compress_block_params" = type { i32, [4 x i32], i32, i8, i32 }
%"struct.basist::color32" = type { %union.anon.2 }
%union.anon.2 = type { i32 }
%"struct.basist::unpacked_uastc_block" = type { %"struct.basist::astc_block_desc", i32, i32, %"struct.basist::color32", i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32 }
%"struct.basist::bc7_optimization_results" = type { i32, i32, [16 x i8], [16 x i8], [3 x %"struct.basist::color_quad_u8"], [3 x %"struct.basist::color_quad_u8"], [3 x [2 x i32]], i32, i32 }
%"struct.basist::color_quad_u8" = type { [4 x i8] }
%"struct.basist::bc7_block" = type { [2 x i64] }
%"struct.basisu::uastc_pack_eac_a8_results" = type { i32, i32, i32 }
%struct.anon = type { i8, i8, i8, i8 }

@_ZN6basist22g_uastc_mode_has_alphaE = external constant [19 x i8], align 16
@.str.3 = external hidden unnamed_addr constant [116 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__._ZN6basisu12encode_uastcEPKhRN6basist11uastc_blockEj = external hidden unnamed_addr constant [68 x i8], align 1
@_ZN6basist18g_uastc_mode_is_laE = external constant [19 x i8], align 16

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu10pack_uastcERN6basist11uastc_blockERKNS_20uastc_encode_resultsERKNS_9etc_blockEjRKNS_12eac_a8_blockEbb(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, ptr noundef nonnull align 2 dereferenceable(8), i1 noundef zeroext, i1 noundef zeroext) #0

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6basisu12encode_uastcEPKhRN6basist11uastc_blockEj(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(16) %1, i32 noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  %11 = alloca %"class.basisu::color_rgba", align 1
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"struct.basisu::uastc_encode_results", align 8
  %16 = alloca %"struct.basisu::etc_block", align 8
  %17 = alloca i32, align 4
  %18 = alloca %"struct.basisu::eac_a8_block", align 2
  %19 = alloca i32, align 4
  %20 = alloca i8, align 1
  %21 = alloca i8, align 1
  %22 = alloca [512 x %"struct.basisu::uastc_encode_results"], align 16
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i8, align 1
  %26 = alloca i8, align 1
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i8, align 1
  %31 = alloca i8, align 1
  %32 = alloca i32, align 4
  %33 = alloca i8, align 1
  %34 = alloca %"struct.basisu::bc7enc_compress_block_params", align 4
  %35 = alloca i32, align 4
  %36 = alloca ptr, align 8
  %37 = alloca [16 x %"class.basisu::color_rgba"], align 16
  %38 = alloca %"struct.basist::color32", align 4
  %39 = alloca i64, align 8
  %40 = alloca i32, align 4
  %41 = alloca [16 x %"class.basisu::color_rgba"], align 16
  %42 = alloca %"struct.basist::color32", align 4
  %43 = alloca i64, align 8
  %44 = alloca i32, align 4
  %45 = alloca %"struct.basist::unpacked_uastc_block", align 4
  %46 = alloca [512 x i64], align 16
  %47 = alloca [512 x float], align 16
  %48 = alloca double, align 8
  %49 = alloca i32, align 4
  %50 = alloca i32, align 4
  %51 = alloca i32, align 4
  %52 = alloca i32, align 4
  %53 = alloca %"struct.basist::color32", align 4
  %54 = alloca [4 x [4 x %"class.basisu::color_rgba"]], align 16
  %55 = alloca i8, align 1
  %56 = alloca %"struct.basist::color32", align 4
  %57 = alloca i64, align 8
  %58 = alloca i64, align 8
  %59 = alloca i64, align 8
  %60 = alloca %"struct.basist::bc7_optimization_results", align 4
  %61 = alloca %"struct.basist::bc7_block", align 8
  %62 = alloca [4 x [4 x %"class.basisu::color_rgba"]], align 16
  %63 = alloca i64, align 8
  %64 = alloca i64, align 8
  %65 = alloca i64, align 8
  %66 = alloca i64, align 8
  %67 = alloca i64, align 8
  %68 = alloca i64, align 8
  %69 = alloca i32, align 4
  %70 = alloca float, align 4
  %71 = alloca i64, align 8
  %72 = alloca i32, align 4
  %73 = alloca double, align 8
  %74 = alloca float, align 4
  %75 = alloca i64, align 8
  %76 = alloca ptr, align 8
  %77 = alloca i32, align 4
  %78 = alloca ptr, align 8
  %79 = alloca [4 x [4 x %"class.basisu::color_rgba"]], align 16
  %80 = alloca i8, align 1
  %81 = alloca %"struct.basist::color32", align 4
  %82 = alloca i8, align 1
  %83 = alloca i8, align 1
  %84 = alloca %"struct.basisu::eac_a8_block", align 2
  %85 = alloca [16 x i8], align 16
  %86 = alloca i32, align 4
  %87 = alloca %"struct.basisu::uastc_pack_eac_a8_results", align 4
  %88 = alloca %"struct.basisu::etc_block", align 8
  %89 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #10
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %90, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #10
  store i8 1, ptr %8, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #10
  store i8 0, ptr %9, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #10
  store i8 1, ptr %10, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #10
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %91, i64 0
  %93 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %92, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %11, ptr align 1 %93, i64 4, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #10
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %94

94:                                               ; preds = %181, %3
  %95 = load i32, ptr %12, align 4, !tbaa !9
  %96 = icmp ult i32 %95, 4
  br i1 %96, label %98, label %97

97:                                               ; preds = %94
  store i32 2, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #10
  br label %184

98:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #10
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %99

99:                                               ; preds = %177, %98
  %100 = load i32, ptr %14, align 4, !tbaa !9
  %101 = icmp ult i32 %100, 4
  br i1 %101, label %103, label %102

102:                                              ; preds = %99
  store i32 5, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #10
  br label %180

103:                                              ; preds = %99
  %104 = load ptr, ptr %7, align 8, !tbaa !5
  %105 = load i32, ptr %12, align 4, !tbaa !9
  %106 = zext i32 %105 to i64
  %107 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %104, i64 %106
  %108 = load i32, ptr %14, align 4, !tbaa !9
  %109 = zext i32 %108 to i64
  %110 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %107, i64 0, i64 %109
  %111 = getelementptr inbounds %"class.basisu::color_rgba", ptr %110, i32 0, i32 0
  %112 = getelementptr inbounds %struct.anon, ptr %111, i32 0, i32 3
  %113 = load i8, ptr %112, align 1, !tbaa !14
  %114 = zext i8 %113 to i32
  %115 = icmp slt i32 %114, 255
  br i1 %115, label %116, label %117

116:                                              ; preds = %103
  store i8 1, ptr %9, align 1, !tbaa !11
  br label %117

117:                                              ; preds = %116, %103
  %118 = load ptr, ptr %7, align 8, !tbaa !5
  %119 = load i32, ptr %12, align 4, !tbaa !9
  %120 = zext i32 %119 to i64
  %121 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %118, i64 %120
  %122 = load i32, ptr %14, align 4, !tbaa !9
  %123 = zext i32 %122 to i64
  %124 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %121, i64 0, i64 %123
  %125 = call noundef zeroext i1 @_ZNK6basisu10color_rgbaneERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %124, ptr noundef nonnull align 1 dereferenceable(4) %11)
  br i1 %125, label %126, label %127

126:                                              ; preds = %117
  store i8 0, ptr %8, align 1, !tbaa !11
  br label %127

127:                                              ; preds = %126, %117
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = load i32, ptr %12, align 4, !tbaa !9
  %130 = zext i32 %129 to i64
  %131 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %128, i64 %130
  %132 = load i32, ptr %14, align 4, !tbaa !9
  %133 = zext i32 %132 to i64
  %134 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %131, i64 0, i64 %133
  %135 = getelementptr inbounds %"class.basisu::color_rgba", ptr %134, i32 0, i32 0
  %136 = getelementptr inbounds %struct.anon, ptr %135, i32 0, i32 0
  %137 = load i8, ptr %136, align 1, !tbaa !14
  %138 = zext i8 %137 to i32
  %139 = load ptr, ptr %7, align 8, !tbaa !5
  %140 = load i32, ptr %12, align 4, !tbaa !9
  %141 = zext i32 %140 to i64
  %142 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %139, i64 %141
  %143 = load i32, ptr %14, align 4, !tbaa !9
  %144 = zext i32 %143 to i64
  %145 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %142, i64 0, i64 %144
  %146 = getelementptr inbounds %"class.basisu::color_rgba", ptr %145, i32 0, i32 0
  %147 = getelementptr inbounds %struct.anon, ptr %146, i32 0, i32 1
  %148 = load i8, ptr %147, align 1, !tbaa !14
  %149 = zext i8 %148 to i32
  %150 = icmp ne i32 %138, %149
  br i1 %150, label %175, label %151

151:                                              ; preds = %127
  %152 = load ptr, ptr %7, align 8, !tbaa !5
  %153 = load i32, ptr %12, align 4, !tbaa !9
  %154 = zext i32 %153 to i64
  %155 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %152, i64 %154
  %156 = load i32, ptr %14, align 4, !tbaa !9
  %157 = zext i32 %156 to i64
  %158 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %155, i64 0, i64 %157
  %159 = getelementptr inbounds %"class.basisu::color_rgba", ptr %158, i32 0, i32 0
  %160 = getelementptr inbounds %struct.anon, ptr %159, i32 0, i32 0
  %161 = load i8, ptr %160, align 1, !tbaa !14
  %162 = zext i8 %161 to i32
  %163 = load ptr, ptr %7, align 8, !tbaa !5
  %164 = load i32, ptr %12, align 4, !tbaa !9
  %165 = zext i32 %164 to i64
  %166 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %163, i64 %165
  %167 = load i32, ptr %14, align 4, !tbaa !9
  %168 = zext i32 %167 to i64
  %169 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %166, i64 0, i64 %168
  %170 = getelementptr inbounds %"class.basisu::color_rgba", ptr %169, i32 0, i32 0
  %171 = getelementptr inbounds %struct.anon, ptr %170, i32 0, i32 2
  %172 = load i8, ptr %171, align 1, !tbaa !14
  %173 = zext i8 %172 to i32
  %174 = icmp ne i32 %162, %173
  br i1 %174, label %175, label %176

175:                                              ; preds = %151, %127
  store i8 0, ptr %10, align 1, !tbaa !11
  br label %176

176:                                              ; preds = %175, %151
  br label %177

177:                                              ; preds = %176
  %178 = load i32, ptr %14, align 4, !tbaa !9
  %179 = add i32 %178, 1
  store i32 %179, ptr %14, align 4, !tbaa !9
  br label %99, !llvm.loop !15

180:                                              ; preds = %102
  br label %181

181:                                              ; preds = %180
  %182 = load i32, ptr %12, align 4, !tbaa !9
  %183 = add i32 %182, 1
  store i32 %183, ptr %12, align 4, !tbaa !9
  br label %94, !llvm.loop !17

184:                                              ; preds = %97
  %185 = load i8, ptr %8, align 1, !tbaa !11, !range !18, !noundef !19
  %186 = trunc i8 %185 to i1
  br i1 %186, label %187, label %204

187:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 128, ptr %15) #10
  call void @_ZN6basisu20uastc_encode_resultsC2Ev(ptr noundef nonnull align 8 dereferenceable(128) %15)
  %188 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %15, i32 0, i32 0
  store i32 8, ptr %188, align 8, !tbaa !20
  %189 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %15, i32 0, i32 4
  store i64 0, ptr %189, align 8, !tbaa !25
  %190 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %15, i32 0, i32 1
  store i32 0, ptr %190, align 4, !tbaa !26
  %191 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %15, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %191, ptr align 1 %11, i64 4, i1 false), !tbaa.struct !13
  %192 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %15, i32 0, i32 2
  call void @llvm.memset.p0.i64(ptr align 8 %192, i8 0, i64 104, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #10
  store i32 0, ptr %17, align 4, !tbaa !9
  %193 = getelementptr inbounds %"class.basisu::color_rgba", ptr %11, i32 0, i32 0
  %194 = getelementptr inbounds [4 x i8], ptr %193, i64 0, i64 0
  %195 = call noundef i64 @_ZN6basisu27pack_etc1_block_solid_colorERNS_9etc_blockEPKh(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef %194)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #10
  %196 = load i16, ptr %18, align 2
  %197 = and i16 %196, -3841
  %198 = or i16 %197, 0
  store i16 %198, ptr %18, align 2
  %199 = load i16, ptr %18, align 2
  %200 = and i16 %199, 4095
  %201 = or i16 %200, 4096
  store i16 %201, ptr %18, align 2
  %202 = load ptr, ptr %5, align 8, !tbaa !5
  %203 = load i32, ptr %17, align 4, !tbaa !9
  call void @_ZN6basisu10pack_uastcERN6basist11uastc_blockERKNS_20uastc_encode_resultsERKNS_9etc_blockEjRKNS_12eac_a8_blockEbb(ptr noundef nonnull align 8 dereferenceable(16) %202, ptr noundef nonnull align 8 dereferenceable(128) %15, ptr noundef nonnull align 8 dereferenceable(8) %16, i32 noundef %203, ptr noundef nonnull align 2 dereferenceable(8) %18, i1 noundef zeroext false, i1 noundef zeroext false)
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 128, ptr %15) #10
  br label %973

204:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #10
  %205 = load i32, ptr %6, align 4, !tbaa !9
  %206 = and i32 %205, 7
  store i32 %206, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #10
  %207 = load i32, ptr %6, align 4, !tbaa !9
  %208 = and i32 %207, 8
  %209 = icmp ne i32 %208, 0
  %210 = zext i1 %209 to i8
  store i8 %210, ptr %20, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #10
  %211 = load i8, ptr %20, align 1, !tbaa !11, !range !18, !noundef !19
  %212 = trunc i8 %211 to i1
  br i1 %212, label %217, label %213

213:                                              ; preds = %204
  %214 = load i32, ptr %6, align 4, !tbaa !9
  %215 = and i32 %214, 16
  %216 = icmp ne i32 %215, 0
  br label %217

217:                                              ; preds = %213, %204
  %218 = phi i1 [ false, %204 ], [ %216, %213 ]
  %219 = zext i1 %218 to i8
  store i8 %219, ptr %21, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 65536, ptr %22) #10
  %220 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i32 0, i32 0
  %221 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %220, i64 512
  br label %222

222:                                              ; preds = %222, %217
  %223 = phi ptr [ %220, %217 ], [ %224, %222 ]
  call void @_ZN6basisu20uastc_encode_resultsC2Ev(ptr noundef nonnull align 8 dereferenceable(128) %223)
  %224 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %223, i64 1
  %225 = icmp eq ptr %224, %221
  br i1 %225, label %226, label %222

226:                                              ; preds = %222
  %227 = load i32, ptr %19, align 4, !tbaa !9
  %228 = call noundef i32 @_ZN6basisu6clampiEiii(i32 noundef %227, i32 noundef 0, i32 noundef 4)
  store i32 %228, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #10
  store i32 -1, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #10
  store i32 6, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #10
  store i8 0, ptr %25, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #10
  store i8 1, ptr %26, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #10
  store i32 3, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #10
  store i32 -1, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #10
  store i32 2, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #10
  store i8 1, ptr %30, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #10
  store i8 0, ptr %31, align 1, !tbaa !11
  %229 = load i32, ptr %19, align 4, !tbaa !9
  switch i32 %229, label %235 [
    i32 0, label %230
    i32 1, label %231
    i32 2, label %232
    i32 3, label %233
    i32 4, label %234
  ]

230:                                              ; preds = %226
  store i32 39169, ptr %23, align 4, !tbaa !9
  store i8 0, ptr %26, align 1, !tbaa !11
  store i32 0, ptr %27, align 4, !tbaa !9
  store i32 10500, ptr %28, align 4, !tbaa !9
  store i32 0, ptr %24, align 4, !tbaa !9
  store i32 1, ptr %29, align 4, !tbaa !9
  store i8 0, ptr %30, align 1, !tbaa !11
  store i8 1, ptr %25, align 1, !tbaa !11
  store i8 1, ptr %31, align 1, !tbaa !11
  br label %235

231:                                              ; preds = %226
  store i32 170833, ptr %23, align 4, !tbaa !9
  store i8 0, ptr %26, align 1, !tbaa !11
  store i32 0, ptr %27, align 4, !tbaa !9
  store i32 10500, ptr %28, align 4, !tbaa !9
  store i32 0, ptr %24, align 4, !tbaa !9
  store i32 1, ptr %29, align 4, !tbaa !9
  store i8 1, ptr %25, align 1, !tbaa !11
  br label %235

232:                                              ; preds = %226
  store i32 245619, ptr %23, align 4, !tbaa !9
  store i8 0, ptr %26, align 1, !tbaa !11
  store i32 1, ptr %27, align 4, !tbaa !9
  store i32 11717, ptr %28, align 4, !tbaa !9
  store i32 1, ptr %24, align 4, !tbaa !9
  store i32 1, ptr %29, align 4, !tbaa !9
  store i8 1, ptr %25, align 1, !tbaa !11
  br label %235

233:                                              ; preds = %226
  store i8 0, ptr %26, align 1, !tbaa !11
  store i32 2, ptr %27, align 4, !tbaa !9
  store i32 3, ptr %24, align 4, !tbaa !9
  store i8 1, ptr %25, align 1, !tbaa !11
  br label %235

234:                                              ; preds = %226
  br label %235

235:                                              ; preds = %234, %233, %232, %231, %230, %226
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #10
  store i32 0, ptr %32, align 4, !tbaa !9
  %236 = load i8, ptr %31, align 1, !tbaa !11, !range !18, !noundef !19
  %237 = trunc i8 %236 to i1
  br i1 %237, label %238, label %246

238:                                              ; preds = %235
  %239 = load i8, ptr %10, align 1, !tbaa !11, !range !18, !noundef !19
  %240 = trunc i8 %239 to i1
  br i1 %240, label %241, label %245

241:                                              ; preds = %238
  %242 = load i8, ptr %9, align 1, !tbaa !11, !range !18, !noundef !19
  %243 = trunc i8 %242 to i1
  br i1 %243, label %245, label %244

244:                                              ; preds = %241
  store i8 0, ptr %10, align 1, !tbaa !11
  br label %245

245:                                              ; preds = %244, %241, %238
  br label %246

246:                                              ; preds = %245, %235
  call void @llvm.lifetime.start.p0(i64 1, ptr %33) #10
  %247 = load i8, ptr %9, align 1, !tbaa !11, !range !18, !noundef !19
  %248 = trunc i8 %247 to i1
  br i1 %248, label %252, label %249

249:                                              ; preds = %246
  %250 = load i8, ptr %26, align 1, !tbaa !11, !range !18, !noundef !19
  %251 = trunc i8 %250 to i1
  br label %252

252:                                              ; preds = %249, %246
  %253 = phi i1 [ true, %246 ], [ %251, %249 ]
  %254 = zext i1 %253 to i8
  store i8 %254, ptr %33, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 32, ptr %34) #10
  call void @llvm.memset.p0.i64(ptr align 4 %34, i8 0, i64 32, i1 false)
  %255 = getelementptr inbounds %"struct.basisu::bc7enc_compress_block_params", ptr %34, i32 0, i32 0
  store i32 64, ptr %255, align 4, !tbaa !27
  %256 = load i32, ptr %29, align 4, !tbaa !9
  %257 = getelementptr inbounds %"struct.basisu::bc7enc_compress_block_params", ptr %34, i32 0, i32 4
  store i32 %256, ptr %257, align 4, !tbaa !29
  %258 = getelementptr inbounds %"struct.basisu::bc7enc_compress_block_params", ptr %34, i32 0, i32 1
  %259 = getelementptr inbounds [4 x i32], ptr %258, i64 0, i64 0
  store i32 1, ptr %259, align 4, !tbaa !9
  %260 = getelementptr inbounds %"struct.basisu::bc7enc_compress_block_params", ptr %34, i32 0, i32 1
  %261 = getelementptr inbounds [4 x i32], ptr %260, i64 0, i64 1
  store i32 1, ptr %261, align 4, !tbaa !9
  %262 = getelementptr inbounds %"struct.basisu::bc7enc_compress_block_params", ptr %34, i32 0, i32 1
  %263 = getelementptr inbounds [4 x i32], ptr %262, i64 0, i64 2
  store i32 1, ptr %263, align 4, !tbaa !9
  %264 = getelementptr inbounds %"struct.basisu::bc7enc_compress_block_params", ptr %34, i32 0, i32 1
  %265 = getelementptr inbounds [4 x i32], ptr %264, i64 0, i64 3
  store i32 1, ptr %265, align 4, !tbaa !9
  %266 = load i32, ptr %24, align 4, !tbaa !9
  %267 = getelementptr inbounds %"struct.basisu::bc7enc_compress_block_params", ptr %34, i32 0, i32 2
  store i32 %266, ptr %267, align 4, !tbaa !30
  %268 = load i8, ptr %10, align 1, !tbaa !11, !range !18, !noundef !19
  %269 = trunc i8 %268 to i1
  br i1 %269, label %270, label %296

270:                                              ; preds = %252
  %271 = load i32, ptr %23, align 4, !tbaa !9
  %272 = and i32 %271, 32768
  %273 = icmp ne i32 %272, 0
  br i1 %273, label %274, label %277

274:                                              ; preds = %270
  %275 = load ptr, ptr %7, align 8, !tbaa !5
  %276 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 0
  call void @_ZN6basisuL11astc_mode15EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef %275, ptr noundef %276, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(32) %34)
  br label %277

277:                                              ; preds = %274, %270
  %278 = load i32, ptr %23, align 4, !tbaa !9
  %279 = and i32 %278, 65536
  %280 = icmp ne i32 %279, 0
  br i1 %280, label %281, label %288

281:                                              ; preds = %277
  %282 = load ptr, ptr %7, align 8, !tbaa !5
  %283 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 0
  %284 = load i8, ptr %25, align 1, !tbaa !11, !range !18, !noundef !19
  %285 = trunc i8 %284 to i1
  %286 = zext i1 %285 to i64
  %287 = select i1 %285, i32 4, i32 0
  call void @_ZN6basisuL16astc_mode9_or_16EjPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEj(i32 noundef 16, ptr noundef %282, ptr noundef %283, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(32) %34, i32 noundef %287)
  br label %288

288:                                              ; preds = %281, %277
  %289 = load i32, ptr %23, align 4, !tbaa !9
  %290 = and i32 %289, 131072
  %291 = icmp ne i32 %290, 0
  br i1 %291, label %292, label %295

292:                                              ; preds = %288
  %293 = load ptr, ptr %7, align 8, !tbaa !5
  %294 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 0
  call void @_ZN6basisuL17astc_mode11_or_17EjPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(i32 noundef 17, ptr noundef %293, ptr noundef %294, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(32) %34)
  br label %295

295:                                              ; preds = %292, %288
  br label %296

296:                                              ; preds = %295, %252
  %297 = load i8, ptr %9, align 1, !tbaa !11, !range !18, !noundef !19
  %298 = trunc i8 %297 to i1
  br i1 %298, label %371, label %299

299:                                              ; preds = %296
  %300 = load i32, ptr %23, align 4, !tbaa !9
  %301 = and i32 %300, 1
  %302 = icmp ne i32 %301, 0
  br i1 %302, label %303, label %306

303:                                              ; preds = %299
  %304 = load ptr, ptr %7, align 8, !tbaa !5
  %305 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 0
  call void @_ZN6basisuL16astc_mode0_or_18EjPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEPKh(i32 noundef 0, ptr noundef %304, ptr noundef %305, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(32) %34, ptr noundef null)
  br label %306

306:                                              ; preds = %303, %299
  %307 = load i32, ptr %23, align 4, !tbaa !9
  %308 = and i32 %307, 2
  %309 = icmp ne i32 %308, 0
  br i1 %309, label %310, label %313

310:                                              ; preds = %306
  %311 = load ptr, ptr %7, align 8, !tbaa !5
  %312 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 0
  call void @_ZN6basisuL10astc_mode1EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef %311, ptr noundef %312, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(32) %34)
  br label %313

313:                                              ; preds = %310, %306
  %314 = load i32, ptr %23, align 4, !tbaa !9
  %315 = and i32 %314, 4
  %316 = icmp ne i32 %315, 0
  br i1 %316, label %317, label %322

317:                                              ; preds = %313
  %318 = load ptr, ptr %7, align 8, !tbaa !5
  %319 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 0
  %320 = load i8, ptr %25, align 1, !tbaa !11, !range !18, !noundef !19
  %321 = trunc i8 %320 to i1
  call void @_ZN6basisuL10astc_mode2EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEb(ptr noundef %318, ptr noundef %319, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(32) %34, i1 noundef zeroext %321)
  br label %322

322:                                              ; preds = %317, %313
  %323 = load i32, ptr %23, align 4, !tbaa !9
  %324 = and i32 %323, 8
  %325 = icmp ne i32 %324, 0
  br i1 %325, label %326, label %331

326:                                              ; preds = %322
  %327 = load ptr, ptr %7, align 8, !tbaa !5
  %328 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 0
  %329 = load i8, ptr %25, align 1, !tbaa !11, !range !18, !noundef !19
  %330 = trunc i8 %329 to i1
  call void @_ZN6basisuL10astc_mode3EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEb(ptr noundef %327, ptr noundef %328, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(32) %34, i1 noundef zeroext %330)
  br label %331

331:                                              ; preds = %326, %322
  %332 = load i32, ptr %23, align 4, !tbaa !9
  %333 = and i32 %332, 16
  %334 = icmp ne i32 %333, 0
  br i1 %334, label %335, label %340

335:                                              ; preds = %331
  %336 = load ptr, ptr %7, align 8, !tbaa !5
  %337 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 0
  %338 = load i8, ptr %25, align 1, !tbaa !11, !range !18, !noundef !19
  %339 = trunc i8 %338 to i1
  call void @_ZN6basisuL10astc_mode4EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEb(ptr noundef %336, ptr noundef %337, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(32) %34, i1 noundef zeroext %339)
  br label %340

340:                                              ; preds = %335, %331
  %341 = load i32, ptr %23, align 4, !tbaa !9
  %342 = and i32 %341, 32
  %343 = icmp ne i32 %342, 0
  br i1 %343, label %344, label %347

344:                                              ; preds = %340
  %345 = load ptr, ptr %7, align 8, !tbaa !5
  %346 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 0
  call void @_ZN6basisuL10astc_mode5EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef %345, ptr noundef %346, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(32) %34)
  br label %347

347:                                              ; preds = %344, %340
  %348 = load i32, ptr %23, align 4, !tbaa !9
  %349 = and i32 %348, 64
  %350 = icmp ne i32 %349, 0
  br i1 %350, label %351, label %354

351:                                              ; preds = %347
  %352 = load ptr, ptr %7, align 8, !tbaa !5
  %353 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 0
  call void @_ZN6basisuL10astc_mode6EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef %352, ptr noundef %353, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(32) %34)
  br label %354

354:                                              ; preds = %351, %347
  %355 = load i32, ptr %23, align 4, !tbaa !9
  %356 = and i32 %355, 128
  %357 = icmp ne i32 %356, 0
  br i1 %357, label %358, label %363

358:                                              ; preds = %354
  %359 = load ptr, ptr %7, align 8, !tbaa !5
  %360 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 0
  %361 = load i8, ptr %25, align 1, !tbaa !11, !range !18, !noundef !19
  %362 = trunc i8 %361 to i1
  call void @_ZN6basisuL10astc_mode7EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEb(ptr noundef %359, ptr noundef %360, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(32) %34, i1 noundef zeroext %362)
  br label %363

363:                                              ; preds = %358, %354
  %364 = load i32, ptr %23, align 4, !tbaa !9
  %365 = and i32 %364, 262144
  %366 = icmp ne i32 %365, 0
  br i1 %366, label %367, label %370

367:                                              ; preds = %363
  %368 = load ptr, ptr %7, align 8, !tbaa !5
  %369 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 0
  call void @_ZN6basisuL16astc_mode0_or_18EjPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEPKh(i32 noundef 18, ptr noundef %368, ptr noundef %369, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(32) %34, ptr noundef null)
  br label %370

370:                                              ; preds = %367, %363
  br label %371

371:                                              ; preds = %370, %296
  %372 = load i8, ptr %33, align 1, !tbaa !11, !range !18, !noundef !19
  %373 = trunc i8 %372 to i1
  br i1 %373, label %374, label %421

374:                                              ; preds = %371
  %375 = load i32, ptr %23, align 4, !tbaa !9
  %376 = and i32 %375, 512
  %377 = icmp ne i32 %376, 0
  br i1 %377, label %378, label %385

378:                                              ; preds = %374
  %379 = load ptr, ptr %7, align 8, !tbaa !5
  %380 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 0
  %381 = load i8, ptr %25, align 1, !tbaa !11, !range !18, !noundef !19
  %382 = trunc i8 %381 to i1
  %383 = zext i1 %382 to i64
  %384 = select i1 %382, i32 4, i32 0
  call void @_ZN6basisuL16astc_mode9_or_16EjPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEj(i32 noundef 9, ptr noundef %379, ptr noundef %380, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(32) %34, i32 noundef %384)
  br label %385

385:                                              ; preds = %378, %374
  %386 = load i32, ptr %23, align 4, !tbaa !9
  %387 = and i32 %386, 1024
  %388 = icmp ne i32 %387, 0
  br i1 %388, label %389, label %392

389:                                              ; preds = %385
  %390 = load ptr, ptr %7, align 8, !tbaa !5
  %391 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 0
  call void @_ZN6basisuL11astc_mode10EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef %390, ptr noundef %391, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(32) %34)
  br label %392

392:                                              ; preds = %389, %385
  %393 = load i32, ptr %23, align 4, !tbaa !9
  %394 = and i32 %393, 2048
  %395 = icmp ne i32 %394, 0
  br i1 %395, label %396, label %399

396:                                              ; preds = %392
  %397 = load ptr, ptr %7, align 8, !tbaa !5
  %398 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 0
  call void @_ZN6basisuL17astc_mode11_or_17EjPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(i32 noundef 11, ptr noundef %397, ptr noundef %398, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(32) %34)
  br label %399

399:                                              ; preds = %396, %392
  %400 = load i32, ptr %23, align 4, !tbaa !9
  %401 = and i32 %400, 4096
  %402 = icmp ne i32 %401, 0
  br i1 %402, label %403, label %406

403:                                              ; preds = %399
  %404 = load ptr, ptr %7, align 8, !tbaa !5
  %405 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 0
  call void @_ZN6basisuL11astc_mode12EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef %404, ptr noundef %405, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(32) %34)
  br label %406

406:                                              ; preds = %403, %399
  %407 = load i32, ptr %23, align 4, !tbaa !9
  %408 = and i32 %407, 8192
  %409 = icmp ne i32 %408, 0
  br i1 %409, label %410, label %413

410:                                              ; preds = %406
  %411 = load ptr, ptr %7, align 8, !tbaa !5
  %412 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 0
  call void @_ZN6basisuL11astc_mode13EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef %411, ptr noundef %412, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(32) %34)
  br label %413

413:                                              ; preds = %410, %406
  %414 = load i32, ptr %23, align 4, !tbaa !9
  %415 = and i32 %414, 16384
  %416 = icmp ne i32 %415, 0
  br i1 %416, label %417, label %420

417:                                              ; preds = %413
  %418 = load ptr, ptr %7, align 8, !tbaa !5
  %419 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 0
  call void @_ZN6basisuL11astc_mode14EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef %418, ptr noundef %419, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(32) %34)
  br label %420

420:                                              ; preds = %417, %413
  br label %421

421:                                              ; preds = %420, %371
  %422 = load i32, ptr %32, align 4, !tbaa !9
  %423 = icmp ne i32 %422, 0
  br i1 %423, label %424, label %425

424:                                              ; preds = %421
  br label %427

425:                                              ; preds = %421
  call void @__assert_fail(ptr noundef @.str.34, ptr noundef @.str.3, i32 noundef 3341, ptr noundef @__PRETTY_FUNCTION__._ZN6basisu12encode_uastcEPKhRN6basist11uastc_blockEj) #11
  unreachable

426:                                              ; No predecessors!
  br label %427

427:                                              ; preds = %426, %424
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #10
  store i32 0, ptr %35, align 4, !tbaa !9
  br label %428

428:                                              ; preds = %550, %427
  %429 = load i32, ptr %35, align 4, !tbaa !9
  %430 = load i32, ptr %32, align 4, !tbaa !9
  %431 = icmp ult i32 %429, %430
  br i1 %431, label %433, label %432

432:                                              ; preds = %428
  store i32 9, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #10
  br label %553

433:                                              ; preds = %428
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #10
  %434 = load i32, ptr %35, align 4, !tbaa !9
  %435 = zext i32 %434 to i64
  %436 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 %435
  store ptr %436, ptr %36, align 8, !tbaa !5
  %437 = load i8, ptr %10, align 1, !tbaa !11, !range !18, !noundef !19
  %438 = trunc i8 %437 to i1
  br i1 %438, label %494, label %439

439:                                              ; preds = %433
  %440 = load ptr, ptr %36, align 8, !tbaa !5
  %441 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %440, i32 0, i32 0
  %442 = load i32, ptr %441, align 8, !tbaa !20
  %443 = zext i32 %442 to i64
  %444 = getelementptr inbounds [19 x i8], ptr @_ZN6basist18g_uastc_mode_is_laE, i64 0, i64 %443
  %445 = load i8, ptr %444, align 1, !tbaa !14
  %446 = icmp ne i8 %445, 0
  br i1 %446, label %447, label %493

447:                                              ; preds = %439
  call void @llvm.lifetime.start.p0(i64 64, ptr %37) #10
  %448 = getelementptr inbounds [16 x %"class.basisu::color_rgba"], ptr %37, i32 0, i32 0
  %449 = getelementptr inbounds %"class.basisu::color_rgba", ptr %448, i64 16
  br label %450

450:                                              ; preds = %450, %447
  %451 = phi ptr [ %448, %447 ], [ %452, %450 ]
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %451)
  %452 = getelementptr inbounds %"class.basisu::color_rgba", ptr %451, i64 1
  %453 = icmp eq ptr %452, %449
  br i1 %453, label %454, label %450

454:                                              ; preds = %450
  %455 = load ptr, ptr %36, align 8, !tbaa !5
  %456 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %455, i32 0, i32 0
  %457 = load i32, ptr %456, align 8, !tbaa !20
  %458 = load ptr, ptr %36, align 8, !tbaa !5
  %459 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %458, i32 0, i32 1
  %460 = load i32, ptr %459, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #10
  %461 = load ptr, ptr %36, align 8, !tbaa !5
  %462 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %461, i32 0, i32 3
  %463 = call i32 @_ZNK6basisu10color_rgba11get_color32Ev(ptr noundef nonnull align 1 dereferenceable(4) %462)
  %464 = getelementptr inbounds %"struct.basist::color32", ptr %38, i32 0, i32 0
  %465 = getelementptr inbounds %union.anon.2, ptr %464, i32 0, i32 0
  store i32 %463, ptr %465, align 4
  %466 = load ptr, ptr %36, align 8, !tbaa !5
  %467 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %466, i32 0, i32 2
  %468 = getelementptr inbounds [16 x %"class.basisu::color_rgba"], ptr %37, i64 0, i64 0
  %469 = call noundef zeroext i1 @_ZN6basist12unpack_uastcEjjRKNS_7color32ERKNS_15astc_block_descEPS0_b(i32 noundef %457, i32 noundef %460, ptr noundef nonnull align 4 dereferenceable(4) %38, ptr noundef nonnull align 4 dereferenceable(104) %467, ptr noundef %468, i1 noundef zeroext false)
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #10
  store i64 0, ptr %39, align 8, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #10
  store i32 0, ptr %40, align 4, !tbaa !9
  br label %470

470:                                              ; preds = %486, %454
  %471 = load i32, ptr %40, align 4, !tbaa !9
  %472 = icmp ult i32 %471, 16
  br i1 %472, label %474, label %473

473:                                              ; preds = %470
  store i32 12, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #10
  br label %489

474:                                              ; preds = %470
  %475 = load i32, ptr %40, align 4, !tbaa !9
  %476 = zext i32 %475 to i64
  %477 = getelementptr inbounds [16 x %"class.basisu::color_rgba"], ptr %37, i64 0, i64 %476
  %478 = load ptr, ptr %7, align 8, !tbaa !5
  %479 = load i32, ptr %40, align 4, !tbaa !9
  %480 = zext i32 %479 to i64
  %481 = getelementptr inbounds %"class.basisu::color_rgba", ptr %478, i64 %480
  %482 = call noundef i32 @_ZN6basisu14color_distanceERKNS_10color_rgbaES2_b(ptr noundef nonnull align 1 dereferenceable(4) %477, ptr noundef nonnull align 1 dereferenceable(4) %481, i1 noundef zeroext true)
  %483 = sext i32 %482 to i64
  %484 = load i64, ptr %39, align 8, !tbaa !31
  %485 = add i64 %484, %483
  store i64 %485, ptr %39, align 8, !tbaa !31
  br label %486

486:                                              ; preds = %474
  %487 = load i32, ptr %40, align 4, !tbaa !9
  %488 = add i32 %487, 1
  store i32 %488, ptr %40, align 4, !tbaa !9
  br label %470, !llvm.loop !32

489:                                              ; preds = %473
  %490 = load i64, ptr %39, align 8, !tbaa !31
  %491 = load ptr, ptr %36, align 8, !tbaa !5
  %492 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %491, i32 0, i32 4
  store i64 %490, ptr %492, align 8, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr %37) #10
  br label %493

493:                                              ; preds = %489, %439
  br label %549

494:                                              ; preds = %433
  %495 = load ptr, ptr %36, align 8, !tbaa !5
  %496 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %495, i32 0, i32 0
  %497 = load i32, ptr %496, align 8, !tbaa !20
  %498 = zext i32 %497 to i64
  %499 = getelementptr inbounds [19 x i8], ptr @_ZN6basist18g_uastc_mode_is_laE, i64 0, i64 %498
  %500 = load i8, ptr %499, align 1, !tbaa !14
  %501 = icmp ne i8 %500, 0
  br i1 %501, label %548, label %502

502:                                              ; preds = %494
  call void @llvm.lifetime.start.p0(i64 64, ptr %41) #10
  %503 = getelementptr inbounds [16 x %"class.basisu::color_rgba"], ptr %41, i32 0, i32 0
  %504 = getelementptr inbounds %"class.basisu::color_rgba", ptr %503, i64 16
  br label %505

505:                                              ; preds = %505, %502
  %506 = phi ptr [ %503, %502 ], [ %507, %505 ]
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %506)
  %507 = getelementptr inbounds %"class.basisu::color_rgba", ptr %506, i64 1
  %508 = icmp eq ptr %507, %504
  br i1 %508, label %509, label %505

509:                                              ; preds = %505
  %510 = load ptr, ptr %36, align 8, !tbaa !5
  %511 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %510, i32 0, i32 0
  %512 = load i32, ptr %511, align 8, !tbaa !20
  %513 = load ptr, ptr %36, align 8, !tbaa !5
  %514 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %513, i32 0, i32 1
  %515 = load i32, ptr %514, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #10
  %516 = load ptr, ptr %36, align 8, !tbaa !5
  %517 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %516, i32 0, i32 3
  %518 = call i32 @_ZNK6basisu10color_rgba11get_color32Ev(ptr noundef nonnull align 1 dereferenceable(4) %517)
  %519 = getelementptr inbounds %"struct.basist::color32", ptr %42, i32 0, i32 0
  %520 = getelementptr inbounds %union.anon.2, ptr %519, i32 0, i32 0
  store i32 %518, ptr %520, align 4
  %521 = load ptr, ptr %36, align 8, !tbaa !5
  %522 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %521, i32 0, i32 2
  %523 = getelementptr inbounds [16 x %"class.basisu::color_rgba"], ptr %41, i64 0, i64 0
  %524 = call noundef zeroext i1 @_ZN6basist12unpack_uastcEjjRKNS_7color32ERKNS_15astc_block_descEPS0_b(i32 noundef %512, i32 noundef %515, ptr noundef nonnull align 4 dereferenceable(4) %42, ptr noundef nonnull align 4 dereferenceable(104) %522, ptr noundef %523, i1 noundef zeroext false)
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #10
  store i64 0, ptr %43, align 8, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #10
  store i32 0, ptr %44, align 4, !tbaa !9
  br label %525

525:                                              ; preds = %541, %509
  %526 = load i32, ptr %44, align 4, !tbaa !9
  %527 = icmp ult i32 %526, 16
  br i1 %527, label %529, label %528

528:                                              ; preds = %525
  store i32 15, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #10
  br label %544

529:                                              ; preds = %525
  %530 = load i32, ptr %44, align 4, !tbaa !9
  %531 = zext i32 %530 to i64
  %532 = getelementptr inbounds [16 x %"class.basisu::color_rgba"], ptr %41, i64 0, i64 %531
  %533 = load ptr, ptr %7, align 8, !tbaa !5
  %534 = load i32, ptr %44, align 4, !tbaa !9
  %535 = zext i32 %534 to i64
  %536 = getelementptr inbounds %"class.basisu::color_rgba", ptr %533, i64 %535
  %537 = call noundef i32 @_ZN6basisuL17color_distance_laERKNS_10color_rgbaES2_(ptr noundef nonnull align 1 dereferenceable(4) %532, ptr noundef nonnull align 1 dereferenceable(4) %536)
  %538 = zext i32 %537 to i64
  %539 = load i64, ptr %43, align 8, !tbaa !31
  %540 = add i64 %539, %538
  store i64 %540, ptr %43, align 8, !tbaa !31
  br label %541

541:                                              ; preds = %529
  %542 = load i32, ptr %44, align 4, !tbaa !9
  %543 = add i32 %542, 1
  store i32 %543, ptr %44, align 4, !tbaa !9
  br label %525, !llvm.loop !33

544:                                              ; preds = %528
  %545 = load i64, ptr %43, align 8, !tbaa !31
  %546 = load ptr, ptr %36, align 8, !tbaa !5
  %547 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %546, i32 0, i32 4
  store i64 %545, ptr %547, align 8, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr %41) #10
  br label %548

548:                                              ; preds = %544, %494
  br label %549

549:                                              ; preds = %548, %493
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #10
  br label %550

550:                                              ; preds = %549
  %551 = load i32, ptr %35, align 4, !tbaa !9
  %552 = add i32 %551, 1
  store i32 %552, ptr %35, align 4, !tbaa !9
  br label %428, !llvm.loop !34

553:                                              ; preds = %432
  call void @llvm.lifetime.start.p0(i64 152, ptr %45) #10
  call void @_ZN6basist20unpacked_uastc_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(152) %45)
  call void @llvm.memset.p0.i64(ptr align 4 %45, i8 0, i64 152, i1 false)
  call void @llvm.lifetime.start.p0(i64 4096, ptr %46) #10
  call void @llvm.lifetime.start.p0(i64 2048, ptr %47) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #10
  store double 0x4415AF1D80000000, ptr %48, align 8, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #10
  store i32 -1, ptr %49, align 4, !tbaa !9
  %554 = load i32, ptr %32, align 4, !tbaa !9
  %555 = icmp eq i32 %554, 1
  br i1 %555, label %556, label %557

556:                                              ; preds = %553
  store i32 0, ptr %49, align 4, !tbaa !9
  br label %870

557:                                              ; preds = %553
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #10
  %558 = load i8, ptr %21, align 1, !tbaa !11, !range !18, !noundef !19
  %559 = trunc i8 %558 to i1
  br i1 %559, label %560, label %561

560:                                              ; preds = %557
  br label %566

561:                                              ; preds = %557
  %562 = load i8, ptr %20, align 1, !tbaa !11, !range !18, !noundef !19
  %563 = trunc i8 %562 to i1
  %564 = zext i1 %563 to i64
  %565 = select i1 %563, i32 0, i32 50
  br label %566

566:                                              ; preds = %561, %560
  %567 = phi i32 [ 100, %560 ], [ %565, %561 ]
  store i32 %567, ptr %50, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #10
  %568 = load i8, ptr %21, align 1, !tbaa !11, !range !18, !noundef !19
  %569 = trunc i8 %568 to i1
  %570 = zext i1 %569 to i64
  %571 = select i1 %569, i32 0, i32 100
  store i32 %571, ptr %51, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #10
  store i32 0, ptr %52, align 4, !tbaa !9
  br label %572

572:                                              ; preds = %747, %566
  %573 = load i32, ptr %52, align 4, !tbaa !9
  %574 = load i32, ptr %32, align 4, !tbaa !9
  %575 = icmp ult i32 %573, %574
  br i1 %575, label %577, label %576

576:                                              ; preds = %572
  store i32 18, ptr %13, align 4
  br label %750

577:                                              ; preds = %572
  %578 = load i32, ptr %52, align 4, !tbaa !9
  %579 = zext i32 %578 to i64
  %580 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 %579
  %581 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %580, i32 0, i32 0
  %582 = load i32, ptr %581, align 16, !tbaa !20
  %583 = getelementptr inbounds %"struct.basist::unpacked_uastc_block", ptr %45, i32 0, i32 1
  store i32 %582, ptr %583, align 4, !tbaa !37
  %584 = load i32, ptr %52, align 4, !tbaa !9
  %585 = zext i32 %584 to i64
  %586 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 %585
  %587 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %586, i32 0, i32 2
  %588 = getelementptr inbounds %"struct.basist::unpacked_uastc_block", ptr %45, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %588, ptr align 8 %587, i64 104, i1 false), !tbaa.struct !40
  %589 = load i32, ptr %52, align 4, !tbaa !9
  %590 = zext i32 %589 to i64
  %591 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 %590
  %592 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %591, i32 0, i32 1
  %593 = load i32, ptr %592, align 4, !tbaa !26
  %594 = getelementptr inbounds %"struct.basist::unpacked_uastc_block", ptr %45, i32 0, i32 2
  store i32 %593, ptr %594, align 4, !tbaa !41
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #10
  %595 = load i32, ptr %52, align 4, !tbaa !9
  %596 = zext i32 %595 to i64
  %597 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 %596
  %598 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %597, i32 0, i32 3
  %599 = call i32 @_ZNK6basisu10color_rgba11get_color32Ev(ptr noundef nonnull align 1 dereferenceable(4) %598)
  %600 = getelementptr inbounds %"struct.basist::color32", ptr %53, i32 0, i32 0
  %601 = getelementptr inbounds %union.anon.2, ptr %600, i32 0, i32 0
  store i32 %599, ptr %601, align 4
  %602 = getelementptr inbounds %"struct.basist::unpacked_uastc_block", ptr %45, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %602, ptr align 4 %53, i64 4, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #10
  call void @llvm.lifetime.start.p0(i64 64, ptr %54) #10
  %603 = getelementptr inbounds [4 x [4 x %"class.basisu::color_rgba"]], ptr %54, i32 0, i32 0, i32 0
  %604 = getelementptr inbounds %"class.basisu::color_rgba", ptr %603, i64 16
  br label %605

605:                                              ; preds = %605, %577
  %606 = phi ptr [ %603, %577 ], [ %607, %605 ]
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %606)
  %607 = getelementptr inbounds %"class.basisu::color_rgba", ptr %606, i64 1
  %608 = icmp eq ptr %607, %604
  br i1 %608, label %609, label %605

609:                                              ; preds = %605
  call void @llvm.lifetime.start.p0(i64 1, ptr %55) #10
  %610 = load i32, ptr %52, align 4, !tbaa !9
  %611 = zext i32 %610 to i64
  %612 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 %611
  %613 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %612, i32 0, i32 0
  %614 = load i32, ptr %613, align 16, !tbaa !20
  %615 = load i32, ptr %52, align 4, !tbaa !9
  %616 = zext i32 %615 to i64
  %617 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 %616
  %618 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %617, i32 0, i32 1
  %619 = load i32, ptr %618, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %56) #10
  %620 = load i32, ptr %52, align 4, !tbaa !9
  %621 = zext i32 %620 to i64
  %622 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 %621
  %623 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %622, i32 0, i32 3
  %624 = call i32 @_ZNK6basisu10color_rgba11get_color32Ev(ptr noundef nonnull align 1 dereferenceable(4) %623)
  %625 = getelementptr inbounds %"struct.basist::color32", ptr %56, i32 0, i32 0
  %626 = getelementptr inbounds %union.anon.2, ptr %625, i32 0, i32 0
  store i32 %624, ptr %626, align 4
  %627 = load i32, ptr %52, align 4, !tbaa !9
  %628 = zext i32 %627 to i64
  %629 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 %628
  %630 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %629, i32 0, i32 2
  %631 = getelementptr inbounds [4 x [4 x %"class.basisu::color_rgba"]], ptr %54, i64 0, i64 0
  %632 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %631, i64 0, i64 0
  %633 = call noundef zeroext i1 @_ZN6basist12unpack_uastcEjjRKNS_7color32ERKNS_15astc_block_descEPS0_b(i32 noundef %614, i32 noundef %619, ptr noundef nonnull align 4 dereferenceable(4) %56, ptr noundef nonnull align 4 dereferenceable(104) %630, ptr noundef %632, i1 noundef zeroext false)
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #10
  %634 = zext i1 %633 to i8
  store i8 %634, ptr %55, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %59) #10
  %635 = load ptr, ptr %7, align 8, !tbaa !5
  %636 = getelementptr inbounds [4 x [4 x %"class.basisu::color_rgba"]], ptr %54, i64 0, i64 0
  call void @_ZN6basisuL19compute_block_errorEPA4_KNS_10color_rgbaES3_RmS4_S4_(ptr noundef %635, ptr noundef %636, ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull align 8 dereferenceable(8) %59)
  %637 = load i32, ptr %52, align 4, !tbaa !9
  %638 = zext i32 %637 to i64
  %639 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 %638
  %640 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %639, i32 0, i32 0
  %641 = load i32, ptr %640, align 16, !tbaa !20
  %642 = icmp eq i32 %641, 8
  br i1 %642, label %643, label %644

643:                                              ; preds = %609
  br label %662

644:                                              ; preds = %609
  %645 = load i8, ptr %10, align 1, !tbaa !11, !range !18, !noundef !19
  %646 = trunc i8 %645 to i1
  br i1 %646, label %647, label %648

647:                                              ; preds = %644
  br label %661

648:                                              ; preds = %644
  %649 = load i32, ptr %52, align 4, !tbaa !9
  %650 = zext i32 %649 to i64
  %651 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 %650
  %652 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %651, i32 0, i32 0
  %653 = load i32, ptr %652, align 16, !tbaa !20
  %654 = zext i32 %653 to i64
  %655 = getelementptr inbounds [19 x i8], ptr @_ZN6basist22g_uastc_mode_has_alphaE, i64 0, i64 %654
  %656 = load i8, ptr %655, align 1, !tbaa !14
  %657 = icmp ne i8 %656, 0
  br i1 %657, label %658, label %659

658:                                              ; preds = %648
  br label %660

659:                                              ; preds = %648
  br label %660

660:                                              ; preds = %659, %658
  br label %661

661:                                              ; preds = %660, %647
  br label %662

662:                                              ; preds = %661, %643
  call void @llvm.lifetime.start.p0(i64 96, ptr %60) #10
  %663 = call noundef zeroext i1 @_ZN6basist22transcode_uastc_to_bc7ERKNS_20unpacked_uastc_blockERNS_24bc7_optimization_resultsE(ptr noundef nonnull align 4 dereferenceable(152) %45, ptr noundef nonnull align 4 dereferenceable(96) %60)
  call void @llvm.lifetime.start.p0(i64 16, ptr %61) #10
  call void @_ZN6basist16encode_bc7_blockEPvPKNS_24bc7_optimization_resultsE(ptr noundef %61, ptr noundef %60)
  call void @llvm.lifetime.start.p0(i64 64, ptr %62) #10
  %664 = getelementptr inbounds [4 x [4 x %"class.basisu::color_rgba"]], ptr %62, i32 0, i32 0, i32 0
  %665 = getelementptr inbounds %"class.basisu::color_rgba", ptr %664, i64 16
  br label %666

666:                                              ; preds = %666, %662
  %667 = phi ptr [ %664, %662 ], [ %668, %666 ]
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %667)
  %668 = getelementptr inbounds %"class.basisu::color_rgba", ptr %667, i64 1
  %669 = icmp eq ptr %668, %665
  br i1 %669, label %670, label %666

670:                                              ; preds = %666
  %671 = getelementptr inbounds [4 x [4 x %"class.basisu::color_rgba"]], ptr %62, i64 0, i64 0
  %672 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %671, i64 0, i64 0
  %673 = call noundef zeroext i1 @_ZN6basisu12unpack_blockENS_14texture_formatEPKvPNS_10color_rgbaE(i32 noundef 9, ptr noundef %61, ptr noundef %672)
  call void @llvm.lifetime.start.p0(i64 8, ptr %63) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %64) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %65) #10
  %674 = load ptr, ptr %7, align 8, !tbaa !5
  %675 = getelementptr inbounds [4 x [4 x %"class.basisu::color_rgba"]], ptr %62, i64 0, i64 0
  call void @_ZN6basisuL19compute_block_errorEPA4_KNS_10color_rgbaES3_RmS4_S4_(ptr noundef %674, ptr noundef %675, ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull align 8 dereferenceable(8) %65, ptr noundef nonnull align 8 dereferenceable(8) %63)
  %676 = load i32, ptr %52, align 4, !tbaa !9
  %677 = zext i32 %676 to i64
  %678 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 %677
  %679 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %678, i32 0, i32 0
  %680 = load i32, ptr %679, align 16, !tbaa !20
  %681 = icmp eq i32 %680, 8
  br i1 %681, label %682, label %684

682:                                              ; preds = %670
  %683 = load i32, ptr %52, align 4, !tbaa !9
  store i32 %683, ptr %49, align 4, !tbaa !9
  store i32 18, ptr %13, align 4
  br label %744

684:                                              ; preds = %670
  call void @llvm.lifetime.start.p0(i64 8, ptr %66) #10
  store i64 0, ptr %66, align 8, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 8, ptr %67) #10
  store i64 0, ptr %67, align 8, !tbaa !31
  %685 = load i8, ptr %10, align 1, !tbaa !11, !range !18, !noundef !19
  %686 = trunc i8 %685 to i1
  br i1 %686, label %687, label %690

687:                                              ; preds = %684
  %688 = load i64, ptr %63, align 8, !tbaa !31
  store i64 %688, ptr %67, align 8, !tbaa !31
  %689 = load i64, ptr %59, align 8, !tbaa !31
  store i64 %689, ptr %66, align 8, !tbaa !31
  br label %700

690:                                              ; preds = %684
  %691 = load i8, ptr %9, align 1, !tbaa !11, !range !18, !noundef !19
  %692 = trunc i8 %691 to i1
  br i1 %692, label %693, label %696

693:                                              ; preds = %690
  %694 = load i64, ptr %65, align 8, !tbaa !31
  store i64 %694, ptr %67, align 8, !tbaa !31
  %695 = load i64, ptr %58, align 8, !tbaa !31
  store i64 %695, ptr %66, align 8, !tbaa !31
  br label %699

696:                                              ; preds = %690
  %697 = load i64, ptr %64, align 8, !tbaa !31
  store i64 %697, ptr %67, align 8, !tbaa !31
  %698 = load i64, ptr %57, align 8, !tbaa !31
  store i64 %698, ptr %66, align 8, !tbaa !31
  br label %699

699:                                              ; preds = %696, %693
  br label %700

700:                                              ; preds = %699, %687
  %701 = load i64, ptr %67, align 8, !tbaa !31
  %702 = load i32, ptr %50, align 4, !tbaa !9
  %703 = zext i32 %702 to i64
  %704 = mul i64 %701, %703
  %705 = udiv i64 %704, 100
  %706 = load i64, ptr %66, align 8, !tbaa !31
  %707 = load i32, ptr %51, align 4, !tbaa !9
  %708 = zext i32 %707 to i64
  %709 = mul i64 %706, %708
  %710 = udiv i64 %709, 100
  %711 = add i64 %705, %710
  %712 = load i32, ptr %52, align 4, !tbaa !9
  %713 = zext i32 %712 to i64
  %714 = getelementptr inbounds [512 x i64], ptr %46, i64 0, i64 %713
  store i64 %711, ptr %714, align 8, !tbaa !31
  %715 = load i32, ptr %52, align 4, !tbaa !9
  %716 = zext i32 %715 to i64
  %717 = getelementptr inbounds [512 x i64], ptr %46, i64 0, i64 %716
  %718 = load i64, ptr %717, align 8, !tbaa !31
  %719 = icmp ne i64 %718, 0
  br i1 %719, label %722, label %720

720:                                              ; preds = %700
  %721 = load i32, ptr %52, align 4, !tbaa !9
  store i32 %721, ptr %49, align 4, !tbaa !9
  store i32 18, ptr %13, align 4
  br label %743

722:                                              ; preds = %700
  %723 = load i64, ptr %66, align 8, !tbaa !31
  %724 = uitofp i64 %723 to float
  %725 = call float @sqrtf(float noundef %724) #10
  %726 = load i32, ptr %52, align 4, !tbaa !9
  %727 = zext i32 %726 to i64
  %728 = getelementptr inbounds [512 x float], ptr %47, i64 0, i64 %727
  store float %725, ptr %728, align 4, !tbaa !42
  %729 = load i32, ptr %52, align 4, !tbaa !9
  %730 = zext i32 %729 to i64
  %731 = getelementptr inbounds [512 x float], ptr %47, i64 0, i64 %730
  %732 = load float, ptr %731, align 4, !tbaa !42
  %733 = fpext float %732 to double
  %734 = load double, ptr %48, align 8, !tbaa !35
  %735 = fcmp olt double %733, %734
  br i1 %735, label %736, label %742

736:                                              ; preds = %722
  %737 = load i32, ptr %52, align 4, !tbaa !9
  %738 = zext i32 %737 to i64
  %739 = getelementptr inbounds [512 x float], ptr %47, i64 0, i64 %738
  %740 = load float, ptr %739, align 4, !tbaa !42
  %741 = fpext float %740 to double
  store double %741, ptr %48, align 8, !tbaa !35
  br label %742

742:                                              ; preds = %736, %722
  store i32 0, ptr %13, align 4
  br label %743

743:                                              ; preds = %742, %720
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %66) #10
  br label %744

744:                                              ; preds = %743, %682
  call void @llvm.lifetime.end.p0(i64 8, ptr %65) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr %62) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %61) #10
  call void @llvm.lifetime.end.p0(i64 96, ptr %60) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %55) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr %54) #10
  %745 = load i32, ptr %13, align 4
  switch i32 %745, label %750 [
    i32 0, label %746
  ]

746:                                              ; preds = %744
  br label %747

747:                                              ; preds = %746
  %748 = load i32, ptr %52, align 4, !tbaa !9
  %749 = add i32 %748, 1
  store i32 %749, ptr %52, align 4, !tbaa !9
  br label %572, !llvm.loop !44

750:                                              ; preds = %744, %576
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #10
  br label %751

751:                                              ; preds = %750
  %752 = load i32, ptr %49, align 4, !tbaa !9
  %753 = icmp slt i32 %752, 0
  br i1 %753, label %754, label %869

754:                                              ; preds = %751
  call void @llvm.lifetime.start.p0(i64 8, ptr %68) #10
  store i64 -1, ptr %68, align 8, !tbaa !31
  %755 = load double, ptr %48, align 8, !tbaa !35
  %756 = fcmp oeq double %755, 0.000000e+00
  br i1 %756, label %760, label %757

757:                                              ; preds = %754
  %758 = load i8, ptr %21, align 1, !tbaa !11, !range !18, !noundef !19
  %759 = trunc i8 %758 to i1
  br i1 %759, label %760, label %807

760:                                              ; preds = %757, %754
  call void @llvm.lifetime.start.p0(i64 4, ptr %69) #10
  store i32 0, ptr %69, align 4, !tbaa !9
  br label %761

761:                                              ; preds = %802, %760
  %762 = load i32, ptr %69, align 4, !tbaa !9
  %763 = load i32, ptr %32, align 4, !tbaa !9
  %764 = icmp ult i32 %762, %763
  br i1 %764, label %766, label %765

765:                                              ; preds = %761
  store i32 21, ptr %13, align 4
  br label %805

766:                                              ; preds = %761
  call void @llvm.lifetime.start.p0(i64 4, ptr %70) #10
  %767 = load i32, ptr %6, align 4, !tbaa !9
  %768 = and i32 %767, 512
  %769 = icmp ne i32 %768, 0
  br i1 %769, label %770, label %777

770:                                              ; preds = %766
  %771 = load i32, ptr %69, align 4, !tbaa !9
  %772 = zext i32 %771 to i64
  %773 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 %772
  %774 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %773, i32 0, i32 0
  %775 = load i32, ptr %774, align 16, !tbaa !20
  %776 = call noundef float @_ZN6basisuL21get_uastc_mode_weightEj(i32 noundef %775)
  br label %778

777:                                              ; preds = %766
  br label %778

778:                                              ; preds = %777, %770
  %779 = phi float [ %776, %770 ], [ 1.000000e+00, %777 ]
  store float %779, ptr %70, align 4, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 8, ptr %71) #10
  %780 = load i32, ptr %69, align 4, !tbaa !9
  %781 = zext i32 %780 to i64
  %782 = getelementptr inbounds [512 x i64], ptr %46, i64 0, i64 %781
  %783 = load i64, ptr %782, align 8, !tbaa !31
  %784 = uitofp i64 %783 to float
  %785 = load float, ptr %70, align 4, !tbaa !42
  %786 = fmul float %784, %785
  %787 = fptoui float %786 to i64
  store i64 %787, ptr %71, align 8, !tbaa !31
  %788 = load i64, ptr %71, align 8, !tbaa !31
  %789 = load i64, ptr %68, align 8, !tbaa !31
  %790 = icmp ult i64 %788, %789
  br i1 %790, label %791, label %798

791:                                              ; preds = %778
  %792 = load i64, ptr %71, align 8, !tbaa !31
  store i64 %792, ptr %68, align 8, !tbaa !31
  %793 = load i32, ptr %69, align 4, !tbaa !9
  store i32 %793, ptr %49, align 4, !tbaa !9
  %794 = load i64, ptr %68, align 8, !tbaa !31
  %795 = icmp ne i64 %794, 0
  br i1 %795, label %797, label %796

796:                                              ; preds = %791
  store i32 21, ptr %13, align 4
  br label %799

797:                                              ; preds = %791
  br label %798

798:                                              ; preds = %797, %778
  store i32 0, ptr %13, align 4
  br label %799

799:                                              ; preds = %798, %796
  call void @llvm.lifetime.end.p0(i64 8, ptr %71) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %70) #10
  %800 = load i32, ptr %13, align 4
  switch i32 %800, label %805 [
    i32 0, label %801
  ]

801:                                              ; preds = %799
  br label %802

802:                                              ; preds = %801
  %803 = load i32, ptr %69, align 4, !tbaa !9
  %804 = add i32 %803, 1
  store i32 %804, ptr %69, align 4, !tbaa !9
  br label %761, !llvm.loop !45

805:                                              ; preds = %799, %765
  call void @llvm.lifetime.end.p0(i64 4, ptr %69) #10
  br label %806

806:                                              ; preds = %805
  br label %868

807:                                              ; preds = %757
  call void @llvm.lifetime.start.p0(i64 4, ptr %72) #10
  store i32 0, ptr %72, align 4, !tbaa !9
  br label %808

808:                                              ; preds = %863, %807
  %809 = load i32, ptr %72, align 4, !tbaa !9
  %810 = load i32, ptr %32, align 4, !tbaa !9
  %811 = icmp ult i32 %809, %810
  br i1 %811, label %813, label %812

812:                                              ; preds = %808
  store i32 24, ptr %13, align 4
  br label %866

813:                                              ; preds = %808
  call void @llvm.lifetime.start.p0(i64 8, ptr %73) #10
  %814 = load i32, ptr %72, align 4, !tbaa !9
  %815 = zext i32 %814 to i64
  %816 = getelementptr inbounds [512 x float], ptr %47, i64 0, i64 %815
  %817 = load float, ptr %816, align 4, !tbaa !42
  %818 = fpext float %817 to double
  %819 = load double, ptr %48, align 8, !tbaa !35
  %820 = fdiv double %818, %819
  store double %820, ptr %73, align 8, !tbaa !35
  %821 = load double, ptr %73, align 8, !tbaa !35
  %822 = fcmp ole double %821, 0x3FF4CCCCC0000000
  br i1 %822, label %823, label %859

823:                                              ; preds = %813
  call void @llvm.lifetime.start.p0(i64 4, ptr %74) #10
  %824 = load i32, ptr %6, align 4, !tbaa !9
  %825 = and i32 %824, 512
  %826 = icmp ne i32 %825, 0
  br i1 %826, label %827, label %834

827:                                              ; preds = %823
  %828 = load i32, ptr %72, align 4, !tbaa !9
  %829 = zext i32 %828 to i64
  %830 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 %829
  %831 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %830, i32 0, i32 0
  %832 = load i32, ptr %831, align 16, !tbaa !20
  %833 = call noundef float @_ZN6basisuL21get_uastc_mode_weightEj(i32 noundef %832)
  br label %835

834:                                              ; preds = %823
  br label %835

835:                                              ; preds = %834, %827
  %836 = phi float [ %833, %827 ], [ 1.000000e+00, %834 ]
  store float %836, ptr %74, align 4, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 8, ptr %75) #10
  %837 = load i32, ptr %72, align 4, !tbaa !9
  %838 = zext i32 %837 to i64
  %839 = getelementptr inbounds [512 x i64], ptr %46, i64 0, i64 %838
  %840 = load i64, ptr %839, align 8, !tbaa !31
  %841 = uitofp i64 %840 to float
  %842 = load float, ptr %74, align 4, !tbaa !42
  %843 = fmul float %841, %842
  %844 = fptoui float %843 to i64
  store i64 %844, ptr %75, align 8, !tbaa !31
  %845 = load i64, ptr %75, align 8, !tbaa !31
  %846 = load i64, ptr %68, align 8, !tbaa !31
  %847 = icmp ult i64 %845, %846
  br i1 %847, label %848, label %855

848:                                              ; preds = %835
  %849 = load i64, ptr %75, align 8, !tbaa !31
  store i64 %849, ptr %68, align 8, !tbaa !31
  %850 = load i32, ptr %72, align 4, !tbaa !9
  store i32 %850, ptr %49, align 4, !tbaa !9
  %851 = load i64, ptr %68, align 8, !tbaa !31
  %852 = icmp ne i64 %851, 0
  br i1 %852, label %854, label %853

853:                                              ; preds = %848
  store i32 24, ptr %13, align 4
  br label %856

854:                                              ; preds = %848
  br label %855

855:                                              ; preds = %854, %835
  store i32 0, ptr %13, align 4
  br label %856

856:                                              ; preds = %855, %853
  call void @llvm.lifetime.end.p0(i64 8, ptr %75) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %74) #10
  %857 = load i32, ptr %13, align 4
  switch i32 %857, label %860 [
    i32 0, label %858
  ]

858:                                              ; preds = %856
  br label %859

859:                                              ; preds = %858, %813
  store i32 0, ptr %13, align 4
  br label %860

860:                                              ; preds = %859, %856
  call void @llvm.lifetime.end.p0(i64 8, ptr %73) #10
  %861 = load i32, ptr %13, align 4
  switch i32 %861, label %866 [
    i32 0, label %862
  ]

862:                                              ; preds = %860
  br label %863

863:                                              ; preds = %862
  %864 = load i32, ptr %72, align 4, !tbaa !9
  %865 = add i32 %864, 1
  store i32 %865, ptr %72, align 4, !tbaa !9
  br label %808, !llvm.loop !46

866:                                              ; preds = %860, %812
  call void @llvm.lifetime.end.p0(i64 4, ptr %72) #10
  br label %867

867:                                              ; preds = %866
  br label %868

868:                                              ; preds = %867, %806
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #10
  br label %869

869:                                              ; preds = %868, %751
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #10
  br label %870

870:                                              ; preds = %869, %556
  call void @llvm.lifetime.start.p0(i64 8, ptr %76) #10
  %871 = load i32, ptr %49, align 4, !tbaa !9
  %872 = sext i32 %871 to i64
  %873 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %22, i64 0, i64 %872
  store ptr %873, ptr %76, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %77) #10
  %874 = load ptr, ptr %76, align 8, !tbaa !5
  %875 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %874, i32 0, i32 0
  %876 = load i32, ptr %875, align 8, !tbaa !20
  store i32 %876, ptr %77, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %78) #10
  %877 = load ptr, ptr %76, align 8, !tbaa !5
  %878 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %877, i32 0, i32 2
  store ptr %878, ptr %78, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr %79) #10
  %879 = getelementptr inbounds [4 x [4 x %"class.basisu::color_rgba"]], ptr %79, i32 0, i32 0, i32 0
  %880 = getelementptr inbounds %"class.basisu::color_rgba", ptr %879, i64 16
  br label %881

881:                                              ; preds = %881, %870
  %882 = phi ptr [ %879, %870 ], [ %883, %881 ]
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %882)
  %883 = getelementptr inbounds %"class.basisu::color_rgba", ptr %882, i64 1
  %884 = icmp eq ptr %883, %880
  br i1 %884, label %885, label %881

885:                                              ; preds = %881
  call void @llvm.lifetime.start.p0(i64 1, ptr %80) #10
  %886 = load i32, ptr %77, align 4, !tbaa !9
  %887 = load ptr, ptr %76, align 8, !tbaa !5
  %888 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %887, i32 0, i32 1
  %889 = load i32, ptr %888, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %81) #10
  %890 = load ptr, ptr %76, align 8, !tbaa !5
  %891 = getelementptr inbounds %"struct.basisu::uastc_encode_results", ptr %890, i32 0, i32 3
  %892 = call i32 @_ZNK6basisu10color_rgba11get_color32Ev(ptr noundef nonnull align 1 dereferenceable(4) %891)
  %893 = getelementptr inbounds %"struct.basist::color32", ptr %81, i32 0, i32 0
  %894 = getelementptr inbounds %union.anon.2, ptr %893, i32 0, i32 0
  store i32 %892, ptr %894, align 4
  %895 = load ptr, ptr %78, align 8, !tbaa !5
  %896 = getelementptr inbounds [4 x [4 x %"class.basisu::color_rgba"]], ptr %79, i64 0, i64 0
  %897 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %896, i64 0, i64 0
  %898 = call noundef zeroext i1 @_ZN6basist12unpack_uastcEjjRKNS_7color32ERKNS_15astc_block_descEPS0_b(i32 noundef %886, i32 noundef %889, ptr noundef nonnull align 4 dereferenceable(4) %81, ptr noundef nonnull align 4 dereferenceable(104) %895, ptr noundef %897, i1 noundef zeroext false)
  call void @llvm.lifetime.end.p0(i64 4, ptr %81) #10
  %899 = zext i1 %898 to i8
  store i8 %899, ptr %80, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %82) #10
  store i8 0, ptr %82, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %83) #10
  store i8 0, ptr %83, align 1, !tbaa !11
  %900 = load i8, ptr %30, align 1, !tbaa !11, !range !18, !noundef !19
  %901 = trunc i8 %900 to i1
  br i1 %901, label %902, label %906

902:                                              ; preds = %885
  %903 = load ptr, ptr %76, align 8, !tbaa !5
  %904 = load ptr, ptr %7, align 8, !tbaa !5
  %905 = getelementptr inbounds [4 x [4 x %"class.basisu::color_rgba"]], ptr %79, i64 0, i64 0
  call void @_ZN6basisuL17compute_bc1_hintsERbS0_RKNS_20uastc_encode_resultsEPA4_KNS_10color_rgbaES7_(ptr noundef nonnull align 1 dereferenceable(1) %82, ptr noundef nonnull align 1 dereferenceable(1) %83, ptr noundef nonnull align 8 dereferenceable(128) %903, ptr noundef %904, ptr noundef %905)
  br label %906

906:                                              ; preds = %902, %885
  call void @llvm.lifetime.start.p0(i64 8, ptr %84) #10
  %907 = load i32, ptr %77, align 4, !tbaa !9
  %908 = zext i32 %907 to i64
  %909 = getelementptr inbounds [19 x i8], ptr @_ZN6basist22g_uastc_mode_has_alphaE, i64 0, i64 %908
  %910 = load i8, ptr %909, align 1, !tbaa !14
  %911 = icmp ne i8 %910, 0
  br i1 %911, label %912, label %959

912:                                              ; preds = %906
  %913 = load i32, ptr %77, align 4, !tbaa !9
  %914 = icmp ne i32 %913, 8
  br i1 %914, label %915, label %959

915:                                              ; preds = %912
  call void @llvm.lifetime.start.p0(i64 16, ptr %85) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %86) #10
  store i32 0, ptr %86, align 4, !tbaa !9
  br label %916

916:                                              ; preds = %935, %915
  %917 = load i32, ptr %86, align 4, !tbaa !9
  %918 = icmp ult i32 %917, 16
  br i1 %918, label %920, label %919

919:                                              ; preds = %916
  store i32 27, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %86) #10
  br label %938

920:                                              ; preds = %916
  %921 = load i32, ptr %86, align 4, !tbaa !9
  %922 = lshr i32 %921, 2
  %923 = zext i32 %922 to i64
  %924 = getelementptr inbounds [4 x [4 x %"class.basisu::color_rgba"]], ptr %79, i64 0, i64 %923
  %925 = load i32, ptr %86, align 4, !tbaa !9
  %926 = and i32 %925, 3
  %927 = zext i32 %926 to i64
  %928 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %924, i64 0, i64 %927
  %929 = getelementptr inbounds %"class.basisu::color_rgba", ptr %928, i32 0, i32 0
  %930 = getelementptr inbounds %struct.anon, ptr %929, i32 0, i32 3
  %931 = load i8, ptr %930, align 1, !tbaa !14
  %932 = load i32, ptr %86, align 4, !tbaa !9
  %933 = zext i32 %932 to i64
  %934 = getelementptr inbounds [16 x i8], ptr %85, i64 0, i64 %933
  store i8 %931, ptr %934, align 1, !tbaa !14
  br label %935

935:                                              ; preds = %920
  %936 = load i32, ptr %86, align 4, !tbaa !9
  %937 = add i32 %936, 1
  store i32 %937, ptr %86, align 4, !tbaa !9
  br label %916, !llvm.loop !47

938:                                              ; preds = %919
  call void @llvm.lifetime.start.p0(i64 12, ptr %87) #10
  call void @llvm.memset.p0.i64(ptr align 4 %87, i8 0, i64 12, i1 false)
  %939 = getelementptr inbounds [16 x i8], ptr %85, i64 0, i64 0
  %940 = load i32, ptr %27, align 4, !tbaa !9
  %941 = load i32, ptr %28, align 4, !tbaa !9
  %942 = call noundef i64 @_ZN6basisuL17uastc_pack_eac_a8ERNS_25uastc_pack_eac_a8_resultsEPKhjjjj(ptr noundef nonnull align 4 dereferenceable(12) %87, ptr noundef %939, i32 noundef 16, i32 noundef 0, i32 noundef %940, i32 noundef %941)
  %943 = getelementptr inbounds %"struct.basisu::uastc_pack_eac_a8_results", ptr %87, i32 0, i32 1
  %944 = load i32, ptr %943, align 4, !tbaa !48
  %945 = trunc i32 %944 to i16
  %946 = load i16, ptr %84, align 2
  %947 = and i16 %945, 15
  %948 = shl i16 %947, 8
  %949 = and i16 %946, -3841
  %950 = or i16 %949, %948
  store i16 %950, ptr %84, align 2
  %951 = getelementptr inbounds %"struct.basisu::uastc_pack_eac_a8_results", ptr %87, i32 0, i32 2
  %952 = load i32, ptr %951, align 4, !tbaa !50
  %953 = trunc i32 %952 to i16
  %954 = load i16, ptr %84, align 2
  %955 = and i16 %953, 15
  %956 = shl i16 %955, 12
  %957 = and i16 %954, 4095
  %958 = or i16 %957, %956
  store i16 %958, ptr %84, align 2
  call void @llvm.lifetime.end.p0(i64 12, ptr %87) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %85) #10
  br label %960

959:                                              ; preds = %912, %906
  call void @llvm.memset.p0.i64(ptr align 2 %84, i8 0, i64 8, i1 false)
  br label %960

960:                                              ; preds = %959, %938
  call void @llvm.lifetime.start.p0(i64 8, ptr %88) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %89) #10
  store i32 0, ptr %89, align 4, !tbaa !9
  %961 = load ptr, ptr %76, align 8, !tbaa !5
  %962 = load ptr, ptr %7, align 8, !tbaa !5
  %963 = getelementptr inbounds [4 x [4 x %"class.basisu::color_rgba"]], ptr %79, i64 0, i64 0
  %964 = load i32, ptr %19, align 4, !tbaa !9
  %965 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN6basisuL18compute_etc1_hintsERNS_9etc_blockERjRKNS_20uastc_encode_resultsEPA4_KNS_10color_rgbaES9_ij(ptr noundef nonnull align 8 dereferenceable(8) %88, ptr noundef nonnull align 4 dereferenceable(4) %89, ptr noundef nonnull align 8 dereferenceable(128) %961, ptr noundef %962, ptr noundef %963, i32 noundef %964, i32 noundef %965)
  %966 = load ptr, ptr %5, align 8, !tbaa !5
  %967 = load ptr, ptr %76, align 8, !tbaa !5
  %968 = load i32, ptr %89, align 4, !tbaa !9
  %969 = load i8, ptr %82, align 1, !tbaa !11, !range !18, !noundef !19
  %970 = trunc i8 %969 to i1
  %971 = load i8, ptr %83, align 1, !tbaa !11, !range !18, !noundef !19
  %972 = trunc i8 %971 to i1
  call void @_ZN6basisu10pack_uastcERN6basist11uastc_blockERKNS_20uastc_encode_resultsERKNS_9etc_blockEjRKNS_12eac_a8_blockEbb(ptr noundef nonnull align 8 dereferenceable(16) %966, ptr noundef nonnull align 8 dereferenceable(128) %967, ptr noundef nonnull align 8 dereferenceable(8) %88, i32 noundef %968, ptr noundef nonnull align 2 dereferenceable(8) %84, i1 noundef zeroext %970, i1 noundef zeroext %972)
  call void @llvm.lifetime.end.p0(i64 4, ptr %89) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %88) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %84) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %83) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %82) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %80) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr %79) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %78) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %77) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %76) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #10
  call void @llvm.lifetime.end.p0(i64 2048, ptr %47) #10
  call void @llvm.lifetime.end.p0(i64 4096, ptr %46) #10
  call void @llvm.lifetime.end.p0(i64 152, ptr %45) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %34) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %33) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 65536, ptr %22) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #10
  store i32 0, ptr %13, align 4
  br label %973

973:                                              ; preds = %960, %187
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  %974 = load i32, ptr %13, align 4
  switch i32 %974, label %976 [
    i32 0, label %975
    i32 1, label %975
  ]

975:                                              ; preds = %973, %973
  ret void

976:                                              ; preds = %973
  unreachable
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK6basisu10color_rgbaneERKS0_(ptr noundef nonnull align 1 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(4)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu20uastc_encode_resultsC2Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #5 align 2

declare noundef i64 @_ZN6basisu27pack_etc1_block_solid_colorERNS_9etc_blockEPKh(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL11astc_mode15EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32)) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL16astc_mode9_or_16EjPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEj(i32 noundef, ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32), i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL17astc_mode11_or_17EjPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(i32 noundef, ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32)) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL16astc_mode0_or_18EjPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEPKh(i32 noundef, ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32), ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL10astc_mode1EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32)) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL10astc_mode2EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEb(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32), i1 noundef zeroext) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL10astc_mode3EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEb(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32), i1 noundef zeroext) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL10astc_mode4EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEb(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32), i1 noundef zeroext) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL10astc_mode5EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32)) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL10astc_mode6EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32)) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL10astc_mode7EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEb(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32), i1 noundef zeroext) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL11astc_mode10EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32)) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL11astc_mode12EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32)) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL11astc_mode13EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32)) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL11astc_mode14EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32)) #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4)) unnamed_addr #7 align 2

declare noundef zeroext i1 @_ZN6basist12unpack_uastcEjjRKNS_7color32ERKNS_15astc_block_descEPS0_b(i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(104), ptr noundef, i1 noundef zeroext) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZNK6basisu10color_rgba11get_color32Ev(ptr noundef nonnull align 1 dereferenceable(4)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN6basisu14color_distanceERKNS_10color_rgbaES2_b(ptr noundef nonnull align 1 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(4), i1 noundef zeroext) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN6basisuL17color_distance_laERKNS_10color_rgbaES2_(ptr noundef nonnull align 1 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(4)) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basist20unpacked_uastc_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(152)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN6basisuL19compute_block_errorEPA4_KNS_10color_rgbaES3_RmS4_S4_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #8

declare noundef zeroext i1 @_ZN6basist22transcode_uastc_to_bc7ERKNS_20unpacked_uastc_blockERNS_24bc7_optimization_resultsE(ptr noundef nonnull align 4 dereferenceable(152), ptr noundef nonnull align 4 dereferenceable(96)) #6

declare void @_ZN6basist16encode_bc7_blockEPvPKNS_24bc7_optimization_resultsE(ptr noundef, ptr noundef) #6

declare noundef zeroext i1 @_ZN6basisu12unpack_blockENS_14texture_formatEPKvPNS_10color_rgbaE(i32 noundef, ptr noundef, ptr noundef) #6

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef float @_ZN6basisuL21get_uastc_mode_weightEj(i32 noundef) #7

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL17compute_bc1_hintsERbS0_RKNS_20uastc_encode_resultsEPA4_KNS_10color_rgbaES7_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(128), ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN6basisuL17uastc_pack_eac_a8ERNS_25uastc_pack_eac_a8_resultsEPKhjjjj(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL18compute_etc1_hintsERNS_9etc_blockERjRKNS_20uastc_encode_resultsEPA4_KNS_10color_rgbaES9_ij(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(128), ptr noundef, ptr noundef, i32 noundef, i32 noundef) #0

attributes #0 = { 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 #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "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 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 #8 = { 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 #9 = { 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 #10 = { nounwind }
attributes #11 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i64 0, i64 4, !14}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!21, !10, i64 0}
!21 = !{!"_ZTSN6basisu20uastc_encode_resultsE", !10, i64 0, !10, i64 4, !22, i64 8, !23, i64 112, !24, i64 120}
!22 = !{!"_ZTSN6basist15astc_block_descE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !12, i64 20, !7, i64 21, !7, i64 39}
!23 = !{!"_ZTSN6basisu10color_rgbaE", !7, i64 0}
!24 = !{!"long", !7, i64 0}
!25 = !{!21, !24, i64 120}
!26 = !{!21, !10, i64 4}
!27 = !{!28, !10, i64 0}
!28 = !{!"_ZTSN6basisu28bc7enc_compress_block_paramsE", !10, i64 0, !7, i64 4, !10, i64 20, !7, i64 24, !10, i64 28}
!29 = !{!28, !10, i64 28}
!30 = !{!28, !10, i64 20}
!31 = !{!24, !24, i64 0}
!32 = distinct !{!32, !16}
!33 = distinct !{!33, !16}
!34 = distinct !{!34, !16}
!35 = !{!36, !36, i64 0}
!36 = !{!"double", !7, i64 0}
!37 = !{!38, !10, i64 104}
!38 = !{!"_ZTSN6basist20unpacked_uastc_blockE", !22, i64 0, !10, i64 104, !10, i64 108, !39, i64 112, !12, i64 116, !12, i64 117, !12, i64 118, !12, i64 119, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148}
!39 = !{!"_ZTSN6basist7color32E", !7, i64 0}
!40 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 4, !9, i64 12, i64 4, !9, i64 16, i64 4, !9, i64 20, i64 1, !11, i64 21, i64 18, !14, i64 39, i64 64, !14}
!41 = !{!38, !10, i64 108}
!42 = !{!43, !43, i64 0}
!43 = !{!"float", !7, i64 0}
!44 = distinct !{!44, !16}
!45 = distinct !{!45, !16}
!46 = distinct !{!46, !16}
!47 = distinct !{!47, !16}
!48 = !{!49, !10, i64 4}
!49 = !{!"_ZTSN6basisu25uastc_pack_eac_a8_resultsE", !10, i64 0, !10, i64 4, !10, i64 8}
!50 = !{!49, !10, i64 8}


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

%"class.basisu::color_rgba" = type { %union.anon }
%union.anon = type { [4 x i8] }
%"struct.basisu::uastc_encode_results" = type { i32, i32, %"struct.basist::astc_block_desc", %"class.basisu::color_rgba", i64 }
%"struct.basist::astc_block_desc" = type { i32, i32, i32, i32, i32, i8, [18 x i8], [64 x i8] }
%"struct.basisu::etc_block" = type { %union.anon.0 }
%union.anon.0 = type { i64 }
%"struct.basisu::eac_a8_block" = type { i16, [6 x i8] }
%"struct.basisu::bc7enc_compress_block_params" = type { i32, [4 x i32], i32, i8, i32 }
%"struct.basist::color32" = type { %union.anon.2 }
%union.anon.2 = type { i32 }
%"struct.basist::unpacked_uastc_block" = type { %"struct.basist::astc_block_desc", i32, i32, %"struct.basist::color32", i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32 }
%"struct.basist::bc7_optimization_results" = type { i32, i32, [16 x i8], [16 x i8], [3 x %"struct.basist::color_quad_u8"], [3 x %"struct.basist::color_quad_u8"], [3 x [2 x i32]], i32, i32 }
%"struct.basist::color_quad_u8" = type { [4 x i8] }
%"struct.basist::bc7_block" = type { [2 x i64] }
%"struct.basisu::uastc_pack_eac_a8_results" = type { i32, i32, i32 }

@_ZN6basist22g_uastc_mode_has_alphaE = external local_unnamed_addr constant [19 x i8], align 16
@.str.3 = external hidden unnamed_addr constant [116 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__._ZN6basisu12encode_uastcEPKhRN6basist11uastc_blockEj = external hidden unnamed_addr constant [68 x i8], align 1
@_ZN6basist18g_uastc_mode_is_laE = external local_unnamed_addr constant [19 x i8], align 16

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu10pack_uastcERN6basist11uastc_blockERKNS_20uastc_encode_resultsERKNS_9etc_blockEjRKNS_12eac_a8_blockEbb(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, ptr noundef nonnull align 2 dereferenceable(8), i1 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #0

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6basisu12encode_uastcEPKhRN6basist11uastc_blockEj(ptr noundef nonnull %0, ptr noundef nonnull align 8 dereferenceable(16) %1, i32 noundef %2) local_unnamed_addr #0 {
.preheader372:
  %3 = alloca %"class.basisu::color_rgba", align 4
  %4 = alloca %"struct.basisu::uastc_encode_results", align 8
  %5 = alloca %"struct.basisu::etc_block", align 8
  %6 = alloca %"struct.basisu::eac_a8_block", align 2
  %7 = alloca [512 x %"struct.basisu::uastc_encode_results"], align 16
  %8 = alloca i32, align 4
  %9 = alloca %"struct.basisu::bc7enc_compress_block_params", align 16
  %10 = alloca [16 x %"class.basisu::color_rgba"], align 16
  %11 = alloca %"struct.basist::color32", align 4
  %12 = alloca [16 x %"class.basisu::color_rgba"], align 16
  %13 = alloca %"struct.basist::color32", align 4
  %14 = alloca %"struct.basist::unpacked_uastc_block", align 4
  %15 = alloca [512 x i64], align 16
  %16 = alloca [512 x float], align 16
  %17 = alloca [4 x [4 x %"class.basisu::color_rgba"]], align 16
  %18 = alloca %"struct.basist::color32", align 4
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca %"struct.basist::bc7_optimization_results", align 4
  %23 = alloca %"struct.basist::bc7_block", align 8
  %24 = alloca [4 x [4 x %"class.basisu::color_rgba"]], align 16
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca [4 x [4 x %"class.basisu::color_rgba"]], align 16
  %29 = alloca %"struct.basist::color32", align 4
  %30 = alloca i8, align 1
  %31 = alloca i8, align 1
  %32 = alloca %"struct.basisu::eac_a8_block", align 8
  %33 = alloca [16 x i8], align 16
  %34 = alloca %"struct.basisu::uastc_pack_eac_a8_results", align 4
  %35 = alloca %"struct.basisu::etc_block", align 8
  %36 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #10
  %37 = load i32, ptr %0, align 1
  store i32 %37, ptr %3, align 4, !tbaa !5
  %.not305 = icmp ult i32 %37, -16777216
  %38 = call noundef zeroext i1 @_ZNK6basisu10color_rgbaneERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %0, ptr noundef nonnull align 1 dereferenceable(4) %3)
  %39 = load i8, ptr %0, align 1, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %0, i64 1
  %41 = load i8, ptr %40, align 1, !tbaa !5
  %.not306 = icmp eq i8 %39, %41
  br i1 %.not306, label %42, label %45

42:                                               ; preds = %.preheader372
  %43 = getelementptr inbounds i8, ptr %0, i64 2
  %44 = load i8, ptr %43, align 1, !tbaa !5
  %.not307 = icmp eq i8 %39, %44
  br i1 %.not307, label %46, label %45

45:                                               ; preds = %42, %.preheader372
  br label %46

46:                                               ; preds = %42, %45
  %.2214 = phi i8 [ 0, %45 ], [ 1, %42 ]
  %47 = getelementptr inbounds i8, ptr %0, i64 4
  %48 = getelementptr inbounds i8, ptr %0, i64 7
  %49 = load i8, ptr %48, align 1, !tbaa !5
  %.not305.1 = icmp ne i8 %49, -1
  %50 = call noundef zeroext i1 @_ZNK6basisu10color_rgbaneERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %47, ptr noundef nonnull align 1 dereferenceable(4) %3)
  %.2.1.demorgan = or i1 %50, %38
  %51 = load i8, ptr %47, align 1, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %0, i64 5
  %53 = load i8, ptr %52, align 1, !tbaa !5
  %.not306.1 = icmp eq i8 %51, %53
  br i1 %.not306.1, label %54, label %57

54:                                               ; preds = %46
  %55 = getelementptr inbounds i8, ptr %0, i64 6
  %56 = load i8, ptr %55, align 1, !tbaa !5
  %.not307.1 = icmp eq i8 %51, %56
  br i1 %.not307.1, label %58, label %57

57:                                               ; preds = %54, %46
  br label %58

58:                                               ; preds = %57, %54
  %.2214.1 = phi i8 [ 0, %57 ], [ %.2214, %54 ]
  %59 = getelementptr inbounds i8, ptr %0, i64 8
  %60 = getelementptr inbounds i8, ptr %0, i64 11
  %61 = load i8, ptr %60, align 1, !tbaa !5
  %.not305.2 = icmp ne i8 %61, -1
  %62 = call noundef zeroext i1 @_ZNK6basisu10color_rgbaneERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %59, ptr noundef nonnull align 1 dereferenceable(4) %3)
  %.2.2.demorgan = or i1 %62, %.2.1.demorgan
  %63 = load i8, ptr %59, align 1, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %0, i64 9
  %65 = load i8, ptr %64, align 1, !tbaa !5
  %.not306.2 = icmp eq i8 %63, %65
  br i1 %.not306.2, label %66, label %69

66:                                               ; preds = %58
  %67 = getelementptr inbounds i8, ptr %0, i64 10
  %68 = load i8, ptr %67, align 1, !tbaa !5
  %.not307.2 = icmp eq i8 %63, %68
  br i1 %.not307.2, label %70, label %69

69:                                               ; preds = %66, %58
  br label %70

70:                                               ; preds = %69, %66
  %.2214.2 = phi i8 [ 0, %69 ], [ %.2214.1, %66 ]
  %71 = getelementptr inbounds i8, ptr %0, i64 12
  %72 = getelementptr inbounds i8, ptr %0, i64 15
  %73 = load i8, ptr %72, align 1, !tbaa !5
  %.not305.3 = icmp ne i8 %73, -1
  %74 = call noundef zeroext i1 @_ZNK6basisu10color_rgbaneERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %71, ptr noundef nonnull align 1 dereferenceable(4) %3)
  %.2.3.demorgan = or i1 %74, %.2.2.demorgan
  %75 = load i8, ptr %71, align 1, !tbaa !5
  %76 = getelementptr inbounds i8, ptr %0, i64 13
  %77 = load i8, ptr %76, align 1, !tbaa !5
  %.not306.3 = icmp eq i8 %75, %77
  br i1 %.not306.3, label %78, label %81

78:                                               ; preds = %70
  %79 = getelementptr inbounds i8, ptr %0, i64 14
  %80 = load i8, ptr %79, align 1, !tbaa !5
  %.not307.3 = icmp eq i8 %75, %80
  br i1 %.not307.3, label %.preheader372.1, label %81

81:                                               ; preds = %78, %70
  br label %.preheader372.1

.preheader372.1:                                  ; preds = %81, %78
  %.2214.3 = phi i8 [ 0, %81 ], [ %.2214.2, %78 ]
  %82 = getelementptr inbounds i8, ptr %0, i64 16
  %83 = getelementptr inbounds i8, ptr %0, i64 19
  %84 = load i8, ptr %83, align 1, !tbaa !5
  %.not305.1417 = icmp ne i8 %84, -1
  %85 = call noundef zeroext i1 @_ZNK6basisu10color_rgbaneERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %82, ptr noundef nonnull align 1 dereferenceable(4) %3)
  %.2.1420.demorgan = or i1 %85, %.2.3.demorgan
  %86 = load i8, ptr %82, align 1, !tbaa !5
  %87 = getelementptr inbounds i8, ptr %0, i64 17
  %88 = load i8, ptr %87, align 1, !tbaa !5
  %.not306.1421 = icmp eq i8 %86, %88
  br i1 %.not306.1421, label %89, label %92

89:                                               ; preds = %.preheader372.1
  %90 = getelementptr inbounds i8, ptr %0, i64 18
  %91 = load i8, ptr %90, align 1, !tbaa !5
  %.not307.1422 = icmp eq i8 %86, %91
  br i1 %.not307.1422, label %93, label %92

92:                                               ; preds = %89, %.preheader372.1
  br label %93

93:                                               ; preds = %92, %89
  %.2214.1423 = phi i8 [ 0, %92 ], [ %.2214.3, %89 ]
  %94 = getelementptr inbounds i8, ptr %0, i64 20
  %95 = getelementptr inbounds i8, ptr %0, i64 23
  %96 = load i8, ptr %95, align 1, !tbaa !5
  %.not305.1.1 = icmp ne i8 %96, -1
  %97 = call noundef zeroext i1 @_ZNK6basisu10color_rgbaneERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %94, ptr noundef nonnull align 1 dereferenceable(4) %3)
  %.2.1.1.demorgan = or i1 %97, %.2.1420.demorgan
  %98 = load i8, ptr %94, align 1, !tbaa !5
  %99 = getelementptr inbounds i8, ptr %0, i64 21
  %100 = load i8, ptr %99, align 1, !tbaa !5
  %.not306.1.1 = icmp eq i8 %98, %100
  br i1 %.not306.1.1, label %101, label %104

101:                                              ; preds = %93
  %102 = getelementptr inbounds i8, ptr %0, i64 22
  %103 = load i8, ptr %102, align 1, !tbaa !5
  %.not307.1.1 = icmp eq i8 %98, %103
  br i1 %.not307.1.1, label %105, label %104

104:                                              ; preds = %101, %93
  br label %105

105:                                              ; preds = %104, %101
  %.2214.1.1 = phi i8 [ 0, %104 ], [ %.2214.1423, %101 ]
  %106 = getelementptr inbounds i8, ptr %0, i64 24
  %107 = getelementptr inbounds i8, ptr %0, i64 27
  %108 = load i8, ptr %107, align 1, !tbaa !5
  %.not305.2.1 = icmp ne i8 %108, -1
  %109 = call noundef zeroext i1 @_ZNK6basisu10color_rgbaneERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %106, ptr noundef nonnull align 1 dereferenceable(4) %3)
  %.2.2.1.demorgan = or i1 %109, %.2.1.1.demorgan
  %110 = load i8, ptr %106, align 1, !tbaa !5
  %111 = getelementptr inbounds i8, ptr %0, i64 25
  %112 = load i8, ptr %111, align 1, !tbaa !5
  %.not306.2.1 = icmp eq i8 %110, %112
  br i1 %.not306.2.1, label %113, label %116

113:                                              ; preds = %105
  %114 = getelementptr inbounds i8, ptr %0, i64 26
  %115 = load i8, ptr %114, align 1, !tbaa !5
  %.not307.2.1 = icmp eq i8 %110, %115
  br i1 %.not307.2.1, label %117, label %116

116:                                              ; preds = %113, %105
  br label %117

117:                                              ; preds = %116, %113
  %.2214.2.1 = phi i8 [ 0, %116 ], [ %.2214.1.1, %113 ]
  %118 = getelementptr inbounds i8, ptr %0, i64 28
  %119 = getelementptr inbounds i8, ptr %0, i64 31
  %120 = load i8, ptr %119, align 1, !tbaa !5
  %.not305.3.1 = icmp ne i8 %120, -1
  %121 = call noundef zeroext i1 @_ZNK6basisu10color_rgbaneERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %118, ptr noundef nonnull align 1 dereferenceable(4) %3)
  %.2.3.1.demorgan = or i1 %121, %.2.2.1.demorgan
  %122 = load i8, ptr %118, align 1, !tbaa !5
  %123 = getelementptr inbounds i8, ptr %0, i64 29
  %124 = load i8, ptr %123, align 1, !tbaa !5
  %.not306.3.1 = icmp eq i8 %122, %124
  br i1 %.not306.3.1, label %125, label %128

125:                                              ; preds = %117
  %126 = getelementptr inbounds i8, ptr %0, i64 30
  %127 = load i8, ptr %126, align 1, !tbaa !5
  %.not307.3.1 = icmp eq i8 %122, %127
  br i1 %.not307.3.1, label %.preheader372.2, label %128

128:                                              ; preds = %125, %117
  br label %.preheader372.2

.preheader372.2:                                  ; preds = %128, %125
  %.2214.3.1 = phi i8 [ 0, %128 ], [ %.2214.2.1, %125 ]
  %129 = getelementptr inbounds i8, ptr %0, i64 32
  %130 = getelementptr inbounds i8, ptr %0, i64 35
  %131 = load i8, ptr %130, align 1, !tbaa !5
  %.not305.2424 = icmp ne i8 %131, -1
  %132 = call noundef zeroext i1 @_ZNK6basisu10color_rgbaneERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %129, ptr noundef nonnull align 1 dereferenceable(4) %3)
  %133 = or i1 %132, %.2.3.1.demorgan
  %134 = load i8, ptr %129, align 1, !tbaa !5
  %135 = getelementptr inbounds i8, ptr %0, i64 33
  %136 = load i8, ptr %135, align 1, !tbaa !5
  %.not306.2428 = icmp eq i8 %134, %136
  br i1 %.not306.2428, label %137, label %140

137:                                              ; preds = %.preheader372.2
  %138 = getelementptr inbounds i8, ptr %0, i64 34
  %139 = load i8, ptr %138, align 1, !tbaa !5
  %.not307.2429 = icmp eq i8 %134, %139
  br i1 %.not307.2429, label %141, label %140

140:                                              ; preds = %137, %.preheader372.2
  br label %141

141:                                              ; preds = %140, %137
  %.2214.2430 = phi i8 [ 0, %140 ], [ %.2214.3.1, %137 ]
  %142 = getelementptr inbounds i8, ptr %0, i64 36
  %143 = getelementptr inbounds i8, ptr %0, i64 39
  %144 = load i8, ptr %143, align 1, !tbaa !5
  %.not305.1.2 = icmp ne i8 %144, -1
  %145 = call noundef zeroext i1 @_ZNK6basisu10color_rgbaneERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %142, ptr noundef nonnull align 1 dereferenceable(4) %3)
  %146 = load i8, ptr %142, align 1, !tbaa !5
  %147 = getelementptr inbounds i8, ptr %0, i64 37
  %148 = load i8, ptr %147, align 1, !tbaa !5
  %.not306.1.2 = icmp eq i8 %146, %148
  br i1 %.not306.1.2, label %149, label %152

149:                                              ; preds = %141
  %150 = getelementptr inbounds i8, ptr %0, i64 38
  %151 = load i8, ptr %150, align 1, !tbaa !5
  %.not307.1.2 = icmp eq i8 %146, %151
  br i1 %.not307.1.2, label %153, label %152

152:                                              ; preds = %149, %141
  br label %153

153:                                              ; preds = %152, %149
  %.2214.1.2 = phi i8 [ 0, %152 ], [ %.2214.2430, %149 ]
  %154 = getelementptr inbounds i8, ptr %0, i64 40
  %155 = getelementptr inbounds i8, ptr %0, i64 43
  %156 = load i8, ptr %155, align 1, !tbaa !5
  %.not305.2.2 = icmp ne i8 %156, -1
  %157 = call noundef zeroext i1 @_ZNK6basisu10color_rgbaneERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %154, ptr noundef nonnull align 1 dereferenceable(4) %3)
  %158 = or i1 %157, %145
  %159 = load i8, ptr %154, align 1, !tbaa !5
  %160 = getelementptr inbounds i8, ptr %0, i64 41
  %161 = load i8, ptr %160, align 1, !tbaa !5
  %.not306.2.2 = icmp eq i8 %159, %161
  br i1 %.not306.2.2, label %162, label %165

162:                                              ; preds = %153
  %163 = getelementptr inbounds i8, ptr %0, i64 42
  %164 = load i8, ptr %163, align 1, !tbaa !5
  %.not307.2.2 = icmp eq i8 %159, %164
  br i1 %.not307.2.2, label %166, label %165

165:                                              ; preds = %162, %153
  br label %166

166:                                              ; preds = %165, %162
  %.2214.2.2 = phi i8 [ 0, %165 ], [ %.2214.1.2, %162 ]
  %167 = getelementptr inbounds i8, ptr %0, i64 44
  %168 = getelementptr inbounds i8, ptr %0, i64 47
  %169 = load i8, ptr %168, align 1, !tbaa !5
  %.not305.3.2 = icmp ne i8 %169, -1
  %170 = call noundef zeroext i1 @_ZNK6basisu10color_rgbaneERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %167, ptr noundef nonnull align 1 dereferenceable(4) %3)
  %171 = or i1 %170, %158
  %172 = load i8, ptr %167, align 1, !tbaa !5
  %173 = getelementptr inbounds i8, ptr %0, i64 45
  %174 = load i8, ptr %173, align 1, !tbaa !5
  %.not306.3.2 = icmp eq i8 %172, %174
  br i1 %.not306.3.2, label %175, label %178

175:                                              ; preds = %166
  %176 = getelementptr inbounds i8, ptr %0, i64 46
  %177 = load i8, ptr %176, align 1, !tbaa !5
  %.not307.3.2 = icmp eq i8 %172, %177
  br i1 %.not307.3.2, label %.preheader372.3, label %178

178:                                              ; preds = %175, %166
  br label %.preheader372.3

.preheader372.3:                                  ; preds = %178, %175
  %.2214.3.2 = phi i8 [ 0, %178 ], [ %.2214.2.2, %175 ]
  %179 = getelementptr inbounds i8, ptr %0, i64 48
  %180 = getelementptr inbounds i8, ptr %0, i64 51
  %181 = load i8, ptr %180, align 1, !tbaa !5
  %.not305.3431 = icmp ne i8 %181, -1
  %182 = call noundef zeroext i1 @_ZNK6basisu10color_rgbaneERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %179, ptr noundef nonnull align 1 dereferenceable(4) %3)
  %183 = or i1 %182, %171
  %184 = load i8, ptr %179, align 1, !tbaa !5
  %185 = getelementptr inbounds i8, ptr %0, i64 49
  %186 = load i8, ptr %185, align 1, !tbaa !5
  %.not306.3435 = icmp eq i8 %184, %186
  br i1 %.not306.3435, label %187, label %190

187:                                              ; preds = %.preheader372.3
  %188 = getelementptr inbounds i8, ptr %0, i64 50
  %189 = load i8, ptr %188, align 1, !tbaa !5
  %.not307.3436 = icmp eq i8 %184, %189
  br i1 %.not307.3436, label %191, label %190

190:                                              ; preds = %187, %.preheader372.3
  br label %191

191:                                              ; preds = %190, %187
  %.2214.3437 = phi i8 [ 0, %190 ], [ %.2214.3.2, %187 ]
  %192 = getelementptr inbounds i8, ptr %0, i64 52
  %193 = getelementptr inbounds i8, ptr %0, i64 55
  %194 = load i8, ptr %193, align 1, !tbaa !5
  %.not305.1.3 = icmp ne i8 %194, -1
  %195 = call noundef zeroext i1 @_ZNK6basisu10color_rgbaneERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %192, ptr noundef nonnull align 1 dereferenceable(4) %3)
  %196 = or i1 %195, %183
  %197 = load i8, ptr %192, align 1, !tbaa !5
  %198 = getelementptr inbounds i8, ptr %0, i64 53
  %199 = load i8, ptr %198, align 1, !tbaa !5
  %.not306.1.3 = icmp eq i8 %197, %199
  br i1 %.not306.1.3, label %200, label %203

200:                                              ; preds = %191
  %201 = getelementptr inbounds i8, ptr %0, i64 54
  %202 = load i8, ptr %201, align 1, !tbaa !5
  %.not307.1.3 = icmp eq i8 %197, %202
  br i1 %.not307.1.3, label %204, label %203

203:                                              ; preds = %200, %191
  br label %204

204:                                              ; preds = %203, %200
  %.2214.1.3 = phi i8 [ 0, %203 ], [ %.2214.3437, %200 ]
  %205 = getelementptr inbounds i8, ptr %0, i64 56
  %206 = getelementptr inbounds i8, ptr %0, i64 59
  %207 = load i8, ptr %206, align 1, !tbaa !5
  %.not305.2.3 = icmp ne i8 %207, -1
  %208 = call noundef zeroext i1 @_ZNK6basisu10color_rgbaneERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %205, ptr noundef nonnull align 1 dereferenceable(4) %3)
  %209 = or i1 %208, %196
  %210 = load i8, ptr %205, align 1, !tbaa !5
  %211 = getelementptr inbounds i8, ptr %0, i64 57
  %212 = load i8, ptr %211, align 1, !tbaa !5
  %.not306.2.3 = icmp eq i8 %210, %212
  br i1 %.not306.2.3, label %213, label %216

213:                                              ; preds = %204
  %214 = getelementptr inbounds i8, ptr %0, i64 58
  %215 = load i8, ptr %214, align 1, !tbaa !5
  %.not307.2.3 = icmp eq i8 %210, %215
  br i1 %.not307.2.3, label %217, label %216

216:                                              ; preds = %213, %204
  br label %217

217:                                              ; preds = %216, %213
  %.2214.2.3 = phi i8 [ 0, %216 ], [ %.2214.1.3, %213 ]
  %218 = getelementptr inbounds i8, ptr %0, i64 60
  %219 = getelementptr inbounds i8, ptr %0, i64 63
  %220 = load i8, ptr %219, align 1, !tbaa !5
  %.not305.3.3 = icmp ne i8 %220, -1
  %221 = select i1 %.not305.3.3, i1 true, i1 %.not305.2.3
  %222 = select i1 %221, i1 true, i1 %.not305.1.3
  %223 = select i1 %222, i1 true, i1 %.not305.3431
  %224 = select i1 %223, i1 true, i1 %.not305.3.2
  %225 = select i1 %224, i1 true, i1 %.not305.2.2
  %226 = select i1 %225, i1 true, i1 %.not305.1.2
  %227 = select i1 %226, i1 true, i1 %.not305.2424
  %228 = select i1 %227, i1 true, i1 %.not305.3.1
  %229 = select i1 %228, i1 true, i1 %.not305.2.1
  %230 = select i1 %229, i1 true, i1 %.not305.1.1
  %231 = select i1 %230, i1 true, i1 %.not305.1417
  %232 = select i1 %231, i1 true, i1 %.not305.3
  %233 = select i1 %232, i1 true, i1 %.not305.2
  %234 = select i1 %233, i1 true, i1 %.not305.1
  %narrow = select i1 %234, i1 true, i1 %.not305
  %235 = call noundef zeroext i1 @_ZNK6basisu10color_rgbaneERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %218, ptr noundef nonnull align 1 dereferenceable(4) %3)
  %236 = or i1 %235, %209
  %237 = select i1 %236, i1 true, i1 %133
  %238 = load i8, ptr %218, align 1, !tbaa !5
  %239 = getelementptr inbounds i8, ptr %0, i64 61
  %240 = load i8, ptr %239, align 1, !tbaa !5
  %.not306.3.3 = icmp eq i8 %238, %240
  br i1 %.not306.3.3, label %241, label %244

241:                                              ; preds = %217
  %242 = getelementptr inbounds i8, ptr %0, i64 62
  %243 = load i8, ptr %242, align 1, !tbaa !5
  %.not307.3.3 = icmp eq i8 %238, %243
  br i1 %.not307.3.3, label %245, label %244

244:                                              ; preds = %241, %217
  br label %245

245:                                              ; preds = %244, %241
  %.2214.3.3 = phi i8 [ 0, %244 ], [ %.2214.2.3, %241 ]
  br i1 %237, label %253, label %246

246:                                              ; preds = %245
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %4) #10
  call void @_ZN6basisu20uastc_encode_resultsC2Ev(ptr noundef nonnull align 8 dereferenceable(128) %4)
  store i32 8, ptr %4, align 8, !tbaa !8
  %247 = getelementptr inbounds i8, ptr %4, i64 120
  store i64 0, ptr %247, align 8, !tbaa !15
  %248 = getelementptr inbounds i8, ptr %4, i64 4
  store i32 0, ptr %248, align 4, !tbaa !16
  %249 = getelementptr inbounds i8, ptr %4, i64 112
  %250 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %250, ptr %249, align 8, !tbaa !5
  %251 = getelementptr inbounds i8, ptr %4, i64 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(104) %251, i8 0, i64 104, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #10
  %252 = call noundef i64 @_ZN6basisu27pack_etc1_block_solid_colorERNS_9etc_blockEPKh(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #10
  store i16 4096, ptr %6, align 2
  call void @_ZN6basisu10pack_uastcERN6basist11uastc_blockERKNS_20uastc_encode_resultsERKNS_9etc_blockEjRKNS_12eac_a8_blockEbb(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(128) %4, ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef 0, ptr noundef nonnull align 2 dereferenceable(8) %6, i1 noundef zeroext false, i1 noundef zeroext false)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %4) #10
  br label %623

253:                                              ; preds = %245
  %254 = and i32 %2, 8
  %255 = and i32 %2, 24
  call void @llvm.lifetime.start.p0(i64 65536, ptr nonnull %7) #10
  br label %256

256:                                              ; preds = %256, %253
  %.idx = phi i64 [ 0, %253 ], [ %.add, %256 ]
  %.ptr = getelementptr inbounds i8, ptr %7, i64 %.idx
  call void @_ZN6basisu20uastc_encode_resultsC2Ev(ptr noundef nonnull align 8 dereferenceable(128) %.ptr)
  %.add = add nuw nsw i64 %.idx, 128
  %257 = icmp eq i64 %.add, 65536
  br i1 %257, label %258, label %256

258:                                              ; preds = %256
  %259 = and i32 %2, 7
  %.not = icmp eq i32 %254, 0
  %260 = icmp eq i32 %255, 16
  %261 = call noundef i32 @_ZN6basisu6clampiEiii(i32 noundef %259, i32 noundef 0, i32 noundef 4)
  switch i32 %261, label %.thread [
    i32 0, label %265
    i32 1, label %262
    i32 2, label %263
    i32 3, label %264
  ]

262:                                              ; preds = %258
  br label %.thread

263:                                              ; preds = %258
  br label %.thread

264:                                              ; preds = %258
  br label %.thread

.thread:                                          ; preds = %258, %264, %263, %262
  %.0254.ph = phi i32 [ 1, %262 ], [ 1, %263 ], [ 2, %264 ], [ 2, %258 ]
  %.0236.ph = phi i32 [ 10500, %262 ], [ 11717, %263 ], [ -1, %264 ], [ -1, %258 ]
  %.0235.ph = phi i32 [ 0, %262 ], [ 1, %263 ], [ 2, %264 ], [ 3, %258 ]
  %.0233.ph = phi i1 [ false, %262 ], [ false, %263 ], [ false, %264 ], [ true, %258 ]
  %.0232.ph = phi i1 [ true, %262 ], [ true, %263 ], [ true, %264 ], [ false, %258 ]
  %.0223.ph = phi i32 [ 0, %262 ], [ 1, %263 ], [ 3, %264 ], [ 6, %258 ]
  %.0222.ph = phi i32 [ 170833, %262 ], [ 245619, %263 ], [ -1, %264 ], [ -1, %258 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #10
  store i32 0, ptr %8, align 4, !tbaa !17
  br label %267

265:                                              ; preds = %258
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #10
  store i32 0, ptr %8, align 4, !tbaa !17
  %266 = trunc nuw i8 %.2214.3.3 to i1
  %spec.select308 = select i1 %narrow, i8 %.2214.3.3, i8 0
  %spec.select = select i1 %266, i8 %spec.select308, i8 %.2214.3.3
  br label %267

267:                                              ; preds = %265, %.thread
  %.0222332 = phi i32 [ %.0222.ph, %.thread ], [ 39169, %265 ]
  %.0223331 = phi i32 [ %.0223.ph, %.thread ], [ 0, %265 ]
  %.0232329 = phi i1 [ %.0232.ph, %.thread ], [ true, %265 ]
  %.0233328 = phi i1 [ %.0233.ph, %.thread ], [ false, %265 ]
  %.0235327 = phi i32 [ %.0235.ph, %.thread ], [ 0, %265 ]
  %.0236326 = phi i32 [ %.0236.ph, %.thread ], [ 10500, %265 ]
  %.0254325 = phi i32 [ %.0254.ph, %.thread ], [ 1, %265 ]
  %.0256324 = phi i1 [ true, %.thread ], [ false, %265 ]
  %.3 = phi i8 [ %.2214.3.3, %.thread ], [ %spec.select, %265 ]
  %268 = or i1 %.0233328, %narrow
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #10
  %269 = getelementptr inbounds i8, ptr %9, i64 24
  store i32 0, ptr %269, align 8
  %270 = getelementptr inbounds i8, ptr %9, i64 28
  store i32 %.0254325, ptr %270, align 4, !tbaa !18
  store <4 x i32> <i32 64, i32 1, i32 1, i32 1>, ptr %9, align 16, !tbaa !17
  %271 = getelementptr inbounds i8, ptr %9, i64 16
  store i32 1, ptr %271, align 16, !tbaa !17
  %272 = getelementptr inbounds i8, ptr %9, i64 20
  store i32 %.0223331, ptr %272, align 4, !tbaa !20
  %273 = trunc nuw i8 %.3 to i1
  br i1 %273, label %274, label %281

274:                                              ; preds = %267
  call void @_ZN6basisuL11astc_mode15EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(32) %9)
  %275 = and i32 %.0222332, 65536
  %.not263 = icmp eq i32 %275, 0
  br i1 %.not263, label %278, label %276

276:                                              ; preds = %274
  %277 = select i1 %.0232329, i32 4, i32 0
  call void @_ZN6basisuL16astc_mode9_or_16EjPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEj(i32 noundef 16, ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(32) %9, i32 noundef %277)
  br label %278

278:                                              ; preds = %276, %274
  %279 = and i32 %.0222332, 131072
  %.not264 = icmp eq i32 %279, 0
  br i1 %.not264, label %281, label %280

280:                                              ; preds = %278
  call void @_ZN6basisuL17astc_mode11_or_17EjPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(i32 noundef 17, ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(32) %9)
  br label %281

281:                                              ; preds = %278, %280, %267
  br i1 %narrow, label %.thread333, label %282

282:                                              ; preds = %281
  call void @_ZN6basisuL16astc_mode0_or_18EjPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEPKh(i32 noundef 0, ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(32) %9, ptr noundef null)
  %283 = and i32 %.0222332, 2
  %.not265 = icmp eq i32 %283, 0
  br i1 %.not265, label %285, label %284

284:                                              ; preds = %282
  call void @_ZN6basisuL10astc_mode1EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(32) %9)
  br label %285

285:                                              ; preds = %284, %282
  %286 = and i32 %.0222332, 4
  %.not266 = icmp eq i32 %286, 0
  br i1 %.not266, label %288, label %287

287:                                              ; preds = %285
  call void @_ZN6basisuL10astc_mode2EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEb(ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(32) %9, i1 noundef zeroext %.0232329)
  br label %288

288:                                              ; preds = %287, %285
  %289 = and i32 %.0222332, 8
  %.not267 = icmp eq i32 %289, 0
  br i1 %.not267, label %291, label %290

290:                                              ; preds = %288
  call void @_ZN6basisuL10astc_mode3EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEb(ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(32) %9, i1 noundef zeroext %.0232329)
  br label %291

291:                                              ; preds = %290, %288
  %292 = and i32 %.0222332, 16
  %.not268 = icmp eq i32 %292, 0
  br i1 %.not268, label %294, label %293

293:                                              ; preds = %291
  call void @_ZN6basisuL10astc_mode4EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEb(ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(32) %9, i1 noundef zeroext %.0232329)
  br label %294

294:                                              ; preds = %293, %291
  %295 = and i32 %.0222332, 32
  %.not269 = icmp eq i32 %295, 0
  br i1 %.not269, label %297, label %296

296:                                              ; preds = %294
  call void @_ZN6basisuL10astc_mode5EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(32) %9)
  br label %297

297:                                              ; preds = %296, %294
  %298 = and i32 %.0222332, 64
  %.not270 = icmp eq i32 %298, 0
  br i1 %.not270, label %300, label %299

299:                                              ; preds = %297
  call void @_ZN6basisuL10astc_mode6EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(32) %9)
  br label %300

300:                                              ; preds = %299, %297
  %301 = and i32 %.0222332, 128
  %.not271 = icmp eq i32 %301, 0
  br i1 %.not271, label %303, label %302

302:                                              ; preds = %300
  call void @_ZN6basisuL10astc_mode7EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEb(ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(32) %9, i1 noundef zeroext %.0232329)
  br label %303

303:                                              ; preds = %302, %300
  %304 = and i32 %.0222332, 262144
  %.not272 = icmp eq i32 %304, 0
  br i1 %.not272, label %306, label %305

305:                                              ; preds = %303
  call void @_ZN6basisuL16astc_mode0_or_18EjPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEPKh(i32 noundef 18, ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(32) %9, ptr noundef null)
  br label %306

306:                                              ; preds = %303, %305
  br i1 %268, label %.thread333, label %319

.thread333:                                       ; preds = %281, %306
  %307 = and i32 %.0222332, 512
  %.not273 = icmp eq i32 %307, 0
  br i1 %.not273, label %310, label %308

308:                                              ; preds = %.thread333
  %309 = select i1 %.0232329, i32 4, i32 0
  call void @_ZN6basisuL16astc_mode9_or_16EjPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEj(i32 noundef 9, ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(32) %9, i32 noundef %309)
  br label %310

310:                                              ; preds = %308, %.thread333
  %311 = and i32 %.0222332, 1024
  %.not274 = icmp eq i32 %311, 0
  br i1 %.not274, label %313, label %312

312:                                              ; preds = %310
  call void @_ZN6basisuL11astc_mode10EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(32) %9)
  br label %313

313:                                              ; preds = %310, %312
  call void @_ZN6basisuL17astc_mode11_or_17EjPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(i32 noundef 11, ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(32) %9)
  call void @_ZN6basisuL11astc_mode12EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(32) %9)
  %314 = and i32 %.0222332, 8192
  %.not275 = icmp eq i32 %314, 0
  br i1 %.not275, label %316, label %315

315:                                              ; preds = %313
  call void @_ZN6basisuL11astc_mode13EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(32) %9)
  br label %316

316:                                              ; preds = %315, %313
  %317 = and i32 %.0222332, 16384
  %.not276 = icmp eq i32 %317, 0
  br i1 %.not276, label %319, label %318

318:                                              ; preds = %316
  call void @_ZN6basisuL11astc_mode14EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(32) %9)
  br label %319

319:                                              ; preds = %316, %318, %306
  %320 = load i32, ptr %8, align 4, !tbaa !17
  %.not277 = icmp eq i32 %320, 0
  br i1 %.not277, label %387, label %.lr.ph

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

.lr.ph.split.preheader:                           ; preds = %.lr.ph
  %.ptr298.1 = getelementptr inbounds i8, ptr %10, i64 4
  %.ptr298.2 = getelementptr inbounds i8, ptr %10, i64 8
  %.ptr298.3 = getelementptr inbounds i8, ptr %10, i64 12
  %.ptr298.4 = getelementptr inbounds i8, ptr %10, i64 16
  %.ptr298.5 = getelementptr inbounds i8, ptr %10, i64 20
  %.ptr298.6 = getelementptr inbounds i8, ptr %10, i64 24
  %.ptr298.7 = getelementptr inbounds i8, ptr %10, i64 28
  %.ptr298.8 = getelementptr inbounds i8, ptr %10, i64 32
  %.ptr298.9 = getelementptr inbounds i8, ptr %10, i64 36
  %.ptr298.10 = getelementptr inbounds i8, ptr %10, i64 40
  %.ptr298.11 = getelementptr inbounds i8, ptr %10, i64 44
  %.ptr298.12 = getelementptr inbounds i8, ptr %10, i64 48
  %.ptr298.13 = getelementptr inbounds i8, ptr %10, i64 52
  %.ptr298.14 = getelementptr inbounds i8, ptr %10, i64 56
  %.ptr298.15 = getelementptr inbounds i8, ptr %10, i64 60
  br label %.lr.ph.split

.lr.ph.split.us.preheader:                        ; preds = %.lr.ph
  %.ptr303.us.1 = getelementptr inbounds i8, ptr %12, i64 4
  %.ptr303.us.2 = getelementptr inbounds i8, ptr %12, i64 8
  %.ptr303.us.3 = getelementptr inbounds i8, ptr %12, i64 12
  %.ptr303.us.4 = getelementptr inbounds i8, ptr %12, i64 16
  %.ptr303.us.5 = getelementptr inbounds i8, ptr %12, i64 20
  %.ptr303.us.6 = getelementptr inbounds i8, ptr %12, i64 24
  %.ptr303.us.7 = getelementptr inbounds i8, ptr %12, i64 28
  %.ptr303.us.8 = getelementptr inbounds i8, ptr %12, i64 32
  %.ptr303.us.9 = getelementptr inbounds i8, ptr %12, i64 36
  %.ptr303.us.10 = getelementptr inbounds i8, ptr %12, i64 40
  %.ptr303.us.11 = getelementptr inbounds i8, ptr %12, i64 44
  %.ptr303.us.12 = getelementptr inbounds i8, ptr %12, i64 48
  %.ptr303.us.13 = getelementptr inbounds i8, ptr %12, i64 52
  %.ptr303.us.14 = getelementptr inbounds i8, ptr %12, i64 56
  %.ptr303.us.15 = getelementptr inbounds i8, ptr %12, i64 60
  br label %.lr.ph.split.us

.lr.ph.split.us:                                  ; preds = %.lr.ph.split.us.preheader, %383
  %321 = phi i32 [ %320, %.lr.ph.split.us.preheader ], [ %384, %383 ]
  %indvars.iv443 = phi i64 [ 0, %.lr.ph.split.us.preheader ], [ %indvars.iv.next444, %383 ]
  %322 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %7, i64 0, i64 %indvars.iv443
  %323 = load i32, ptr %322, align 16, !tbaa !8
  %324 = zext i32 %323 to i64
  %325 = getelementptr inbounds [19 x i8], ptr @_ZN6basist18g_uastc_mode_is_laE, i64 0, i64 %324
  %326 = load i8, ptr %325, align 1, !tbaa !5
  %.not300.us = icmp eq i8 %326, 0
  br i1 %.not300.us, label %327, label %383

327:                                              ; preds = %.lr.ph.split.us
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12) #10
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %12)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.1)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.2)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.3)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.4)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.5)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.6)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.7)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.8)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.9)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.10)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.11)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.12)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.13)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.14)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.15)
  %328 = load i32, ptr %322, align 16, !tbaa !8
  %329 = getelementptr inbounds i8, ptr %322, i64 4
  %330 = load i32, ptr %329, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #10
  %331 = getelementptr inbounds i8, ptr %322, i64 112
  %332 = call i32 @_ZNK6basisu10color_rgba11get_color32Ev(ptr noundef nonnull align 1 dereferenceable(4) %331)
  store i32 %332, ptr %13, align 4
  %333 = getelementptr inbounds i8, ptr %322, i64 8
  %334 = call noundef zeroext i1 @_ZN6basist12unpack_uastcEjjRKNS_7color32ERKNS_15astc_block_descEPS0_b(i32 noundef %328, i32 noundef %330, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(104) %333, ptr noundef nonnull %12, i1 noundef zeroext false)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #10
  %335 = call noundef i32 @_ZN6basisuL17color_distance_laERKNS_10color_rgbaES2_(ptr noundef nonnull align 1 dereferenceable(4) %12, ptr noundef nonnull align 1 dereferenceable(4) %0)
  %336 = zext i32 %335 to i64
  %337 = call noundef i32 @_ZN6basisuL17color_distance_laERKNS_10color_rgbaES2_(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.1, ptr noundef nonnull align 1 dereferenceable(4) %47)
  %338 = zext i32 %337 to i64
  %339 = add nuw nsw i64 %336, %338
  %340 = call noundef i32 @_ZN6basisuL17color_distance_laERKNS_10color_rgbaES2_(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.2, ptr noundef nonnull align 1 dereferenceable(4) %59)
  %341 = zext i32 %340 to i64
  %342 = add nuw nsw i64 %339, %341
  %343 = call noundef i32 @_ZN6basisuL17color_distance_laERKNS_10color_rgbaES2_(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.3, ptr noundef nonnull align 1 dereferenceable(4) %71)
  %344 = zext i32 %343 to i64
  %345 = add nuw nsw i64 %342, %344
  %346 = call noundef i32 @_ZN6basisuL17color_distance_laERKNS_10color_rgbaES2_(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.4, ptr noundef nonnull align 1 dereferenceable(4) %82)
  %347 = zext i32 %346 to i64
  %348 = add nuw nsw i64 %345, %347
  %349 = call noundef i32 @_ZN6basisuL17color_distance_laERKNS_10color_rgbaES2_(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.5, ptr noundef nonnull align 1 dereferenceable(4) %94)
  %350 = zext i32 %349 to i64
  %351 = add nuw nsw i64 %348, %350
  %352 = call noundef i32 @_ZN6basisuL17color_distance_laERKNS_10color_rgbaES2_(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.6, ptr noundef nonnull align 1 dereferenceable(4) %106)
  %353 = zext i32 %352 to i64
  %354 = add nuw nsw i64 %351, %353
  %355 = call noundef i32 @_ZN6basisuL17color_distance_laERKNS_10color_rgbaES2_(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.7, ptr noundef nonnull align 1 dereferenceable(4) %118)
  %356 = zext i32 %355 to i64
  %357 = add nuw nsw i64 %354, %356
  %358 = call noundef i32 @_ZN6basisuL17color_distance_laERKNS_10color_rgbaES2_(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.8, ptr noundef nonnull align 1 dereferenceable(4) %129)
  %359 = zext i32 %358 to i64
  %360 = add nuw nsw i64 %357, %359
  %361 = call noundef i32 @_ZN6basisuL17color_distance_laERKNS_10color_rgbaES2_(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.9, ptr noundef nonnull align 1 dereferenceable(4) %142)
  %362 = zext i32 %361 to i64
  %363 = add nuw nsw i64 %360, %362
  %364 = call noundef i32 @_ZN6basisuL17color_distance_laERKNS_10color_rgbaES2_(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.10, ptr noundef nonnull align 1 dereferenceable(4) %154)
  %365 = zext i32 %364 to i64
  %366 = add nuw nsw i64 %363, %365
  %367 = call noundef i32 @_ZN6basisuL17color_distance_laERKNS_10color_rgbaES2_(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.11, ptr noundef nonnull align 1 dereferenceable(4) %167)
  %368 = zext i32 %367 to i64
  %369 = add nuw nsw i64 %366, %368
  %370 = call noundef i32 @_ZN6basisuL17color_distance_laERKNS_10color_rgbaES2_(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.12, ptr noundef nonnull align 1 dereferenceable(4) %179)
  %371 = zext i32 %370 to i64
  %372 = add nuw nsw i64 %369, %371
  %373 = call noundef i32 @_ZN6basisuL17color_distance_laERKNS_10color_rgbaES2_(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.13, ptr noundef nonnull align 1 dereferenceable(4) %192)
  %374 = zext i32 %373 to i64
  %375 = add nuw nsw i64 %372, %374
  %376 = call noundef i32 @_ZN6basisuL17color_distance_laERKNS_10color_rgbaES2_(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.14, ptr noundef nonnull align 1 dereferenceable(4) %205)
  %377 = zext i32 %376 to i64
  %378 = add nuw nsw i64 %375, %377
  %379 = call noundef i32 @_ZN6basisuL17color_distance_laERKNS_10color_rgbaES2_(ptr noundef nonnull align 1 dereferenceable(4) %.ptr303.us.15, ptr noundef nonnull align 1 dereferenceable(4) %218)
  %380 = zext i32 %379 to i64
  %381 = add nuw nsw i64 %378, %380
  %382 = getelementptr inbounds i8, ptr %322, i64 120
  store i64 %381, ptr %382, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #10
  %.pre455 = load i32, ptr %8, align 4, !tbaa !17
  br label %383

383:                                              ; preds = %327, %.lr.ph.split.us
  %384 = phi i32 [ %.pre455, %327 ], [ %321, %.lr.ph.split.us ]
  %indvars.iv.next444 = add nuw nsw i64 %indvars.iv443, 1
  %385 = zext i32 %384 to i64
  %386 = icmp ult i64 %indvars.iv.next444, %385
  br i1 %386, label %.lr.ph.split.us, label %._crit_edge, !llvm.loop !21

387:                                              ; preds = %319
  call void @__assert_fail(ptr noundef nonnull @.str.34, ptr noundef nonnull @.str.3, i32 noundef 3341, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6basisu12encode_uastcEPKhRN6basist11uastc_blockEj) #11
  unreachable

._crit_edge:                                      ; preds = %452, %383
  call void @llvm.lifetime.start.p0(i64 152, ptr nonnull %14) #10
  call void @_ZN6basist20unpacked_uastc_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(152) %14)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(152) %14, i8 0, i64 152, i1 false)
  call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %15) #10
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %16) #10
  %388 = load i32, ptr %8, align 4, !tbaa !17
  %389 = icmp eq i32 %388, 1
  br i1 %389, label %541, label %456

.lr.ph.split:                                     ; preds = %.lr.ph.split.preheader, %452
  %390 = phi i32 [ %320, %.lr.ph.split.preheader ], [ %453, %452 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph.split.preheader ], [ %indvars.iv.next, %452 ]
  %391 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %7, i64 0, i64 %indvars.iv
  %392 = load i32, ptr %391, align 16, !tbaa !8
  %393 = zext i32 %392 to i64
  %394 = getelementptr inbounds [19 x i8], ptr @_ZN6basist18g_uastc_mode_is_laE, i64 0, i64 %393
  %395 = load i8, ptr %394, align 1, !tbaa !5
  %.not295 = icmp eq i8 %395, 0
  br i1 %.not295, label %452, label %396

396:                                              ; preds = %.lr.ph.split
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #10
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %10)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.1)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.2)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.3)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.4)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.5)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.6)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.7)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.8)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.9)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.10)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.11)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.12)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.13)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.14)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.15)
  %397 = load i32, ptr %391, align 16, !tbaa !8
  %398 = getelementptr inbounds i8, ptr %391, i64 4
  %399 = load i32, ptr %398, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #10
  %400 = getelementptr inbounds i8, ptr %391, i64 112
  %401 = call i32 @_ZNK6basisu10color_rgba11get_color32Ev(ptr noundef nonnull align 1 dereferenceable(4) %400)
  store i32 %401, ptr %11, align 4
  %402 = getelementptr inbounds i8, ptr %391, i64 8
  %403 = call noundef zeroext i1 @_ZN6basist12unpack_uastcEjjRKNS_7color32ERKNS_15astc_block_descEPS0_b(i32 noundef %397, i32 noundef %399, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(104) %402, ptr noundef nonnull %10, i1 noundef zeroext false)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #10
  %404 = call noundef i32 @_ZN6basisu14color_distanceERKNS_10color_rgbaES2_b(ptr noundef nonnull align 1 dereferenceable(4) %10, ptr noundef nonnull align 1 dereferenceable(4) %0, i1 noundef zeroext true)
  %405 = sext i32 %404 to i64
  %406 = call noundef i32 @_ZN6basisu14color_distanceERKNS_10color_rgbaES2_b(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.1, ptr noundef nonnull align 1 dereferenceable(4) %47, i1 noundef zeroext true)
  %407 = sext i32 %406 to i64
  %408 = add nsw i64 %405, %407
  %409 = call noundef i32 @_ZN6basisu14color_distanceERKNS_10color_rgbaES2_b(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.2, ptr noundef nonnull align 1 dereferenceable(4) %59, i1 noundef zeroext true)
  %410 = sext i32 %409 to i64
  %411 = add nsw i64 %408, %410
  %412 = call noundef i32 @_ZN6basisu14color_distanceERKNS_10color_rgbaES2_b(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.3, ptr noundef nonnull align 1 dereferenceable(4) %71, i1 noundef zeroext true)
  %413 = sext i32 %412 to i64
  %414 = add nsw i64 %411, %413
  %415 = call noundef i32 @_ZN6basisu14color_distanceERKNS_10color_rgbaES2_b(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.4, ptr noundef nonnull align 1 dereferenceable(4) %82, i1 noundef zeroext true)
  %416 = sext i32 %415 to i64
  %417 = add nsw i64 %414, %416
  %418 = call noundef i32 @_ZN6basisu14color_distanceERKNS_10color_rgbaES2_b(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.5, ptr noundef nonnull align 1 dereferenceable(4) %94, i1 noundef zeroext true)
  %419 = sext i32 %418 to i64
  %420 = add nsw i64 %417, %419
  %421 = call noundef i32 @_ZN6basisu14color_distanceERKNS_10color_rgbaES2_b(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.6, ptr noundef nonnull align 1 dereferenceable(4) %106, i1 noundef zeroext true)
  %422 = sext i32 %421 to i64
  %423 = add nsw i64 %420, %422
  %424 = call noundef i32 @_ZN6basisu14color_distanceERKNS_10color_rgbaES2_b(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.7, ptr noundef nonnull align 1 dereferenceable(4) %118, i1 noundef zeroext true)
  %425 = sext i32 %424 to i64
  %426 = add nsw i64 %423, %425
  %427 = call noundef i32 @_ZN6basisu14color_distanceERKNS_10color_rgbaES2_b(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.8, ptr noundef nonnull align 1 dereferenceable(4) %129, i1 noundef zeroext true)
  %428 = sext i32 %427 to i64
  %429 = add nsw i64 %426, %428
  %430 = call noundef i32 @_ZN6basisu14color_distanceERKNS_10color_rgbaES2_b(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.9, ptr noundef nonnull align 1 dereferenceable(4) %142, i1 noundef zeroext true)
  %431 = sext i32 %430 to i64
  %432 = add nsw i64 %429, %431
  %433 = call noundef i32 @_ZN6basisu14color_distanceERKNS_10color_rgbaES2_b(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.10, ptr noundef nonnull align 1 dereferenceable(4) %154, i1 noundef zeroext true)
  %434 = sext i32 %433 to i64
  %435 = add nsw i64 %432, %434
  %436 = call noundef i32 @_ZN6basisu14color_distanceERKNS_10color_rgbaES2_b(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.11, ptr noundef nonnull align 1 dereferenceable(4) %167, i1 noundef zeroext true)
  %437 = sext i32 %436 to i64
  %438 = add nsw i64 %435, %437
  %439 = call noundef i32 @_ZN6basisu14color_distanceERKNS_10color_rgbaES2_b(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.12, ptr noundef nonnull align 1 dereferenceable(4) %179, i1 noundef zeroext true)
  %440 = sext i32 %439 to i64
  %441 = add nsw i64 %438, %440
  %442 = call noundef i32 @_ZN6basisu14color_distanceERKNS_10color_rgbaES2_b(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.13, ptr noundef nonnull align 1 dereferenceable(4) %192, i1 noundef zeroext true)
  %443 = sext i32 %442 to i64
  %444 = add nsw i64 %441, %443
  %445 = call noundef i32 @_ZN6basisu14color_distanceERKNS_10color_rgbaES2_b(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.14, ptr noundef nonnull align 1 dereferenceable(4) %205, i1 noundef zeroext true)
  %446 = sext i32 %445 to i64
  %447 = add nsw i64 %444, %446
  %448 = call noundef i32 @_ZN6basisu14color_distanceERKNS_10color_rgbaES2_b(ptr noundef nonnull align 1 dereferenceable(4) %.ptr298.15, ptr noundef nonnull align 1 dereferenceable(4) %218, i1 noundef zeroext true)
  %449 = sext i32 %448 to i64
  %450 = add nsw i64 %447, %449
  %451 = getelementptr inbounds i8, ptr %391, i64 120
  store i64 %450, ptr %451, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #10
  %.pre = load i32, ptr %8, align 4, !tbaa !17
  br label %452

452:                                              ; preds = %.lr.ph.split, %396
  %453 = phi i32 [ %390, %.lr.ph.split ], [ %.pre, %396 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %454 = zext i32 %453 to i64
  %455 = icmp ult i64 %indvars.iv.next, %454
  br i1 %455, label %.lr.ph.split, label %._crit_edge, !llvm.loop !21

456:                                              ; preds = %._crit_edge
  %457 = select i1 %.not, i64 50, i64 0
  %spec.select309 = select i1 %260, i64 0, i64 100
  %spec.select310 = select i1 %260, i64 100, i64 %457
  %.not409 = icmp eq i32 %388, 0
  br i1 %.not409, label %.thread342, label %.lr.ph392

.lr.ph392:                                        ; preds = %456
  %458 = getelementptr inbounds i8, ptr %14, i64 104
  %459 = getelementptr inbounds i8, ptr %14, i64 112
  %.ptr280.1 = getelementptr inbounds i8, ptr %17, i64 4
  %.ptr280.2 = getelementptr inbounds i8, ptr %17, i64 8
  %.ptr280.3 = getelementptr inbounds i8, ptr %17, i64 12
  %.ptr280.4 = getelementptr inbounds i8, ptr %17, i64 16
  %.ptr280.5 = getelementptr inbounds i8, ptr %17, i64 20
  %.ptr280.6 = getelementptr inbounds i8, ptr %17, i64 24
  %.ptr280.7 = getelementptr inbounds i8, ptr %17, i64 28
  %.ptr280.8 = getelementptr inbounds i8, ptr %17, i64 32
  %.ptr280.9 = getelementptr inbounds i8, ptr %17, i64 36
  %.ptr280.10 = getelementptr inbounds i8, ptr %17, i64 40
  %.ptr280.11 = getelementptr inbounds i8, ptr %17, i64 44
  %.ptr280.12 = getelementptr inbounds i8, ptr %17, i64 48
  %.ptr280.13 = getelementptr inbounds i8, ptr %17, i64 52
  %.ptr280.14 = getelementptr inbounds i8, ptr %17, i64 56
  %.ptr280.15 = getelementptr inbounds i8, ptr %17, i64 60
  %.ptr284.1 = getelementptr inbounds i8, ptr %24, i64 4
  %.ptr284.2 = getelementptr inbounds i8, ptr %24, i64 8
  %.ptr284.3 = getelementptr inbounds i8, ptr %24, i64 12
  %.ptr284.4 = getelementptr inbounds i8, ptr %24, i64 16
  %.ptr284.5 = getelementptr inbounds i8, ptr %24, i64 20
  %.ptr284.6 = getelementptr inbounds i8, ptr %24, i64 24
  %.ptr284.7 = getelementptr inbounds i8, ptr %24, i64 28
  %.ptr284.8 = getelementptr inbounds i8, ptr %24, i64 32
  %.ptr284.9 = getelementptr inbounds i8, ptr %24, i64 36
  %.ptr284.10 = getelementptr inbounds i8, ptr %24, i64 40
  %.ptr284.11 = getelementptr inbounds i8, ptr %24, i64 44
  %.ptr284.12 = getelementptr inbounds i8, ptr %24, i64 48
  %.ptr284.13 = getelementptr inbounds i8, ptr %24, i64 52
  %.ptr284.14 = getelementptr inbounds i8, ptr %24, i64 56
  %.ptr284.15 = getelementptr inbounds i8, ptr %24, i64 60
  br label %460

460:                                              ; preds = %.lr.ph392, %483
  %.0234390 = phi i32 [ 0, %.lr.ph392 ], [ %488, %483 ]
  %.0245389 = phi double [ 0x4415AF1D80000000, %.lr.ph392 ], [ %.1246, %483 ]
  %461 = zext i32 %.0234390 to i64
  %462 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %7, i64 0, i64 %461
  %463 = getelementptr inbounds i8, ptr %462, i64 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(104) %14, ptr noundef nonnull align 8 dereferenceable(104) %463, i64 104, i1 false), !tbaa.struct !23
  %464 = getelementptr inbounds i8, ptr %462, i64 4
  %465 = load <2 x i32>, ptr %462, align 16, !tbaa !17
  store <2 x i32> %465, ptr %458, align 4, !tbaa !17
  %466 = getelementptr inbounds i8, ptr %462, i64 112
  %467 = call i32 @_ZNK6basisu10color_rgba11get_color32Ev(ptr noundef nonnull align 1 dereferenceable(4) %466)
  store i32 %467, ptr %459, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %17) #10
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %17)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr280.1)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr280.2)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr280.3)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr280.4)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr280.5)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr280.6)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr280.7)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr280.8)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr280.9)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr280.10)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr280.11)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr280.12)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr280.13)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr280.14)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr280.15)
  %468 = load i32, ptr %462, align 16, !tbaa !8
  %469 = load i32, ptr %464, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #10
  %470 = call i32 @_ZNK6basisu10color_rgba11get_color32Ev(ptr noundef nonnull align 1 dereferenceable(4) %466)
  store i32 %470, ptr %18, align 4
  %471 = call noundef zeroext i1 @_ZN6basist12unpack_uastcEjjRKNS_7color32ERKNS_15astc_block_descEPS0_b(i32 noundef %468, i32 noundef %469, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(104) %463, ptr noundef nonnull %17, i1 noundef zeroext false)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #10
  call void @_ZN6basisuL19compute_block_errorEPA4_KNS_10color_rgbaES3_RmS4_S4_(ptr noundef nonnull %0, ptr noundef nonnull %17, ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21)
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %22) #10
  %472 = call noundef zeroext i1 @_ZN6basist22transcode_uastc_to_bc7ERKNS_20unpacked_uastc_blockERNS_24bc7_optimization_resultsE(ptr noundef nonnull align 4 dereferenceable(152) %14, ptr noundef nonnull align 4 dereferenceable(96) %22)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %23) #10
  call void @_ZN6basist16encode_bc7_blockEPvPKNS_24bc7_optimization_resultsE(ptr noundef nonnull %23, ptr noundef nonnull %22)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %24) #10
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %24)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr284.1)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr284.2)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr284.3)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr284.4)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr284.5)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr284.6)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr284.7)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr284.8)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr284.9)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr284.10)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr284.11)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr284.12)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr284.13)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr284.14)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr284.15)
  %473 = call noundef zeroext i1 @_ZN6basisu12unpack_blockENS_14texture_formatEPKvPNS_10color_rgbaE(i32 noundef 9, ptr noundef nonnull %23, ptr noundef nonnull %24)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #10
  call void @_ZN6basisuL19compute_block_errorEPA4_KNS_10color_rgbaES3_RmS4_S4_(ptr noundef nonnull %0, ptr noundef nonnull %24, ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %25)
  %474 = load i32, ptr %462, align 16, !tbaa !8
  %475 = icmp eq i32 %474, 8
  br i1 %475, label %491, label %476

476:                                              ; preds = %460
  %.val = load i64, ptr %25, align 8
  %.val363 = load i64, ptr %27, align 8
  %.val364 = load i64, ptr %26, align 8
  %.311.val = select i1 %narrow, i64 %.val363, i64 %.val364
  %.0230 = select i1 %273, i64 %.val, i64 %.311.val
  %.val365 = load i64, ptr %21, align 8
  %.val366 = load i64, ptr %20, align 8
  %.val367 = load i64, ptr %19, align 8
  %..val = select i1 %narrow, i64 %.val366, i64 %.val367
  %.0231 = select i1 %273, i64 %.val365, i64 %..val
  %477 = mul i64 %.0230, %spec.select310
  %478 = udiv i64 %477, 100
  %479 = mul i64 %.0231, %spec.select309
  %480 = udiv i64 %479, 100
  %481 = add nuw nsw i64 %480, %478
  %482 = getelementptr inbounds [512 x i64], ptr %15, i64 0, i64 %461
  store i64 %481, ptr %482, align 8, !tbaa !25
  %.not286 = icmp eq i64 %481, 0
  br i1 %.not286, label %491, label %483

483:                                              ; preds = %476
  %484 = uitofp i64 %.0231 to float
  %sqrt = call float @llvm.sqrt.f32(float %484)
  %485 = getelementptr inbounds [512 x float], ptr %16, i64 0, i64 %461
  store float %sqrt, ptr %485, align 4, !tbaa !26
  %486 = fpext float %sqrt to double
  %487 = fcmp ogt double %.0245389, %486
  %.1246 = select i1 %487, double %486, double %.0245389
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %24) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) #10
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %22) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %17) #10
  %488 = add nuw i32 %.0234390, 1
  %489 = load i32, ptr %8, align 4, !tbaa !17
  %490 = icmp ult i32 %488, %489
  br i1 %490, label %460, label %.thread342, !llvm.loop !28

491:                                              ; preds = %460, %476
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %24) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) #10
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %22) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %17) #10
  %492 = icmp slt i32 %.0234390, 0
  br i1 %492, label %.thread342, label %.loopexit

.thread342:                                       ; preds = %483, %456, %491
  %.0245375 = phi double [ %.0245389, %491 ], [ 0x4415AF1D80000000, %456 ], [ %.1246, %483 ]
  %.3240344 = phi i32 [ %.0234390, %491 ], [ -1, %456 ], [ -1, %483 ]
  %493 = fcmp oeq double %.0245375, 0.000000e+00
  %brmerge = or i1 %260, %493
  %494 = load i32, ptr %8, align 4, !tbaa !17
  %.not411 = icmp eq i32 %494, 0
  br i1 %brmerge, label %.preheader, label %.preheader368

.preheader368:                                    ; preds = %.thread342
  br i1 %.not411, label %.loopexit, label %.lr.ph396

.lr.ph396:                                        ; preds = %.preheader368
  %495 = and i32 %2, 512
  %.not287 = icmp eq i32 %495, 0
  br label %515

.preheader:                                       ; preds = %.thread342
  br i1 %.not411, label %.loopexit, label %.lr.ph403

.lr.ph403:                                        ; preds = %.preheader
  %496 = and i32 %2, 512
  %.not289 = icmp eq i32 %496, 0
  br label %497

497:                                              ; preds = %.lr.ph403, %511
  %indvars.iv449 = phi i64 [ 0, %.lr.ph403 ], [ %indvars.iv.next450, %511 ]
  %.0225401 = phi i64 [ -1, %.lr.ph403 ], [ %.2227, %511 ]
  %.4241400 = phi i32 [ %.3240344, %.lr.ph403 ], [ %.6243, %511 ]
  br i1 %.not289, label %502, label %498

498:                                              ; preds = %497
  %499 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %7, i64 0, i64 %indvars.iv449
  %500 = load i32, ptr %499, align 16, !tbaa !8
  %501 = call noundef float @_ZN6basisuL21get_uastc_mode_weightEj(i32 noundef %500)
  br label %502

502:                                              ; preds = %497, %498
  %503 = phi float [ %501, %498 ], [ 1.000000e+00, %497 ]
  %504 = getelementptr inbounds [512 x i64], ptr %15, i64 0, i64 %indvars.iv449
  %505 = load i64, ptr %504, align 8, !tbaa !25
  %506 = uitofp i64 %505 to float
  %507 = fmul float %503, %506
  %508 = fptoui float %507 to i64
  %509 = icmp ule i64 %.0225401, %508
  %.not290 = icmp ne i64 %508, 0
  %510 = trunc nuw i64 %indvars.iv449 to i32
  %.6243 = select i1 %509, i32 %.4241400, i32 %510
  %cond2 = or i1 %509, %.not290
  br i1 %cond2, label %511, label %.loopexit

511:                                              ; preds = %502
  %.2227 = call i64 @llvm.umin.i64(i64 %.0225401, i64 %508)
  %indvars.iv.next450 = add nuw nsw i64 %indvars.iv449, 1
  %512 = load i32, ptr %8, align 4, !tbaa !17
  %513 = zext i32 %512 to i64
  %514 = icmp ult i64 %indvars.iv.next450, %513
  br i1 %514, label %497, label %.loopexit, !llvm.loop !29

515:                                              ; preds = %.lr.ph396, %536
  %indvars.iv446 = phi i64 [ 0, %.lr.ph396 ], [ %indvars.iv.next447, %536 ]
  %.3228394 = phi i64 [ -1, %.lr.ph396 ], [ %.7.ph, %536 ]
  %.8393 = phi i32 [ %.3240344, %.lr.ph396 ], [ %.12.ph, %536 ]
  %516 = getelementptr inbounds [512 x float], ptr %16, i64 0, i64 %indvars.iv446
  %517 = load float, ptr %516, align 4, !tbaa !26
  %518 = fpext float %517 to double
  %519 = fdiv double %518, %.0245375
  %520 = fcmp ugt double %519, 0x3FF4CCCCC0000000
  br i1 %520, label %536, label %521

521:                                              ; preds = %515
  br i1 %.not287, label %526, label %522

522:                                              ; preds = %521
  %523 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %7, i64 0, i64 %indvars.iv446
  %524 = load i32, ptr %523, align 16, !tbaa !8
  %525 = call noundef float @_ZN6basisuL21get_uastc_mode_weightEj(i32 noundef %524)
  br label %526

526:                                              ; preds = %521, %522
  %527 = phi float [ %525, %522 ], [ 1.000000e+00, %521 ]
  %528 = getelementptr inbounds [512 x i64], ptr %15, i64 0, i64 %indvars.iv446
  %529 = load i64, ptr %528, align 8, !tbaa !25
  %530 = uitofp i64 %529 to float
  %531 = fmul float %527, %530
  %532 = fptoui float %531 to i64
  %533 = icmp ugt i64 %.3228394, %532
  br i1 %533, label %534, label %536

534:                                              ; preds = %526
  %.not288 = icmp eq i64 %532, 0
  %535 = trunc nuw i64 %indvars.iv446 to i32
  br i1 %.not288, label %.loopexit, label %536

536:                                              ; preds = %534, %515, %526
  %.12.ph = phi i32 [ %.8393, %526 ], [ %.8393, %515 ], [ %535, %534 ]
  %.7.ph = phi i64 [ %.3228394, %526 ], [ %.3228394, %515 ], [ %532, %534 ]
  %indvars.iv.next447 = add nuw nsw i64 %indvars.iv446, 1
  %537 = load i32, ptr %8, align 4, !tbaa !17
  %538 = zext i32 %537 to i64
  %539 = icmp ult i64 %indvars.iv.next447, %538
  br i1 %539, label %515, label %.loopexit, !llvm.loop !30

.loopexit:                                        ; preds = %536, %534, %502, %511, %.preheader368, %.preheader, %491
  %.15 = phi i32 [ %.0234390, %491 ], [ %.3240344, %.preheader ], [ %.3240344, %.preheader368 ], [ %.6243, %511 ], [ %.6243, %502 ], [ %.12.ph, %536 ], [ %535, %534 ]
  %540 = sext i32 %.15 to i64
  br label %541

541:                                              ; preds = %._crit_edge, %.loopexit
  %.16 = phi i64 [ %540, %.loopexit ], [ 0, %._crit_edge ]
  %542 = getelementptr inbounds [512 x %"struct.basisu::uastc_encode_results"], ptr %7, i64 0, i64 %.16
  %543 = load i32, ptr %542, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %28) #10
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %28)
  %.ptr293.1 = getelementptr inbounds i8, ptr %28, i64 4
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr293.1)
  %.ptr293.2 = getelementptr inbounds i8, ptr %28, i64 8
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr293.2)
  %.ptr293.3 = getelementptr inbounds i8, ptr %28, i64 12
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr293.3)
  %.ptr293.4 = getelementptr inbounds i8, ptr %28, i64 16
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr293.4)
  %.ptr293.5 = getelementptr inbounds i8, ptr %28, i64 20
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr293.5)
  %.ptr293.6 = getelementptr inbounds i8, ptr %28, i64 24
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr293.6)
  %.ptr293.7 = getelementptr inbounds i8, ptr %28, i64 28
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr293.7)
  %.ptr293.8 = getelementptr inbounds i8, ptr %28, i64 32
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr293.8)
  %.ptr293.9 = getelementptr inbounds i8, ptr %28, i64 36
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr293.9)
  %.ptr293.10 = getelementptr inbounds i8, ptr %28, i64 40
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr293.10)
  %.ptr293.11 = getelementptr inbounds i8, ptr %28, i64 44
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr293.11)
  %.ptr293.12 = getelementptr inbounds i8, ptr %28, i64 48
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr293.12)
  %.ptr293.13 = getelementptr inbounds i8, ptr %28, i64 52
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr293.13)
  %.ptr293.14 = getelementptr inbounds i8, ptr %28, i64 56
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr293.14)
  %.ptr293.15 = getelementptr inbounds i8, ptr %28, i64 60
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr293.15)
  %544 = getelementptr inbounds i8, ptr %542, i64 8
  %545 = getelementptr inbounds i8, ptr %542, i64 4
  %546 = load i32, ptr %545, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %29) #10
  %547 = getelementptr inbounds i8, ptr %542, i64 112
  %548 = call i32 @_ZNK6basisu10color_rgba11get_color32Ev(ptr noundef nonnull align 1 dereferenceable(4) %547)
  store i32 %548, ptr %29, align 4
  %549 = call noundef zeroext i1 @_ZN6basist12unpack_uastcEjjRKNS_7color32ERKNS_15astc_block_descEPS0_b(i32 noundef %543, i32 noundef %546, ptr noundef nonnull align 4 dereferenceable(4) %29, ptr noundef nonnull align 4 dereferenceable(104) %544, ptr noundef nonnull %28, i1 noundef zeroext false)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %29) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %30) #10
  store i8 0, ptr %30, align 1, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %31) #10
  store i8 0, ptr %31, align 1, !tbaa !24
  br i1 %.0256324, label %550, label %551

550:                                              ; preds = %541
  call void @_ZN6basisuL17compute_bc1_hintsERbS0_RKNS_20uastc_encode_resultsEPA4_KNS_10color_rgbaES7_(ptr noundef nonnull align 1 dereferenceable(1) %30, ptr noundef nonnull align 1 dereferenceable(1) %31, ptr noundef nonnull align 8 dereferenceable(128) %542, ptr noundef nonnull %0, ptr noundef nonnull %28)
  br label %551

551:                                              ; preds = %550, %541
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %32) #10
  %552 = zext i32 %543 to i64
  %553 = getelementptr inbounds [19 x i8], ptr @_ZN6basist22g_uastc_mode_has_alphaE, i64 0, i64 %552
  %554 = load i8, ptr %553, align 1, !tbaa !5
  %555 = icmp ne i8 %554, 0
  %556 = icmp ne i32 %543, 8
  %or.cond = select i1 %555, i1 %556, i1 false
  br i1 %or.cond, label %557, label %616

557:                                              ; preds = %551
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %33) #10
  %558 = getelementptr inbounds i8, ptr %28, i64 3
  %559 = load i8, ptr %558, align 1, !tbaa !5
  store i8 %559, ptr %33, align 16, !tbaa !5
  %560 = getelementptr inbounds i8, ptr %28, i64 7
  %561 = load i8, ptr %560, align 1, !tbaa !5
  %562 = getelementptr inbounds i8, ptr %33, i64 1
  store i8 %561, ptr %562, align 1, !tbaa !5
  %563 = getelementptr inbounds i8, ptr %28, i64 11
  %564 = load i8, ptr %563, align 1, !tbaa !5
  %565 = getelementptr inbounds i8, ptr %33, i64 2
  store i8 %564, ptr %565, align 2, !tbaa !5
  %566 = getelementptr inbounds i8, ptr %28, i64 15
  %567 = load i8, ptr %566, align 1, !tbaa !5
  %568 = getelementptr inbounds i8, ptr %33, i64 3
  store i8 %567, ptr %568, align 1, !tbaa !5
  %569 = getelementptr inbounds i8, ptr %28, i64 19
  %570 = load i8, ptr %569, align 1, !tbaa !5
  %571 = getelementptr inbounds i8, ptr %33, i64 4
  store i8 %570, ptr %571, align 4, !tbaa !5
  %572 = getelementptr inbounds i8, ptr %28, i64 23
  %573 = load i8, ptr %572, align 1, !tbaa !5
  %574 = getelementptr inbounds i8, ptr %33, i64 5
  store i8 %573, ptr %574, align 1, !tbaa !5
  %575 = getelementptr inbounds i8, ptr %28, i64 27
  %576 = load i8, ptr %575, align 1, !tbaa !5
  %577 = getelementptr inbounds i8, ptr %33, i64 6
  store i8 %576, ptr %577, align 2, !tbaa !5
  %578 = getelementptr inbounds i8, ptr %28, i64 31
  %579 = load i8, ptr %578, align 1, !tbaa !5
  %580 = getelementptr inbounds i8, ptr %33, i64 7
  store i8 %579, ptr %580, align 1, !tbaa !5
  %581 = getelementptr inbounds i8, ptr %28, i64 35
  %582 = load i8, ptr %581, align 1, !tbaa !5
  %583 = getelementptr inbounds i8, ptr %33, i64 8
  store i8 %582, ptr %583, align 8, !tbaa !5
  %584 = getelementptr inbounds i8, ptr %28, i64 39
  %585 = load i8, ptr %584, align 1, !tbaa !5
  %586 = getelementptr inbounds i8, ptr %33, i64 9
  store i8 %585, ptr %586, align 1, !tbaa !5
  %587 = getelementptr inbounds i8, ptr %28, i64 43
  %588 = load i8, ptr %587, align 1, !tbaa !5
  %589 = getelementptr inbounds i8, ptr %33, i64 10
  store i8 %588, ptr %589, align 2, !tbaa !5
  %590 = getelementptr inbounds i8, ptr %28, i64 47
  %591 = load i8, ptr %590, align 1, !tbaa !5
  %592 = getelementptr inbounds i8, ptr %33, i64 11
  store i8 %591, ptr %592, align 1, !tbaa !5
  %593 = getelementptr inbounds i8, ptr %28, i64 51
  %594 = load i8, ptr %593, align 1, !tbaa !5
  %595 = getelementptr inbounds i8, ptr %33, i64 12
  store i8 %594, ptr %595, align 4, !tbaa !5
  %596 = getelementptr inbounds i8, ptr %28, i64 55
  %597 = load i8, ptr %596, align 1, !tbaa !5
  %598 = getelementptr inbounds i8, ptr %33, i64 13
  store i8 %597, ptr %598, align 1, !tbaa !5
  %599 = getelementptr inbounds i8, ptr %28, i64 59
  %600 = load i8, ptr %599, align 1, !tbaa !5
  %601 = getelementptr inbounds i8, ptr %33, i64 14
  store i8 %600, ptr %601, align 2, !tbaa !5
  %602 = getelementptr inbounds i8, ptr %28, i64 63
  %603 = load i8, ptr %602, align 1, !tbaa !5
  %604 = getelementptr inbounds i8, ptr %33, i64 15
  store i8 %603, ptr %604, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %34) #10
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %34, i8 0, i64 12, i1 false)
  %605 = call noundef i64 @_ZN6basisuL17uastc_pack_eac_a8ERNS_25uastc_pack_eac_a8_resultsEPKhjjjj(ptr noundef nonnull align 4 dereferenceable(12) %34, ptr noundef nonnull %33, i32 noundef 16, i32 noundef 0, i32 noundef %.0235327, i32 noundef %.0236326)
  %606 = getelementptr inbounds i8, ptr %34, i64 4
  %607 = load i32, ptr %606, align 4, !tbaa !31
  %608 = trunc i32 %607 to i16
  %609 = shl i16 %608, 8
  %610 = and i16 %609, 3840
  %611 = getelementptr inbounds i8, ptr %34, i64 8
  %612 = load i32, ptr %611, align 4, !tbaa !33
  %613 = trunc i32 %612 to i16
  %614 = shl i16 %613, 12
  %615 = or disjoint i16 %610, %614
  store i16 %615, ptr %32, align 8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %34) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %33) #10
  br label %617

616:                                              ; preds = %551
  store i64 0, ptr %32, align 8
  br label %617

617:                                              ; preds = %616, %557
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %35) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %36) #10
  store i32 0, ptr %36, align 4, !tbaa !17
  call void @_ZN6basisuL18compute_etc1_hintsERNS_9etc_blockERjRKNS_20uastc_encode_resultsEPA4_KNS_10color_rgbaES9_ij(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 4 dereferenceable(4) %36, ptr noundef nonnull align 8 dereferenceable(128) %542, ptr noundef nonnull %0, ptr noundef nonnull %28, i32 noundef %261, i32 noundef %2)
  %618 = load i32, ptr %36, align 4, !tbaa !17
  %619 = load i8, ptr %30, align 1, !tbaa !24, !range !34, !noundef !35
  %620 = trunc nuw i8 %619 to i1
  %621 = load i8, ptr %31, align 1, !tbaa !24, !range !34, !noundef !35
  %622 = trunc nuw i8 %621 to i1
  call void @_ZN6basisu10pack_uastcERN6basist11uastc_blockERKNS_20uastc_encode_resultsERKNS_9etc_blockEjRKNS_12eac_a8_blockEbb(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(128) %542, ptr noundef nonnull align 8 dereferenceable(8) %35, i32 noundef %618, ptr noundef nonnull align 2 dereferenceable(8) %32, i1 noundef zeroext %620, i1 noundef zeroext %622)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %36) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %35) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %32) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %31) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %30) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %28) #10
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %16) #10
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %15) #10
  call void @llvm.lifetime.end.p0(i64 152, ptr nonnull %14) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 65536, ptr nonnull %7) #10
  br label %623

623:                                              ; preds = %617, %246
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #10
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK6basisu10color_rgbaneERKS0_(ptr noundef nonnull align 1 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(4)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu20uastc_encode_resultsC2Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #5 align 2

declare noundef i64 @_ZN6basisu27pack_etc1_block_solid_colorERNS_9etc_blockEPKh(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #6

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL11astc_mode15EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL16astc_mode9_or_16EjPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEj(i32 noundef, ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32), i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL17astc_mode11_or_17EjPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(i32 noundef, ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL16astc_mode0_or_18EjPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEPKh(i32 noundef, ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32), ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL10astc_mode1EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL10astc_mode2EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEb(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32), i1 noundef zeroext) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL10astc_mode3EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEb(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32), i1 noundef zeroext) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL10astc_mode4EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEb(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32), i1 noundef zeroext) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL10astc_mode5EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL10astc_mode6EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL10astc_mode7EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsEb(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32), i1 noundef zeroext) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL11astc_mode10EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL11astc_mode12EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL11astc_mode13EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL11astc_mode14EPA4_KNS_10color_rgbaEPNS_20uastc_encode_resultsERjRNS_28bc7enc_compress_block_paramsE(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(32)) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4)) unnamed_addr #7 align 2

declare noundef zeroext i1 @_ZN6basist12unpack_uastcEjjRKNS_7color32ERKNS_15astc_block_descEPS0_b(i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(104), ptr noundef, i1 noundef zeroext) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZNK6basisu10color_rgba11get_color32Ev(ptr noundef nonnull align 1 dereferenceable(4)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN6basisu14color_distanceERKNS_10color_rgbaES2_b(ptr noundef nonnull align 1 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(4), i1 noundef zeroext) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN6basisuL17color_distance_laERKNS_10color_rgbaES2_(ptr noundef nonnull align 1 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(4)) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basist20unpacked_uastc_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(152)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN6basisuL19compute_block_errorEPA4_KNS_10color_rgbaES3_RmS4_S4_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #8

declare noundef zeroext i1 @_ZN6basist22transcode_uastc_to_bc7ERKNS_20unpacked_uastc_blockERNS_24bc7_optimization_resultsE(ptr noundef nonnull align 4 dereferenceable(152), ptr noundef nonnull align 4 dereferenceable(96)) local_unnamed_addr #6

declare void @_ZN6basist16encode_bc7_blockEPvPKNS_24bc7_optimization_resultsE(ptr noundef, ptr noundef) local_unnamed_addr #6

declare noundef zeroext i1 @_ZN6basisu12unpack_blockENS_14texture_formatEPKvPNS_10color_rgbaE(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef float @_ZN6basisuL21get_uastc_mode_weightEj(i32 noundef) local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL17compute_bc1_hintsERbS0_RKNS_20uastc_encode_resultsEPA4_KNS_10color_rgbaES7_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(128), ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN6basisuL17uastc_pack_eac_a8ERNS_25uastc_pack_eac_a8_resultsEPKhjjjj(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN6basisuL18compute_etc1_hintsERNS_9etc_blockERjRKNS_20uastc_encode_resultsEPA4_KNS_10color_rgbaES9_ij(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(128), ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "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 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 #8 = { 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 #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #10 = { nounwind }
attributes #11 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !10, i64 0}
!9 = !{!"_ZTSN6basisu20uastc_encode_resultsE", !10, i64 0, !10, i64 4, !11, i64 8, !13, i64 112, !14, i64 120}
!10 = !{!"int", !6, i64 0}
!11 = !{!"_ZTSN6basist15astc_block_descE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !12, i64 20, !6, i64 21, !6, i64 39}
!12 = !{!"bool", !6, i64 0}
!13 = !{!"_ZTSN6basisu10color_rgbaE", !6, i64 0}
!14 = !{!"long", !6, i64 0}
!15 = !{!9, !14, i64 120}
!16 = !{!9, !10, i64 4}
!17 = !{!10, !10, i64 0}
!18 = !{!19, !10, i64 28}
!19 = !{!"_ZTSN6basisu28bc7enc_compress_block_paramsE", !10, i64 0, !6, i64 4, !10, i64 20, !6, i64 24, !10, i64 28}
!20 = !{!19, !10, i64 20}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{i64 0, i64 4, !17, i64 4, i64 4, !17, i64 8, i64 4, !17, i64 12, i64 4, !17, i64 16, i64 4, !17, i64 20, i64 1, !24, i64 21, i64 18, !5, i64 39, i64 64, !5}
!24 = !{!12, !12, i64 0}
!25 = !{!14, !14, i64 0}
!26 = !{!27, !27, i64 0}
!27 = !{!"float", !6, i64 0}
!28 = distinct !{!28, !22}
!29 = distinct !{!29, !22}
!30 = distinct !{!30, !22}
!31 = !{!32, !10, i64 4}
!32 = !{!"_ZTSN6basisu25uastc_pack_eac_a8_resultsE", !10, i64 0, !10, i64 4, !10, i64 8}
!33 = !{!32, !10, i64 8}
!34 = !{i8 0, i8 2}
!35 = !{}


; Effective O3 passes: AggressiveInstCombinePass,BDCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass