; LLVM IR from KonajuGames/libsquish :: clusterfit.ll (ZN6squish10ClusterFit9Compress4EPv)

; 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.squish::Vec4" = type { <4 x float> }
%"class.squish::Vec3" = type { float, float, float }
%"class.squish::ColourFit" = type <{ ptr, ptr, i32, [4 x i8] }>
%"class.squish::ClusterFit" = type { %"class.squish::ColourFit.base", i32, %"class.squish::Vec3", [128 x i8], [16 x %"class.squish::Vec4"], %"class.squish::Vec4", %"class.squish::Vec4", %"class.squish::Vec4" }
%"class.squish::ColourFit.base" = type <{ ptr, ptr, i32 }>

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6squish4Vec4C2Effff(ptr noundef nonnull align 16 dereferenceable(16), float noundef, float noundef, float noundef, float noundef) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16), float noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6squish9ColourSet8GetCountEv(ptr noundef nonnull align 4 dereferenceable(325)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6squish10ClusterFit17ConstructOrderingERKNS_4Vec3Ei(ptr noundef nonnull align 16 dereferenceable(480), ptr noundef nonnull align 4 dereferenceable(12), i32 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6squish4Vec4C2ERKS0_(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6squishmiERKNS_4Vec4ES2_(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6squish11MultiplyAddERKNS_4Vec4ES2_S2_(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6squish4Vec46SplatWEv(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6squish10ReciprocalERKNS_4Vec4E(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16)) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6squish24NegativeMultiplySubtractERKNS_4Vec4ES2_S2_(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6squish3MinERKNS_4Vec4ES2_(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6squish3MaxERKNS_4Vec4ES2_(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6squish8TruncateERKNS_4Vec4E(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16)) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6squishplERKNS_4Vec4ES2_(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6squish4Vec46SplatXEv(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6squish4Vec46SplatYEv(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6squish4Vec46SplatZEv(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6squish18CompareAnyLessThanERKNS_4Vec4ES2_(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) #1

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZNK6squish4Vec47GetVec3Ev(ptr noundef nonnull align 16 dereferenceable(16)) #1 align 2

declare void @_ZNK6squish9ColourSet12RemapIndicesEPKhPh(ptr noundef nonnull align 4 dereferenceable(325), ptr noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6squish10ClusterFit9Compress4EPv(ptr noundef nonnull align 16 dereferenceable(480) %0, ptr noundef %1) unnamed_addr #6 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.squish::Vec4", align 16
  %7 = alloca %"class.squish::Vec4", align 16
  %8 = alloca %"class.squish::Vec4", align 16
  %9 = alloca %"class.squish::Vec4", align 16
  %10 = alloca %"class.squish::Vec4", align 16
  %11 = alloca %"class.squish::Vec4", align 16
  %12 = alloca %"class.squish::Vec4", align 16
  %13 = alloca %"class.squish::Vec4", align 16
  %14 = alloca %"class.squish::Vec4", align 16
  %15 = alloca %"class.squish::Vec4", align 16
  %16 = alloca %"class.squish::Vec4", align 16
  %17 = alloca %"class.squish::Vec4", align 16
  %18 = alloca [16 x i8], align 16
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %"class.squish::Vec4", align 16
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca %"class.squish::Vec4", align 16
  %28 = alloca i32, align 4
  %29 = alloca %"class.squish::Vec4", align 16
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca %"class.squish::Vec4", align 16
  %33 = alloca %"class.squish::Vec4", align 16
  %34 = alloca %"class.squish::Vec4", align 16
  %35 = alloca %"class.squish::Vec4", align 16
  %36 = alloca %"class.squish::Vec4", align 16
  %37 = alloca %"class.squish::Vec4", align 16
  %38 = alloca %"class.squish::Vec4", align 16
  %39 = alloca %"class.squish::Vec4", align 16
  %40 = alloca %"class.squish::Vec4", align 16
  %41 = alloca %"class.squish::Vec4", align 16
  %42 = alloca %"class.squish::Vec4", align 16
  %43 = alloca %"class.squish::Vec4", align 16
  %44 = alloca %"class.squish::Vec4", align 16
  %45 = alloca %"class.squish::Vec4", align 16
  %46 = alloca %"class.squish::Vec4", align 16
  %47 = alloca %"class.squish::Vec4", align 16
  %48 = alloca %"class.squish::Vec4", align 16
  %49 = alloca %"class.squish::Vec4", align 16
  %50 = alloca %"class.squish::Vec4", align 16
  %51 = alloca %"class.squish::Vec4", align 16
  %52 = alloca %"class.squish::Vec4", align 16
  %53 = alloca %"class.squish::Vec4", align 16
  %54 = alloca %"class.squish::Vec4", align 16
  %55 = alloca %"class.squish::Vec4", align 16
  %56 = alloca %"class.squish::Vec4", align 16
  %57 = alloca %"class.squish::Vec4", align 16
  %58 = alloca %"class.squish::Vec4", align 16
  %59 = alloca %"class.squish::Vec4", align 16
  %60 = alloca %"class.squish::Vec4", align 16
  %61 = alloca %"class.squish::Vec4", align 16
  %62 = alloca %"class.squish::Vec4", align 16
  %63 = alloca %"class.squish::Vec4", align 16
  %64 = alloca %"class.squish::Vec4", align 16
  %65 = alloca %"class.squish::Vec4", align 16
  %66 = alloca %"class.squish::Vec4", align 16
  %67 = alloca %"class.squish::Vec4", align 16
  %68 = alloca %"class.squish::Vec4", align 16
  %69 = alloca %"class.squish::Vec4", align 16
  %70 = alloca %"class.squish::Vec4", align 16
  %71 = alloca %"class.squish::Vec4", align 16
  %72 = alloca %"class.squish::Vec4", align 16
  %73 = alloca %"class.squish::Vec4", align 16
  %74 = alloca %"class.squish::Vec4", align 16
  %75 = alloca %"class.squish::Vec4", align 16
  %76 = alloca %"class.squish::Vec4", align 16
  %77 = alloca %"class.squish::Vec4", align 16
  %78 = alloca %"class.squish::Vec3", align 4
  %79 = alloca %"class.squish::Vec4", align 16
  %80 = alloca { <2 x float>, float }, align 8
  %81 = alloca ptr, align 8
  %82 = alloca [16 x i8], align 16
  %83 = alloca i32, align 4
  %84 = alloca i32, align 4
  %85 = alloca i32, align 4
  %86 = alloca i32, align 4
  %87 = alloca %"class.squish::Vec3", align 4
  %88 = alloca { <2 x float>, float }, align 8
  %89 = alloca %"class.squish::Vec3", align 4
  %90 = alloca { <2 x float>, float }, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %91 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %92 = getelementptr inbounds %"class.squish::ColourFit", ptr %91, i32 0, i32 1
  %93 = load ptr, ptr %92, align 8, !tbaa !9
  %94 = call noundef i32 @_ZNK6squish9ColourSet8GetCountEv(ptr noundef nonnull align 4 dereferenceable(325) %93)
  store i32 %94, ptr %5, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #7
  call void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16) %6, float noundef 2.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #7
  call void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16) %7, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #7
  call void @_ZN6squish4Vec4C2Effff(ptr noundef nonnull align 16 dereferenceable(16) %8, float noundef 0x3FD5555560000000, float noundef 0x3FD5555560000000, float noundef 0x3FD5555560000000, float noundef 0x3FBC71C720000000)
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #7
  call void @_ZN6squish4Vec4C2Effff(ptr noundef nonnull align 16 dereferenceable(16) %9, float noundef 0x3FE5555560000000, float noundef 0x3FE5555560000000, float noundef 0x3FE5555560000000, float noundef 0x3FDC71C720000000)
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #7
  call void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16) %10, float noundef 0x3FCC71C720000000)
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #7
  call void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16) %11, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #7
  call void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16) %12, float noundef 5.000000e-01)
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #7
  call void @_ZN6squish4Vec4C2Effff(ptr noundef nonnull align 16 dereferenceable(16) %13, float noundef 3.100000e+01, float noundef 6.300000e+01, float noundef 3.100000e+01, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #7
  call void @_ZN6squish4Vec4C2Effff(ptr noundef nonnull align 16 dereferenceable(16) %14, float noundef 0x3FA0842100000000, float noundef 0x3F90410420000000, float noundef 0x3FA0842100000000, float noundef 0.000000e+00)
  %95 = getelementptr inbounds %"class.squish::ClusterFit", ptr %91, i32 0, i32 2
  %96 = call noundef zeroext i1 @_ZN6squish10ClusterFit17ConstructOrderingERKNS_4Vec3Ei(ptr noundef nonnull align 16 dereferenceable(480) %91, ptr noundef nonnull align 4 dereferenceable(12) %95, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #7
  call void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16) %15, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #7
  call void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16) %16, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #7
  %97 = getelementptr inbounds %"class.squish::ClusterFit", ptr %91, i32 0, i32 7
  call void @_ZN6squish4Vec4C2ERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %17, ptr noundef nonnull align 16 dereferenceable(16) %97)
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 0, ptr %21, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !12
  br label %98

98:                                               ; preds = %203, %2
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #7
  call void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16) %24, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  store i32 0, ptr %25, align 4, !tbaa !12
  br label %99

99:                                               ; preds = %178, %98
  %100 = load i32, ptr %25, align 4, !tbaa !12
  %101 = load i32, ptr %5, align 4, !tbaa !12
  %102 = icmp slt i32 %100, %101
  br i1 %102, label %104, label %103

103:                                              ; preds = %99
  store i32 4, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %181

104:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #7
  call void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16) %27, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  %105 = load i32, ptr %25, align 4, !tbaa !12
  store i32 %105, ptr %28, align 4, !tbaa !12
  br label %106

106:                                              ; preds = %170, %104
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #7
  %107 = load i32, ptr %28, align 4, !tbaa !12
  %108 = icmp eq i32 %107, 0
  br i1 %108, label %109, label %112

109:                                              ; preds = %106
  %110 = getelementptr inbounds %"class.squish::ClusterFit", ptr %91, i32 0, i32 4
  %111 = getelementptr inbounds [16 x %"class.squish::Vec4"], ptr %110, i64 0, i64 0
  call void @_ZN6squish4Vec4C2ERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %29, ptr noundef nonnull align 16 dereferenceable(16) %111)
  br label %113

112:                                              ; preds = %106
  call void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16) %29, float noundef 0.000000e+00)
  br label %113

113:                                              ; preds = %112, %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  %114 = load i32, ptr %28, align 4, !tbaa !12
  %115 = icmp eq i32 %114, 0
  br i1 %115, label %116, label %117

116:                                              ; preds = %113
  br label %119

117:                                              ; preds = %113
  %118 = load i32, ptr %28, align 4, !tbaa !12
  br label %119

119:                                              ; preds = %117, %116
  %120 = phi i32 [ 1, %116 ], [ %118, %117 ]
  store i32 %120, ptr %30, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  %121 = load i32, ptr %30, align 4, !tbaa !12
  store i32 %121, ptr %31, align 4, !tbaa !12
  br label %122

122:                                              ; preds = %153, %119
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %34) #7
  %123 = getelementptr inbounds %"class.squish::ClusterFit", ptr %91, i32 0, i32 5
  call void @_ZN6squishmiERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %34, ptr noundef nonnull align 16 dereferenceable(16) %123, ptr noundef nonnull align 16 dereferenceable(16) %29)
  call void @_ZN6squishmiERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %33, ptr noundef nonnull align 16 dereferenceable(16) %34, ptr noundef nonnull align 16 dereferenceable(16) %27)
  call void @_ZN6squishmiERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %32, ptr noundef nonnull align 16 dereferenceable(16) %33, ptr noundef nonnull align 16 dereferenceable(16) %24)
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %35) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #7
  call void @_ZN6squish11MultiplyAddERKNS_4Vec4ES2_S2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %36, ptr noundef nonnull align 16 dereferenceable(16) %27, ptr noundef nonnull align 16 dereferenceable(16) %9, ptr noundef nonnull align 16 dereferenceable(16) %24)
  call void @_ZN6squish11MultiplyAddERKNS_4Vec4ES2_S2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %35, ptr noundef nonnull align 16 dereferenceable(16) %29, ptr noundef nonnull align 16 dereferenceable(16) %8, ptr noundef nonnull align 16 dereferenceable(16) %36)
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %37) #7
  call void @_ZNK6squish4Vec46SplatWEv(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %37, ptr noundef nonnull align 16 dereferenceable(16) %35)
  call void @llvm.lifetime.start.p0(i64 16, ptr %38) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %39) #7
  call void @_ZN6squish11MultiplyAddERKNS_4Vec4ES2_S2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %39, ptr noundef nonnull align 16 dereferenceable(16) %29, ptr noundef nonnull align 16 dereferenceable(16) %9, ptr noundef nonnull align 16 dereferenceable(16) %32)
  call void @_ZN6squish11MultiplyAddERKNS_4Vec4ES2_S2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %38, ptr noundef nonnull align 16 dereferenceable(16) %27, ptr noundef nonnull align 16 dereferenceable(16) %8, ptr noundef nonnull align 16 dereferenceable(16) %39)
  call void @llvm.lifetime.end.p0(i64 16, ptr %39) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %40) #7
  call void @_ZNK6squish4Vec46SplatWEv(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %40, ptr noundef nonnull align 16 dereferenceable(16) %38)
  call void @llvm.lifetime.start.p0(i64 16, ptr %41) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %42) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %43) #7
  call void @_ZN6squishplERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %43, ptr noundef nonnull align 16 dereferenceable(16) %27, ptr noundef nonnull align 16 dereferenceable(16) %29)
  call void @_ZNK6squish4Vec46SplatWEv(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %42, ptr noundef nonnull align 16 dereferenceable(16) %43)
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %41, ptr noundef nonnull align 16 dereferenceable(16) %10, ptr noundef nonnull align 16 dereferenceable(16) %42)
  call void @llvm.lifetime.end.p0(i64 16, ptr %43) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %42) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %44) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %45) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %46) #7
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %46, ptr noundef nonnull align 16 dereferenceable(16) %37, ptr noundef nonnull align 16 dereferenceable(16) %40)
  call void @_ZN6squish24NegativeMultiplySubtractERKNS_4Vec4ES2_S2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %45, ptr noundef nonnull align 16 dereferenceable(16) %41, ptr noundef nonnull align 16 dereferenceable(16) %41, ptr noundef nonnull align 16 dereferenceable(16) %46)
  call void @_ZN6squish10ReciprocalERKNS_4Vec4E(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %44, ptr noundef nonnull align 16 dereferenceable(16) %45)
  call void @llvm.lifetime.end.p0(i64 16, ptr %46) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %45) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %47) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %48) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %49) #7
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %49, ptr noundef nonnull align 16 dereferenceable(16) %35, ptr noundef nonnull align 16 dereferenceable(16) %40)
  call void @_ZN6squish24NegativeMultiplySubtractERKNS_4Vec4ES2_S2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %48, ptr noundef nonnull align 16 dereferenceable(16) %38, ptr noundef nonnull align 16 dereferenceable(16) %41, ptr noundef nonnull align 16 dereferenceable(16) %49)
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %47, ptr noundef nonnull align 16 dereferenceable(16) %48, ptr noundef nonnull align 16 dereferenceable(16) %44)
  call void @llvm.lifetime.end.p0(i64 16, ptr %49) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %48) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %50) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %51) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %52) #7
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %52, ptr noundef nonnull align 16 dereferenceable(16) %38, ptr noundef nonnull align 16 dereferenceable(16) %37)
  call void @_ZN6squish24NegativeMultiplySubtractERKNS_4Vec4ES2_S2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %51, ptr noundef nonnull align 16 dereferenceable(16) %35, ptr noundef nonnull align 16 dereferenceable(16) %41, ptr noundef nonnull align 16 dereferenceable(16) %52)
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %50, ptr noundef nonnull align 16 dereferenceable(16) %51, ptr noundef nonnull align 16 dereferenceable(16) %44)
  call void @llvm.lifetime.end.p0(i64 16, ptr %52) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %51) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %53) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %54) #7
  call void @_ZN6squish3MaxERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %54, ptr noundef nonnull align 16 dereferenceable(16) %11, ptr noundef nonnull align 16 dereferenceable(16) %47)
  call void @_ZN6squish3MinERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %53, ptr noundef nonnull align 16 dereferenceable(16) %7, ptr noundef nonnull align 16 dereferenceable(16) %54)
  %124 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN6squish4Vec4aSERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %47, ptr noundef nonnull align 16 dereferenceable(16) %53)
  call void @llvm.lifetime.end.p0(i64 16, ptr %54) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %53) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %55) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %56) #7
  call void @_ZN6squish3MaxERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %56, ptr noundef nonnull align 16 dereferenceable(16) %11, ptr noundef nonnull align 16 dereferenceable(16) %50)
  call void @_ZN6squish3MinERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %55, ptr noundef nonnull align 16 dereferenceable(16) %7, ptr noundef nonnull align 16 dereferenceable(16) %56)
  %125 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN6squish4Vec4aSERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %50, ptr noundef nonnull align 16 dereferenceable(16) %55)
  call void @llvm.lifetime.end.p0(i64 16, ptr %56) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %55) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %57) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %58) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %59) #7
  call void @_ZN6squish11MultiplyAddERKNS_4Vec4ES2_S2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %59, ptr noundef nonnull align 16 dereferenceable(16) %13, ptr noundef nonnull align 16 dereferenceable(16) %47, ptr noundef nonnull align 16 dereferenceable(16) %12)
  call void @_ZN6squish8TruncateERKNS_4Vec4E(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %58, ptr noundef nonnull align 16 dereferenceable(16) %59)
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %57, ptr noundef nonnull align 16 dereferenceable(16) %58, ptr noundef nonnull align 16 dereferenceable(16) %14)
  %126 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN6squish4Vec4aSERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %47, ptr noundef nonnull align 16 dereferenceable(16) %57)
  call void @llvm.lifetime.end.p0(i64 16, ptr %59) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %58) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %57) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %60) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %61) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %62) #7
  call void @_ZN6squish11MultiplyAddERKNS_4Vec4ES2_S2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %62, ptr noundef nonnull align 16 dereferenceable(16) %13, ptr noundef nonnull align 16 dereferenceable(16) %50, ptr noundef nonnull align 16 dereferenceable(16) %12)
  call void @_ZN6squish8TruncateERKNS_4Vec4E(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %61, ptr noundef nonnull align 16 dereferenceable(16) %62)
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %60, ptr noundef nonnull align 16 dereferenceable(16) %61, ptr noundef nonnull align 16 dereferenceable(16) %14)
  %127 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN6squish4Vec4aSERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %50, ptr noundef nonnull align 16 dereferenceable(16) %60)
  call void @llvm.lifetime.end.p0(i64 16, ptr %62) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %61) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %60) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %63) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %64) #7
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %64, ptr noundef nonnull align 16 dereferenceable(16) %47, ptr noundef nonnull align 16 dereferenceable(16) %47)
  call void @llvm.lifetime.start.p0(i64 16, ptr %65) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %66) #7
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %66, ptr noundef nonnull align 16 dereferenceable(16) %50, ptr noundef nonnull align 16 dereferenceable(16) %50)
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %65, ptr noundef nonnull align 16 dereferenceable(16) %66, ptr noundef nonnull align 16 dereferenceable(16) %40)
  call void @_ZN6squish11MultiplyAddERKNS_4Vec4ES2_S2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %63, ptr noundef nonnull align 16 dereferenceable(16) %64, ptr noundef nonnull align 16 dereferenceable(16) %37, ptr noundef nonnull align 16 dereferenceable(16) %65)
  call void @llvm.lifetime.end.p0(i64 16, ptr %66) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %65) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %64) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %67) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %68) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %69) #7
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %69, ptr noundef nonnull align 16 dereferenceable(16) %47, ptr noundef nonnull align 16 dereferenceable(16) %50)
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %68, ptr noundef nonnull align 16 dereferenceable(16) %69, ptr noundef nonnull align 16 dereferenceable(16) %41)
  call void @_ZN6squish24NegativeMultiplySubtractERKNS_4Vec4ES2_S2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %67, ptr noundef nonnull align 16 dereferenceable(16) %47, ptr noundef nonnull align 16 dereferenceable(16) %35, ptr noundef nonnull align 16 dereferenceable(16) %68)
  call void @llvm.lifetime.end.p0(i64 16, ptr %69) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %68) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %70) #7
  call void @_ZN6squish24NegativeMultiplySubtractERKNS_4Vec4ES2_S2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %70, ptr noundef nonnull align 16 dereferenceable(16) %50, ptr noundef nonnull align 16 dereferenceable(16) %38, ptr noundef nonnull align 16 dereferenceable(16) %67)
  call void @llvm.lifetime.start.p0(i64 16, ptr %71) #7
  call void @_ZN6squish11MultiplyAddERKNS_4Vec4ES2_S2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %71, ptr noundef nonnull align 16 dereferenceable(16) %6, ptr noundef nonnull align 16 dereferenceable(16) %70, ptr noundef nonnull align 16 dereferenceable(16) %63)
  call void @llvm.lifetime.start.p0(i64 16, ptr %72) #7
  %128 = getelementptr inbounds %"class.squish::ClusterFit", ptr %91, i32 0, i32 6
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %72, ptr noundef nonnull align 16 dereferenceable(16) %71, ptr noundef nonnull align 16 dereferenceable(16) %128)
  call void @llvm.lifetime.start.p0(i64 16, ptr %73) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %74) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %75) #7
  call void @_ZNK6squish4Vec46SplatXEv(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %75, ptr noundef nonnull align 16 dereferenceable(16) %72)
  call void @llvm.lifetime.start.p0(i64 16, ptr %76) #7
  call void @_ZNK6squish4Vec46SplatYEv(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %76, ptr noundef nonnull align 16 dereferenceable(16) %72)
  call void @_ZN6squishplERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %74, ptr noundef nonnull align 16 dereferenceable(16) %75, ptr noundef nonnull align 16 dereferenceable(16) %76)
  call void @llvm.lifetime.start.p0(i64 16, ptr %77) #7
  call void @_ZNK6squish4Vec46SplatZEv(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %77, ptr noundef nonnull align 16 dereferenceable(16) %72)
  call void @_ZN6squishplERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %73, ptr noundef nonnull align 16 dereferenceable(16) %74, ptr noundef nonnull align 16 dereferenceable(16) %77)
  call void @llvm.lifetime.end.p0(i64 16, ptr %77) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %76) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %75) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %74) #7
  %129 = call noundef zeroext i1 @_ZN6squish18CompareAnyLessThanERKNS_4Vec4ES2_(ptr noundef nonnull align 16 dereferenceable(16) %73, ptr noundef nonnull align 16 dereferenceable(16) %17)
  br i1 %129, label %130, label %138

130:                                              ; preds = %122
  %131 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN6squish4Vec4aSERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %15, ptr noundef nonnull align 16 dereferenceable(16) %47)
  %132 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN6squish4Vec4aSERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %16, ptr noundef nonnull align 16 dereferenceable(16) %50)
  %133 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN6squish4Vec4aSERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %17, ptr noundef nonnull align 16 dereferenceable(16) %73)
  %134 = load i32, ptr %25, align 4, !tbaa !12
  store i32 %134, ptr %20, align 4, !tbaa !12
  %135 = load i32, ptr %28, align 4, !tbaa !12
  store i32 %135, ptr %21, align 4, !tbaa !12
  %136 = load i32, ptr %31, align 4, !tbaa !12
  store i32 %136, ptr %22, align 4, !tbaa !12
  %137 = load i32, ptr %23, align 4, !tbaa !12
  store i32 %137, ptr %19, align 4, !tbaa !12
  br label %138

138:                                              ; preds = %130, %122
  %139 = load i32, ptr %31, align 4, !tbaa !12
  %140 = load i32, ptr %5, align 4, !tbaa !12
  %141 = icmp eq i32 %139, %140
  br i1 %141, label %142, label %143

142:                                              ; preds = %138
  store i32 9, ptr %26, align 4
  br label %151

143:                                              ; preds = %138
  %144 = getelementptr inbounds %"class.squish::ClusterFit", ptr %91, i32 0, i32 4
  %145 = load i32, ptr %31, align 4, !tbaa !12
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [16 x %"class.squish::Vec4"], ptr %144, i64 0, i64 %146
  %148 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN6squish4Vec4pLERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %29, ptr noundef nonnull align 16 dereferenceable(16) %147)
  %149 = load i32, ptr %31, align 4, !tbaa !12
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %31, align 4, !tbaa !12
  store i32 0, ptr %26, align 4
  br label %151

151:                                              ; preds = %143, %142
  call void @llvm.lifetime.end.p0(i64 16, ptr %73) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %72) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %71) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %70) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %67) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %63) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %50) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %47) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %44) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %41) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #7
  %152 = load i32, ptr %26, align 4
  switch i32 %152, label %154 [
    i32 0, label %153
  ]

153:                                              ; preds = %151
  br label %122, !llvm.loop !13

154:                                              ; preds = %151
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  br label %155

155:                                              ; preds = %154
  %156 = load i32, ptr %28, align 4, !tbaa !12
  %157 = load i32, ptr %5, align 4, !tbaa !12
  %158 = icmp eq i32 %156, %157
  br i1 %158, label %159, label %160

159:                                              ; preds = %155
  store i32 7, ptr %26, align 4
  br label %168

160:                                              ; preds = %155
  %161 = getelementptr inbounds %"class.squish::ClusterFit", ptr %91, i32 0, i32 4
  %162 = load i32, ptr %28, align 4, !tbaa !12
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [16 x %"class.squish::Vec4"], ptr %161, i64 0, i64 %163
  %165 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN6squish4Vec4pLERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %27, ptr noundef nonnull align 16 dereferenceable(16) %164)
  %166 = load i32, ptr %28, align 4, !tbaa !12
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %28, align 4, !tbaa !12
  store i32 0, ptr %26, align 4
  br label %168

168:                                              ; preds = %160, %159
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #7
  %169 = load i32, ptr %26, align 4
  switch i32 %169, label %171 [
    i32 0, label %170
  ]

170:                                              ; preds = %168
  br label %106, !llvm.loop !15

171:                                              ; preds = %168
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %172

172:                                              ; preds = %171
  %173 = getelementptr inbounds %"class.squish::ClusterFit", ptr %91, i32 0, i32 4
  %174 = load i32, ptr %25, align 4, !tbaa !12
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [16 x %"class.squish::Vec4"], ptr %173, i64 0, i64 %175
  %177 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN6squish4Vec4pLERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %24, ptr noundef nonnull align 16 dereferenceable(16) %176)
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #7
  br label %178

178:                                              ; preds = %172
  %179 = load i32, ptr %25, align 4, !tbaa !12
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr %25, align 4, !tbaa !12
  br label %99, !llvm.loop !16

181:                                              ; preds = %103
  %182 = load i32, ptr %19, align 4, !tbaa !12
  %183 = load i32, ptr %23, align 4, !tbaa !12
  %184 = icmp ne i32 %182, %183
  br i1 %184, label %185, label %186

185:                                              ; preds = %181
  store i32 2, ptr %26, align 4
  br label %201

186:                                              ; preds = %181
  %187 = load i32, ptr %23, align 4, !tbaa !12
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %23, align 4, !tbaa !12
  %189 = load i32, ptr %23, align 4, !tbaa !12
  %190 = getelementptr inbounds %"class.squish::ClusterFit", ptr %91, i32 0, i32 1
  %191 = load i32, ptr %190, align 4, !tbaa !17
  %192 = icmp eq i32 %189, %191
  br i1 %192, label %193, label %194

193:                                              ; preds = %186
  store i32 2, ptr %26, align 4
  br label %201

194:                                              ; preds = %186
  call void @llvm.lifetime.start.p0(i64 12, ptr %78) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %79) #7
  call void @_ZN6squishmiERKNS_4Vec4ES2_(ptr dead_on_unwind writable sret(%"class.squish::Vec4") align 16 %79, ptr noundef nonnull align 16 dereferenceable(16) %16, ptr noundef nonnull align 16 dereferenceable(16) %15)
  %195 = call { <2 x float>, float } @_ZNK6squish4Vec47GetVec3Ev(ptr noundef nonnull align 16 dereferenceable(16) %79)
  store { <2 x float>, float } %195, ptr %80, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %78, ptr align 8 %80, i64 12, i1 false)
  call void @llvm.lifetime.end.p0(i64 16, ptr %79) #7
  %196 = load i32, ptr %23, align 4, !tbaa !12
  %197 = call noundef zeroext i1 @_ZN6squish10ClusterFit17ConstructOrderingERKNS_4Vec3Ei(ptr noundef nonnull align 16 dereferenceable(480) %91, ptr noundef nonnull align 4 dereferenceable(12) %78, i32 noundef %196)
  br i1 %197, label %199, label %198

198:                                              ; preds = %194
  store i32 2, ptr %26, align 4
  br label %200

199:                                              ; preds = %194
  store i32 0, ptr %26, align 4
  br label %200

200:                                              ; preds = %199, %198
  call void @llvm.lifetime.end.p0(i64 12, ptr %78) #7
  br label %201

201:                                              ; preds = %200, %193, %185
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #7
  %202 = load i32, ptr %26, align 4
  switch i32 %202, label %204 [
    i32 0, label %203
  ]

203:                                              ; preds = %201
  br label %98, !llvm.loop !22

204:                                              ; preds = %201
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %205

205:                                              ; preds = %204
  %206 = getelementptr inbounds %"class.squish::ClusterFit", ptr %91, i32 0, i32 7
  %207 = call noundef zeroext i1 @_ZN6squish18CompareAnyLessThanERKNS_4Vec4ES2_(ptr noundef nonnull align 16 dereferenceable(16) %17, ptr noundef nonnull align 16 dereferenceable(16) %206)
  br i1 %207, label %208, label %296

208:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 8, ptr %81) #7
  %209 = getelementptr inbounds %"class.squish::ClusterFit", ptr %91, i32 0, i32 3
  %210 = getelementptr inbounds [128 x i8], ptr %209, i64 0, i64 0
  %211 = load i32, ptr %19, align 4, !tbaa !12
  %212 = mul nsw i32 16, %211
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds i8, ptr %210, i64 %213
  store ptr %214, ptr %81, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %82) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %83) #7
  store i32 0, ptr %83, align 4, !tbaa !12
  br label %215

215:                                              ; preds = %228, %208
  %216 = load i32, ptr %83, align 4, !tbaa !12
  %217 = load i32, ptr %20, align 4, !tbaa !12
  %218 = icmp slt i32 %216, %217
  br i1 %218, label %220, label %219

219:                                              ; preds = %215
  store i32 11, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %83) #7
  br label %231

220:                                              ; preds = %215
  %221 = load ptr, ptr %81, align 8, !tbaa !5
  %222 = load i32, ptr %83, align 4, !tbaa !12
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds i8, ptr %221, i64 %223
  %225 = load i8, ptr %224, align 1, !tbaa !23
  %226 = zext i8 %225 to i64
  %227 = getelementptr inbounds [16 x i8], ptr %82, i64 0, i64 %226
  store i8 0, ptr %227, align 1, !tbaa !23
  br label %228

228:                                              ; preds = %220
  %229 = load i32, ptr %83, align 4, !tbaa !12
  %230 = add nsw i32 %229, 1
  store i32 %230, ptr %83, align 4, !tbaa !12
  br label %215, !llvm.loop !24

231:                                              ; preds = %219
  call void @llvm.lifetime.start.p0(i64 4, ptr %84) #7
  %232 = load i32, ptr %20, align 4, !tbaa !12
  store i32 %232, ptr %84, align 4, !tbaa !12
  br label %233

233:                                              ; preds = %246, %231
  %234 = load i32, ptr %84, align 4, !tbaa !12
  %235 = load i32, ptr %21, align 4, !tbaa !12
  %236 = icmp slt i32 %234, %235
  br i1 %236, label %238, label %237

237:                                              ; preds = %233
  store i32 14, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %84) #7
  br label %249

238:                                              ; preds = %233
  %239 = load ptr, ptr %81, align 8, !tbaa !5
  %240 = load i32, ptr %84, align 4, !tbaa !12
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds i8, ptr %239, i64 %241
  %243 = load i8, ptr %242, align 1, !tbaa !23
  %244 = zext i8 %243 to i64
  %245 = getelementptr inbounds [16 x i8], ptr %82, i64 0, i64 %244
  store i8 2, ptr %245, align 1, !tbaa !23
  br label %246

246:                                              ; preds = %238
  %247 = load i32, ptr %84, align 4, !tbaa !12
  %248 = add nsw i32 %247, 1
  store i32 %248, ptr %84, align 4, !tbaa !12
  br label %233, !llvm.loop !25

249:                                              ; preds = %237
  call void @llvm.lifetime.start.p0(i64 4, ptr %85) #7
  %250 = load i32, ptr %21, align 4, !tbaa !12
  store i32 %250, ptr %85, align 4, !tbaa !12
  br label %251

251:                                              ; preds = %264, %249
  %252 = load i32, ptr %85, align 4, !tbaa !12
  %253 = load i32, ptr %22, align 4, !tbaa !12
  %254 = icmp slt i32 %252, %253
  br i1 %254, label %256, label %255

255:                                              ; preds = %251
  store i32 17, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %85) #7
  br label %267

256:                                              ; preds = %251
  %257 = load ptr, ptr %81, align 8, !tbaa !5
  %258 = load i32, ptr %85, align 4, !tbaa !12
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds i8, ptr %257, i64 %259
  %261 = load i8, ptr %260, align 1, !tbaa !23
  %262 = zext i8 %261 to i64
  %263 = getelementptr inbounds [16 x i8], ptr %82, i64 0, i64 %262
  store i8 3, ptr %263, align 1, !tbaa !23
  br label %264

264:                                              ; preds = %256
  %265 = load i32, ptr %85, align 4, !tbaa !12
  %266 = add nsw i32 %265, 1
  store i32 %266, ptr %85, align 4, !tbaa !12
  br label %251, !llvm.loop !26

267:                                              ; preds = %255
  call void @llvm.lifetime.start.p0(i64 4, ptr %86) #7
  %268 = load i32, ptr %22, align 4, !tbaa !12
  store i32 %268, ptr %86, align 4, !tbaa !12
  br label %269

269:                                              ; preds = %282, %267
  %270 = load i32, ptr %86, align 4, !tbaa !12
  %271 = load i32, ptr %5, align 4, !tbaa !12
  %272 = icmp slt i32 %270, %271
  br i1 %272, label %274, label %273

273:                                              ; preds = %269
  store i32 20, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %86) #7
  br label %285

274:                                              ; preds = %269
  %275 = load ptr, ptr %81, align 8, !tbaa !5
  %276 = load i32, ptr %86, align 4, !tbaa !12
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds i8, ptr %275, i64 %277
  %279 = load i8, ptr %278, align 1, !tbaa !23
  %280 = zext i8 %279 to i64
  %281 = getelementptr inbounds [16 x i8], ptr %82, i64 0, i64 %280
  store i8 1, ptr %281, align 1, !tbaa !23
  br label %282

282:                                              ; preds = %274
  %283 = load i32, ptr %86, align 4, !tbaa !12
  %284 = add nsw i32 %283, 1
  store i32 %284, ptr %86, align 4, !tbaa !12
  br label %269, !llvm.loop !27

285:                                              ; preds = %273
  %286 = getelementptr inbounds %"class.squish::ColourFit", ptr %91, i32 0, i32 1
  %287 = load ptr, ptr %286, align 8, !tbaa !9
  %288 = getelementptr inbounds [16 x i8], ptr %82, i64 0, i64 0
  %289 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 0
  call void @_ZNK6squish9ColourSet12RemapIndicesEPKhPh(ptr noundef nonnull align 4 dereferenceable(325) %287, ptr noundef %288, ptr noundef %289)
  call void @llvm.lifetime.start.p0(i64 12, ptr %87) #7
  %290 = call { <2 x float>, float } @_ZNK6squish4Vec47GetVec3Ev(ptr noundef nonnull align 16 dereferenceable(16) %15)
  store { <2 x float>, float } %290, ptr %88, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %87, ptr align 8 %88, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %89) #7
  %291 = call { <2 x float>, float } @_ZNK6squish4Vec47GetVec3Ev(ptr noundef nonnull align 16 dereferenceable(16) %16)
  store { <2 x float>, float } %291, ptr %90, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %89, ptr align 8 %90, i64 12, i1 false)
  %292 = getelementptr inbounds [16 x i8], ptr %18, i64 0, i64 0
  %293 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN6squish17WriteColourBlock4ERKNS_4Vec3ES2_PKhPv(ptr noundef nonnull align 4 dereferenceable(12) %87, ptr noundef nonnull align 4 dereferenceable(12) %89, ptr noundef %292, ptr noundef %293)
  call void @llvm.lifetime.end.p0(i64 12, ptr %89) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %87) #7
  %294 = getelementptr inbounds %"class.squish::ClusterFit", ptr %91, i32 0, i32 7
  %295 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN6squish4Vec4aSERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %294, ptr noundef nonnull align 16 dereferenceable(16) %17)
  call void @llvm.lifetime.end.p0(i64 16, ptr %82) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %81) #7
  br label %296

296:                                              ; preds = %285, %205
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  ret void
}

declare void @_ZN6squish17WriteColourBlock4ERKNS_4Vec3ES2_PKhPv(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef, ptr noundef) #5

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"_ZTSN6squish9ColourFitE", !6, i64 8, !11, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = !{!18, !11, i64 20}
!18 = !{!"_ZTSN6squish10ClusterFitE", !10, i64 0, !11, i64 20, !19, i64 24, !7, i64 36, !7, i64 176, !21, i64 432, !21, i64 448, !21, i64 464}
!19 = !{!"_ZTSN6squish4Vec3E", !20, i64 0, !20, i64 4, !20, i64 8}
!20 = !{!"float", !7, i64 0}
!21 = !{!"_ZTSN6squish4Vec4E", !7, i64 0}
!22 = distinct !{!22, !14}
!23 = !{!7, !7, i64 0}
!24 = distinct !{!24, !14}
!25 = distinct !{!25, !14}
!26 = distinct !{!26, !14}
!27 = distinct !{!27, !14}


; 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.squish::Vec4" = type { <4 x float> }
%"class.squish::Vec3" = type { float, float, float }

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6squish4Vec4C2Effff(ptr noundef nonnull align 16 dereferenceable(16), float noundef, float noundef, float noundef, float noundef) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16), float noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6squish9ColourSet8GetCountEv(ptr noundef nonnull align 4 dereferenceable(325)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6squish10ClusterFit17ConstructOrderingERKNS_4Vec3Ei(ptr noundef nonnull align 16 dereferenceable(480), ptr noundef nonnull align 4 dereferenceable(12), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6squish4Vec4C2ERKS0_(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6squishmiERKNS_4Vec4ES2_(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6squish11MultiplyAddERKNS_4Vec4ES2_S2_(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6squish4Vec46SplatWEv(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6squish10ReciprocalERKNS_4Vec4E(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6squish24NegativeMultiplySubtractERKNS_4Vec4ES2_S2_(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6squish3MinERKNS_4Vec4ES2_(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6squish3MaxERKNS_4Vec4ES2_(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6squish8TruncateERKNS_4Vec4E(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6squishplERKNS_4Vec4ES2_(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6squish4Vec46SplatXEv(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6squish4Vec46SplatYEv(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6squish4Vec46SplatZEv(ptr dead_on_unwind noalias writable sret(%"class.squish::Vec4") align 16, ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6squish18CompareAnyLessThanERKNS_4Vec4ES2_(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZNK6squish4Vec47GetVec3Ev(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #1 align 2

declare void @_ZNK6squish9ColourSet12RemapIndicesEPKhPh(ptr noundef nonnull align 4 dereferenceable(325), ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6squish10ClusterFit9Compress4EPv(ptr noundef nonnull align 16 dereferenceable(480) %0, ptr noundef %1) unnamed_addr #5 align 2 {
  %3 = alloca %"class.squish::Vec4", align 16
  %4 = alloca %"class.squish::Vec4", align 16
  %5 = alloca %"class.squish::Vec4", align 16
  %6 = alloca %"class.squish::Vec4", align 16
  %7 = alloca %"class.squish::Vec4", align 16
  %8 = alloca %"class.squish::Vec4", align 16
  %9 = alloca %"class.squish::Vec4", align 16
  %10 = alloca %"class.squish::Vec4", align 16
  %11 = alloca %"class.squish::Vec4", align 16
  %12 = alloca %"class.squish::Vec4", align 16
  %13 = alloca %"class.squish::Vec4", align 16
  %14 = alloca %"class.squish::Vec4", align 16
  %15 = alloca [16 x i8], align 16
  %16 = alloca %"class.squish::Vec4", align 16
  %17 = alloca %"class.squish::Vec4", align 16
  %18 = alloca %"class.squish::Vec4", align 16
  %19 = alloca %"class.squish::Vec4", align 16
  %20 = alloca %"class.squish::Vec4", align 16
  %21 = alloca %"class.squish::Vec4", align 16
  %22 = alloca %"class.squish::Vec4", align 16
  %23 = alloca %"class.squish::Vec4", align 16
  %24 = alloca %"class.squish::Vec4", align 16
  %25 = alloca %"class.squish::Vec4", align 16
  %26 = alloca %"class.squish::Vec4", align 16
  %27 = alloca %"class.squish::Vec4", align 16
  %28 = alloca %"class.squish::Vec4", align 16
  %29 = alloca %"class.squish::Vec4", align 16
  %30 = alloca %"class.squish::Vec4", align 16
  %31 = alloca %"class.squish::Vec4", align 16
  %32 = alloca %"class.squish::Vec4", align 16
  %33 = alloca %"class.squish::Vec4", align 16
  %34 = alloca %"class.squish::Vec4", align 16
  %35 = alloca %"class.squish::Vec4", align 16
  %36 = alloca %"class.squish::Vec4", align 16
  %37 = alloca %"class.squish::Vec4", align 16
  %38 = alloca %"class.squish::Vec4", align 16
  %39 = alloca %"class.squish::Vec4", align 16
  %40 = alloca %"class.squish::Vec4", align 16
  %41 = alloca %"class.squish::Vec4", align 16
  %42 = alloca %"class.squish::Vec4", align 16
  %43 = alloca %"class.squish::Vec4", align 16
  %44 = alloca %"class.squish::Vec4", align 16
  %45 = alloca %"class.squish::Vec4", align 16
  %46 = alloca %"class.squish::Vec4", align 16
  %47 = alloca %"class.squish::Vec4", align 16
  %48 = alloca %"class.squish::Vec4", align 16
  %49 = alloca %"class.squish::Vec4", align 16
  %50 = alloca %"class.squish::Vec4", align 16
  %51 = alloca %"class.squish::Vec4", align 16
  %52 = alloca %"class.squish::Vec4", align 16
  %53 = alloca %"class.squish::Vec4", align 16
  %54 = alloca %"class.squish::Vec4", align 16
  %55 = alloca %"class.squish::Vec4", align 16
  %56 = alloca %"class.squish::Vec4", align 16
  %57 = alloca %"class.squish::Vec4", align 16
  %58 = alloca %"class.squish::Vec4", align 16
  %59 = alloca %"class.squish::Vec4", align 16
  %60 = alloca %"class.squish::Vec4", align 16
  %61 = alloca %"class.squish::Vec4", align 16
  %62 = alloca %"class.squish::Vec4", align 16
  %63 = alloca %"class.squish::Vec4", align 16
  %64 = alloca %"class.squish::Vec4", align 16
  %65 = alloca %"class.squish::Vec3", align 8
  %66 = alloca %"class.squish::Vec4", align 16
  %67 = alloca [16 x i8], align 16
  %68 = alloca %"class.squish::Vec3", align 8
  %69 = alloca %"class.squish::Vec3", align 8
  %70 = getelementptr inbounds i8, ptr %0, i64 8
  %71 = load ptr, ptr %70, align 8, !tbaa !5
  %72 = tail call noundef i32 @_ZNK6squish9ColourSet8GetCountEv(ptr noundef nonnull align 4 dereferenceable(325) %71)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  call void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16) %3, float noundef 2.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  call void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16) %4, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  call void @_ZN6squish4Vec4C2Effff(ptr noundef nonnull align 16 dereferenceable(16) %5, float noundef 0x3FD5555560000000, float noundef 0x3FD5555560000000, float noundef 0x3FD5555560000000, float noundef 0x3FBC71C720000000)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  call void @_ZN6squish4Vec4C2Effff(ptr noundef nonnull align 16 dereferenceable(16) %6, float noundef 0x3FE5555560000000, float noundef 0x3FE5555560000000, float noundef 0x3FE5555560000000, float noundef 0x3FDC71C720000000)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  call void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16) %7, float noundef 0x3FCC71C720000000)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #7
  call void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16) %8, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #7
  call void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16) %9, float noundef 5.000000e-01)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #7
  call void @_ZN6squish4Vec4C2Effff(ptr noundef nonnull align 16 dereferenceable(16) %10, float noundef 3.100000e+01, float noundef 6.300000e+01, float noundef 3.100000e+01, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  call void @_ZN6squish4Vec4C2Effff(ptr noundef nonnull align 16 dereferenceable(16) %11, float noundef 0x3FA0842100000000, float noundef 0x3F90410420000000, float noundef 0x3FA0842100000000, float noundef 0.000000e+00)
  %73 = getelementptr inbounds i8, ptr %0, i64 24
  %74 = call noundef zeroext i1 @_ZN6squish10ClusterFit17ConstructOrderingERKNS_4Vec3Ei(ptr noundef nonnull align 16 dereferenceable(480) %0, ptr noundef nonnull align 4 dereferenceable(12) %73, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #7
  call void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16) %12, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  call void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16) %13, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #7
  %75 = getelementptr inbounds i8, ptr %0, i64 464
  call void @_ZN6squish4Vec4C2ERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %14, ptr noundef nonnull align 16 dereferenceable(16) %75)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #7
  %76 = icmp sgt i32 %72, 0
  %77 = getelementptr inbounds i8, ptr %0, i64 176
  %78 = getelementptr inbounds i8, ptr %0, i64 432
  %79 = getelementptr inbounds i8, ptr %0, i64 448
  %80 = getelementptr inbounds i8, ptr %0, i64 20
  %.sroa.224.0..sroa_idx = getelementptr inbounds i8, ptr %65, i64 8
  br i1 %76, label %.lr.ph.us.preheader, label %.split

.lr.ph.us.preheader:                              ; preds = %2
  %81 = zext nneg i32 %72 to i64
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %89
  %.083.us = phi i32 [ %83, %89 ], [ 0, %.lr.ph.us.preheader ]
  %.074.us = phi i32 [ %.478.us, %89 ], [ 0, %.lr.ph.us.preheader ]
  %.069.us = phi i32 [ %.473.us, %89 ], [ 0, %.lr.ph.us.preheader ]
  %.064.us = phi i32 [ %.468.us, %89 ], [ 0, %.lr.ph.us.preheader ]
  %.0.us = phi i32 [ %.083.us, %89 ], [ 0, %.lr.ph.us.preheader ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #7
  call void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16) %16, float noundef 0.000000e+00)
  br label %90

82:                                               ; preds = %._crit_edge.us
  %83 = add nuw nsw i32 %.083.us, 1
  %84 = load i32, ptr %80, align 4, !tbaa !11
  %85 = icmp eq i32 %83, %84
  br i1 %85, label %.split118.us.loopexit, label %86

86:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %65) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %66) #7
  call void @_ZN6squishmiERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %66, ptr noundef nonnull align 16 dereferenceable(16) %13, ptr noundef nonnull align 16 dereferenceable(16) %12)
  %87 = call { <2 x float>, float } @_ZNK6squish4Vec47GetVec3Ev(ptr noundef nonnull align 16 dereferenceable(16) %66)
  %.fca.0.extract21.us = extractvalue { <2 x float>, float } %87, 0
  %.fca.1.extract22.us = extractvalue { <2 x float>, float } %87, 1
  store <2 x float> %.fca.0.extract21.us, ptr %65, align 8
  store float %.fca.1.extract22.us, ptr %.sroa.224.0..sroa_idx, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %66) #7
  %88 = call noundef zeroext i1 @_ZN6squish10ClusterFit17ConstructOrderingERKNS_4Vec3Ei(ptr noundef nonnull align 16 dereferenceable(480) %0, ptr noundef nonnull align 4 dereferenceable(12) %65, i32 noundef %83)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %65) #7
  br i1 %88, label %89, label %.split118.us.loopexit

89:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  br label %.lr.ph.us, !llvm.loop !16

90:                                               ; preds = %.lr.ph.us, %117
  %indvars.iv = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next, %117 ]
  %.1113.us = phi i32 [ %.0.us, %.lr.ph.us ], [ %.4.us, %117 ]
  %.165112.us = phi i32 [ %.064.us, %.lr.ph.us ], [ %.468.us, %117 ]
  %.170111.us = phi i32 [ %.069.us, %.lr.ph.us ], [ %.473.us, %117 ]
  %.175110.us = phi i32 [ %.074.us, %.lr.ph.us ], [ %.478.us, %117 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #7
  call void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16) %17, float noundef 0.000000e+00)
  %91 = trunc nuw nsw i64 %indvars.iv to i32
  br label %92

92:                                               ; preds = %114, %90
  %indvars.iv131 = phi i64 [ %indvars.iv.next132, %114 ], [ %indvars.iv, %90 ]
  %.276.us = phi i32 [ %.478.us, %114 ], [ %.175110.us, %90 ]
  %.271.us = phi i32 [ %.473.us, %114 ], [ %.170111.us, %90 ]
  %.266.us = phi i32 [ %.468.us, %114 ], [ %.165112.us, %90 ]
  %.2.us = phi i32 [ %.4.us, %114 ], [ %.1113.us, %90 ]
  %umax = call i64 @llvm.umax.i64(i64 %indvars.iv131, i64 1)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #7
  %93 = icmp eq i64 %indvars.iv131, 0
  br i1 %93, label %95, label %94

94:                                               ; preds = %92
  call void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16) %18, float noundef 0.000000e+00)
  br label %96

95:                                               ; preds = %92
  call void @_ZN6squish4Vec4C2ERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %18, ptr noundef nonnull align 16 dereferenceable(16) %77)
  br label %96

96:                                               ; preds = %95, %94
  %97 = trunc nuw nsw i64 %indvars.iv131 to i32
  br label %98

98:                                               ; preds = %110, %96
  %indvars.iv133 = phi i64 [ %indvars.iv.next134, %110 ], [ %umax, %96 ]
  %.377.us = phi i32 [ %.478.us, %110 ], [ %.276.us, %96 ]
  %.372.us = phi i32 [ %.473.us, %110 ], [ %.271.us, %96 ]
  %.367.us = phi i32 [ %.468.us, %110 ], [ %.266.us, %96 ]
  %.3.us = phi i32 [ %.4.us, %110 ], [ %.2.us, %96 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %21) #7
  call void @_ZN6squishmiERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %21, ptr noundef nonnull align 16 dereferenceable(16) %78, ptr noundef nonnull align 16 dereferenceable(16) %18)
  call void @_ZN6squishmiERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %20, ptr noundef nonnull align 16 dereferenceable(16) %21, ptr noundef nonnull align 16 dereferenceable(16) %17)
  call void @_ZN6squishmiERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %19, ptr noundef nonnull align 16 dereferenceable(16) %20, ptr noundef nonnull align 16 dereferenceable(16) %16)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %22) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %23) #7
  call void @_ZN6squish11MultiplyAddERKNS_4Vec4ES2_S2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %23, ptr noundef nonnull align 16 dereferenceable(16) %17, ptr noundef nonnull align 16 dereferenceable(16) %6, ptr noundef nonnull align 16 dereferenceable(16) %16)
  call void @_ZN6squish11MultiplyAddERKNS_4Vec4ES2_S2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %22, ptr noundef nonnull align 16 dereferenceable(16) %18, ptr noundef nonnull align 16 dereferenceable(16) %5, ptr noundef nonnull align 16 dereferenceable(16) %23)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %24) #7
  call void @_ZNK6squish4Vec46SplatWEv(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %24, ptr noundef nonnull align 16 dereferenceable(16) %22)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %25) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %26) #7
  call void @_ZN6squish11MultiplyAddERKNS_4Vec4ES2_S2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %26, ptr noundef nonnull align 16 dereferenceable(16) %18, ptr noundef nonnull align 16 dereferenceable(16) %6, ptr noundef nonnull align 16 dereferenceable(16) %19)
  call void @_ZN6squish11MultiplyAddERKNS_4Vec4ES2_S2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %25, ptr noundef nonnull align 16 dereferenceable(16) %17, ptr noundef nonnull align 16 dereferenceable(16) %5, ptr noundef nonnull align 16 dereferenceable(16) %26)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %26) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %27) #7
  call void @_ZNK6squish4Vec46SplatWEv(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %27, ptr noundef nonnull align 16 dereferenceable(16) %25)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %28) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %29) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %30) #7
  call void @_ZN6squishplERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %30, ptr noundef nonnull align 16 dereferenceable(16) %17, ptr noundef nonnull align 16 dereferenceable(16) %18)
  call void @_ZNK6squish4Vec46SplatWEv(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %29, ptr noundef nonnull align 16 dereferenceable(16) %30)
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %28, ptr noundef nonnull align 16 dereferenceable(16) %7, ptr noundef nonnull align 16 dereferenceable(16) %29)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %30) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %29) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %31) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %32) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %33) #7
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %33, ptr noundef nonnull align 16 dereferenceable(16) %24, ptr noundef nonnull align 16 dereferenceable(16) %27)
  call void @_ZN6squish24NegativeMultiplySubtractERKNS_4Vec4ES2_S2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %32, ptr noundef nonnull align 16 dereferenceable(16) %28, ptr noundef nonnull align 16 dereferenceable(16) %28, ptr noundef nonnull align 16 dereferenceable(16) %33)
  call void @_ZN6squish10ReciprocalERKNS_4Vec4E(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %31, ptr noundef nonnull align 16 dereferenceable(16) %32)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %33) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %32) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %34) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %35) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %36) #7
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %36, ptr noundef nonnull align 16 dereferenceable(16) %22, ptr noundef nonnull align 16 dereferenceable(16) %27)
  call void @_ZN6squish24NegativeMultiplySubtractERKNS_4Vec4ES2_S2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %35, ptr noundef nonnull align 16 dereferenceable(16) %25, ptr noundef nonnull align 16 dereferenceable(16) %28, ptr noundef nonnull align 16 dereferenceable(16) %36)
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %34, ptr noundef nonnull align 16 dereferenceable(16) %35, ptr noundef nonnull align 16 dereferenceable(16) %31)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %36) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %35) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %37) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %38) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %39) #7
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %39, ptr noundef nonnull align 16 dereferenceable(16) %25, ptr noundef nonnull align 16 dereferenceable(16) %24)
  call void @_ZN6squish24NegativeMultiplySubtractERKNS_4Vec4ES2_S2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %38, ptr noundef nonnull align 16 dereferenceable(16) %22, ptr noundef nonnull align 16 dereferenceable(16) %28, ptr noundef nonnull align 16 dereferenceable(16) %39)
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %37, ptr noundef nonnull align 16 dereferenceable(16) %38, ptr noundef nonnull align 16 dereferenceable(16) %31)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %39) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %38) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %40) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %41) #7
  call void @_ZN6squish3MaxERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %41, ptr noundef nonnull align 16 dereferenceable(16) %8, ptr noundef nonnull align 16 dereferenceable(16) %34)
  call void @_ZN6squish3MinERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %40, ptr noundef nonnull align 16 dereferenceable(16) %4, ptr noundef nonnull align 16 dereferenceable(16) %41)
  %99 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN6squish4Vec4aSERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %34, ptr noundef nonnull align 16 dereferenceable(16) %40)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %41) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %40) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %42) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %43) #7
  call void @_ZN6squish3MaxERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %43, ptr noundef nonnull align 16 dereferenceable(16) %8, ptr noundef nonnull align 16 dereferenceable(16) %37)
  call void @_ZN6squish3MinERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %42, ptr noundef nonnull align 16 dereferenceable(16) %4, ptr noundef nonnull align 16 dereferenceable(16) %43)
  %100 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN6squish4Vec4aSERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %37, ptr noundef nonnull align 16 dereferenceable(16) %42)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %43) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %42) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %44) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %45) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %46) #7
  call void @_ZN6squish11MultiplyAddERKNS_4Vec4ES2_S2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %46, ptr noundef nonnull align 16 dereferenceable(16) %10, ptr noundef nonnull align 16 dereferenceable(16) %34, ptr noundef nonnull align 16 dereferenceable(16) %9)
  call void @_ZN6squish8TruncateERKNS_4Vec4E(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %45, ptr noundef nonnull align 16 dereferenceable(16) %46)
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %44, ptr noundef nonnull align 16 dereferenceable(16) %45, ptr noundef nonnull align 16 dereferenceable(16) %11)
  %101 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN6squish4Vec4aSERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %34, ptr noundef nonnull align 16 dereferenceable(16) %44)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %46) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %45) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %44) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %47) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %48) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %49) #7
  call void @_ZN6squish11MultiplyAddERKNS_4Vec4ES2_S2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %49, ptr noundef nonnull align 16 dereferenceable(16) %10, ptr noundef nonnull align 16 dereferenceable(16) %37, ptr noundef nonnull align 16 dereferenceable(16) %9)
  call void @_ZN6squish8TruncateERKNS_4Vec4E(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %48, ptr noundef nonnull align 16 dereferenceable(16) %49)
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %47, ptr noundef nonnull align 16 dereferenceable(16) %48, ptr noundef nonnull align 16 dereferenceable(16) %11)
  %102 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN6squish4Vec4aSERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %37, ptr noundef nonnull align 16 dereferenceable(16) %47)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %49) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %48) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %47) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %50) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %51) #7
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %51, ptr noundef nonnull align 16 dereferenceable(16) %34, ptr noundef nonnull align 16 dereferenceable(16) %34)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %52) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %53) #7
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %53, ptr noundef nonnull align 16 dereferenceable(16) %37, ptr noundef nonnull align 16 dereferenceable(16) %37)
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %52, ptr noundef nonnull align 16 dereferenceable(16) %53, ptr noundef nonnull align 16 dereferenceable(16) %27)
  call void @_ZN6squish11MultiplyAddERKNS_4Vec4ES2_S2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %50, ptr noundef nonnull align 16 dereferenceable(16) %51, ptr noundef nonnull align 16 dereferenceable(16) %24, ptr noundef nonnull align 16 dereferenceable(16) %52)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %53) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %52) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %51) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %54) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %55) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %56) #7
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %56, ptr noundef nonnull align 16 dereferenceable(16) %34, ptr noundef nonnull align 16 dereferenceable(16) %37)
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %55, ptr noundef nonnull align 16 dereferenceable(16) %56, ptr noundef nonnull align 16 dereferenceable(16) %28)
  call void @_ZN6squish24NegativeMultiplySubtractERKNS_4Vec4ES2_S2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %54, ptr noundef nonnull align 16 dereferenceable(16) %34, ptr noundef nonnull align 16 dereferenceable(16) %22, ptr noundef nonnull align 16 dereferenceable(16) %55)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %56) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %55) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %57) #7
  call void @_ZN6squish24NegativeMultiplySubtractERKNS_4Vec4ES2_S2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %57, ptr noundef nonnull align 16 dereferenceable(16) %37, ptr noundef nonnull align 16 dereferenceable(16) %25, ptr noundef nonnull align 16 dereferenceable(16) %54)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %58) #7
  call void @_ZN6squish11MultiplyAddERKNS_4Vec4ES2_S2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %58, ptr noundef nonnull align 16 dereferenceable(16) %3, ptr noundef nonnull align 16 dereferenceable(16) %57, ptr noundef nonnull align 16 dereferenceable(16) %50)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %59) #7
  call void @_ZN6squishmlERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %59, ptr noundef nonnull align 16 dereferenceable(16) %58, ptr noundef nonnull align 16 dereferenceable(16) %79)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %60) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %61) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %62) #7
  call void @_ZNK6squish4Vec46SplatXEv(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %62, ptr noundef nonnull align 16 dereferenceable(16) %59)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %63) #7
  call void @_ZNK6squish4Vec46SplatYEv(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %63, ptr noundef nonnull align 16 dereferenceable(16) %59)
  call void @_ZN6squishplERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %61, ptr noundef nonnull align 16 dereferenceable(16) %62, ptr noundef nonnull align 16 dereferenceable(16) %63)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %64) #7
  call void @_ZNK6squish4Vec46SplatZEv(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %64, ptr noundef nonnull align 16 dereferenceable(16) %59)
  call void @_ZN6squishplERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %60, ptr noundef nonnull align 16 dereferenceable(16) %61, ptr noundef nonnull align 16 dereferenceable(16) %64)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %64) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %63) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %62) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %61) #7
  %103 = call noundef zeroext i1 @_ZN6squish18CompareAnyLessThanERKNS_4Vec4ES2_(ptr noundef nonnull align 16 dereferenceable(16) %60, ptr noundef nonnull align 16 dereferenceable(16) %14)
  br i1 %103, label %104, label %109

104:                                              ; preds = %98
  %105 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN6squish4Vec4aSERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %12, ptr noundef nonnull align 16 dereferenceable(16) %34)
  %106 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN6squish4Vec4aSERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %13, ptr noundef nonnull align 16 dereferenceable(16) %37)
  %107 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN6squish4Vec4aSERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %14, ptr noundef nonnull align 16 dereferenceable(16) %60)
  %108 = trunc nuw nsw i64 %indvars.iv133 to i32
  br label %109

109:                                              ; preds = %104, %98
  %.478.us = phi i32 [ %108, %104 ], [ %.377.us, %98 ]
  %.473.us = phi i32 [ %97, %104 ], [ %.372.us, %98 ]
  %.468.us = phi i32 [ %91, %104 ], [ %.367.us, %98 ]
  %.4.us = phi i32 [ %.083.us, %104 ], [ %.3.us, %98 ]
  %.not98.us = icmp eq i64 %indvars.iv133, %81
  br i1 %.not98.us, label %113, label %110

110:                                              ; preds = %109
  %111 = getelementptr inbounds [16 x %"class.squish::Vec4"], ptr %77, i64 0, i64 %indvars.iv133
  %112 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN6squish4Vec4pLERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %18, ptr noundef nonnull align 16 dereferenceable(16) %111)
  %indvars.iv.next134 = add nuw nsw i64 %indvars.iv133, 1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %60) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %59) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %58) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %57) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %54) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %50) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %37) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %34) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %31) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %28) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %27) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %25) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #7
  br label %98

113:                                              ; preds = %109
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %60) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %59) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %58) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %57) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %54) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %50) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %37) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %34) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %31) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %28) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %27) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %25) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #7
  %.not99.us = icmp eq i64 %indvars.iv131, %81
  br i1 %.not99.us, label %117, label %114

114:                                              ; preds = %113
  %115 = getelementptr inbounds [16 x %"class.squish::Vec4"], ptr %77, i64 0, i64 %indvars.iv131
  %116 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN6squish4Vec4pLERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %17, ptr noundef nonnull align 16 dereferenceable(16) %115)
  %indvars.iv.next132 = add nuw nsw i64 %indvars.iv131, 1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #7
  br label %92

117:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #7
  %118 = getelementptr inbounds [16 x %"class.squish::Vec4"], ptr %77, i64 0, i64 %indvars.iv
  %119 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN6squish4Vec4pLERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %16, ptr noundef nonnull align 16 dereferenceable(16) %118)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %81
  br i1 %exitcond.not, label %._crit_edge.us, label %90, !llvm.loop !18

._crit_edge.us:                                   ; preds = %117
  %.not.us = icmp eq i32 %.4.us, %.083.us
  br i1 %.not.us, label %82, label %.split118.us.loopexit

.split:                                           ; preds = %2
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #7
  call void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16) %16, float noundef 0.000000e+00)
  %120 = load i32, ptr %80, align 4, !tbaa !11
  %121 = icmp eq i32 %120, 1
  br i1 %121, label %.split118.us, label %122

122:                                              ; preds = %.split
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %65) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %66) #7
  call void @_ZN6squishmiERKNS_4Vec4ES2_(ptr dead_on_unwind nonnull writable sret(%"class.squish::Vec4") align 16 %66, ptr noundef nonnull align 16 dereferenceable(16) %13, ptr noundef nonnull align 16 dereferenceable(16) %12)
  %123 = call { <2 x float>, float } @_ZNK6squish4Vec47GetVec3Ev(ptr noundef nonnull align 16 dereferenceable(16) %66)
  %.fca.0.extract21 = extractvalue { <2 x float>, float } %123, 0
  %.fca.1.extract22 = extractvalue { <2 x float>, float } %123, 1
  store <2 x float> %.fca.0.extract21, ptr %65, align 8
  store float %.fca.1.extract22, ptr %.sroa.224.0..sroa_idx, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %66) #7
  %124 = call noundef zeroext i1 @_ZN6squish10ClusterFit17ConstructOrderingERKNS_4Vec3Ei(ptr noundef nonnull align 16 dereferenceable(480) %0, ptr noundef nonnull align 4 dereferenceable(12) %65, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %65) #7
  br i1 %124, label %125, label %.split118.us

125:                                              ; preds = %122
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #7
  call void @_ZN6squish4Vec4C2Ef(ptr noundef nonnull align 16 dereferenceable(16) %16, float noundef 0.000000e+00)
  br label %.split118.us

.split118.us.loopexit:                            ; preds = %86, %82, %._crit_edge.us
  %.4.us.lcssa.lcssa.lcssa.lcssa = phi i32 [ %.083.us, %86 ], [ %.083.us, %82 ], [ %.4.us, %._crit_edge.us ]
  %126 = shl nsw i32 %.4.us.lcssa.lcssa.lcssa.lcssa, 4
  %127 = sext i32 %126 to i64
  br label %.split118.us

.split118.us:                                     ; preds = %.split, %122, %125, %.split118.us.loopexit
  %.us-phi = phi i32 [ %.478.us, %.split118.us.loopexit ], [ 0, %125 ], [ 0, %122 ], [ 0, %.split ]
  %.us-phi119 = phi i32 [ %.473.us, %.split118.us.loopexit ], [ 0, %125 ], [ 0, %122 ], [ 0, %.split ]
  %.us-phi120 = phi i32 [ %.468.us, %.split118.us.loopexit ], [ 0, %125 ], [ 0, %122 ], [ 0, %.split ]
  %.us-phi121 = phi i64 [ %127, %.split118.us.loopexit ], [ 0, %125 ], [ 0, %122 ], [ 0, %.split ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  %128 = call noundef zeroext i1 @_ZN6squish18CompareAnyLessThanERKNS_4Vec4ES2_(ptr noundef nonnull align 16 dereferenceable(16) %14, ptr noundef nonnull align 16 dereferenceable(16) %75)
  br i1 %128, label %129, label %224

129:                                              ; preds = %.split118.us
  %130 = getelementptr inbounds i8, ptr %0, i64 36
  %131 = getelementptr inbounds i8, ptr %130, i64 %.us-phi121
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %67) #7
  %132 = icmp sgt i32 %.us-phi120, 0
  br i1 %132, label %.lr.ph.preheader, label %.preheader108

.lr.ph.preheader:                                 ; preds = %129
  %wide.trip.count140 = zext nneg i32 %.us-phi120 to i64
  %xtraiter = and i64 %wide.trip.count140, 3
  %133 = icmp ult i32 %.us-phi120, 4
  br i1 %133, label %.preheader108.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %wide.trip.count140, 2147483644
  br label %.lr.ph

.preheader108.loopexit.unr-lcssa:                 ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv137.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next138.3, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader108, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.preheader108.loopexit.unr-lcssa, %.lr.ph.epil
  %indvars.iv137.epil = phi i64 [ %indvars.iv.next138.epil, %.lr.ph.epil ], [ %indvars.iv137.unr, %.preheader108.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %.preheader108.loopexit.unr-lcssa ]
  %134 = getelementptr inbounds i8, ptr %131, i64 %indvars.iv137.epil
  %135 = load i8, ptr %134, align 1, !tbaa !19
  %136 = zext i8 %135 to i64
  %137 = getelementptr inbounds [16 x i8], ptr %67, i64 0, i64 %136
  store i8 0, ptr %137, align 1, !tbaa !19
  %indvars.iv.next138.epil = add nuw nsw i64 %indvars.iv137.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader108, label %.lr.ph.epil, !llvm.loop !20

.preheader108:                                    ; preds = %.preheader108.loopexit.unr-lcssa, %.lr.ph.epil, %129
  %138 = icmp slt i32 %.us-phi120, %.us-phi119
  br i1 %138, label %.lr.ph125.preheader, label %.preheader107

.lr.ph125.preheader:                              ; preds = %.preheader108
  %139 = sext i32 %.us-phi120 to i64
  %wide.trip.count145 = sext i32 %.us-phi119 to i64
  %140 = sub nsw i64 %wide.trip.count145, %139
  %xtraiter157 = and i64 %140, 3
  %lcmp.mod158.not = icmp eq i64 %xtraiter157, 0
  br i1 %lcmp.mod158.not, label %.lr.ph125.prol.loopexit, label %.lr.ph125.prol

.lr.ph125.prol:                                   ; preds = %.lr.ph125.preheader, %.lr.ph125.prol
  %indvars.iv142.prol = phi i64 [ %indvars.iv.next143.prol, %.lr.ph125.prol ], [ %139, %.lr.ph125.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph125.prol ], [ 0, %.lr.ph125.preheader ]
  %141 = getelementptr inbounds i8, ptr %131, i64 %indvars.iv142.prol
  %142 = load i8, ptr %141, align 1, !tbaa !19
  %143 = zext i8 %142 to i64
  %144 = getelementptr inbounds [16 x i8], ptr %67, i64 0, i64 %143
  store i8 2, ptr %144, align 1, !tbaa !19
  %indvars.iv.next143.prol = add nsw i64 %indvars.iv142.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter157
  br i1 %prol.iter.cmp.not, label %.lr.ph125.prol.loopexit, label %.lr.ph125.prol, !llvm.loop !22

.lr.ph125.prol.loopexit:                          ; preds = %.lr.ph125.prol, %.lr.ph125.preheader
  %indvars.iv142.unr = phi i64 [ %139, %.lr.ph125.preheader ], [ %indvars.iv.next143.prol, %.lr.ph125.prol ]
  %145 = sub nsw i64 %139, %wide.trip.count145
  %146 = icmp ugt i64 %145, -4
  br i1 %146, label %.preheader107, label %.lr.ph125.preheader.new

.lr.ph125.preheader.new:                          ; preds = %.lr.ph125.prol.loopexit
  %invariant.gep = getelementptr i8, ptr %131, i64 1
  %invariant.gep165 = getelementptr i8, ptr %131, i64 2
  %invariant.gep167 = getelementptr i8, ptr %131, i64 3
  br label %.lr.ph125

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv137 = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next138.3, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %147 = getelementptr inbounds i8, ptr %131, i64 %indvars.iv137
  %148 = load i8, ptr %147, align 1, !tbaa !19
  %149 = zext i8 %148 to i64
  %150 = getelementptr inbounds [16 x i8], ptr %67, i64 0, i64 %149
  store i8 0, ptr %150, align 1, !tbaa !19
  %indvars.iv.next138 = or disjoint i64 %indvars.iv137, 1
  %151 = getelementptr inbounds i8, ptr %131, i64 %indvars.iv.next138
  %152 = load i8, ptr %151, align 1, !tbaa !19
  %153 = zext i8 %152 to i64
  %154 = getelementptr inbounds [16 x i8], ptr %67, i64 0, i64 %153
  store i8 0, ptr %154, align 1, !tbaa !19
  %indvars.iv.next138.1 = or disjoint i64 %indvars.iv137, 2
  %155 = getelementptr inbounds i8, ptr %131, i64 %indvars.iv.next138.1
  %156 = load i8, ptr %155, align 1, !tbaa !19
  %157 = zext i8 %156 to i64
  %158 = getelementptr inbounds [16 x i8], ptr %67, i64 0, i64 %157
  store i8 0, ptr %158, align 1, !tbaa !19
  %indvars.iv.next138.2 = or disjoint i64 %indvars.iv137, 3
  %159 = getelementptr inbounds i8, ptr %131, i64 %indvars.iv.next138.2
  %160 = load i8, ptr %159, align 1, !tbaa !19
  %161 = zext i8 %160 to i64
  %162 = getelementptr inbounds [16 x i8], ptr %67, i64 0, i64 %161
  store i8 0, ptr %162, align 1, !tbaa !19
  %indvars.iv.next138.3 = add nuw nsw i64 %indvars.iv137, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader108.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !23

.preheader107:                                    ; preds = %.lr.ph125.prol.loopexit, %.lr.ph125, %.preheader108
  %163 = icmp slt i32 %.us-phi119, %.us-phi
  br i1 %163, label %.lr.ph127.preheader, label %.preheader

.lr.ph127.preheader:                              ; preds = %.preheader107
  %164 = sext i32 %.us-phi119 to i64
  %wide.trip.count150 = sext i32 %.us-phi to i64
  %165 = sub nsw i64 %wide.trip.count150, %164
  %xtraiter159 = and i64 %165, 3
  %lcmp.mod160.not = icmp eq i64 %xtraiter159, 0
  br i1 %lcmp.mod160.not, label %.lr.ph127.prol.loopexit, label %.lr.ph127.prol

.lr.ph127.prol:                                   ; preds = %.lr.ph127.preheader, %.lr.ph127.prol
  %indvars.iv147.prol = phi i64 [ %indvars.iv.next148.prol, %.lr.ph127.prol ], [ %164, %.lr.ph127.preheader ]
  %prol.iter161 = phi i64 [ %prol.iter161.next, %.lr.ph127.prol ], [ 0, %.lr.ph127.preheader ]
  %166 = getelementptr inbounds i8, ptr %131, i64 %indvars.iv147.prol
  %167 = load i8, ptr %166, align 1, !tbaa !19
  %168 = zext i8 %167 to i64
  %169 = getelementptr inbounds [16 x i8], ptr %67, i64 0, i64 %168
  store i8 3, ptr %169, align 1, !tbaa !19
  %indvars.iv.next148.prol = add nsw i64 %indvars.iv147.prol, 1
  %prol.iter161.next = add i64 %prol.iter161, 1
  %prol.iter161.cmp.not = icmp eq i64 %prol.iter161.next, %xtraiter159
  br i1 %prol.iter161.cmp.not, label %.lr.ph127.prol.loopexit, label %.lr.ph127.prol, !llvm.loop !24

.lr.ph127.prol.loopexit:                          ; preds = %.lr.ph127.prol, %.lr.ph127.preheader
  %indvars.iv147.unr = phi i64 [ %164, %.lr.ph127.preheader ], [ %indvars.iv.next148.prol, %.lr.ph127.prol ]
  %170 = sub nsw i64 %164, %wide.trip.count150
  %171 = icmp ugt i64 %170, -4
  br i1 %171, label %.preheader, label %.lr.ph127.preheader.new

.lr.ph127.preheader.new:                          ; preds = %.lr.ph127.prol.loopexit
  %invariant.gep169 = getelementptr i8, ptr %131, i64 1
  %invariant.gep171 = getelementptr i8, ptr %131, i64 2
  %invariant.gep173 = getelementptr i8, ptr %131, i64 3
  br label %.lr.ph127

.lr.ph125:                                        ; preds = %.lr.ph125, %.lr.ph125.preheader.new
  %indvars.iv142 = phi i64 [ %indvars.iv142.unr, %.lr.ph125.preheader.new ], [ %indvars.iv.next143.3, %.lr.ph125 ]
  %172 = getelementptr inbounds i8, ptr %131, i64 %indvars.iv142
  %173 = load i8, ptr %172, align 1, !tbaa !19
  %174 = zext i8 %173 to i64
  %175 = getelementptr inbounds [16 x i8], ptr %67, i64 0, i64 %174
  store i8 2, ptr %175, align 1, !tbaa !19
  %gep = getelementptr i8, ptr %invariant.gep, i64 %indvars.iv142
  %176 = load i8, ptr %gep, align 1, !tbaa !19
  %177 = zext i8 %176 to i64
  %178 = getelementptr inbounds [16 x i8], ptr %67, i64 0, i64 %177
  store i8 2, ptr %178, align 1, !tbaa !19
  %gep166 = getelementptr i8, ptr %invariant.gep165, i64 %indvars.iv142
  %179 = load i8, ptr %gep166, align 1, !tbaa !19
  %180 = zext i8 %179 to i64
  %181 = getelementptr inbounds [16 x i8], ptr %67, i64 0, i64 %180
  store i8 2, ptr %181, align 1, !tbaa !19
  %gep168 = getelementptr i8, ptr %invariant.gep167, i64 %indvars.iv142
  %182 = load i8, ptr %gep168, align 1, !tbaa !19
  %183 = zext i8 %182 to i64
  %184 = getelementptr inbounds [16 x i8], ptr %67, i64 0, i64 %183
  store i8 2, ptr %184, align 1, !tbaa !19
  %indvars.iv.next143.3 = add nsw i64 %indvars.iv142, 4
  %exitcond146.not.3 = icmp eq i64 %indvars.iv.next143.3, %wide.trip.count145
  br i1 %exitcond146.not.3, label %.preheader107, label %.lr.ph125, !llvm.loop !25

.preheader:                                       ; preds = %.lr.ph127.prol.loopexit, %.lr.ph127, %.preheader107
  %185 = icmp slt i32 %.us-phi, %72
  br i1 %185, label %.lr.ph129.preheader, label %._crit_edge

.lr.ph129.preheader:                              ; preds = %.preheader
  %186 = sext i32 %.us-phi to i64
  %wide.trip.count155 = sext i32 %72 to i64
  %187 = sub nsw i64 %wide.trip.count155, %186
  %xtraiter162 = and i64 %187, 3
  %lcmp.mod163.not = icmp eq i64 %xtraiter162, 0
  br i1 %lcmp.mod163.not, label %.lr.ph129.prol.loopexit, label %.lr.ph129.prol

.lr.ph129.prol:                                   ; preds = %.lr.ph129.preheader, %.lr.ph129.prol
  %indvars.iv152.prol = phi i64 [ %indvars.iv.next153.prol, %.lr.ph129.prol ], [ %186, %.lr.ph129.preheader ]
  %prol.iter164 = phi i64 [ %prol.iter164.next, %.lr.ph129.prol ], [ 0, %.lr.ph129.preheader ]
  %188 = getelementptr inbounds i8, ptr %131, i64 %indvars.iv152.prol
  %189 = load i8, ptr %188, align 1, !tbaa !19
  %190 = zext i8 %189 to i64
  %191 = getelementptr inbounds [16 x i8], ptr %67, i64 0, i64 %190
  store i8 1, ptr %191, align 1, !tbaa !19
  %indvars.iv.next153.prol = add nsw i64 %indvars.iv152.prol, 1
  %prol.iter164.next = add i64 %prol.iter164, 1
  %prol.iter164.cmp.not = icmp eq i64 %prol.iter164.next, %xtraiter162
  br i1 %prol.iter164.cmp.not, label %.lr.ph129.prol.loopexit, label %.lr.ph129.prol, !llvm.loop !26

.lr.ph129.prol.loopexit:                          ; preds = %.lr.ph129.prol, %.lr.ph129.preheader
  %indvars.iv152.unr = phi i64 [ %186, %.lr.ph129.preheader ], [ %indvars.iv.next153.prol, %.lr.ph129.prol ]
  %192 = sub nsw i64 %186, %wide.trip.count155
  %193 = icmp ugt i64 %192, -4
  br i1 %193, label %._crit_edge, label %.lr.ph129.preheader.new

.lr.ph129.preheader.new:                          ; preds = %.lr.ph129.prol.loopexit
  %invariant.gep175 = getelementptr i8, ptr %131, i64 1
  %invariant.gep177 = getelementptr i8, ptr %131, i64 2
  %invariant.gep179 = getelementptr i8, ptr %131, i64 3
  br label %.lr.ph129

.lr.ph127:                                        ; preds = %.lr.ph127, %.lr.ph127.preheader.new
  %indvars.iv147 = phi i64 [ %indvars.iv147.unr, %.lr.ph127.preheader.new ], [ %indvars.iv.next148.3, %.lr.ph127 ]
  %194 = getelementptr inbounds i8, ptr %131, i64 %indvars.iv147
  %195 = load i8, ptr %194, align 1, !tbaa !19
  %196 = zext i8 %195 to i64
  %197 = getelementptr inbounds [16 x i8], ptr %67, i64 0, i64 %196
  store i8 3, ptr %197, align 1, !tbaa !19
  %gep170 = getelementptr i8, ptr %invariant.gep169, i64 %indvars.iv147
  %198 = load i8, ptr %gep170, align 1, !tbaa !19
  %199 = zext i8 %198 to i64
  %200 = getelementptr inbounds [16 x i8], ptr %67, i64 0, i64 %199
  store i8 3, ptr %200, align 1, !tbaa !19
  %gep172 = getelementptr i8, ptr %invariant.gep171, i64 %indvars.iv147
  %201 = load i8, ptr %gep172, align 1, !tbaa !19
  %202 = zext i8 %201 to i64
  %203 = getelementptr inbounds [16 x i8], ptr %67, i64 0, i64 %202
  store i8 3, ptr %203, align 1, !tbaa !19
  %gep174 = getelementptr i8, ptr %invariant.gep173, i64 %indvars.iv147
  %204 = load i8, ptr %gep174, align 1, !tbaa !19
  %205 = zext i8 %204 to i64
  %206 = getelementptr inbounds [16 x i8], ptr %67, i64 0, i64 %205
  store i8 3, ptr %206, align 1, !tbaa !19
  %indvars.iv.next148.3 = add nsw i64 %indvars.iv147, 4
  %exitcond151.not.3 = icmp eq i64 %indvars.iv.next148.3, %wide.trip.count150
  br i1 %exitcond151.not.3, label %.preheader, label %.lr.ph127, !llvm.loop !27

._crit_edge:                                      ; preds = %.lr.ph129.prol.loopexit, %.lr.ph129, %.preheader
  %207 = load ptr, ptr %70, align 8, !tbaa !5
  call void @_ZNK6squish9ColourSet12RemapIndicesEPKhPh(ptr noundef nonnull align 4 dereferenceable(325) %207, ptr noundef nonnull %67, ptr noundef nonnull %15)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %68) #7
  %208 = call { <2 x float>, float } @_ZNK6squish4Vec47GetVec3Ev(ptr noundef nonnull align 16 dereferenceable(16) %12)
  %.fca.0.extract3 = extractvalue { <2 x float>, float } %208, 0
  %.fca.1.extract4 = extractvalue { <2 x float>, float } %208, 1
  store <2 x float> %.fca.0.extract3, ptr %68, align 8
  %.sroa.26.0..sroa_idx = getelementptr inbounds i8, ptr %68, i64 8
  store float %.fca.1.extract4, ptr %.sroa.26.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %69) #7
  %209 = call { <2 x float>, float } @_ZNK6squish4Vec47GetVec3Ev(ptr noundef nonnull align 16 dereferenceable(16) %13)
  %.fca.0.extract = extractvalue { <2 x float>, float } %209, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %209, 1
  store <2 x float> %.fca.0.extract, ptr %69, align 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %69, i64 8
  store float %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  call void @_ZN6squish17WriteColourBlock4ERKNS_4Vec3ES2_PKhPv(ptr noundef nonnull align 4 dereferenceable(12) %68, ptr noundef nonnull align 4 dereferenceable(12) %69, ptr noundef nonnull %15, ptr noundef %1)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %69) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %68) #7
  %210 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN6squish4Vec4aSERKS0_(ptr noundef nonnull align 16 dereferenceable(16) %75, ptr noundef nonnull align 16 dereferenceable(16) %14)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %67) #7
  br label %224

.lr.ph129:                                        ; preds = %.lr.ph129, %.lr.ph129.preheader.new
  %indvars.iv152 = phi i64 [ %indvars.iv152.unr, %.lr.ph129.preheader.new ], [ %indvars.iv.next153.3, %.lr.ph129 ]
  %211 = getelementptr inbounds i8, ptr %131, i64 %indvars.iv152
  %212 = load i8, ptr %211, align 1, !tbaa !19
  %213 = zext i8 %212 to i64
  %214 = getelementptr inbounds [16 x i8], ptr %67, i64 0, i64 %213
  store i8 1, ptr %214, align 1, !tbaa !19
  %gep176 = getelementptr i8, ptr %invariant.gep175, i64 %indvars.iv152
  %215 = load i8, ptr %gep176, align 1, !tbaa !19
  %216 = zext i8 %215 to i64
  %217 = getelementptr inbounds [16 x i8], ptr %67, i64 0, i64 %216
  store i8 1, ptr %217, align 1, !tbaa !19
  %gep178 = getelementptr i8, ptr %invariant.gep177, i64 %indvars.iv152
  %218 = load i8, ptr %gep178, align 1, !tbaa !19
  %219 = zext i8 %218 to i64
  %220 = getelementptr inbounds [16 x i8], ptr %67, i64 0, i64 %219
  store i8 1, ptr %220, align 1, !tbaa !19
  %gep180 = getelementptr i8, ptr %invariant.gep179, i64 %indvars.iv152
  %221 = load i8, ptr %gep180, align 1, !tbaa !19
  %222 = zext i8 %221 to i64
  %223 = getelementptr inbounds [16 x i8], ptr %67, i64 0, i64 %222
  store i8 1, ptr %223, align 1, !tbaa !19
  %indvars.iv.next153.3 = add nsw i64 %indvars.iv152, 4
  %exitcond156.not.3 = icmp eq i64 %indvars.iv.next153.3, %wide.trip.count155
  br i1 %exitcond156.not.3, label %._crit_edge, label %.lr.ph129, !llvm.loop !28

224:                                              ; preds = %._crit_edge, %.split118.us
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  ret void
}

declare void @_ZN6squish17WriteColourBlock4ERKNS_4Vec3ES2_PKhPv(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef, ptr noundef) local_unnamed_addr #4

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 8}
!6 = !{!"_ZTSN6squish9ColourFitE", !7, i64 8, !10, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!12, !10, i64 20}
!12 = !{!"_ZTSN6squish10ClusterFitE", !6, i64 0, !10, i64 20, !13, i64 24, !8, i64 36, !8, i64 176, !15, i64 432, !15, i64 448, !15, i64 464}
!13 = !{!"_ZTSN6squish4Vec3E", !14, i64 0, !14, i64 4, !14, i64 8}
!14 = !{!"float", !8, i64 0}
!15 = !{!"_ZTSN6squish4Vec4E", !8, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = !{!8, !8, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.unroll.disable"}
!22 = distinct !{!22, !21}
!23 = distinct !{!23, !17}
!24 = distinct !{!24, !21}
!25 = distinct !{!25, !17}
!26 = distinct !{!26, !21}
!27 = distinct !{!27, !17}
!28 = distinct !{!28, !17}


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