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

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

%"class.basisu::vec" = type { [3 x float] }
%"class.basisu::vec.2" = type { [4 x float] }
%"class.basisu::color_rgba" = type { %union.anon }
%union.anon = type { [4 x i8] }
%"struct.basisu::pvrtc4_block" = type { i32, i32 }
%"class.basisu::pvrtc4_image" = type <{ i32, i32, %"class.basisu::vector2D", i32, i32, i8, [7 x i8] }>
%"class.basisu::vector2D" = type { i32, i32, %"class.basisu::vector" }
%"class.basisu::vector" = type { ptr, i32, i32 }

@.str.3 = external hidden unnamed_addr constant [115 x i8], align 1
@_ZZN6basisu12pvrtc4_image34local_endpoint_optimization_opaqueEjjRKNS_5imageEbE9s_weights = external hidden constant [7 x [7 x float]], align 16
@_ZN6basisuL17g_pvrtc_5_nearestE = external hidden constant [256 x i8], align 16
@_ZN6basisuL17g_pvrtc_4_nearestE = external hidden constant [256 x i8], align 16
@.str.8 = external hidden unnamed_addr constant [78 x i8], align 1
@__PRETTY_FUNCTION__._ZN6basisu12pvrtc4_image34local_endpoint_optimization_opaqueEjjRKNS_5imageEb = external hidden unnamed_addr constant [107 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [78 x i8], align 1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu10color_rgbaC2Eiiii(ptr noundef nonnull align 1 dereferenceable(4), i32 noundef, i32 noundef, i32 noundef, i32 noundef) unnamed_addr #0 align 2

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4), i32 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN6basisu12pvrtc4_image34local_endpoint_optimization_opaqueEjjRKNS_5imageEb(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %3, i1 noundef zeroext %4) #5 align 2 {
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i8, align 1
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.basisu::vec", align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca [2 x %"class.basisu::vec"], align 16
  %21 = alloca %"class.basisu::vec", align 4
  %22 = alloca %"class.basisu::vec", align 4
  %23 = alloca [2 x float], align 4
  %24 = alloca i8, align 1
  %25 = alloca i32, align 4
  %26 = alloca [2 x %"class.basisu::vec"], align 16
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca ptr, align 8
  %32 = alloca %"class.basisu::vec", align 4
  %33 = alloca i32, align 4
  %34 = alloca float, align 4
  %35 = alloca %"class.basisu::vec", align 4
  %36 = alloca %"class.basisu::vec", align 4
  %37 = alloca %"class.basisu::vec", align 4
  %38 = alloca [2 x %"class.basisu::vec.2"], align 16
  %39 = alloca %"class.basisu::vec.2", align 4
  %40 = alloca %"class.basisu::vec", align 4
  %41 = alloca %"class.basisu::vec.2", align 4
  %42 = alloca %"class.basisu::vec", align 4
  %43 = alloca %"class.basisu::color_rgba", align 1
  %44 = alloca %"class.basisu::color_rgba", align 1
  %45 = alloca [3 x [3 x %"struct.basisu::pvrtc4_block"]], align 16
  %46 = alloca i32, align 4
  %47 = alloca i32, align 4
  %48 = alloca i32, align 4
  %49 = alloca i32, align 4
  %50 = alloca %"class.basisu::color_rgba", align 1
  %51 = alloca %"class.basisu::color_rgba", align 1
  %52 = alloca i64, align 8
  %53 = alloca [3 x [3 x %"struct.basisu::pvrtc4_block"]], align 16
  %54 = alloca i32, align 4
  %55 = alloca i32, align 4
  %56 = alloca i32, align 4
  %57 = alloca i32, align 4
  %58 = alloca i64, align 8
  %59 = alloca i32, align 4
  %60 = alloca i32, align 4
  %61 = alloca i32, align 4
  %62 = alloca i32, align 4
  %63 = alloca i32, align 4
  %64 = alloca i32, align 4
  %65 = alloca i32, align 4
  %66 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store i32 %2, ptr %9, align 4, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !5
  %67 = zext i1 %4 to i8
  store i8 %67, ptr %11, align 1, !tbaa !11
  %68 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %69 = load i32, ptr %8, align 4, !tbaa !9
  %70 = load i32, ptr %9, align 4, !tbaa !9
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  %72 = load i8, ptr %11, align 1, !tbaa !11, !range !13, !noundef !14
  %73 = trunc i8 %72 to i1
  %74 = call noundef i64 @_ZNK6basisu12pvrtc4_image27evaluate_1x1_endpoint_errorEjjRKNS_5imageEbbm(ptr noundef nonnull align 8 dereferenceable(41) %68, i32 noundef %69, i32 noundef %70, ptr noundef nonnull align 8 dereferenceable(32) %71, i1 noundef zeroext %73, i1 noundef zeroext false, i64 noundef 0)
  store i64 %74, ptr %12, align 8, !tbaa !15
  %75 = load i64, ptr %12, align 8, !tbaa !15
  %76 = icmp ne i64 %75, 0
  br i1 %76, label %79, label %77

77:                                               ; preds = %5
  %78 = load i64, ptr %12, align 8, !tbaa !15
  store i64 %78, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %604

79:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #8
  call void @_ZN6basisu3vecILj3EfEC2Ef(ptr noundef nonnull align 4 dereferenceable(12) %14, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %80

80:                                               ; preds = %134, %79
  %81 = load i32, ptr %15, align 4, !tbaa !9
  %82 = icmp slt i32 %81, 7
  br i1 %82, label %84, label %83

83:                                               ; preds = %80
  store i32 2, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %137

84:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %85 = load i32, ptr %9, align 4, !tbaa !9
  %86 = mul i32 %85, 4
  %87 = load i32, ptr %15, align 4, !tbaa !9
  %88 = add i32 %86, %87
  %89 = sub i32 %88, 1
  %90 = call noundef i32 @_ZNK6basisu12pvrtc4_image6wrap_yEi(ptr noundef nonnull align 8 dereferenceable(41) %68, i32 noundef %89)
  store i32 %90, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %91

91:                                               ; preds = %130, %84
  %92 = load i32, ptr %17, align 4, !tbaa !9
  %93 = icmp ult i32 %92, 7
  br i1 %93, label %95, label %94

94:                                               ; preds = %91
  store i32 5, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %133

95:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %96 = load i32, ptr %8, align 4, !tbaa !9
  %97 = mul i32 %96, 4
  %98 = load i32, ptr %17, align 4, !tbaa !9
  %99 = add i32 %97, %98
  %100 = sub i32 %99, 1
  %101 = call noundef i32 @_ZNK6basisu12pvrtc4_image6wrap_xEi(ptr noundef nonnull align 8 dereferenceable(41) %68, i32 noundef %100)
  store i32 %101, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = load i32, ptr %18, align 4, !tbaa !9
  %104 = load i32, ptr %16, align 4, !tbaa !9
  %105 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNK6basisu5imageclEjj(ptr noundef nonnull align 8 dereferenceable(32) %102, i32 noundef %103, i32 noundef %104)
  store ptr %105, ptr %19, align 8, !tbaa !5
  %106 = load ptr, ptr %19, align 8, !tbaa !5
  %107 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %106, i32 noundef 0)
  %108 = load i8, ptr %107, align 1, !tbaa !17
  %109 = zext i8 %108 to i32
  %110 = sitofp i32 %109 to float
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %14, i32 noundef 0)
  %112 = load float, ptr %111, align 4, !tbaa !18
  %113 = fadd float %112, %110
  store float %113, ptr %111, align 4, !tbaa !18
  %114 = load ptr, ptr %19, align 8, !tbaa !5
  %115 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %114, i32 noundef 1)
  %116 = load i8, ptr %115, align 1, !tbaa !17
  %117 = zext i8 %116 to i32
  %118 = sitofp i32 %117 to float
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %14, i32 noundef 1)
  %120 = load float, ptr %119, align 4, !tbaa !18
  %121 = fadd float %120, %118
  store float %121, ptr %119, align 4, !tbaa !18
  %122 = load ptr, ptr %19, align 8, !tbaa !5
  %123 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %122, i32 noundef 2)
  %124 = load i8, ptr %123, align 1, !tbaa !17
  %125 = zext i8 %124 to i32
  %126 = sitofp i32 %125 to float
  %127 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %14, i32 noundef 2)
  %128 = load float, ptr %127, align 4, !tbaa !18
  %129 = fadd float %128, %126
  store float %129, ptr %127, align 4, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %130

130:                                              ; preds = %95
  %131 = load i32, ptr %17, align 4, !tbaa !9
  %132 = add i32 %131, 1
  store i32 %132, ptr %17, align 4, !tbaa !9
  br label %91, !llvm.loop !20

133:                                              ; preds = %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %134

134:                                              ; preds = %133
  %135 = load i32, ptr %15, align 4, !tbaa !9
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %15, align 4, !tbaa !9
  br label %80, !llvm.loop !22

137:                                              ; preds = %83
  %138 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfEmLEf(ptr noundef nonnull align 4 dereferenceable(12) %14, float noundef 0x3F94E5E0A0000000)
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #8
  %139 = getelementptr inbounds [2 x %"class.basisu::vec"], ptr %20, i32 0, i32 0
  %140 = getelementptr inbounds %"class.basisu::vec", ptr %139, i64 2
  br label %141

141:                                              ; preds = %141, %137
  %142 = phi ptr [ %139, %137 ], [ %143, %141 ]
  call void @_ZN6basisu3vecILj3EfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %142)
  %143 = getelementptr inbounds %"class.basisu::vec", ptr %142, i64 1
  %144 = icmp eq ptr %143, %140
  br i1 %144, label %145, label %141

145:                                              ; preds = %141
  %146 = getelementptr inbounds [2 x %"class.basisu::vec"], ptr %20, i64 0, i64 0
  %147 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfE3setILj3EfEERS1_RKNS0_IXT_ET0_EE(ptr noundef nonnull align 4 dereferenceable(12) %146, ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @llvm.lifetime.start.p0(i64 12, ptr %21) #8
  call void @_ZN6basisu3vecILj3EfEC2Ef(ptr noundef nonnull align 4 dereferenceable(12) %21, float noundef 0x3F899999A0000000)
  %148 = getelementptr inbounds [2 x %"class.basisu::vec"], ptr %20, i64 0, i64 0
  %149 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfEmIERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %148, ptr noundef nonnull align 4 dereferenceable(12) %21)
  call void @llvm.lifetime.end.p0(i64 12, ptr %21) #8
  %150 = getelementptr inbounds [2 x %"class.basisu::vec"], ptr %20, i64 0, i64 1
  %151 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfE3setILj3EfEERS1_RKNS0_IXT_ET0_EE(ptr noundef nonnull align 4 dereferenceable(12) %150, ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @llvm.lifetime.start.p0(i64 12, ptr %22) #8
  call void @_ZN6basisu3vecILj3EfEC2Ef(ptr noundef nonnull align 4 dereferenceable(12) %22, float noundef 0x3F899999A0000000)
  %152 = getelementptr inbounds [2 x %"class.basisu::vec"], ptr %20, i64 0, i64 1
  %153 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfEpLERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %152, ptr noundef nonnull align 4 dereferenceable(12) %22)
  call void @llvm.lifetime.end.p0(i64 12, ptr %22) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #8
  store i8 1, ptr %24, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %154

154:                                              ; preds = %250, %145
  %155 = load i32, ptr %25, align 4, !tbaa !9
  %156 = icmp ult i32 %155, 4
  br i1 %156, label %158, label %157

157:                                              ; preds = %154
  store i32 8, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %253

158:                                              ; preds = %154
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #8
  call void @_ZN6basisu3vecILj3EfEC2Ef(ptr noundef nonnull align 4 dereferenceable(12) %26, float noundef 0.000000e+00)
  %159 = getelementptr inbounds %"class.basisu::vec", ptr %26, i64 1
  call void @_ZN6basisu3vecILj3EfEC2Ef(ptr noundef nonnull align 4 dereferenceable(12) %159, float noundef 0.000000e+00)
  %160 = getelementptr inbounds [2 x float], ptr %23, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 4 %160, i8 0, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  store i32 0, ptr %27, align 4, !tbaa !9
  br label %161

161:                                              ; preds = %227, %158
  %162 = load i32, ptr %27, align 4, !tbaa !9
  %163 = icmp slt i32 %162, 7
  br i1 %163, label %165, label %164

164:                                              ; preds = %161
  store i32 11, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  br label %230

165:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  %166 = load i32, ptr %9, align 4, !tbaa !9
  %167 = mul i32 %166, 4
  %168 = load i32, ptr %27, align 4, !tbaa !9
  %169 = add i32 %167, %168
  %170 = sub i32 %169, 1
  %171 = call noundef i32 @_ZNK6basisu12pvrtc4_image6wrap_yEi(ptr noundef nonnull align 8 dereferenceable(41) %68, i32 noundef %170)
  store i32 %171, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  store i32 0, ptr %29, align 4, !tbaa !9
  br label %172

172:                                              ; preds = %223, %165
  %173 = load i32, ptr %29, align 4, !tbaa !9
  %174 = icmp ult i32 %173, 7
  br i1 %174, label %176, label %175

175:                                              ; preds = %172
  store i32 14, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %226

176:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  %177 = load i32, ptr %8, align 4, !tbaa !9
  %178 = mul i32 %177, 4
  %179 = load i32, ptr %29, align 4, !tbaa !9
  %180 = add i32 %178, %179
  %181 = sub i32 %180, 1
  %182 = call noundef i32 @_ZNK6basisu12pvrtc4_image6wrap_xEi(ptr noundef nonnull align 8 dereferenceable(41) %68, i32 noundef %181)
  store i32 %182, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  %183 = load ptr, ptr %10, align 8, !tbaa !5
  %184 = load i32, ptr %30, align 4, !tbaa !9
  %185 = load i32, ptr %28, align 4, !tbaa !9
  %186 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNK6basisu5imageclEjj(ptr noundef nonnull align 8 dereferenceable(32) %183, i32 noundef %184, i32 noundef %185)
  store ptr %186, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %32) #8
  %187 = load ptr, ptr %31, align 8, !tbaa !5
  %188 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %187, i32 noundef 0)
  %189 = load i8, ptr %188, align 1, !tbaa !17
  %190 = uitofp i8 %189 to float
  %191 = load ptr, ptr %31, align 8, !tbaa !5
  %192 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %191, i32 noundef 1)
  %193 = load i8, ptr %192, align 1, !tbaa !17
  %194 = uitofp i8 %193 to float
  %195 = load ptr, ptr %31, align 8, !tbaa !5
  %196 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %195, i32 noundef 2)
  %197 = load i8, ptr %196, align 1, !tbaa !17
  %198 = uitofp i8 %197 to float
  call void @_ZN6basisu3vecILj3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %32, float noundef %190, float noundef %194, float noundef %198)
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  %199 = getelementptr inbounds [2 x %"class.basisu::vec"], ptr %20, i64 0, i64 0
  %200 = call noundef float @_ZNK6basisu3vecILj3EfE16squared_distanceERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %199, ptr noundef nonnull align 4 dereferenceable(12) %32)
  %201 = getelementptr inbounds [2 x %"class.basisu::vec"], ptr %20, i64 0, i64 1
  %202 = call noundef float @_ZNK6basisu3vecILj3EfE16squared_distanceERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %201, ptr noundef nonnull align 4 dereferenceable(12) %32)
  %203 = fcmp ogt float %200, %202
  %204 = zext i1 %203 to i32
  store i32 %204, ptr %33, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  %205 = load i32, ptr %27, align 4, !tbaa !9
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [7 x [7 x float]], ptr @_ZZN6basisu12pvrtc4_image34local_endpoint_optimization_opaqueEjjRKNS_5imageEbE9s_weights, i64 0, i64 %206
  %208 = load i32, ptr %29, align 4, !tbaa !9
  %209 = zext i32 %208 to i64
  %210 = getelementptr inbounds [7 x float], ptr %207, i64 0, i64 %209
  %211 = load float, ptr %210, align 4, !tbaa !18
  store float %211, ptr %34, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 12, ptr %35) #8
  %212 = load float, ptr %34, align 4, !tbaa !18
  call void @_ZN6basisumlERKNS_3vecILj3EfEEf(ptr dead_on_unwind writable sret(%"class.basisu::vec") align 4 %35, ptr noundef nonnull align 4 dereferenceable(12) %32, float noundef %212)
  %213 = load i32, ptr %33, align 4, !tbaa !9
  %214 = zext i32 %213 to i64
  %215 = getelementptr inbounds [2 x %"class.basisu::vec"], ptr %26, i64 0, i64 %214
  %216 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfEpLERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %215, ptr noundef nonnull align 4 dereferenceable(12) %35)
  call void @llvm.lifetime.end.p0(i64 12, ptr %35) #8
  %217 = load float, ptr %34, align 4, !tbaa !18
  %218 = load i32, ptr %33, align 4, !tbaa !9
  %219 = zext i32 %218 to i64
  %220 = getelementptr inbounds [2 x float], ptr %23, i64 0, i64 %219
  %221 = load float, ptr %220, align 4, !tbaa !18
  %222 = fadd float %221, %217
  store float %222, ptr %220, align 4, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  br label %223

223:                                              ; preds = %176
  %224 = load i32, ptr %29, align 4, !tbaa !9
  %225 = add i32 %224, 1
  store i32 %225, ptr %29, align 4, !tbaa !9
  br label %172, !llvm.loop !23

226:                                              ; preds = %175
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %227

227:                                              ; preds = %226
  %228 = load i32, ptr %27, align 4, !tbaa !9
  %229 = add nsw i32 %228, 1
  store i32 %229, ptr %27, align 4, !tbaa !9
  br label %161, !llvm.loop !24

230:                                              ; preds = %164
  %231 = getelementptr inbounds [2 x float], ptr %23, i64 0, i64 0
  %232 = load float, ptr %231, align 4, !tbaa !18
  %233 = fcmp une float %232, 0.000000e+00
  br i1 %233, label %234, label %238

234:                                              ; preds = %230
  %235 = getelementptr inbounds [2 x float], ptr %23, i64 0, i64 1
  %236 = load float, ptr %235, align 4, !tbaa !18
  %237 = fcmp une float %236, 0.000000e+00
  br i1 %237, label %239, label %238

238:                                              ; preds = %234, %230
  store i8 0, ptr %24, align 1, !tbaa !11
  br label %239

239:                                              ; preds = %238, %234
  call void @llvm.lifetime.start.p0(i64 12, ptr %36) #8
  %240 = getelementptr inbounds [2 x %"class.basisu::vec"], ptr %26, i64 0, i64 0
  %241 = getelementptr inbounds [2 x float], ptr %23, i64 0, i64 0
  %242 = load float, ptr %241, align 4, !tbaa !18
  call void @_ZN6basisudvERKNS_3vecILj3EfEEf(ptr dead_on_unwind writable sret(%"class.basisu::vec") align 4 %36, ptr noundef nonnull align 4 dereferenceable(12) %240, float noundef %242)
  %243 = getelementptr inbounds [2 x %"class.basisu::vec"], ptr %20, i64 0, i64 0
  %244 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %243, ptr noundef nonnull align 4 dereferenceable(12) %36)
  call void @llvm.lifetime.end.p0(i64 12, ptr %36) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr %37) #8
  %245 = getelementptr inbounds [2 x %"class.basisu::vec"], ptr %26, i64 0, i64 1
  %246 = getelementptr inbounds [2 x float], ptr %23, i64 0, i64 1
  %247 = load float, ptr %246, align 4, !tbaa !18
  call void @_ZN6basisudvERKNS_3vecILj3EfEEf(ptr dead_on_unwind writable sret(%"class.basisu::vec") align 4 %37, ptr noundef nonnull align 4 dereferenceable(12) %245, float noundef %247)
  %248 = getelementptr inbounds [2 x %"class.basisu::vec"], ptr %20, i64 0, i64 1
  %249 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %248, ptr noundef nonnull align 4 dereferenceable(12) %37)
  call void @llvm.lifetime.end.p0(i64 12, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #8
  br label %250

250:                                              ; preds = %239
  %251 = load i32, ptr %25, align 4, !tbaa !9
  %252 = add i32 %251, 1
  store i32 %252, ptr %25, align 4, !tbaa !9
  br label %154, !llvm.loop !25

253:                                              ; preds = %157
  %254 = load i8, ptr %24, align 1, !tbaa !11, !range !13, !noundef !14
  %255 = trunc i8 %254 to i1
  br i1 %255, label %261, label %256

256:                                              ; preds = %253
  %257 = getelementptr inbounds [2 x %"class.basisu::vec"], ptr %20, i64 0, i64 0
  %258 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %257, ptr noundef nonnull align 4 dereferenceable(12) %14)
  %259 = getelementptr inbounds [2 x %"class.basisu::vec"], ptr %20, i64 0, i64 1
  %260 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %259, ptr noundef nonnull align 4 dereferenceable(12) %14)
  br label %261

261:                                              ; preds = %256, %253
  call void @llvm.lifetime.start.p0(i64 32, ptr %38) #8
  %262 = getelementptr inbounds [2 x %"class.basisu::vec"], ptr %20, i64 0, i64 0
  call void @_ZN6basisu3vecILj4EfEC2ILj3EfEERKNS0_IXT_ET0_EE(ptr noundef nonnull align 4 dereferenceable(16) %38, ptr noundef nonnull align 4 dereferenceable(12) %262)
  %263 = getelementptr inbounds %"class.basisu::vec.2", ptr %38, i64 1
  %264 = getelementptr inbounds [2 x %"class.basisu::vec"], ptr %20, i64 0, i64 1
  call void @_ZN6basisu3vecILj4EfEC2ILj3EfEERKNS0_IXT_ET0_EE(ptr noundef nonnull align 4 dereferenceable(16) %263, ptr noundef nonnull align 4 dereferenceable(12) %264)
  call void @llvm.lifetime.start.p0(i64 16, ptr %39) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr %40) #8
  call void @_ZN6basisu3vecILj3EfEC2Ef(ptr noundef nonnull align 4 dereferenceable(12) %40, float noundef 5.000000e-01)
  call void @_ZN6basisu3vecILj4EfEC2ILj3EfEERKNS0_IXT_ET0_EE(ptr noundef nonnull align 4 dereferenceable(16) %39, ptr noundef nonnull align 4 dereferenceable(12) %40)
  %265 = getelementptr inbounds [2 x %"class.basisu::vec.2"], ptr %38, i64 0, i64 0
  %266 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN6basisu3vecILj4EfEpLERKS1_(ptr noundef nonnull align 4 dereferenceable(16) %265, ptr noundef nonnull align 4 dereferenceable(16) %39)
  call void @llvm.lifetime.end.p0(i64 12, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %39) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %41) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr %42) #8
  call void @_ZN6basisu3vecILj3EfEC2Ef(ptr noundef nonnull align 4 dereferenceable(12) %42, float noundef 5.000000e-01)
  call void @_ZN6basisu3vecILj4EfEC2ILj3EfEERKNS0_IXT_ET0_EE(ptr noundef nonnull align 4 dereferenceable(16) %41, ptr noundef nonnull align 4 dereferenceable(12) %42)
  %267 = getelementptr inbounds [2 x %"class.basisu::vec.2"], ptr %38, i64 0, i64 1
  %268 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN6basisu3vecILj4EfEpLERKS1_(ptr noundef nonnull align 4 dereferenceable(16) %267, ptr noundef nonnull align 4 dereferenceable(16) %41)
  call void @llvm.lifetime.end.p0(i64 12, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %41) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #8
  %269 = getelementptr inbounds [2 x %"class.basisu::vec.2"], ptr %38, i64 0, i64 0
  %270 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj4EfEixEj(ptr noundef nonnull align 4 dereferenceable(16) %269, i32 noundef 0)
  %271 = load float, ptr %270, align 4, !tbaa !18
  %272 = fptosi float %271 to i32
  %273 = getelementptr inbounds [2 x %"class.basisu::vec.2"], ptr %38, i64 0, i64 0
  %274 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj4EfEixEj(ptr noundef nonnull align 4 dereferenceable(16) %273, i32 noundef 1)
  %275 = load float, ptr %274, align 4, !tbaa !18
  %276 = fptosi float %275 to i32
  %277 = getelementptr inbounds [2 x %"class.basisu::vec.2"], ptr %38, i64 0, i64 0
  %278 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj4EfEixEj(ptr noundef nonnull align 4 dereferenceable(16) %277, i32 noundef 2)
  %279 = load float, ptr %278, align 4, !tbaa !18
  %280 = fptosi float %279 to i32
  call void @_ZN6basisu10color_rgbaC2Eiiii(ptr noundef nonnull align 1 dereferenceable(4) %43, i32 noundef %272, i32 noundef %276, i32 noundef %280, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #8
  %281 = getelementptr inbounds [2 x %"class.basisu::vec.2"], ptr %38, i64 0, i64 1
  %282 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj4EfEixEj(ptr noundef nonnull align 4 dereferenceable(16) %281, i32 noundef 0)
  %283 = load float, ptr %282, align 4, !tbaa !18
  %284 = fptosi float %283 to i32
  %285 = getelementptr inbounds [2 x %"class.basisu::vec.2"], ptr %38, i64 0, i64 1
  %286 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj4EfEixEj(ptr noundef nonnull align 4 dereferenceable(16) %285, i32 noundef 1)
  %287 = load float, ptr %286, align 4, !tbaa !18
  %288 = fptosi float %287 to i32
  %289 = getelementptr inbounds [2 x %"class.basisu::vec.2"], ptr %38, i64 0, i64 1
  %290 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj4EfEixEj(ptr noundef nonnull align 4 dereferenceable(16) %289, i32 noundef 2)
  %291 = load float, ptr %290, align 4, !tbaa !18
  %292 = fptosi float %291 to i32
  call void @_ZN6basisu10color_rgbaC2Eiiii(ptr noundef nonnull align 1 dereferenceable(4) %44, i32 noundef %284, i32 noundef %288, i32 noundef %292, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 72, ptr %45) #8
  %293 = getelementptr inbounds [3 x [3 x %"struct.basisu::pvrtc4_block"]], ptr %45, i32 0, i32 0, i32 0
  %294 = getelementptr inbounds %"struct.basisu::pvrtc4_block", ptr %293, i64 9
  br label %295

295:                                              ; preds = %295, %261
  %296 = phi ptr [ %293, %261 ], [ %297, %295 ]
  call void @_ZN6basisu12pvrtc4_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %296)
  %297 = getelementptr inbounds %"struct.basisu::pvrtc4_block", ptr %296, i64 1
  %298 = icmp eq ptr %297, %294
  br i1 %298, label %299, label %295

299:                                              ; preds = %295
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #8
  store i32 -1, ptr %46, align 4, !tbaa !9
  br label %300

300:                                              ; preds = %334, %299
  %301 = load i32, ptr %46, align 4, !tbaa !9
  %302 = icmp sle i32 %301, 1
  br i1 %302, label %304, label %303

303:                                              ; preds = %300
  store i32 17, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #8
  br label %337

304:                                              ; preds = %300
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #8
  store i32 -1, ptr %47, align 4, !tbaa !9
  br label %305

305:                                              ; preds = %330, %304
  %306 = load i32, ptr %47, align 4, !tbaa !9
  %307 = icmp sle i32 %306, 1
  br i1 %307, label %309, label %308

308:                                              ; preds = %305
  store i32 20, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #8
  br label %333

309:                                              ; preds = %305
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #8
  %310 = load i32, ptr %8, align 4, !tbaa !9
  %311 = load i32, ptr %47, align 4, !tbaa !9
  %312 = add i32 %310, %311
  %313 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %68, i32 noundef %312)
  store i32 %313, ptr %48, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #8
  %314 = load i32, ptr %9, align 4, !tbaa !9
  %315 = load i32, ptr %46, align 4, !tbaa !9
  %316 = add i32 %314, %315
  %317 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %68, i32 noundef %316)
  store i32 %317, ptr %49, align 4, !tbaa !9
  %318 = getelementptr inbounds %"class.basisu::pvrtc4_image", ptr %68, i32 0, i32 2
  %319 = load i32, ptr %48, align 4, !tbaa !9
  %320 = load i32, ptr %49, align 4, !tbaa !9
  %321 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %318, i32 noundef %319, i32 noundef %320)
  %322 = load i32, ptr %47, align 4, !tbaa !9
  %323 = add nsw i32 %322, 1
  %324 = sext i32 %323 to i64
  %325 = getelementptr inbounds [3 x [3 x %"struct.basisu::pvrtc4_block"]], ptr %45, i64 0, i64 %324
  %326 = load i32, ptr %46, align 4, !tbaa !9
  %327 = add nsw i32 %326, 1
  %328 = sext i32 %327 to i64
  %329 = getelementptr inbounds [3 x %"struct.basisu::pvrtc4_block"], ptr %325, i64 0, i64 %328
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %329, ptr align 4 %321, i64 8, i1 false), !tbaa.struct !26
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #8
  br label %330

330:                                              ; preds = %309
  %331 = load i32, ptr %47, align 4, !tbaa !9
  %332 = add nsw i32 %331, 1
  store i32 %332, ptr %47, align 4, !tbaa !9
  br label %305, !llvm.loop !27

333:                                              ; preds = %308
  br label %334

334:                                              ; preds = %333
  %335 = load i32, ptr %46, align 4, !tbaa !9
  %336 = add nsw i32 %335, 1
  store i32 %336, ptr %46, align 4, !tbaa !9
  br label %300, !llvm.loop !28

337:                                              ; preds = %303
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #8
  call void @_ZN6basisu10color_rgbaC2Ei(ptr noundef nonnull align 1 dereferenceable(4) %50, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #8
  call void @_ZN6basisu10color_rgbaC2Ei(ptr noundef nonnull align 1 dereferenceable(4) %51, i32 noundef 0)
  %338 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %43, i32 noundef 0)
  %339 = load i8, ptr %338, align 1, !tbaa !17
  %340 = zext i8 %339 to i64
  %341 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_5_nearestE, i64 0, i64 %340
  %342 = load i8, ptr %341, align 1, !tbaa !17
  %343 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %50, i32 noundef 0)
  store i8 %342, ptr %343, align 1, !tbaa !17
  %344 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %44, i32 noundef 0)
  %345 = load i8, ptr %344, align 1, !tbaa !17
  %346 = zext i8 %345 to i64
  %347 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_5_nearestE, i64 0, i64 %346
  %348 = load i8, ptr %347, align 1, !tbaa !17
  %349 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %51, i32 noundef 0)
  store i8 %348, ptr %349, align 1, !tbaa !17
  %350 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %43, i32 noundef 1)
  %351 = load i8, ptr %350, align 1, !tbaa !17
  %352 = zext i8 %351 to i64
  %353 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_5_nearestE, i64 0, i64 %352
  %354 = load i8, ptr %353, align 1, !tbaa !17
  %355 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %50, i32 noundef 1)
  store i8 %354, ptr %355, align 1, !tbaa !17
  %356 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %44, i32 noundef 1)
  %357 = load i8, ptr %356, align 1, !tbaa !17
  %358 = zext i8 %357 to i64
  %359 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_5_nearestE, i64 0, i64 %358
  %360 = load i8, ptr %359, align 1, !tbaa !17
  %361 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %51, i32 noundef 1)
  store i8 %360, ptr %361, align 1, !tbaa !17
  %362 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %43, i32 noundef 2)
  %363 = load i8, ptr %362, align 1, !tbaa !17
  %364 = zext i8 %363 to i64
  %365 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_4_nearestE, i64 0, i64 %364
  %366 = load i8, ptr %365, align 1, !tbaa !17
  %367 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %50, i32 noundef 2)
  store i8 %366, ptr %367, align 1, !tbaa !17
  %368 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %43, i32 noundef 2)
  %369 = load i8, ptr %368, align 1, !tbaa !17
  %370 = zext i8 %369 to i64
  %371 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_5_nearestE, i64 0, i64 %370
  %372 = load i8, ptr %371, align 1, !tbaa !17
  %373 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %51, i32 noundef 2)
  store i8 %372, ptr %373, align 1, !tbaa !17
  %374 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %50, i32 noundef 3)
  store i8 0, ptr %374, align 1, !tbaa !17
  %375 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %51, i32 noundef 3)
  store i8 0, ptr %375, align 1, !tbaa !17
  %376 = getelementptr inbounds %"class.basisu::pvrtc4_image", ptr %68, i32 0, i32 2
  %377 = load i32, ptr %8, align 4, !tbaa !9
  %378 = load i32, ptr %9, align 4, !tbaa !9
  %379 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %376, i32 noundef %377, i32 noundef %378)
  call void @_ZN6basisu12pvrtc4_block16set_endpoint_rawEjRKNS_10color_rgbaEb(ptr noundef nonnull align 4 dereferenceable(8) %379, i32 noundef 0, ptr noundef nonnull align 1 dereferenceable(4) %50, i1 noundef zeroext true)
  %380 = getelementptr inbounds %"class.basisu::pvrtc4_image", ptr %68, i32 0, i32 2
  %381 = load i32, ptr %8, align 4, !tbaa !9
  %382 = load i32, ptr %9, align 4, !tbaa !9
  %383 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %380, i32 noundef %381, i32 noundef %382)
  call void @_ZN6basisu12pvrtc4_block16set_endpoint_rawEjRKNS_10color_rgbaEb(ptr noundef nonnull align 4 dereferenceable(8) %383, i32 noundef 1, ptr noundef nonnull align 1 dereferenceable(4) %51, i1 noundef zeroext true)
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #8
  %384 = load i32, ptr %8, align 4, !tbaa !9
  %385 = load i32, ptr %9, align 4, !tbaa !9
  %386 = load ptr, ptr %10, align 8, !tbaa !5
  %387 = load i8, ptr %11, align 1, !tbaa !11, !range !13, !noundef !14
  %388 = trunc i8 %387 to i1
  %389 = call noundef i64 @_ZN6basisu12pvrtc4_image35remap_pixels_influenced_by_endpointEjjRKNS_5imageEbb(ptr noundef nonnull align 8 dereferenceable(41) %68, i32 noundef %384, i32 noundef %385, ptr noundef nonnull align 8 dereferenceable(32) %386, i1 noundef zeroext %388, i1 noundef zeroext false)
  store i64 %389, ptr %52, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 72, ptr %53) #8
  %390 = getelementptr inbounds [3 x [3 x %"struct.basisu::pvrtc4_block"]], ptr %53, i32 0, i32 0, i32 0
  %391 = getelementptr inbounds %"struct.basisu::pvrtc4_block", ptr %390, i64 9
  br label %392

392:                                              ; preds = %392, %337
  %393 = phi ptr [ %390, %337 ], [ %394, %392 ]
  call void @_ZN6basisu12pvrtc4_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %393)
  %394 = getelementptr inbounds %"struct.basisu::pvrtc4_block", ptr %393, i64 1
  %395 = icmp eq ptr %394, %391
  br i1 %395, label %396, label %392

396:                                              ; preds = %392
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #8
  store i32 -1, ptr %54, align 4, !tbaa !9
  br label %397

397:                                              ; preds = %431, %396
  %398 = load i32, ptr %54, align 4, !tbaa !9
  %399 = icmp sle i32 %398, 1
  br i1 %399, label %401, label %400

400:                                              ; preds = %397
  store i32 23, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #8
  br label %434

401:                                              ; preds = %397
  call void @llvm.lifetime.start.p0(i64 4, ptr %55) #8
  store i32 -1, ptr %55, align 4, !tbaa !9
  br label %402

402:                                              ; preds = %427, %401
  %403 = load i32, ptr %55, align 4, !tbaa !9
  %404 = icmp sle i32 %403, 1
  br i1 %404, label %406, label %405

405:                                              ; preds = %402
  store i32 26, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #8
  br label %430

406:                                              ; preds = %402
  call void @llvm.lifetime.start.p0(i64 4, ptr %56) #8
  %407 = load i32, ptr %8, align 4, !tbaa !9
  %408 = load i32, ptr %55, align 4, !tbaa !9
  %409 = add i32 %407, %408
  %410 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %68, i32 noundef %409)
  store i32 %410, ptr %56, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %57) #8
  %411 = load i32, ptr %9, align 4, !tbaa !9
  %412 = load i32, ptr %54, align 4, !tbaa !9
  %413 = add i32 %411, %412
  %414 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %68, i32 noundef %413)
  store i32 %414, ptr %57, align 4, !tbaa !9
  %415 = getelementptr inbounds %"class.basisu::pvrtc4_image", ptr %68, i32 0, i32 2
  %416 = load i32, ptr %56, align 4, !tbaa !9
  %417 = load i32, ptr %57, align 4, !tbaa !9
  %418 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %415, i32 noundef %416, i32 noundef %417)
  %419 = load i32, ptr %55, align 4, !tbaa !9
  %420 = add nsw i32 %419, 1
  %421 = sext i32 %420 to i64
  %422 = getelementptr inbounds [3 x [3 x %"struct.basisu::pvrtc4_block"]], ptr %53, i64 0, i64 %421
  %423 = load i32, ptr %54, align 4, !tbaa !9
  %424 = add nsw i32 %423, 1
  %425 = sext i32 %424 to i64
  %426 = getelementptr inbounds [3 x %"struct.basisu::pvrtc4_block"], ptr %422, i64 0, i64 %425
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %426, ptr align 4 %418, i64 8, i1 false), !tbaa.struct !26
  call void @llvm.lifetime.end.p0(i64 4, ptr %57) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #8
  br label %427

427:                                              ; preds = %406
  %428 = load i32, ptr %55, align 4, !tbaa !9
  %429 = add nsw i32 %428, 1
  store i32 %429, ptr %55, align 4, !tbaa !9
  br label %402, !llvm.loop !29

430:                                              ; preds = %405
  br label %431

431:                                              ; preds = %430
  %432 = load i32, ptr %54, align 4, !tbaa !9
  %433 = add nsw i32 %432, 1
  store i32 %433, ptr %54, align 4, !tbaa !9
  br label %397, !llvm.loop !30

434:                                              ; preds = %400
  %435 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %44, i32 noundef 0)
  %436 = load i8, ptr %435, align 1, !tbaa !17
  %437 = zext i8 %436 to i64
  %438 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_5_nearestE, i64 0, i64 %437
  %439 = load i8, ptr %438, align 1, !tbaa !17
  %440 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %50, i32 noundef 0)
  store i8 %439, ptr %440, align 1, !tbaa !17
  %441 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %43, i32 noundef 0)
  %442 = load i8, ptr %441, align 1, !tbaa !17
  %443 = zext i8 %442 to i64
  %444 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_5_nearestE, i64 0, i64 %443
  %445 = load i8, ptr %444, align 1, !tbaa !17
  %446 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %51, i32 noundef 0)
  store i8 %445, ptr %446, align 1, !tbaa !17
  %447 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %44, i32 noundef 1)
  %448 = load i8, ptr %447, align 1, !tbaa !17
  %449 = zext i8 %448 to i64
  %450 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_5_nearestE, i64 0, i64 %449
  %451 = load i8, ptr %450, align 1, !tbaa !17
  %452 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %50, i32 noundef 1)
  store i8 %451, ptr %452, align 1, !tbaa !17
  %453 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %43, i32 noundef 1)
  %454 = load i8, ptr %453, align 1, !tbaa !17
  %455 = zext i8 %454 to i64
  %456 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_5_nearestE, i64 0, i64 %455
  %457 = load i8, ptr %456, align 1, !tbaa !17
  %458 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %51, i32 noundef 1)
  store i8 %457, ptr %458, align 1, !tbaa !17
  %459 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %44, i32 noundef 2)
  %460 = load i8, ptr %459, align 1, !tbaa !17
  %461 = zext i8 %460 to i64
  %462 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_4_nearestE, i64 0, i64 %461
  %463 = load i8, ptr %462, align 1, !tbaa !17
  %464 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %50, i32 noundef 2)
  store i8 %463, ptr %464, align 1, !tbaa !17
  %465 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %43, i32 noundef 2)
  %466 = load i8, ptr %465, align 1, !tbaa !17
  %467 = zext i8 %466 to i64
  %468 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_5_nearestE, i64 0, i64 %467
  %469 = load i8, ptr %468, align 1, !tbaa !17
  %470 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %51, i32 noundef 2)
  store i8 %469, ptr %470, align 1, !tbaa !17
  %471 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %50, i32 noundef 3)
  store i8 0, ptr %471, align 1, !tbaa !17
  %472 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %51, i32 noundef 3)
  store i8 0, ptr %472, align 1, !tbaa !17
  %473 = getelementptr inbounds %"class.basisu::pvrtc4_image", ptr %68, i32 0, i32 2
  %474 = load i32, ptr %8, align 4, !tbaa !9
  %475 = load i32, ptr %9, align 4, !tbaa !9
  %476 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %473, i32 noundef %474, i32 noundef %475)
  call void @_ZN6basisu12pvrtc4_block16set_endpoint_rawEjRKNS_10color_rgbaEb(ptr noundef nonnull align 4 dereferenceable(8) %476, i32 noundef 0, ptr noundef nonnull align 1 dereferenceable(4) %50, i1 noundef zeroext true)
  %477 = getelementptr inbounds %"class.basisu::pvrtc4_image", ptr %68, i32 0, i32 2
  %478 = load i32, ptr %8, align 4, !tbaa !9
  %479 = load i32, ptr %9, align 4, !tbaa !9
  %480 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %477, i32 noundef %478, i32 noundef %479)
  call void @_ZN6basisu12pvrtc4_block16set_endpoint_rawEjRKNS_10color_rgbaEb(ptr noundef nonnull align 4 dereferenceable(8) %480, i32 noundef 1, ptr noundef nonnull align 1 dereferenceable(4) %51, i1 noundef zeroext true)
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #8
  %481 = load i32, ptr %8, align 4, !tbaa !9
  %482 = load i32, ptr %9, align 4, !tbaa !9
  %483 = load ptr, ptr %10, align 8, !tbaa !5
  %484 = load i8, ptr %11, align 1, !tbaa !11, !range !13, !noundef !14
  %485 = trunc i8 %484 to i1
  %486 = call noundef i64 @_ZN6basisu12pvrtc4_image35remap_pixels_influenced_by_endpointEjjRKNS_5imageEbb(ptr noundef nonnull align 8 dereferenceable(41) %68, i32 noundef %481, i32 noundef %482, ptr noundef nonnull align 8 dereferenceable(32) %483, i1 noundef zeroext %485, i1 noundef zeroext false)
  store i64 %486, ptr %58, align 8, !tbaa !15
  %487 = load i64, ptr %12, align 8, !tbaa !15
  %488 = load i64, ptr %52, align 8, !tbaa !15
  %489 = load i64, ptr %58, align 8, !tbaa !15
  %490 = call noundef i64 @_ZN6basisu7minimumImEET_S1_S1_(i64 noundef %488, i64 noundef %489)
  %491 = icmp ult i64 %487, %490
  br i1 %491, label %492, label %532

492:                                              ; preds = %434
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #8
  store i32 -1, ptr %59, align 4, !tbaa !9
  br label %493

493:                                              ; preds = %527, %492
  %494 = load i32, ptr %59, align 4, !tbaa !9
  %495 = icmp sle i32 %494, 1
  br i1 %495, label %497, label %496

496:                                              ; preds = %493
  store i32 29, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #8
  br label %530

497:                                              ; preds = %493
  call void @llvm.lifetime.start.p0(i64 4, ptr %60) #8
  store i32 -1, ptr %60, align 4, !tbaa !9
  br label %498

498:                                              ; preds = %523, %497
  %499 = load i32, ptr %60, align 4, !tbaa !9
  %500 = icmp sle i32 %499, 1
  br i1 %500, label %502, label %501

501:                                              ; preds = %498
  store i32 32, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %60) #8
  br label %526

502:                                              ; preds = %498
  call void @llvm.lifetime.start.p0(i64 4, ptr %61) #8
  %503 = load i32, ptr %8, align 4, !tbaa !9
  %504 = load i32, ptr %60, align 4, !tbaa !9
  %505 = add i32 %503, %504
  %506 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %68, i32 noundef %505)
  store i32 %506, ptr %61, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %62) #8
  %507 = load i32, ptr %9, align 4, !tbaa !9
  %508 = load i32, ptr %59, align 4, !tbaa !9
  %509 = add i32 %507, %508
  %510 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %68, i32 noundef %509)
  store i32 %510, ptr %62, align 4, !tbaa !9
  %511 = load i32, ptr %60, align 4, !tbaa !9
  %512 = add nsw i32 %511, 1
  %513 = sext i32 %512 to i64
  %514 = getelementptr inbounds [3 x [3 x %"struct.basisu::pvrtc4_block"]], ptr %45, i64 0, i64 %513
  %515 = load i32, ptr %59, align 4, !tbaa !9
  %516 = add nsw i32 %515, 1
  %517 = sext i32 %516 to i64
  %518 = getelementptr inbounds [3 x %"struct.basisu::pvrtc4_block"], ptr %514, i64 0, i64 %517
  %519 = getelementptr inbounds %"class.basisu::pvrtc4_image", ptr %68, i32 0, i32 2
  %520 = load i32, ptr %61, align 4, !tbaa !9
  %521 = load i32, ptr %62, align 4, !tbaa !9
  %522 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %519, i32 noundef %520, i32 noundef %521)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %522, ptr align 8 %518, i64 8, i1 false), !tbaa.struct !26
  call void @llvm.lifetime.end.p0(i64 4, ptr %62) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %61) #8
  br label %523

523:                                              ; preds = %502
  %524 = load i32, ptr %60, align 4, !tbaa !9
  %525 = add nsw i32 %524, 1
  store i32 %525, ptr %60, align 4, !tbaa !9
  br label %498, !llvm.loop !31

526:                                              ; preds = %501
  br label %527

527:                                              ; preds = %526
  %528 = load i32, ptr %59, align 4, !tbaa !9
  %529 = add nsw i32 %528, 1
  store i32 %529, ptr %59, align 4, !tbaa !9
  br label %493, !llvm.loop !32

530:                                              ; preds = %496
  %531 = load i64, ptr %12, align 8, !tbaa !15
  store i64 %531, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %603

532:                                              ; preds = %434
  %533 = load i64, ptr %52, align 8, !tbaa !15
  %534 = load i64, ptr %58, align 8, !tbaa !15
  %535 = icmp ult i64 %533, %534
  br i1 %535, label %536, label %588

536:                                              ; preds = %532
  call void @llvm.lifetime.start.p0(i64 4, ptr %63) #8
  store i32 -1, ptr %63, align 4, !tbaa !9
  br label %537

537:                                              ; preds = %571, %536
  %538 = load i32, ptr %63, align 4, !tbaa !9
  %539 = icmp sle i32 %538, 1
  br i1 %539, label %541, label %540

540:                                              ; preds = %537
  store i32 35, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %63) #8
  br label %574

541:                                              ; preds = %537
  call void @llvm.lifetime.start.p0(i64 4, ptr %64) #8
  store i32 -1, ptr %64, align 4, !tbaa !9
  br label %542

542:                                              ; preds = %567, %541
  %543 = load i32, ptr %64, align 4, !tbaa !9
  %544 = icmp sle i32 %543, 1
  br i1 %544, label %546, label %545

545:                                              ; preds = %542
  store i32 38, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %64) #8
  br label %570

546:                                              ; preds = %542
  call void @llvm.lifetime.start.p0(i64 4, ptr %65) #8
  %547 = load i32, ptr %8, align 4, !tbaa !9
  %548 = load i32, ptr %64, align 4, !tbaa !9
  %549 = add i32 %547, %548
  %550 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %68, i32 noundef %549)
  store i32 %550, ptr %65, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %66) #8
  %551 = load i32, ptr %9, align 4, !tbaa !9
  %552 = load i32, ptr %63, align 4, !tbaa !9
  %553 = add i32 %551, %552
  %554 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %68, i32 noundef %553)
  store i32 %554, ptr %66, align 4, !tbaa !9
  %555 = load i32, ptr %64, align 4, !tbaa !9
  %556 = add nsw i32 %555, 1
  %557 = sext i32 %556 to i64
  %558 = getelementptr inbounds [3 x [3 x %"struct.basisu::pvrtc4_block"]], ptr %53, i64 0, i64 %557
  %559 = load i32, ptr %63, align 4, !tbaa !9
  %560 = add nsw i32 %559, 1
  %561 = sext i32 %560 to i64
  %562 = getelementptr inbounds [3 x %"struct.basisu::pvrtc4_block"], ptr %558, i64 0, i64 %561
  %563 = getelementptr inbounds %"class.basisu::pvrtc4_image", ptr %68, i32 0, i32 2
  %564 = load i32, ptr %65, align 4, !tbaa !9
  %565 = load i32, ptr %66, align 4, !tbaa !9
  %566 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %563, i32 noundef %564, i32 noundef %565)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %566, ptr align 8 %562, i64 8, i1 false), !tbaa.struct !26
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %65) #8
  br label %567

567:                                              ; preds = %546
  %568 = load i32, ptr %64, align 4, !tbaa !9
  %569 = add nsw i32 %568, 1
  store i32 %569, ptr %64, align 4, !tbaa !9
  br label %542, !llvm.loop !33

570:                                              ; preds = %545
  br label %571

571:                                              ; preds = %570
  %572 = load i32, ptr %63, align 4, !tbaa !9
  %573 = add nsw i32 %572, 1
  store i32 %573, ptr %63, align 4, !tbaa !9
  br label %537, !llvm.loop !34

574:                                              ; preds = %540
  %575 = load i64, ptr %52, align 8, !tbaa !15
  %576 = load i32, ptr %8, align 4, !tbaa !9
  %577 = load i32, ptr %9, align 4, !tbaa !9
  %578 = load ptr, ptr %10, align 8, !tbaa !5
  %579 = load i8, ptr %11, align 1, !tbaa !11, !range !13, !noundef !14
  %580 = trunc i8 %579 to i1
  %581 = call noundef i64 @_ZNK6basisu12pvrtc4_image27evaluate_1x1_endpoint_errorEjjRKNS_5imageEbbm(ptr noundef nonnull align 8 dereferenceable(41) %68, i32 noundef %576, i32 noundef %577, ptr noundef nonnull align 8 dereferenceable(32) %578, i1 noundef zeroext %580, i1 noundef zeroext false, i64 noundef 0)
  %582 = icmp eq i64 %575, %581
  br i1 %582, label %583, label %584

583:                                              ; preds = %574
  br label %586

584:                                              ; preds = %574
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.3, i32 noundef 556, ptr noundef @__PRETTY_FUNCTION__._ZN6basisu12pvrtc4_image34local_endpoint_optimization_opaqueEjjRKNS_5imageEb) #9
  unreachable

585:                                              ; No predecessors!
  br label %586

586:                                              ; preds = %585, %583
  %587 = load i64, ptr %52, align 8, !tbaa !15
  store i64 %587, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %603

588:                                              ; preds = %532
  br label %589

589:                                              ; preds = %588
  %590 = load i64, ptr %58, align 8, !tbaa !15
  %591 = load i32, ptr %8, align 4, !tbaa !9
  %592 = load i32, ptr %9, align 4, !tbaa !9
  %593 = load ptr, ptr %10, align 8, !tbaa !5
  %594 = load i8, ptr %11, align 1, !tbaa !11, !range !13, !noundef !14
  %595 = trunc i8 %594 to i1
  %596 = call noundef i64 @_ZNK6basisu12pvrtc4_image27evaluate_1x1_endpoint_errorEjjRKNS_5imageEbbm(ptr noundef nonnull align 8 dereferenceable(41) %68, i32 noundef %591, i32 noundef %592, ptr noundef nonnull align 8 dereferenceable(32) %593, i1 noundef zeroext %595, i1 noundef zeroext false, i64 noundef 0)
  %597 = icmp eq i64 %590, %596
  br i1 %597, label %598, label %599

598:                                              ; preds = %589
  br label %601

599:                                              ; preds = %589
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.3, i32 noundef 560, ptr noundef @__PRETTY_FUNCTION__._ZN6basisu12pvrtc4_image34local_endpoint_optimization_opaqueEjjRKNS_5imageEb) #9
  unreachable

600:                                              ; No predecessors!
  br label %601

601:                                              ; preds = %600, %598
  %602 = load i64, ptr %58, align 8, !tbaa !15
  store i64 %602, ptr %6, align 8
  store i32 1, ptr %13, align 4
  br label %603

603:                                              ; preds = %601, %586, %530
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #8
  call void @llvm.lifetime.end.p0(i64 72, ptr %53) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #8
  call void @llvm.lifetime.end.p0(i64 72, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #8
  br label %604

604:                                              ; preds = %603, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  %605 = load i64, ptr %6, align 8
  ret i64 %605
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZNK6basisu12pvrtc4_image27evaluate_1x1_endpoint_errorEjjRKNS_5imageEbbm(ptr noundef nonnull align 8 dereferenceable(41), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext, i1 noundef zeroext, i64 noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu3vecILj3EfEC2Ef(ptr noundef nonnull align 4 dereferenceable(12), float noundef) unnamed_addr #0 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 1 dereferenceable(4) ptr @_ZNK6basisu5imageclEjj(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) #0 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12), i32 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfEmLEf(ptr noundef nonnull align 4 dereferenceable(12), float noundef) #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfE3setILj3EfEERS1_RKNS0_IXT_ET0_EE(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #0 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu3vecILj3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6basisu3vecILj3EfE16squared_distanceERKS1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisumlERKNS_3vecILj3EfEEf(ptr dead_on_unwind noalias writable sret(%"class.basisu::vec") align 4, ptr noundef nonnull align 4 dereferenceable(12), float noundef) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisudvERKNS_3vecILj3EfEEf(ptr dead_on_unwind noalias writable sret(%"class.basisu::vec") align 4, ptr noundef nonnull align 4 dereferenceable(12), float noundef) #0

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu3vecILj4EfEC2ILj3EfEERKNS0_IXT_ET0_EE(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #0 align 2

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu10color_rgbaC2Ei(ptr noundef nonnull align 1 dereferenceable(4), i32 noundef) unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZN6basisu12pvrtc4_image35remap_pixels_influenced_by_endpointEjjRKNS_5imageEbb(ptr noundef nonnull align 8 dereferenceable(41), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext, i1 noundef zeroext) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN6basisu7minimumImEET_S1_S1_(i64 noundef, i64 noundef) #4

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

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

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


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

%"class.basisu::vec" = type { [3 x float] }
%"class.basisu::vec.2" = type { [4 x float] }
%"class.basisu::color_rgba" = type { %union.anon }
%union.anon = type { [4 x i8] }
%"struct.basisu::pvrtc4_block" = type { i32, i32 }

@.str.3 = external hidden unnamed_addr constant [115 x i8], align 1
@_ZZN6basisu12pvrtc4_image34local_endpoint_optimization_opaqueEjjRKNS_5imageEbE9s_weights = external hidden local_unnamed_addr constant [7 x [7 x float]], align 16
@_ZN6basisuL17g_pvrtc_5_nearestE = external hidden local_unnamed_addr constant [256 x i8], align 16
@_ZN6basisuL17g_pvrtc_4_nearestE = external hidden local_unnamed_addr constant [256 x i8], align 16
@.str.8 = external hidden unnamed_addr constant [78 x i8], align 1
@__PRETTY_FUNCTION__._ZN6basisu12pvrtc4_image34local_endpoint_optimization_opaqueEjjRKNS_5imageEb = external hidden unnamed_addr constant [107 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [78 x i8], align 1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu10color_rgbaC2Eiiii(ptr noundef nonnull align 1 dereferenceable(4), i32 noundef, i32 noundef, i32 noundef, i32 noundef) unnamed_addr #0 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN6basisu12pvrtc4_image34local_endpoint_optimization_opaqueEjjRKNS_5imageEb(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %3, i1 noundef zeroext %4) local_unnamed_addr #4 align 2 {
  %6 = alloca %"class.basisu::vec", align 4
  %7 = alloca [2 x %"class.basisu::vec"], align 16
  %8 = alloca %"class.basisu::vec", align 4
  %9 = alloca %"class.basisu::vec", align 4
  %10 = alloca [2 x float], align 8
  %11 = alloca [2 x %"class.basisu::vec"], align 16
  %12 = alloca %"class.basisu::vec", align 4
  %13 = alloca %"class.basisu::vec", align 4
  %14 = alloca %"class.basisu::vec", align 4
  %15 = alloca %"class.basisu::vec", align 4
  %16 = alloca [2 x %"class.basisu::vec.2"], align 16
  %17 = alloca %"class.basisu::vec.2", align 4
  %18 = alloca %"class.basisu::vec", align 4
  %19 = alloca %"class.basisu::vec.2", align 4
  %20 = alloca %"class.basisu::vec", align 4
  %21 = alloca %"class.basisu::color_rgba", align 1
  %22 = alloca %"class.basisu::color_rgba", align 1
  %23 = alloca [3 x [3 x %"struct.basisu::pvrtc4_block"]], align 16
  %24 = alloca %"class.basisu::color_rgba", align 1
  %25 = alloca %"class.basisu::color_rgba", align 1
  %26 = alloca [3 x [3 x %"struct.basisu::pvrtc4_block"]], align 16
  %27 = tail call noundef i64 @_ZNK6basisu12pvrtc4_image27evaluate_1x1_endpoint_errorEjjRKNS_5imageEbbm(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %3, i1 noundef zeroext %4, i1 noundef zeroext false, i64 noundef 0)
  %.not = icmp eq i64 %27, 0
  br i1 %.not, label %496, label %28

28:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #6
  call void @_ZN6basisu3vecILj3EfEC2Ef(ptr noundef nonnull align 4 dereferenceable(12) %6, float noundef 0.000000e+00)
  %29 = shl i32 %2, 2
  %30 = add i32 %29, -1
  %31 = shl i32 %1, 2
  %32 = add i32 %31, -1
  %33 = or disjoint i32 %31, 1
  %34 = or disjoint i32 %31, 2
  %35 = or disjoint i32 %31, 3
  %36 = add i32 %31, 4
  %37 = add i32 %31, 5
  br label %46

38:                                               ; preds = %46
  %39 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfEmLEf(ptr noundef nonnull align 4 dereferenceable(12) %6, float noundef 0x3F94E5E0A0000000)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  call void @_ZN6basisu3vecILj3EfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %7)
  %.ptr.1 = getelementptr inbounds i8, ptr %7, i64 12
  call void @_ZN6basisu3vecILj3EfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.1)
  %40 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfE3setILj3EfEERS1_RKNS0_IXT_ET0_EE(ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %6)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #6
  call void @_ZN6basisu3vecILj3EfEC2Ef(ptr noundef nonnull align 4 dereferenceable(12) %8, float noundef 0x3F899999A0000000)
  %41 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfEmIERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %8)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #6
  %42 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfE3setILj3EfEERS1_RKNS0_IXT_ET0_EE(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.1, ptr noundef nonnull align 4 dereferenceable(12) %6)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #6
  call void @_ZN6basisu3vecILj3EfEC2Ef(ptr noundef nonnull align 4 dereferenceable(12) %9, float noundef 0x3F899999A0000000)
  %43 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfEpLERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.1, ptr noundef nonnull align 4 dereferenceable(12) %9)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %44 = getelementptr inbounds i8, ptr %11, i64 12
  %45 = getelementptr inbounds i8, ptr %10, i64 4
  br label %191

46:                                               ; preds = %28, %46
  %.0130163 = phi i32 [ 0, %28 ], [ %189, %46 ]
  %47 = add i32 %30, %.0130163
  %48 = call noundef i32 @_ZNK6basisu12pvrtc4_image6wrap_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %47)
  %49 = call noundef i32 @_ZNK6basisu12pvrtc4_image6wrap_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %32)
  %50 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNK6basisu5imageclEjj(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %49, i32 noundef %48)
  %51 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %50, i32 noundef 0)
  %52 = load i8, ptr %51, align 1, !tbaa !5
  %53 = uitofp i8 %52 to float
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 0)
  %55 = load float, ptr %54, align 4, !tbaa !8
  %56 = fadd float %55, %53
  store float %56, ptr %54, align 4, !tbaa !8
  %57 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %50, i32 noundef 1)
  %58 = load i8, ptr %57, align 1, !tbaa !5
  %59 = uitofp i8 %58 to float
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 1)
  %61 = load float, ptr %60, align 4, !tbaa !8
  %62 = fadd float %61, %59
  store float %62, ptr %60, align 4, !tbaa !8
  %63 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %50, i32 noundef 2)
  %64 = load i8, ptr %63, align 1, !tbaa !5
  %65 = uitofp i8 %64 to float
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 2)
  %67 = load float, ptr %66, align 4, !tbaa !8
  %68 = fadd float %67, %65
  store float %68, ptr %66, align 4, !tbaa !8
  %69 = call noundef i32 @_ZNK6basisu12pvrtc4_image6wrap_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %31)
  %70 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNK6basisu5imageclEjj(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %69, i32 noundef %48)
  %71 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %70, i32 noundef 0)
  %72 = load i8, ptr %71, align 1, !tbaa !5
  %73 = uitofp i8 %72 to float
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 0)
  %75 = load float, ptr %74, align 4, !tbaa !8
  %76 = fadd float %75, %73
  store float %76, ptr %74, align 4, !tbaa !8
  %77 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %70, i32 noundef 1)
  %78 = load i8, ptr %77, align 1, !tbaa !5
  %79 = uitofp i8 %78 to float
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 1)
  %81 = load float, ptr %80, align 4, !tbaa !8
  %82 = fadd float %81, %79
  store float %82, ptr %80, align 4, !tbaa !8
  %83 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %70, i32 noundef 2)
  %84 = load i8, ptr %83, align 1, !tbaa !5
  %85 = uitofp i8 %84 to float
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 2)
  %87 = load float, ptr %86, align 4, !tbaa !8
  %88 = fadd float %87, %85
  store float %88, ptr %86, align 4, !tbaa !8
  %89 = call noundef i32 @_ZNK6basisu12pvrtc4_image6wrap_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %33)
  %90 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNK6basisu5imageclEjj(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %89, i32 noundef %48)
  %91 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %90, i32 noundef 0)
  %92 = load i8, ptr %91, align 1, !tbaa !5
  %93 = uitofp i8 %92 to float
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 0)
  %95 = load float, ptr %94, align 4, !tbaa !8
  %96 = fadd float %95, %93
  store float %96, ptr %94, align 4, !tbaa !8
  %97 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %90, i32 noundef 1)
  %98 = load i8, ptr %97, align 1, !tbaa !5
  %99 = uitofp i8 %98 to float
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 1)
  %101 = load float, ptr %100, align 4, !tbaa !8
  %102 = fadd float %101, %99
  store float %102, ptr %100, align 4, !tbaa !8
  %103 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %90, i32 noundef 2)
  %104 = load i8, ptr %103, align 1, !tbaa !5
  %105 = uitofp i8 %104 to float
  %106 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 2)
  %107 = load float, ptr %106, align 4, !tbaa !8
  %108 = fadd float %107, %105
  store float %108, ptr %106, align 4, !tbaa !8
  %109 = call noundef i32 @_ZNK6basisu12pvrtc4_image6wrap_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %34)
  %110 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNK6basisu5imageclEjj(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %109, i32 noundef %48)
  %111 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %110, i32 noundef 0)
  %112 = load i8, ptr %111, align 1, !tbaa !5
  %113 = uitofp i8 %112 to float
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 0)
  %115 = load float, ptr %114, align 4, !tbaa !8
  %116 = fadd float %115, %113
  store float %116, ptr %114, align 4, !tbaa !8
  %117 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %110, i32 noundef 1)
  %118 = load i8, ptr %117, align 1, !tbaa !5
  %119 = uitofp i8 %118 to float
  %120 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 1)
  %121 = load float, ptr %120, align 4, !tbaa !8
  %122 = fadd float %121, %119
  store float %122, ptr %120, align 4, !tbaa !8
  %123 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %110, i32 noundef 2)
  %124 = load i8, ptr %123, align 1, !tbaa !5
  %125 = uitofp i8 %124 to float
  %126 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 2)
  %127 = load float, ptr %126, align 4, !tbaa !8
  %128 = fadd float %127, %125
  store float %128, ptr %126, align 4, !tbaa !8
  %129 = call noundef i32 @_ZNK6basisu12pvrtc4_image6wrap_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %35)
  %130 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNK6basisu5imageclEjj(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %129, i32 noundef %48)
  %131 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %130, i32 noundef 0)
  %132 = load i8, ptr %131, align 1, !tbaa !5
  %133 = uitofp i8 %132 to float
  %134 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 0)
  %135 = load float, ptr %134, align 4, !tbaa !8
  %136 = fadd float %135, %133
  store float %136, ptr %134, align 4, !tbaa !8
  %137 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %130, i32 noundef 1)
  %138 = load i8, ptr %137, align 1, !tbaa !5
  %139 = uitofp i8 %138 to float
  %140 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 1)
  %141 = load float, ptr %140, align 4, !tbaa !8
  %142 = fadd float %141, %139
  store float %142, ptr %140, align 4, !tbaa !8
  %143 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %130, i32 noundef 2)
  %144 = load i8, ptr %143, align 1, !tbaa !5
  %145 = uitofp i8 %144 to float
  %146 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 2)
  %147 = load float, ptr %146, align 4, !tbaa !8
  %148 = fadd float %147, %145
  store float %148, ptr %146, align 4, !tbaa !8
  %149 = call noundef i32 @_ZNK6basisu12pvrtc4_image6wrap_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %36)
  %150 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNK6basisu5imageclEjj(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %149, i32 noundef %48)
  %151 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %150, i32 noundef 0)
  %152 = load i8, ptr %151, align 1, !tbaa !5
  %153 = uitofp i8 %152 to float
  %154 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 0)
  %155 = load float, ptr %154, align 4, !tbaa !8
  %156 = fadd float %155, %153
  store float %156, ptr %154, align 4, !tbaa !8
  %157 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %150, i32 noundef 1)
  %158 = load i8, ptr %157, align 1, !tbaa !5
  %159 = uitofp i8 %158 to float
  %160 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 1)
  %161 = load float, ptr %160, align 4, !tbaa !8
  %162 = fadd float %161, %159
  store float %162, ptr %160, align 4, !tbaa !8
  %163 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %150, i32 noundef 2)
  %164 = load i8, ptr %163, align 1, !tbaa !5
  %165 = uitofp i8 %164 to float
  %166 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 2)
  %167 = load float, ptr %166, align 4, !tbaa !8
  %168 = fadd float %167, %165
  store float %168, ptr %166, align 4, !tbaa !8
  %169 = call noundef i32 @_ZNK6basisu12pvrtc4_image6wrap_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %37)
  %170 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNK6basisu5imageclEjj(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %169, i32 noundef %48)
  %171 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %170, i32 noundef 0)
  %172 = load i8, ptr %171, align 1, !tbaa !5
  %173 = uitofp i8 %172 to float
  %174 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 0)
  %175 = load float, ptr %174, align 4, !tbaa !8
  %176 = fadd float %175, %173
  store float %176, ptr %174, align 4, !tbaa !8
  %177 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %170, i32 noundef 1)
  %178 = load i8, ptr %177, align 1, !tbaa !5
  %179 = uitofp i8 %178 to float
  %180 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 1)
  %181 = load float, ptr %180, align 4, !tbaa !8
  %182 = fadd float %181, %179
  store float %182, ptr %180, align 4, !tbaa !8
  %183 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %170, i32 noundef 2)
  %184 = load i8, ptr %183, align 1, !tbaa !5
  %185 = uitofp i8 %184 to float
  %186 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 2)
  %187 = load float, ptr %186, align 4, !tbaa !8
  %188 = fadd float %187, %185
  store float %188, ptr %186, align 4, !tbaa !8
  %189 = add nuw nsw i32 %.0130163, 1
  %exitcond.not = icmp eq i32 %189, 7
  br i1 %exitcond.not, label %38, label %46, !llvm.loop !10

190:                                              ; preds = %192
  br i1 %spec.select, label %.preheader161, label %230

191:                                              ; preds = %38, %192
  %.0134167 = phi i1 [ true, %38 ], [ %spec.select, %192 ]
  %.0136166 = phi i32 [ 0, %38 ], [ %199, %192 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #6
  call void @_ZN6basisu3vecILj3EfEC2Ef(ptr noundef nonnull align 4 dereferenceable(12) %11, float noundef 0.000000e+00)
  call void @_ZN6basisu3vecILj3EfEC2Ef(ptr noundef nonnull align 4 dereferenceable(12) %44, float noundef 0.000000e+00)
  store i64 0, ptr %10, align 8
  br label %200

192:                                              ; preds = %204
  %193 = load float, ptr %10, align 8, !tbaa !8
  %194 = fcmp une float %193, 0.000000e+00
  %195 = load float, ptr %45, align 4
  %196 = fcmp une float %195, 0.000000e+00
  %or.cond = select i1 %194, i1 %196, i1 false
  %spec.select = select i1 %or.cond, i1 %.0134167, i1 false
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #6
  call void @_ZN6basisudvERKNS_3vecILj3EfEEf(ptr dead_on_unwind nonnull writable sret(%"class.basisu::vec") align 4 %14, ptr noundef nonnull align 4 dereferenceable(12) %11, float noundef %193)
  %197 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %15) #6
  call void @_ZN6basisudvERKNS_3vecILj3EfEEf(ptr dead_on_unwind nonnull writable sret(%"class.basisu::vec") align 4 %15, ptr noundef nonnull align 4 dereferenceable(12) %44, float noundef %195)
  %198 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.1, ptr noundef nonnull align 4 dereferenceable(12) %15)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #6
  %199 = add nuw nsw i32 %.0136166, 1
  %exitcond182.not = icmp eq i32 %199, 4
  br i1 %exitcond182.not, label %190, label %191, !llvm.loop !12

200:                                              ; preds = %191, %204
  %indvars.iv178 = phi i64 [ 0, %191 ], [ %indvars.iv.next179, %204 ]
  %201 = trunc nuw nsw i64 %indvars.iv178 to i32
  %202 = add i32 %30, %201
  %203 = call noundef i32 @_ZNK6basisu12pvrtc4_image6wrap_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %202)
  br label %205

204:                                              ; preds = %205
  %indvars.iv.next179 = add nuw nsw i64 %indvars.iv178, 1
  %exitcond181.not = icmp eq i64 %indvars.iv.next179, 7
  br i1 %exitcond181.not, label %192, label %200, !llvm.loop !13

205:                                              ; preds = %200, %205
  %indvars.iv = phi i64 [ 0, %200 ], [ %indvars.iv.next, %205 ]
  %206 = trunc nuw nsw i64 %indvars.iv to i32
  %207 = add i32 %32, %206
  %208 = call noundef i32 @_ZNK6basisu12pvrtc4_image6wrap_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %207)
  %209 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNK6basisu5imageclEjj(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %208, i32 noundef %203)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #6
  %210 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %209, i32 noundef 0)
  %211 = load i8, ptr %210, align 1, !tbaa !5
  %212 = uitofp i8 %211 to float
  %213 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %209, i32 noundef 1)
  %214 = load i8, ptr %213, align 1, !tbaa !5
  %215 = uitofp i8 %214 to float
  %216 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %209, i32 noundef 2)
  %217 = load i8, ptr %216, align 1, !tbaa !5
  %218 = uitofp i8 %217 to float
  call void @_ZN6basisu3vecILj3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %12, float noundef %212, float noundef %215, float noundef %218)
  %219 = call noundef float @_ZNK6basisu3vecILj3EfE16squared_distanceERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %12)
  %220 = call noundef float @_ZNK6basisu3vecILj3EfE16squared_distanceERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.1, ptr noundef nonnull align 4 dereferenceable(12) %12)
  %221 = fcmp ogt float %219, %220
  %222 = getelementptr inbounds [7 x [7 x float]], ptr @_ZZN6basisu12pvrtc4_image34local_endpoint_optimization_opaqueEjjRKNS_5imageEbE9s_weights, i64 0, i64 %indvars.iv178, i64 %indvars.iv
  %223 = load float, ptr %222, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #6
  call void @_ZN6basisumlERKNS_3vecILj3EfEEf(ptr dead_on_unwind nonnull writable sret(%"class.basisu::vec") align 4 %13, ptr noundef nonnull align 4 dereferenceable(12) %12, float noundef %223)
  %224 = zext i1 %221 to i64
  %225 = getelementptr inbounds [2 x %"class.basisu::vec"], ptr %11, i64 0, i64 %224
  %226 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfEpLERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %225, ptr noundef nonnull align 4 dereferenceable(12) %13)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #6
  %227 = getelementptr inbounds [2 x float], ptr %10, i64 0, i64 %224
  %228 = load float, ptr %227, align 4, !tbaa !8
  %229 = fadd float %223, %228
  store float %229, ptr %227, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond177.not = icmp eq i64 %indvars.iv.next, 7
  br i1 %exitcond177.not, label %204, label %205, !llvm.loop !14

230:                                              ; preds = %190
  %231 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %6)
  %232 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.1, ptr noundef nonnull align 4 dereferenceable(12) %6)
  br label %.preheader161

.preheader161:                                    ; preds = %230, %190
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %16) #6
  call void @_ZN6basisu3vecILj4EfEC2ILj3EfEERKNS0_IXT_ET0_EE(ptr noundef nonnull align 4 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(12) %7)
  %233 = getelementptr inbounds i8, ptr %16, i64 16
  call void @_ZN6basisu3vecILj4EfEC2ILj3EfEERKNS0_IXT_ET0_EE(ptr noundef nonnull align 4 dereferenceable(16) %233, ptr noundef nonnull align 4 dereferenceable(12) %.ptr.1)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %18) #6
  call void @_ZN6basisu3vecILj3EfEC2Ef(ptr noundef nonnull align 4 dereferenceable(12) %18, float noundef 5.000000e-01)
  call void @_ZN6basisu3vecILj4EfEC2ILj3EfEERKNS0_IXT_ET0_EE(ptr noundef nonnull align 4 dereferenceable(16) %17, ptr noundef nonnull align 4 dereferenceable(12) %18)
  %234 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN6basisu3vecILj4EfEpLERKS1_(ptr noundef nonnull align 4 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(16) %17)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %20) #6
  call void @_ZN6basisu3vecILj3EfEC2Ef(ptr noundef nonnull align 4 dereferenceable(12) %20, float noundef 5.000000e-01)
  call void @_ZN6basisu3vecILj4EfEC2ILj3EfEERKNS0_IXT_ET0_EE(ptr noundef nonnull align 4 dereferenceable(16) %19, ptr noundef nonnull align 4 dereferenceable(12) %20)
  %235 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN6basisu3vecILj4EfEpLERKS1_(ptr noundef nonnull align 4 dereferenceable(16) %233, ptr noundef nonnull align 4 dereferenceable(16) %19)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #6
  %236 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj4EfEixEj(ptr noundef nonnull align 4 dereferenceable(16) %16, i32 noundef 0)
  %237 = load float, ptr %236, align 4, !tbaa !8
  %238 = fptosi float %237 to i32
  %239 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj4EfEixEj(ptr noundef nonnull align 4 dereferenceable(16) %16, i32 noundef 1)
  %240 = load float, ptr %239, align 4, !tbaa !8
  %241 = fptosi float %240 to i32
  %242 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj4EfEixEj(ptr noundef nonnull align 4 dereferenceable(16) %16, i32 noundef 2)
  %243 = load float, ptr %242, align 4, !tbaa !8
  %244 = fptosi float %243 to i32
  call void @_ZN6basisu10color_rgbaC2Eiiii(ptr noundef nonnull align 1 dereferenceable(4) %21, i32 noundef %238, i32 noundef %241, i32 noundef %244, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #6
  %245 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj4EfEixEj(ptr noundef nonnull align 4 dereferenceable(16) %233, i32 noundef 0)
  %246 = load float, ptr %245, align 4, !tbaa !8
  %247 = fptosi float %246 to i32
  %248 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj4EfEixEj(ptr noundef nonnull align 4 dereferenceable(16) %233, i32 noundef 1)
  %249 = load float, ptr %248, align 4, !tbaa !8
  %250 = fptosi float %249 to i32
  %251 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj4EfEixEj(ptr noundef nonnull align 4 dereferenceable(16) %233, i32 noundef 2)
  %252 = load float, ptr %251, align 4, !tbaa !8
  %253 = fptosi float %252 to i32
  call void @_ZN6basisu10color_rgbaC2Eiiii(ptr noundef nonnull align 1 dereferenceable(4) %22, i32 noundef %247, i32 noundef %250, i32 noundef %253, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %23) #6
  call void @_ZN6basisu12pvrtc4_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %23)
  %.ptr149.1 = getelementptr inbounds i8, ptr %23, i64 8
  call void @_ZN6basisu12pvrtc4_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr149.1)
  %.ptr149.2 = getelementptr inbounds i8, ptr %23, i64 16
  call void @_ZN6basisu12pvrtc4_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr149.2)
  %.ptr149.3 = getelementptr inbounds i8, ptr %23, i64 24
  call void @_ZN6basisu12pvrtc4_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr149.3)
  %.ptr149.4 = getelementptr inbounds i8, ptr %23, i64 32
  call void @_ZN6basisu12pvrtc4_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr149.4)
  %.ptr149.5 = getelementptr inbounds i8, ptr %23, i64 40
  call void @_ZN6basisu12pvrtc4_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr149.5)
  %.ptr149.6 = getelementptr inbounds i8, ptr %23, i64 48
  call void @_ZN6basisu12pvrtc4_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr149.6)
  %.ptr149.7 = getelementptr inbounds i8, ptr %23, i64 56
  call void @_ZN6basisu12pvrtc4_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr149.7)
  %.ptr149.8 = getelementptr inbounds i8, ptr %23, i64 64
  call void @_ZN6basisu12pvrtc4_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr149.8)
  %254 = getelementptr inbounds i8, ptr %0, i64 8
  %255 = add i32 %1, -1
  %256 = add i32 %2, -1
  %257 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %255)
  %258 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %256)
  %259 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %257, i32 noundef %258)
  %260 = load i64, ptr %259, align 4
  store i64 %260, ptr %23, align 16
  %261 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %1)
  %262 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %256)
  %263 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %261, i32 noundef %262)
  %264 = load i64, ptr %263, align 4
  store i64 %264, ptr %.ptr149.3, align 8
  %265 = add i32 %1, 1
  %266 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %265)
  %267 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %256)
  %268 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %266, i32 noundef %267)
  %269 = load i64, ptr %268, align 4
  store i64 %269, ptr %.ptr149.6, align 16
  %270 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %255)
  %271 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %2)
  %272 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %270, i32 noundef %271)
  %273 = load i64, ptr %272, align 4
  store i64 %273, ptr %.ptr149.1, align 8
  %274 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %1)
  %275 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %2)
  %276 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %274, i32 noundef %275)
  %277 = load i64, ptr %276, align 4
  store i64 %277, ptr %.ptr149.4, align 16
  %278 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %265)
  %279 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %2)
  %280 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %278, i32 noundef %279)
  %281 = load i64, ptr %280, align 4
  store i64 %281, ptr %.ptr149.7, align 8
  %282 = add i32 %2, 1
  %283 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %255)
  %284 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %282)
  %285 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %283, i32 noundef %284)
  %286 = load i64, ptr %285, align 4
  store i64 %286, ptr %.ptr149.2, align 16
  %287 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %1)
  %288 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %282)
  %289 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %287, i32 noundef %288)
  %290 = load i64, ptr %289, align 4
  store i64 %290, ptr %.ptr149.5, align 8
  %291 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %265)
  %292 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %282)
  %293 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %291, i32 noundef %292)
  %294 = load i64, ptr %293, align 4
  store i64 %294, ptr %.ptr149.8, align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #6
  call void @_ZN6basisu10color_rgbaC2Ei(ptr noundef nonnull align 1 dereferenceable(4) %24, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %25) #6
  call void @_ZN6basisu10color_rgbaC2Ei(ptr noundef nonnull align 1 dereferenceable(4) %25, i32 noundef 0)
  %295 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %21, i32 noundef 0)
  %296 = load i8, ptr %295, align 1, !tbaa !5
  %297 = zext i8 %296 to i64
  %298 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_5_nearestE, i64 0, i64 %297
  %299 = load i8, ptr %298, align 1, !tbaa !5
  %300 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %24, i32 noundef 0)
  store i8 %299, ptr %300, align 1, !tbaa !5
  %301 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %22, i32 noundef 0)
  %302 = load i8, ptr %301, align 1, !tbaa !5
  %303 = zext i8 %302 to i64
  %304 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_5_nearestE, i64 0, i64 %303
  %305 = load i8, ptr %304, align 1, !tbaa !5
  %306 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %25, i32 noundef 0)
  store i8 %305, ptr %306, align 1, !tbaa !5
  %307 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %21, i32 noundef 1)
  %308 = load i8, ptr %307, align 1, !tbaa !5
  %309 = zext i8 %308 to i64
  %310 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_5_nearestE, i64 0, i64 %309
  %311 = load i8, ptr %310, align 1, !tbaa !5
  %312 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %24, i32 noundef 1)
  store i8 %311, ptr %312, align 1, !tbaa !5
  %313 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %22, i32 noundef 1)
  %314 = load i8, ptr %313, align 1, !tbaa !5
  %315 = zext i8 %314 to i64
  %316 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_5_nearestE, i64 0, i64 %315
  %317 = load i8, ptr %316, align 1, !tbaa !5
  %318 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %25, i32 noundef 1)
  store i8 %317, ptr %318, align 1, !tbaa !5
  %319 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %21, i32 noundef 2)
  %320 = load i8, ptr %319, align 1, !tbaa !5
  %321 = zext i8 %320 to i64
  %322 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_4_nearestE, i64 0, i64 %321
  %323 = load i8, ptr %322, align 1, !tbaa !5
  %324 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %24, i32 noundef 2)
  store i8 %323, ptr %324, align 1, !tbaa !5
  %325 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %21, i32 noundef 2)
  %326 = load i8, ptr %325, align 1, !tbaa !5
  %327 = zext i8 %326 to i64
  %328 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_5_nearestE, i64 0, i64 %327
  %329 = load i8, ptr %328, align 1, !tbaa !5
  %330 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %25, i32 noundef 2)
  store i8 %329, ptr %330, align 1, !tbaa !5
  %331 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %24, i32 noundef 3)
  store i8 0, ptr %331, align 1, !tbaa !5
  %332 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %25, i32 noundef 3)
  store i8 0, ptr %332, align 1, !tbaa !5
  %333 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %1, i32 noundef %2)
  call void @_ZN6basisu12pvrtc4_block16set_endpoint_rawEjRKNS_10color_rgbaEb(ptr noundef nonnull align 4 dereferenceable(8) %333, i32 noundef 0, ptr noundef nonnull align 1 dereferenceable(4) %24, i1 noundef zeroext true)
  %334 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %1, i32 noundef %2)
  call void @_ZN6basisu12pvrtc4_block16set_endpoint_rawEjRKNS_10color_rgbaEb(ptr noundef nonnull align 4 dereferenceable(8) %334, i32 noundef 1, ptr noundef nonnull align 1 dereferenceable(4) %25, i1 noundef zeroext true)
  %335 = call noundef i64 @_ZN6basisu12pvrtc4_image35remap_pixels_influenced_by_endpointEjjRKNS_5imageEbb(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %3, i1 noundef zeroext %4, i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %26) #6
  call void @_ZN6basisu12pvrtc4_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %26)
  %.ptr153.1 = getelementptr inbounds i8, ptr %26, i64 8
  call void @_ZN6basisu12pvrtc4_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr153.1)
  %.ptr153.2 = getelementptr inbounds i8, ptr %26, i64 16
  call void @_ZN6basisu12pvrtc4_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr153.2)
  %.ptr153.3 = getelementptr inbounds i8, ptr %26, i64 24
  call void @_ZN6basisu12pvrtc4_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr153.3)
  %.ptr153.4 = getelementptr inbounds i8, ptr %26, i64 32
  call void @_ZN6basisu12pvrtc4_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr153.4)
  %.ptr153.5 = getelementptr inbounds i8, ptr %26, i64 40
  call void @_ZN6basisu12pvrtc4_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr153.5)
  %.ptr153.6 = getelementptr inbounds i8, ptr %26, i64 48
  call void @_ZN6basisu12pvrtc4_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr153.6)
  %.ptr153.7 = getelementptr inbounds i8, ptr %26, i64 56
  call void @_ZN6basisu12pvrtc4_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr153.7)
  %.ptr153.8 = getelementptr inbounds i8, ptr %26, i64 64
  call void @_ZN6basisu12pvrtc4_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr153.8)
  %336 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %255)
  %337 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %256)
  %338 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %336, i32 noundef %337)
  %339 = load i64, ptr %338, align 4
  store i64 %339, ptr %26, align 16
  %340 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %1)
  %341 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %256)
  %342 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %340, i32 noundef %341)
  %343 = load i64, ptr %342, align 4
  store i64 %343, ptr %.ptr153.3, align 8
  %344 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %265)
  %345 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %256)
  %346 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %344, i32 noundef %345)
  %347 = load i64, ptr %346, align 4
  store i64 %347, ptr %.ptr153.6, align 16
  %348 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %255)
  %349 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %2)
  %350 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %348, i32 noundef %349)
  %351 = load i64, ptr %350, align 4
  store i64 %351, ptr %.ptr153.1, align 8
  %352 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %1)
  %353 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %2)
  %354 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %352, i32 noundef %353)
  %355 = load i64, ptr %354, align 4
  store i64 %355, ptr %.ptr153.4, align 16
  %356 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %265)
  %357 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %2)
  %358 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %356, i32 noundef %357)
  %359 = load i64, ptr %358, align 4
  store i64 %359, ptr %.ptr153.7, align 8
  %360 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %255)
  %361 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %282)
  %362 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %360, i32 noundef %361)
  %363 = load i64, ptr %362, align 4
  store i64 %363, ptr %.ptr153.2, align 16
  %364 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %1)
  %365 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %282)
  %366 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %364, i32 noundef %365)
  %367 = load i64, ptr %366, align 4
  store i64 %367, ptr %.ptr153.5, align 8
  %368 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %265)
  %369 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %282)
  %370 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %368, i32 noundef %369)
  %371 = load i64, ptr %370, align 4
  store i64 %371, ptr %.ptr153.8, align 16
  %372 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %22, i32 noundef 0)
  %373 = load i8, ptr %372, align 1, !tbaa !5
  %374 = zext i8 %373 to i64
  %375 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_5_nearestE, i64 0, i64 %374
  %376 = load i8, ptr %375, align 1, !tbaa !5
  %377 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %24, i32 noundef 0)
  store i8 %376, ptr %377, align 1, !tbaa !5
  %378 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %21, i32 noundef 0)
  %379 = load i8, ptr %378, align 1, !tbaa !5
  %380 = zext i8 %379 to i64
  %381 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_5_nearestE, i64 0, i64 %380
  %382 = load i8, ptr %381, align 1, !tbaa !5
  %383 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %25, i32 noundef 0)
  store i8 %382, ptr %383, align 1, !tbaa !5
  %384 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %22, i32 noundef 1)
  %385 = load i8, ptr %384, align 1, !tbaa !5
  %386 = zext i8 %385 to i64
  %387 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_5_nearestE, i64 0, i64 %386
  %388 = load i8, ptr %387, align 1, !tbaa !5
  %389 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %24, i32 noundef 1)
  store i8 %388, ptr %389, align 1, !tbaa !5
  %390 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %21, i32 noundef 1)
  %391 = load i8, ptr %390, align 1, !tbaa !5
  %392 = zext i8 %391 to i64
  %393 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_5_nearestE, i64 0, i64 %392
  %394 = load i8, ptr %393, align 1, !tbaa !5
  %395 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %25, i32 noundef 1)
  store i8 %394, ptr %395, align 1, !tbaa !5
  %396 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %22, i32 noundef 2)
  %397 = load i8, ptr %396, align 1, !tbaa !5
  %398 = zext i8 %397 to i64
  %399 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_4_nearestE, i64 0, i64 %398
  %400 = load i8, ptr %399, align 1, !tbaa !5
  %401 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %24, i32 noundef 2)
  store i8 %400, ptr %401, align 1, !tbaa !5
  %402 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %21, i32 noundef 2)
  %403 = load i8, ptr %402, align 1, !tbaa !5
  %404 = zext i8 %403 to i64
  %405 = getelementptr inbounds [256 x i8], ptr @_ZN6basisuL17g_pvrtc_5_nearestE, i64 0, i64 %404
  %406 = load i8, ptr %405, align 1, !tbaa !5
  %407 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %25, i32 noundef 2)
  store i8 %406, ptr %407, align 1, !tbaa !5
  %408 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %24, i32 noundef 3)
  store i8 0, ptr %408, align 1, !tbaa !5
  %409 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %25, i32 noundef 3)
  store i8 0, ptr %409, align 1, !tbaa !5
  %410 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %1, i32 noundef %2)
  call void @_ZN6basisu12pvrtc4_block16set_endpoint_rawEjRKNS_10color_rgbaEb(ptr noundef nonnull align 4 dereferenceable(8) %410, i32 noundef 0, ptr noundef nonnull align 1 dereferenceable(4) %24, i1 noundef zeroext true)
  %411 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %1, i32 noundef %2)
  call void @_ZN6basisu12pvrtc4_block16set_endpoint_rawEjRKNS_10color_rgbaEb(ptr noundef nonnull align 4 dereferenceable(8) %411, i32 noundef 1, ptr noundef nonnull align 1 dereferenceable(4) %25, i1 noundef zeroext true)
  %412 = call noundef i64 @_ZN6basisu12pvrtc4_image35remap_pixels_influenced_by_endpointEjjRKNS_5imageEbb(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %3, i1 noundef zeroext %4, i1 noundef zeroext false)
  %413 = call noundef i64 @_ZN6basisu7minimumImEET_S1_S1_(i64 noundef %335, i64 noundef %412)
  %414 = icmp ult i64 %27, %413
  br i1 %414, label %.preheader.preheader, label %451

.preheader.preheader:                             ; preds = %.preheader161
  %415 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %255)
  %416 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %256)
  %417 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %415, i32 noundef %416)
  %418 = load i64, ptr %23, align 16
  store i64 %418, ptr %417, align 4
  %419 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %1)
  %420 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %256)
  %421 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %419, i32 noundef %420)
  %422 = load i64, ptr %.ptr149.3, align 8
  store i64 %422, ptr %421, align 4
  %423 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %265)
  %424 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %256)
  %425 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %423, i32 noundef %424)
  %426 = load i64, ptr %.ptr149.6, align 16
  store i64 %426, ptr %425, align 4
  %427 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %255)
  %428 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %2)
  %429 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %427, i32 noundef %428)
  %430 = load i64, ptr %.ptr149.1, align 8
  store i64 %430, ptr %429, align 4
  %431 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %1)
  %432 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %2)
  %433 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %431, i32 noundef %432)
  %434 = load i64, ptr %.ptr149.4, align 16
  store i64 %434, ptr %433, align 4
  %435 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %265)
  %436 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %2)
  %437 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %435, i32 noundef %436)
  %438 = load i64, ptr %.ptr149.7, align 8
  store i64 %438, ptr %437, align 4
  %439 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %255)
  %440 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %282)
  %441 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %439, i32 noundef %440)
  %442 = load i64, ptr %.ptr149.2, align 16
  store i64 %442, ptr %441, align 4
  %443 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %1)
  %444 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %282)
  %445 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %443, i32 noundef %444)
  %446 = load i64, ptr %.ptr149.5, align 8
  store i64 %446, ptr %445, align 4
  %447 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %265)
  %448 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %282)
  %449 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %447, i32 noundef %448)
  %450 = load i64, ptr %.ptr149.8, align 16
  store i64 %450, ptr %449, align 4
  br label %.loopexit

451:                                              ; preds = %.preheader161
  %452 = icmp ult i64 %335, %412
  br i1 %452, label %.preheader156.preheader, label %492

.preheader156.preheader:                          ; preds = %451
  %453 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %255)
  %454 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %256)
  %455 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %453, i32 noundef %454)
  %456 = load i64, ptr %26, align 16
  store i64 %456, ptr %455, align 4
  %457 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %1)
  %458 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %256)
  %459 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %457, i32 noundef %458)
  %460 = load i64, ptr %.ptr153.3, align 8
  store i64 %460, ptr %459, align 4
  %461 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %265)
  %462 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %256)
  %463 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %461, i32 noundef %462)
  %464 = load i64, ptr %.ptr153.6, align 16
  store i64 %464, ptr %463, align 4
  %465 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %255)
  %466 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %2)
  %467 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %465, i32 noundef %466)
  %468 = load i64, ptr %.ptr153.1, align 8
  store i64 %468, ptr %467, align 4
  %469 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %1)
  %470 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %2)
  %471 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %469, i32 noundef %470)
  %472 = load i64, ptr %.ptr153.4, align 16
  store i64 %472, ptr %471, align 4
  %473 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %265)
  %474 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %2)
  %475 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %473, i32 noundef %474)
  %476 = load i64, ptr %.ptr153.7, align 8
  store i64 %476, ptr %475, align 4
  %477 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %255)
  %478 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %282)
  %479 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %477, i32 noundef %478)
  %480 = load i64, ptr %.ptr153.2, align 16
  store i64 %480, ptr %479, align 4
  %481 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %1)
  %482 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %282)
  %483 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %481, i32 noundef %482)
  %484 = load i64, ptr %.ptr153.5, align 8
  store i64 %484, ptr %483, align 4
  %485 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_xEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %265)
  %486 = call noundef i32 @_ZNK6basisu12pvrtc4_image12wrap_block_yEi(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %282)
  %487 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %254, i32 noundef %485, i32 noundef %486)
  %488 = load i64, ptr %.ptr153.8, align 16
  store i64 %488, ptr %487, align 4
  %489 = call noundef i64 @_ZNK6basisu12pvrtc4_image27evaluate_1x1_endpoint_errorEjjRKNS_5imageEbbm(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %3, i1 noundef zeroext %4, i1 noundef zeroext false, i64 noundef 0)
  %490 = icmp eq i64 %335, %489
  br i1 %490, label %.loopexit, label %491

491:                                              ; preds = %.preheader156.preheader
  call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.3, i32 noundef 556, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6basisu12pvrtc4_image34local_endpoint_optimization_opaqueEjjRKNS_5imageEb) #7
  unreachable

492:                                              ; preds = %451
  %493 = call noundef i64 @_ZNK6basisu12pvrtc4_image27evaluate_1x1_endpoint_errorEjjRKNS_5imageEbbm(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %3, i1 noundef zeroext %4, i1 noundef zeroext false, i64 noundef 0)
  %494 = icmp eq i64 %412, %493
  br i1 %494, label %.loopexit, label %495

495:                                              ; preds = %492
  call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.3, i32 noundef 560, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6basisu12pvrtc4_image34local_endpoint_optimization_opaqueEjjRKNS_5imageEb) #7
  unreachable

.loopexit:                                        ; preds = %.preheader.preheader, %492, %.preheader156.preheader
  %.0 = phi i64 [ %335, %.preheader156.preheader ], [ %412, %492 ], [ %27, %.preheader.preheader ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %26) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #6
  br label %496

496:                                              ; preds = %5, %.loopexit
  %.1 = phi i64 [ %.0, %.loopexit ], [ 0, %5 ]
  ret i64 %.1
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZNK6basisu12pvrtc4_image27evaluate_1x1_endpoint_errorEjjRKNS_5imageEbbm(ptr noundef nonnull align 8 dereferenceable(41), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext, i1 noundef zeroext, i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu3vecILj3EfEC2Ef(ptr noundef nonnull align 4 dereferenceable(12), float noundef) unnamed_addr #0 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 1 dereferenceable(4) ptr @_ZNK6basisu5imageclEjj(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj3EfEixEj(ptr noundef nonnull align 4 dereferenceable(12), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfEmLEf(ptr noundef nonnull align 4 dereferenceable(12), float noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu3vecILj3EfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN6basisu3vecILj3EfE3setILj3EfEERS1_RKNS0_IXT_ET0_EE(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu3vecILj3EfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6basisu3vecILj3EfE16squared_distanceERKS1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisumlERKNS_3vecILj3EfEEf(ptr dead_on_unwind noalias writable sret(%"class.basisu::vec") align 4, ptr noundef nonnull align 4 dereferenceable(12), float noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisudvERKNS_3vecILj3EfEEf(ptr dead_on_unwind noalias writable sret(%"class.basisu::vec") align 4, ptr noundef nonnull align 4 dereferenceable(12), float noundef) local_unnamed_addr #0

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu3vecILj4EfEC2ILj3EfEERKNS0_IXT_ET0_EE(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu3vecILj4EfEixEj(ptr noundef nonnull align 4 dereferenceable(16), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu12pvrtc4_blockC2Ev(ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #5 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZN6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu10color_rgbaC2Ei(ptr noundef nonnull align 1 dereferenceable(4), i32 noundef) unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZN6basisu12pvrtc4_image35remap_pixels_influenced_by_endpointEjjRKNS_5imageEbb(ptr noundef nonnull align 8 dereferenceable(41), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN6basisu7minimumImEET_S1_S1_(i64 noundef, i64 noundef) local_unnamed_addr #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"float", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass