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

; 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: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6basisu10unpack_bc1EPKvPNS_10color_rgbaEb(ptr noundef %0, ptr noundef %1, i1 noundef zeroext %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca [4 x %"class.basisu::color_rgba"], align 16
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i8, align 1
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %20 = zext i1 %2 to i8
  store i8 %20, ptr %6, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %21, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = call noundef i32 @_ZNK6basisu9bc1_block13get_low_colorEv(ptr noundef nonnull align 1 dereferenceable(8) %22)
  store i32 %23, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = call noundef i32 @_ZNK6basisu9bc1_block14get_high_colorEv(ptr noundef nonnull align 1 dereferenceable(8) %24)
  store i32 %25, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #5
  %26 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %10, i32 0, i32 0
  %27 = getelementptr inbounds %"class.basisu::color_rgba", ptr %26, i64 4
  br label %28

28:                                               ; preds = %28, %3
  %29 = phi ptr [ %26, %3 ], [ %30, %28 ]
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %29)
  %30 = getelementptr inbounds %"class.basisu::color_rgba", ptr %29, i64 1
  %31 = icmp eq ptr %30, %27
  br i1 %31, label %32, label %28

32:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %33 = load i32, ptr %8, align 4, !tbaa !11
  call void @_ZN6basisu9bc1_block12unpack_colorEjRjS1_S1_(i32 noundef %33, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %34 = load i32, ptr %9, align 4, !tbaa !11
  call void @_ZN6basisu9bc1_block12unpack_colorEjRjS1_S1_(i32 noundef %34, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %35 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %10, i64 0, i64 0
  %36 = load i32, ptr %11, align 4, !tbaa !11
  %37 = load i32, ptr %12, align 4, !tbaa !11
  %38 = load i32, ptr %13, align 4, !tbaa !11
  %39 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba16set_noclamp_rgbaEiiii(ptr noundef nonnull align 1 dereferenceable(4) %35, i32 noundef %36, i32 noundef %37, i32 noundef %38, i32 noundef 255)
  %40 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %10, i64 0, i64 1
  %41 = load i32, ptr %14, align 4, !tbaa !11
  %42 = load i32, ptr %15, align 4, !tbaa !11
  %43 = load i32, ptr %16, align 4, !tbaa !11
  %44 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba16set_noclamp_rgbaEiiii(ptr noundef nonnull align 1 dereferenceable(4) %40, i32 noundef %41, i32 noundef %42, i32 noundef %43, i32 noundef 255)
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  store i8 0, ptr %17, align 1, !tbaa !9
  %45 = load i32, ptr %8, align 4, !tbaa !11
  %46 = load i32, ptr %9, align 4, !tbaa !11
  %47 = icmp ugt i32 %45, %46
  br i1 %47, label %48, label %83

48:                                               ; preds = %32
  %49 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %10, i64 0, i64 2
  %50 = load i32, ptr %11, align 4, !tbaa !11
  %51 = mul i32 %50, 2
  %52 = load i32, ptr %14, align 4, !tbaa !11
  %53 = add i32 %51, %52
  %54 = udiv i32 %53, 3
  %55 = load i32, ptr %12, align 4, !tbaa !11
  %56 = mul i32 %55, 2
  %57 = load i32, ptr %15, align 4, !tbaa !11
  %58 = add i32 %56, %57
  %59 = udiv i32 %58, 3
  %60 = load i32, ptr %13, align 4, !tbaa !11
  %61 = mul i32 %60, 2
  %62 = load i32, ptr %16, align 4, !tbaa !11
  %63 = add i32 %61, %62
  %64 = udiv i32 %63, 3
  %65 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba16set_noclamp_rgbaEiiii(ptr noundef nonnull align 1 dereferenceable(4) %49, i32 noundef %54, i32 noundef %59, i32 noundef %64, i32 noundef 255)
  %66 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %10, i64 0, i64 3
  %67 = load i32, ptr %14, align 4, !tbaa !11
  %68 = mul i32 %67, 2
  %69 = load i32, ptr %11, align 4, !tbaa !11
  %70 = add i32 %68, %69
  %71 = udiv i32 %70, 3
  %72 = load i32, ptr %15, align 4, !tbaa !11
  %73 = mul i32 %72, 2
  %74 = load i32, ptr %12, align 4, !tbaa !11
  %75 = add i32 %73, %74
  %76 = udiv i32 %75, 3
  %77 = load i32, ptr %16, align 4, !tbaa !11
  %78 = mul i32 %77, 2
  %79 = load i32, ptr %13, align 4, !tbaa !11
  %80 = add i32 %78, %79
  %81 = udiv i32 %80, 3
  %82 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba16set_noclamp_rgbaEiiii(ptr noundef nonnull align 1 dereferenceable(4) %66, i32 noundef %71, i32 noundef %76, i32 noundef %81, i32 noundef 255)
  br label %100

83:                                               ; preds = %32
  %84 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %10, i64 0, i64 2
  %85 = load i32, ptr %11, align 4, !tbaa !11
  %86 = load i32, ptr %14, align 4, !tbaa !11
  %87 = add i32 %85, %86
  %88 = udiv i32 %87, 2
  %89 = load i32, ptr %12, align 4, !tbaa !11
  %90 = load i32, ptr %15, align 4, !tbaa !11
  %91 = add i32 %89, %90
  %92 = udiv i32 %91, 2
  %93 = load i32, ptr %13, align 4, !tbaa !11
  %94 = load i32, ptr %16, align 4, !tbaa !11
  %95 = add i32 %93, %94
  %96 = udiv i32 %95, 2
  %97 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba16set_noclamp_rgbaEiiii(ptr noundef nonnull align 1 dereferenceable(4) %84, i32 noundef %88, i32 noundef %92, i32 noundef %96, i32 noundef 255)
  %98 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %10, i64 0, i64 3
  %99 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba16set_noclamp_rgbaEiiii(ptr noundef nonnull align 1 dereferenceable(4) %98, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  store i8 1, ptr %17, align 1, !tbaa !9
  br label %100

100:                                              ; preds = %83, %48
  %101 = load i8, ptr %6, align 1, !tbaa !9, !range !13, !noundef !14
  %102 = trunc i8 %101 to i1
  br i1 %102, label %103, label %143

103:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !11
  br label %104

104:                                              ; preds = %137, %103
  %105 = load i32, ptr %18, align 4, !tbaa !11
  %106 = icmp ult i32 %105, 4
  br i1 %106, label %108, label %107

107:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %142

108:                                              ; preds = %104
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = load i32, ptr %18, align 4, !tbaa !11
  %111 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %109, i32 noundef 0, i32 noundef %110)
  %112 = zext i32 %111 to i64
  %113 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %10, i64 0, i64 %112
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = getelementptr inbounds %"class.basisu::color_rgba", ptr %114, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %115, ptr align 4 %113, i64 4, i1 false), !tbaa.struct !15
  %116 = load ptr, ptr %7, align 8, !tbaa !5
  %117 = load i32, ptr %18, align 4, !tbaa !11
  %118 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %116, i32 noundef 1, i32 noundef %117)
  %119 = zext i32 %118 to i64
  %120 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %10, i64 0, i64 %119
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = getelementptr inbounds %"class.basisu::color_rgba", ptr %121, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %122, ptr align 4 %120, i64 4, i1 false), !tbaa.struct !15
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  %124 = load i32, ptr %18, align 4, !tbaa !11
  %125 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %123, i32 noundef 2, i32 noundef %124)
  %126 = zext i32 %125 to i64
  %127 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %10, i64 0, i64 %126
  %128 = load ptr, ptr %5, align 8, !tbaa !5
  %129 = getelementptr inbounds %"class.basisu::color_rgba", ptr %128, i64 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %129, ptr align 4 %127, i64 4, i1 false), !tbaa.struct !15
  %130 = load ptr, ptr %7, align 8, !tbaa !5
  %131 = load i32, ptr %18, align 4, !tbaa !11
  %132 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %130, i32 noundef 3, i32 noundef %131)
  %133 = zext i32 %132 to i64
  %134 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %10, i64 0, i64 %133
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = getelementptr inbounds %"class.basisu::color_rgba", ptr %135, i64 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %136, ptr align 4 %134, i64 4, i1 false), !tbaa.struct !15
  br label %137

137:                                              ; preds = %108
  %138 = load i32, ptr %18, align 4, !tbaa !11
  %139 = add i32 %138, 1
  store i32 %139, ptr %18, align 4, !tbaa !11
  %140 = load ptr, ptr %5, align 8, !tbaa !5
  %141 = getelementptr inbounds %"class.basisu::color_rgba", ptr %140, i64 4
  store ptr %141, ptr %5, align 8, !tbaa !5
  br label %104, !llvm.loop !17

142:                                              ; preds = %107
  br label %187

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

144:                                              ; preds = %181, %143
  %145 = load i32, ptr %19, align 4, !tbaa !11
  %146 = icmp ult i32 %145, 4
  br i1 %146, label %148, label %147

147:                                              ; preds = %144
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %186

148:                                              ; preds = %144
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = getelementptr inbounds %"class.basisu::color_rgba", ptr %149, i64 0
  %151 = load ptr, ptr %7, align 8, !tbaa !5
  %152 = load i32, ptr %19, align 4, !tbaa !11
  %153 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %151, i32 noundef 0, i32 noundef %152)
  %154 = zext i32 %153 to i64
  %155 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %10, i64 0, i64 %154
  %156 = 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) %155)
  %157 = load ptr, ptr %5, align 8, !tbaa !5
  %158 = getelementptr inbounds %"class.basisu::color_rgba", ptr %157, i64 1
  %159 = load ptr, ptr %7, align 8, !tbaa !5
  %160 = load i32, ptr %19, align 4, !tbaa !11
  %161 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %159, i32 noundef 1, i32 noundef %160)
  %162 = zext i32 %161 to i64
  %163 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %10, i64 0, i64 %162
  %164 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %158, ptr noundef nonnull align 1 dereferenceable(4) %163)
  %165 = load ptr, ptr %5, align 8, !tbaa !5
  %166 = getelementptr inbounds %"class.basisu::color_rgba", ptr %165, i64 2
  %167 = load ptr, ptr %7, align 8, !tbaa !5
  %168 = load i32, ptr %19, align 4, !tbaa !11
  %169 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %167, i32 noundef 2, i32 noundef %168)
  %170 = zext i32 %169 to i64
  %171 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %10, i64 0, i64 %170
  %172 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %166, ptr noundef nonnull align 1 dereferenceable(4) %171)
  %173 = load ptr, ptr %5, align 8, !tbaa !5
  %174 = getelementptr inbounds %"class.basisu::color_rgba", ptr %173, i64 3
  %175 = load ptr, ptr %7, align 8, !tbaa !5
  %176 = load i32, ptr %19, align 4, !tbaa !11
  %177 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %175, i32 noundef 3, i32 noundef %176)
  %178 = zext i32 %177 to i64
  %179 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %10, i64 0, i64 %178
  %180 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %174, ptr noundef nonnull align 1 dereferenceable(4) %179)
  br label %181

181:                                              ; preds = %148
  %182 = load i32, ptr %19, align 4, !tbaa !11
  %183 = add i32 %182, 1
  store i32 %183, ptr %19, align 4, !tbaa !11
  %184 = load ptr, ptr %5, align 8, !tbaa !5
  %185 = getelementptr inbounds %"class.basisu::color_rgba", ptr %184, i64 4
  store ptr %185, ptr %5, align 8, !tbaa !5
  br label %144, !llvm.loop !19

186:                                              ; preds = %147
  br label %187

187:                                              ; preds = %186, %142
  %188 = load i8, ptr %17, align 1, !tbaa !9, !range !13, !noundef !14
  %189 = trunc i8 %188 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  ret i1 %189
}

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

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

; 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 nounwind uwtable
declare dso_local void @_ZN6basisu9bc1_block12unpack_colorEjRjS1_S1_(i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

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

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

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

; 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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{i64 0, i64 4, !16}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !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: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_ZN6basisu10unpack_bc1EPKvPNS_10color_rgbaEb(ptr noundef nonnull %0, ptr noundef %1, i1 noundef zeroext %2) local_unnamed_addr #1 {
  %4 = alloca [4 x %"class.basisu::color_rgba"], align 16
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = tail call noundef i32 @_ZNK6basisu9bc1_block13get_low_colorEv(ptr noundef nonnull align 1 dereferenceable(8) %0)
  %12 = tail call noundef i32 @_ZNK6basisu9bc1_block14get_high_colorEv(ptr noundef nonnull align 1 dereferenceable(8) %0)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #3
  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 4, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #3
  call void @_ZN6basisu9bc1_block12unpack_colorEjRjS1_S1_(i32 noundef %11, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @_ZN6basisu9bc1_block12unpack_colorEjRjS1_S1_(i32 noundef %12, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %13 = load i32, ptr %5, align 4, !tbaa !5
  %14 = load i32, ptr %6, align 4, !tbaa !5
  %15 = load i32, ptr %7, align 4, !tbaa !5
  %16 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba16set_noclamp_rgbaEiiii(ptr noundef nonnull align 1 dereferenceable(4) %4, i32 noundef %13, i32 noundef %14, i32 noundef %15, i32 noundef 255)
  %17 = load i32, ptr %8, align 4, !tbaa !5
  %18 = load i32, ptr %9, align 4, !tbaa !5
  %19 = load i32, ptr %10, align 4, !tbaa !5
  %20 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba16set_noclamp_rgbaEiiii(ptr noundef nonnull align 1 dereferenceable(4) %.ptr.1, i32 noundef %17, i32 noundef %18, i32 noundef %19, i32 noundef 255)
  %21 = icmp ule i32 %11, %12
  %22 = load i32, ptr %5, align 4, !tbaa !5
  br i1 %21, label %55, label %23

23:                                               ; preds = %3
  %24 = shl i32 %22, 1
  %25 = load i32, ptr %8, align 4, !tbaa !5
  %26 = add i32 %24, %25
  %27 = udiv i32 %26, 3
  %28 = load i32, ptr %6, align 4, !tbaa !5
  %29 = shl i32 %28, 1
  %30 = load i32, ptr %9, align 4, !tbaa !5
  %31 = add i32 %29, %30
  %32 = udiv i32 %31, 3
  %33 = load i32, ptr %7, align 4, !tbaa !5
  %34 = shl i32 %33, 1
  %35 = load i32, ptr %10, align 4, !tbaa !5
  %36 = add i32 %34, %35
  %37 = udiv i32 %36, 3
  %38 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba16set_noclamp_rgbaEiiii(ptr noundef nonnull align 1 dereferenceable(4) %.ptr.2, i32 noundef %27, i32 noundef %32, i32 noundef %37, i32 noundef 255)
  %39 = load i32, ptr %8, align 4, !tbaa !5
  %40 = shl i32 %39, 1
  %41 = load i32, ptr %5, align 4, !tbaa !5
  %42 = add i32 %40, %41
  %43 = udiv i32 %42, 3
  %44 = load i32, ptr %9, align 4, !tbaa !5
  %45 = shl i32 %44, 1
  %46 = load i32, ptr %6, align 4, !tbaa !5
  %47 = add i32 %45, %46
  %48 = udiv i32 %47, 3
  %49 = load i32, ptr %10, align 4, !tbaa !5
  %50 = shl i32 %49, 1
  %51 = load i32, ptr %7, align 4, !tbaa !5
  %52 = add i32 %50, %51
  %53 = udiv i32 %52, 3
  %54 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba16set_noclamp_rgbaEiiii(ptr noundef nonnull align 1 dereferenceable(4) %.ptr.3, i32 noundef %43, i32 noundef %48, i32 noundef %53, i32 noundef 255)
  br label %69

55:                                               ; preds = %3
  %56 = load i32, ptr %8, align 4, !tbaa !5
  %57 = add i32 %56, %22
  %58 = lshr i32 %57, 1
  %59 = load i32, ptr %6, align 4, !tbaa !5
  %60 = load i32, ptr %9, align 4, !tbaa !5
  %61 = add i32 %60, %59
  %62 = lshr i32 %61, 1
  %63 = load i32, ptr %7, align 4, !tbaa !5
  %64 = load i32, ptr %10, align 4, !tbaa !5
  %65 = add i32 %64, %63
  %66 = lshr i32 %65, 1
  %67 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba16set_noclamp_rgbaEiiii(ptr noundef nonnull align 1 dereferenceable(4) %.ptr.2, i32 noundef %58, i32 noundef %62, i32 noundef %66, i32 noundef 255)
  %68 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba16set_noclamp_rgbaEiiii(ptr noundef nonnull align 1 dereferenceable(4) %.ptr.3, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  br label %69

69:                                               ; preds = %55, %23
  %70 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 0, i32 noundef 0)
  %71 = zext i32 %70 to i64
  %72 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %71
  br i1 %2, label %.preheader.preheader, label %.preheader42.preheader

.preheader42.preheader:                           ; preds = %69
  %73 = 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) %72)
  %74 = getelementptr inbounds i8, ptr %1, i64 4
  %75 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 1, i32 noundef 0)
  %76 = zext i32 %75 to i64
  %77 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %76
  %78 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %74, ptr noundef nonnull align 1 dereferenceable(4) %77)
  %79 = getelementptr inbounds i8, ptr %1, i64 8
  %80 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 2, i32 noundef 0)
  %81 = zext i32 %80 to i64
  %82 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %81
  %83 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %79, ptr noundef nonnull align 1 dereferenceable(4) %82)
  %84 = getelementptr inbounds i8, ptr %1, i64 12
  %85 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 3, i32 noundef 0)
  %86 = zext i32 %85 to i64
  %87 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %86
  %88 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %84, ptr noundef nonnull align 1 dereferenceable(4) %87)
  %89 = getelementptr inbounds i8, ptr %1, i64 16
  %90 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 0, i32 noundef 1)
  %91 = zext i32 %90 to i64
  %92 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %91
  %93 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %89, ptr noundef nonnull align 1 dereferenceable(4) %92)
  %94 = getelementptr inbounds i8, ptr %1, i64 20
  %95 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 1, i32 noundef 1)
  %96 = zext i32 %95 to i64
  %97 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %96
  %98 = 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) %97)
  %99 = getelementptr inbounds i8, ptr %1, i64 24
  %100 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 2, i32 noundef 1)
  %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) %99, ptr noundef nonnull align 1 dereferenceable(4) %102)
  %104 = getelementptr inbounds i8, ptr %1, i64 28
  %105 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 3, i32 noundef 1)
  %106 = zext i32 %105 to i64
  %107 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %106
  %108 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %104, ptr noundef nonnull align 1 dereferenceable(4) %107)
  %109 = getelementptr inbounds i8, ptr %1, i64 32
  %110 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 0, i32 noundef 2)
  %111 = zext i32 %110 to i64
  %112 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %111
  %113 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %109, ptr noundef nonnull align 1 dereferenceable(4) %112)
  %114 = getelementptr inbounds i8, ptr %1, i64 36
  %115 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 1, i32 noundef 2)
  %116 = zext i32 %115 to i64
  %117 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %116
  %118 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %114, ptr noundef nonnull align 1 dereferenceable(4) %117)
  %119 = getelementptr inbounds i8, ptr %1, i64 40
  %120 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 2, i32 noundef 2)
  %121 = zext i32 %120 to i64
  %122 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %121
  %123 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %119, ptr noundef nonnull align 1 dereferenceable(4) %122)
  %124 = getelementptr inbounds i8, ptr %1, i64 44
  %125 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 3, i32 noundef 2)
  %126 = zext i32 %125 to i64
  %127 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %126
  %128 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %124, ptr noundef nonnull align 1 dereferenceable(4) %127)
  %129 = getelementptr inbounds i8, ptr %1, i64 48
  %130 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 0, i32 noundef 3)
  %131 = zext i32 %130 to i64
  %132 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %131
  %133 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %129, ptr noundef nonnull align 1 dereferenceable(4) %132)
  %134 = getelementptr inbounds i8, ptr %1, i64 52
  %135 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 1, i32 noundef 3)
  %136 = zext i32 %135 to i64
  %137 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %136
  %138 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %134, ptr noundef nonnull align 1 dereferenceable(4) %137)
  %139 = getelementptr inbounds i8, ptr %1, i64 56
  %140 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 2, i32 noundef 3)
  %141 = zext i32 %140 to i64
  %142 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %141
  %143 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %139, ptr noundef nonnull align 1 dereferenceable(4) %142)
  %144 = getelementptr inbounds i8, ptr %1, i64 60
  %145 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 3, i32 noundef 3)
  %146 = zext i32 %145 to i64
  %147 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %146
  %148 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN6basisu10color_rgba7set_rgbERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %144, ptr noundef nonnull align 1 dereferenceable(4) %147)
  br label %.loopexit

.preheader.preheader:                             ; preds = %69
  %149 = load i32, ptr %72, align 4, !tbaa !9
  store i32 %149, ptr %1, align 1, !tbaa !9
  %150 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 1, i32 noundef 0)
  %151 = zext i32 %150 to i64
  %152 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %151
  %153 = getelementptr inbounds i8, ptr %1, i64 4
  %154 = load i32, ptr %152, align 4, !tbaa !9
  store i32 %154, ptr %153, align 1, !tbaa !9
  %155 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 2, i32 noundef 0)
  %156 = zext i32 %155 to i64
  %157 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %156
  %158 = getelementptr inbounds i8, ptr %1, i64 8
  %159 = load i32, ptr %157, align 4, !tbaa !9
  store i32 %159, ptr %158, align 1, !tbaa !9
  %160 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 3, i32 noundef 0)
  %161 = zext i32 %160 to i64
  %162 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %161
  %163 = getelementptr inbounds i8, ptr %1, i64 12
  %164 = load i32, ptr %162, align 4, !tbaa !9
  store i32 %164, ptr %163, align 1, !tbaa !9
  %165 = getelementptr inbounds i8, ptr %1, i64 16
  %166 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 0, i32 noundef 1)
  %167 = zext i32 %166 to i64
  %168 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %167
  %169 = load i32, ptr %168, align 4, !tbaa !9
  store i32 %169, ptr %165, align 1, !tbaa !9
  %170 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 1, i32 noundef 1)
  %171 = zext i32 %170 to i64
  %172 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %171
  %173 = getelementptr inbounds i8, ptr %1, i64 20
  %174 = load i32, ptr %172, align 4, !tbaa !9
  store i32 %174, ptr %173, align 1, !tbaa !9
  %175 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 2, i32 noundef 1)
  %176 = zext i32 %175 to i64
  %177 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %176
  %178 = getelementptr inbounds i8, ptr %1, i64 24
  %179 = load i32, ptr %177, align 4, !tbaa !9
  store i32 %179, ptr %178, align 1, !tbaa !9
  %180 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 3, i32 noundef 1)
  %181 = zext i32 %180 to i64
  %182 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %181
  %183 = getelementptr inbounds i8, ptr %1, i64 28
  %184 = load i32, ptr %182, align 4, !tbaa !9
  store i32 %184, ptr %183, align 1, !tbaa !9
  %185 = getelementptr inbounds i8, ptr %1, i64 32
  %186 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 0, i32 noundef 2)
  %187 = zext i32 %186 to i64
  %188 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %187
  %189 = load i32, ptr %188, align 4, !tbaa !9
  store i32 %189, ptr %185, align 1, !tbaa !9
  %190 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 1, i32 noundef 2)
  %191 = zext i32 %190 to i64
  %192 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %191
  %193 = getelementptr inbounds i8, ptr %1, i64 36
  %194 = load i32, ptr %192, align 4, !tbaa !9
  store i32 %194, ptr %193, align 1, !tbaa !9
  %195 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 2, i32 noundef 2)
  %196 = zext i32 %195 to i64
  %197 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %196
  %198 = getelementptr inbounds i8, ptr %1, i64 40
  %199 = load i32, ptr %197, align 4, !tbaa !9
  store i32 %199, ptr %198, align 1, !tbaa !9
  %200 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 3, i32 noundef 2)
  %201 = zext i32 %200 to i64
  %202 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %201
  %203 = getelementptr inbounds i8, ptr %1, i64 44
  %204 = load i32, ptr %202, align 4, !tbaa !9
  store i32 %204, ptr %203, align 1, !tbaa !9
  %205 = getelementptr inbounds i8, ptr %1, i64 48
  %206 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 0, i32 noundef 3)
  %207 = zext i32 %206 to i64
  %208 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %207
  %209 = load i32, ptr %208, align 4, !tbaa !9
  store i32 %209, ptr %205, align 1, !tbaa !9
  %210 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 1, i32 noundef 3)
  %211 = zext i32 %210 to i64
  %212 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %211
  %213 = getelementptr inbounds i8, ptr %1, i64 52
  %214 = load i32, ptr %212, align 4, !tbaa !9
  store i32 %214, ptr %213, align 1, !tbaa !9
  %215 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 2, i32 noundef 3)
  %216 = zext i32 %215 to i64
  %217 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %216
  %218 = getelementptr inbounds i8, ptr %1, i64 56
  %219 = load i32, ptr %217, align 4, !tbaa !9
  store i32 %219, ptr %218, align 1, !tbaa !9
  %220 = call noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8) %0, i32 noundef 3, i32 noundef 3)
  %221 = zext i32 %220 to i64
  %222 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %4, i64 0, i64 %221
  %223 = getelementptr inbounds i8, ptr %1, i64 60
  %224 = load i32, ptr %222, align 4, !tbaa !9
  store i32 %224, ptr %223, align 1, !tbaa !9
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader42.preheader, %.preheader.preheader
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #3
  ret i1 %21
}

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

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

; 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 nounwind uwtable
declare dso_local void @_ZN6basisu9bc1_block12unpack_colorEjRjS1_S1_(i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6basisu9bc1_block12get_selectorEjj(ptr noundef nonnull align 1 dereferenceable(8), i32 noundef, i32 noundef) local_unnamed_addr #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)) local_unnamed_addr #2 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}


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