; 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::color_rgba" = type { %union.anon }
%union.anon = type { [4 x i8] }
%"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
@.str.7 = external hidden unnamed_addr constant [32 x i8], align 1
@__PRETTY_FUNCTION__._ZNK6basisu12pvrtc4_image23get_interpolated_colorsEjjPNS_10color_rgbaE = external hidden unnamed_addr constant [91 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK6basisu12pvrtc4_image23get_interpolated_colorsEjjPNS_10color_rgbaE(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %1, i32 noundef %2, ptr noundef %3) #2 align 2 {
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.basisu::color_rgba", align 1
  %15 = alloca %"class.basisu::color_rgba", align 1
  %16 = alloca %"class.basisu::color_rgba", align 1
  %17 = alloca %"class.basisu::color_rgba", align 1
  %18 = alloca %"class.basisu::color_rgba", align 1
  %19 = alloca %"class.basisu::color_rgba", align 1
  %20 = alloca %"class.basisu::color_rgba", align 1
  %21 = alloca %"class.basisu::color_rgba", align 1
  %22 = alloca %"class.basisu::color_rgba", align 1
  %23 = alloca %"class.basisu::color_rgba", align 1
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  %28 = load ptr, ptr %6, align 8
  %29 = load i32, ptr %7, align 4, !tbaa !9
  %30 = getelementptr inbounds %"class.basisu::pvrtc4_image", ptr %28, i32 0, i32 0
  %31 = load i32, ptr %30, align 8, !tbaa !11
  %32 = icmp ult i32 %29, %31
  br i1 %32, label %33, label %38

33:                                               ; preds = %4
  %34 = load i32, ptr %8, align 4, !tbaa !9
  %35 = getelementptr inbounds %"class.basisu::pvrtc4_image", ptr %28, i32 0, i32 1
  %36 = load i32, ptr %35, align 4, !tbaa !16
  %37 = icmp ult i32 %34, %36
  br label %38

38:                                               ; preds = %33, %4
  %39 = phi i1 [ false, %4 ], [ %37, %33 ]
  br i1 %39, label %40, label %41

40:                                               ; preds = %38
  br label %43

41:                                               ; preds = %38
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.3, i32 noundef 302, ptr noundef @__PRETTY_FUNCTION__._ZNK6basisu12pvrtc4_image23get_interpolated_colorsEjjPNS_10color_rgbaE) #6
  unreachable

42:                                               ; No predecessors!
  br label %43

43:                                               ; preds = %42, %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %44 = load i32, ptr %7, align 4, !tbaa !9
  %45 = sub nsw i32 %44, 2
  %46 = ashr i32 %45, 2
  store i32 %46, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %47 = load i32, ptr %10, align 4, !tbaa !9
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = sub nsw i32 %49, 2
  %51 = ashr i32 %50, 2
  store i32 %51, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %52 = load i32, ptr %12, align 4, !tbaa !9
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %13, align 4, !tbaa !9
  %54 = load i32, ptr %10, align 4, !tbaa !9
  %55 = getelementptr inbounds %"class.basisu::pvrtc4_image", ptr %28, i32 0, i32 3
  %56 = load i32, ptr %55, align 8, !tbaa !17
  %57 = call noundef i32 @_ZN6basisu6posmodEii(i32 noundef %54, i32 noundef %56)
  store i32 %57, ptr %10, align 4, !tbaa !9
  %58 = load i32, ptr %11, align 4, !tbaa !9
  %59 = getelementptr inbounds %"class.basisu::pvrtc4_image", ptr %28, i32 0, i32 3
  %60 = load i32, ptr %59, align 8, !tbaa !17
  %61 = call noundef i32 @_ZN6basisu6posmodEii(i32 noundef %58, i32 noundef %60)
  store i32 %61, ptr %11, align 4, !tbaa !9
  %62 = load i32, ptr %12, align 4, !tbaa !9
  %63 = getelementptr inbounds %"class.basisu::pvrtc4_image", ptr %28, i32 0, i32 4
  %64 = load i32, ptr %63, align 4, !tbaa !18
  %65 = call noundef i32 @_ZN6basisu6posmodEii(i32 noundef %62, i32 noundef %64)
  store i32 %65, ptr %12, align 4, !tbaa !9
  %66 = load i32, ptr %13, align 4, !tbaa !9
  %67 = getelementptr inbounds %"class.basisu::pvrtc4_image", ptr %28, i32 0, i32 4
  %68 = load i32, ptr %67, align 4, !tbaa !18
  %69 = call noundef i32 @_ZN6basisu6posmodEii(i32 noundef %66, i32 noundef %68)
  store i32 %69, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %70 = load i32, ptr %7, align 4, !tbaa !9
  %71 = load i32, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %72 = getelementptr inbounds %"class.basisu::pvrtc4_image", ptr %28, i32 0, i32 2
  %73 = load i32, ptr %10, align 4, !tbaa !9
  %74 = load i32, ptr %12, align 4, !tbaa !9
  %75 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %72, i32 noundef %73, i32 noundef %74)
  %76 = call i32 @_ZNK6basisu12pvrtc4_block17get_endpoint_5554Ej(ptr noundef nonnull align 4 dereferenceable(8) %75, i32 noundef 0)
  %77 = getelementptr inbounds %"class.basisu::color_rgba", ptr %15, i32 0, i32 0
  %78 = getelementptr inbounds %union.anon, ptr %77, i32 0, i32 0
  store i32 %76, ptr %78, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %79 = getelementptr inbounds %"class.basisu::pvrtc4_image", ptr %28, i32 0, i32 2
  %80 = load i32, ptr %11, align 4, !tbaa !9
  %81 = load i32, ptr %12, align 4, !tbaa !9
  %82 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %79, i32 noundef %80, i32 noundef %81)
  %83 = call i32 @_ZNK6basisu12pvrtc4_block17get_endpoint_5554Ej(ptr noundef nonnull align 4 dereferenceable(8) %82, i32 noundef 0)
  %84 = getelementptr inbounds %"class.basisu::color_rgba", ptr %16, i32 0, i32 0
  %85 = getelementptr inbounds %union.anon, ptr %84, i32 0, i32 0
  store i32 %83, ptr %85, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %86 = getelementptr inbounds %"class.basisu::pvrtc4_image", ptr %28, i32 0, i32 2
  %87 = load i32, ptr %10, align 4, !tbaa !9
  %88 = load i32, ptr %13, align 4, !tbaa !9
  %89 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %86, i32 noundef %87, i32 noundef %88)
  %90 = call i32 @_ZNK6basisu12pvrtc4_block17get_endpoint_5554Ej(ptr noundef nonnull align 4 dereferenceable(8) %89, i32 noundef 0)
  %91 = getelementptr inbounds %"class.basisu::color_rgba", ptr %17, i32 0, i32 0
  %92 = getelementptr inbounds %union.anon, ptr %91, i32 0, i32 0
  store i32 %90, ptr %92, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %93 = getelementptr inbounds %"class.basisu::pvrtc4_image", ptr %28, i32 0, i32 2
  %94 = load i32, ptr %11, align 4, !tbaa !9
  %95 = load i32, ptr %13, align 4, !tbaa !9
  %96 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %93, i32 noundef %94, i32 noundef %95)
  %97 = call i32 @_ZNK6basisu12pvrtc4_block17get_endpoint_5554Ej(ptr noundef nonnull align 4 dereferenceable(8) %96, i32 noundef 0)
  %98 = getelementptr inbounds %"class.basisu::color_rgba", ptr %18, i32 0, i32 0
  %99 = getelementptr inbounds %union.anon, ptr %98, i32 0, i32 0
  store i32 %97, ptr %99, align 1
  %100 = call i32 @_ZNK6basisu12pvrtc4_image11interpolateEiiRKNS_10color_rgbaES3_S3_S3_(ptr noundef nonnull align 8 dereferenceable(41) %28, i32 noundef %70, i32 noundef %71, ptr noundef nonnull align 1 dereferenceable(4) %15, ptr noundef nonnull align 1 dereferenceable(4) %16, ptr noundef nonnull align 1 dereferenceable(4) %17, ptr noundef nonnull align 1 dereferenceable(4) %18)
  %101 = getelementptr inbounds %"class.basisu::color_rgba", ptr %14, i32 0, i32 0
  %102 = getelementptr inbounds %union.anon, ptr %101, i32 0, i32 0
  store i32 %100, ptr %102, align 1
  %103 = load ptr, ptr %9, align 8, !tbaa !5
  %104 = getelementptr inbounds %"class.basisu::color_rgba", ptr %103, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %104, ptr align 1 %14, i64 4, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %105 = load i32, ptr %7, align 4, !tbaa !9
  %106 = load i32, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %107 = getelementptr inbounds %"class.basisu::pvrtc4_image", ptr %28, i32 0, i32 2
  %108 = load i32, ptr %10, align 4, !tbaa !9
  %109 = load i32, ptr %12, align 4, !tbaa !9
  %110 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %107, i32 noundef %108, i32 noundef %109)
  %111 = call i32 @_ZNK6basisu12pvrtc4_block17get_endpoint_5554Ej(ptr noundef nonnull align 4 dereferenceable(8) %110, i32 noundef 1)
  %112 = getelementptr inbounds %"class.basisu::color_rgba", ptr %20, i32 0, i32 0
  %113 = getelementptr inbounds %union.anon, ptr %112, i32 0, i32 0
  store i32 %111, ptr %113, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %114 = getelementptr inbounds %"class.basisu::pvrtc4_image", ptr %28, i32 0, i32 2
  %115 = load i32, ptr %11, align 4, !tbaa !9
  %116 = load i32, ptr %12, align 4, !tbaa !9
  %117 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %114, i32 noundef %115, i32 noundef %116)
  %118 = call i32 @_ZNK6basisu12pvrtc4_block17get_endpoint_5554Ej(ptr noundef nonnull align 4 dereferenceable(8) %117, i32 noundef 1)
  %119 = getelementptr inbounds %"class.basisu::color_rgba", ptr %21, i32 0, i32 0
  %120 = getelementptr inbounds %union.anon, ptr %119, i32 0, i32 0
  store i32 %118, ptr %120, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %121 = getelementptr inbounds %"class.basisu::pvrtc4_image", ptr %28, i32 0, i32 2
  %122 = load i32, ptr %10, align 4, !tbaa !9
  %123 = load i32, ptr %13, align 4, !tbaa !9
  %124 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %121, i32 noundef %122, i32 noundef %123)
  %125 = call i32 @_ZNK6basisu12pvrtc4_block17get_endpoint_5554Ej(ptr noundef nonnull align 4 dereferenceable(8) %124, i32 noundef 1)
  %126 = getelementptr inbounds %"class.basisu::color_rgba", ptr %22, i32 0, i32 0
  %127 = getelementptr inbounds %union.anon, ptr %126, i32 0, i32 0
  store i32 %125, ptr %127, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %128 = getelementptr inbounds %"class.basisu::pvrtc4_image", ptr %28, i32 0, i32 2
  %129 = load i32, ptr %11, align 4, !tbaa !9
  %130 = load i32, ptr %13, align 4, !tbaa !9
  %131 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %128, i32 noundef %129, i32 noundef %130)
  %132 = call i32 @_ZNK6basisu12pvrtc4_block17get_endpoint_5554Ej(ptr noundef nonnull align 4 dereferenceable(8) %131, i32 noundef 1)
  %133 = getelementptr inbounds %"class.basisu::color_rgba", ptr %23, i32 0, i32 0
  %134 = getelementptr inbounds %union.anon, ptr %133, i32 0, i32 0
  store i32 %132, ptr %134, align 1
  %135 = call i32 @_ZNK6basisu12pvrtc4_image11interpolateEiiRKNS_10color_rgbaES3_S3_S3_(ptr noundef nonnull align 8 dereferenceable(41) %28, i32 noundef %105, i32 noundef %106, ptr noundef nonnull align 1 dereferenceable(4) %20, ptr noundef nonnull align 1 dereferenceable(4) %21, ptr noundef nonnull align 1 dereferenceable(4) %22, ptr noundef nonnull align 1 dereferenceable(4) %23)
  %136 = getelementptr inbounds %"class.basisu::color_rgba", ptr %19, i32 0, i32 0
  %137 = getelementptr inbounds %union.anon, ptr %136, i32 0, i32 0
  store i32 %135, ptr %137, align 1
  %138 = load ptr, ptr %9, align 8, !tbaa !5
  %139 = getelementptr inbounds %"class.basisu::color_rgba", ptr %138, i64 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %139, ptr align 1 %19, i64 4, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  %140 = load i32, ptr %7, align 4, !tbaa !9
  %141 = lshr i32 %140, 2
  %142 = load i32, ptr %8, align 4, !tbaa !9
  %143 = lshr i32 %142, 2
  %144 = call noundef zeroext i1 @_ZNK6basisu12pvrtc4_image37get_block_uses_transparent_modulationEjj(ptr noundef nonnull align 8 dereferenceable(41) %28, i32 noundef %141, i32 noundef %143)
  br i1 %144, label %145, label %184

145:                                              ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %146

146:                                              ; preds = %177, %145
  %147 = load i32, ptr %24, align 4, !tbaa !9
  %148 = icmp ult i32 %147, 4
  br i1 %148, label %150, label %149

149:                                              ; preds = %146
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %180

150:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %151 = load ptr, ptr %9, align 8, !tbaa !5
  %152 = getelementptr inbounds %"class.basisu::color_rgba", ptr %151, i64 0
  %153 = load i32, ptr %24, align 4, !tbaa !9
  %154 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %152, i32 noundef %153)
  %155 = load i8, ptr %154, align 1, !tbaa !20
  %156 = zext i8 %155 to i32
  %157 = load ptr, ptr %9, align 8, !tbaa !5
  %158 = getelementptr inbounds %"class.basisu::color_rgba", ptr %157, i64 3
  %159 = load i32, ptr %24, align 4, !tbaa !9
  %160 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %158, i32 noundef %159)
  %161 = load i8, ptr %160, align 1, !tbaa !20
  %162 = zext i8 %161 to i32
  %163 = add nsw i32 %156, %162
  %164 = sdiv i32 %163, 2
  store i32 %164, ptr %25, align 4, !tbaa !9
  %165 = load i32, ptr %25, align 4, !tbaa !9
  %166 = trunc i32 %165 to i8
  %167 = load ptr, ptr %9, align 8, !tbaa !5
  %168 = getelementptr inbounds %"class.basisu::color_rgba", ptr %167, i64 1
  %169 = load i32, ptr %24, align 4, !tbaa !9
  %170 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %168, i32 noundef %169)
  store i8 %166, ptr %170, align 1, !tbaa !20
  %171 = load i32, ptr %25, align 4, !tbaa !9
  %172 = trunc i32 %171 to i8
  %173 = load ptr, ptr %9, align 8, !tbaa !5
  %174 = getelementptr inbounds %"class.basisu::color_rgba", ptr %173, i64 2
  %175 = load i32, ptr %24, align 4, !tbaa !9
  %176 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %174, i32 noundef %175)
  store i8 %172, ptr %176, align 1, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %177

177:                                              ; preds = %150
  %178 = load i32, ptr %24, align 4, !tbaa !9
  %179 = add i32 %178, 1
  store i32 %179, ptr %24, align 4, !tbaa !9
  br label %146, !llvm.loop !21

180:                                              ; preds = %149
  %181 = load ptr, ptr %9, align 8, !tbaa !5
  %182 = getelementptr inbounds %"class.basisu::color_rgba", ptr %181, i64 2
  %183 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %182, i32 noundef 3)
  store i8 0, ptr %183, align 1, !tbaa !20
  store i1 true, ptr %5, align 1
  store i32 1, ptr %26, align 4
  br label %236

184:                                              ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  store i32 0, ptr %27, align 4, !tbaa !9
  br label %185

185:                                              ; preds = %232, %184
  %186 = load i32, ptr %27, align 4, !tbaa !9
  %187 = icmp ult i32 %186, 4
  br i1 %187, label %189, label %188

188:                                              ; preds = %185
  store i32 5, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %235

189:                                              ; preds = %185
  %190 = load ptr, ptr %9, align 8, !tbaa !5
  %191 = getelementptr inbounds %"class.basisu::color_rgba", ptr %190, i64 0
  %192 = load i32, ptr %27, align 4, !tbaa !9
  %193 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %191, i32 noundef %192)
  %194 = load i8, ptr %193, align 1, !tbaa !20
  %195 = zext i8 %194 to i32
  %196 = mul nsw i32 %195, 5
  %197 = load ptr, ptr %9, align 8, !tbaa !5
  %198 = getelementptr inbounds %"class.basisu::color_rgba", ptr %197, i64 3
  %199 = load i32, ptr %27, align 4, !tbaa !9
  %200 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %198, i32 noundef %199)
  %201 = load i8, ptr %200, align 1, !tbaa !20
  %202 = zext i8 %201 to i32
  %203 = mul nsw i32 %202, 3
  %204 = add nsw i32 %196, %203
  %205 = sdiv i32 %204, 8
  %206 = trunc i32 %205 to i8
  %207 = load ptr, ptr %9, align 8, !tbaa !5
  %208 = getelementptr inbounds %"class.basisu::color_rgba", ptr %207, i64 1
  %209 = load i32, ptr %27, align 4, !tbaa !9
  %210 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %208, i32 noundef %209)
  store i8 %206, ptr %210, align 1, !tbaa !20
  %211 = load ptr, ptr %9, align 8, !tbaa !5
  %212 = getelementptr inbounds %"class.basisu::color_rgba", ptr %211, i64 0
  %213 = load i32, ptr %27, align 4, !tbaa !9
  %214 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %212, i32 noundef %213)
  %215 = load i8, ptr %214, align 1, !tbaa !20
  %216 = zext i8 %215 to i32
  %217 = mul nsw i32 %216, 3
  %218 = load ptr, ptr %9, align 8, !tbaa !5
  %219 = getelementptr inbounds %"class.basisu::color_rgba", ptr %218, i64 3
  %220 = load i32, ptr %27, align 4, !tbaa !9
  %221 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %219, i32 noundef %220)
  %222 = load i8, ptr %221, align 1, !tbaa !20
  %223 = zext i8 %222 to i32
  %224 = mul nsw i32 %223, 5
  %225 = add nsw i32 %217, %224
  %226 = sdiv i32 %225, 8
  %227 = trunc i32 %226 to i8
  %228 = load ptr, ptr %9, align 8, !tbaa !5
  %229 = getelementptr inbounds %"class.basisu::color_rgba", ptr %228, i64 2
  %230 = load i32, ptr %27, align 4, !tbaa !9
  %231 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %229, i32 noundef %230)
  store i8 %227, ptr %231, align 1, !tbaa !20
  br label %232

232:                                              ; preds = %189
  %233 = load i32, ptr %27, align 4, !tbaa !9
  %234 = add i32 %233, 1
  store i32 %234, ptr %27, align 4, !tbaa !9
  br label %185, !llvm.loop !23

235:                                              ; preds = %188
  store i1 false, ptr %5, align 1
  store i32 1, ptr %26, align 4
  br label %236

236:                                              ; preds = %235, %180
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  %237 = load i1, ptr %5, align 1
  ret i1 %237
}

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK6basisu12pvrtc4_image37get_block_uses_transparent_modulationEjj(ptr noundef nonnull align 8 dereferenceable(41), i32 noundef, i32 noundef) #4 align 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) #3 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTSN6basisu12pvrtc4_imageE", !10, i64 0, !10, i64 4, !13, i64 8, !10, i64 32, !10, i64 36, !15, i64 40}
!13 = !{!"_ZTSN6basisu8vector2DINS_12pvrtc4_blockEEE", !10, i64 0, !10, i64 4, !14, i64 8}
!14 = !{!"_ZTSN6basisu6vectorINS_12pvrtc4_blockEEE", !6, i64 0, !10, i64 8, !10, i64 12}
!15 = !{!"bool", !7, i64 0}
!16 = !{!12, !10, i64 4}
!17 = !{!12, !10, i64 32}
!18 = !{!12, !10, i64 36}
!19 = !{i64 0, i64 4, !20}
!20 = !{!7, !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}


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

%"class.basisu::color_rgba" = type { %union.anon }
%union.anon = type { [4 x i8] }

@.str.3 = external hidden unnamed_addr constant [115 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [32 x i8], align 1
@__PRETTY_FUNCTION__._ZNK6basisu12pvrtc4_image23get_interpolated_colorsEjjPNS_10color_rgbaE = external hidden unnamed_addr constant [91 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK6basisu12pvrtc4_image23get_interpolated_colorsEjjPNS_10color_rgbaE(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %1, i32 noundef %2, ptr noundef %3) local_unnamed_addr #2 align 2 {
  %5 = alloca %"class.basisu::color_rgba", align 4
  %6 = alloca %"class.basisu::color_rgba", align 4
  %7 = alloca %"class.basisu::color_rgba", align 4
  %8 = alloca %"class.basisu::color_rgba", align 4
  %9 = alloca %"class.basisu::color_rgba", align 4
  %10 = alloca %"class.basisu::color_rgba", align 4
  %11 = alloca %"class.basisu::color_rgba", align 4
  %12 = alloca %"class.basisu::color_rgba", align 4
  %13 = load i32, ptr %0, align 8, !tbaa !5
  %14 = icmp ugt i32 %13, %1
  %15 = getelementptr inbounds i8, ptr %0, i64 4
  %16 = load i32, ptr %15, align 4
  %17 = icmp ugt i32 %16, %2
  %or.cond = select i1 %14, i1 %17, i1 false
  br i1 %or.cond, label %18, label %.critedge

.critedge:                                        ; preds = %4
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.3, i32 noundef 302, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK6basisu12pvrtc4_image23get_interpolated_colorsEjjPNS_10color_rgbaE) #5
  unreachable

18:                                               ; preds = %4
  %19 = add nsw i32 %1, -2
  %20 = ashr i32 %19, 2
  %21 = add nsw i32 %20, 1
  %22 = add nsw i32 %2, -2
  %23 = ashr i32 %22, 2
  %24 = add nsw i32 %23, 1
  %25 = getelementptr inbounds i8, ptr %0, i64 32
  %26 = load i32, ptr %25, align 8, !tbaa !14
  %27 = tail call noundef i32 @_ZN6basisu6posmodEii(i32 noundef %20, i32 noundef %26)
  %28 = load i32, ptr %25, align 8, !tbaa !14
  %29 = tail call noundef i32 @_ZN6basisu6posmodEii(i32 noundef %21, i32 noundef %28)
  %30 = getelementptr inbounds i8, ptr %0, i64 36
  %31 = load i32, ptr %30, align 4, !tbaa !15
  %32 = tail call noundef i32 @_ZN6basisu6posmodEii(i32 noundef %23, i32 noundef %31)
  %33 = load i32, ptr %30, align 4, !tbaa !15
  %34 = tail call noundef i32 @_ZN6basisu6posmodEii(i32 noundef %24, i32 noundef %33)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  %35 = getelementptr inbounds i8, ptr %0, i64 8
  %36 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %35, i32 noundef %27, i32 noundef %32)
  %37 = tail call i32 @_ZNK6basisu12pvrtc4_block17get_endpoint_5554Ej(ptr noundef nonnull align 4 dereferenceable(8) %36, i32 noundef 0)
  store i32 %37, ptr %5, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %38 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %35, i32 noundef %29, i32 noundef %32)
  %39 = tail call i32 @_ZNK6basisu12pvrtc4_block17get_endpoint_5554Ej(ptr noundef nonnull align 4 dereferenceable(8) %38, i32 noundef 0)
  store i32 %39, ptr %6, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %40 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %35, i32 noundef %27, i32 noundef %34)
  %41 = tail call i32 @_ZNK6basisu12pvrtc4_block17get_endpoint_5554Ej(ptr noundef nonnull align 4 dereferenceable(8) %40, i32 noundef 0)
  store i32 %41, ptr %7, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  %42 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %35, i32 noundef %29, i32 noundef %34)
  %43 = tail call i32 @_ZNK6basisu12pvrtc4_block17get_endpoint_5554Ej(ptr noundef nonnull align 4 dereferenceable(8) %42, i32 noundef 0)
  store i32 %43, ptr %8, align 4
  %44 = call i32 @_ZNK6basisu12pvrtc4_image11interpolateEiiRKNS_10color_rgbaES3_S3_S3_(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 1 dereferenceable(4) %5, ptr noundef nonnull align 1 dereferenceable(4) %6, ptr noundef nonnull align 1 dereferenceable(4) %7, ptr noundef nonnull align 1 dereferenceable(4) %8)
  store i32 %44, ptr %3, align 1, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  %45 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %35, i32 noundef %27, i32 noundef %32)
  %46 = call i32 @_ZNK6basisu12pvrtc4_block17get_endpoint_5554Ej(ptr noundef nonnull align 4 dereferenceable(8) %45, i32 noundef 1)
  store i32 %46, ptr %9, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  %47 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %35, i32 noundef %29, i32 noundef %32)
  %48 = call i32 @_ZNK6basisu12pvrtc4_block17get_endpoint_5554Ej(ptr noundef nonnull align 4 dereferenceable(8) %47, i32 noundef 1)
  store i32 %48, ptr %10, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  %49 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %35, i32 noundef %27, i32 noundef %34)
  %50 = call i32 @_ZNK6basisu12pvrtc4_block17get_endpoint_5554Ej(ptr noundef nonnull align 4 dereferenceable(8) %49, i32 noundef 1)
  store i32 %50, ptr %11, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  %51 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6basisu8vector2DINS_12pvrtc4_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %35, i32 noundef %29, i32 noundef %34)
  %52 = call i32 @_ZNK6basisu12pvrtc4_block17get_endpoint_5554Ej(ptr noundef nonnull align 4 dereferenceable(8) %51, i32 noundef 1)
  store i32 %52, ptr %12, align 4
  %53 = call i32 @_ZNK6basisu12pvrtc4_image11interpolateEiiRKNS_10color_rgbaES3_S3_S3_(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 1 dereferenceable(4) %9, ptr noundef nonnull align 1 dereferenceable(4) %10, ptr noundef nonnull align 1 dereferenceable(4) %11, ptr noundef nonnull align 1 dereferenceable(4) %12)
  %54 = getelementptr inbounds i8, ptr %3, i64 12
  store i32 %53, ptr %54, align 1, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  %55 = lshr i32 %1, 2
  %56 = lshr i32 %2, 2
  %57 = call noundef zeroext i1 @_ZNK6basisu12pvrtc4_image37get_block_uses_transparent_modulationEjj(ptr noundef nonnull align 8 dereferenceable(41) %0, i32 noundef %55, i32 noundef %56)
  %58 = getelementptr inbounds i8, ptr %3, i64 4
  %59 = getelementptr inbounds i8, ptr %3, i64 8
  %60 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %3, i32 noundef 0)
  %61 = load i8, ptr %60, align 1, !tbaa !16
  %62 = zext i8 %61 to i16
  br i1 %57, label %.preheader, label %.preheader69

.preheader69:                                     ; preds = %18
  %63 = mul nuw nsw i16 %62, 5
  %64 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %54, i32 noundef 0)
  %65 = load i8, ptr %64, align 1, !tbaa !16
  %66 = zext i8 %65 to i16
  %67 = mul nuw nsw i16 %66, 3
  %68 = add nuw nsw i16 %67, %63
  %69 = lshr i16 %68, 3
  %70 = trunc nuw i16 %69 to i8
  %71 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %58, i32 noundef 0)
  store i8 %70, ptr %71, align 1, !tbaa !16
  %72 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %3, i32 noundef 0)
  %73 = load i8, ptr %72, align 1, !tbaa !16
  %74 = zext i8 %73 to i16
  %75 = mul nuw nsw i16 %74, 3
  %76 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %54, i32 noundef 0)
  %77 = load i8, ptr %76, align 1, !tbaa !16
  %78 = zext i8 %77 to i16
  %79 = mul nuw nsw i16 %78, 5
  %80 = add nuw nsw i16 %79, %75
  %81 = lshr i16 %80, 3
  %82 = trunc nuw i16 %81 to i8
  %83 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %59, i32 noundef 0)
  store i8 %82, ptr %83, align 1, !tbaa !16
  %84 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %3, i32 noundef 1)
  %85 = load i8, ptr %84, align 1, !tbaa !16
  %86 = zext i8 %85 to i16
  %87 = mul nuw nsw i16 %86, 5
  %88 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %54, i32 noundef 1)
  %89 = load i8, ptr %88, align 1, !tbaa !16
  %90 = zext i8 %89 to i16
  %91 = mul nuw nsw i16 %90, 3
  %92 = add nuw nsw i16 %91, %87
  %93 = lshr i16 %92, 3
  %94 = trunc nuw i16 %93 to i8
  %95 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %58, i32 noundef 1)
  store i8 %94, ptr %95, align 1, !tbaa !16
  %96 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %3, i32 noundef 1)
  %97 = load i8, ptr %96, align 1, !tbaa !16
  %98 = zext i8 %97 to i16
  %99 = mul nuw nsw i16 %98, 3
  %100 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %54, i32 noundef 1)
  %101 = load i8, ptr %100, align 1, !tbaa !16
  %102 = zext i8 %101 to i16
  %103 = mul nuw nsw i16 %102, 5
  %104 = add nuw nsw i16 %103, %99
  %105 = lshr i16 %104, 3
  %106 = trunc nuw i16 %105 to i8
  %107 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %59, i32 noundef 1)
  store i8 %106, ptr %107, align 1, !tbaa !16
  %108 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %3, i32 noundef 2)
  %109 = load i8, ptr %108, align 1, !tbaa !16
  %110 = zext i8 %109 to i16
  %111 = mul nuw nsw i16 %110, 5
  %112 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %54, i32 noundef 2)
  %113 = load i8, ptr %112, align 1, !tbaa !16
  %114 = zext i8 %113 to i16
  %115 = mul nuw nsw i16 %114, 3
  %116 = add nuw nsw i16 %115, %111
  %117 = lshr i16 %116, 3
  %118 = trunc nuw i16 %117 to i8
  %119 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %58, i32 noundef 2)
  store i8 %118, ptr %119, align 1, !tbaa !16
  %120 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %3, i32 noundef 2)
  %121 = load i8, ptr %120, align 1, !tbaa !16
  %122 = zext i8 %121 to i16
  %123 = mul nuw nsw i16 %122, 3
  %124 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %54, i32 noundef 2)
  %125 = load i8, ptr %124, align 1, !tbaa !16
  %126 = zext i8 %125 to i16
  %127 = mul nuw nsw i16 %126, 5
  %128 = add nuw nsw i16 %127, %123
  %129 = lshr i16 %128, 3
  %130 = trunc nuw i16 %129 to i8
  %131 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %59, i32 noundef 2)
  store i8 %130, ptr %131, align 1, !tbaa !16
  %132 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %3, i32 noundef 3)
  %133 = load i8, ptr %132, align 1, !tbaa !16
  %134 = zext i8 %133 to i16
  %135 = mul nuw nsw i16 %134, 5
  %136 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %54, i32 noundef 3)
  %137 = load i8, ptr %136, align 1, !tbaa !16
  %138 = zext i8 %137 to i16
  %139 = mul nuw nsw i16 %138, 3
  %140 = add nuw nsw i16 %139, %135
  %141 = lshr i16 %140, 3
  %142 = trunc nuw i16 %141 to i8
  %143 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %58, i32 noundef 3)
  store i8 %142, ptr %143, align 1, !tbaa !16
  %144 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %3, i32 noundef 3)
  %145 = load i8, ptr %144, align 1, !tbaa !16
  %146 = zext i8 %145 to i16
  %147 = mul nuw nsw i16 %146, 3
  %148 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %54, i32 noundef 3)
  %149 = load i8, ptr %148, align 1, !tbaa !16
  %150 = zext i8 %149 to i16
  %151 = mul nuw nsw i16 %150, 5
  %152 = add nuw nsw i16 %151, %147
  %153 = lshr i16 %152, 3
  %154 = trunc nuw i16 %153 to i8
  br label %.loopexit

.preheader:                                       ; preds = %18
  %155 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %54, i32 noundef 0)
  %156 = load i8, ptr %155, align 1, !tbaa !16
  %157 = zext i8 %156 to i16
  %158 = add nuw nsw i16 %157, %62
  %159 = lshr i16 %158, 1
  %160 = trunc nuw i16 %159 to i8
  %161 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %58, i32 noundef 0)
  store i8 %160, ptr %161, align 1, !tbaa !16
  %162 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %59, i32 noundef 0)
  store i8 %160, ptr %162, align 1, !tbaa !16
  %163 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %3, i32 noundef 1)
  %164 = load i8, ptr %163, align 1, !tbaa !16
  %165 = zext i8 %164 to i16
  %166 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %54, i32 noundef 1)
  %167 = load i8, ptr %166, align 1, !tbaa !16
  %168 = zext i8 %167 to i16
  %169 = add nuw nsw i16 %168, %165
  %170 = lshr i16 %169, 1
  %171 = trunc nuw i16 %170 to i8
  %172 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %58, i32 noundef 1)
  store i8 %171, ptr %172, align 1, !tbaa !16
  %173 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %59, i32 noundef 1)
  store i8 %171, ptr %173, align 1, !tbaa !16
  %174 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %3, i32 noundef 2)
  %175 = load i8, ptr %174, align 1, !tbaa !16
  %176 = zext i8 %175 to i16
  %177 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %54, i32 noundef 2)
  %178 = load i8, ptr %177, align 1, !tbaa !16
  %179 = zext i8 %178 to i16
  %180 = add nuw nsw i16 %179, %176
  %181 = lshr i16 %180, 1
  %182 = trunc nuw i16 %181 to i8
  %183 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %58, i32 noundef 2)
  store i8 %182, ptr %183, align 1, !tbaa !16
  %184 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %59, i32 noundef 2)
  store i8 %182, ptr %184, align 1, !tbaa !16
  %185 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %3, i32 noundef 3)
  %186 = load i8, ptr %185, align 1, !tbaa !16
  %187 = zext i8 %186 to i16
  %188 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %54, i32 noundef 3)
  %189 = load i8, ptr %188, align 1, !tbaa !16
  %190 = zext i8 %189 to i16
  %191 = add nuw nsw i16 %190, %187
  %192 = lshr i16 %191, 1
  %193 = trunc nuw i16 %192 to i8
  %194 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %58, i32 noundef 3)
  store i8 %193, ptr %194, align 1, !tbaa !16
  %195 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %59, i32 noundef 3)
  store i8 %193, ptr %195, align 1, !tbaa !16
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader69, %.preheader
  %.sink = phi i8 [ %154, %.preheader69 ], [ 0, %.preheader ]
  %196 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu10color_rgbaixEj(ptr noundef nonnull align 1 dereferenceable(4) %59, i32 noundef 3)
  store i8 %.sink, ptr %196, align 1, !tbaa !16
  ret i1 %57
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK6basisu12pvrtc4_image37get_block_uses_transparent_modulationEjj(ptr noundef nonnull align 8 dereferenceable(41), i32 noundef, i32 noundef) local_unnamed_addr #4 align 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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTSN6basisu12pvrtc4_imageE", !7, i64 0, !7, i64 4, !10, i64 8, !7, i64 32, !7, i64 36, !13, i64 40}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN6basisu8vector2DINS_12pvrtc4_blockEEE", !7, i64 0, !7, i64 4, !11, i64 8}
!11 = !{!"_ZTSN6basisu6vectorINS_12pvrtc4_blockEEE", !12, i64 0, !7, i64 8, !7, i64 12}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"bool", !8, i64 0}
!14 = !{!6, !7, i64 32}
!15 = !{!6, !7, i64 36}
!16 = !{!8, !8, i64 0}


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