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

; 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] }

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu9etc_block24get_diff_subblock_colorsEPNS_10color_rgbaEtj(ptr noundef, i16 noundef zeroext, i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6basisu9etc_block24get_diff_subblock_colorsEPNS_10color_rgbaEttj(ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu9etc_block23get_abs_subblock_colorsEPNS_10color_rgbaEtj(ptr noundef, i16 noundef zeroext, i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6basisu11unpack_etc1ERKNS_9etc_blockEPNS_10color_rgbaEb(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %1, i1 noundef zeroext %2) #3 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i8, align 1
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca [4 x %"class.basisu::color_rgba"], align 16
  %13 = alloca [4 x %"class.basisu::color_rgba"], align 16
  %14 = alloca i16, align 2
  %15 = alloca i16, align 2
  %16 = alloca i32, align 4
  %17 = alloca i16, align 2
  %18 = alloca i16, align 2
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  %25 = zext i1 %2 to i8
  store i8 %25, ptr %7, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #5
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = call noundef zeroext i1 @_ZNK6basisu9etc_block12get_diff_bitEv(ptr noundef nonnull align 8 dereferenceable(8) %26)
  %28 = zext i1 %27 to i8
  store i8 %28, ptr %8, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #5
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = call noundef zeroext i1 @_ZNK6basisu9etc_block12get_flip_bitEv(ptr noundef nonnull align 8 dereferenceable(8) %29)
  %31 = zext i1 %30 to i8
  store i8 %31, ptr %9, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = call noundef i32 @_ZNK6basisu9etc_block15get_inten_tableEj(ptr noundef nonnull align 8 dereferenceable(8) %32, i32 noundef 0)
  store i32 %33, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = call noundef i32 @_ZNK6basisu9etc_block15get_inten_tableEj(ptr noundef nonnull align 8 dereferenceable(8) %34, i32 noundef 1)
  store i32 %35, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #5
  %36 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %12, i32 0, i32 0
  %37 = getelementptr inbounds %"class.basisu::color_rgba", ptr %36, i64 4
  br label %38

38:                                               ; preds = %38, %3
  %39 = phi ptr [ %36, %3 ], [ %40, %38 ]
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %39)
  %40 = getelementptr inbounds %"class.basisu::color_rgba", ptr %39, i64 1
  %41 = icmp eq ptr %40, %37
  br i1 %41, label %42, label %38

42:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  %43 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %13, i32 0, i32 0
  %44 = getelementptr inbounds %"class.basisu::color_rgba", ptr %43, i64 4
  br label %45

45:                                               ; preds = %45, %42
  %46 = phi ptr [ %43, %42 ], [ %47, %45 ]
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %46)
  %47 = getelementptr inbounds %"class.basisu::color_rgba", ptr %46, i64 1
  %48 = icmp eq ptr %47, %44
  br i1 %48, label %49, label %45

49:                                               ; preds = %45
  %50 = load i8, ptr %8, align 1, !tbaa !9, !range !13, !noundef !14
  %51 = trunc i8 %50 to i1
  br i1 %51, label %52, label %70

52:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 2, ptr %14) #5
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = call noundef zeroext i16 @_ZNK6basisu9etc_block15get_base5_colorEv(ptr noundef nonnull align 8 dereferenceable(8) %53)
  store i16 %54, ptr %14, align 2, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 2, ptr %15) #5
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = call noundef zeroext i16 @_ZNK6basisu9etc_block16get_delta3_colorEv(ptr noundef nonnull align 8 dereferenceable(8) %55)
  store i16 %56, ptr %15, align 2, !tbaa !15
  %57 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %12, i64 0, i64 0
  %58 = load i16, ptr %14, align 2, !tbaa !15
  %59 = load i32, ptr %10, align 4, !tbaa !11
  call void @_ZN6basisu9etc_block24get_diff_subblock_colorsEPNS_10color_rgbaEtj(ptr noundef %57, i16 noundef zeroext %58, i32 noundef %59)
  %60 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %13, i64 0, i64 0
  %61 = load i16, ptr %14, align 2, !tbaa !15
  %62 = load i16, ptr %15, align 2, !tbaa !15
  %63 = load i32, ptr %11, align 4, !tbaa !11
  %64 = call noundef zeroext i1 @_ZN6basisu9etc_block24get_diff_subblock_colorsEPNS_10color_rgbaEttj(ptr noundef %60, i16 noundef zeroext %61, i16 noundef zeroext %62, i32 noundef %63)
  br i1 %64, label %66, label %65

65:                                               ; preds = %52
  store i1 false, ptr %4, align 1
  store i32 1, ptr %16, align 4
  br label %67

66:                                               ; preds = %52
  store i32 0, ptr %16, align 4
  br label %67

67:                                               ; preds = %66, %65
  call void @llvm.lifetime.end.p0(i64 2, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr %14) #5
  %68 = load i32, ptr %16, align 4
  switch i32 %68, label %343 [
    i32 0, label %69
  ]

69:                                               ; preds = %67
  br label %81

70:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 2, ptr %17) #5
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = call noundef zeroext i16 @_ZNK6basisu9etc_block15get_base4_colorEj(ptr noundef nonnull align 8 dereferenceable(8) %71, i32 noundef 0)
  store i16 %72, ptr %17, align 2, !tbaa !15
  %73 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %12, i64 0, i64 0
  %74 = load i16, ptr %17, align 2, !tbaa !15
  %75 = load i32, ptr %10, align 4, !tbaa !11
  call void @_ZN6basisu9etc_block23get_abs_subblock_colorsEPNS_10color_rgbaEtj(ptr noundef %73, i16 noundef zeroext %74, i32 noundef %75)
  call void @llvm.lifetime.start.p0(i64 2, ptr %18) #5
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = call noundef zeroext i16 @_ZNK6basisu9etc_block15get_base4_colorEj(ptr noundef nonnull align 8 dereferenceable(8) %76, i32 noundef 1)
  store i16 %77, ptr %18, align 2, !tbaa !15
  %78 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %13, i64 0, i64 0
  %79 = load i16, ptr %18, align 2, !tbaa !15
  %80 = load i32, ptr %11, align 4, !tbaa !11
  call void @_ZN6basisu9etc_block23get_abs_subblock_colorsEPNS_10color_rgbaEtj(ptr noundef %78, i16 noundef zeroext %79, i32 noundef %80)
  call void @llvm.lifetime.end.p0(i64 2, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr %17) #5
  br label %81

81:                                               ; preds = %70, %69
  %82 = load i8, ptr %7, align 1, !tbaa !9, !range !13, !noundef !14
  %83 = trunc i8 %82 to i1
  br i1 %83, label %84, label %219

84:                                               ; preds = %81
  %85 = load i8, ptr %9, align 1, !tbaa !9, !range !13, !noundef !14
  %86 = trunc i8 %85 to i1
  br i1 %86, label %87, label %174

87:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !11
  br label %88

88:                                               ; preds = %127, %87
  %89 = load i32, ptr %19, align 4, !tbaa !11
  %90 = icmp ult i32 %89, 2
  br i1 %90, label %92, label %91

91:                                               ; preds = %88
  store i32 2, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %130

92:                                               ; preds = %88
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = getelementptr inbounds %"class.basisu::color_rgba", ptr %93, i64 0
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = load i32, ptr %19, align 4, !tbaa !11
  %97 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %95, i32 noundef 0, i32 noundef %96)
  %98 = zext i32 %97 to i64
  %99 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %12, i64 0, i64 %98
  %100 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %94, ptr noundef nonnull align 1 dereferenceable(4) %99)
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = getelementptr inbounds %"class.basisu::color_rgba", ptr %101, i64 1
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  %104 = load i32, ptr %19, align 4, !tbaa !11
  %105 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %103, i32 noundef 1, i32 noundef %104)
  %106 = zext i32 %105 to i64
  %107 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %12, i64 0, i64 %106
  %108 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %102, ptr noundef nonnull align 1 dereferenceable(4) %107)
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = getelementptr inbounds %"class.basisu::color_rgba", ptr %109, i64 2
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  %112 = load i32, ptr %19, align 4, !tbaa !11
  %113 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %111, i32 noundef 2, i32 noundef %112)
  %114 = zext i32 %113 to i64
  %115 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %12, i64 0, i64 %114
  %116 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %110, ptr noundef nonnull align 1 dereferenceable(4) %115)
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = getelementptr inbounds %"class.basisu::color_rgba", ptr %117, i64 3
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = load i32, ptr %19, align 4, !tbaa !11
  %121 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %119, i32 noundef 3, i32 noundef %120)
  %122 = zext i32 %121 to i64
  %123 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %12, i64 0, i64 %122
  %124 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %118, ptr noundef nonnull align 1 dereferenceable(4) %123)
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = getelementptr inbounds %"class.basisu::color_rgba", ptr %125, i64 4
  store ptr %126, ptr %6, align 8, !tbaa !5
  br label %127

127:                                              ; preds = %92
  %128 = load i32, ptr %19, align 4, !tbaa !11
  %129 = add i32 %128, 1
  store i32 %129, ptr %19, align 4, !tbaa !11
  br label %88, !llvm.loop !17

130:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 2, ptr %20, align 4, !tbaa !11
  br label %131

131:                                              ; preds = %170, %130
  %132 = load i32, ptr %20, align 4, !tbaa !11
  %133 = icmp ult i32 %132, 4
  br i1 %133, label %135, label %134

134:                                              ; preds = %131
  store i32 5, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %173

135:                                              ; preds = %131
  %136 = load ptr, ptr %6, align 8, !tbaa !5
  %137 = getelementptr inbounds %"class.basisu::color_rgba", ptr %136, i64 0
  %138 = load ptr, ptr %5, align 8, !tbaa !5
  %139 = load i32, ptr %20, align 4, !tbaa !11
  %140 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %138, i32 noundef 0, i32 noundef %139)
  %141 = zext i32 %140 to i64
  %142 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %13, i64 0, i64 %141
  %143 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %137, ptr noundef nonnull align 1 dereferenceable(4) %142)
  %144 = load ptr, ptr %6, align 8, !tbaa !5
  %145 = getelementptr inbounds %"class.basisu::color_rgba", ptr %144, i64 1
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = load i32, ptr %20, align 4, !tbaa !11
  %148 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %146, i32 noundef 1, i32 noundef %147)
  %149 = zext i32 %148 to i64
  %150 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %13, i64 0, i64 %149
  %151 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %145, ptr noundef nonnull align 1 dereferenceable(4) %150)
  %152 = load ptr, ptr %6, align 8, !tbaa !5
  %153 = getelementptr inbounds %"class.basisu::color_rgba", ptr %152, i64 2
  %154 = load ptr, ptr %5, align 8, !tbaa !5
  %155 = load i32, ptr %20, align 4, !tbaa !11
  %156 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %154, i32 noundef 2, i32 noundef %155)
  %157 = zext i32 %156 to i64
  %158 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %13, i64 0, i64 %157
  %159 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %153, ptr noundef nonnull align 1 dereferenceable(4) %158)
  %160 = load ptr, ptr %6, align 8, !tbaa !5
  %161 = getelementptr inbounds %"class.basisu::color_rgba", ptr %160, i64 3
  %162 = load ptr, ptr %5, align 8, !tbaa !5
  %163 = load i32, ptr %20, align 4, !tbaa !11
  %164 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %162, i32 noundef 3, i32 noundef %163)
  %165 = zext i32 %164 to i64
  %166 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %13, i64 0, i64 %165
  %167 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %161, ptr noundef nonnull align 1 dereferenceable(4) %166)
  %168 = load ptr, ptr %6, align 8, !tbaa !5
  %169 = getelementptr inbounds %"class.basisu::color_rgba", ptr %168, i64 4
  store ptr %169, ptr %6, align 8, !tbaa !5
  br label %170

170:                                              ; preds = %135
  %171 = load i32, ptr %20, align 4, !tbaa !11
  %172 = add i32 %171, 1
  store i32 %172, ptr %20, align 4, !tbaa !11
  br label %131, !llvm.loop !19

173:                                              ; preds = %134
  br label %218

174:                                              ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 0, ptr %21, align 4, !tbaa !11
  br label %175

175:                                              ; preds = %214, %174
  %176 = load i32, ptr %21, align 4, !tbaa !11
  %177 = icmp ult i32 %176, 4
  br i1 %177, label %179, label %178

178:                                              ; preds = %175
  store i32 8, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %217

179:                                              ; preds = %175
  %180 = load ptr, ptr %6, align 8, !tbaa !5
  %181 = getelementptr inbounds %"class.basisu::color_rgba", ptr %180, i64 0
  %182 = load ptr, ptr %5, align 8, !tbaa !5
  %183 = load i32, ptr %21, align 4, !tbaa !11
  %184 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %182, i32 noundef 0, i32 noundef %183)
  %185 = zext i32 %184 to i64
  %186 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %12, i64 0, i64 %185
  %187 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %181, ptr noundef nonnull align 1 dereferenceable(4) %186)
  %188 = load ptr, ptr %6, align 8, !tbaa !5
  %189 = getelementptr inbounds %"class.basisu::color_rgba", ptr %188, i64 1
  %190 = load ptr, ptr %5, align 8, !tbaa !5
  %191 = load i32, ptr %21, align 4, !tbaa !11
  %192 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %190, i32 noundef 1, i32 noundef %191)
  %193 = zext i32 %192 to i64
  %194 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %12, i64 0, i64 %193
  %195 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %189, ptr noundef nonnull align 1 dereferenceable(4) %194)
  %196 = load ptr, ptr %6, align 8, !tbaa !5
  %197 = getelementptr inbounds %"class.basisu::color_rgba", ptr %196, i64 2
  %198 = load ptr, ptr %5, align 8, !tbaa !5
  %199 = load i32, ptr %21, align 4, !tbaa !11
  %200 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %198, i32 noundef 2, i32 noundef %199)
  %201 = zext i32 %200 to i64
  %202 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %13, i64 0, i64 %201
  %203 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %197, ptr noundef nonnull align 1 dereferenceable(4) %202)
  %204 = load ptr, ptr %6, align 8, !tbaa !5
  %205 = getelementptr inbounds %"class.basisu::color_rgba", ptr %204, i64 3
  %206 = load ptr, ptr %5, align 8, !tbaa !5
  %207 = load i32, ptr %21, align 4, !tbaa !11
  %208 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %206, i32 noundef 3, i32 noundef %207)
  %209 = zext i32 %208 to i64
  %210 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %13, i64 0, i64 %209
  %211 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %205, ptr noundef nonnull align 1 dereferenceable(4) %210)
  %212 = load ptr, ptr %6, align 8, !tbaa !5
  %213 = getelementptr inbounds %"class.basisu::color_rgba", ptr %212, i64 4
  store ptr %213, ptr %6, align 8, !tbaa !5
  br label %214

214:                                              ; preds = %179
  %215 = load i32, ptr %21, align 4, !tbaa !11
  %216 = add i32 %215, 1
  store i32 %216, ptr %21, align 4, !tbaa !11
  br label %175, !llvm.loop !20

217:                                              ; preds = %178
  br label %218

218:                                              ; preds = %217, %173
  br label %342

219:                                              ; preds = %81
  %220 = load i8, ptr %9, align 1, !tbaa !9, !range !13, !noundef !14
  %221 = trunc i8 %220 to i1
  br i1 %221, label %222, label %301

222:                                              ; preds = %219
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !11
  br label %223

223:                                              ; preds = %258, %222
  %224 = load i32, ptr %22, align 4, !tbaa !11
  %225 = icmp ult i32 %224, 2
  br i1 %225, label %227, label %226

226:                                              ; preds = %223
  store i32 11, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %261

227:                                              ; preds = %223
  %228 = load ptr, ptr %5, align 8, !tbaa !5
  %229 = load i32, ptr %22, align 4, !tbaa !11
  %230 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %228, i32 noundef 0, i32 noundef %229)
  %231 = zext i32 %230 to i64
  %232 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %12, i64 0, i64 %231
  %233 = load ptr, ptr %6, align 8, !tbaa !5
  %234 = getelementptr inbounds %"class.basisu::color_rgba", ptr %233, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %234, ptr align 4 %232, i64 4, i1 false), !tbaa.struct !21
  %235 = load ptr, ptr %5, align 8, !tbaa !5
  %236 = load i32, ptr %22, align 4, !tbaa !11
  %237 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %235, i32 noundef 1, i32 noundef %236)
  %238 = zext i32 %237 to i64
  %239 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %12, i64 0, i64 %238
  %240 = load ptr, ptr %6, align 8, !tbaa !5
  %241 = getelementptr inbounds %"class.basisu::color_rgba", ptr %240, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %241, ptr align 4 %239, i64 4, i1 false), !tbaa.struct !21
  %242 = load ptr, ptr %5, align 8, !tbaa !5
  %243 = load i32, ptr %22, align 4, !tbaa !11
  %244 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %242, i32 noundef 2, i32 noundef %243)
  %245 = zext i32 %244 to i64
  %246 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %12, i64 0, i64 %245
  %247 = load ptr, ptr %6, align 8, !tbaa !5
  %248 = getelementptr inbounds %"class.basisu::color_rgba", ptr %247, i64 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %248, ptr align 4 %246, i64 4, i1 false), !tbaa.struct !21
  %249 = load ptr, ptr %5, align 8, !tbaa !5
  %250 = load i32, ptr %22, align 4, !tbaa !11
  %251 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %249, i32 noundef 3, i32 noundef %250)
  %252 = zext i32 %251 to i64
  %253 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %12, i64 0, i64 %252
  %254 = load ptr, ptr %6, align 8, !tbaa !5
  %255 = getelementptr inbounds %"class.basisu::color_rgba", ptr %254, i64 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %255, ptr align 4 %253, i64 4, i1 false), !tbaa.struct !21
  %256 = load ptr, ptr %6, align 8, !tbaa !5
  %257 = getelementptr inbounds %"class.basisu::color_rgba", ptr %256, i64 4
  store ptr %257, ptr %6, align 8, !tbaa !5
  br label %258

258:                                              ; preds = %227
  %259 = load i32, ptr %22, align 4, !tbaa !11
  %260 = add i32 %259, 1
  store i32 %260, ptr %22, align 4, !tbaa !11
  br label %223, !llvm.loop !23

261:                                              ; preds = %226
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store i32 2, ptr %23, align 4, !tbaa !11
  br label %262

262:                                              ; preds = %297, %261
  %263 = load i32, ptr %23, align 4, !tbaa !11
  %264 = icmp ult i32 %263, 4
  br i1 %264, label %266, label %265

265:                                              ; preds = %262
  store i32 14, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  br label %300

266:                                              ; preds = %262
  %267 = load ptr, ptr %5, align 8, !tbaa !5
  %268 = load i32, ptr %23, align 4, !tbaa !11
  %269 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %267, i32 noundef 0, i32 noundef %268)
  %270 = zext i32 %269 to i64
  %271 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %13, i64 0, i64 %270
  %272 = load ptr, ptr %6, align 8, !tbaa !5
  %273 = getelementptr inbounds %"class.basisu::color_rgba", ptr %272, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %273, ptr align 4 %271, i64 4, i1 false), !tbaa.struct !21
  %274 = load ptr, ptr %5, align 8, !tbaa !5
  %275 = load i32, ptr %23, align 4, !tbaa !11
  %276 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %274, i32 noundef 1, i32 noundef %275)
  %277 = zext i32 %276 to i64
  %278 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %13, i64 0, i64 %277
  %279 = load ptr, ptr %6, align 8, !tbaa !5
  %280 = getelementptr inbounds %"class.basisu::color_rgba", ptr %279, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %280, ptr align 4 %278, i64 4, i1 false), !tbaa.struct !21
  %281 = load ptr, ptr %5, align 8, !tbaa !5
  %282 = load i32, ptr %23, align 4, !tbaa !11
  %283 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %281, i32 noundef 2, i32 noundef %282)
  %284 = zext i32 %283 to i64
  %285 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %13, i64 0, i64 %284
  %286 = load ptr, ptr %6, align 8, !tbaa !5
  %287 = getelementptr inbounds %"class.basisu::color_rgba", ptr %286, i64 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %287, ptr align 4 %285, i64 4, i1 false), !tbaa.struct !21
  %288 = load ptr, ptr %5, align 8, !tbaa !5
  %289 = load i32, ptr %23, align 4, !tbaa !11
  %290 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %288, i32 noundef 3, i32 noundef %289)
  %291 = zext i32 %290 to i64
  %292 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %13, i64 0, i64 %291
  %293 = load ptr, ptr %6, align 8, !tbaa !5
  %294 = getelementptr inbounds %"class.basisu::color_rgba", ptr %293, i64 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %294, ptr align 4 %292, i64 4, i1 false), !tbaa.struct !21
  %295 = load ptr, ptr %6, align 8, !tbaa !5
  %296 = getelementptr inbounds %"class.basisu::color_rgba", ptr %295, i64 4
  store ptr %296, ptr %6, align 8, !tbaa !5
  br label %297

297:                                              ; preds = %266
  %298 = load i32, ptr %23, align 4, !tbaa !11
  %299 = add i32 %298, 1
  store i32 %299, ptr %23, align 4, !tbaa !11
  br label %262, !llvm.loop !24

300:                                              ; preds = %265
  br label %341

301:                                              ; preds = %219
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 0, ptr %24, align 4, !tbaa !11
  br label %302

302:                                              ; preds = %337, %301
  %303 = load i32, ptr %24, align 4, !tbaa !11
  %304 = icmp ult i32 %303, 4
  br i1 %304, label %306, label %305

305:                                              ; preds = %302
  store i32 17, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %340

306:                                              ; preds = %302
  %307 = load ptr, ptr %5, align 8, !tbaa !5
  %308 = load i32, ptr %24, align 4, !tbaa !11
  %309 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %307, i32 noundef 0, i32 noundef %308)
  %310 = zext i32 %309 to i64
  %311 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %12, i64 0, i64 %310
  %312 = load ptr, ptr %6, align 8, !tbaa !5
  %313 = getelementptr inbounds %"class.basisu::color_rgba", ptr %312, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %313, ptr align 4 %311, i64 4, i1 false), !tbaa.struct !21
  %314 = load ptr, ptr %5, align 8, !tbaa !5
  %315 = load i32, ptr %24, align 4, !tbaa !11
  %316 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %314, i32 noundef 1, i32 noundef %315)
  %317 = zext i32 %316 to i64
  %318 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %12, i64 0, i64 %317
  %319 = load ptr, ptr %6, align 8, !tbaa !5
  %320 = getelementptr inbounds %"class.basisu::color_rgba", ptr %319, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %320, ptr align 4 %318, i64 4, i1 false), !tbaa.struct !21
  %321 = load ptr, ptr %5, align 8, !tbaa !5
  %322 = load i32, ptr %24, align 4, !tbaa !11
  %323 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %321, i32 noundef 2, i32 noundef %322)
  %324 = zext i32 %323 to i64
  %325 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %13, i64 0, i64 %324
  %326 = load ptr, ptr %6, align 8, !tbaa !5
  %327 = getelementptr inbounds %"class.basisu::color_rgba", ptr %326, i64 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %327, ptr align 4 %325, i64 4, i1 false), !tbaa.struct !21
  %328 = load ptr, ptr %5, align 8, !tbaa !5
  %329 = load i32, ptr %24, align 4, !tbaa !11
  %330 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %328, i32 noundef 3, i32 noundef %329)
  %331 = zext i32 %330 to i64
  %332 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %13, i64 0, i64 %331
  %333 = load ptr, ptr %6, align 8, !tbaa !5
  %334 = getelementptr inbounds %"class.basisu::color_rgba", ptr %333, i64 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %334, ptr align 4 %332, i64 4, i1 false), !tbaa.struct !21
  %335 = load ptr, ptr %6, align 8, !tbaa !5
  %336 = getelementptr inbounds %"class.basisu::color_rgba", ptr %335, i64 4
  store ptr %336, ptr %6, align 8, !tbaa !5
  br label %337

337:                                              ; preds = %306
  %338 = load i32, ptr %24, align 4, !tbaa !11
  %339 = add i32 %338, 1
  store i32 %339, ptr %24, align 4, !tbaa !11
  br label %302, !llvm.loop !25

340:                                              ; preds = %305
  br label %341

341:                                              ; preds = %340, %300
  br label %342

342:                                              ; preds = %341, %218
  store i1 true, ptr %4, align 1
  store i32 1, ptr %16, align 4
  br label %343

343:                                              ; preds = %342, %67
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  %344 = load i1, ptr %4, align 1
  ret i1 %344
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6basisu9etc_block12get_diff_bitEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6basisu9etc_block12get_flip_bitEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i16 @_ZNK6basisu9etc_block15get_base5_colorEv(ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZNK6basisu9etc_block16get_delta3_colorEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZNK6basisu9etc_block15get_base4_colorEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #2 align 2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !16, i64 0}
!16 = !{!"short", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !18}
!21 = !{i64 0, i64 4, !22}
!22 = !{!7, !7, i64 0}
!23 = distinct !{!23, !18}
!24 = distinct !{!24, !18}
!25 = distinct !{!25, !18}


; 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] }

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu9etc_block24get_diff_subblock_colorsEPNS_10color_rgbaEtj(ptr noundef, i16 noundef zeroext, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6basisu9etc_block24get_diff_subblock_colorsEPNS_10color_rgbaEttj(ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu9etc_block23get_abs_subblock_colorsEPNS_10color_rgbaEtj(ptr noundef, i16 noundef zeroext, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6basisu11unpack_etc1ERKNS_9etc_blockEPNS_10color_rgbaEb(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %1, i1 noundef zeroext %2) local_unnamed_addr #2 {
  %4 = alloca [4 x %"class.basisu::color_rgba"], align 16
  %5 = alloca [4 x %"class.basisu::color_rgba"], align 16
  %6 = tail call noundef zeroext i1 @_ZNK6basisu9etc_block12get_diff_bitEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %7 = tail call noundef zeroext i1 @_ZNK6basisu9etc_block12get_flip_bitEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %8 = tail call noundef i32 @_ZNK6basisu9etc_block15get_inten_tableEj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 0)
  %9 = tail call noundef i32 @_ZNK6basisu9etc_block15get_inten_tableEj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #4
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %4)
  %.ptr.1 = getelementptr inbounds i8, ptr %4, i64 4
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr.1)
  %.ptr.2 = getelementptr inbounds i8, ptr %4, i64 8
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr.2)
  %.ptr.3 = getelementptr inbounds i8, ptr %4, i64 12
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr.3)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %5)
  %.ptr124.1 = getelementptr inbounds i8, ptr %5, i64 4
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr124.1)
  %.ptr124.2 = getelementptr inbounds i8, ptr %5, i64 8
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr124.2)
  %.ptr124.3 = getelementptr inbounds i8, ptr %5, i64 12
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr124.3)
  br i1 %6, label %10, label %14

10:                                               ; preds = %3
  %11 = call noundef zeroext i16 @_ZNK6basisu9etc_block15get_base5_colorEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %12 = call noundef zeroext i16 @_ZNK6basisu9etc_block16get_delta3_colorEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
  call void @_ZN6basisu9etc_block24get_diff_subblock_colorsEPNS_10color_rgbaEtj(ptr noundef nonnull %4, i16 noundef zeroext %11, i32 noundef %8)
  %13 = call noundef zeroext i1 @_ZN6basisu9etc_block24get_diff_subblock_colorsEPNS_10color_rgbaEttj(ptr noundef nonnull %5, i16 noundef zeroext %11, i16 noundef zeroext %12, i32 noundef %9)
  br i1 %13, label %17, label %.loopexit

14:                                               ; preds = %3
  %15 = call noundef zeroext i16 @_ZNK6basisu9etc_block15get_base4_colorEj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 0)
  call void @_ZN6basisu9etc_block23get_abs_subblock_colorsEPNS_10color_rgbaEtj(ptr noundef nonnull %4, i16 noundef zeroext %15, i32 noundef %8)
  %16 = call noundef zeroext i16 @_ZNK6basisu9etc_block15get_base4_colorEj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 1)
  call void @_ZN6basisu9etc_block23get_abs_subblock_colorsEPNS_10color_rgbaEtj(ptr noundef nonnull %5, i16 noundef zeroext %16, i32 noundef %9)
  br label %17

17:                                               ; preds = %10, %14
  %18 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 0, i32 noundef 0)
  %19 = zext i32 %18 to i64
  %20 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %19
  br i1 %2, label %21, label %160

21:                                               ; preds = %17
  %22 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %1, ptr noundef nonnull align 1 dereferenceable(4) %20)
  %23 = getelementptr inbounds i8, ptr %1, i64 4
  %24 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 1, i32 noundef 0)
  %25 = zext i32 %24 to i64
  %26 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %25
  %27 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %23, ptr noundef nonnull align 1 dereferenceable(4) %26)
  %28 = getelementptr inbounds i8, ptr %1, i64 8
  %29 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 2, i32 noundef 0)
  %30 = zext i32 %29 to i64
  %31 = getelementptr inbounds i8, ptr %1, i64 12
  %32 = getelementptr inbounds i8, ptr %1, i64 16
  %33 = getelementptr inbounds i8, ptr %1, i64 20
  %34 = getelementptr inbounds i8, ptr %1, i64 24
  %35 = getelementptr inbounds i8, ptr %1, i64 28
  br i1 %7, label %.preheader126.preheader, label %.preheader127.preheader

.preheader127.preheader:                          ; preds = %21
  %36 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %30
  %37 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %28, ptr noundef nonnull align 1 dereferenceable(4) %36)
  %38 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 3, i32 noundef 0)
  %39 = zext i32 %38 to i64
  %40 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %39
  %41 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %31, ptr noundef nonnull align 1 dereferenceable(4) %40)
  %42 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 0, i32 noundef 1)
  %43 = zext i32 %42 to i64
  %44 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %43
  %45 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %32, ptr noundef nonnull align 1 dereferenceable(4) %44)
  %46 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 1, i32 noundef 1)
  %47 = zext i32 %46 to i64
  %48 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %47
  %49 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %33, ptr noundef nonnull align 1 dereferenceable(4) %48)
  %50 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 2, i32 noundef 1)
  %51 = zext i32 %50 to i64
  %52 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %51
  %53 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %34, ptr noundef nonnull align 1 dereferenceable(4) %52)
  %54 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 3, i32 noundef 1)
  %55 = zext i32 %54 to i64
  %56 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %55
  %57 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %35, ptr noundef nonnull align 1 dereferenceable(4) %56)
  %58 = getelementptr inbounds i8, ptr %1, i64 32
  %59 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 0, i32 noundef 2)
  %60 = zext i32 %59 to i64
  %61 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %60
  %62 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %58, ptr noundef nonnull align 1 dereferenceable(4) %61)
  %63 = getelementptr inbounds i8, ptr %1, i64 36
  %64 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 1, i32 noundef 2)
  %65 = zext i32 %64 to i64
  %66 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %65
  %67 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %63, ptr noundef nonnull align 1 dereferenceable(4) %66)
  %68 = getelementptr inbounds i8, ptr %1, i64 40
  %69 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 2, i32 noundef 2)
  %70 = zext i32 %69 to i64
  %71 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %70
  %72 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %68, ptr noundef nonnull align 1 dereferenceable(4) %71)
  %73 = getelementptr inbounds i8, ptr %1, i64 44
  %74 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 3, i32 noundef 2)
  %75 = zext i32 %74 to i64
  %76 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %75
  %77 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %73, ptr noundef nonnull align 1 dereferenceable(4) %76)
  %78 = getelementptr inbounds i8, ptr %1, i64 48
  %79 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 0, i32 noundef 3)
  %80 = zext i32 %79 to i64
  %81 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %80
  %82 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %78, ptr noundef nonnull align 1 dereferenceable(4) %81)
  %83 = getelementptr inbounds i8, ptr %1, i64 52
  %84 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 1, i32 noundef 3)
  %85 = zext i32 %84 to i64
  %86 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %85
  %87 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %83, ptr noundef nonnull align 1 dereferenceable(4) %86)
  %88 = getelementptr inbounds i8, ptr %1, i64 56
  %89 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 2, i32 noundef 3)
  %90 = zext i32 %89 to i64
  %91 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %90
  %92 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %88, ptr noundef nonnull align 1 dereferenceable(4) %91)
  %93 = getelementptr inbounds i8, ptr %1, i64 60
  %94 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 3, i32 noundef 3)
  %95 = zext i32 %94 to i64
  %96 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %95
  %97 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %93, ptr noundef nonnull align 1 dereferenceable(4) %96)
  br label %.loopexit

.preheader126.preheader:                          ; preds = %21
  %98 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %30
  %99 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %28, ptr noundef nonnull align 1 dereferenceable(4) %98)
  %100 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 3, i32 noundef 0)
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %101
  %103 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %31, ptr noundef nonnull align 1 dereferenceable(4) %102)
  %104 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 0, i32 noundef 1)
  %105 = zext i32 %104 to i64
  %106 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %105
  %107 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %32, ptr noundef nonnull align 1 dereferenceable(4) %106)
  %108 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 1, i32 noundef 1)
  %109 = zext i32 %108 to i64
  %110 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %109
  %111 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %33, ptr noundef nonnull align 1 dereferenceable(4) %110)
  %112 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 2, i32 noundef 1)
  %113 = zext i32 %112 to i64
  %114 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %113
  %115 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %34, ptr noundef nonnull align 1 dereferenceable(4) %114)
  %116 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 3, i32 noundef 1)
  %117 = zext i32 %116 to i64
  %118 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %117
  %119 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %35, ptr noundef nonnull align 1 dereferenceable(4) %118)
  %120 = getelementptr inbounds i8, ptr %1, i64 32
  %121 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 0, i32 noundef 2)
  %122 = zext i32 %121 to i64
  %123 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %122
  %124 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %120, ptr noundef nonnull align 1 dereferenceable(4) %123)
  %125 = getelementptr inbounds i8, ptr %1, i64 36
  %126 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 1, i32 noundef 2)
  %127 = zext i32 %126 to i64
  %128 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %127
  %129 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %125, ptr noundef nonnull align 1 dereferenceable(4) %128)
  %130 = getelementptr inbounds i8, ptr %1, i64 40
  %131 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 2, i32 noundef 2)
  %132 = zext i32 %131 to i64
  %133 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %132
  %134 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %130, ptr noundef nonnull align 1 dereferenceable(4) %133)
  %135 = getelementptr inbounds i8, ptr %1, i64 44
  %136 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 3, i32 noundef 2)
  %137 = zext i32 %136 to i64
  %138 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %137
  %139 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %135, ptr noundef nonnull align 1 dereferenceable(4) %138)
  %140 = getelementptr inbounds i8, ptr %1, i64 48
  %141 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 0, i32 noundef 3)
  %142 = zext i32 %141 to i64
  %143 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %142
  %144 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %140, ptr noundef nonnull align 1 dereferenceable(4) %143)
  %145 = getelementptr inbounds i8, ptr %1, i64 52
  %146 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 1, i32 noundef 3)
  %147 = zext i32 %146 to i64
  %148 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %147
  %149 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %145, ptr noundef nonnull align 1 dereferenceable(4) %148)
  %150 = getelementptr inbounds i8, ptr %1, i64 56
  %151 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 2, i32 noundef 3)
  %152 = zext i32 %151 to i64
  %153 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %152
  %154 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %150, ptr noundef nonnull align 1 dereferenceable(4) %153)
  %155 = getelementptr inbounds i8, ptr %1, i64 60
  %156 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 3, i32 noundef 3)
  %157 = zext i32 %156 to i64
  %158 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %157
  %159 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %155, ptr noundef nonnull align 1 dereferenceable(4) %158)
  br label %.loopexit

160:                                              ; preds = %17
  %161 = load i32, ptr %20, align 4, !tbaa !5
  store i32 %161, ptr %1, align 1, !tbaa !5
  %162 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 1, i32 noundef 0)
  %163 = zext i32 %162 to i64
  %164 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %163
  %165 = getelementptr inbounds i8, ptr %1, i64 4
  %166 = load i32, ptr %164, align 4, !tbaa !5
  store i32 %166, ptr %165, align 1, !tbaa !5
  %167 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 2, i32 noundef 0)
  %168 = zext i32 %167 to i64
  %169 = getelementptr inbounds i8, ptr %1, i64 8
  %170 = getelementptr inbounds i8, ptr %1, i64 12
  %171 = getelementptr inbounds i8, ptr %1, i64 16
  %172 = getelementptr inbounds i8, ptr %1, i64 20
  br i1 %7, label %.preheader131.preheader, label %.preheader132.preheader

.preheader132.preheader:                          ; preds = %160
  %173 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %168
  %174 = load i32, ptr %173, align 4, !tbaa !5
  store i32 %174, ptr %169, align 1, !tbaa !5
  %175 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 3, i32 noundef 0)
  %176 = zext i32 %175 to i64
  %177 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %176
  %178 = load i32, ptr %177, align 4, !tbaa !5
  store i32 %178, ptr %170, align 1, !tbaa !5
  %179 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 0, i32 noundef 1)
  %180 = zext i32 %179 to i64
  %181 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %180
  %182 = load i32, ptr %181, align 4, !tbaa !5
  store i32 %182, ptr %171, align 1, !tbaa !5
  %183 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 1, i32 noundef 1)
  %184 = zext i32 %183 to i64
  %185 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %184
  %186 = load i32, ptr %185, align 4, !tbaa !5
  store i32 %186, ptr %172, align 1, !tbaa !5
  %187 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 2, i32 noundef 1)
  %188 = zext i32 %187 to i64
  %189 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %188
  %190 = getelementptr inbounds i8, ptr %1, i64 24
  %191 = load i32, ptr %189, align 4, !tbaa !5
  store i32 %191, ptr %190, align 1, !tbaa !5
  %192 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 3, i32 noundef 1)
  %193 = zext i32 %192 to i64
  %194 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %193
  %195 = getelementptr inbounds i8, ptr %1, i64 28
  %196 = load i32, ptr %194, align 4, !tbaa !5
  store i32 %196, ptr %195, align 1, !tbaa !5
  %197 = getelementptr inbounds i8, ptr %1, i64 32
  %198 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 0, i32 noundef 2)
  %199 = zext i32 %198 to i64
  %200 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %199
  %201 = load i32, ptr %200, align 4, !tbaa !5
  store i32 %201, ptr %197, align 1, !tbaa !5
  %202 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 1, i32 noundef 2)
  %203 = zext i32 %202 to i64
  %204 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %203
  %205 = getelementptr inbounds i8, ptr %1, i64 36
  %206 = load i32, ptr %204, align 4, !tbaa !5
  store i32 %206, ptr %205, align 1, !tbaa !5
  %207 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 2, i32 noundef 2)
  %208 = zext i32 %207 to i64
  %209 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %208
  %210 = getelementptr inbounds i8, ptr %1, i64 40
  %211 = load i32, ptr %209, align 4, !tbaa !5
  store i32 %211, ptr %210, align 1, !tbaa !5
  %212 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 3, i32 noundef 2)
  %213 = zext i32 %212 to i64
  %214 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %213
  %215 = getelementptr inbounds i8, ptr %1, i64 44
  %216 = load i32, ptr %214, align 4, !tbaa !5
  store i32 %216, ptr %215, align 1, !tbaa !5
  %217 = getelementptr inbounds i8, ptr %1, i64 48
  %218 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 0, i32 noundef 3)
  %219 = zext i32 %218 to i64
  %220 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %219
  %221 = load i32, ptr %220, align 4, !tbaa !5
  store i32 %221, ptr %217, align 1, !tbaa !5
  %222 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 1, i32 noundef 3)
  %223 = zext i32 %222 to i64
  %224 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %223
  %225 = getelementptr inbounds i8, ptr %1, i64 52
  %226 = load i32, ptr %224, align 4, !tbaa !5
  store i32 %226, ptr %225, align 1, !tbaa !5
  %227 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 2, i32 noundef 3)
  %228 = zext i32 %227 to i64
  %229 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %228
  %230 = getelementptr inbounds i8, ptr %1, i64 56
  %231 = load i32, ptr %229, align 4, !tbaa !5
  store i32 %231, ptr %230, align 1, !tbaa !5
  %232 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 3, i32 noundef 3)
  %233 = zext i32 %232 to i64
  %234 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %233
  %235 = getelementptr inbounds i8, ptr %1, i64 60
  %236 = load i32, ptr %234, align 4, !tbaa !5
  store i32 %236, ptr %235, align 1, !tbaa !5
  br label %.loopexit

.preheader131.preheader:                          ; preds = %160
  %237 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %168
  %238 = load i32, ptr %237, align 4, !tbaa !5
  store i32 %238, ptr %169, align 1, !tbaa !5
  %239 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 3, i32 noundef 0)
  %240 = zext i32 %239 to i64
  %241 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %240
  %242 = load i32, ptr %241, align 4, !tbaa !5
  store i32 %242, ptr %170, align 1, !tbaa !5
  %243 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 0, i32 noundef 1)
  %244 = zext i32 %243 to i64
  %245 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %244
  %246 = load i32, ptr %245, align 4, !tbaa !5
  store i32 %246, ptr %171, align 1, !tbaa !5
  %247 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 1, i32 noundef 1)
  %248 = zext i32 %247 to i64
  %249 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %248
  %250 = load i32, ptr %249, align 4, !tbaa !5
  store i32 %250, ptr %172, align 1, !tbaa !5
  %251 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 2, i32 noundef 1)
  %252 = zext i32 %251 to i64
  %253 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %252
  %254 = getelementptr inbounds i8, ptr %1, i64 24
  %255 = load i32, ptr %253, align 4, !tbaa !5
  store i32 %255, ptr %254, align 1, !tbaa !5
  %256 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 3, i32 noundef 1)
  %257 = zext i32 %256 to i64
  %258 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %257
  %259 = getelementptr inbounds i8, ptr %1, i64 28
  %260 = load i32, ptr %258, align 4, !tbaa !5
  store i32 %260, ptr %259, align 1, !tbaa !5
  %261 = getelementptr inbounds i8, ptr %1, i64 32
  %262 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 0, i32 noundef 2)
  %263 = zext i32 %262 to i64
  %264 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %263
  %265 = load i32, ptr %264, align 4, !tbaa !5
  store i32 %265, ptr %261, align 1, !tbaa !5
  %266 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 1, i32 noundef 2)
  %267 = zext i32 %266 to i64
  %268 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %267
  %269 = getelementptr inbounds i8, ptr %1, i64 36
  %270 = load i32, ptr %268, align 4, !tbaa !5
  store i32 %270, ptr %269, align 1, !tbaa !5
  %271 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 2, i32 noundef 2)
  %272 = zext i32 %271 to i64
  %273 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %272
  %274 = getelementptr inbounds i8, ptr %1, i64 40
  %275 = load i32, ptr %273, align 4, !tbaa !5
  store i32 %275, ptr %274, align 1, !tbaa !5
  %276 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 3, i32 noundef 2)
  %277 = zext i32 %276 to i64
  %278 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %277
  %279 = getelementptr inbounds i8, ptr %1, i64 44
  %280 = load i32, ptr %278, align 4, !tbaa !5
  store i32 %280, ptr %279, align 1, !tbaa !5
  %281 = getelementptr inbounds i8, ptr %1, i64 48
  %282 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 0, i32 noundef 3)
  %283 = zext i32 %282 to i64
  %284 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %283
  %285 = load i32, ptr %284, align 4, !tbaa !5
  store i32 %285, ptr %281, align 1, !tbaa !5
  %286 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 1, i32 noundef 3)
  %287 = zext i32 %286 to i64
  %288 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %287
  %289 = getelementptr inbounds i8, ptr %1, i64 52
  %290 = load i32, ptr %288, align 4, !tbaa !5
  store i32 %290, ptr %289, align 1, !tbaa !5
  %291 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 2, i32 noundef 3)
  %292 = zext i32 %291 to i64
  %293 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %292
  %294 = getelementptr inbounds i8, ptr %1, i64 56
  %295 = load i32, ptr %293, align 4, !tbaa !5
  store i32 %295, ptr %294, align 1, !tbaa !5
  %296 = call noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 3, i32 noundef 3)
  %297 = zext i32 %296 to i64
  %298 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %5, i64 0, i64 %297
  %299 = getelementptr inbounds i8, ptr %1, i64 60
  %300 = load i32, ptr %298, align 4, !tbaa !5
  store i32 %300, ptr %299, align 1, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader132.preheader, %.preheader131.preheader, %.preheader127.preheader, %.preheader126.preheader, %10
  %.1 = phi i1 [ false, %10 ], [ true, %.preheader126.preheader ], [ true, %.preheader127.preheader ], [ true, %.preheader131.preheader ], [ true, %.preheader132.preheader ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  ret i1 %.1
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6basisu9etc_block12get_diff_bitEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6basisu9etc_block12get_flip_bitEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i16 @_ZNK6basisu9etc_block15get_base5_colorEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZNK6basisu9etc_block16get_delta3_colorEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZNK6basisu9etc_block15get_base4_colorEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1 align 2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 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 = { 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"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,SROAPass,SimplifyCFGPass,TailCallElimPass