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

; 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.basist::approx_move_to_front" = type <{ %"class.basisu::vector.39", i32, [4 x i8] }>
%"class.basisu::vector.39" = type { ptr, i32, i32 }
%"class.basisu::histogram" = type { %"class.basisu::vector.14" }
%"class.basisu::vector.14" = type { ptr, i32, i32 }
%"class.basisu::vector.26" = type { ptr, i32, i32 }
%"class.basisu::vector2D.46" = type { i32, i32, %"class.basisu::vector.0" }
%"class.basisu::vector.0" = type { ptr, i32, i32 }
%"struct.basisu::etc_block" = type { %union.anon.36 }
%union.anon.36 = type { i64 }
%"class.basisu::color_rgba" = type { %union.anon }
%union.anon = type { [4 x i8] }
%"class.basisu::huffman_encoding_table" = type { %"class.basisu::vector.4", %"class.basisu::vector.0" }
%"class.basisu::vector.4" = type { ptr, i32, i32 }
%"class.basisu::bitwise_coder" = type { %"class.basisu::vector.0", i32, i32, i64 }
%"class.basisu::basisu_backend" = type { ptr, %"struct.basisu::basisu_backend_params", %"class.basisu::vector", %"struct.basisu::basisu_backend_output", ptr, %"class.basisu::vector.6", %"class.basisu::vector.8", %"class.basisu::vector.10", %"class.basisu::vector.12", %"class.basisu::vector.14", %"class.basisu::vector.14", %"class.basisu::vector.16", %"class.basisu::vector.16", %"class.basisu::vector.14", %"class.basisu::vector.14" }
%"struct.basisu::basisu_backend_params" = type <{ i8, i8, i8, i8, float, float, i32, i8, [3 x i8], i32, i32, i8, i8, [2 x i8] }>
%"class.basisu::vector" = type { ptr, i32, i32 }
%"struct.basisu::basisu_backend_output" = type { i32, i8, i8, i8, i32, i32, %"class.basisu::vector.0", %"class.basisu::vector.0", %"class.basisu::vector", %"class.basisu::vector.0", %"class.basisu::vector.2", %"class.basisu::vector.4" }
%"class.basisu::vector.2" = type { ptr, i32, i32 }
%"class.basisu::vector.6" = type { ptr, i32, i32 }
%"class.basisu::vector.8" = type { ptr, i32, i32 }
%"class.basisu::vector.10" = type { ptr, i32, i32 }
%"class.basisu::vector.12" = type { ptr, i32, i32 }
%"class.basisu::vector.16" = type { ptr, i32, i32 }
%"struct.basisu::basisu_frontend::params" = type { i32, ptr, i32, i32, i32, i8, i8, i8, i8, i8, i8, i8, ptr, i32, i32, i8, float, i32, ptr, ptr }
%"struct.basisu::basisu_backend_slice_desc" = type <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8, i8, [2 x i8] }>
%"struct.basisu::encoder_block" = type <{ i32, i32, i32, i32, i8, [3 x i8] }>
%"struct.basisu::etc1_endpoint_palette_entry" = type <{ %"class.basisu::color_rgba", i32, i8, [3 x i8] }>

@.str.6 = external hidden unnamed_addr constant [114 x i8], align 1
@_ZN6basistL32ENDPOINT_PRED_REPEAT_LAST_SYMBOLE = external hidden constant i32, align 4
@.str.11 = external hidden unnamed_addr constant [23 x i8], align 1
@__PRETTY_FUNCTION__._ZN6basisu14basisu_backend12encode_imageEv = external hidden unnamed_addr constant [44 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [189 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [41 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu6vectorIjEC2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu6vectorIjED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 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) #1

declare void @_ZN6basisu12debug_printfEPKcz(ptr noundef, ...) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK6basisu15basisu_frontend27get_total_endpoint_clustersEv(ptr noundef nonnull align 8 dereferenceable(496)) #3 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(46) ptr @_ZN6basisu6vectorINS_25basisu_backend_slice_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu14basisu_backend23create_endpoint_paletteEv(ptr noundef nonnull align 8 dereferenceable(336)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(9) ptr @_ZN6basisu6vectorINS_27etc1_endpoint_palette_entryEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN6basisuL6verifyEbi(i1 noundef zeroext, i32 noundef) #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(16) ptr @_ZN6basisu6vectorIN6basist27etc1_selector_palette_entryEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #0 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK6basisu14basisu_backend16get_total_blocksEv(ptr noundef nonnull align 8 dereferenceable(336)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN6basisu6vectorINS_8vector2DINS_13encoder_blockEEEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #0 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu6vectorIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

declare void @_ZN6basisu15basisu_frontend29reoptimize_remapped_endpointsERKNS_6vectorIjEERNS1_IiEEbPS2_(ptr noundef nonnull align 8 dereferenceable(496), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext, ptr noundef) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu6vectorIiED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIbEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu14basisu_backend25check_for_valid_cr_blocksEv(ptr noundef nonnull align 8 dereferenceable(336)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(88) ptr @_ZNK6basisu15basisu_frontend10get_paramsEv(ptr noundef nonnull align 8 dereferenceable(496)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 dereferenceable(64) ptr @_ZNK6basisu15basisu_frontend22get_source_pixel_blockEj(ptr noundef nonnull align 8 dereferenceable(496), i32 noundef) #3 align 2

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

declare noundef i64 @_ZNK6basisu9etc_block19evaluate_etc1_errorEPKNS_10color_rgbaEbi(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i1 noundef zeroext, i32 noundef) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZN6basisu7maximumIfEET_S1_S1_(float noundef, float noundef) #0

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

declare noundef zeroext i1 @_ZN6basisu11unpack_etc1ERKNS_9etc_blockEPNS_10color_rgbaEb(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i1 noundef zeroext) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext, ptr noundef nonnull align 1 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(4), i1 noundef zeroext) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu14basisu_backend18compute_slice_crcsEv(ptr noundef nonnull align 8 dereferenceable(336)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu9etc_block22set_block_color5_etc1sERKNS_10color_rgbaE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(4)) #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6basisu14basisu_backend12encode_imageEv(ptr noundef nonnull align 8 dereferenceable(336) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.basist::approx_move_to_front", align 8
  %9 = alloca %"class.basisu::histogram", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.basisu::histogram", align 8
  %13 = alloca %"class.basisu::histogram", align 8
  %14 = alloca %"class.basisu::vector.26", align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"class.basisu::histogram", align 8
  %18 = alloca %"class.basisu::histogram", align 8
  %19 = alloca %"class.basisu::vector.26", align 8
  %20 = alloca i32, align 4
  %21 = alloca %"class.basisu::vector.14", align 8
  %22 = alloca %"class.basisu::vector.14", align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca %"class.basisu::vector2D.46", align 8
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca ptr, align 8
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca ptr, align 8
  %40 = alloca i32, align 4
  %41 = alloca i32, align 4
  %42 = alloca i32, align 4
  %43 = alloca i32, align 4
  %44 = alloca i32, align 4
  %45 = alloca i32, align 4
  %46 = alloca i32, align 4
  %47 = alloca i32, align 4
  %48 = alloca i32, align 4
  %49 = alloca i32, align 4
  %50 = alloca i32, align 4
  %51 = alloca ptr, align 8
  %52 = alloca %"struct.basisu::etc_block", align 8
  %53 = alloca i64, align 8
  %54 = alloca float, align 4
  %55 = alloca i64, align 8
  %56 = alloca i64, align 8
  %57 = alloca i32, align 4
  %58 = alloca %"struct.basisu::etc_block", align 8
  %59 = alloca i32, align 4
  %60 = alloca i32, align 4
  %61 = alloca i32, align 4
  %62 = alloca i32, align 4
  %63 = alloca ptr, align 8
  %64 = alloca i64, align 8
  %65 = alloca i32, align 4
  %66 = alloca i32, align 4
  %67 = alloca i32, align 4
  %68 = alloca i32, align 4
  %69 = alloca ptr, align 8
  %70 = alloca ptr, align 8
  %71 = alloca [16 x %"class.basisu::color_rgba"], align 16
  %72 = alloca i64, align 8
  %73 = alloca i32, align 4
  %74 = alloca i32, align 4
  %75 = alloca i64, align 8
  %76 = alloca i32, align 4
  %77 = alloca i32, align 4
  %78 = alloca float, align 4
  %79 = alloca i8, align 1
  %80 = alloca i64, align 8
  %81 = alloca i32, align 4
  %82 = alloca i32, align 4
  %83 = alloca i64, align 8
  %84 = alloca i64, align 8
  %85 = alloca [4 x %"class.basisu::color_rgba"], align 16
  %86 = alloca ptr, align 8
  %87 = alloca i32, align 4
  %88 = alloca i32, align 4
  %89 = alloca i32, align 4
  %90 = alloca i32, align 4
  %91 = alloca i32, align 4
  %92 = alloca i32, align 4
  %93 = alloca i32, align 4
  %94 = alloca i32, align 4
  %95 = alloca i32, align 4
  %96 = alloca i32, align 4
  %97 = alloca i32, align 4
  %98 = alloca i32, align 4
  %99 = alloca i32, align 4
  %100 = alloca i32, align 4
  %101 = alloca i32, align 4
  %102 = alloca i32, align 4
  %103 = alloca i32, align 4
  %104 = alloca i32, align 4
  %105 = alloca %"class.basisu::vector.39", align 8
  %106 = alloca double, align 8
  %107 = alloca double, align 8
  %108 = alloca double, align 8
  %109 = alloca %"class.basisu::huffman_encoding_table", align 8
  %110 = alloca %"class.basisu::huffman_encoding_table", align 8
  %111 = alloca %"class.basisu::huffman_encoding_table", align 8
  %112 = alloca %"class.basisu::huffman_encoding_table", align 8
  %113 = alloca %"class.basisu::bitwise_coder", align 8
  %114 = alloca i32, align 4
  %115 = alloca i32, align 4
  %116 = alloca i32, align 4
  %117 = alloca i32, align 4
  %118 = alloca i32, align 4
  %119 = alloca i32, align 4
  %120 = alloca i32, align 4
  %121 = alloca i32, align 4
  %122 = alloca i32, align 4
  %123 = alloca i32, align 4
  %124 = alloca i32, align 4
  %125 = alloca i32, align 4
  %126 = alloca i32, align 4
  %127 = alloca i32, align 4
  %128 = alloca i32, align 4
  %129 = alloca i32, align 4
  %130 = alloca i32, align 4
  %131 = alloca i32, align 4
  %132 = alloca ptr, align 8
  %133 = alloca i32, align 4
  %134 = alloca i32, align 4
  %135 = alloca i32, align 4
  %136 = alloca i32, align 4
  %137 = alloca i32, align 4
  %138 = alloca i32, align 4
  %139 = alloca double, align 8
  %140 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %141 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #9
  %142 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 0
  %143 = load ptr, ptr %142, align 8, !tbaa !9
  store ptr %143, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #9
  %144 = load ptr, ptr %4, align 8, !tbaa !5
  %145 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNK6basisu15basisu_frontend10get_paramsEv(ptr noundef nonnull align 8 dereferenceable(496) %144)
  %146 = getelementptr inbounds %"struct.basisu::basisu_frontend::params", ptr %145, i32 0, i32 17
  %147 = load i32, ptr %146, align 8, !tbaa !27
  %148 = icmp eq i32 %147, 3
  %149 = zext i1 %148 to i8
  store i8 %149, ptr %5, align 1, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #9
  store i32 0, ptr %6, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  store i32 0, ptr %7, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #9
  call void @_ZN6basist20approx_move_to_frontC2Ej(ptr noundef nonnull align 8 dereferenceable(20) %8, i32 noundef 64)
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #9
  invoke void @_ZN6basisu9histogramC2Ej(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef 64)
          to label %150 unwind label %194

150:                                              ; preds = %1
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #9
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  %152 = invoke noundef i32 @_ZNK6basisu15basisu_frontend27get_total_selector_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %151)
          to label %153 unwind label %198

153:                                              ; preds = %150
  %154 = add i32 %152, 64
  %155 = add i32 %154, 1
  invoke void @_ZN6basisu9histogramC2Ej(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef %155)
          to label %156 unwind label %198

156:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #9
  invoke void @_ZN6basisu9histogramC2Ej(ptr noundef nonnull align 8 dereferenceable(16) %13, i32 noundef 64)
          to label %157 unwind label %202

157:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #9
  %158 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 2
  %159 = invoke noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %158)
          to label %160 unwind label %206

160:                                              ; preds = %157
  %161 = zext i32 %159 to i64
  invoke void @_ZN6basisu6vectorINS0_IjEEEC2Em(ptr noundef nonnull align 8 dereferenceable(16) %14, i64 noundef %161)
          to label %162 unwind label %206

162:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  %163 = load ptr, ptr %4, align 8, !tbaa !5
  %164 = invoke noundef i32 @_ZNK6basisu15basisu_frontend27get_total_selector_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %163)
          to label %165 unwind label %210

165:                                              ; preds = %162
  store i32 %164, ptr %15, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  %166 = load i32, ptr %15, align 4, !tbaa !31
  %167 = add i32 %166, 64
  store i32 %167, ptr %16, align 4, !tbaa !31
  %168 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 3
  %169 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %168, i32 0, i32 11
  %170 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 2
  %171 = invoke noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %170)
          to label %172 unwind label %214

172:                                              ; preds = %165
  %173 = zext i32 %171 to i64
  invoke void @_ZN6basisu6vectorItE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16) %169, i64 noundef %173, i1 noundef zeroext false)
          to label %174 unwind label %214

174:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #9
  %175 = load ptr, ptr %4, align 8, !tbaa !5
  %176 = invoke noundef i32 @_ZNK6basisu15basisu_frontend27get_total_endpoint_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %175)
          to label %177 unwind label %218

177:                                              ; preds = %174
  invoke void @_ZN6basisu9histogramC2Ej(ptr noundef nonnull align 8 dereferenceable(16) %17, i32 noundef %176)
          to label %178 unwind label %218

178:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #9
  invoke void @_ZN6basisu9histogramC2Ej(ptr noundef nonnull align 8 dereferenceable(16) %18, i32 noundef 257)
          to label %179 unwind label %222

179:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #9
  %180 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 2
  %181 = invoke noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %180)
          to label %182 unwind label %226

182:                                              ; preds = %179
  %183 = zext i32 %181 to i64
  invoke void @_ZN6basisu6vectorINS0_IjEEEC2Em(ptr noundef nonnull align 8 dereferenceable(16) %19, i64 noundef %183)
          to label %184 unwind label %226

184:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  store i32 0, ptr %20, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #9
  invoke void @_ZN6basisu6vectorIjEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21)
          to label %185 unwind label %230

185:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #9
  invoke void @_ZN6basisu6vectorIjEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22)
          to label %186 unwind label %234

186:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  store i32 0, ptr %23, align 4, !tbaa !31
  br label %187

187:                                              ; preds = %1477, %186
  %188 = load i32, ptr %23, align 4, !tbaa !31
  %189 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 2
  %190 = invoke noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %189)
          to label %191 unwind label %238

191:                                              ; preds = %187
  %192 = icmp ult i32 %188, %190
  br i1 %192, label %242, label %193

193:                                              ; preds = %191
  store i32 2, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  br label %1486

194:                                              ; preds = %1
  %195 = landingpad { ptr, i32 }
          cleanup
  %196 = extractvalue { ptr, i32 } %195, 0
  store ptr %196, ptr %10, align 8
  %197 = extractvalue { ptr, i32 } %195, 1
  store i32 %197, ptr %11, align 4
  br label %2226

198:                                              ; preds = %153, %150
  %199 = landingpad { ptr, i32 }
          cleanup
  %200 = extractvalue { ptr, i32 } %199, 0
  store ptr %200, ptr %10, align 8
  %201 = extractvalue { ptr, i32 } %199, 1
  store i32 %201, ptr %11, align 4
  br label %2225

202:                                              ; preds = %156
  %203 = landingpad { ptr, i32 }
          cleanup
  %204 = extractvalue { ptr, i32 } %203, 0
  store ptr %204, ptr %10, align 8
  %205 = extractvalue { ptr, i32 } %203, 1
  store i32 %205, ptr %11, align 4
  br label %2224

206:                                              ; preds = %160, %157
  %207 = landingpad { ptr, i32 }
          cleanup
  %208 = extractvalue { ptr, i32 } %207, 0
  store ptr %208, ptr %10, align 8
  %209 = extractvalue { ptr, i32 } %207, 1
  store i32 %209, ptr %11, align 4
  br label %2223

210:                                              ; preds = %162
  %211 = landingpad { ptr, i32 }
          cleanup
  %212 = extractvalue { ptr, i32 } %211, 0
  store ptr %212, ptr %10, align 8
  %213 = extractvalue { ptr, i32 } %211, 1
  store i32 %213, ptr %11, align 4
  br label %2222

214:                                              ; preds = %172, %165
  %215 = landingpad { ptr, i32 }
          cleanup
  %216 = extractvalue { ptr, i32 } %215, 0
  store ptr %216, ptr %10, align 8
  %217 = extractvalue { ptr, i32 } %215, 1
  store i32 %217, ptr %11, align 4
  br label %2221

218:                                              ; preds = %177, %174
  %219 = landingpad { ptr, i32 }
          cleanup
  %220 = extractvalue { ptr, i32 } %219, 0
  store ptr %220, ptr %10, align 8
  %221 = extractvalue { ptr, i32 } %219, 1
  store i32 %221, ptr %11, align 4
  br label %2220

222:                                              ; preds = %178
  %223 = landingpad { ptr, i32 }
          cleanup
  %224 = extractvalue { ptr, i32 } %223, 0
  store ptr %224, ptr %10, align 8
  %225 = extractvalue { ptr, i32 } %223, 1
  store i32 %225, ptr %11, align 4
  br label %2219

226:                                              ; preds = %182, %179
  %227 = landingpad { ptr, i32 }
          cleanup
  %228 = extractvalue { ptr, i32 } %227, 0
  store ptr %228, ptr %10, align 8
  %229 = extractvalue { ptr, i32 } %227, 1
  store i32 %229, ptr %11, align 4
  br label %2218

230:                                              ; preds = %184
  %231 = landingpad { ptr, i32 }
          cleanup
  %232 = extractvalue { ptr, i32 } %231, 0
  store ptr %232, ptr %10, align 8
  %233 = extractvalue { ptr, i32 } %231, 1
  store i32 %233, ptr %11, align 4
  br label %2217

234:                                              ; preds = %185
  %235 = landingpad { ptr, i32 }
          cleanup
  %236 = extractvalue { ptr, i32 } %235, 0
  store ptr %236, ptr %10, align 8
  %237 = extractvalue { ptr, i32 } %235, 1
  store i32 %237, ptr %11, align 4
  br label %2216

238:                                              ; preds = %187
  %239 = landingpad { ptr, i32 }
          cleanup
  %240 = extractvalue { ptr, i32 } %239, 0
  store ptr %240, ptr %10, align 8
  %241 = extractvalue { ptr, i32 } %239, 1
  store i32 %241, ptr %11, align 4
  br label %1485

242:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  %243 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 2
  %244 = load i32, ptr %23, align 4, !tbaa !31
  %245 = zext i32 %244 to i64
  %246 = invoke noundef nonnull align 4 dereferenceable(46) ptr @_ZN6basisu6vectorINS_25basisu_backend_slice_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %243, i64 noundef %245)
          to label %247 unwind label %273

247:                                              ; preds = %242
  %248 = getelementptr inbounds %"struct.basisu::basisu_backend_slice_desc", ptr %246, i32 0, i32 0
  %249 = load i32, ptr %248, align 4, !tbaa !32
  store i32 %249, ptr %25, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #9
  %250 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 2
  %251 = load i32, ptr %23, align 4, !tbaa !31
  %252 = zext i32 %251 to i64
  %253 = invoke noundef nonnull align 4 dereferenceable(46) ptr @_ZN6basisu6vectorINS_25basisu_backend_slice_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %250, i64 noundef %252)
          to label %254 unwind label %277

254:                                              ; preds = %247
  %255 = getelementptr inbounds %"struct.basisu::basisu_backend_slice_desc", ptr %253, i32 0, i32 5
  %256 = load i32, ptr %255, align 4, !tbaa !34
  store i32 %256, ptr %26, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #9
  %257 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 2
  %258 = load i32, ptr %23, align 4, !tbaa !31
  %259 = zext i32 %258 to i64
  %260 = invoke noundef nonnull align 4 dereferenceable(46) ptr @_ZN6basisu6vectorINS_25basisu_backend_slice_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %257, i64 noundef %259)
          to label %261 unwind label %281

261:                                              ; preds = %254
  %262 = getelementptr inbounds %"struct.basisu::basisu_backend_slice_desc", ptr %260, i32 0, i32 6
  %263 = load i32, ptr %262, align 4, !tbaa !35
  store i32 %263, ptr %27, align 4, !tbaa !31
  invoke void @_ZN6basist20approx_move_to_front5resetEv(ptr noundef nonnull align 8 dereferenceable(20) %8)
          to label %264 unwind label %281

264:                                              ; preds = %261
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #9
  store i32 0, ptr %28, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #9
  store i32 -1, ptr %29, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #9
  store i32 0, ptr %30, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #9
  store i32 0, ptr %31, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 24, ptr %32) #9
  %265 = load i32, ptr %26, align 4, !tbaa !31
  %266 = load i32, ptr %27, align 4, !tbaa !31
  invoke void @_ZN6basisu8vector2DIhEC2Ejj(ptr noundef nonnull align 8 dereferenceable(24) %32, i32 noundef %265, i32 noundef %266)
          to label %267 unwind label %285

267:                                              ; preds = %264
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #9
  store i32 0, ptr %33, align 4, !tbaa !31
  br label %268

268:                                              ; preds = %367, %267
  %269 = load i32, ptr %33, align 4, !tbaa !31
  %270 = load i32, ptr %27, align 4, !tbaa !31
  %271 = icmp ult i32 %269, %270
  br i1 %271, label %289, label %272

272:                                              ; preds = %268
  store i32 5, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  br label %370

273:                                              ; preds = %242
  %274 = landingpad { ptr, i32 }
          cleanup
  %275 = extractvalue { ptr, i32 } %274, 0
  store ptr %275, ptr %10, align 8
  %276 = extractvalue { ptr, i32 } %274, 1
  store i32 %276, ptr %11, align 4
  br label %1484

277:                                              ; preds = %247
  %278 = landingpad { ptr, i32 }
          cleanup
  %279 = extractvalue { ptr, i32 } %278, 0
  store ptr %279, ptr %10, align 8
  %280 = extractvalue { ptr, i32 } %278, 1
  store i32 %280, ptr %11, align 4
  br label %1483

281:                                              ; preds = %261, %254
  %282 = landingpad { ptr, i32 }
          cleanup
  %283 = extractvalue { ptr, i32 } %282, 0
  store ptr %283, ptr %10, align 8
  %284 = extractvalue { ptr, i32 } %282, 1
  store i32 %284, ptr %11, align 4
  br label %1482

285:                                              ; preds = %264
  %286 = landingpad { ptr, i32 }
          cleanup
  %287 = extractvalue { ptr, i32 } %286, 0
  store ptr %287, ptr %10, align 8
  %288 = extractvalue { ptr, i32 } %286, 1
  store i32 %288, ptr %11, align 4
  br label %1481

289:                                              ; preds = %268
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #9
  store i32 0, ptr %34, align 4, !tbaa !31
  br label %290

290:                                              ; preds = %363, %289
  %291 = load i32, ptr %34, align 4, !tbaa !31
  %292 = load i32, ptr %26, align 4, !tbaa !31
  %293 = icmp ult i32 %291, %292
  br i1 %293, label %295, label %294

294:                                              ; preds = %290
  store i32 8, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #9
  br label %366

295:                                              ; preds = %290
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #9
  %296 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 8
  %297 = load i32, ptr %23, align 4, !tbaa !31
  %298 = zext i32 %297 to i64
  %299 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN6basisu6vectorINS_8vector2DINS_13encoder_blockEEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %296, i64 noundef %298)
          to label %300 unwind label %315

300:                                              ; preds = %295
  %301 = load i32, ptr %34, align 4, !tbaa !31
  %302 = load i32, ptr %33, align 4, !tbaa !31
  %303 = invoke noundef nonnull align 4 dereferenceable(17) ptr @_ZN6basisu8vector2DINS_13encoder_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %299, i32 noundef %301, i32 noundef %302)
          to label %304 unwind label %315

304:                                              ; preds = %300
  store ptr %303, ptr %35, align 8, !tbaa !5
  %305 = load ptr, ptr %35, align 8, !tbaa !5
  %306 = getelementptr inbounds %"struct.basisu::encoder_block", ptr %305, i32 0, i32 0
  %307 = load i32, ptr %306, align 4, !tbaa !36
  %308 = icmp eq i32 %307, 0
  br i1 %308, label %309, label %319

309:                                              ; preds = %304
  %310 = load i32, ptr %34, align 4, !tbaa !31
  %311 = sub i32 %310, 1
  %312 = load i32, ptr %33, align 4, !tbaa !31
  %313 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu8vector2DIhEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %32, i32 noundef %311, i32 noundef %312)
          to label %314 unwind label %315

314:                                              ; preds = %309
  store i8 1, ptr %313, align 1, !tbaa !38
  br label %348

315:                                              ; preds = %356, %338, %324, %309, %300, %295
  %316 = landingpad { ptr, i32 }
          cleanup
  %317 = extractvalue { ptr, i32 } %316, 0
  store ptr %317, ptr %10, align 8
  %318 = extractvalue { ptr, i32 } %316, 1
  store i32 %318, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  br label %1480

319:                                              ; preds = %304
  %320 = load ptr, ptr %35, align 8, !tbaa !5
  %321 = getelementptr inbounds %"struct.basisu::encoder_block", ptr %320, i32 0, i32 0
  %322 = load i32, ptr %321, align 4, !tbaa !36
  %323 = icmp eq i32 %322, 1
  br i1 %323, label %324, label %330

324:                                              ; preds = %319
  %325 = load i32, ptr %34, align 4, !tbaa !31
  %326 = load i32, ptr %33, align 4, !tbaa !31
  %327 = sub i32 %326, 1
  %328 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu8vector2DIhEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %32, i32 noundef %325, i32 noundef %327)
          to label %329 unwind label %315

329:                                              ; preds = %324
  store i8 1, ptr %328, align 1, !tbaa !38
  br label %347

330:                                              ; preds = %319
  %331 = load ptr, ptr %35, align 8, !tbaa !5
  %332 = getelementptr inbounds %"struct.basisu::encoder_block", ptr %331, i32 0, i32 0
  %333 = load i32, ptr %332, align 4, !tbaa !36
  %334 = icmp eq i32 %333, 2
  br i1 %334, label %335, label %346

335:                                              ; preds = %330
  %336 = load i8, ptr %5, align 1, !tbaa !30, !range !39, !noundef !40
  %337 = trunc i8 %336 to i1
  br i1 %337, label %345, label %338

338:                                              ; preds = %335
  %339 = load i32, ptr %34, align 4, !tbaa !31
  %340 = sub i32 %339, 1
  %341 = load i32, ptr %33, align 4, !tbaa !31
  %342 = sub i32 %341, 1
  %343 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu8vector2DIhEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %32, i32 noundef %340, i32 noundef %342)
          to label %344 unwind label %315

344:                                              ; preds = %338
  store i8 1, ptr %343, align 1, !tbaa !38
  br label %345

345:                                              ; preds = %344, %335
  br label %346

346:                                              ; preds = %345, %330
  br label %347

347:                                              ; preds = %346, %329
  br label %348

348:                                              ; preds = %347, %314
  %349 = load i8, ptr %5, align 1, !tbaa !30, !range !39, !noundef !40
  %350 = trunc i8 %349 to i1
  br i1 %350, label %351, label %362

351:                                              ; preds = %348
  %352 = load ptr, ptr %35, align 8, !tbaa !5
  %353 = getelementptr inbounds %"struct.basisu::encoder_block", ptr %352, i32 0, i32 4
  %354 = load i8, ptr %353, align 4, !tbaa !41, !range !39, !noundef !40
  %355 = trunc i8 %354 to i1
  br i1 %355, label %356, label %361

356:                                              ; preds = %351
  %357 = load i32, ptr %34, align 4, !tbaa !31
  %358 = load i32, ptr %33, align 4, !tbaa !31
  %359 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu8vector2DIhEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %32, i32 noundef %357, i32 noundef %358)
          to label %360 unwind label %315

360:                                              ; preds = %356
  store i8 1, ptr %359, align 1, !tbaa !38
  br label %361

361:                                              ; preds = %360, %351
  br label %362

362:                                              ; preds = %361, %348
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #9
  br label %363

363:                                              ; preds = %362
  %364 = load i32, ptr %34, align 4, !tbaa !31
  %365 = add i32 %364, 1
  store i32 %365, ptr %34, align 4, !tbaa !31
  br label %290, !llvm.loop !42

366:                                              ; preds = %294
  br label %367

367:                                              ; preds = %366
  %368 = load i32, ptr %33, align 4, !tbaa !31
  %369 = add i32 %368, 1
  store i32 %369, ptr %33, align 4, !tbaa !31
  br label %268, !llvm.loop !44

370:                                              ; preds = %272
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #9
  store i32 0, ptr %36, align 4, !tbaa !31
  br label %371

371:                                              ; preds = %1354, %370
  %372 = load i32, ptr %36, align 4, !tbaa !31
  %373 = load i32, ptr %27, align 4, !tbaa !31
  %374 = icmp ult i32 %372, %373
  br i1 %374, label %376, label %375

375:                                              ; preds = %371
  store i32 11, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #9
  br label %1357

376:                                              ; preds = %371
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #9
  store i32 0, ptr %37, align 4, !tbaa !31
  br label %377

377:                                              ; preds = %1344, %376
  %378 = load i32, ptr %37, align 4, !tbaa !31
  %379 = load i32, ptr %26, align 4, !tbaa !31
  %380 = icmp ult i32 %378, %379
  br i1 %380, label %382, label %381

381:                                              ; preds = %377
  store i32 14, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #9
  br label %1353

382:                                              ; preds = %377
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #9
  %383 = load i32, ptr %25, align 4, !tbaa !31
  %384 = load i32, ptr %37, align 4, !tbaa !31
  %385 = add i32 %383, %384
  %386 = load i32, ptr %36, align 4, !tbaa !31
  %387 = load i32, ptr %26, align 4, !tbaa !31
  %388 = mul i32 %386, %387
  %389 = add i32 %385, %388
  store i32 %389, ptr %38, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #9
  %390 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 8
  %391 = load i32, ptr %23, align 4, !tbaa !31
  %392 = zext i32 %391 to i64
  %393 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN6basisu6vectorINS_8vector2DINS_13encoder_blockEEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %390, i64 noundef %392)
          to label %394 unwind label %411

394:                                              ; preds = %382
  %395 = load i32, ptr %37, align 4, !tbaa !31
  %396 = load i32, ptr %36, align 4, !tbaa !31
  %397 = invoke noundef nonnull align 4 dereferenceable(17) ptr @_ZN6basisu8vector2DINS_13encoder_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %393, i32 noundef %395, i32 noundef %396)
          to label %398 unwind label %411

398:                                              ; preds = %394
  store ptr %397, ptr %39, align 8, !tbaa !5
  %399 = load i32, ptr %37, align 4, !tbaa !31
  %400 = and i32 %399, 1
  %401 = icmp eq i32 %400, 0
  br i1 %401, label %402, label %541

402:                                              ; preds = %398
  %403 = load i32, ptr %36, align 4, !tbaa !31
  %404 = and i32 %403, 1
  %405 = icmp eq i32 %404, 0
  br i1 %405, label %406, label %541

406:                                              ; preds = %402
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #9
  store i32 0, ptr %40, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #9
  store i32 0, ptr %41, align 4, !tbaa !31
  br label %407

407:                                              ; preds = %464, %406
  %408 = load i32, ptr %41, align 4, !tbaa !31
  %409 = icmp ult i32 %408, 2
  br i1 %409, label %415, label %410

410:                                              ; preds = %407
  store i32 17, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #9
  br label %467

411:                                              ; preds = %394, %382
  %412 = landingpad { ptr, i32 }
          cleanup
  %413 = extractvalue { ptr, i32 } %412, 0
  store ptr %413, ptr %10, align 8
  %414 = extractvalue { ptr, i32 } %412, 1
  store i32 %414, ptr %11, align 4
  br label %1352

415:                                              ; preds = %407
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #9
  store i32 0, ptr %42, align 4, !tbaa !31
  br label %416

416:                                              ; preds = %460, %415
  %417 = load i32, ptr %42, align 4, !tbaa !31
  %418 = icmp ult i32 %417, 2
  br i1 %418, label %420, label %419

419:                                              ; preds = %416
  store i32 20, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #9
  br label %463

420:                                              ; preds = %416
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #9
  %421 = load i32, ptr %37, align 4, !tbaa !31
  %422 = load i32, ptr %42, align 4, !tbaa !31
  %423 = add i32 %421, %422
  store i32 %423, ptr %43, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #9
  %424 = load i32, ptr %36, align 4, !tbaa !31
  %425 = load i32, ptr %41, align 4, !tbaa !31
  %426 = add i32 %424, %425
  store i32 %426, ptr %44, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #9
  store i32 3, ptr %45, align 4, !tbaa !31
  %427 = load i32, ptr %43, align 4, !tbaa !31
  %428 = load i32, ptr %26, align 4, !tbaa !31
  %429 = icmp ult i32 %427, %428
  br i1 %429, label %430, label %450

430:                                              ; preds = %420
  %431 = load i32, ptr %44, align 4, !tbaa !31
  %432 = load i32, ptr %27, align 4, !tbaa !31
  %433 = icmp ult i32 %431, %432
  br i1 %433, label %434, label %450

434:                                              ; preds = %430
  %435 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 8
  %436 = load i32, ptr %23, align 4, !tbaa !31
  %437 = zext i32 %436 to i64
  %438 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN6basisu6vectorINS_8vector2DINS_13encoder_blockEEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %435, i64 noundef %437)
          to label %439 unwind label %446

439:                                              ; preds = %434
  %440 = load i32, ptr %43, align 4, !tbaa !31
  %441 = load i32, ptr %44, align 4, !tbaa !31
  %442 = invoke noundef nonnull align 4 dereferenceable(17) ptr @_ZN6basisu8vector2DINS_13encoder_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %438, i32 noundef %440, i32 noundef %441)
          to label %443 unwind label %446

443:                                              ; preds = %439
  %444 = getelementptr inbounds %"struct.basisu::encoder_block", ptr %442, i32 0, i32 0
  %445 = load i32, ptr %444, align 4, !tbaa !36
  store i32 %445, ptr %45, align 4, !tbaa !31
  br label %450

446:                                              ; preds = %439, %434
  %447 = landingpad { ptr, i32 }
          cleanup
  %448 = extractvalue { ptr, i32 } %447, 0
  store ptr %448, ptr %10, align 8
  %449 = extractvalue { ptr, i32 } %447, 1
  store i32 %449, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #9
  br label %540

450:                                              ; preds = %443, %430, %420
  %451 = load i32, ptr %45, align 4, !tbaa !31
  %452 = load i32, ptr %42, align 4, !tbaa !31
  %453 = mul i32 %452, 2
  %454 = load i32, ptr %41, align 4, !tbaa !31
  %455 = mul i32 %454, 4
  %456 = add i32 %453, %455
  %457 = shl i32 %451, %456
  %458 = load i32, ptr %40, align 4, !tbaa !31
  %459 = or i32 %458, %457
  store i32 %459, ptr %40, align 4, !tbaa !31
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #9
  br label %460

460:                                              ; preds = %450
  %461 = load i32, ptr %42, align 4, !tbaa !31
  %462 = add i32 %461, 1
  store i32 %462, ptr %42, align 4, !tbaa !31
  br label %416, !llvm.loop !45

463:                                              ; preds = %419
  br label %464

464:                                              ; preds = %463
  %465 = load i32, ptr %41, align 4, !tbaa !31
  %466 = add i32 %465, 1
  store i32 %466, ptr %41, align 4, !tbaa !31
  br label %407, !llvm.loop !46

467:                                              ; preds = %410
  %468 = load i32, ptr %40, align 4, !tbaa !31
  %469 = load i32, ptr %29, align 4, !tbaa !31
  %470 = icmp eq i32 %468, %469
  br i1 %470, label %471, label %474

471:                                              ; preds = %467
  %472 = load i32, ptr %30, align 4, !tbaa !31
  %473 = add nsw i32 %472, 1
  store i32 %473, ptr %30, align 4, !tbaa !31
  br label %539

474:                                              ; preds = %467
  %475 = load i32, ptr %30, align 4, !tbaa !31
  %476 = icmp sgt i32 %475, 0
  br i1 %476, label %477, label %530

477:                                              ; preds = %474
  %478 = load i32, ptr %30, align 4, !tbaa !31
  %479 = icmp sgt i32 %478, 3
  br i1 %479, label %480, label %501

480:                                              ; preds = %477
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %18, i32 noundef 256)
          to label %481 unwind label %493

481:                                              ; preds = %480
  %482 = load i32, ptr %23, align 4, !tbaa !31
  %483 = zext i32 %482 to i64
  %484 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %19, i64 noundef %483)
          to label %485 unwind label %493

485:                                              ; preds = %481
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %484, ptr noundef nonnull align 4 dereferenceable(4) @_ZN6basistL32ENDPOINT_PRED_REPEAT_LAST_SYMBOLE)
          to label %486 unwind label %493

486:                                              ; preds = %485
  %487 = load i32, ptr %23, align 4, !tbaa !31
  %488 = zext i32 %487 to i64
  %489 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %19, i64 noundef %488)
          to label %490 unwind label %493

490:                                              ; preds = %486
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #9
  %491 = load i32, ptr %30, align 4, !tbaa !31
  store i32 %491, ptr %46, align 4, !tbaa !31
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %489, ptr noundef nonnull align 4 dereferenceable(4) %46)
          to label %492 unwind label %497

492:                                              ; preds = %490
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #9
  br label %529

493:                                              ; preds = %536, %532, %530, %486, %485, %481, %480
  %494 = landingpad { ptr, i32 }
          cleanup
  %495 = extractvalue { ptr, i32 } %494, 0
  store ptr %495, ptr %10, align 8
  %496 = extractvalue { ptr, i32 } %494, 1
  store i32 %496, ptr %11, align 4
  br label %540

497:                                              ; preds = %490
  %498 = landingpad { ptr, i32 }
          cleanup
  %499 = extractvalue { ptr, i32 } %498, 0
  store ptr %499, ptr %10, align 8
  %500 = extractvalue { ptr, i32 } %498, 1
  store i32 %500, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #9
  br label %540

501:                                              ; preds = %477
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #9
  store i32 0, ptr %47, align 4, !tbaa !31
  br label %502

502:                                              ; preds = %516, %501
  %503 = load i32, ptr %47, align 4, !tbaa !31
  %504 = load i32, ptr %30, align 4, !tbaa !31
  %505 = icmp slt i32 %503, %504
  br i1 %505, label %507, label %506

506:                                              ; preds = %502
  store i32 23, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #9
  br label %528

507:                                              ; preds = %502
  %508 = load i32, ptr %29, align 4, !tbaa !31
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %18, i32 noundef %508)
          to label %509 unwind label %519

509:                                              ; preds = %507
  %510 = load i32, ptr %23, align 4, !tbaa !31
  %511 = zext i32 %510 to i64
  %512 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %19, i64 noundef %511)
          to label %513 unwind label %519

513:                                              ; preds = %509
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #9
  %514 = load i32, ptr %29, align 4, !tbaa !31
  store i32 %514, ptr %48, align 4, !tbaa !31
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %512, ptr noundef nonnull align 4 dereferenceable(4) %48)
          to label %515 unwind label %523

515:                                              ; preds = %513
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #9
  br label %516

516:                                              ; preds = %515
  %517 = load i32, ptr %47, align 4, !tbaa !31
  %518 = add nsw i32 %517, 1
  store i32 %518, ptr %47, align 4, !tbaa !31
  br label %502, !llvm.loop !47

519:                                              ; preds = %509, %507
  %520 = landingpad { ptr, i32 }
          cleanup
  %521 = extractvalue { ptr, i32 } %520, 0
  store ptr %521, ptr %10, align 8
  %522 = extractvalue { ptr, i32 } %520, 1
  store i32 %522, ptr %11, align 4
  br label %527

523:                                              ; preds = %513
  %524 = landingpad { ptr, i32 }
          cleanup
  %525 = extractvalue { ptr, i32 } %524, 0
  store ptr %525, ptr %10, align 8
  %526 = extractvalue { ptr, i32 } %524, 1
  store i32 %526, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #9
  br label %527

527:                                              ; preds = %523, %519
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #9
  br label %540

528:                                              ; preds = %506
  br label %529

529:                                              ; preds = %528, %492
  store i32 0, ptr %30, align 4, !tbaa !31
  br label %530

530:                                              ; preds = %529, %474
  %531 = load i32, ptr %40, align 4, !tbaa !31
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %18, i32 noundef %531)
          to label %532 unwind label %493

532:                                              ; preds = %530
  %533 = load i32, ptr %23, align 4, !tbaa !31
  %534 = zext i32 %533 to i64
  %535 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %19, i64 noundef %534)
          to label %536 unwind label %493

536:                                              ; preds = %532
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %535, ptr noundef nonnull align 4 dereferenceable(4) %40)
          to label %537 unwind label %493

537:                                              ; preds = %536
  %538 = load i32, ptr %40, align 4, !tbaa !31
  store i32 %538, ptr %29, align 4, !tbaa !31
  br label %539

539:                                              ; preds = %537, %471
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #9
  br label %541

540:                                              ; preds = %527, %497, %493, %446
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #9
  br label %1352

541:                                              ; preds = %539, %402, %398
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #9
  %542 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 9
  %543 = load ptr, ptr %39, align 8, !tbaa !5
  %544 = getelementptr inbounds %"struct.basisu::encoder_block", ptr %543, i32 0, i32 1
  %545 = load i32, ptr %544, align 4, !tbaa !48
  %546 = sext i32 %545 to i64
  %547 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %542, i64 noundef %546)
          to label %548 unwind label %620

548:                                              ; preds = %541
  %549 = load i32, ptr %547, align 4, !tbaa !31
  store i32 %549, ptr %49, align 4, !tbaa !31
  %550 = load ptr, ptr %39, align 8, !tbaa !5
  %551 = getelementptr inbounds %"struct.basisu::encoder_block", ptr %550, i32 0, i32 0
  %552 = load i32, ptr %551, align 4, !tbaa !36
  %553 = icmp eq i32 %552, 3
  br i1 %553, label %554, label %786

554:                                              ; preds = %548
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #9
  %555 = load i32, ptr %49, align 4, !tbaa !31
  %556 = load i32, ptr %31, align 4, !tbaa !31
  %557 = sub i32 %555, %556
  store i32 %557, ptr %50, align 4, !tbaa !31
  %558 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 1
  %559 = getelementptr inbounds %"struct.basisu::basisu_backend_params", ptr %558, i32 0, i32 4
  %560 = load float, ptr %559, align 4, !tbaa !49
  %561 = fcmp ogt float %560, 1.000000e+00
  br i1 %561, label %562, label %773

562:                                              ; preds = %554
  %563 = load i32, ptr %50, align 4, !tbaa !31
  %564 = invoke noundef i32 @_ZN6basisu4iabsEi(i32 noundef %563)
          to label %565 unwind label %624

565:                                              ; preds = %562
  %566 = icmp ugt i32 %564, 1
  br i1 %566, label %567, label %773

567:                                              ; preds = %565
  %568 = load i32, ptr %37, align 4, !tbaa !31
  %569 = load i32, ptr %36, align 4, !tbaa !31
  %570 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu8vector2DIhEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %32, i32 noundef %568, i32 noundef %569)
          to label %571 unwind label %624

571:                                              ; preds = %567
  %572 = load i8, ptr %570, align 1, !tbaa !38
  %573 = icmp ne i8 %572, 0
  br i1 %573, label %773, label %574

574:                                              ; preds = %571
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #9
  %575 = load ptr, ptr %4, align 8, !tbaa !5
  %576 = load i32, ptr %38, align 4, !tbaa !31
  %577 = invoke noundef nonnull align 1 dereferenceable(64) ptr @_ZNK6basisu15basisu_frontend22get_source_pixel_blockEj(ptr noundef nonnull align 8 dereferenceable(496) %575, i32 noundef %576)
          to label %578 unwind label %628

578:                                              ; preds = %574
  store ptr %577, ptr %51, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #9
  %579 = load ptr, ptr %4, align 8, !tbaa !5
  %580 = load i32, ptr %38, align 4, !tbaa !31
  %581 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6basisu15basisu_frontend16get_output_blockEj(ptr noundef nonnull align 8 dereferenceable(496) %579, i32 noundef %580)
          to label %582 unwind label %632

582:                                              ; preds = %578
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %52, ptr align 8 %581, i64 8, i1 false), !tbaa.struct !50
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #9
  %583 = load ptr, ptr %51, align 8, !tbaa !5
  %584 = invoke noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %583)
          to label %585 unwind label %636

585:                                              ; preds = %582
  %586 = load ptr, ptr %4, align 8, !tbaa !5
  %587 = invoke noundef nonnull align 8 dereferenceable(88) ptr @_ZNK6basisu15basisu_frontend10get_paramsEv(ptr noundef nonnull align 8 dereferenceable(496) %586)
          to label %588 unwind label %636

588:                                              ; preds = %585
  %589 = getelementptr inbounds %"struct.basisu::basisu_frontend::params", ptr %587, i32 0, i32 5
  %590 = load i8, ptr %589, align 4, !tbaa !51, !range !39, !noundef !40
  %591 = trunc i8 %590 to i1
  %592 = invoke noundef i64 @_ZNK6basisu9etc_block19evaluate_etc1_errorEPKNS_10color_rgbaEbi(ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef %584, i1 noundef zeroext %591, i32 noundef -1)
          to label %593 unwind label %636

593:                                              ; preds = %588
  store i64 %592, ptr %53, align 8, !tbaa !52
  %594 = load i64, ptr %53, align 8, !tbaa !52
  %595 = icmp ne i64 %594, 0
  br i1 %595, label %596, label %769

596:                                              ; preds = %593
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #9
  %597 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 1
  %598 = getelementptr inbounds %"struct.basisu::basisu_backend_params", ptr %597, i32 0, i32 4
  %599 = load float, ptr %598, align 4, !tbaa !49
  %600 = invoke noundef float @_ZN6basisu7maximumIfEET_S1_S1_(float noundef 1.000000e+00, float noundef %599)
          to label %601 unwind label %640

601:                                              ; preds = %596
  store float %600, ptr %54, align 4, !tbaa !54
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #9
  %602 = load i64, ptr %53, align 8, !tbaa !52
  %603 = uitofp i64 %602 to float
  %604 = load float, ptr %54, align 4, !tbaa !54
  %605 = fmul float %603, %604
  %606 = fptoui float %605 to i64
  store i64 %606, ptr %55, align 8, !tbaa !52
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #9
  store i64 -1, ptr %56, align 8, !tbaa !52
  call void @llvm.lifetime.start.p0(i64 4, ptr %57) #9
  store i32 0, ptr %57, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %58, ptr align 8 %52, i64 8, i1 false), !tbaa.struct !50
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #9
  store i32 32, ptr %59, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %60) #9
  %607 = load i32, ptr %50, align 4, !tbaa !31
  %608 = invoke noundef i32 @_ZN6basisu4iabsEi(i32 noundef %607)
          to label %609 unwind label %644

609:                                              ; preds = %601
  %610 = sub i32 %608, 1
  %611 = invoke noundef i32 @_ZN6basisu7minimumIiEET_S1_S1_(i32 noundef %610, i32 noundef 32)
          to label %612 unwind label %644

612:                                              ; preds = %609
  store i32 %611, ptr %60, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %61) #9
  %613 = load i32, ptr %60, align 4, !tbaa !31
  %614 = sub nsw i32 0, %613
  store i32 %614, ptr %61, align 4, !tbaa !31
  br label %615

615:                                              ; preds = %743, %612
  %616 = load i32, ptr %61, align 4, !tbaa !31
  %617 = load i32, ptr %60, align 4, !tbaa !31
  %618 = icmp slt i32 %616, %617
  br i1 %618, label %648, label %619

619:                                              ; preds = %615
  store i32 26, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %61) #9
  br label %748

620:                                              ; preds = %791, %786, %541
  %621 = landingpad { ptr, i32 }
          cleanup
  %622 = extractvalue { ptr, i32 } %621, 0
  store ptr %622, ptr %10, align 8
  %623 = extractvalue { ptr, i32 } %621, 1
  store i32 %623, ptr %11, align 4
  br label %1351

624:                                              ; preds = %782, %776, %567, %562
  %625 = landingpad { ptr, i32 }
          cleanup
  %626 = extractvalue { ptr, i32 } %625, 0
  store ptr %626, ptr %10, align 8
  %627 = extractvalue { ptr, i32 } %625, 1
  store i32 %627, ptr %11, align 4
  br label %785

628:                                              ; preds = %574
  %629 = landingpad { ptr, i32 }
          cleanup
  %630 = extractvalue { ptr, i32 } %629, 0
  store ptr %630, ptr %10, align 8
  %631 = extractvalue { ptr, i32 } %629, 1
  store i32 %631, ptr %11, align 4
  br label %772

632:                                              ; preds = %578
  %633 = landingpad { ptr, i32 }
          cleanup
  %634 = extractvalue { ptr, i32 } %633, 0
  store ptr %634, ptr %10, align 8
  %635 = extractvalue { ptr, i32 } %633, 1
  store i32 %635, ptr %11, align 4
  br label %771

636:                                              ; preds = %588, %585, %582
  %637 = landingpad { ptr, i32 }
          cleanup
  %638 = extractvalue { ptr, i32 } %637, 0
  store ptr %638, ptr %10, align 8
  %639 = extractvalue { ptr, i32 } %637, 1
  store i32 %639, ptr %11, align 4
  br label %770

640:                                              ; preds = %596
  %641 = landingpad { ptr, i32 }
          cleanup
  %642 = extractvalue { ptr, i32 } %641, 0
  store ptr %642, ptr %10, align 8
  %643 = extractvalue { ptr, i32 } %641, 1
  store i32 %643, ptr %11, align 4
  br label %768

644:                                              ; preds = %751, %609, %601
  %645 = landingpad { ptr, i32 }
          cleanup
  %646 = extractvalue { ptr, i32 } %645, 0
  store ptr %646, ptr %10, align 8
  %647 = extractvalue { ptr, i32 } %645, 1
  store i32 %647, ptr %11, align 4
  br label %767

648:                                              ; preds = %615
  call void @llvm.lifetime.start.p0(i64 4, ptr %62) #9
  %649 = load i32, ptr %31, align 4, !tbaa !31
  %650 = load i32, ptr %61, align 4, !tbaa !31
  %651 = add i32 %649, %650
  store i32 %651, ptr %62, align 4, !tbaa !31
  %652 = load i32, ptr %62, align 4, !tbaa !31
  %653 = icmp slt i32 %652, 0
  br i1 %653, label %654, label %664

654:                                              ; preds = %648
  %655 = load ptr, ptr %4, align 8, !tbaa !5
  %656 = invoke noundef i32 @_ZNK6basisu15basisu_frontend27get_total_endpoint_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %655)
          to label %657 unwind label %660

657:                                              ; preds = %654
  %658 = load i32, ptr %62, align 4, !tbaa !31
  %659 = add nsw i32 %658, %656
  store i32 %659, ptr %62, align 4, !tbaa !31
  br label %677

660:                                              ; preds = %682, %670, %664, %654
  %661 = landingpad { ptr, i32 }
          cleanup
  %662 = extractvalue { ptr, i32 } %661, 0
  store ptr %662, ptr %10, align 8
  %663 = extractvalue { ptr, i32 } %661, 1
  store i32 %663, ptr %11, align 4
  br label %747

664:                                              ; preds = %648
  %665 = load i32, ptr %62, align 4, !tbaa !31
  %666 = load ptr, ptr %4, align 8, !tbaa !5
  %667 = invoke noundef i32 @_ZNK6basisu15basisu_frontend27get_total_endpoint_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %666)
          to label %668 unwind label %660

668:                                              ; preds = %664
  %669 = icmp sge i32 %665, %667
  br i1 %669, label %670, label %676

670:                                              ; preds = %668
  %671 = load ptr, ptr %4, align 8, !tbaa !5
  %672 = invoke noundef i32 @_ZNK6basisu15basisu_frontend27get_total_endpoint_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %671)
          to label %673 unwind label %660

673:                                              ; preds = %670
  %674 = load i32, ptr %62, align 4, !tbaa !31
  %675 = sub nsw i32 %674, %672
  store i32 %675, ptr %62, align 4, !tbaa !31
  br label %676

676:                                              ; preds = %673, %668
  br label %677

677:                                              ; preds = %676, %657
  %678 = load i32, ptr %62, align 4, !tbaa !31
  %679 = load i32, ptr %49, align 4, !tbaa !31
  %680 = icmp eq i32 %678, %679
  br i1 %680, label %681, label %682

681:                                              ; preds = %677
  store i32 28, ptr %24, align 4
  br label %740

682:                                              ; preds = %677
  %683 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 12
  %684 = load i32, ptr %62, align 4, !tbaa !31
  %685 = sext i32 %684 to i64
  %686 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIbEixEm(ptr noundef nonnull align 8 dereferenceable(16) %683, i64 noundef %685)
          to label %687 unwind label %660

687:                                              ; preds = %682
  %688 = load i8, ptr %686, align 1, !tbaa !30, !range !39, !noundef !40
  %689 = trunc i8 %688 to i1
  br i1 %689, label %691, label %690

690:                                              ; preds = %687
  store i32 28, ptr %24, align 4
  br label %740

691:                                              ; preds = %687
  call void @llvm.lifetime.start.p0(i64 8, ptr %63) #9
  %692 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 5
  %693 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 10
  %694 = load i32, ptr %62, align 4, !tbaa !31
  %695 = sext i32 %694 to i64
  %696 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %693, i64 noundef %695)
          to label %697 unwind label %730

697:                                              ; preds = %691
  %698 = load i32, ptr %696, align 4, !tbaa !31
  %699 = zext i32 %698 to i64
  %700 = invoke noundef nonnull align 4 dereferenceable(9) ptr @_ZN6basisu6vectorINS_27etc1_endpoint_palette_entryEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %692, i64 noundef %699)
          to label %701 unwind label %730

701:                                              ; preds = %697
  store ptr %700, ptr %63, align 8, !tbaa !5
  %702 = load ptr, ptr %63, align 8, !tbaa !5
  %703 = getelementptr inbounds %"struct.basisu::etc1_endpoint_palette_entry", ptr %702, i32 0, i32 0
  invoke void @_ZN6basisu9etc_block22set_block_color5_etc1sERKNS_10color_rgbaE(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull align 1 dereferenceable(4) %703)
          to label %704 unwind label %730

704:                                              ; preds = %701
  %705 = load ptr, ptr %63, align 8, !tbaa !5
  %706 = getelementptr inbounds %"struct.basisu::etc1_endpoint_palette_entry", ptr %705, i32 0, i32 1
  %707 = load i32, ptr %706, align 4, !tbaa !55
  invoke void @_ZN6basisu9etc_block22set_inten_tables_etc1sEj(ptr noundef nonnull align 8 dereferenceable(8) %58, i32 noundef %707)
          to label %708 unwind label %730

708:                                              ; preds = %704
  call void @llvm.lifetime.start.p0(i64 8, ptr %64) #9
  %709 = load ptr, ptr %51, align 8, !tbaa !5
  %710 = invoke noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %709)
          to label %711 unwind label %734

711:                                              ; preds = %708
  %712 = load ptr, ptr %4, align 8, !tbaa !5
  %713 = invoke noundef nonnull align 8 dereferenceable(88) ptr @_ZNK6basisu15basisu_frontend10get_paramsEv(ptr noundef nonnull align 8 dereferenceable(496) %712)
          to label %714 unwind label %734

714:                                              ; preds = %711
  %715 = getelementptr inbounds %"struct.basisu::basisu_frontend::params", ptr %713, i32 0, i32 5
  %716 = load i8, ptr %715, align 4, !tbaa !51, !range !39, !noundef !40
  %717 = trunc i8 %716 to i1
  %718 = invoke noundef i64 @_ZNK6basisu9etc_block19evaluate_etc1_errorEPKNS_10color_rgbaEbi(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef %710, i1 noundef zeroext %717, i32 noundef -1)
          to label %719 unwind label %734

719:                                              ; preds = %714
  store i64 %718, ptr %64, align 8, !tbaa !52
  %720 = load i64, ptr %64, align 8, !tbaa !52
  %721 = load i64, ptr %55, align 8, !tbaa !52
  %722 = icmp ule i64 %720, %721
  br i1 %722, label %723, label %739

723:                                              ; preds = %719
  %724 = load i64, ptr %64, align 8, !tbaa !52
  %725 = load i64, ptr %56, align 8, !tbaa !52
  %726 = icmp ult i64 %724, %725
  br i1 %726, label %727, label %738

727:                                              ; preds = %723
  %728 = load i64, ptr %64, align 8, !tbaa !52
  store i64 %728, ptr %56, align 8, !tbaa !52
  %729 = load i32, ptr %62, align 4, !tbaa !31
  store i32 %729, ptr %57, align 4, !tbaa !31
  br label %738

730:                                              ; preds = %704, %701, %697, %691
  %731 = landingpad { ptr, i32 }
          cleanup
  %732 = extractvalue { ptr, i32 } %731, 0
  store ptr %732, ptr %10, align 8
  %733 = extractvalue { ptr, i32 } %731, 1
  store i32 %733, ptr %11, align 4
  br label %746

734:                                              ; preds = %714, %711, %708
  %735 = landingpad { ptr, i32 }
          cleanup
  %736 = extractvalue { ptr, i32 } %735, 0
  store ptr %736, ptr %10, align 8
  %737 = extractvalue { ptr, i32 } %735, 1
  store i32 %737, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #9
  br label %746

738:                                              ; preds = %727, %723
  br label %739

739:                                              ; preds = %738, %719
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #9
  store i32 0, ptr %24, align 4
  br label %740

740:                                              ; preds = %739, %690, %681
  call void @llvm.lifetime.end.p0(i64 4, ptr %62) #9
  %741 = load i32, ptr %24, align 4
  switch i32 %741, label %2232 [
    i32 0, label %742
    i32 28, label %743
  ]

742:                                              ; preds = %740
  br label %743

743:                                              ; preds = %742, %740
  %744 = load i32, ptr %61, align 4, !tbaa !31
  %745 = add nsw i32 %744, 1
  store i32 %745, ptr %61, align 4, !tbaa !31
  br label %615, !llvm.loop !58

746:                                              ; preds = %734, %730
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #9
  br label %747

747:                                              ; preds = %746, %660
  call void @llvm.lifetime.end.p0(i64 4, ptr %62) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %61) #9
  br label %767

748:                                              ; preds = %619
  %749 = load i64, ptr %56, align 8, !tbaa !52
  %750 = icmp ne i64 %749, -1
  br i1 %750, label %751, label %766

751:                                              ; preds = %748
  %752 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 10
  %753 = load i32, ptr %57, align 4, !tbaa !31
  %754 = sext i32 %753 to i64
  %755 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %752, i64 noundef %754)
          to label %756 unwind label %644

756:                                              ; preds = %751
  %757 = load i32, ptr %755, align 4, !tbaa !31
  %758 = load ptr, ptr %39, align 8, !tbaa !5
  %759 = getelementptr inbounds %"struct.basisu::encoder_block", ptr %758, i32 0, i32 1
  store i32 %757, ptr %759, align 4, !tbaa !48
  %760 = load i32, ptr %57, align 4, !tbaa !31
  store i32 %760, ptr %49, align 4, !tbaa !31
  %761 = load i32, ptr %49, align 4, !tbaa !31
  %762 = load i32, ptr %31, align 4, !tbaa !31
  %763 = sub i32 %761, %762
  store i32 %763, ptr %50, align 4, !tbaa !31
  %764 = load i32, ptr %20, align 4, !tbaa !31
  %765 = add i32 %764, 1
  store i32 %765, ptr %20, align 4, !tbaa !31
  br label %766

766:                                              ; preds = %756, %748
  call void @llvm.lifetime.end.p0(i64 4, ptr %60) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %57) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #9
  br label %769

767:                                              ; preds = %747, %644
  call void @llvm.lifetime.end.p0(i64 4, ptr %60) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %57) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #9
  br label %768

768:                                              ; preds = %767, %640
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #9
  br label %770

769:                                              ; preds = %766, %593
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #9
  br label %773

770:                                              ; preds = %768, %636
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #9
  br label %771

771:                                              ; preds = %770, %632
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #9
  br label %772

772:                                              ; preds = %771, %628
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #9
  br label %785

773:                                              ; preds = %769, %571, %565, %554
  %774 = load i32, ptr %50, align 4, !tbaa !31
  %775 = icmp slt i32 %774, 0
  br i1 %775, label %776, label %782

776:                                              ; preds = %773
  %777 = load ptr, ptr %4, align 8, !tbaa !5
  %778 = invoke noundef i32 @_ZNK6basisu15basisu_frontend27get_total_endpoint_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %777)
          to label %779 unwind label %624

779:                                              ; preds = %776
  %780 = load i32, ptr %50, align 4, !tbaa !31
  %781 = add nsw i32 %780, %778
  store i32 %781, ptr %50, align 4, !tbaa !31
  br label %782

782:                                              ; preds = %779, %773
  %783 = load i32, ptr %50, align 4, !tbaa !31
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %17, i32 noundef %783)
          to label %784 unwind label %624

784:                                              ; preds = %782
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #9
  br label %786

785:                                              ; preds = %772, %624
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #9
  br label %1351

786:                                              ; preds = %784, %548
  %787 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 10
  %788 = load i32, ptr %49, align 4, !tbaa !31
  %789 = sext i32 %788 to i64
  %790 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %787, i64 noundef %789)
          to label %791 unwind label %620

791:                                              ; preds = %786
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 4 dereferenceable(4) %790)
          to label %792 unwind label %620

792:                                              ; preds = %791
  %793 = load i32, ptr %49, align 4, !tbaa !31
  store i32 %793, ptr %31, align 4, !tbaa !31
  %794 = load i8, ptr %5, align 1, !tbaa !30, !range !39, !noundef !40
  %795 = trunc i8 %794 to i1
  br i1 %795, label %796, label %801

796:                                              ; preds = %792
  %797 = load ptr, ptr %39, align 8, !tbaa !5
  %798 = getelementptr inbounds %"struct.basisu::encoder_block", ptr %797, i32 0, i32 0
  %799 = load i32, ptr %798, align 4, !tbaa !36
  %800 = icmp ne i32 %799, 2
  br i1 %800, label %801, label %1339

801:                                              ; preds = %796, %792
  call void @llvm.lifetime.start.p0(i64 4, ptr %65) #9
  %802 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 13
  %803 = load ptr, ptr %39, align 8, !tbaa !5
  %804 = getelementptr inbounds %"struct.basisu::encoder_block", ptr %803, i32 0, i32 2
  %805 = load i32, ptr %804, align 4, !tbaa !59
  %806 = sext i32 %805 to i64
  %807 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %802, i64 noundef %806)
          to label %808 unwind label %821

808:                                              ; preds = %801
  %809 = load i32, ptr %807, align 4, !tbaa !31
  store i32 %809, ptr %65, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %66) #9
  store i32 -1, ptr %66, align 4, !tbaa !31
  %810 = load ptr, ptr %39, align 8, !tbaa !5
  %811 = getelementptr inbounds %"struct.basisu::encoder_block", ptr %810, i32 0, i32 4
  %812 = load i8, ptr %811, align 4, !tbaa !41, !range !39, !noundef !40
  %813 = trunc i8 %812 to i1
  br i1 %813, label %814, label %856

814:                                              ; preds = %808
  call void @llvm.lifetime.start.p0(i64 4, ptr %67) #9
  store i32 0, ptr %67, align 4, !tbaa !31
  br label %815

815:                                              ; preds = %850, %814
  %816 = load i32, ptr %67, align 4, !tbaa !31
  %817 = invoke noundef i32 @_ZNK6basist20approx_move_to_front4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %8)
          to label %818 unwind label %825

818:                                              ; preds = %815
  %819 = icmp ult i32 %816, %817
  br i1 %819, label %829, label %820

820:                                              ; preds = %818
  store i32 29, ptr %24, align 4
  br label %853

821:                                              ; preds = %801
  %822 = landingpad { ptr, i32 }
          cleanup
  %823 = extractvalue { ptr, i32 } %822, 0
  store ptr %823, ptr %10, align 8
  %824 = extractvalue { ptr, i32 } %822, 1
  store i32 %824, ptr %11, align 4
  br label %1338

825:                                              ; preds = %815
  %826 = landingpad { ptr, i32 }
          cleanup
  %827 = extractvalue { ptr, i32 } %826, 0
  store ptr %827, ptr %10, align 8
  %828 = extractvalue { ptr, i32 } %826, 1
  store i32 %828, ptr %11, align 4
  br label %854

829:                                              ; preds = %818
  call void @llvm.lifetime.start.p0(i64 4, ptr %68) #9
  %830 = load i32, ptr %67, align 4, !tbaa !31
  %831 = invoke noundef i32 @_ZN6basist20approx_move_to_frontixEj(ptr noundef nonnull align 8 dereferenceable(20) %8, i32 noundef %830)
          to label %832 unwind label %842

832:                                              ; preds = %829
  store i32 %831, ptr %68, align 4, !tbaa !31
  %833 = load i32, ptr %68, align 4, !tbaa !31
  %834 = load i32, ptr %65, align 4, !tbaa !31
  %835 = icmp eq i32 %833, %834
  br i1 %835, label %836, label %846

836:                                              ; preds = %832
  %837 = load i32, ptr %6, align 4, !tbaa !31
  %838 = add i32 %837, 1
  store i32 %838, ptr %6, align 4, !tbaa !31
  %839 = load i32, ptr %67, align 4, !tbaa !31
  store i32 %839, ptr %66, align 4, !tbaa !31
  %840 = load i32, ptr %67, align 4, !tbaa !31
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef %840)
          to label %841 unwind label %842

841:                                              ; preds = %836
  store i32 29, ptr %24, align 4
  br label %847

842:                                              ; preds = %836, %829
  %843 = landingpad { ptr, i32 }
          cleanup
  %844 = extractvalue { ptr, i32 } %843, 0
  store ptr %844, ptr %10, align 8
  %845 = extractvalue { ptr, i32 } %843, 1
  store i32 %845, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %68) #9
  br label %854

846:                                              ; preds = %832
  store i32 0, ptr %24, align 4
  br label %847

847:                                              ; preds = %846, %841
  call void @llvm.lifetime.end.p0(i64 4, ptr %68) #9
  %848 = load i32, ptr %24, align 4
  switch i32 %848, label %853 [
    i32 0, label %849
  ]

849:                                              ; preds = %847
  br label %850

850:                                              ; preds = %849
  %851 = load i32, ptr %67, align 4, !tbaa !31
  %852 = add i32 %851, 1
  store i32 %852, ptr %67, align 4, !tbaa !31
  br label %815, !llvm.loop !60

853:                                              ; preds = %847, %820
  call void @llvm.lifetime.end.p0(i64 4, ptr %67) #9
  br label %855

854:                                              ; preds = %842, %825
  call void @llvm.lifetime.end.p0(i64 4, ptr %67) #9
  br label %1337

855:                                              ; preds = %853
  br label %1203

856:                                              ; preds = %808
  call void @llvm.lifetime.start.p0(i64 8, ptr %69) #9
  %857 = load ptr, ptr %4, align 8, !tbaa !5
  %858 = load i32, ptr %38, align 4, !tbaa !31
  %859 = invoke noundef nonnull align 1 dereferenceable(64) ptr @_ZNK6basisu15basisu_frontend22get_source_pixel_blockEj(ptr noundef nonnull align 8 dereferenceable(496) %857, i32 noundef %858)
          to label %860 unwind label %888

860:                                              ; preds = %856
  store ptr %859, ptr %69, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %70) #9
  %861 = load ptr, ptr %4, align 8, !tbaa !5
  %862 = load i32, ptr %38, align 4, !tbaa !31
  %863 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6basisu15basisu_frontend16get_output_blockEj(ptr noundef nonnull align 8 dereferenceable(496) %861, i32 noundef %862)
          to label %864 unwind label %892

864:                                              ; preds = %860
  store ptr %863, ptr %70, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr %71) #9
  %865 = getelementptr inbounds [16 x %"class.basisu::color_rgba"], ptr %71, i32 0, i32 0
  %866 = getelementptr inbounds %"class.basisu::color_rgba", ptr %865, i64 16
  br label %867

867:                                              ; preds = %869, %864
  %868 = phi ptr [ %865, %864 ], [ %870, %869 ]
  invoke void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %868)
          to label %869 unwind label %896

869:                                              ; preds = %867
  %870 = getelementptr inbounds %"class.basisu::color_rgba", ptr %868, i64 1
  %871 = icmp eq ptr %870, %866
  br i1 %871, label %872, label %867

872:                                              ; preds = %869
  %873 = load ptr, ptr %70, align 8, !tbaa !5
  %874 = getelementptr inbounds [16 x %"class.basisu::color_rgba"], ptr %71, i64 0, i64 0
  %875 = invoke noundef zeroext i1 @_ZN6basisu11unpack_etc1ERKNS_9etc_blockEPNS_10color_rgbaEb(ptr noundef nonnull align 8 dereferenceable(8) %873, ptr noundef %874, i1 noundef zeroext false)
          to label %876 unwind label %896

876:                                              ; preds = %872
  call void @llvm.lifetime.start.p0(i64 8, ptr %72) #9
  store i64 0, ptr %72, align 8, !tbaa !52
  %877 = load ptr, ptr %4, align 8, !tbaa !5
  %878 = invoke noundef nonnull align 8 dereferenceable(88) ptr @_ZNK6basisu15basisu_frontend10get_paramsEv(ptr noundef nonnull align 8 dereferenceable(496) %877)
          to label %879 unwind label %900

879:                                              ; preds = %876
  %880 = getelementptr inbounds %"struct.basisu::basisu_frontend::params", ptr %878, i32 0, i32 5
  %881 = load i8, ptr %880, align 4, !tbaa !51, !range !39, !noundef !40
  %882 = trunc i8 %881 to i1
  br i1 %882, label %883, label %927

883:                                              ; preds = %879
  call void @llvm.lifetime.start.p0(i64 4, ptr %73) #9
  store i32 0, ptr %73, align 4, !tbaa !31
  br label %884

884:                                              ; preds = %919, %883
  %885 = load i32, ptr %73, align 4, !tbaa !31
  %886 = icmp ult i32 %885, 16
  br i1 %886, label %904, label %887

887:                                              ; preds = %884
  store i32 32, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %73) #9
  br label %926

888:                                              ; preds = %856
  %889 = landingpad { ptr, i32 }
          cleanup
  %890 = extractvalue { ptr, i32 } %889, 0
  store ptr %890, ptr %10, align 8
  %891 = extractvalue { ptr, i32 } %889, 1
  store i32 %891, ptr %11, align 4
  br label %1202

892:                                              ; preds = %860
  %893 = landingpad { ptr, i32 }
          cleanup
  %894 = extractvalue { ptr, i32 } %893, 0
  store ptr %894, ptr %10, align 8
  %895 = extractvalue { ptr, i32 } %893, 1
  store i32 %895, ptr %11, align 4
  br label %1201

896:                                              ; preds = %872, %867
  %897 = landingpad { ptr, i32 }
          cleanup
  %898 = extractvalue { ptr, i32 } %897, 0
  store ptr %898, ptr %10, align 8
  %899 = extractvalue { ptr, i32 } %897, 1
  store i32 %899, ptr %11, align 4
  br label %1200

900:                                              ; preds = %876
  %901 = landingpad { ptr, i32 }
          cleanup
  %902 = extractvalue { ptr, i32 } %901, 0
  store ptr %902, ptr %10, align 8
  %903 = extractvalue { ptr, i32 } %901, 1
  store i32 %903, ptr %11, align 4
  br label %1199

904:                                              ; preds = %884
  %905 = load ptr, ptr %69, align 8, !tbaa !5
  %906 = invoke noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %905)
          to label %907 unwind label %922

907:                                              ; preds = %904
  %908 = load i32, ptr %73, align 4, !tbaa !31
  %909 = zext i32 %908 to i64
  %910 = getelementptr inbounds %"class.basisu::color_rgba", ptr %906, i64 %909
  %911 = load i32, ptr %73, align 4, !tbaa !31
  %912 = zext i32 %911 to i64
  %913 = getelementptr inbounds [16 x %"class.basisu::color_rgba"], ptr %71, i64 0, i64 %912
  %914 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext true, ptr noundef nonnull align 1 dereferenceable(4) %910, ptr noundef nonnull align 1 dereferenceable(4) %913, i1 noundef zeroext false)
          to label %915 unwind label %922

915:                                              ; preds = %907
  %916 = zext i32 %914 to i64
  %917 = load i64, ptr %72, align 8, !tbaa !52
  %918 = add i64 %917, %916
  store i64 %918, ptr %72, align 8, !tbaa !52
  br label %919

919:                                              ; preds = %915
  %920 = load i32, ptr %73, align 4, !tbaa !31
  %921 = add i32 %920, 1
  store i32 %921, ptr %73, align 4, !tbaa !31
  br label %884, !llvm.loop !61

922:                                              ; preds = %907, %904
  %923 = landingpad { ptr, i32 }
          cleanup
  %924 = extractvalue { ptr, i32 } %923, 0
  store ptr %924, ptr %10, align 8
  %925 = extractvalue { ptr, i32 } %923, 1
  store i32 %925, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %73) #9
  br label %1199

926:                                              ; preds = %887
  br label %955

927:                                              ; preds = %879
  call void @llvm.lifetime.start.p0(i64 4, ptr %74) #9
  store i32 0, ptr %74, align 4, !tbaa !31
  br label %928

928:                                              ; preds = %947, %927
  %929 = load i32, ptr %74, align 4, !tbaa !31
  %930 = icmp ult i32 %929, 16
  br i1 %930, label %932, label %931

931:                                              ; preds = %928
  store i32 35, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %74) #9
  br label %954

932:                                              ; preds = %928
  %933 = load ptr, ptr %69, align 8, !tbaa !5
  %934 = invoke noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %933)
          to label %935 unwind label %950

935:                                              ; preds = %932
  %936 = load i32, ptr %74, align 4, !tbaa !31
  %937 = zext i32 %936 to i64
  %938 = getelementptr inbounds %"class.basisu::color_rgba", ptr %934, i64 %937
  %939 = load i32, ptr %74, align 4, !tbaa !31
  %940 = zext i32 %939 to i64
  %941 = getelementptr inbounds [16 x %"class.basisu::color_rgba"], ptr %71, i64 0, i64 %940
  %942 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext false, ptr noundef nonnull align 1 dereferenceable(4) %938, ptr noundef nonnull align 1 dereferenceable(4) %941, i1 noundef zeroext false)
          to label %943 unwind label %950

943:                                              ; preds = %935
  %944 = zext i32 %942 to i64
  %945 = load i64, ptr %72, align 8, !tbaa !52
  %946 = add i64 %945, %944
  store i64 %946, ptr %72, align 8, !tbaa !52
  br label %947

947:                                              ; preds = %943
  %948 = load i32, ptr %74, align 4, !tbaa !31
  %949 = add i32 %948, 1
  store i32 %949, ptr %74, align 4, !tbaa !31
  br label %928, !llvm.loop !62

950:                                              ; preds = %935, %932
  %951 = landingpad { ptr, i32 }
          cleanup
  %952 = extractvalue { ptr, i32 } %951, 0
  store ptr %952, ptr %10, align 8
  %953 = extractvalue { ptr, i32 } %951, 1
  store i32 %953, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %74) #9
  br label %1199

954:                                              ; preds = %931
  br label %955

955:                                              ; preds = %954, %926
  call void @llvm.lifetime.start.p0(i64 8, ptr %75) #9
  store i64 -1, ptr %75, align 8, !tbaa !52
  call void @llvm.lifetime.start.p0(i64 4, ptr %76) #9
  store i32 0, ptr %76, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %77) #9
  store i32 0, ptr %77, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %78) #9
  %956 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 1
  %957 = getelementptr inbounds %"struct.basisu::basisu_backend_params", ptr %956, i32 0, i32 5
  %958 = load float, ptr %957, align 8, !tbaa !63
  %959 = invoke noundef float @_ZN6basisu7maximumIfEET_S1_S1_(float noundef 1.000000e+00, float noundef %958)
          to label %960 unwind label %983

960:                                              ; preds = %955
  store float %959, ptr %78, align 4, !tbaa !54
  call void @llvm.lifetime.start.p0(i64 1, ptr %79) #9
  %961 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 1
  %962 = getelementptr inbounds %"struct.basisu::basisu_backend_params", ptr %961, i32 0, i32 6
  %963 = load i32, ptr %962, align 4, !tbaa !64
  %964 = icmp eq i32 %963, 0
  br i1 %964, label %965, label %968

965:                                              ; preds = %960
  %966 = load float, ptr %78, align 4, !tbaa !54
  %967 = fcmp oeq float %966, 1.000000e+00
  br label %968

968:                                              ; preds = %965, %960
  %969 = phi i1 [ false, %960 ], [ %967, %965 ]
  %970 = zext i1 %969 to i8
  store i8 %970, ptr %79, align 1, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 8, ptr %80) #9
  %971 = load i64, ptr %72, align 8, !tbaa !52
  %972 = uitofp i64 %971 to float
  %973 = load float, ptr %78, align 4, !tbaa !54
  %974 = fmul float %972, %973
  %975 = call float @llvm.ceil.f32(float %974)
  %976 = fptoui float %975 to i64
  store i64 %976, ptr %80, align 8, !tbaa !52
  call void @llvm.lifetime.start.p0(i64 4, ptr %81) #9
  store i32 0, ptr %81, align 4, !tbaa !31
  br label %977

977:                                              ; preds = %1169, %968
  %978 = load i32, ptr %81, align 4, !tbaa !31
  %979 = invoke noundef i32 @_ZNK6basist20approx_move_to_front4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %8)
          to label %980 unwind label %987

980:                                              ; preds = %977
  %981 = icmp ult i32 %978, %979
  br i1 %981, label %991, label %982

982:                                              ; preds = %980
  store i32 38, ptr %24, align 4
  br label %1173

983:                                              ; preds = %955
  %984 = landingpad { ptr, i32 }
          cleanup
  %985 = extractvalue { ptr, i32 } %984, 0
  store ptr %985, ptr %10, align 8
  %986 = extractvalue { ptr, i32 } %984, 1
  store i32 %986, ptr %11, align 4
  br label %1198

987:                                              ; preds = %977
  %988 = landingpad { ptr, i32 }
          cleanup
  %989 = extractvalue { ptr, i32 } %988, 0
  store ptr %989, ptr %10, align 8
  %990 = extractvalue { ptr, i32 } %988, 1
  store i32 %990, ptr %11, align 4
  br label %1174

991:                                              ; preds = %980
  call void @llvm.lifetime.start.p0(i64 4, ptr %82) #9
  %992 = load i32, ptr %81, align 4, !tbaa !31
  %993 = invoke noundef i32 @_ZN6basist20approx_move_to_frontixEj(ptr noundef nonnull align 8 dereferenceable(20) %8, i32 noundef %992)
          to label %994 unwind label %1004

994:                                              ; preds = %991
  store i32 %993, ptr %82, align 4, !tbaa !31
  %995 = load i8, ptr %79, align 1, !tbaa !30, !range !39, !noundef !40
  %996 = trunc i8 %995 to i1
  br i1 %996, label %997, label %1009

997:                                              ; preds = %994
  %998 = load i32, ptr %82, align 4, !tbaa !31
  %999 = load i32, ptr %65, align 4, !tbaa !31
  %1000 = icmp eq i32 %998, %999
  br i1 %1000, label %1001, label %1008

1001:                                             ; preds = %997
  store i64 0, ptr %75, align 8, !tbaa !52
  %1002 = load i32, ptr %82, align 4, !tbaa !31
  store i32 %1002, ptr %76, align 4, !tbaa !31
  %1003 = load i32, ptr %81, align 4, !tbaa !31
  store i32 %1003, ptr %77, align 4, !tbaa !31
  store i32 38, ptr %24, align 4
  br label %1166

1004:                                             ; preds = %991
  %1005 = landingpad { ptr, i32 }
          cleanup
  %1006 = extractvalue { ptr, i32 } %1005, 0
  store ptr %1006, ptr %10, align 8
  %1007 = extractvalue { ptr, i32 } %1005, 1
  store i32 %1007, ptr %11, align 4
  br label %1172

1008:                                             ; preds = %997
  br label %1165

1009:                                             ; preds = %994
  call void @llvm.lifetime.start.p0(i64 8, ptr %83) #9
  store i64 0, ptr %83, align 8, !tbaa !52
  call void @llvm.lifetime.start.p0(i64 8, ptr %84) #9
  %1010 = load i64, ptr %80, align 8, !tbaa !52
  %1011 = load i64, ptr %75, align 8, !tbaa !52
  %1012 = invoke noundef i64 @_ZN6basisu7minimumImEET_S1_S1_(i64 noundef %1010, i64 noundef %1011)
          to label %1013 unwind label %1049

1013:                                             ; preds = %1009
  store i64 %1012, ptr %84, align 8, !tbaa !52
  call void @llvm.lifetime.start.p0(i64 16, ptr %85) #9
  %1014 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %85, i32 0, i32 0
  %1015 = getelementptr inbounds %"class.basisu::color_rgba", ptr %1014, i64 4
  br label %1016

1016:                                             ; preds = %1018, %1013
  %1017 = phi ptr [ %1014, %1013 ], [ %1019, %1018 ]
  invoke void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %1017)
          to label %1018 unwind label %1053

1018:                                             ; preds = %1016
  %1019 = getelementptr inbounds %"class.basisu::color_rgba", ptr %1017, i64 1
  %1020 = icmp eq ptr %1019, %1015
  br i1 %1020, label %1021, label %1016

1021:                                             ; preds = %1018
  %1022 = load ptr, ptr %70, align 8, !tbaa !5
  %1023 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %85, i64 0, i64 0
  %1024 = invoke noundef zeroext i1 @_ZNK6basisu9etc_block16get_block_colorsEPNS_10color_rgbaEj(ptr noundef nonnull align 8 dereferenceable(8) %1022, ptr noundef %1023, i32 noundef 0)
          to label %1025 unwind label %1053

1025:                                             ; preds = %1021
  call void @llvm.lifetime.start.p0(i64 8, ptr %86) #9
  %1026 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 6
  %1027 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 14
  %1028 = load i32, ptr %82, align 4, !tbaa !31
  %1029 = sext i32 %1028 to i64
  %1030 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %1027, i64 noundef %1029)
          to label %1031 unwind label %1057

1031:                                             ; preds = %1025
  %1032 = load i32, ptr %1030, align 4, !tbaa !31
  %1033 = zext i32 %1032 to i64
  %1034 = invoke noundef nonnull align 1 dereferenceable(16) ptr @_ZN6basisu6vectorIN6basist27etc1_selector_palette_entryEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %1026, i64 noundef %1033)
          to label %1035 unwind label %1057

1035:                                             ; preds = %1031
  %1036 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryclEjj(ptr noundef nonnull align 1 dereferenceable(16) %1034, i32 noundef 0, i32 noundef 0)
          to label %1037 unwind label %1057

1037:                                             ; preds = %1035
  store ptr %1036, ptr %86, align 8, !tbaa !5
  %1038 = load ptr, ptr %4, align 8, !tbaa !5
  %1039 = invoke noundef nonnull align 8 dereferenceable(88) ptr @_ZNK6basisu15basisu_frontend10get_paramsEv(ptr noundef nonnull align 8 dereferenceable(496) %1038)
          to label %1040 unwind label %1057

1040:                                             ; preds = %1037
  %1041 = getelementptr inbounds %"struct.basisu::basisu_frontend::params", ptr %1039, i32 0, i32 5
  %1042 = load i8, ptr %1041, align 4, !tbaa !51, !range !39, !noundef !40
  %1043 = trunc i8 %1042 to i1
  br i1 %1043, label %1044, label %1099

1044:                                             ; preds = %1040
  call void @llvm.lifetime.start.p0(i64 4, ptr %87) #9
  store i32 0, ptr %87, align 4, !tbaa !31
  br label %1045

1045:                                             ; preds = %1094, %1044
  %1046 = load i32, ptr %87, align 4, !tbaa !31
  %1047 = icmp ult i32 %1046, 16
  br i1 %1047, label %1061, label %1048

1048:                                             ; preds = %1045
  store i32 41, ptr %24, align 4
  br label %1097

1049:                                             ; preds = %1009
  %1050 = landingpad { ptr, i32 }
          cleanup
  %1051 = extractvalue { ptr, i32 } %1050, 0
  store ptr %1051, ptr %10, align 8
  %1052 = extractvalue { ptr, i32 } %1050, 1
  store i32 %1052, ptr %11, align 4
  br label %1164

1053:                                             ; preds = %1021, %1016
  %1054 = landingpad { ptr, i32 }
          cleanup
  %1055 = extractvalue { ptr, i32 } %1054, 0
  store ptr %1055, ptr %10, align 8
  %1056 = extractvalue { ptr, i32 } %1054, 1
  store i32 %1056, ptr %11, align 4
  br label %1163

1057:                                             ; preds = %1037, %1035, %1031, %1025
  %1058 = landingpad { ptr, i32 }
          cleanup
  %1059 = extractvalue { ptr, i32 } %1058, 0
  store ptr %1059, ptr %10, align 8
  %1060 = extractvalue { ptr, i32 } %1058, 1
  store i32 %1060, ptr %11, align 4
  br label %1162

1061:                                             ; preds = %1045
  call void @llvm.lifetime.start.p0(i64 4, ptr %88) #9
  %1062 = load ptr, ptr %86, align 8, !tbaa !5
  %1063 = load i32, ptr %87, align 4, !tbaa !31
  %1064 = zext i32 %1063 to i64
  %1065 = getelementptr inbounds i8, ptr %1062, i64 %1064
  %1066 = load i8, ptr %1065, align 1, !tbaa !38
  %1067 = zext i8 %1066 to i32
  store i32 %1067, ptr %88, align 4, !tbaa !31
  %1068 = load ptr, ptr %69, align 8, !tbaa !5
  %1069 = invoke noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %1068)
          to label %1070 unwind label %1086

1070:                                             ; preds = %1061
  %1071 = load i32, ptr %87, align 4, !tbaa !31
  %1072 = zext i32 %1071 to i64
  %1073 = getelementptr inbounds %"class.basisu::color_rgba", ptr %1069, i64 %1072
  %1074 = load i32, ptr %88, align 4, !tbaa !31
  %1075 = zext i32 %1074 to i64
  %1076 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %85, i64 0, i64 %1075
  %1077 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext true, ptr noundef nonnull align 1 dereferenceable(4) %1073, ptr noundef nonnull align 1 dereferenceable(4) %1076, i1 noundef zeroext false)
          to label %1078 unwind label %1086

1078:                                             ; preds = %1070
  %1079 = zext i32 %1077 to i64
  %1080 = load i64, ptr %83, align 8, !tbaa !52
  %1081 = add i64 %1080, %1079
  store i64 %1081, ptr %83, align 8, !tbaa !52
  %1082 = load i64, ptr %83, align 8, !tbaa !52
  %1083 = load i64, ptr %84, align 8, !tbaa !52
  %1084 = icmp ugt i64 %1082, %1083
  br i1 %1084, label %1085, label %1090

1085:                                             ; preds = %1078
  store i32 41, ptr %24, align 4
  br label %1091

1086:                                             ; preds = %1070, %1061
  %1087 = landingpad { ptr, i32 }
          cleanup
  %1088 = extractvalue { ptr, i32 } %1087, 0
  store ptr %1088, ptr %10, align 8
  %1089 = extractvalue { ptr, i32 } %1087, 1
  store i32 %1089, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %88) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %87) #9
  br label %1162

1090:                                             ; preds = %1078
  store i32 0, ptr %24, align 4
  br label %1091

1091:                                             ; preds = %1090, %1085
  call void @llvm.lifetime.end.p0(i64 4, ptr %88) #9
  %1092 = load i32, ptr %24, align 4
  switch i32 %1092, label %1097 [
    i32 0, label %1093
  ]

1093:                                             ; preds = %1091
  br label %1094

1094:                                             ; preds = %1093
  %1095 = load i32, ptr %87, align 4, !tbaa !31
  %1096 = add i32 %1095, 1
  store i32 %1096, ptr %87, align 4, !tbaa !31
  br label %1045, !llvm.loop !65

1097:                                             ; preds = %1091, %1048
  call void @llvm.lifetime.end.p0(i64 4, ptr %87) #9
  br label %1098

1098:                                             ; preds = %1097
  br label %1142

1099:                                             ; preds = %1040
  call void @llvm.lifetime.start.p0(i64 4, ptr %89) #9
  store i32 0, ptr %89, align 4, !tbaa !31
  br label %1100

1100:                                             ; preds = %1137, %1099
  %1101 = load i32, ptr %89, align 4, !tbaa !31
  %1102 = icmp ult i32 %1101, 16
  br i1 %1102, label %1104, label %1103

1103:                                             ; preds = %1100
  store i32 44, ptr %24, align 4
  br label %1140

1104:                                             ; preds = %1100
  call void @llvm.lifetime.start.p0(i64 4, ptr %90) #9
  %1105 = load ptr, ptr %86, align 8, !tbaa !5
  %1106 = load i32, ptr %89, align 4, !tbaa !31
  %1107 = zext i32 %1106 to i64
  %1108 = getelementptr inbounds i8, ptr %1105, i64 %1107
  %1109 = load i8, ptr %1108, align 1, !tbaa !38
  %1110 = zext i8 %1109 to i32
  store i32 %1110, ptr %90, align 4, !tbaa !31
  %1111 = load ptr, ptr %69, align 8, !tbaa !5
  %1112 = invoke noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %1111)
          to label %1113 unwind label %1129

1113:                                             ; preds = %1104
  %1114 = load i32, ptr %89, align 4, !tbaa !31
  %1115 = zext i32 %1114 to i64
  %1116 = getelementptr inbounds %"class.basisu::color_rgba", ptr %1112, i64 %1115
  %1117 = load i32, ptr %90, align 4, !tbaa !31
  %1118 = zext i32 %1117 to i64
  %1119 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %85, i64 0, i64 %1118
  %1120 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext false, ptr noundef nonnull align 1 dereferenceable(4) %1116, ptr noundef nonnull align 1 dereferenceable(4) %1119, i1 noundef zeroext false)
          to label %1121 unwind label %1129

1121:                                             ; preds = %1113
  %1122 = zext i32 %1120 to i64
  %1123 = load i64, ptr %83, align 8, !tbaa !52
  %1124 = add i64 %1123, %1122
  store i64 %1124, ptr %83, align 8, !tbaa !52
  %1125 = load i64, ptr %83, align 8, !tbaa !52
  %1126 = load i64, ptr %84, align 8, !tbaa !52
  %1127 = icmp ugt i64 %1125, %1126
  br i1 %1127, label %1128, label %1133

1128:                                             ; preds = %1121
  store i32 44, ptr %24, align 4
  br label %1134

1129:                                             ; preds = %1113, %1104
  %1130 = landingpad { ptr, i32 }
          cleanup
  %1131 = extractvalue { ptr, i32 } %1130, 0
  store ptr %1131, ptr %10, align 8
  %1132 = extractvalue { ptr, i32 } %1130, 1
  store i32 %1132, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %90) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %89) #9
  br label %1162

1133:                                             ; preds = %1121
  store i32 0, ptr %24, align 4
  br label %1134

1134:                                             ; preds = %1133, %1128
  call void @llvm.lifetime.end.p0(i64 4, ptr %90) #9
  %1135 = load i32, ptr %24, align 4
  switch i32 %1135, label %1140 [
    i32 0, label %1136
  ]

1136:                                             ; preds = %1134
  br label %1137

1137:                                             ; preds = %1136
  %1138 = load i32, ptr %89, align 4, !tbaa !31
  %1139 = add i32 %1138, 1
  store i32 %1139, ptr %89, align 4, !tbaa !31
  br label %1100, !llvm.loop !66

1140:                                             ; preds = %1134, %1103
  call void @llvm.lifetime.end.p0(i64 4, ptr %89) #9
  br label %1141

1141:                                             ; preds = %1140
  br label %1142

1142:                                             ; preds = %1141, %1098
  %1143 = load i64, ptr %83, align 8, !tbaa !52
  %1144 = load i64, ptr %75, align 8, !tbaa !52
  %1145 = icmp ult i64 %1143, %1144
  br i1 %1145, label %1146, label %1161

1146:                                             ; preds = %1142
  %1147 = load i64, ptr %83, align 8, !tbaa !52
  %1148 = load i64, ptr %84, align 8, !tbaa !52
  %1149 = icmp ule i64 %1147, %1148
  br i1 %1149, label %1150, label %1161

1150:                                             ; preds = %1146
  %1151 = load i64, ptr %83, align 8, !tbaa !52
  %1152 = load i64, ptr %80, align 8, !tbaa !52
  %1153 = icmp ule i64 %1151, %1152
  br i1 %1153, label %1154, label %1155

1154:                                             ; preds = %1150
  br label %1157

1155:                                             ; preds = %1150
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.6, i32 noundef 1024, ptr noundef @__PRETTY_FUNCTION__._ZN6basisu14basisu_backend12encode_imageEv) #10
  unreachable

1156:                                             ; No predecessors!
  br label %1157

1157:                                             ; preds = %1156, %1154
  %1158 = load i64, ptr %83, align 8, !tbaa !52
  store i64 %1158, ptr %75, align 8, !tbaa !52
  %1159 = load i32, ptr %82, align 4, !tbaa !31
  store i32 %1159, ptr %76, align 4, !tbaa !31
  %1160 = load i32, ptr %81, align 4, !tbaa !31
  store i32 %1160, ptr %77, align 4, !tbaa !31
  br label %1161

1161:                                             ; preds = %1157, %1146, %1142
  call void @llvm.lifetime.end.p0(i64 8, ptr %86) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %85) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %84) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %83) #9
  br label %1165

1162:                                             ; preds = %1129, %1086, %1057
  call void @llvm.lifetime.end.p0(i64 8, ptr %86) #9
  br label %1163

1163:                                             ; preds = %1162, %1053
  call void @llvm.lifetime.end.p0(i64 16, ptr %85) #9
  br label %1164

1164:                                             ; preds = %1163, %1049
  call void @llvm.lifetime.end.p0(i64 8, ptr %84) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %83) #9
  br label %1172

1165:                                             ; preds = %1161, %1008
  store i32 0, ptr %24, align 4
  br label %1166

1166:                                             ; preds = %1165, %1001
  call void @llvm.lifetime.end.p0(i64 4, ptr %82) #9
  %1167 = load i32, ptr %24, align 4
  switch i32 %1167, label %1173 [
    i32 0, label %1168
  ]

1168:                                             ; preds = %1166
  br label %1169

1169:                                             ; preds = %1168
  %1170 = load i32, ptr %81, align 4, !tbaa !31
  %1171 = add i32 %1170, 1
  store i32 %1171, ptr %81, align 4, !tbaa !31
  br label %977, !llvm.loop !67

1172:                                             ; preds = %1164, %1004
  call void @llvm.lifetime.end.p0(i64 4, ptr %82) #9
  br label %1174

1173:                                             ; preds = %1166, %982
  call void @llvm.lifetime.end.p0(i64 4, ptr %81) #9
  br label %1175

1174:                                             ; preds = %1172, %987
  call void @llvm.lifetime.end.p0(i64 4, ptr %81) #9
  br label %1197

1175:                                             ; preds = %1173
  %1176 = load i64, ptr %75, align 8, !tbaa !52
  %1177 = icmp ne i64 %1176, -1
  br i1 %1177, label %1178, label %1196

1178:                                             ; preds = %1175
  %1179 = load i32, ptr %65, align 4, !tbaa !31
  %1180 = load i32, ptr %76, align 4, !tbaa !31
  %1181 = icmp ne i32 %1179, %1180
  br i1 %1181, label %1182, label %1185

1182:                                             ; preds = %1178
  %1183 = load i32, ptr %7, align 4, !tbaa !31
  %1184 = add i32 %1183, 1
  store i32 %1184, ptr %7, align 4, !tbaa !31
  br label %1185

1185:                                             ; preds = %1182, %1178
  %1186 = load i32, ptr %76, align 4, !tbaa !31
  store i32 %1186, ptr %65, align 4, !tbaa !31
  %1187 = load i32, ptr %6, align 4, !tbaa !31
  %1188 = add i32 %1187, 1
  store i32 %1188, ptr %6, align 4, !tbaa !31
  %1189 = load i32, ptr %77, align 4, !tbaa !31
  store i32 %1189, ptr %66, align 4, !tbaa !31
  %1190 = load i32, ptr %77, align 4, !tbaa !31
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef %1190)
          to label %1191 unwind label %1192

1191:                                             ; preds = %1185
  br label %1196

1192:                                             ; preds = %1185
  %1193 = landingpad { ptr, i32 }
          cleanup
  %1194 = extractvalue { ptr, i32 } %1193, 0
  store ptr %1194, ptr %10, align 8
  %1195 = extractvalue { ptr, i32 } %1193, 1
  store i32 %1195, ptr %11, align 4
  br label %1197

1196:                                             ; preds = %1191, %1175
  call void @llvm.lifetime.end.p0(i64 8, ptr %80) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %79) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %78) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %77) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %76) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %75) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %72) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr %71) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %70) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %69) #9
  br label %1203

1197:                                             ; preds = %1192, %1174
  call void @llvm.lifetime.end.p0(i64 8, ptr %80) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %79) #9
  br label %1198

1198:                                             ; preds = %1197, %983
  call void @llvm.lifetime.end.p0(i64 4, ptr %78) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %77) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %76) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %75) #9
  br label %1199

1199:                                             ; preds = %1198, %950, %922, %900
  call void @llvm.lifetime.end.p0(i64 8, ptr %72) #9
  br label %1200

1200:                                             ; preds = %1199, %896
  call void @llvm.lifetime.end.p0(i64 64, ptr %71) #9
  br label %1201

1201:                                             ; preds = %1200, %892
  call void @llvm.lifetime.end.p0(i64 8, ptr %70) #9
  br label %1202

1202:                                             ; preds = %1201, %888
  call void @llvm.lifetime.end.p0(i64 8, ptr %69) #9
  br label %1337

1203:                                             ; preds = %1196, %855
  %1204 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 14
  %1205 = load i32, ptr %65, align 4, !tbaa !31
  %1206 = sext i32 %1205 to i64
  %1207 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %1204, i64 noundef %1206)
          to label %1208 unwind label %1238

1208:                                             ; preds = %1203
  %1209 = load i32, ptr %1207, align 4, !tbaa !31
  %1210 = load ptr, ptr %39, align 8, !tbaa !5
  %1211 = getelementptr inbounds %"struct.basisu::encoder_block", ptr %1210, i32 0, i32 2
  store i32 %1209, ptr %1211, align 4, !tbaa !59
  %1212 = load i32, ptr %28, align 4, !tbaa !31
  %1213 = icmp ne i32 %1212, 0
  br i1 %1213, label %1214, label %1281

1214:                                             ; preds = %1208
  %1215 = load i32, ptr %66, align 4, !tbaa !31
  %1216 = icmp ne i32 %1215, 0
  br i1 %1216, label %1217, label %1281

1217:                                             ; preds = %1214
  %1218 = load i32, ptr %28, align 4, !tbaa !31
  %1219 = icmp sge i32 %1218, 3
  br i1 %1219, label %1220, label %1256

1220:                                             ; preds = %1217
  %1221 = load i32, ptr %23, align 4, !tbaa !31
  %1222 = zext i32 %1221 to i64
  %1223 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %14, i64 noundef %1222)
          to label %1224 unwind label %1238

1224:                                             ; preds = %1220
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %1223, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %1225 unwind label %1238

1225:                                             ; preds = %1224
  %1226 = load i32, ptr %23, align 4, !tbaa !31
  %1227 = zext i32 %1226 to i64
  %1228 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %14, i64 noundef %1227)
          to label %1229 unwind label %1238

1229:                                             ; preds = %1225
  call void @llvm.lifetime.start.p0(i64 4, ptr %91) #9
  %1230 = load i32, ptr %28, align 4, !tbaa !31
  store i32 %1230, ptr %91, align 4, !tbaa !31
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %1228, ptr noundef nonnull align 4 dereferenceable(4) %91)
          to label %1231 unwind label %1242

1231:                                             ; preds = %1229
  call void @llvm.lifetime.end.p0(i64 4, ptr %91) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %92) #9
  %1232 = load i32, ptr %28, align 4, !tbaa !31
  %1233 = sub i32 %1232, 3
  store i32 %1233, ptr %92, align 4, !tbaa !31
  %1234 = load i32, ptr %92, align 4, !tbaa !31
  %1235 = icmp sge i32 %1234, 63
  br i1 %1235, label %1236, label %1250

1236:                                             ; preds = %1231
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %13, i32 noundef 63)
          to label %1237 unwind label %1246

1237:                                             ; preds = %1236
  br label %1253

1238:                                             ; preds = %1332, %1328, %1325, %1312, %1306, %1225, %1224, %1220, %1203
  %1239 = landingpad { ptr, i32 }
          cleanup
  %1240 = extractvalue { ptr, i32 } %1239, 0
  store ptr %1240, ptr %10, align 8
  %1241 = extractvalue { ptr, i32 } %1239, 1
  store i32 %1241, ptr %11, align 4
  br label %1337

1242:                                             ; preds = %1229
  %1243 = landingpad { ptr, i32 }
          cleanup
  %1244 = extractvalue { ptr, i32 } %1243, 0
  store ptr %1244, ptr %10, align 8
  %1245 = extractvalue { ptr, i32 } %1243, 1
  store i32 %1245, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %91) #9
  br label %1337

1246:                                             ; preds = %1253, %1250, %1236
  %1247 = landingpad { ptr, i32 }
          cleanup
  %1248 = extractvalue { ptr, i32 } %1247, 0
  store ptr %1248, ptr %10, align 8
  %1249 = extractvalue { ptr, i32 } %1247, 1
  store i32 %1249, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %92) #9
  br label %1337

1250:                                             ; preds = %1231
  %1251 = load i32, ptr %92, align 4, !tbaa !31
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %13, i32 noundef %1251)
          to label %1252 unwind label %1246

1252:                                             ; preds = %1250
  br label %1253

1253:                                             ; preds = %1252, %1237
  %1254 = load i32, ptr %16, align 4, !tbaa !31
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef %1254)
          to label %1255 unwind label %1246

1255:                                             ; preds = %1253
  call void @llvm.lifetime.end.p0(i64 4, ptr %92) #9
  br label %1280

1256:                                             ; preds = %1217
  call void @llvm.lifetime.start.p0(i64 4, ptr %93) #9
  store i32 0, ptr %93, align 4, !tbaa !31
  br label %1257

1257:                                             ; preds = %1272, %1256
  %1258 = load i32, ptr %93, align 4, !tbaa !31
  %1259 = load i32, ptr %28, align 4, !tbaa !31
  %1260 = icmp slt i32 %1258, %1259
  br i1 %1260, label %1262, label %1261

1261:                                             ; preds = %1257
  store i32 47, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %93) #9
  br label %1279

1262:                                             ; preds = %1257
  call void @llvm.lifetime.start.p0(i64 4, ptr %94) #9
  %1263 = load i32, ptr %15, align 4, !tbaa !31
  %1264 = add i32 %1263, 0
  store i32 %1264, ptr %94, align 4, !tbaa !31
  %1265 = load i32, ptr %23, align 4, !tbaa !31
  %1266 = zext i32 %1265 to i64
  %1267 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %14, i64 noundef %1266)
          to label %1268 unwind label %1275

1268:                                             ; preds = %1262
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %1267, ptr noundef nonnull align 4 dereferenceable(4) %94)
          to label %1269 unwind label %1275

1269:                                             ; preds = %1268
  %1270 = load i32, ptr %94, align 4, !tbaa !31
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef %1270)
          to label %1271 unwind label %1275

1271:                                             ; preds = %1269
  call void @llvm.lifetime.end.p0(i64 4, ptr %94) #9
  br label %1272

1272:                                             ; preds = %1271
  %1273 = load i32, ptr %93, align 4, !tbaa !31
  %1274 = add nsw i32 %1273, 1
  store i32 %1274, ptr %93, align 4, !tbaa !31
  br label %1257, !llvm.loop !68

1275:                                             ; preds = %1269, %1268, %1262
  %1276 = landingpad { ptr, i32 }
          cleanup
  %1277 = extractvalue { ptr, i32 } %1276, 0
  store ptr %1277, ptr %10, align 8
  %1278 = extractvalue { ptr, i32 } %1276, 1
  store i32 %1278, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %94) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %93) #9
  br label %1337

1279:                                             ; preds = %1261
  br label %1280

1280:                                             ; preds = %1279, %1255
  store i32 0, ptr %28, align 4, !tbaa !31
  br label %1281

1281:                                             ; preds = %1280, %1214, %1208
  %1282 = load i32, ptr %66, align 4, !tbaa !31
  %1283 = icmp sge i32 %1282, 0
  br i1 %1283, label %1284, label %1306

1284:                                             ; preds = %1281
  %1285 = load i32, ptr %66, align 4, !tbaa !31
  %1286 = icmp eq i32 %1285, 0
  br i1 %1286, label %1287, label %1290

1287:                                             ; preds = %1284
  %1288 = load i32, ptr %28, align 4, !tbaa !31
  %1289 = add nsw i32 %1288, 1
  store i32 %1289, ptr %28, align 4, !tbaa !31
  br label %1305

1290:                                             ; preds = %1284
  call void @llvm.lifetime.start.p0(i64 4, ptr %95) #9
  %1291 = load i32, ptr %15, align 4, !tbaa !31
  %1292 = load i32, ptr %66, align 4, !tbaa !31
  %1293 = add i32 %1291, %1292
  store i32 %1293, ptr %95, align 4, !tbaa !31
  %1294 = load i32, ptr %23, align 4, !tbaa !31
  %1295 = zext i32 %1294 to i64
  %1296 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %14, i64 noundef %1295)
          to label %1297 unwind label %1301

1297:                                             ; preds = %1290
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %1296, ptr noundef nonnull align 4 dereferenceable(4) %95)
          to label %1298 unwind label %1301

1298:                                             ; preds = %1297
  %1299 = load i32, ptr %95, align 4, !tbaa !31
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef %1299)
          to label %1300 unwind label %1301

1300:                                             ; preds = %1298
  call void @llvm.lifetime.end.p0(i64 4, ptr %95) #9
  br label %1305

1301:                                             ; preds = %1298, %1297, %1290
  %1302 = landingpad { ptr, i32 }
          cleanup
  %1303 = extractvalue { ptr, i32 } %1302, 0
  store ptr %1303, ptr %10, align 8
  %1304 = extractvalue { ptr, i32 } %1302, 1
  store i32 %1304, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %95) #9
  br label %1337

1305:                                             ; preds = %1300, %1287
  br label %1319

1306:                                             ; preds = %1281
  %1307 = load i32, ptr %23, align 4, !tbaa !31
  %1308 = zext i32 %1307 to i64
  %1309 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %14, i64 noundef %1308)
          to label %1310 unwind label %1238

1310:                                             ; preds = %1306
  call void @llvm.lifetime.start.p0(i64 4, ptr %96) #9
  %1311 = load i32, ptr %65, align 4, !tbaa !31
  store i32 %1311, ptr %96, align 4, !tbaa !31
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %1309, ptr noundef nonnull align 4 dereferenceable(4) %96)
          to label %1312 unwind label %1315

1312:                                             ; preds = %1310
  call void @llvm.lifetime.end.p0(i64 4, ptr %96) #9
  %1313 = load i32, ptr %65, align 4, !tbaa !31
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef %1313)
          to label %1314 unwind label %1238

1314:                                             ; preds = %1312
  br label %1319

1315:                                             ; preds = %1310
  %1316 = landingpad { ptr, i32 }
          cleanup
  %1317 = extractvalue { ptr, i32 } %1316, 0
  store ptr %1317, ptr %10, align 8
  %1318 = extractvalue { ptr, i32 } %1316, 1
  store i32 %1318, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %96) #9
  br label %1337

1319:                                             ; preds = %1314, %1305
  %1320 = load i32, ptr %66, align 4, !tbaa !31
  %1321 = load ptr, ptr %39, align 8, !tbaa !5
  %1322 = getelementptr inbounds %"struct.basisu::encoder_block", ptr %1321, i32 0, i32 3
  store i32 %1320, ptr %1322, align 4, !tbaa !69
  %1323 = load i32, ptr %66, align 4, !tbaa !31
  %1324 = icmp slt i32 %1323, 0
  br i1 %1324, label %1325, label %1328

1325:                                             ; preds = %1319
  %1326 = load i32, ptr %65, align 4, !tbaa !31
  invoke void @_ZN6basist20approx_move_to_front3addEi(ptr noundef nonnull align 8 dereferenceable(20) %8, i32 noundef %1326)
          to label %1327 unwind label %1238

1327:                                             ; preds = %1325
  br label %1336

1328:                                             ; preds = %1319
  %1329 = invoke noundef i32 @_ZNK6basist20approx_move_to_front4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %8)
          to label %1330 unwind label %1238

1330:                                             ; preds = %1328
  %1331 = icmp ne i32 %1329, 0
  br i1 %1331, label %1332, label %1335

1332:                                             ; preds = %1330
  %1333 = load i32, ptr %66, align 4, !tbaa !31
  invoke void @_ZN6basist20approx_move_to_front3useEj(ptr noundef nonnull align 8 dereferenceable(20) %8, i32 noundef %1333)
          to label %1334 unwind label %1238

1334:                                             ; preds = %1332
  br label %1335

1335:                                             ; preds = %1334, %1330
  br label %1336

1336:                                             ; preds = %1335, %1327
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %65) #9
  br label %1339

1337:                                             ; preds = %1315, %1301, %1275, %1246, %1242, %1238, %1202, %854
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #9
  br label %1338

1338:                                             ; preds = %1337, %821
  call void @llvm.lifetime.end.p0(i64 4, ptr %65) #9
  br label %1351

1339:                                             ; preds = %1336, %796
  call void @llvm.lifetime.start.p0(i64 4, ptr %97) #9
  %1340 = load ptr, ptr %39, align 8, !tbaa !5
  %1341 = getelementptr inbounds %"struct.basisu::encoder_block", ptr %1340, i32 0, i32 2
  %1342 = load i32, ptr %1341, align 4, !tbaa !59
  store i32 %1342, ptr %97, align 4, !tbaa !31
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(4) %97)
          to label %1343 unwind label %1347

1343:                                             ; preds = %1339
  call void @llvm.lifetime.end.p0(i64 4, ptr %97) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #9
  br label %1344

1344:                                             ; preds = %1343
  %1345 = load i32, ptr %37, align 4, !tbaa !31
  %1346 = add i32 %1345, 1
  store i32 %1346, ptr %37, align 4, !tbaa !31
  br label %377, !llvm.loop !70

1347:                                             ; preds = %1339
  %1348 = landingpad { ptr, i32 }
          cleanup
  %1349 = extractvalue { ptr, i32 } %1348, 0
  store ptr %1349, ptr %10, align 8
  %1350 = extractvalue { ptr, i32 } %1348, 1
  store i32 %1350, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %97) #9
  br label %1351

1351:                                             ; preds = %1347, %1338, %785, %620
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #9
  br label %1352

1352:                                             ; preds = %1351, %540, %411
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #9
  br label %1480

1353:                                             ; preds = %381
  br label %1354

1354:                                             ; preds = %1353
  %1355 = load i32, ptr %36, align 4, !tbaa !31
  %1356 = add i32 %1355, 1
  store i32 %1356, ptr %36, align 4, !tbaa !31
  br label %371, !llvm.loop !71

1357:                                             ; preds = %375
  %1358 = load i32, ptr %30, align 4, !tbaa !31
  %1359 = icmp sgt i32 %1358, 0
  br i1 %1359, label %1360, label %1413

1360:                                             ; preds = %1357
  %1361 = load i32, ptr %30, align 4, !tbaa !31
  %1362 = icmp sgt i32 %1361, 3
  br i1 %1362, label %1363, label %1384

1363:                                             ; preds = %1360
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %18, i32 noundef 256)
          to label %1364 unwind label %1376

1364:                                             ; preds = %1363
  %1365 = load i32, ptr %23, align 4, !tbaa !31
  %1366 = zext i32 %1365 to i64
  %1367 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %19, i64 noundef %1366)
          to label %1368 unwind label %1376

1368:                                             ; preds = %1364
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %1367, ptr noundef nonnull align 4 dereferenceable(4) @_ZN6basistL32ENDPOINT_PRED_REPEAT_LAST_SYMBOLE)
          to label %1369 unwind label %1376

1369:                                             ; preds = %1368
  %1370 = load i32, ptr %23, align 4, !tbaa !31
  %1371 = zext i32 %1370 to i64
  %1372 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %19, i64 noundef %1371)
          to label %1373 unwind label %1376

1373:                                             ; preds = %1369
  call void @llvm.lifetime.start.p0(i64 4, ptr %98) #9
  %1374 = load i32, ptr %30, align 4, !tbaa !31
  store i32 %1374, ptr %98, align 4, !tbaa !31
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %1372, ptr noundef nonnull align 4 dereferenceable(4) %98)
          to label %1375 unwind label %1380

1375:                                             ; preds = %1373
  call void @llvm.lifetime.end.p0(i64 4, ptr %98) #9
  br label %1412

1376:                                             ; preds = %1424, %1423, %1419, %1369, %1368, %1364, %1363
  %1377 = landingpad { ptr, i32 }
          cleanup
  %1378 = extractvalue { ptr, i32 } %1377, 0
  store ptr %1378, ptr %10, align 8
  %1379 = extractvalue { ptr, i32 } %1377, 1
  store i32 %1379, ptr %11, align 4
  br label %1480

1380:                                             ; preds = %1373
  %1381 = landingpad { ptr, i32 }
          cleanup
  %1382 = extractvalue { ptr, i32 } %1381, 0
  store ptr %1382, ptr %10, align 8
  %1383 = extractvalue { ptr, i32 } %1381, 1
  store i32 %1383, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %98) #9
  br label %1480

1384:                                             ; preds = %1360
  call void @llvm.lifetime.start.p0(i64 4, ptr %99) #9
  store i32 0, ptr %99, align 4, !tbaa !31
  br label %1385

1385:                                             ; preds = %1399, %1384
  %1386 = load i32, ptr %99, align 4, !tbaa !31
  %1387 = load i32, ptr %30, align 4, !tbaa !31
  %1388 = icmp slt i32 %1386, %1387
  br i1 %1388, label %1390, label %1389

1389:                                             ; preds = %1385
  store i32 50, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %99) #9
  br label %1411

1390:                                             ; preds = %1385
  %1391 = load i32, ptr %29, align 4, !tbaa !31
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %18, i32 noundef %1391)
          to label %1392 unwind label %1402

1392:                                             ; preds = %1390
  %1393 = load i32, ptr %23, align 4, !tbaa !31
  %1394 = zext i32 %1393 to i64
  %1395 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %19, i64 noundef %1394)
          to label %1396 unwind label %1402

1396:                                             ; preds = %1392
  call void @llvm.lifetime.start.p0(i64 4, ptr %100) #9
  %1397 = load i32, ptr %29, align 4, !tbaa !31
  store i32 %1397, ptr %100, align 4, !tbaa !31
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %1395, ptr noundef nonnull align 4 dereferenceable(4) %100)
          to label %1398 unwind label %1406

1398:                                             ; preds = %1396
  call void @llvm.lifetime.end.p0(i64 4, ptr %100) #9
  br label %1399

1399:                                             ; preds = %1398
  %1400 = load i32, ptr %99, align 4, !tbaa !31
  %1401 = add nsw i32 %1400, 1
  store i32 %1401, ptr %99, align 4, !tbaa !31
  br label %1385, !llvm.loop !72

1402:                                             ; preds = %1392, %1390
  %1403 = landingpad { ptr, i32 }
          cleanup
  %1404 = extractvalue { ptr, i32 } %1403, 0
  store ptr %1404, ptr %10, align 8
  %1405 = extractvalue { ptr, i32 } %1403, 1
  store i32 %1405, ptr %11, align 4
  br label %1410

1406:                                             ; preds = %1396
  %1407 = landingpad { ptr, i32 }
          cleanup
  %1408 = extractvalue { ptr, i32 } %1407, 0
  store ptr %1408, ptr %10, align 8
  %1409 = extractvalue { ptr, i32 } %1407, 1
  store i32 %1409, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %100) #9
  br label %1410

1410:                                             ; preds = %1406, %1402
  call void @llvm.lifetime.end.p0(i64 4, ptr %99) #9
  br label %1480

1411:                                             ; preds = %1389
  br label %1412

1412:                                             ; preds = %1411, %1375
  store i32 0, ptr %30, align 4, !tbaa !31
  br label %1413

1413:                                             ; preds = %1412, %1357
  %1414 = load i32, ptr %28, align 4, !tbaa !31
  %1415 = icmp ne i32 %1414, 0
  br i1 %1415, label %1416, label %1476

1416:                                             ; preds = %1413
  %1417 = load i32, ptr %28, align 4, !tbaa !31
  %1418 = icmp sge i32 %1417, 3
  br i1 %1418, label %1419, label %1451

1419:                                             ; preds = %1416
  %1420 = load i32, ptr %23, align 4, !tbaa !31
  %1421 = zext i32 %1420 to i64
  %1422 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %14, i64 noundef %1421)
          to label %1423 unwind label %1376

1423:                                             ; preds = %1419
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %1422, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %1424 unwind label %1376

1424:                                             ; preds = %1423
  %1425 = load i32, ptr %23, align 4, !tbaa !31
  %1426 = zext i32 %1425 to i64
  %1427 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %14, i64 noundef %1426)
          to label %1428 unwind label %1376

1428:                                             ; preds = %1424
  call void @llvm.lifetime.start.p0(i64 4, ptr %101) #9
  %1429 = load i32, ptr %28, align 4, !tbaa !31
  store i32 %1429, ptr %101, align 4, !tbaa !31
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %1427, ptr noundef nonnull align 4 dereferenceable(4) %101)
          to label %1430 unwind label %1437

1430:                                             ; preds = %1428
  call void @llvm.lifetime.end.p0(i64 4, ptr %101) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %102) #9
  %1431 = load i32, ptr %28, align 4, !tbaa !31
  %1432 = sub i32 %1431, 3
  store i32 %1432, ptr %102, align 4, !tbaa !31
  %1433 = load i32, ptr %102, align 4, !tbaa !31
  %1434 = icmp sge i32 %1433, 63
  br i1 %1434, label %1435, label %1445

1435:                                             ; preds = %1430
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %13, i32 noundef 63)
          to label %1436 unwind label %1441

1436:                                             ; preds = %1435
  br label %1448

1437:                                             ; preds = %1428
  %1438 = landingpad { ptr, i32 }
          cleanup
  %1439 = extractvalue { ptr, i32 } %1438, 0
  store ptr %1439, ptr %10, align 8
  %1440 = extractvalue { ptr, i32 } %1438, 1
  store i32 %1440, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %101) #9
  br label %1480

1441:                                             ; preds = %1448, %1445, %1435
  %1442 = landingpad { ptr, i32 }
          cleanup
  %1443 = extractvalue { ptr, i32 } %1442, 0
  store ptr %1443, ptr %10, align 8
  %1444 = extractvalue { ptr, i32 } %1442, 1
  store i32 %1444, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %102) #9
  br label %1480

1445:                                             ; preds = %1430
  %1446 = load i32, ptr %102, align 4, !tbaa !31
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %13, i32 noundef %1446)
          to label %1447 unwind label %1441

1447:                                             ; preds = %1445
  br label %1448

1448:                                             ; preds = %1447, %1436
  %1449 = load i32, ptr %16, align 4, !tbaa !31
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef %1449)
          to label %1450 unwind label %1441

1450:                                             ; preds = %1448
  call void @llvm.lifetime.end.p0(i64 4, ptr %102) #9
  br label %1475

1451:                                             ; preds = %1416
  call void @llvm.lifetime.start.p0(i64 4, ptr %103) #9
  store i32 0, ptr %103, align 4, !tbaa !31
  br label %1452

1452:                                             ; preds = %1467, %1451
  %1453 = load i32, ptr %103, align 4, !tbaa !31
  %1454 = load i32, ptr %28, align 4, !tbaa !31
  %1455 = icmp slt i32 %1453, %1454
  br i1 %1455, label %1457, label %1456

1456:                                             ; preds = %1452
  store i32 53, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %103) #9
  br label %1474

1457:                                             ; preds = %1452
  call void @llvm.lifetime.start.p0(i64 4, ptr %104) #9
  %1458 = load i32, ptr %15, align 4, !tbaa !31
  %1459 = add i32 %1458, 0
  store i32 %1459, ptr %104, align 4, !tbaa !31
  %1460 = load i32, ptr %23, align 4, !tbaa !31
  %1461 = zext i32 %1460 to i64
  %1462 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %14, i64 noundef %1461)
          to label %1463 unwind label %1470

1463:                                             ; preds = %1457
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %1462, ptr noundef nonnull align 4 dereferenceable(4) %104)
          to label %1464 unwind label %1470

1464:                                             ; preds = %1463
  %1465 = load i32, ptr %104, align 4, !tbaa !31
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef %1465)
          to label %1466 unwind label %1470

1466:                                             ; preds = %1464
  call void @llvm.lifetime.end.p0(i64 4, ptr %104) #9
  br label %1467

1467:                                             ; preds = %1466
  %1468 = load i32, ptr %103, align 4, !tbaa !31
  %1469 = add nsw i32 %1468, 1
  store i32 %1469, ptr %103, align 4, !tbaa !31
  br label %1452, !llvm.loop !73

1470:                                             ; preds = %1464, %1463, %1457
  %1471 = landingpad { ptr, i32 }
          cleanup
  %1472 = extractvalue { ptr, i32 } %1471, 0
  store ptr %1472, ptr %10, align 8
  %1473 = extractvalue { ptr, i32 } %1471, 1
  store i32 %1473, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %104) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %103) #9
  br label %1480

1474:                                             ; preds = %1456
  br label %1475

1475:                                             ; preds = %1474, %1450
  store i32 0, ptr %28, align 4, !tbaa !31
  br label %1476

1476:                                             ; preds = %1475, %1413
  call void @_ZN6basisu8vector2DIhED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %32) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %32) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  br label %1477

1477:                                             ; preds = %1476
  %1478 = load i32, ptr %23, align 4, !tbaa !31
  %1479 = add i32 %1478, 1
  store i32 %1479, ptr %23, align 4, !tbaa !31
  br label %187, !llvm.loop !74

1480:                                             ; preds = %1470, %1441, %1437, %1410, %1380, %1376, %1352, %315
  call void @_ZN6basisu8vector2DIhED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %32) #9
  br label %1481

1481:                                             ; preds = %1480, %285
  call void @llvm.lifetime.end.p0(i64 24, ptr %32) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #9
  br label %1482

1482:                                             ; preds = %1481, %281
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  br label %1483

1483:                                             ; preds = %1482, %277
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  br label %1484

1484:                                             ; preds = %1483, %273
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  br label %1485

1485:                                             ; preds = %1484, %238
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  br label %2215

1486:                                             ; preds = %193
  %1487 = load i32, ptr %20, align 4, !tbaa !31
  %1488 = load i32, ptr %20, align 4, !tbaa !31
  %1489 = uitofp i32 %1488 to float
  %1490 = fmul float %1489, 1.000000e+02
  %1491 = invoke noundef i32 @_ZNK6basisu14basisu_backend16get_total_blocksEv(ptr noundef nonnull align 8 dereferenceable(336) %141)
          to label %1492 unwind label %1533

1492:                                             ; preds = %1486
  %1493 = uitofp i32 %1491 to float
  %1494 = fdiv float %1490, %1493
  %1495 = fpext float %1494 to double
  invoke void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef @.str.12, i32 noundef %1487, double noundef %1495)
          to label %1496 unwind label %1533

1496:                                             ; preds = %1492
  %1497 = load i32, ptr %7, align 4, !tbaa !31
  %1498 = load i32, ptr %7, align 4, !tbaa !31
  %1499 = uitofp i32 %1498 to float
  %1500 = fmul float %1499, 1.000000e+02
  %1501 = invoke noundef i32 @_ZNK6basisu14basisu_backend16get_total_blocksEv(ptr noundef nonnull align 8 dereferenceable(336) %141)
          to label %1502 unwind label %1533

1502:                                             ; preds = %1496
  %1503 = uitofp i32 %1501 to float
  %1504 = fdiv float %1500, %1503
  %1505 = fpext float %1504 to double
  %1506 = load i32, ptr %6, align 4, !tbaa !31
  %1507 = load i32, ptr %6, align 4, !tbaa !31
  %1508 = uitofp i32 %1507 to float
  %1509 = fmul float %1508, 1.000000e+02
  %1510 = invoke noundef i32 @_ZNK6basisu14basisu_backend16get_total_blocksEv(ptr noundef nonnull align 8 dereferenceable(336) %141)
          to label %1511 unwind label %1533

1511:                                             ; preds = %1502
  %1512 = uitofp i32 %1510 to float
  %1513 = fdiv float %1509, %1512
  %1514 = fpext float %1513 to double
  invoke void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef @.str.13, i32 noundef %1497, double noundef %1505, i32 noundef %1506, double noundef %1514)
          to label %1515 unwind label %1533

1515:                                             ; preds = %1511
  %1516 = load i32, ptr %20, align 4, !tbaa !31
  %1517 = icmp ne i32 %1516, 0
  br i1 %1517, label %1518, label %1546

1518:                                             ; preds = %1515
  %1519 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 1
  %1520 = getelementptr inbounds %"struct.basisu::basisu_backend_params", ptr %1519, i32 0, i32 6
  %1521 = load i32, ptr %1520, align 4, !tbaa !64
  %1522 = icmp ugt i32 %1521, 1
  br i1 %1522, label %1523, label %1546

1523:                                             ; preds = %1518
  %1524 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 1
  %1525 = getelementptr inbounds %"struct.basisu::basisu_backend_params", ptr %1524, i32 0, i32 12
  %1526 = load i8, ptr %1525, align 1, !tbaa !75, !range !39, !noundef !40
  %1527 = trunc i8 %1526 to i1
  br i1 %1527, label %1546, label %1528

1528:                                             ; preds = %1523
  call void @llvm.lifetime.start.p0(i64 16, ptr %105) #9
  invoke void @_ZN6basisu6vectorIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %105)
          to label %1529 unwind label %1537

1529:                                             ; preds = %1528
  %1530 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN6basisu15basisu_frontend29reoptimize_remapped_endpointsERKNS_6vectorIjEERNS1_IiEEbPS2_(ptr noundef nonnull align 8 dereferenceable(496) %1530, ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %105, i1 noundef zeroext false, ptr noundef %22)
          to label %1531 unwind label %1541

1531:                                             ; preds = %1529
  invoke void @_ZN6basisu14basisu_backend23create_endpoint_paletteEv(ptr noundef nonnull align 8 dereferenceable(336) %141)
          to label %1532 unwind label %1541

1532:                                             ; preds = %1531
  call void @_ZN6basisu6vectorIiED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %105) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %105) #9
  br label %1546

1533:                                             ; preds = %1547, %1546, %1511, %1502, %1496, %1492, %1486
  %1534 = landingpad { ptr, i32 }
          cleanup
  %1535 = extractvalue { ptr, i32 } %1534, 0
  store ptr %1535, ptr %10, align 8
  %1536 = extractvalue { ptr, i32 } %1534, 1
  store i32 %1536, ptr %11, align 4
  br label %2215

1537:                                             ; preds = %1528
  %1538 = landingpad { ptr, i32 }
          cleanup
  %1539 = extractvalue { ptr, i32 } %1538, 0
  store ptr %1539, ptr %10, align 8
  %1540 = extractvalue { ptr, i32 } %1538, 1
  store i32 %1540, ptr %11, align 4
  br label %1545

1541:                                             ; preds = %1531, %1529
  %1542 = landingpad { ptr, i32 }
          cleanup
  %1543 = extractvalue { ptr, i32 } %1542, 0
  store ptr %1543, ptr %10, align 8
  %1544 = extractvalue { ptr, i32 } %1542, 1
  store i32 %1544, ptr %11, align 4
  call void @_ZN6basisu6vectorIiED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %105) #9
  br label %1545

1545:                                             ; preds = %1541, %1537
  call void @llvm.lifetime.end.p0(i64 16, ptr %105) #9
  br label %2215

1546:                                             ; preds = %1532, %1523, %1518, %1515
  invoke void @_ZN6basisu14basisu_backend25check_for_valid_cr_blocksEv(ptr noundef nonnull align 8 dereferenceable(336) %141)
          to label %1547 unwind label %1533

1547:                                             ; preds = %1546
  invoke void @_ZN6basisu14basisu_backend18compute_slice_crcsEv(ptr noundef nonnull align 8 dereferenceable(336) %141)
          to label %1548 unwind label %1533

1548:                                             ; preds = %1547
  call void @llvm.lifetime.start.p0(i64 8, ptr %106) #9
  %1549 = invoke noundef double @_ZNK6basisu9histogram11get_entropyEv(ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %1550 unwind label %1576

1550:                                             ; preds = %1548
  %1551 = invoke noundef i64 @_ZNK6basisu9histogram9get_totalEv(ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %1552 unwind label %1576

1552:                                             ; preds = %1550
  %1553 = uitofp i64 %1551 to double
  %1554 = fdiv double %1549, %1553
  store double %1554, ptr %106, align 8, !tbaa !76
  call void @llvm.lifetime.start.p0(i64 8, ptr %107) #9
  %1555 = invoke noundef double @_ZNK6basisu9histogram11get_entropyEv(ptr noundef nonnull align 8 dereferenceable(16) %17)
          to label %1556 unwind label %1580

1556:                                             ; preds = %1552
  %1557 = invoke noundef i64 @_ZNK6basisu9histogram9get_totalEv(ptr noundef nonnull align 8 dereferenceable(16) %17)
          to label %1558 unwind label %1580

1558:                                             ; preds = %1556
  %1559 = uitofp i64 %1557 to double
  %1560 = fdiv double %1555, %1559
  store double %1560, ptr %107, align 8, !tbaa !76
  call void @llvm.lifetime.start.p0(i64 8, ptr %108) #9
  %1561 = invoke noundef double @_ZNK6basisu9histogram11get_entropyEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %1562 unwind label %1584

1562:                                             ; preds = %1558
  %1563 = invoke noundef i64 @_ZNK6basisu9histogram9get_totalEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %1564 unwind label %1584

1564:                                             ; preds = %1562
  %1565 = uitofp i64 %1563 to double
  %1566 = fdiv double %1561, %1565
  store double %1566, ptr %108, align 8, !tbaa !76
  %1567 = load double, ptr %106, align 8, !tbaa !76
  %1568 = load double, ptr %107, align 8, !tbaa !76
  %1569 = load double, ptr %108, align 8, !tbaa !76
  invoke void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef @.str.14, double noundef %1567, double noundef %1568, double noundef %1569)
          to label %1570 unwind label %1584

1570:                                             ; preds = %1564
  %1571 = invoke noundef i64 @_ZNK6basisu9histogram9get_totalEv(ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %1572 unwind label %1584

1572:                                             ; preds = %1570
  %1573 = icmp ne i64 %1571, 0
  br i1 %1573, label %1588, label %1574

1574:                                             ; preds = %1572
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %18, i32 noundef 0)
          to label %1575 unwind label %1584

1575:                                             ; preds = %1574
  br label %1588

1576:                                             ; preds = %1550, %1548
  %1577 = landingpad { ptr, i32 }
          cleanup
  %1578 = extractvalue { ptr, i32 } %1577, 0
  store ptr %1578, ptr %10, align 8
  %1579 = extractvalue { ptr, i32 } %1577, 1
  store i32 %1579, ptr %11, align 4
  br label %2214

1580:                                             ; preds = %1556, %1552
  %1581 = landingpad { ptr, i32 }
          cleanup
  %1582 = extractvalue { ptr, i32 } %1581, 0
  store ptr %1582, ptr %10, align 8
  %1583 = extractvalue { ptr, i32 } %1581, 1
  store i32 %1583, ptr %11, align 4
  br label %2213

1584:                                             ; preds = %1574, %1570, %1564, %1562, %1558
  %1585 = landingpad { ptr, i32 }
          cleanup
  %1586 = extractvalue { ptr, i32 } %1585, 0
  store ptr %1586, ptr %10, align 8
  %1587 = extractvalue { ptr, i32 } %1585, 1
  store i32 %1587, ptr %11, align 4
  br label %2212

1588:                                             ; preds = %1575, %1572
  call void @llvm.lifetime.start.p0(i64 32, ptr %109) #9
  invoke void @_ZN6basisu22huffman_encoding_tableC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %109)
          to label %1589 unwind label %1594

1589:                                             ; preds = %1588
  %1590 = invoke noundef zeroext i1 @_ZN6basisu22huffman_encoding_table4initERKNS_9histogramEj(ptr noundef nonnull align 8 dereferenceable(32) %109, ptr noundef nonnull align 8 dereferenceable(16) %18, i32 noundef 16)
          to label %1591 unwind label %1598

1591:                                             ; preds = %1589
  br i1 %1590, label %1602, label %1592

1592:                                             ; preds = %1591
  invoke void (ptr, ...) @_ZN6basisu12error_printfEPKcz(ptr noundef @.str.15)
          to label %1593 unwind label %1598

1593:                                             ; preds = %1592
  store i1 false, ptr %2, align 1
  store i32 1, ptr %24, align 4
  br label %2208

1594:                                             ; preds = %1588
  %1595 = landingpad { ptr, i32 }
          cleanup
  %1596 = extractvalue { ptr, i32 } %1595, 0
  store ptr %1596, ptr %10, align 8
  %1597 = extractvalue { ptr, i32 } %1595, 1
  store i32 %1597, ptr %11, align 4
  br label %2211

1598:                                             ; preds = %1606, %1602, %1592, %1589
  %1599 = landingpad { ptr, i32 }
          cleanup
  %1600 = extractvalue { ptr, i32 } %1599, 0
  store ptr %1600, ptr %10, align 8
  %1601 = extractvalue { ptr, i32 } %1599, 1
  store i32 %1601, ptr %11, align 4
  br label %2210

1602:                                             ; preds = %1591
  %1603 = invoke noundef i64 @_ZNK6basisu9histogram9get_totalEv(ptr noundef nonnull align 8 dereferenceable(16) %17)
          to label %1604 unwind label %1598

1604:                                             ; preds = %1602
  %1605 = icmp ne i64 %1603, 0
  br i1 %1605, label %1608, label %1606

1606:                                             ; preds = %1604
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %17, i32 noundef 0)
          to label %1607 unwind label %1598

1607:                                             ; preds = %1606
  br label %1608

1608:                                             ; preds = %1607, %1604
  call void @llvm.lifetime.start.p0(i64 32, ptr %110) #9
  invoke void @_ZN6basisu22huffman_encoding_tableC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %110)
          to label %1609 unwind label %1614

1609:                                             ; preds = %1608
  %1610 = invoke noundef zeroext i1 @_ZN6basisu22huffman_encoding_table4initERKNS_9histogramEj(ptr noundef nonnull align 8 dereferenceable(32) %110, ptr noundef nonnull align 8 dereferenceable(16) %17, i32 noundef 16)
          to label %1611 unwind label %1618

1611:                                             ; preds = %1609
  br i1 %1610, label %1622, label %1612

1612:                                             ; preds = %1611
  invoke void (ptr, ...) @_ZN6basisu12error_printfEPKcz(ptr noundef @.str.16)
          to label %1613 unwind label %1618

1613:                                             ; preds = %1612
  store i1 false, ptr %2, align 1
  store i32 1, ptr %24, align 4
  br label %2205

1614:                                             ; preds = %1608
  %1615 = landingpad { ptr, i32 }
          cleanup
  %1616 = extractvalue { ptr, i32 } %1615, 0
  store ptr %1616, ptr %10, align 8
  %1617 = extractvalue { ptr, i32 } %1615, 1
  store i32 %1617, ptr %11, align 4
  br label %2207

1618:                                             ; preds = %1626, %1622, %1612, %1609
  %1619 = landingpad { ptr, i32 }
          cleanup
  %1620 = extractvalue { ptr, i32 } %1619, 0
  store ptr %1620, ptr %10, align 8
  %1621 = extractvalue { ptr, i32 } %1619, 1
  store i32 %1621, ptr %11, align 4
  br label %2206

1622:                                             ; preds = %1611
  %1623 = invoke noundef i64 @_ZNK6basisu9histogram9get_totalEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %1624 unwind label %1618

1624:                                             ; preds = %1622
  %1625 = icmp ne i64 %1623, 0
  br i1 %1625, label %1628, label %1626

1626:                                             ; preds = %1624
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef 0)
          to label %1627 unwind label %1618

1627:                                             ; preds = %1626
  br label %1628

1628:                                             ; preds = %1627, %1624
  call void @llvm.lifetime.start.p0(i64 32, ptr %111) #9
  invoke void @_ZN6basisu22huffman_encoding_tableC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %111)
          to label %1629 unwind label %1634

1629:                                             ; preds = %1628
  %1630 = invoke noundef zeroext i1 @_ZN6basisu22huffman_encoding_table4initERKNS_9histogramEj(ptr noundef nonnull align 8 dereferenceable(32) %111, ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef 16)
          to label %1631 unwind label %1638

1631:                                             ; preds = %1629
  br i1 %1630, label %1642, label %1632

1632:                                             ; preds = %1631
  invoke void (ptr, ...) @_ZN6basisu12error_printfEPKcz(ptr noundef @.str.17)
          to label %1633 unwind label %1638

1633:                                             ; preds = %1632
  store i1 false, ptr %2, align 1
  store i32 1, ptr %24, align 4
  br label %2202

1634:                                             ; preds = %1628
  %1635 = landingpad { ptr, i32 }
          cleanup
  %1636 = extractvalue { ptr, i32 } %1635, 0
  store ptr %1636, ptr %10, align 8
  %1637 = extractvalue { ptr, i32 } %1635, 1
  store i32 %1637, ptr %11, align 4
  br label %2204

1638:                                             ; preds = %1646, %1642, %1632, %1629
  %1639 = landingpad { ptr, i32 }
          cleanup
  %1640 = extractvalue { ptr, i32 } %1639, 0
  store ptr %1640, ptr %10, align 8
  %1641 = extractvalue { ptr, i32 } %1639, 1
  store i32 %1641, ptr %11, align 4
  br label %2203

1642:                                             ; preds = %1631
  %1643 = invoke noundef i64 @_ZNK6basisu9histogram9get_totalEv(ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %1644 unwind label %1638

1644:                                             ; preds = %1642
  %1645 = icmp ne i64 %1643, 0
  br i1 %1645, label %1648, label %1646

1646:                                             ; preds = %1644
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %13, i32 noundef 0)
          to label %1647 unwind label %1638

1647:                                             ; preds = %1646
  br label %1648

1648:                                             ; preds = %1647, %1644
  call void @llvm.lifetime.start.p0(i64 32, ptr %112) #9
  invoke void @_ZN6basisu22huffman_encoding_tableC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %112)
          to label %1649 unwind label %1654

1649:                                             ; preds = %1648
  %1650 = invoke noundef zeroext i1 @_ZN6basisu22huffman_encoding_table4initERKNS_9histogramEj(ptr noundef nonnull align 8 dereferenceable(32) %112, ptr noundef nonnull align 8 dereferenceable(16) %13, i32 noundef 16)
          to label %1651 unwind label %1658

1651:                                             ; preds = %1649
  br i1 %1650, label %1662, label %1652

1652:                                             ; preds = %1651
  invoke void (ptr, ...) @_ZN6basisu12error_printfEPKcz(ptr noundef @.str.18)
          to label %1653 unwind label %1658

1653:                                             ; preds = %1652
  store i1 false, ptr %2, align 1
  store i32 1, ptr %24, align 4
  br label %2199

1654:                                             ; preds = %1648
  %1655 = landingpad { ptr, i32 }
          cleanup
  %1656 = extractvalue { ptr, i32 } %1655, 0
  store ptr %1656, ptr %10, align 8
  %1657 = extractvalue { ptr, i32 } %1655, 1
  store i32 %1657, ptr %11, align 4
  br label %2201

1658:                                             ; preds = %1652, %1649
  %1659 = landingpad { ptr, i32 }
          cleanup
  %1660 = extractvalue { ptr, i32 } %1659, 0
  store ptr %1660, ptr %10, align 8
  %1661 = extractvalue { ptr, i32 } %1659, 1
  store i32 %1661, ptr %11, align 4
  br label %2200

1662:                                             ; preds = %1651
  call void @llvm.lifetime.start.p0(i64 32, ptr %113) #9
  invoke void @_ZN6basisu13bitwise_coderC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %113)
          to label %1663 unwind label %1742

1663:                                             ; preds = %1662
  invoke void @_ZN6basisu13bitwise_coder4initEj(ptr noundef nonnull align 8 dereferenceable(32) %113, i32 noundef 4194304)
          to label %1664 unwind label %1746

1664:                                             ; preds = %1663
  call void @llvm.lifetime.start.p0(i64 4, ptr %114) #9
  %1665 = invoke noundef i32 @_ZN6basisu13bitwise_coder18emit_huffman_tableERKNS_22huffman_encoding_tableE(ptr noundef nonnull align 8 dereferenceable(32) %113, ptr noundef nonnull align 8 dereferenceable(32) %109)
          to label %1666 unwind label %1750

1666:                                             ; preds = %1664
  store i32 %1665, ptr %114, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %115) #9
  %1667 = invoke noundef i32 @_ZN6basisu13bitwise_coder18emit_huffman_tableERKNS_22huffman_encoding_tableE(ptr noundef nonnull align 8 dereferenceable(32) %113, ptr noundef nonnull align 8 dereferenceable(32) %110)
          to label %1668 unwind label %1754

1668:                                             ; preds = %1666
  store i32 %1667, ptr %115, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %116) #9
  %1669 = invoke noundef i32 @_ZN6basisu13bitwise_coder18emit_huffman_tableERKNS_22huffman_encoding_tableE(ptr noundef nonnull align 8 dereferenceable(32) %113, ptr noundef nonnull align 8 dereferenceable(32) %111)
          to label %1670 unwind label %1758

1670:                                             ; preds = %1668
  store i32 %1669, ptr %116, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %117) #9
  %1671 = invoke noundef i32 @_ZN6basisu13bitwise_coder18emit_huffman_tableERKNS_22huffman_encoding_tableE(ptr noundef nonnull align 8 dereferenceable(32) %113, ptr noundef nonnull align 8 dereferenceable(32) %112)
          to label %1672 unwind label %1762

1672:                                             ; preds = %1670
  store i32 %1671, ptr %117, align 4, !tbaa !31
  %1673 = invoke noundef i32 @_ZN6basisu13bitwise_coder8put_bitsEjj(ptr noundef nonnull align 8 dereferenceable(32) %113, i32 noundef 64, i32 noundef 13)
          to label %1674 unwind label %1762

1674:                                             ; preds = %1672
  %1675 = load i32, ptr %114, align 4, !tbaa !31
  %1676 = load i32, ptr %114, align 4, !tbaa !31
  %1677 = add i32 %1676, 7
  %1678 = udiv i32 %1677, 8
  %1679 = load i32, ptr %114, align 4, !tbaa !31
  %1680 = uitofp i32 %1679 to float
  %1681 = invoke noundef i32 @_ZNK6basisu14basisu_backend22get_total_input_texelsEv(ptr noundef nonnull align 8 dereferenceable(336) %141)
          to label %1682 unwind label %1762

1682:                                             ; preds = %1674
  %1683 = uitofp i32 %1681 to float
  %1684 = fdiv float %1680, %1683
  %1685 = fpext float %1684 to double
  %1686 = load i32, ptr %115, align 4, !tbaa !31
  %1687 = load i32, ptr %115, align 4, !tbaa !31
  %1688 = add i32 %1687, 7
  %1689 = udiv i32 %1688, 8
  %1690 = load i32, ptr %115, align 4, !tbaa !31
  %1691 = uitofp i32 %1690 to float
  %1692 = invoke noundef i32 @_ZNK6basisu14basisu_backend22get_total_input_texelsEv(ptr noundef nonnull align 8 dereferenceable(336) %141)
          to label %1693 unwind label %1762

1693:                                             ; preds = %1682
  %1694 = uitofp i32 %1692 to float
  %1695 = fdiv float %1691, %1694
  %1696 = fpext float %1695 to double
  %1697 = load i32, ptr %116, align 4, !tbaa !31
  %1698 = load i32, ptr %116, align 4, !tbaa !31
  %1699 = add i32 %1698, 7
  %1700 = udiv i32 %1699, 8
  %1701 = load i32, ptr %116, align 4, !tbaa !31
  %1702 = uitofp i32 %1701 to float
  %1703 = invoke noundef i32 @_ZNK6basisu14basisu_backend22get_total_input_texelsEv(ptr noundef nonnull align 8 dereferenceable(336) %141)
          to label %1704 unwind label %1762

1704:                                             ; preds = %1693
  %1705 = uitofp i32 %1703 to float
  %1706 = fdiv float %1702, %1705
  %1707 = fpext float %1706 to double
  %1708 = load i32, ptr %117, align 4, !tbaa !31
  %1709 = load i32, ptr %117, align 4, !tbaa !31
  %1710 = add i32 %1709, 7
  %1711 = udiv i32 %1710, 8
  %1712 = load i32, ptr %117, align 4, !tbaa !31
  %1713 = uitofp i32 %1712 to float
  %1714 = invoke noundef i32 @_ZNK6basisu14basisu_backend22get_total_input_texelsEv(ptr noundef nonnull align 8 dereferenceable(336) %141)
          to label %1715 unwind label %1762

1715:                                             ; preds = %1704
  %1716 = uitofp i32 %1714 to float
  %1717 = fdiv float %1713, %1716
  %1718 = fpext float %1717 to double
  invoke void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef @.str.19, i32 noundef %1675, i32 noundef %1678, double noundef %1685, i32 noundef %1686, i32 noundef %1689, double noundef %1696, i32 noundef %1697, i32 noundef %1700, double noundef %1707, i32 noundef %1708, i32 noundef %1711, double noundef %1718)
          to label %1719 unwind label %1762

1719:                                             ; preds = %1715
  %1720 = invoke noundef i32 @_ZN6basisu13bitwise_coder5flushEv(ptr noundef nonnull align 8 dereferenceable(32) %113)
          to label %1721 unwind label %1762

1721:                                             ; preds = %1719
  %1722 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6basisu13bitwise_coder9get_bytesEv(ptr noundef nonnull align 8 dereferenceable(32) %113)
          to label %1723 unwind label %1762

1723:                                             ; preds = %1721
  %1724 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 3
  %1725 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %1724, i32 0, i32 9
  %1726 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorIhEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %1725, ptr noundef nonnull align 8 dereferenceable(16) %1722)
          to label %1727 unwind label %1762

1727:                                             ; preds = %1723
  call void @llvm.lifetime.start.p0(i64 4, ptr %118) #9
  store i32 0, ptr %118, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %119) #9
  store i32 0, ptr %119, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %120) #9
  store i32 0, ptr %120, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %121) #9
  store i32 0, ptr %121, align 4, !tbaa !31
  %1728 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 3
  %1729 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %1728, i32 0, i32 10
  %1730 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 2
  %1731 = invoke noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %1730)
          to label %1732 unwind label %1766

1732:                                             ; preds = %1727
  %1733 = zext i32 %1731 to i64
  invoke void @_ZN6basisu6vectorINS0_IhEEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16) %1729, i64 noundef %1733, i1 noundef zeroext false)
          to label %1734 unwind label %1766

1734:                                             ; preds = %1732
  call void @llvm.lifetime.start.p0(i64 4, ptr %122) #9
  store i32 0, ptr %122, align 4, !tbaa !31
  br label %1735

1735:                                             ; preds = %2107, %1734
  %1736 = load i32, ptr %122, align 4, !tbaa !31
  %1737 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 2
  %1738 = invoke noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %1737)
          to label %1739 unwind label %1770

1739:                                             ; preds = %1735
  %1740 = icmp ult i32 %1736, %1738
  br i1 %1740, label %1774, label %1741

1741:                                             ; preds = %1739
  store i32 56, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %122) #9
  br label %2118

1742:                                             ; preds = %1662
  %1743 = landingpad { ptr, i32 }
          cleanup
  %1744 = extractvalue { ptr, i32 } %1743, 0
  store ptr %1744, ptr %10, align 8
  %1745 = extractvalue { ptr, i32 } %1743, 1
  store i32 %1745, ptr %11, align 4
  br label %2198

1746:                                             ; preds = %1663
  %1747 = landingpad { ptr, i32 }
          cleanup
  %1748 = extractvalue { ptr, i32 } %1747, 0
  store ptr %1748, ptr %10, align 8
  %1749 = extractvalue { ptr, i32 } %1747, 1
  store i32 %1749, ptr %11, align 4
  br label %2197

1750:                                             ; preds = %1664
  %1751 = landingpad { ptr, i32 }
          cleanup
  %1752 = extractvalue { ptr, i32 } %1751, 0
  store ptr %1752, ptr %10, align 8
  %1753 = extractvalue { ptr, i32 } %1751, 1
  store i32 %1753, ptr %11, align 4
  br label %2196

1754:                                             ; preds = %1666
  %1755 = landingpad { ptr, i32 }
          cleanup
  %1756 = extractvalue { ptr, i32 } %1755, 0
  store ptr %1756, ptr %10, align 8
  %1757 = extractvalue { ptr, i32 } %1755, 1
  store i32 %1757, ptr %11, align 4
  br label %2195

1758:                                             ; preds = %1668
  %1759 = landingpad { ptr, i32 }
          cleanup
  %1760 = extractvalue { ptr, i32 } %1759, 0
  store ptr %1760, ptr %10, align 8
  %1761 = extractvalue { ptr, i32 } %1759, 1
  store i32 %1761, ptr %11, align 4
  br label %2194

1762:                                             ; preds = %1723, %1721, %1719, %1715, %1704, %1693, %1682, %1674, %1672, %1670
  %1763 = landingpad { ptr, i32 }
          cleanup
  %1764 = extractvalue { ptr, i32 } %1763, 0
  store ptr %1764, ptr %10, align 8
  %1765 = extractvalue { ptr, i32 } %1763, 1
  store i32 %1765, ptr %11, align 4
  br label %2193

1766:                                             ; preds = %1732, %1727
  %1767 = landingpad { ptr, i32 }
          cleanup
  %1768 = extractvalue { ptr, i32 } %1767, 0
  store ptr %1768, ptr %10, align 8
  %1769 = extractvalue { ptr, i32 } %1767, 1
  store i32 %1769, ptr %11, align 4
  br label %2192

1770:                                             ; preds = %1735
  %1771 = landingpad { ptr, i32 }
          cleanup
  %1772 = extractvalue { ptr, i32 } %1771, 0
  store ptr %1772, ptr %10, align 8
  %1773 = extractvalue { ptr, i32 } %1771, 1
  store i32 %1773, ptr %11, align 4
  br label %2117

1774:                                             ; preds = %1739
  call void @llvm.lifetime.start.p0(i64 4, ptr %123) #9
  %1775 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 2
  %1776 = load i32, ptr %122, align 4, !tbaa !31
  %1777 = zext i32 %1776 to i64
  %1778 = invoke noundef nonnull align 4 dereferenceable(46) ptr @_ZN6basisu6vectorINS_25basisu_backend_slice_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %1775, i64 noundef %1777)
          to label %1779 unwind label %1795

1779:                                             ; preds = %1774
  %1780 = getelementptr inbounds %"struct.basisu::basisu_backend_slice_desc", ptr %1778, i32 0, i32 5
  %1781 = load i32, ptr %1780, align 4, !tbaa !34
  store i32 %1781, ptr %123, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %124) #9
  %1782 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 2
  %1783 = load i32, ptr %122, align 4, !tbaa !31
  %1784 = zext i32 %1783 to i64
  %1785 = invoke noundef nonnull align 4 dereferenceable(46) ptr @_ZN6basisu6vectorINS_25basisu_backend_slice_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %1782, i64 noundef %1784)
          to label %1786 unwind label %1799

1786:                                             ; preds = %1779
  %1787 = getelementptr inbounds %"struct.basisu::basisu_backend_slice_desc", ptr %1785, i32 0, i32 6
  %1788 = load i32, ptr %1787, align 4, !tbaa !35
  store i32 %1788, ptr %124, align 4, !tbaa !31
  invoke void @_ZN6basisu13bitwise_coder4initEj(ptr noundef nonnull align 8 dereferenceable(32) %113, i32 noundef 4194304)
          to label %1789 unwind label %1799

1789:                                             ; preds = %1786
  call void @llvm.lifetime.start.p0(i64 4, ptr %125) #9
  store i32 0, ptr %125, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %126) #9
  store i32 0, ptr %126, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %127) #9
  store i32 0, ptr %127, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %128) #9
  store i32 0, ptr %128, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %129) #9
  store i32 0, ptr %129, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %130) #9
  store i32 0, ptr %130, align 4, !tbaa !31
  br label %1790

1790:                                             ; preds = %2029, %1789
  %1791 = load i32, ptr %130, align 4, !tbaa !31
  %1792 = load i32, ptr %124, align 4, !tbaa !31
  %1793 = icmp ult i32 %1791, %1792
  br i1 %1793, label %1803, label %1794

1794:                                             ; preds = %1790
  store i32 59, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %130) #9
  br label %2032

1795:                                             ; preds = %1774
  %1796 = landingpad { ptr, i32 }
          cleanup
  %1797 = extractvalue { ptr, i32 } %1796, 0
  store ptr %1797, ptr %10, align 8
  %1798 = extractvalue { ptr, i32 } %1796, 1
  store i32 %1798, ptr %11, align 4
  br label %2116

1799:                                             ; preds = %1786, %1779
  %1800 = landingpad { ptr, i32 }
          cleanup
  %1801 = extractvalue { ptr, i32 } %1800, 0
  store ptr %1801, ptr %10, align 8
  %1802 = extractvalue { ptr, i32 } %1800, 1
  store i32 %1802, ptr %11, align 4
  br label %2115

1803:                                             ; preds = %1790
  call void @llvm.lifetime.start.p0(i64 4, ptr %131) #9
  store i32 0, ptr %131, align 4, !tbaa !31
  br label %1804

1804:                                             ; preds = %2023, %1803
  %1805 = load i32, ptr %131, align 4, !tbaa !31
  %1806 = load i32, ptr %123, align 4, !tbaa !31
  %1807 = icmp ult i32 %1805, %1806
  br i1 %1807, label %1809, label %1808

1808:                                             ; preds = %1804
  store i32 62, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %131) #9
  br label %2028

1809:                                             ; preds = %1804
  call void @llvm.lifetime.start.p0(i64 8, ptr %132) #9
  %1810 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 8
  %1811 = load i32, ptr %122, align 4, !tbaa !31
  %1812 = zext i32 %1811 to i64
  %1813 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN6basisu6vectorINS_8vector2DINS_13encoder_blockEEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %1810, i64 noundef %1812)
          to label %1814 unwind label %1832

1814:                                             ; preds = %1809
  %1815 = load i32, ptr %131, align 4, !tbaa !31
  %1816 = load i32, ptr %130, align 4, !tbaa !31
  %1817 = invoke noundef nonnull align 4 dereferenceable(17) ptr @_ZN6basisu8vector2DINS_13encoder_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %1813, i32 noundef %1815, i32 noundef %1816)
          to label %1818 unwind label %1832

1818:                                             ; preds = %1814
  store ptr %1817, ptr %132, align 8, !tbaa !5
  %1819 = load i32, ptr %131, align 4, !tbaa !31
  %1820 = and i32 %1819, 1
  %1821 = icmp eq i32 %1820, 0
  br i1 %1821, label %1822, label %1891

1822:                                             ; preds = %1818
  %1823 = load i32, ptr %130, align 4, !tbaa !31
  %1824 = and i32 %1823, 1
  %1825 = icmp eq i32 %1824, 0
  br i1 %1825, label %1826, label %1891

1826:                                             ; preds = %1822
  %1827 = load i32, ptr %127, align 4, !tbaa !31
  %1828 = icmp sgt i32 %1827, 0
  br i1 %1828, label %1829, label %1836

1829:                                             ; preds = %1826
  %1830 = load i32, ptr %127, align 4, !tbaa !31
  %1831 = add nsw i32 %1830, -1
  store i32 %1831, ptr %127, align 4, !tbaa !31
  br label %1890

1832:                                             ; preds = %1814, %1809
  %1833 = landingpad { ptr, i32 }
          cleanup
  %1834 = extractvalue { ptr, i32 } %1833, 0
  store ptr %1834, ptr %10, align 8
  %1835 = extractvalue { ptr, i32 } %1833, 1
  store i32 %1835, ptr %11, align 4
  br label %2027

1836:                                             ; preds = %1826
  call void @llvm.lifetime.start.p0(i64 4, ptr %133) #9
  %1837 = load i32, ptr %122, align 4, !tbaa !31
  %1838 = zext i32 %1837 to i64
  %1839 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %19, i64 noundef %1838)
          to label %1840 unwind label %1869

1840:                                             ; preds = %1836
  %1841 = load i32, ptr %128, align 4, !tbaa !31
  %1842 = add i32 %1841, 1
  store i32 %1842, ptr %128, align 4, !tbaa !31
  %1843 = zext i32 %1841 to i64
  %1844 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %1839, i64 noundef %1843)
          to label %1845 unwind label %1869

1845:                                             ; preds = %1840
  %1846 = load i32, ptr %1844, align 4, !tbaa !31
  store i32 %1846, ptr %133, align 4, !tbaa !31
  %1847 = load i32, ptr %133, align 4, !tbaa !31
  %1848 = icmp eq i32 %1847, 256
  br i1 %1848, label %1849, label %1883

1849:                                             ; preds = %1845
  %1850 = load i32, ptr %133, align 4, !tbaa !31
  %1851 = invoke noundef i32 @_ZN6basisu13bitwise_coder8put_codeEjRKNS_22huffman_encoding_tableE(ptr noundef nonnull align 8 dereferenceable(32) %113, i32 noundef %1850, ptr noundef nonnull align 8 dereferenceable(32) %109)
          to label %1852 unwind label %1869

1852:                                             ; preds = %1849
  %1853 = load i32, ptr %118, align 4, !tbaa !31
  %1854 = add i32 %1853, %1851
  store i32 %1854, ptr %118, align 4, !tbaa !31
  %1855 = load i32, ptr %122, align 4, !tbaa !31
  %1856 = zext i32 %1855 to i64
  %1857 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %19, i64 noundef %1856)
          to label %1858 unwind label %1869

1858:                                             ; preds = %1852
  %1859 = load i32, ptr %128, align 4, !tbaa !31
  %1860 = add i32 %1859, 1
  store i32 %1860, ptr %128, align 4, !tbaa !31
  %1861 = zext i32 %1859 to i64
  %1862 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %1857, i64 noundef %1861)
          to label %1863 unwind label %1869

1863:                                             ; preds = %1858
  %1864 = load i32, ptr %1862, align 4, !tbaa !31
  store i32 %1864, ptr %127, align 4, !tbaa !31
  %1865 = load i32, ptr %127, align 4, !tbaa !31
  %1866 = icmp sge i32 %1865, 3
  br i1 %1866, label %1867, label %1868

1867:                                             ; preds = %1863
  br label %1874

1868:                                             ; preds = %1863
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.6, i32 noundef 1293, ptr noundef @__PRETTY_FUNCTION__._ZN6basisu14basisu_backend12encode_imageEv) #10
  unreachable

1869:                                             ; preds = %1883, %1874, %1858, %1852, %1849, %1840, %1836
  %1870 = landingpad { ptr, i32 }
          cleanup
  %1871 = extractvalue { ptr, i32 } %1870, 0
  store ptr %1871, ptr %10, align 8
  %1872 = extractvalue { ptr, i32 } %1870, 1
  store i32 %1872, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %133) #9
  br label %2027

1873:                                             ; No predecessors!
  br label %1874

1874:                                             ; preds = %1873, %1867
  %1875 = load i32, ptr %127, align 4, !tbaa !31
  %1876 = sub i32 %1875, 3
  %1877 = invoke noundef i32 @_ZN6basisu13bitwise_coder7put_vlcEjj(ptr noundef nonnull align 8 dereferenceable(32) %113, i32 noundef %1876, i32 noundef 4)
          to label %1878 unwind label %1869

1878:                                             ; preds = %1874
  %1879 = load i32, ptr %118, align 4, !tbaa !31
  %1880 = add i32 %1879, %1877
  store i32 %1880, ptr %118, align 4, !tbaa !31
  %1881 = load i32, ptr %127, align 4, !tbaa !31
  %1882 = add nsw i32 %1881, -1
  store i32 %1882, ptr %127, align 4, !tbaa !31
  br label %1889

1883:                                             ; preds = %1845
  %1884 = load i32, ptr %133, align 4, !tbaa !31
  %1885 = invoke noundef i32 @_ZN6basisu13bitwise_coder8put_codeEjRKNS_22huffman_encoding_tableE(ptr noundef nonnull align 8 dereferenceable(32) %113, i32 noundef %1884, ptr noundef nonnull align 8 dereferenceable(32) %109)
          to label %1886 unwind label %1869

1886:                                             ; preds = %1883
  %1887 = load i32, ptr %118, align 4, !tbaa !31
  %1888 = add i32 %1887, %1885
  store i32 %1888, ptr %118, align 4, !tbaa !31
  br label %1889

1889:                                             ; preds = %1886, %1878
  call void @llvm.lifetime.end.p0(i64 4, ptr %133) #9
  br label %1890

1890:                                             ; preds = %1889, %1829
  br label %1891

1891:                                             ; preds = %1890, %1822, %1818
  call void @llvm.lifetime.start.p0(i64 4, ptr %134) #9
  %1892 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 9
  %1893 = load ptr, ptr %132, align 8, !tbaa !5
  %1894 = getelementptr inbounds %"struct.basisu::encoder_block", ptr %1893, i32 0, i32 1
  %1895 = load i32, ptr %1894, align 4, !tbaa !48
  %1896 = sext i32 %1895 to i64
  %1897 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %1892, i64 noundef %1896)
          to label %1898 unwind label %1916

1898:                                             ; preds = %1891
  %1899 = load i32, ptr %1897, align 4, !tbaa !31
  store i32 %1899, ptr %134, align 4, !tbaa !31
  %1900 = load ptr, ptr %132, align 8, !tbaa !5
  %1901 = getelementptr inbounds %"struct.basisu::encoder_block", ptr %1900, i32 0, i32 0
  %1902 = load i32, ptr %1901, align 4, !tbaa !36
  %1903 = icmp eq i32 %1902, 3
  br i1 %1903, label %1904, label %1930

1904:                                             ; preds = %1898
  call void @llvm.lifetime.start.p0(i64 4, ptr %135) #9
  %1905 = load i32, ptr %134, align 4, !tbaa !31
  %1906 = load i32, ptr %129, align 4, !tbaa !31
  %1907 = sub i32 %1905, %1906
  store i32 %1907, ptr %135, align 4, !tbaa !31
  %1908 = load i32, ptr %135, align 4, !tbaa !31
  %1909 = icmp slt i32 %1908, 0
  br i1 %1909, label %1910, label %1924

1910:                                             ; preds = %1904
  %1911 = load ptr, ptr %4, align 8, !tbaa !5
  %1912 = invoke noundef i32 @_ZNK6basisu15basisu_frontend27get_total_endpoint_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %1911)
          to label %1913 unwind label %1920

1913:                                             ; preds = %1910
  %1914 = load i32, ptr %135, align 4, !tbaa !31
  %1915 = add nsw i32 %1914, %1912
  store i32 %1915, ptr %135, align 4, !tbaa !31
  br label %1924

1916:                                             ; preds = %1891
  %1917 = landingpad { ptr, i32 }
          cleanup
  %1918 = extractvalue { ptr, i32 } %1917, 0
  store ptr %1918, ptr %10, align 8
  %1919 = extractvalue { ptr, i32 } %1917, 1
  store i32 %1919, ptr %11, align 4
  br label %2026

1920:                                             ; preds = %1924, %1910
  %1921 = landingpad { ptr, i32 }
          cleanup
  %1922 = extractvalue { ptr, i32 } %1921, 0
  store ptr %1922, ptr %10, align 8
  %1923 = extractvalue { ptr, i32 } %1921, 1
  store i32 %1923, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %135) #9
  br label %2026

1924:                                             ; preds = %1913, %1904
  %1925 = load i32, ptr %135, align 4, !tbaa !31
  %1926 = invoke noundef i32 @_ZN6basisu13bitwise_coder8put_codeEjRKNS_22huffman_encoding_tableE(ptr noundef nonnull align 8 dereferenceable(32) %113, i32 noundef %1925, ptr noundef nonnull align 8 dereferenceable(32) %110)
          to label %1927 unwind label %1920

1927:                                             ; preds = %1924
  %1928 = load i32, ptr %119, align 4, !tbaa !31
  %1929 = add i32 %1928, %1926
  store i32 %1929, ptr %119, align 4, !tbaa !31
  call void @llvm.lifetime.end.p0(i64 4, ptr %135) #9
  br label %1930

1930:                                             ; preds = %1927, %1898
  %1931 = load i32, ptr %134, align 4, !tbaa !31
  store i32 %1931, ptr %129, align 4, !tbaa !31
  %1932 = load i8, ptr %5, align 1, !tbaa !30, !range !39, !noundef !40
  %1933 = trunc i8 %1932 to i1
  br i1 %1933, label %1934, label %1939

1934:                                             ; preds = %1930
  %1935 = load ptr, ptr %132, align 8, !tbaa !5
  %1936 = getelementptr inbounds %"struct.basisu::encoder_block", ptr %1935, i32 0, i32 0
  %1937 = load i32, ptr %1936, align 4, !tbaa !36
  %1938 = icmp ne i32 %1937, 2
  br i1 %1938, label %1939, label %2022

1939:                                             ; preds = %1934, %1930
  %1940 = load i32, ptr %126, align 4, !tbaa !31
  %1941 = icmp ne i32 %1940, 0
  br i1 %1941, label %2015, label %1942

1942:                                             ; preds = %1939
  call void @llvm.lifetime.start.p0(i64 4, ptr %136) #9
  %1943 = load i32, ptr %122, align 4, !tbaa !31
  %1944 = zext i32 %1943 to i64
  %1945 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %14, i64 noundef %1944)
          to label %1946 unwind label %1967

1946:                                             ; preds = %1942
  %1947 = load i32, ptr %125, align 4, !tbaa !31
  %1948 = add i32 %1947, 1
  store i32 %1948, ptr %125, align 4, !tbaa !31
  %1949 = zext i32 %1947 to i64
  %1950 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %1945, i64 noundef %1949)
          to label %1951 unwind label %1967

1951:                                             ; preds = %1946
  %1952 = load i32, ptr %1950, align 4, !tbaa !31
  store i32 %1952, ptr %136, align 4, !tbaa !31
  %1953 = load i32, ptr %136, align 4, !tbaa !31
  %1954 = load i32, ptr %16, align 4, !tbaa !31
  %1955 = icmp eq i32 %1953, %1954
  br i1 %1955, label %1956, label %1971

1956:                                             ; preds = %1951
  %1957 = load i32, ptr %122, align 4, !tbaa !31
  %1958 = zext i32 %1957 to i64
  %1959 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %14, i64 noundef %1958)
          to label %1960 unwind label %1967

1960:                                             ; preds = %1956
  %1961 = load i32, ptr %125, align 4, !tbaa !31
  %1962 = add i32 %1961, 1
  store i32 %1962, ptr %125, align 4, !tbaa !31
  %1963 = zext i32 %1961 to i64
  %1964 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %1959, i64 noundef %1963)
          to label %1965 unwind label %1967

1965:                                             ; preds = %1960
  %1966 = load i32, ptr %1964, align 4, !tbaa !31
  store i32 %1966, ptr %126, align 4, !tbaa !31
  br label %1971

1967:                                             ; preds = %1971, %1960, %1956, %1946, %1942
  %1968 = landingpad { ptr, i32 }
          cleanup
  %1969 = extractvalue { ptr, i32 } %1968, 0
  store ptr %1969, ptr %10, align 8
  %1970 = extractvalue { ptr, i32 } %1968, 1
  store i32 %1970, ptr %11, align 4
  br label %2014

1971:                                             ; preds = %1965, %1951
  %1972 = load i32, ptr %136, align 4, !tbaa !31
  %1973 = invoke noundef i32 @_ZN6basisu13bitwise_coder8put_codeEjRKNS_22huffman_encoding_tableE(ptr noundef nonnull align 8 dereferenceable(32) %113, i32 noundef %1972, ptr noundef nonnull align 8 dereferenceable(32) %111)
          to label %1974 unwind label %1967

1974:                                             ; preds = %1971
  %1975 = load i32, ptr %120, align 4, !tbaa !31
  %1976 = add i32 %1975, %1973
  store i32 %1976, ptr %120, align 4, !tbaa !31
  %1977 = load i32, ptr %136, align 4, !tbaa !31
  %1978 = load i32, ptr %16, align 4, !tbaa !31
  %1979 = icmp eq i32 %1977, %1978
  br i1 %1979, label %1980, label %2013

1980:                                             ; preds = %1974
  call void @llvm.lifetime.start.p0(i64 4, ptr %137) #9
  %1981 = load i32, ptr %126, align 4, !tbaa !31
  %1982 = sub i32 %1981, 3
  store i32 %1982, ptr %137, align 4, !tbaa !31
  %1983 = load i32, ptr %137, align 4, !tbaa !31
  %1984 = icmp sge i32 %1983, 63
  br i1 %1984, label %1985, label %2005

1985:                                             ; preds = %1980
  %1986 = invoke noundef i32 @_ZN6basisu13bitwise_coder8put_codeEjRKNS_22huffman_encoding_tableE(ptr noundef nonnull align 8 dereferenceable(32) %113, i32 noundef 63, ptr noundef nonnull align 8 dereferenceable(32) %112)
          to label %1987 unwind label %1997

1987:                                             ; preds = %1985
  %1988 = load i32, ptr %120, align 4, !tbaa !31
  %1989 = add i32 %1988, %1986
  store i32 %1989, ptr %120, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %138) #9
  %1990 = load i32, ptr %126, align 4, !tbaa !31
  %1991 = sub i32 %1990, 3
  store i32 %1991, ptr %138, align 4, !tbaa !31
  %1992 = load i32, ptr %138, align 4, !tbaa !31
  %1993 = invoke noundef i32 @_ZN6basisu13bitwise_coder7put_vlcEjj(ptr noundef nonnull align 8 dereferenceable(32) %113, i32 noundef %1992, i32 noundef 7)
          to label %1994 unwind label %2001

1994:                                             ; preds = %1987
  %1995 = load i32, ptr %120, align 4, !tbaa !31
  %1996 = add i32 %1995, %1993
  store i32 %1996, ptr %120, align 4, !tbaa !31
  call void @llvm.lifetime.end.p0(i64 4, ptr %138) #9
  br label %2011

1997:                                             ; preds = %2005, %1985
  %1998 = landingpad { ptr, i32 }
          cleanup
  %1999 = extractvalue { ptr, i32 } %1998, 0
  store ptr %1999, ptr %10, align 8
  %2000 = extractvalue { ptr, i32 } %1998, 1
  store i32 %2000, ptr %11, align 4
  br label %2012

2001:                                             ; preds = %1987
  %2002 = landingpad { ptr, i32 }
          cleanup
  %2003 = extractvalue { ptr, i32 } %2002, 0
  store ptr %2003, ptr %10, align 8
  %2004 = extractvalue { ptr, i32 } %2002, 1
  store i32 %2004, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %138) #9
  br label %2012

2005:                                             ; preds = %1980
  %2006 = load i32, ptr %137, align 4, !tbaa !31
  %2007 = invoke noundef i32 @_ZN6basisu13bitwise_coder8put_codeEjRKNS_22huffman_encoding_tableE(ptr noundef nonnull align 8 dereferenceable(32) %113, i32 noundef %2006, ptr noundef nonnull align 8 dereferenceable(32) %112)
          to label %2008 unwind label %1997

2008:                                             ; preds = %2005
  %2009 = load i32, ptr %120, align 4, !tbaa !31
  %2010 = add i32 %2009, %2007
  store i32 %2010, ptr %120, align 4, !tbaa !31
  br label %2011

2011:                                             ; preds = %2008, %1994
  call void @llvm.lifetime.end.p0(i64 4, ptr %137) #9
  br label %2013

2012:                                             ; preds = %2001, %1997
  call void @llvm.lifetime.end.p0(i64 4, ptr %137) #9
  br label %2014

2013:                                             ; preds = %2011, %1974
  call void @llvm.lifetime.end.p0(i64 4, ptr %136) #9
  br label %2015

2014:                                             ; preds = %2012, %1967
  call void @llvm.lifetime.end.p0(i64 4, ptr %136) #9
  br label %2026

2015:                                             ; preds = %2013, %1939
  %2016 = load i32, ptr %126, align 4, !tbaa !31
  %2017 = icmp ne i32 %2016, 0
  br i1 %2017, label %2018, label %2021

2018:                                             ; preds = %2015
  %2019 = load i32, ptr %126, align 4, !tbaa !31
  %2020 = add i32 %2019, -1
  store i32 %2020, ptr %126, align 4, !tbaa !31
  br label %2021

2021:                                             ; preds = %2018, %2015
  br label %2022

2022:                                             ; preds = %2021, %1934
  call void @llvm.lifetime.end.p0(i64 4, ptr %134) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %132) #9
  br label %2023

2023:                                             ; preds = %2022
  %2024 = load i32, ptr %131, align 4, !tbaa !31
  %2025 = add i32 %2024, 1
  store i32 %2025, ptr %131, align 4, !tbaa !31
  br label %1804, !llvm.loop !78

2026:                                             ; preds = %2014, %1920, %1916
  call void @llvm.lifetime.end.p0(i64 4, ptr %134) #9
  br label %2027

2027:                                             ; preds = %2026, %1869, %1832
  call void @llvm.lifetime.end.p0(i64 8, ptr %132) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %131) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %130) #9
  br label %2114

2028:                                             ; preds = %1808
  br label %2029

2029:                                             ; preds = %2028
  %2030 = load i32, ptr %130, align 4, !tbaa !31
  %2031 = add i32 %2030, 1
  store i32 %2031, ptr %130, align 4, !tbaa !31
  br label %1790, !llvm.loop !79

2032:                                             ; preds = %1794
  %2033 = load i32, ptr %128, align 4, !tbaa !31
  %2034 = load i32, ptr %122, align 4, !tbaa !31
  %2035 = zext i32 %2034 to i64
  %2036 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %19, i64 noundef %2035)
          to label %2037 unwind label %2110

2037:                                             ; preds = %2032
  %2038 = invoke noundef i32 @_ZNK6basisu6vectorIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %2036)
          to label %2039 unwind label %2110

2039:                                             ; preds = %2037
  %2040 = icmp eq i32 %2033, %2038
  invoke void @_ZN6basisuL6verifyEbi(i1 noundef zeroext %2040, i32 noundef 1355)
          to label %2041 unwind label %2110

2041:                                             ; preds = %2039
  %2042 = load i32, ptr %125, align 4, !tbaa !31
  %2043 = load i32, ptr %122, align 4, !tbaa !31
  %2044 = zext i32 %2043 to i64
  %2045 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %14, i64 noundef %2044)
          to label %2046 unwind label %2110

2046:                                             ; preds = %2041
  %2047 = invoke noundef i32 @_ZNK6basisu6vectorIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %2045)
          to label %2048 unwind label %2110

2048:                                             ; preds = %2046
  %2049 = icmp eq i32 %2042, %2047
  invoke void @_ZN6basisuL6verifyEbi(i1 noundef zeroext %2049, i32 noundef 1356)
          to label %2050 unwind label %2110

2050:                                             ; preds = %2048
  %2051 = invoke noundef i32 @_ZN6basisu13bitwise_coder5flushEv(ptr noundef nonnull align 8 dereferenceable(32) %113)
          to label %2052 unwind label %2110

2052:                                             ; preds = %2050
  %2053 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6basisu13bitwise_coder9get_bytesEv(ptr noundef nonnull align 8 dereferenceable(32) %113)
          to label %2054 unwind label %2110

2054:                                             ; preds = %2052
  %2055 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 3
  %2056 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %2055, i32 0, i32 10
  %2057 = load i32, ptr %122, align 4, !tbaa !31
  %2058 = zext i32 %2057 to i64
  %2059 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IhEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %2056, i64 noundef %2058)
          to label %2060 unwind label %2110

2060:                                             ; preds = %2054
  %2061 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorIhEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %2059, ptr noundef nonnull align 8 dereferenceable(16) %2053)
          to label %2062 unwind label %2110

2062:                                             ; preds = %2060
  %2063 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6basisu13bitwise_coder9get_bytesEv(ptr noundef nonnull align 8 dereferenceable(32) %113)
          to label %2064 unwind label %2110

2064:                                             ; preds = %2062
  %2065 = invoke noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %2063)
          to label %2066 unwind label %2110

2066:                                             ; preds = %2064
  %2067 = load i32, ptr %121, align 4, !tbaa !31
  %2068 = add i32 %2067, %2065
  store i32 %2068, ptr %121, align 4, !tbaa !31
  %2069 = load i32, ptr %122, align 4, !tbaa !31
  %2070 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 3
  %2071 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %2070, i32 0, i32 10
  %2072 = load i32, ptr %122, align 4, !tbaa !31
  %2073 = zext i32 %2072 to i64
  %2074 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IhEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %2071, i64 noundef %2073)
          to label %2075 unwind label %2110

2075:                                             ; preds = %2066
  %2076 = invoke noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %2074)
          to label %2077 unwind label %2110

2077:                                             ; preds = %2075
  %2078 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 3
  %2079 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %2078, i32 0, i32 10
  %2080 = load i32, ptr %122, align 4, !tbaa !31
  %2081 = zext i32 %2080 to i64
  %2082 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IhEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %2079, i64 noundef %2081)
          to label %2083 unwind label %2110

2083:                                             ; preds = %2077
  %2084 = invoke noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %2082)
          to label %2085 unwind label %2110

2085:                                             ; preds = %2083
  %2086 = uitofp i32 %2084 to float
  %2087 = fmul float %2086, 8.000000e+00
  %2088 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 2
  %2089 = load i32, ptr %122, align 4, !tbaa !31
  %2090 = zext i32 %2089 to i64
  %2091 = invoke noundef nonnull align 4 dereferenceable(46) ptr @_ZN6basisu6vectorINS_25basisu_backend_slice_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %2088, i64 noundef %2090)
          to label %2092 unwind label %2110

2092:                                             ; preds = %2085
  %2093 = getelementptr inbounds %"struct.basisu::basisu_backend_slice_desc", ptr %2091, i32 0, i32 1
  %2094 = load i32, ptr %2093, align 4, !tbaa !80
  %2095 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 2
  %2096 = load i32, ptr %122, align 4, !tbaa !31
  %2097 = zext i32 %2096 to i64
  %2098 = invoke noundef nonnull align 4 dereferenceable(46) ptr @_ZN6basisu6vectorINS_25basisu_backend_slice_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %2095, i64 noundef %2097)
          to label %2099 unwind label %2110

2099:                                             ; preds = %2092
  %2100 = getelementptr inbounds %"struct.basisu::basisu_backend_slice_desc", ptr %2098, i32 0, i32 2
  %2101 = load i32, ptr %2100, align 4, !tbaa !81
  %2102 = mul i32 %2094, %2101
  %2103 = uitofp i32 %2102 to float
  %2104 = fdiv float %2087, %2103
  %2105 = fpext float %2104 to double
  invoke void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef @.str.21, i32 noundef %2069, i32 noundef %2076, double noundef %2105)
          to label %2106 unwind label %2110

2106:                                             ; preds = %2099
  call void @llvm.lifetime.end.p0(i64 4, ptr %129) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %128) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %127) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %126) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %125) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %124) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %123) #9
  br label %2107

2107:                                             ; preds = %2106
  %2108 = load i32, ptr %122, align 4, !tbaa !31
  %2109 = add i32 %2108, 1
  store i32 %2109, ptr %122, align 4, !tbaa !31
  br label %1735, !llvm.loop !82

2110:                                             ; preds = %2099, %2092, %2085, %2083, %2077, %2075, %2066, %2064, %2062, %2060, %2054, %2052, %2050, %2048, %2046, %2041, %2039, %2037, %2032
  %2111 = landingpad { ptr, i32 }
          cleanup
  %2112 = extractvalue { ptr, i32 } %2111, 0
  store ptr %2112, ptr %10, align 8
  %2113 = extractvalue { ptr, i32 } %2111, 1
  store i32 %2113, ptr %11, align 4
  br label %2114

2114:                                             ; preds = %2110, %2027
  call void @llvm.lifetime.end.p0(i64 4, ptr %129) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %128) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %127) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %126) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %125) #9
  br label %2115

2115:                                             ; preds = %2114, %1799
  call void @llvm.lifetime.end.p0(i64 4, ptr %124) #9
  br label %2116

2116:                                             ; preds = %2115, %1795
  call void @llvm.lifetime.end.p0(i64 4, ptr %123) #9
  br label %2117

2117:                                             ; preds = %2116, %1770
  call void @llvm.lifetime.end.p0(i64 4, ptr %122) #9
  br label %2192

2118:                                             ; preds = %1741
  call void @llvm.lifetime.start.p0(i64 8, ptr %139) #9
  %2119 = invoke noundef i32 @_ZNK6basisu14basisu_backend22get_total_input_texelsEv(ptr noundef nonnull align 8 dereferenceable(336) %141)
          to label %2120 unwind label %2183

2120:                                             ; preds = %2118
  %2121 = uitofp i32 %2119 to double
  store double %2121, ptr %139, align 8, !tbaa !76
  call void @llvm.lifetime.start.p0(i64 8, ptr %140) #9
  %2122 = invoke noundef i32 @_ZNK6basisu14basisu_backend16get_total_blocksEv(ptr noundef nonnull align 8 dereferenceable(336) %141)
          to label %2123 unwind label %2187

2123:                                             ; preds = %2120
  %2124 = uitofp i32 %2122 to double
  store double %2124, ptr %140, align 8, !tbaa !76
  %2125 = load i32, ptr %118, align 4, !tbaa !31
  %2126 = load i32, ptr %118, align 4, !tbaa !31
  %2127 = udiv i32 %2126, 8
  %2128 = load i32, ptr %118, align 4, !tbaa !31
  %2129 = uitofp i32 %2128 to double
  %2130 = load double, ptr %139, align 8, !tbaa !76
  %2131 = fdiv double %2129, %2130
  %2132 = load i32, ptr %118, align 4, !tbaa !31
  %2133 = uitofp i32 %2132 to double
  %2134 = load double, ptr %140, align 8, !tbaa !76
  %2135 = fdiv double %2133, %2134
  invoke void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef @.str.22, i32 noundef %2125, i32 noundef %2127, double noundef %2131, double noundef %2135)
          to label %2136 unwind label %2187

2136:                                             ; preds = %2123
  %2137 = load i32, ptr %119, align 4, !tbaa !31
  %2138 = load i32, ptr %119, align 4, !tbaa !31
  %2139 = udiv i32 %2138, 8
  %2140 = load i32, ptr %119, align 4, !tbaa !31
  %2141 = uitofp i32 %2140 to double
  %2142 = load double, ptr %139, align 8, !tbaa !76
  %2143 = fdiv double %2141, %2142
  %2144 = load i32, ptr %119, align 4, !tbaa !31
  %2145 = uitofp i32 %2144 to double
  %2146 = load double, ptr %140, align 8, !tbaa !76
  %2147 = fdiv double %2145, %2146
  invoke void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef @.str.23, i32 noundef %2137, i32 noundef %2139, double noundef %2143, double noundef %2147)
          to label %2148 unwind label %2187

2148:                                             ; preds = %2136
  %2149 = load i32, ptr %120, align 4, !tbaa !31
  %2150 = load i32, ptr %120, align 4, !tbaa !31
  %2151 = udiv i32 %2150, 8
  %2152 = load i32, ptr %120, align 4, !tbaa !31
  %2153 = uitofp i32 %2152 to double
  %2154 = load double, ptr %139, align 8, !tbaa !76
  %2155 = fdiv double %2153, %2154
  %2156 = load i32, ptr %120, align 4, !tbaa !31
  %2157 = uitofp i32 %2156 to double
  %2158 = load double, ptr %140, align 8, !tbaa !76
  %2159 = fdiv double %2157, %2158
  invoke void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef @.str.24, i32 noundef %2149, i32 noundef %2151, double noundef %2155, double noundef %2159)
          to label %2160 unwind label %2187

2160:                                             ; preds = %2148
  %2161 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 3
  %2162 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %2161, i32 0, i32 9
  %2163 = invoke noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %2162)
          to label %2164 unwind label %2187

2164:                                             ; preds = %2160
  %2165 = getelementptr inbounds %"class.basisu::basisu_backend", ptr %141, i32 0, i32 3
  %2166 = getelementptr inbounds %"struct.basisu::basisu_backend_output", ptr %2165, i32 0, i32 9
  %2167 = invoke noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %2166)
          to label %2168 unwind label %2187

2168:                                             ; preds = %2164
  %2169 = uitofp i32 %2167 to float
  %2170 = fmul float %2169, 8.000000e+00
  %2171 = fpext float %2170 to double
  %2172 = load double, ptr %139, align 8, !tbaa !76
  %2173 = fdiv double %2171, %2172
  invoke void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef @.str.25, i32 noundef %2163, double noundef %2173)
          to label %2174 unwind label %2187

2174:                                             ; preds = %2168
  %2175 = load i32, ptr %121, align 4, !tbaa !31
  %2176 = load i32, ptr %121, align 4, !tbaa !31
  %2177 = uitofp i32 %2176 to float
  %2178 = fmul float %2177, 8.000000e+00
  %2179 = fpext float %2178 to double
  %2180 = load double, ptr %139, align 8, !tbaa !76
  %2181 = fdiv double %2179, %2180
  invoke void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef @.str.26, i32 noundef %2175, double noundef %2181)
          to label %2182 unwind label %2187

2182:                                             ; preds = %2174
  store i1 true, ptr %2, align 1
  store i32 1, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %140) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %139) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %121) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %120) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %119) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %118) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %117) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %116) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %115) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %114) #9
  call void @_ZN6basisu13bitwise_coderD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %113) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %113) #9
  br label %2199

2183:                                             ; preds = %2118
  %2184 = landingpad { ptr, i32 }
          cleanup
  %2185 = extractvalue { ptr, i32 } %2184, 0
  store ptr %2185, ptr %10, align 8
  %2186 = extractvalue { ptr, i32 } %2184, 1
  store i32 %2186, ptr %11, align 4
  br label %2191

2187:                                             ; preds = %2174, %2168, %2164, %2160, %2148, %2136, %2123, %2120
  %2188 = landingpad { ptr, i32 }
          cleanup
  %2189 = extractvalue { ptr, i32 } %2188, 0
  store ptr %2189, ptr %10, align 8
  %2190 = extractvalue { ptr, i32 } %2188, 1
  store i32 %2190, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %140) #9
  br label %2191

2191:                                             ; preds = %2187, %2183
  call void @llvm.lifetime.end.p0(i64 8, ptr %139) #9
  br label %2192

2192:                                             ; preds = %2191, %2117, %1766
  call void @llvm.lifetime.end.p0(i64 4, ptr %121) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %120) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %119) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %118) #9
  br label %2193

2193:                                             ; preds = %2192, %1762
  call void @llvm.lifetime.end.p0(i64 4, ptr %117) #9
  br label %2194

2194:                                             ; preds = %2193, %1758
  call void @llvm.lifetime.end.p0(i64 4, ptr %116) #9
  br label %2195

2195:                                             ; preds = %2194, %1754
  call void @llvm.lifetime.end.p0(i64 4, ptr %115) #9
  br label %2196

2196:                                             ; preds = %2195, %1750
  call void @llvm.lifetime.end.p0(i64 4, ptr %114) #9
  br label %2197

2197:                                             ; preds = %2196, %1746
  call void @_ZN6basisu13bitwise_coderD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %113) #9
  br label %2198

2198:                                             ; preds = %2197, %1742
  call void @llvm.lifetime.end.p0(i64 32, ptr %113) #9
  br label %2200

2199:                                             ; preds = %2182, %1653
  call void @_ZN6basisu22huffman_encoding_tableD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %112) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %112) #9
  br label %2202

2200:                                             ; preds = %2198, %1658
  call void @_ZN6basisu22huffman_encoding_tableD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %112) #9
  br label %2201

2201:                                             ; preds = %2200, %1654
  call void @llvm.lifetime.end.p0(i64 32, ptr %112) #9
  br label %2203

2202:                                             ; preds = %2199, %1633
  call void @_ZN6basisu22huffman_encoding_tableD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %111) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %111) #9
  br label %2205

2203:                                             ; preds = %2201, %1638
  call void @_ZN6basisu22huffman_encoding_tableD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %111) #9
  br label %2204

2204:                                             ; preds = %2203, %1634
  call void @llvm.lifetime.end.p0(i64 32, ptr %111) #9
  br label %2206

2205:                                             ; preds = %2202, %1613
  call void @_ZN6basisu22huffman_encoding_tableD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %110) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %110) #9
  br label %2208

2206:                                             ; preds = %2204, %1618
  call void @_ZN6basisu22huffman_encoding_tableD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %110) #9
  br label %2207

2207:                                             ; preds = %2206, %1614
  call void @llvm.lifetime.end.p0(i64 32, ptr %110) #9
  br label %2210

2208:                                             ; preds = %2205, %1593
  call void @_ZN6basisu22huffman_encoding_tableD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %109) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %109) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %108) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %107) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %106) #9
  call void @_ZN6basisu6vectorIjED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #9
  call void @_ZN6basisu6vectorIjED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  call void @_ZN6basisu6vectorINS0_IjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #9
  call void @_ZN6basisu9histogramD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #9
  call void @_ZN6basisu9histogramD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  call void @_ZN6basisu6vectorINS0_IjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #9
  call void @_ZN6basisu9histogramD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #9
  call void @_ZN6basisu9histogramD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #9
  call void @_ZN6basisu9histogramD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #9
  call void @_ZN6basist20approx_move_to_frontD2Ev(ptr noundef nonnull align 8 dereferenceable(20) %8) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #9
  %2209 = load i1, ptr %2, align 1
  ret i1 %2209

2210:                                             ; preds = %2207, %1598
  call void @_ZN6basisu22huffman_encoding_tableD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %109) #9
  br label %2211

2211:                                             ; preds = %2210, %1594
  call void @llvm.lifetime.end.p0(i64 32, ptr %109) #9
  br label %2212

2212:                                             ; preds = %2211, %1584
  call void @llvm.lifetime.end.p0(i64 8, ptr %108) #9
  br label %2213

2213:                                             ; preds = %2212, %1580
  call void @llvm.lifetime.end.p0(i64 8, ptr %107) #9
  br label %2214

2214:                                             ; preds = %2213, %1576
  call void @llvm.lifetime.end.p0(i64 8, ptr %106) #9
  br label %2215

2215:                                             ; preds = %2214, %1545, %1533, %1485
  call void @_ZN6basisu6vectorIjED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #9
  br label %2216

2216:                                             ; preds = %2215, %234
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #9
  call void @_ZN6basisu6vectorIjED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #9
  br label %2217

2217:                                             ; preds = %2216, %230
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  call void @_ZN6basisu6vectorINS0_IjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #9
  br label %2218

2218:                                             ; preds = %2217, %226
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #9
  call void @_ZN6basisu9histogramD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #9
  br label %2219

2219:                                             ; preds = %2218, %222
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #9
  call void @_ZN6basisu9histogramD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #9
  br label %2220

2220:                                             ; preds = %2219, %218
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #9
  br label %2221

2221:                                             ; preds = %2220, %214
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  br label %2222

2222:                                             ; preds = %2221, %210
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  call void @_ZN6basisu6vectorINS0_IjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #9
  br label %2223

2223:                                             ; preds = %2222, %206
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #9
  call void @_ZN6basisu9histogramD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #9
  br label %2224

2224:                                             ; preds = %2223, %202
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #9
  call void @_ZN6basisu9histogramD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #9
  br label %2225

2225:                                             ; preds = %2224, %198
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #9
  call void @_ZN6basisu9histogramD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #9
  br label %2226

2226:                                             ; preds = %2225, %194
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #9
  call void @_ZN6basist20approx_move_to_frontD2Ev(ptr noundef nonnull align 8 dereferenceable(20) %8) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #9
  br label %2227

2227:                                             ; preds = %2226
  %2228 = load ptr, ptr %10, align 8
  %2229 = load i32, ptr %11, align 4
  %2230 = insertvalue { ptr, i32 } poison, ptr %2228, 0
  %2231 = insertvalue { ptr, i32 } %2230, i32 %2229, 1
  resume { ptr, i32 } %2231

2232:                                             ; preds = %740
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basist20approx_move_to_frontC2Ej(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu9histogramC2Ej(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu6vectorINS0_IjEEEC2Em(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu6vectorItE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i1 noundef zeroext) #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basist20approx_move_to_front5resetEv(ptr noundef nonnull align 8 dereferenceable(20)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu8vector2DIhEC2Ejj(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6basisu4iabsEi(i32 noundef) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK6basist20approx_move_to_front4sizeEv(ptr noundef nonnull align 8 dereferenceable(20)) #3 align 2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.ceil.f32(float) #8

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK6basisu9etc_block16get_block_colorsEPNS_10color_rgbaEj(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basist20approx_move_to_front3addEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basist20approx_move_to_front3useEj(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu8vector2DIhED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK6basisu9histogram11get_entropyEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK6basisu9histogram9get_totalEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu22huffman_encoding_tableC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6basisu22huffman_encoding_table4initERKNS_9histogramEj(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #3 align 2

declare void @_ZN6basisu12error_printfEPKcz(ptr noundef, ...) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu13bitwise_coderC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu13bitwise_coder4initEj(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #7 align 2

declare noundef i32 @_ZN6basisu13bitwise_coder18emit_huffman_tableERKNS_22huffman_encoding_tableE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK6basisu14basisu_backend22get_total_input_texelsEv(ptr noundef nonnull align 8 dereferenceable(336)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN6basisu13bitwise_coder5flushEv(ptr noundef nonnull align 8 dereferenceable(32)) #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6basisu13bitwise_coder9get_bytesEv(ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorIhEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu6vectorINS0_IhEEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i1 noundef zeroext) #7 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IhEEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #0 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu13bitwise_coderD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu22huffman_encoding_tableD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu6vectorINS0_IjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu9histogramD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basist20approx_move_to_frontD2Ev(ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #0 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSN6basisu14basisu_backendE", !6, i64 0, !11, i64 8, !15, i64 40, !16, i64 56, !6, i64 168, !21, i64 176, !22, i64 192, !23, i64 208, !24, i64 224, !25, i64 240, !25, i64 256, !26, i64 272, !26, i64 288, !25, i64 304, !25, i64 320}
!11 = !{!"_ZTSN6basisu21basisu_backend_paramsE", !12, i64 0, !12, i64 1, !12, i64 2, !13, i64 4, !13, i64 8, !14, i64 12, !12, i64 16, !14, i64 20, !14, i64 24, !12, i64 28, !12, i64 29}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSN6basisu6vectorINS_25basisu_backend_slice_descEEE", !6, i64 0, !14, i64 8, !14, i64 12}
!16 = !{!"_ZTSN6basisu21basisu_backend_outputE", !17, i64 0, !12, i64 4, !12, i64 5, !12, i64 6, !14, i64 8, !14, i64 12, !18, i64 16, !18, i64 32, !15, i64 48, !18, i64 64, !19, i64 80, !20, i64 96}
!17 = !{!"_ZTSN6basist16basis_tex_formatE", !7, i64 0}
!18 = !{!"_ZTSN6basisu6vectorIhEE", !6, i64 0, !14, i64 8, !14, i64 12}
!19 = !{!"_ZTSN6basisu6vectorINS0_IhEEEE", !6, i64 0, !14, i64 8, !14, i64 12}
!20 = !{!"_ZTSN6basisu6vectorItEE", !6, i64 0, !14, i64 8, !14, i64 12}
!21 = !{!"_ZTSN6basisu6vectorINS_27etc1_endpoint_palette_entryEEE", !6, i64 0, !14, i64 8, !14, i64 12}
!22 = !{!"_ZTSN6basisu6vectorIN6basist27etc1_selector_palette_entryEEE", !6, i64 0, !14, i64 8, !14, i64 12}
!23 = !{!"_ZTSN6basisu6vectorINS_14basisu_backend34etc1_global_selector_cb_entry_descEEE", !6, i64 0, !14, i64 8, !14, i64 12}
!24 = !{!"_ZTSN6basisu6vectorINS_8vector2DINS_13encoder_blockEEEEE", !6, i64 0, !14, i64 8, !14, i64 12}
!25 = !{!"_ZTSN6basisu6vectorIjEE", !6, i64 0, !14, i64 8, !14, i64 12}
!26 = !{!"_ZTSN6basisu6vectorIbEE", !6, i64 0, !14, i64 8, !14, i64 12}
!27 = !{!28, !29, i64 64}
!28 = !{!"_ZTSN6basisu15basisu_frontend6paramsE", !14, i64 0, !6, i64 8, !14, i64 16, !14, i64 20, !14, i64 24, !12, i64 28, !12, i64 29, !12, i64 30, !12, i64 31, !12, i64 32, !12, i64 33, !12, i64 34, !6, i64 40, !14, i64 48, !14, i64 52, !12, i64 56, !13, i64 60, !29, i64 64, !6, i64 72, !6, i64 80}
!29 = !{!"_ZTSN6basist18basis_texture_typeE", !7, i64 0}
!30 = !{!12, !12, i64 0}
!31 = !{!14, !14, i64 0}
!32 = !{!33, !14, i64 0}
!33 = !{!"_ZTSN6basisu25basisu_backend_slice_descE", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !14, i64 40, !12, i64 44, !12, i64 45}
!34 = !{!33, !14, i64 20}
!35 = !{!33, !14, i64 24}
!36 = !{!37, !14, i64 0}
!37 = !{!"_ZTSN6basisu13encoder_blockE", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !12, i64 16}
!38 = !{!7, !7, i64 0}
!39 = !{i8 0, i8 2}
!40 = !{}
!41 = !{!37, !12, i64 16}
!42 = distinct !{!42, !43}
!43 = !{!"llvm.loop.mustprogress"}
!44 = distinct !{!44, !43}
!45 = distinct !{!45, !43}
!46 = distinct !{!46, !43}
!47 = distinct !{!47, !43}
!48 = !{!37, !14, i64 4}
!49 = !{!10, !13, i64 12}
!50 = !{i64 0, i64 8, !38}
!51 = !{!28, !12, i64 28}
!52 = !{!53, !53, i64 0}
!53 = !{!"long", !7, i64 0}
!54 = !{!13, !13, i64 0}
!55 = !{!56, !14, i64 4}
!56 = !{!"_ZTSN6basisu27etc1_endpoint_palette_entryE", !57, i64 0, !14, i64 4, !12, i64 8}
!57 = !{!"_ZTSN6basisu10color_rgbaE", !7, i64 0}
!58 = distinct !{!58, !43}
!59 = !{!37, !14, i64 8}
!60 = distinct !{!60, !43}
!61 = distinct !{!61, !43}
!62 = distinct !{!62, !43}
!63 = !{!10, !13, i64 16}
!64 = !{!10, !14, i64 20}
!65 = distinct !{!65, !43}
!66 = distinct !{!66, !43}
!67 = distinct !{!67, !43}
!68 = distinct !{!68, !43}
!69 = !{!37, !14, i64 12}
!70 = distinct !{!70, !43}
!71 = distinct !{!71, !43}
!72 = distinct !{!72, !43}
!73 = distinct !{!73, !43}
!74 = distinct !{!74, !43}
!75 = !{!10, !12, i64 37}
!76 = !{!77, !77, i64 0}
!77 = !{!"double", !7, i64 0}
!78 = distinct !{!78, !43}
!79 = distinct !{!79, !43}
!80 = !{!33, !14, i64 4}
!81 = !{!33, !14, i64 8}
!82 = distinct !{!82, !43}


; 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.basist::approx_move_to_front" = type <{ %"class.basisu::vector.39", i32, [4 x i8] }>
%"class.basisu::vector.39" = type { ptr, i32, i32 }
%"class.basisu::histogram" = type { %"class.basisu::vector.14" }
%"class.basisu::vector.14" = type { ptr, i32, i32 }
%"class.basisu::vector.26" = type { ptr, i32, i32 }
%"class.basisu::vector2D.46" = type { i32, i32, %"class.basisu::vector.0" }
%"class.basisu::vector.0" = type { ptr, i32, i32 }
%"struct.basisu::etc_block" = type { %union.anon.36 }
%union.anon.36 = type { i64 }
%"class.basisu::color_rgba" = type { %union.anon }
%union.anon = type { [4 x i8] }
%"class.basisu::huffman_encoding_table" = type { %"class.basisu::vector.4", %"class.basisu::vector.0" }
%"class.basisu::vector.4" = type { ptr, i32, i32 }
%"class.basisu::bitwise_coder" = type { %"class.basisu::vector.0", i32, i32, i64 }

@.str.6 = external hidden unnamed_addr constant [114 x i8], align 1
@_ZN6basistL32ENDPOINT_PRED_REPEAT_LAST_SYMBOLE = external hidden constant i32, align 4
@.str.11 = external hidden unnamed_addr constant [23 x i8], align 1
@__PRETTY_FUNCTION__._ZN6basisu14basisu_backend12encode_imageEv = external hidden unnamed_addr constant [44 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [189 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [41 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu6vectorIjEC2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu6vectorIjED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

declare void @_ZN6basisu12debug_printfEPKcz(ptr noundef, ...) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6basisu15basisu_frontend27get_total_selector_clustersEv(ptr noundef nonnull align 8 dereferenceable(496)) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(46) ptr @_ZN6basisu6vectorINS_25basisu_backend_slice_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu14basisu_backend23create_endpoint_paletteEv(ptr noundef nonnull align 8 dereferenceable(336)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(9) ptr @_ZN6basisu6vectorINS_27etc1_endpoint_palette_entryEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN6basisuL6verifyEbi(i1 noundef zeroext, i32 noundef) local_unnamed_addr #0

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN6basisu6vectorINS_8vector2DINS_13encoder_blockEEEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu6vectorIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

declare void @_ZN6basisu15basisu_frontend29reoptimize_remapped_endpointsERKNS_6vectorIjEERNS1_IiEEbPS2_(ptr noundef nonnull align 8 dereferenceable(496), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu6vectorIiED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu14basisu_backend25check_for_valid_cr_blocksEv(ptr noundef nonnull align 8 dereferenceable(336)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(88) ptr @_ZNK6basisu15basisu_frontend10get_paramsEv(ptr noundef nonnull align 8 dereferenceable(496)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 dereferenceable(64) ptr @_ZNK6basisu15basisu_frontend22get_source_pixel_blockEj(ptr noundef nonnull align 8 dereferenceable(496), i32 noundef) local_unnamed_addr #2 align 2

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

declare noundef i64 @_ZNK6basisu9etc_block19evaluate_etc1_errorEPKNS_10color_rgbaEbi(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i1 noundef zeroext, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZN6basisu7maximumIfEET_S1_S1_(float noundef, float noundef) local_unnamed_addr #0

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

declare noundef zeroext i1 @_ZN6basisu11unpack_etc1ERKNS_9etc_blockEPNS_10color_rgbaEb(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext, ptr noundef nonnull align 1 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(4), i1 noundef zeroext) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu14basisu_backend18compute_slice_crcsEv(ptr noundef nonnull align 8 dereferenceable(336)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6basisu14basisu_backend12encode_imageEv(ptr noundef nonnull align 8 dereferenceable(336) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.basist::approx_move_to_front", align 8
  %3 = alloca %"class.basisu::histogram", align 8
  %4 = alloca %"class.basisu::histogram", align 8
  %5 = alloca %"class.basisu::histogram", align 8
  %6 = alloca %"class.basisu::vector.26", align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.basisu::histogram", align 8
  %9 = alloca %"class.basisu::histogram", align 8
  %10 = alloca %"class.basisu::vector.26", align 8
  %11 = alloca %"class.basisu::vector.14", align 8
  %12 = alloca %"class.basisu::vector.14", align 8
  %13 = alloca %"class.basisu::vector2D.46", align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"struct.basisu::etc_block", align 8
  %18 = alloca %"struct.basisu::etc_block", align 8
  %19 = alloca [16 x %"class.basisu::color_rgba"], align 16
  %20 = alloca [4 x %"class.basisu::color_rgba"], align 16
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca %"class.basisu::vector.39", align 8
  %31 = alloca %"class.basisu::huffman_encoding_table", align 8
  %32 = alloca %"class.basisu::huffman_encoding_table", align 8
  %33 = alloca %"class.basisu::huffman_encoding_table", align 8
  %34 = alloca %"class.basisu::huffman_encoding_table", align 8
  %35 = alloca %"class.basisu::bitwise_coder", align 8
  %36 = load ptr, ptr %0, align 8, !tbaa !5
  %37 = tail call noundef nonnull align 8 dereferenceable(88) ptr @_ZNK6basisu15basisu_frontend10get_paramsEv(ptr noundef nonnull align 8 dereferenceable(496) %36)
  %38 = getelementptr inbounds i8, ptr %37, i64 64
  %39 = load i32, ptr %38, align 8, !tbaa !26
  %.fr1788 = freeze i32 %39
  %40 = icmp eq i32 %.fr1788, 3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #9
  call void @_ZN6basist20approx_move_to_frontC2Ej(ptr noundef nonnull align 8 dereferenceable(20) %2, i32 noundef 64)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #9
  invoke void @_ZN6basisu9histogramC2Ej(ptr noundef nonnull align 8 dereferenceable(16) %3, i32 noundef 64)
          to label %41 unwind label %76

41:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #9
  %42 = call noundef i32 @_ZNK6basisu15basisu_frontend27get_total_selector_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %36)
  %43 = add i32 %42, 65
  invoke void @_ZN6basisu9histogramC2Ej(ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef %43)
          to label %44 unwind label %78

44:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #9
  invoke void @_ZN6basisu9histogramC2Ej(ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef 64)
          to label %45 unwind label %80

45:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #9
  %46 = getelementptr inbounds i8, ptr %0, i64 40
  %47 = call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %46)
  %48 = zext i32 %47 to i64
  invoke void @_ZN6basisu6vectorINS0_IjEEEC2Em(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %48)
          to label %49 unwind label %82

49:                                               ; preds = %45
  %50 = call noundef i32 @_ZNK6basisu15basisu_frontend27get_total_selector_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %36)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #9
  %51 = add i32 %50, 64
  store i32 %51, ptr %7, align 4, !tbaa !29
  %52 = getelementptr inbounds i8, ptr %0, i64 152
  %53 = call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %46)
  %54 = zext i32 %53 to i64
  invoke void @_ZN6basisu6vectorItE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16) %52, i64 noundef %54, i1 noundef zeroext false)
          to label %55 unwind label %84

55:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #9
  %56 = invoke noundef i32 @_ZNK6basisu15basisu_frontend27get_total_endpoint_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %36)
          to label %57 unwind label %86

57:                                               ; preds = %55
  invoke void @_ZN6basisu9histogramC2Ej(ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef %56)
          to label %58 unwind label %86

58:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #9
  invoke void @_ZN6basisu9histogramC2Ej(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef 257)
          to label %59 unwind label %88

59:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #9
  %60 = call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %46)
  %61 = zext i32 %60 to i64
  invoke void @_ZN6basisu6vectorINS0_IjEEEC2Em(ptr noundef nonnull align 8 dereferenceable(16) %10, i64 noundef %61)
          to label %62 unwind label %90

62:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #9
  call void @_ZN6basisu6vectorIjEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #9
  call void @_ZN6basisu6vectorIjEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12)
  %63 = call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %46)
  %.not1787 = icmp eq i32 %63, 0
  br i1 %.not1787, label %._crit_edge, label %.lr.ph1713

.lr.ph1713:                                       ; preds = %62
  %64 = getelementptr inbounds i8, ptr %0, i64 224
  %65 = getelementptr inbounds i8, ptr %0, i64 240
  %66 = getelementptr inbounds i8, ptr %0, i64 12
  %67 = getelementptr inbounds i8, ptr %0, i64 288
  %68 = getelementptr inbounds i8, ptr %0, i64 176
  %69 = getelementptr inbounds i8, ptr %0, i64 256
  %70 = getelementptr inbounds i8, ptr %0, i64 304
  %71 = getelementptr inbounds i8, ptr %0, i64 16
  %72 = getelementptr inbounds i8, ptr %0, i64 20
  %73 = getelementptr inbounds i8, ptr %0, i64 192
  %74 = getelementptr inbounds i8, ptr %0, i64 320
  %.ptr.us.1 = getelementptr inbounds i8, ptr %19, i64 4
  %.ptr.us.2 = getelementptr inbounds i8, ptr %19, i64 8
  %.ptr.us.3 = getelementptr inbounds i8, ptr %19, i64 12
  %.ptr.us.4 = getelementptr inbounds i8, ptr %19, i64 16
  %.ptr.us.5 = getelementptr inbounds i8, ptr %19, i64 20
  %.ptr.us.6 = getelementptr inbounds i8, ptr %19, i64 24
  %.ptr.us.7 = getelementptr inbounds i8, ptr %19, i64 28
  %.ptr.us.8 = getelementptr inbounds i8, ptr %19, i64 32
  %.ptr.us.9 = getelementptr inbounds i8, ptr %19, i64 36
  %.ptr.us.10 = getelementptr inbounds i8, ptr %19, i64 40
  %.ptr.us.11 = getelementptr inbounds i8, ptr %19, i64 44
  %.ptr.us.12 = getelementptr inbounds i8, ptr %19, i64 48
  %.ptr.us.13 = getelementptr inbounds i8, ptr %19, i64 52
  %.ptr.us.14 = getelementptr inbounds i8, ptr %19, i64 56
  %.ptr.us.15 = getelementptr inbounds i8, ptr %19, i64 60
  %.ptr687.us.1 = getelementptr inbounds i8, ptr %20, i64 4
  %.ptr687.us.2 = getelementptr inbounds i8, ptr %20, i64 8
  %.ptr687.us.3 = getelementptr inbounds i8, ptr %20, i64 12
  br label %92

._crit_edge:                                      ; preds = %.loopexit786, %62
  %.0483.lcssa = phi i32 [ 0, %62 ], [ %.1484.lcssa20382048, %.loopexit786 ]
  %.0409.lcssa = phi i32 [ 0, %62 ], [ %.1410.lcssa20392047, %.loopexit786 ]
  %.0405.lcssa = phi i32 [ 0, %62 ], [ %.1406.lcssa20402046, %.loopexit786 ]
  %75 = invoke noundef i32 @_ZNK6basisu14basisu_backend16get_total_blocksEv(ptr noundef nonnull align 8 dereferenceable(336) %0)
          to label %658 unwind label %690

76:                                               ; preds = %1
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %1054

78:                                               ; preds = %41
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %1053

80:                                               ; preds = %44
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %1052

82:                                               ; preds = %45
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %1051

84:                                               ; preds = %49
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %1050

86:                                               ; preds = %57, %55
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %1049

88:                                               ; preds = %58
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %1048

90:                                               ; preds = %59
  %91 = landingpad { ptr, i32 }
          cleanup
  br label %1047

92:                                               ; preds = %.lr.ph1713, %.loopexit786
  %indvars.iv2009 = phi i64 [ 0, %.lr.ph1713 ], [ %indvars.iv.next2010, %.loopexit786 ]
  %.04051712 = phi i32 [ 0, %.lr.ph1713 ], [ %.1406.lcssa20402046, %.loopexit786 ]
  %.04091711 = phi i32 [ 0, %.lr.ph1713 ], [ %.1410.lcssa20392047, %.loopexit786 ]
  %.04831710 = phi i32 [ 0, %.lr.ph1713 ], [ %.1484.lcssa20382048, %.loopexit786 ]
  %93 = call noundef nonnull align 4 dereferenceable(46) ptr @_ZN6basisu6vectorINS_25basisu_backend_slice_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %46, i64 noundef %indvars.iv2009)
  %94 = load i32, ptr %93, align 4, !tbaa !30
  %95 = call noundef nonnull align 4 dereferenceable(46) ptr @_ZN6basisu6vectorINS_25basisu_backend_slice_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %46, i64 noundef %indvars.iv2009)
  %96 = getelementptr inbounds i8, ptr %95, i64 20
  %97 = load i32, ptr %96, align 4, !tbaa !32
  %98 = call noundef nonnull align 4 dereferenceable(46) ptr @_ZN6basisu6vectorINS_25basisu_backend_slice_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %46, i64 noundef %indvars.iv2009)
  %99 = getelementptr inbounds i8, ptr %98, i64 24
  %100 = load i32, ptr %99, align 4, !tbaa !33
  invoke void @_ZN6basist20approx_move_to_front5resetEv(ptr noundef nonnull align 8 dereferenceable(20) %2)
          to label %101 unwind label %600

101:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #9
  invoke void @_ZN6basisu8vector2DIhEC2Ejj(ptr noundef nonnull align 8 dereferenceable(24) %13, i32 noundef %97, i32 noundef %100)
          to label %.preheader790 unwind label %602

.preheader790:                                    ; preds = %101
  %.not1789 = icmp eq i32 %100, 0
  %.not1790 = icmp eq i32 %97, 0
  %or.cond2209 = select i1 %.not1789, i1 true, i1 %.not1790
  br i1 %or.cond2209, label %.loopexit786, label %.preheader784.lr.ph.split.us

.preheader784.lr.ph.split.us:                     ; preds = %.preheader790
  br i1 %40, label %.preheader784.us.us, label %.preheader784.us

.preheader784.us.us:                              ; preds = %.preheader784.lr.ph.split.us, %._crit_edge.split.us.us.us
  %.05511538.us.us = phi i32 [ %120, %._crit_edge.split.us.us.us ], [ 0, %.preheader784.lr.ph.split.us ]
  %102 = add i32 %.05511538.us.us, -1
  br label %103

103:                                              ; preds = %118, %.preheader784.us.us
  %.05521535.us.us.us = phi i32 [ 0, %.preheader784.us.us ], [ %119, %118 ]
  %104 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN6basisu6vectorINS_8vector2DINS_13encoder_blockEEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %64, i64 noundef %indvars.iv2009)
  %105 = invoke noundef nonnull align 4 dereferenceable(17) ptr @_ZN6basisu8vector2DINS_13encoder_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %104, i32 noundef %.05521535.us.us.us, i32 noundef %.05511538.us.us)
          to label %106 unwind label %.split.us.split.us.split.us

106:                                              ; preds = %103
  %107 = load i32, ptr %105, align 4, !tbaa !34
  switch i32 %107, label %.critedge.us.us.us [
    i32 0, label %110
    i32 1, label %108
  ]

108:                                              ; preds = %106
  %109 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu8vector2DIhEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %13, i32 noundef %.05521535.us.us.us, i32 noundef %102)
  br label %.critedge.us.us.us.sink.split

110:                                              ; preds = %106
  %111 = add i32 %.05521535.us.us.us, -1
  %112 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu8vector2DIhEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %13, i32 noundef %111, i32 noundef %.05511538.us.us)
  br label %.critedge.us.us.us.sink.split

.critedge.us.us.us.sink.split:                    ; preds = %110, %108
  %.sink = phi ptr [ %109, %108 ], [ %112, %110 ]
  store i8 1, ptr %.sink, align 1, !tbaa !36
  br label %.critedge.us.us.us

.critedge.us.us.us:                               ; preds = %.critedge.us.us.us.sink.split, %106
  %113 = getelementptr inbounds i8, ptr %105, i64 16
  %114 = load i8, ptr %113, align 4, !tbaa !37, !range !38, !noundef !39
  %115 = trunc nuw i8 %114 to i1
  br i1 %115, label %116, label %118

116:                                              ; preds = %.critedge.us.us.us
  %117 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu8vector2DIhEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %13, i32 noundef %.05521535.us.us.us, i32 noundef %.05511538.us.us)
  store i8 1, ptr %117, align 1, !tbaa !36
  br label %118

118:                                              ; preds = %116, %.critedge.us.us.us
  %119 = add nuw i32 %.05521535.us.us.us, 1
  %exitcond1990.not = icmp eq i32 %119, %97
  br i1 %exitcond1990.not, label %._crit_edge.split.us.us.us, label %103, !llvm.loop !40

._crit_edge.split.us.us.us:                       ; preds = %118
  %120 = add nuw i32 %.05511538.us.us, 1
  %exitcond1991.not = icmp eq i32 %120, %100
  br i1 %exitcond1991.not, label %.preheader783.us.preheader, label %.preheader784.us.us, !llvm.loop !42

.preheader783.us.preheader:                       ; preds = %._crit_edge.split.us1541, %._crit_edge.split.us.us.us
  br label %.preheader783.us

.split.us.split.us.split.us:                      ; preds = %103
  %121 = landingpad { ptr, i32 }
          cleanup
  br label %656

.preheader784.us:                                 ; preds = %.preheader784.lr.ph.split.us, %._crit_edge.split.us1541
  %.05511538.us = phi i32 [ %137, %._crit_edge.split.us1541 ], [ 0, %.preheader784.lr.ph.split.us ]
  %122 = add i32 %.05511538.us, -1
  br label %123

123:                                              ; preds = %.preheader784.us, %135
  %.05521535.us1540 = phi i32 [ 0, %.preheader784.us ], [ %136, %135 ]
  %124 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN6basisu6vectorINS_8vector2DINS_13encoder_blockEEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %64, i64 noundef %indvars.iv2009)
  %125 = invoke noundef nonnull align 4 dereferenceable(17) ptr @_ZN6basisu8vector2DINS_13encoder_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %124, i32 noundef %.05521535.us1540, i32 noundef %.05511538.us)
          to label %126 unwind label %.split.split.us

126:                                              ; preds = %123
  %127 = load i32, ptr %125, align 4, !tbaa !34
  switch i32 %127, label %135 [
    i32 0, label %132
    i32 1, label %130
    i32 2, label %.thread.us
  ]

.thread.us:                                       ; preds = %126
  %128 = add i32 %.05521535.us1540, -1
  %129 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu8vector2DIhEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %13, i32 noundef %128, i32 noundef %122)
  br label %.sink.split

130:                                              ; preds = %126
  %131 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu8vector2DIhEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %13, i32 noundef %.05521535.us1540, i32 noundef %122)
  br label %.sink.split

132:                                              ; preds = %126
  %133 = add i32 %.05521535.us1540, -1
  %134 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu8vector2DIhEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %13, i32 noundef %133, i32 noundef %.05511538.us)
  br label %.sink.split

.sink.split:                                      ; preds = %.thread.us, %132, %130
  %.sink2210 = phi ptr [ %131, %130 ], [ %134, %132 ], [ %129, %.thread.us ]
  store i8 1, ptr %.sink2210, align 1, !tbaa !36
  br label %135

135:                                              ; preds = %.sink.split, %126
  %136 = add nuw i32 %.05521535.us1540, 1
  %exitcond.not = icmp eq i32 %136, %97
  br i1 %exitcond.not, label %._crit_edge.split.us1541, label %123, !llvm.loop !40

._crit_edge.split.us1541:                         ; preds = %135
  %137 = add nuw i32 %.05511538.us, 1
  %exitcond1989.not = icmp eq i32 %137, %100
  br i1 %exitcond1989.not, label %.preheader783.us.preheader, label %.preheader784.us, !llvm.loop !42

.split.split.us:                                  ; preds = %123
  %138 = landingpad { ptr, i32 }
          cleanup
  br label %656

.preheader783.us:                                 ; preds = %.preheader783.us.preheader, %._crit_edge1577.us
  %.14061592.us = phi i32 [ %.8.us, %._crit_edge1577.us ], [ %.04051712, %.preheader783.us.preheader ]
  %.14101591.us = phi i32 [ %.6415.us, %._crit_edge1577.us ], [ %.04091711, %.preheader783.us.preheader ]
  %.14841590.us = phi i32 [ %.6489.us, %._crit_edge1577.us ], [ %.04831710, %.preheader783.us.preheader ]
  %.05171589.us = phi i32 [ %.4521.us, %._crit_edge1577.us ], [ 0, %.preheader783.us.preheader ]
  %.05221588.us = phi i32 [ %.3525.us, %._crit_edge1577.us ], [ -1, %.preheader783.us.preheader ]
  %.05441587.us = phi i32 [ %.4548.us, %._crit_edge1577.us ], [ 0, %.preheader783.us.preheader ]
  %.05491586.us = phi i32 [ %.3566.us, %._crit_edge1577.us ], [ 0, %.preheader783.us.preheader ]
  %.05531585.us = phi i32 [ %568, %._crit_edge1577.us ], [ 0, %.preheader783.us.preheader ]
  %139 = mul i32 %.05531585.us, %97
  %140 = add i32 %139, %94
  %141 = or disjoint i32 %.05531585.us, 1
  %142 = icmp ult i32 %141, %100
  %.fr1549.us.1 = freeze i1 %142
  br label %143

143:                                              ; preds = %.preheader783.us, %533
  %.24071575.us = phi i32 [ %.14061592.us, %.preheader783.us ], [ %.8.us, %533 ]
  %.24111574.us = phi i32 [ %.14101591.us, %.preheader783.us ], [ %.6415.us, %533 ]
  %.24851573.us = phi i32 [ %.14841590.us, %.preheader783.us ], [ %.6489.us, %533 ]
  %.15181572.us = phi i32 [ %.05171589.us, %.preheader783.us ], [ %.4521.us, %533 ]
  %.15231571.us = phi i32 [ %.05221588.us, %.preheader783.us ], [ %.3525.us, %533 ]
  %.15451570.us = phi i32 [ %.05441587.us, %.preheader783.us ], [ %.4548.us, %533 ]
  %.15501569.us = phi i32 [ %.05491586.us, %.preheader783.us ], [ %.3566.us, %533 ]
  %.05541567.us = phi i32 [ 0, %.preheader783.us ], [ %534, %533 ]
  %144 = add i32 %140, %.05541567.us
  %145 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN6basisu6vectorINS_8vector2DINS_13encoder_blockEEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %64, i64 noundef %indvars.iv2009)
  %146 = invoke noundef nonnull align 4 dereferenceable(17) ptr @_ZN6basisu8vector2DINS_13encoder_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %145, i32 noundef %.05541567.us, i32 noundef %.05531585.us)
          to label %147 unwind label %.split1610.us

147:                                              ; preds = %143
  %148 = or i32 %.05541567.us, %.05531585.us
  %149 = and i32 %148, 1
  %or.cond731.us = icmp eq i32 %149, 0
  br i1 %or.cond731.us, label %535, label %172

150:                                              ; preds = %.split1548.us1600.1
  %151 = icmp sgt i32 %.15451570.us, 0
  br i1 %151, label %152, label %.loopexit782.us

152:                                              ; preds = %150
  %153 = icmp ugt i32 %.15451570.us, 3
  br i1 %153, label %158, label %.lr.ph.us

.lr.ph.us:                                        ; preds = %152, %156
  %.05611551.us = phi i32 [ %157, %156 ], [ 0, %152 ]
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef %.15231571.us)
          to label %154 unwind label %.split1613.us

154:                                              ; preds = %.lr.ph.us
  %155 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %10, i64 noundef %indvars.iv2009)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #9
  store i32 %.15231571.us, ptr %16, align 4, !tbaa !29
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %155, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %156 unwind label %.split1616.us

156:                                              ; preds = %154
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #9
  %157 = add nuw nsw i32 %.05611551.us, 1
  %exitcond1994.not = icmp eq i32 %157, %.15451570.us
  br i1 %exitcond1994.not, label %.loopexit782.us, label %.lr.ph.us, !llvm.loop !43

158:                                              ; preds = %152
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef 256)
          to label %159 unwind label %.split1619.us

159:                                              ; preds = %158
  %160 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %10, i64 noundef %indvars.iv2009)
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %160, ptr noundef nonnull align 4 dereferenceable(4) @_ZN6basistL32ENDPOINT_PRED_REPEAT_LAST_SYMBOLE)
          to label %161 unwind label %.split1619.us

161:                                              ; preds = %159
  %162 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %10, i64 noundef %indvars.iv2009)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #9
  store i32 %.15451570.us, ptr %15, align 4, !tbaa !29
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %162, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %163 unwind label %.split1622.us

163:                                              ; preds = %161
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #9
  br label %.loopexit782.us

.loopexit782.us:                                  ; preds = %156, %163, %150
  %.2546.us = phi i32 [ %.15451570.us, %150 ], [ 0, %163 ], [ 0, %156 ]
  %164 = load i32, ptr %14, align 4, !tbaa !29
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef %164)
          to label %165 unwind label %.split1619.us

165:                                              ; preds = %.loopexit782.us
  %166 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %10, i64 noundef %indvars.iv2009)
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %166, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %167 unwind label %.split1619.us

167:                                              ; preds = %165
  %168 = load i32, ptr %14, align 4, !tbaa !29
  br label %171

169:                                              ; preds = %.split1548.us1600.1
  %170 = add nsw i32 %.15451570.us, 1
  br label %171

171:                                              ; preds = %169, %167
  %.3547.us = phi i32 [ %170, %169 ], [ %.2546.us, %167 ]
  %.2524.us = phi i32 [ %.15231571.us, %169 ], [ %168, %167 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #9
  br label %172

172:                                              ; preds = %171, %147
  %.4548.us = phi i32 [ %.3547.us, %171 ], [ %.15451570.us, %147 ]
  %.3525.us = phi i32 [ %.2524.us, %171 ], [ %.15231571.us, %147 ]
  %173 = getelementptr inbounds i8, ptr %146, i64 4
  %174 = load i32, ptr %173, align 4, !tbaa !44
  %175 = sext i32 %174 to i64
  %176 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %65, i64 noundef %175)
  %177 = load i32, ptr %176, align 4, !tbaa !29
  %178 = load i32, ptr %146, align 4, !tbaa !34
  %179 = icmp eq i32 %178, 3
  br i1 %179, label %180, label %266

180:                                              ; preds = %172
  %181 = sub i32 %177, %.15501569.us
  %182 = load float, ptr %66, align 4, !tbaa !45
  %183 = fcmp ogt float %182, 1.000000e+00
  br i1 %183, label %184, label %259

184:                                              ; preds = %180
  %185 = call noundef i32 @_ZN6basisu4iabsEi(i32 noundef %181)
  %186 = icmp ugt i32 %185, 1
  br i1 %186, label %187, label %259

187:                                              ; preds = %184
  %188 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu8vector2DIhEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %13, i32 noundef %.05541567.us, i32 noundef %.05531585.us)
  %189 = load i8, ptr %188, align 1, !tbaa !36
  %.not671.us = icmp eq i8 %189, 0
  br i1 %.not671.us, label %190, label %259

190:                                              ; preds = %187
  %191 = invoke noundef nonnull align 1 dereferenceable(64) ptr @_ZNK6basisu15basisu_frontend22get_source_pixel_blockEj(ptr noundef nonnull align 8 dereferenceable(496) %36, i32 noundef %144)
          to label %192 unwind label %.split1625.us

192:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #9
  %193 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6basisu15basisu_frontend16get_output_blockEj(ptr noundef nonnull align 8 dereferenceable(496) %36, i32 noundef %144)
  %194 = load i64, ptr %193, align 8, !tbaa !36
  store i64 %194, ptr %17, align 8, !tbaa !36
  %195 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %191)
  %196 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNK6basisu15basisu_frontend10get_paramsEv(ptr noundef nonnull align 8 dereferenceable(496) %36)
  %197 = getelementptr inbounds i8, ptr %196, i64 28
  %198 = load i8, ptr %197, align 4, !tbaa !46, !range !38, !noundef !39
  %199 = trunc nuw i8 %198 to i1
  %200 = invoke noundef i64 @_ZNK6basisu9etc_block19evaluate_etc1_errorEPKNS_10color_rgbaEbi(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef %195, i1 noundef zeroext %199, i32 noundef -1)
          to label %201 unwind label %.split1628.us

201:                                              ; preds = %192
  %.not672.us = icmp eq i64 %200, 0
  br i1 %.not672.us, label %258, label %202

202:                                              ; preds = %201
  %203 = load float, ptr %66, align 4, !tbaa !45
  %204 = call noundef float @_ZN6basisu7maximumIfEET_S1_S1_(float noundef 1.000000e+00, float noundef %203)
  %205 = uitofp i64 %200 to float
  %206 = fmul float %204, %205
  %207 = fptoui float %206 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #9
  %208 = load i64, ptr %17, align 8, !tbaa !36
  store i64 %208, ptr %18, align 8, !tbaa !36
  %209 = call noundef i32 @_ZN6basisu4iabsEi(i32 noundef %181)
  %210 = add i32 %209, -1
  %211 = call noundef i32 @_ZN6basisu7minimumIiEET_S1_S1_(i32 noundef %210, i32 noundef 32)
  %212 = icmp sgt i32 %211, 0
  br i1 %212, label %.lr.ph1555.us.preheader, label %._crit_edge.us.thread

.lr.ph1555.us.preheader:                          ; preds = %202
  %213 = sub nsw i32 0, %211
  br label %.lr.ph1555.us

._crit_edge.us:                                   ; preds = %256
  %.not673.us = icmp eq i64 %.2574.us, -1
  br i1 %.not673.us, label %._crit_edge.us.thread, label %214

214:                                              ; preds = %._crit_edge.us
  %215 = sext i32 %.2582.us to i64
  %216 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %69, i64 noundef %215)
  %217 = load i32, ptr %216, align 4, !tbaa !29
  store i32 %217, ptr %173, align 4, !tbaa !44
  %218 = sub i32 %.2582.us, %.15501569.us
  %219 = add i32 %.24851573.us, 1
  br label %._crit_edge.us.thread

._crit_edge.us.thread:                            ; preds = %202, %214, %._crit_edge.us
  %.0568.us = phi i32 [ %218, %214 ], [ %181, %._crit_edge.us ], [ %181, %202 ]
  %.0563.us = phi i32 [ %.2582.us, %214 ], [ %177, %._crit_edge.us ], [ %177, %202 ]
  %.3486.us = phi i32 [ %219, %214 ], [ %.24851573.us, %._crit_edge.us ], [ %.24851573.us, %202 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #9
  br label %258

.lr.ph1555.us:                                    ; preds = %.lr.ph1555.us.preheader, %256
  %.05721554.us = phi i64 [ %.2574.us, %256 ], [ -1, %.lr.ph1555.us.preheader ]
  %.05801553.us = phi i32 [ %.2582.us, %256 ], [ 0, %.lr.ph1555.us.preheader ]
  %.05841552.us = phi i32 [ %257, %256 ], [ %213, %.lr.ph1555.us.preheader ]
  %220 = add i32 %.05841552.us, %.15501569.us
  %221 = icmp slt i32 %220, 0
  br i1 %221, label %229, label %222

222:                                              ; preds = %.lr.ph1555.us
  %223 = invoke noundef i32 @_ZNK6basisu15basisu_frontend27get_total_endpoint_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %36)
          to label %224 unwind label %.split1631.us

224:                                              ; preds = %222
  %.not674.us = icmp slt i32 %220, %223
  br i1 %.not674.us, label %233, label %225

225:                                              ; preds = %224
  %226 = invoke noundef i32 @_ZNK6basisu15basisu_frontend27get_total_endpoint_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %36)
          to label %227 unwind label %.split1631.us

227:                                              ; preds = %225
  %228 = sub nsw i32 %220, %226
  br label %233

229:                                              ; preds = %.lr.ph1555.us
  %230 = invoke noundef i32 @_ZNK6basisu15basisu_frontend27get_total_endpoint_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %36)
          to label %231 unwind label %.split1631.us

231:                                              ; preds = %229
  %232 = add nsw i32 %230, %220
  br label %233

233:                                              ; preds = %231, %227, %224
  %.0585.us = phi i32 [ %232, %231 ], [ %228, %227 ], [ %220, %224 ]
  %234 = icmp eq i32 %.0585.us, %177
  br i1 %234, label %256, label %235

235:                                              ; preds = %233
  %236 = sext i32 %.0585.us to i64
  %237 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIbEixEm(ptr noundef nonnull align 8 dereferenceable(16) %67, i64 noundef %236)
  %238 = load i8, ptr %237, align 1, !tbaa !47, !range !38, !noundef !39
  %239 = trunc nuw i8 %238 to i1
  br i1 %239, label %240, label %256

240:                                              ; preds = %235
  %241 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %69, i64 noundef %236)
  %242 = load i32, ptr %241, align 4, !tbaa !29
  %243 = zext i32 %242 to i64
  %244 = call noundef nonnull align 4 dereferenceable(9) ptr @_ZN6basisu6vectorINS_27etc1_endpoint_palette_entryEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %68, i64 noundef %243)
  invoke void @_ZN6basisu9etc_block22set_block_color5_etc1sERKNS_10color_rgbaE(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 1 dereferenceable(4) %244)
          to label %245 unwind label %.split1634.us

245:                                              ; preds = %240
  %246 = getelementptr inbounds i8, ptr %244, i64 4
  %247 = load i32, ptr %246, align 4, !tbaa !48
  call void @_ZN6basisu9etc_block22set_inten_tables_etc1sEj(ptr noundef nonnull align 8 dereferenceable(8) %18, i32 noundef %247)
  %248 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %191)
  %249 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNK6basisu15basisu_frontend10get_paramsEv(ptr noundef nonnull align 8 dereferenceable(496) %36)
  %250 = getelementptr inbounds i8, ptr %249, i64 28
  %251 = load i8, ptr %250, align 4, !tbaa !46, !range !38, !noundef !39
  %252 = trunc nuw i8 %251 to i1
  %253 = invoke noundef i64 @_ZNK6basisu9etc_block19evaluate_etc1_errorEPKNS_10color_rgbaEbi(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef %248, i1 noundef zeroext %252, i32 noundef -1)
          to label %254 unwind label %.split1637.us

254:                                              ; preds = %245
  %.not680.us = icmp ule i64 %253, %207
  %255 = icmp ult i64 %253, %.05721554.us
  %or.cond733.us = select i1 %.not680.us, i1 %255, i1 false
  %.1581.us = select i1 %or.cond733.us, i32 %.0585.us, i32 %.05801553.us
  %.1573.us = select i1 %or.cond733.us, i64 %253, i64 %.05721554.us
  br label %256

256:                                              ; preds = %254, %235, %233
  %.2582.us = phi i32 [ %.1581.us, %254 ], [ %.05801553.us, %233 ], [ %.05801553.us, %235 ]
  %.2574.us = phi i64 [ %.1573.us, %254 ], [ %.05721554.us, %233 ], [ %.05721554.us, %235 ]
  %257 = add i32 %.05841552.us, 1
  %exitcond1995.not = icmp eq i32 %257, %211
  br i1 %exitcond1995.not, label %._crit_edge.us, label %.lr.ph1555.us, !llvm.loop !51

258:                                              ; preds = %._crit_edge.us.thread, %201
  %.1569.us = phi i32 [ %.0568.us, %._crit_edge.us.thread ], [ %181, %201 ]
  %.1564.us = phi i32 [ %.0563.us, %._crit_edge.us.thread ], [ %177, %201 ]
  %.4487.us = phi i32 [ %.3486.us, %._crit_edge.us.thread ], [ %.24851573.us, %201 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #9
  br label %259

259:                                              ; preds = %258, %187, %184, %180
  %.2570.us = phi i32 [ %181, %187 ], [ %.1569.us, %258 ], [ %181, %184 ], [ %181, %180 ]
  %.2565.us = phi i32 [ %177, %187 ], [ %.1564.us, %258 ], [ %177, %184 ], [ %177, %180 ]
  %.5488.us = phi i32 [ %.24851573.us, %187 ], [ %.4487.us, %258 ], [ %.24851573.us, %184 ], [ %.24851573.us, %180 ]
  %260 = icmp slt i32 %.2570.us, 0
  br i1 %260, label %261, label %265

261:                                              ; preds = %259
  %262 = invoke noundef i32 @_ZNK6basisu15basisu_frontend27get_total_endpoint_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %36)
          to label %263 unwind label %.split1640.us

263:                                              ; preds = %261
  %264 = add nsw i32 %262, %.2570.us
  br label %265

265:                                              ; preds = %263, %259
  %.3571.us = phi i32 [ %264, %263 ], [ %.2570.us, %259 ]
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef %.3571.us)
          to label %266 unwind label %.split1640.us

266:                                              ; preds = %265, %172
  %.3566.us = phi i32 [ %177, %172 ], [ %.2565.us, %265 ]
  %.6489.us = phi i32 [ %.24851573.us, %172 ], [ %.5488.us, %265 ]
  %267 = sext i32 %.3566.us to i64
  %268 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %69, i64 noundef %267)
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 4 dereferenceable(4) %268)
          to label %269 unwind label %.split1643.us

269:                                              ; preds = %266
  %270 = load i32, ptr %146, align 4
  %.not683.us = icmp eq i32 %270, 2
  %or.cond734.us = select i1 %40, i1 %.not683.us, i1 false
  br i1 %or.cond734.us, label %530, label %271

271:                                              ; preds = %269
  %272 = getelementptr inbounds i8, ptr %146, i64 8
  %273 = load i32, ptr %272, align 4, !tbaa !52
  %274 = sext i32 %273 to i64
  %275 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %70, i64 noundef %274)
  %276 = load i32, ptr %275, align 4, !tbaa !29
  %277 = getelementptr inbounds i8, ptr %146, i64 16
  %278 = load i8, ptr %277, align 4, !tbaa !37, !range !38, !noundef !39
  %279 = trunc nuw i8 %278 to i1
  br i1 %279, label %.preheader774.us, label %280

280:                                              ; preds = %271
  %281 = invoke noundef nonnull align 1 dereferenceable(64) ptr @_ZNK6basisu15basisu_frontend22get_source_pixel_blockEj(ptr noundef nonnull align 8 dereferenceable(496) %36, i32 noundef %144)
          to label %282 unwind label %.split1646.us

282:                                              ; preds = %280
  %283 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK6basisu15basisu_frontend16get_output_blockEj(ptr noundef nonnull align 8 dereferenceable(496) %36, i32 noundef %144)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %19) #9
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %19)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.1)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.2)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.3)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.4)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.5)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.6)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.7)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.8)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.9)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.10)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.11)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.12)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.13)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.14)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.15)
  %284 = invoke noundef zeroext i1 @_ZN6basisu11unpack_etc1ERKNS_9etc_blockEPNS_10color_rgbaEb(ptr noundef nonnull align 8 dereferenceable(8) %283, ptr noundef nonnull %19, i1 noundef zeroext false)
          to label %285 unwind label %.split1649.us

285:                                              ; preds = %282
  %286 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNK6basisu15basisu_frontend10get_paramsEv(ptr noundef nonnull align 8 dereferenceable(496) %36)
  %287 = getelementptr inbounds i8, ptr %286, i64 28
  %288 = load i8, ptr %287, align 4, !tbaa !46, !range !38, !noundef !39
  %289 = trunc nuw i8 %288 to i1
  %290 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  br i1 %289, label %.preheader777.us.preheader, label %.preheader779.us.preheader

.preheader779.us.preheader:                       ; preds = %285
  %291 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext false, ptr noundef nonnull align 1 dereferenceable(4) %290, ptr noundef nonnull align 1 dereferenceable(4) %19, i1 noundef zeroext false)
          to label %.preheader779.us.1 unwind label %.split1652.us

.preheader777.us.preheader:                       ; preds = %285
  %292 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext true, ptr noundef nonnull align 1 dereferenceable(4) %290, ptr noundef nonnull align 1 dereferenceable(4) %19, i1 noundef zeroext false)
          to label %.preheader777.us.1 unwind label %.split1675.us

.preheader779.us.1:                               ; preds = %.preheader779.us.preheader
  %293 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %294 = getelementptr inbounds i8, ptr %293, i64 4
  %295 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext false, ptr noundef nonnull align 1 dereferenceable(4) %294, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.1, i1 noundef zeroext false)
          to label %.preheader779.us.2 unwind label %.split1652.us

.preheader779.us.2:                               ; preds = %.preheader779.us.1
  %296 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %297 = getelementptr inbounds i8, ptr %296, i64 8
  %298 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext false, ptr noundef nonnull align 1 dereferenceable(4) %297, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.2, i1 noundef zeroext false)
          to label %.preheader779.us.3 unwind label %.split1652.us

.preheader779.us.3:                               ; preds = %.preheader779.us.2
  %299 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %300 = getelementptr inbounds i8, ptr %299, i64 12
  %301 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext false, ptr noundef nonnull align 1 dereferenceable(4) %300, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.3, i1 noundef zeroext false)
          to label %.preheader779.us.4 unwind label %.split1652.us

.preheader779.us.4:                               ; preds = %.preheader779.us.3
  %302 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %303 = getelementptr inbounds i8, ptr %302, i64 16
  %304 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext false, ptr noundef nonnull align 1 dereferenceable(4) %303, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.4, i1 noundef zeroext false)
          to label %.preheader779.us.5 unwind label %.split1652.us

.preheader779.us.5:                               ; preds = %.preheader779.us.4
  %305 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %306 = getelementptr inbounds i8, ptr %305, i64 20
  %307 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext false, ptr noundef nonnull align 1 dereferenceable(4) %306, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.5, i1 noundef zeroext false)
          to label %.preheader779.us.6 unwind label %.split1652.us

.preheader779.us.6:                               ; preds = %.preheader779.us.5
  %308 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %309 = getelementptr inbounds i8, ptr %308, i64 24
  %310 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext false, ptr noundef nonnull align 1 dereferenceable(4) %309, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.6, i1 noundef zeroext false)
          to label %.preheader779.us.7 unwind label %.split1652.us

.preheader779.us.7:                               ; preds = %.preheader779.us.6
  %311 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %312 = getelementptr inbounds i8, ptr %311, i64 28
  %313 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext false, ptr noundef nonnull align 1 dereferenceable(4) %312, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.7, i1 noundef zeroext false)
          to label %.preheader779.us.8 unwind label %.split1652.us

.preheader779.us.8:                               ; preds = %.preheader779.us.7
  %314 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %315 = getelementptr inbounds i8, ptr %314, i64 32
  %316 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext false, ptr noundef nonnull align 1 dereferenceable(4) %315, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.8, i1 noundef zeroext false)
          to label %.preheader779.us.9 unwind label %.split1652.us

.preheader779.us.9:                               ; preds = %.preheader779.us.8
  %317 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %318 = getelementptr inbounds i8, ptr %317, i64 36
  %319 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext false, ptr noundef nonnull align 1 dereferenceable(4) %318, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.9, i1 noundef zeroext false)
          to label %.preheader779.us.10 unwind label %.split1652.us

.preheader779.us.10:                              ; preds = %.preheader779.us.9
  %320 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %321 = getelementptr inbounds i8, ptr %320, i64 40
  %322 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext false, ptr noundef nonnull align 1 dereferenceable(4) %321, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.10, i1 noundef zeroext false)
          to label %.preheader779.us.11 unwind label %.split1652.us

.preheader779.us.11:                              ; preds = %.preheader779.us.10
  %323 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %324 = getelementptr inbounds i8, ptr %323, i64 44
  %325 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext false, ptr noundef nonnull align 1 dereferenceable(4) %324, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.11, i1 noundef zeroext false)
          to label %.preheader779.us.12 unwind label %.split1652.us

.preheader779.us.12:                              ; preds = %.preheader779.us.11
  %326 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %327 = getelementptr inbounds i8, ptr %326, i64 48
  %328 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext false, ptr noundef nonnull align 1 dereferenceable(4) %327, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.12, i1 noundef zeroext false)
          to label %.preheader779.us.13 unwind label %.split1652.us

.preheader779.us.13:                              ; preds = %.preheader779.us.12
  %329 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %330 = getelementptr inbounds i8, ptr %329, i64 52
  %331 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext false, ptr noundef nonnull align 1 dereferenceable(4) %330, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.13, i1 noundef zeroext false)
          to label %.preheader779.us.14 unwind label %.split1652.us

.preheader779.us.14:                              ; preds = %.preheader779.us.13
  %332 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %333 = getelementptr inbounds i8, ptr %332, i64 56
  %334 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext false, ptr noundef nonnull align 1 dereferenceable(4) %333, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.14, i1 noundef zeroext false)
          to label %.preheader779.us.15 unwind label %.split1652.us

.preheader779.us.15:                              ; preds = %.preheader779.us.14
  %335 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %336 = getelementptr inbounds i8, ptr %335, i64 60
  %337 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext false, ptr noundef nonnull align 1 dereferenceable(4) %336, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.15, i1 noundef zeroext false)
          to label %.loopexit778.us unwind label %.split1652.us

.loopexit778.us:                                  ; preds = %.preheader779.us.15, %.preheader777.us.15
  %.sink2256 = phi i32 [ %292, %.preheader777.us.15 ], [ %291, %.preheader779.us.15 ]
  %.sink2255 = phi i32 [ %435, %.preheader777.us.15 ], [ %295, %.preheader779.us.15 ]
  %.sink2252 = phi i32 [ %438, %.preheader777.us.15 ], [ %298, %.preheader779.us.15 ]
  %.sink2249 = phi i32 [ %441, %.preheader777.us.15 ], [ %301, %.preheader779.us.15 ]
  %.sink2246 = phi i32 [ %444, %.preheader777.us.15 ], [ %304, %.preheader779.us.15 ]
  %.sink2243 = phi i32 [ %447, %.preheader777.us.15 ], [ %307, %.preheader779.us.15 ]
  %.sink2240 = phi i32 [ %450, %.preheader777.us.15 ], [ %310, %.preheader779.us.15 ]
  %.sink2237 = phi i32 [ %453, %.preheader777.us.15 ], [ %313, %.preheader779.us.15 ]
  %.sink2234 = phi i32 [ %456, %.preheader777.us.15 ], [ %316, %.preheader779.us.15 ]
  %.sink2231 = phi i32 [ %459, %.preheader777.us.15 ], [ %319, %.preheader779.us.15 ]
  %.sink2228 = phi i32 [ %462, %.preheader777.us.15 ], [ %322, %.preheader779.us.15 ]
  %.sink2225 = phi i32 [ %465, %.preheader777.us.15 ], [ %325, %.preheader779.us.15 ]
  %.sink2222 = phi i32 [ %468, %.preheader777.us.15 ], [ %328, %.preheader779.us.15 ]
  %.sink2219 = phi i32 [ %471, %.preheader777.us.15 ], [ %331, %.preheader779.us.15 ]
  %.sink2216 = phi i32 [ %474, %.preheader777.us.15 ], [ %334, %.preheader779.us.15 ]
  %.sink2213 = phi i32 [ %477, %.preheader777.us.15 ], [ %337, %.preheader779.us.15 ]
  %338 = zext i32 %.sink2256 to i64
  %339 = zext i32 %.sink2255 to i64
  %340 = add nuw nsw i64 %338, %339
  %341 = zext i32 %.sink2252 to i64
  %342 = add nuw nsw i64 %340, %341
  %343 = zext i32 %.sink2249 to i64
  %344 = add nuw nsw i64 %342, %343
  %345 = zext i32 %.sink2246 to i64
  %346 = add nuw nsw i64 %344, %345
  %347 = zext i32 %.sink2243 to i64
  %348 = add nuw nsw i64 %346, %347
  %349 = zext i32 %.sink2240 to i64
  %350 = add nuw nsw i64 %348, %349
  %351 = zext i32 %.sink2237 to i64
  %352 = add nuw nsw i64 %350, %351
  %353 = zext i32 %.sink2234 to i64
  %354 = add nuw nsw i64 %352, %353
  %355 = zext i32 %.sink2231 to i64
  %356 = add nuw nsw i64 %354, %355
  %357 = zext i32 %.sink2228 to i64
  %358 = add nuw nsw i64 %356, %357
  %359 = zext i32 %.sink2225 to i64
  %360 = add nuw nsw i64 %358, %359
  %361 = zext i32 %.sink2222 to i64
  %362 = add nuw nsw i64 %360, %361
  %363 = zext i32 %.sink2219 to i64
  %364 = add nuw nsw i64 %362, %363
  %365 = zext i32 %.sink2216 to i64
  %366 = add nuw nsw i64 %364, %365
  %367 = zext i32 %.sink2213 to i64
  %368 = add nuw nsw i64 %366, %367
  %369 = load float, ptr %71, align 8, !tbaa !53
  %370 = call noundef float @_ZN6basisu7maximumIfEET_S1_S1_(float noundef 1.000000e+00, float noundef %369)
  %371 = load i32, ptr %72, align 4, !tbaa !54
  %372 = icmp eq i32 %371, 0
  %373 = fcmp oeq float %370, 1.000000e+00
  %374 = and i1 %373, %372
  %375 = uitofp nneg i64 %368 to float
  %376 = fmul float %370, %375
  %377 = call float @llvm.ceil.f32(float %376)
  %378 = fptoui float %377 to i64
  br label %379

379:                                              ; preds = %428, %.loopexit778.us
  %.0598.us = phi i64 [ -1, %.loopexit778.us ], [ %.3601.ph.us, %428 ]
  %.0593.us = phi i32 [ 0, %.loopexit778.us ], [ %.3596.ph.us, %428 ]
  %.0588.us = phi i32 [ 0, %.loopexit778.us ], [ %.3591.ph.us, %428 ]
  %.0583.us = phi i32 [ 0, %.loopexit778.us ], [ %429, %428 ]
  %380 = invoke noundef i32 @_ZNK6basist20approx_move_to_front4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %2)
          to label %381 unwind label %.split1655.us

381:                                              ; preds = %379
  %382 = icmp ult i32 %.0583.us, %380
  br i1 %382, label %384, label %383

383:                                              ; preds = %381
  %.not698.us = icmp eq i64 %.0598.us, -1
  br i1 %.not698.us, label %432, label %.thread754.us

384:                                              ; preds = %381
  %385 = invoke noundef i32 @_ZN6basist20approx_move_to_frontixEj(ptr noundef nonnull align 8 dereferenceable(20) %2, i32 noundef %.0583.us)
          to label %386 unwind label %.split1658.us

386:                                              ; preds = %384
  br i1 %374, label %426, label %387

387:                                              ; preds = %386
  %388 = call noundef i64 @_ZN6basisu7minimumImEET_S1_S1_(i64 noundef %378, i64 noundef %.0598.us)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #9
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %20)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr687.us.1)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr687.us.2)
  call void @_ZN6basisu10color_rgbaC2Ev(ptr noundef nonnull align 1 dereferenceable(4) %.ptr687.us.3)
  %389 = invoke noundef zeroext i1 @_ZNK6basisu9etc_block16get_block_colorsEPNS_10color_rgbaEj(ptr noundef nonnull align 8 dereferenceable(8) %283, ptr noundef nonnull %20, i32 noundef 0)
          to label %390 unwind label %.split1661.us

390:                                              ; preds = %387
  %391 = sext i32 %385 to i64
  %392 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %74, i64 noundef %391)
  %393 = load i32, ptr %392, align 4, !tbaa !29
  %394 = zext i32 %393 to i64
  %395 = call noundef nonnull align 1 dereferenceable(16) ptr @_ZN6basisu6vectorIN6basist27etc1_selector_palette_entryEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %73, i64 noundef %394)
  %396 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basist27etc1_selector_palette_entryclEjj(ptr noundef nonnull align 1 dereferenceable(16) %395, i32 noundef 0, i32 noundef 0)
  %397 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNK6basisu15basisu_frontend10get_paramsEv(ptr noundef nonnull align 8 dereferenceable(496) %36)
  %398 = getelementptr inbounds i8, ptr %397, i64 28
  %399 = load i8, ptr %398, align 4, !tbaa !46, !range !38, !noundef !39
  %400 = trunc nuw i8 %399 to i1
  br i1 %400, label %.preheader767.us, label %.preheader768.us

.preheader768.us:                                 ; preds = %390, %408
  %indvars.iv = phi i64 [ %indvars.iv.next, %408 ], [ 0, %390 ]
  %.25771561.us = phi i64 [ %410, %408 ], [ 0, %390 ]
  %401 = getelementptr inbounds i8, ptr %396, i64 %indvars.iv
  %402 = load i8, ptr %401, align 1, !tbaa !36
  %403 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %404 = getelementptr inbounds %"class.basisu::color_rgba", ptr %403, i64 %indvars.iv
  %405 = zext i8 %402 to i64
  %406 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %20, i64 0, i64 %405
  %407 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext false, ptr noundef nonnull align 1 dereferenceable(4) %404, ptr noundef nonnull align 1 dereferenceable(4) %406, i1 noundef zeroext false)
          to label %408 unwind label %.split1664.us

408:                                              ; preds = %.preheader768.us
  %409 = zext i32 %407 to i64
  %410 = add i64 %.25771561.us, %409
  %.not689.us = icmp ule i64 %410, %388
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %411 = icmp ult i64 %indvars.iv, 15
  %or.cond = and i1 %.not689.us, %411
  br i1 %or.cond, label %.preheader768.us, label %.loopexit.us, !llvm.loop !55

.preheader767.us:                                 ; preds = %390, %419
  %indvars.iv2001 = phi i64 [ %indvars.iv.next2002, %419 ], [ 0, %390 ]
  %.05751563.us = phi i64 [ %421, %419 ], [ 0, %390 ]
  %412 = getelementptr inbounds i8, ptr %396, i64 %indvars.iv2001
  %413 = load i8, ptr %412, align 1, !tbaa !36
  %414 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %415 = getelementptr inbounds %"class.basisu::color_rgba", ptr %414, i64 %indvars.iv2001
  %416 = zext i8 %413 to i64
  %417 = getelementptr inbounds [4 x %"class.basisu::color_rgba"], ptr %20, i64 0, i64 %416
  %418 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext true, ptr noundef nonnull align 1 dereferenceable(4) %415, ptr noundef nonnull align 1 dereferenceable(4) %417, i1 noundef zeroext false)
          to label %419 unwind label %.split1667.us

419:                                              ; preds = %.preheader767.us
  %420 = zext i32 %418 to i64
  %421 = add i64 %.05751563.us, %420
  %.not695.us = icmp ule i64 %421, %388
  %indvars.iv.next2002 = add nuw nsw i64 %indvars.iv2001, 1
  %422 = icmp ult i64 %indvars.iv2001, 15
  %or.cond1786 = and i1 %.not695.us, %422
  br i1 %or.cond1786, label %.preheader767.us, label %.loopexit.us, !llvm.loop !56

.loopexit.us:                                     ; preds = %408, %419
  %.4579.us = phi i64 [ %421, %419 ], [ %410, %408 ]
  %423 = icmp uge i64 %.4579.us, %.0598.us
  %.not696.us = icmp ugt i64 %.4579.us, %388
  %or.cond735.us = or i1 %423, %.not696.us
  br i1 %or.cond735.us, label %425, label %424

424:                                              ; preds = %.loopexit.us
  %.not697.us = icmp ugt i64 %.4579.us, %378
  br i1 %.not697.us, label %.split1670.us, label %425

425:                                              ; preds = %424, %.loopexit.us
  %.1599.us = phi i64 [ %.0598.us, %.loopexit.us ], [ %.4579.us, %424 ]
  %.1594.us = phi i32 [ %.0593.us, %.loopexit.us ], [ %385, %424 ]
  %.1589.us = phi i32 [ %.0588.us, %.loopexit.us ], [ %.0583.us, %424 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #9
  br label %428

426:                                              ; preds = %386
  %427 = icmp eq i32 %385, %276
  br i1 %427, label %.thread754.us, label %428

428:                                              ; preds = %426, %425
  %.3601.ph.us = phi i64 [ %.1599.us, %425 ], [ %.0598.us, %426 ]
  %.3596.ph.us = phi i32 [ %.1594.us, %425 ], [ %.0593.us, %426 ]
  %.3591.ph.us = phi i32 [ %.1589.us, %425 ], [ %.0588.us, %426 ]
  %429 = add i32 %.0583.us, 1
  br label %379, !llvm.loop !57

.thread754.us:                                    ; preds = %426, %383
  %.4592760.us = phi i32 [ %.0588.us, %383 ], [ %.0583.us, %426 ]
  %.4597759.us = phi i32 [ %.0593.us, %383 ], [ %276, %426 ]
  %.not699.us = icmp ne i32 %276, %.4597759.us
  %430 = zext i1 %.not699.us to i32
  %spec.select.us = add i32 %.24111574.us, %430
  %431 = add i32 %.24071575.us, 1
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %3, i32 noundef %.4592760.us)
          to label %432 unwind label %.split1672.us

432:                                              ; preds = %.thread754.us, %383
  %.3611.us = phi i32 [ %.4592760.us, %.thread754.us ], [ -1, %383 ]
  %.0586.us = phi i32 [ %.4597759.us, %.thread754.us ], [ %276, %383 ]
  %.4413.us = phi i32 [ %spec.select.us, %.thread754.us ], [ %.24111574.us, %383 ]
  %.6.us = phi i32 [ %431, %.thread754.us ], [ %.24071575.us, %383 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %19) #9
  br label %.loopexit775.us

.preheader777.us.1:                               ; preds = %.preheader777.us.preheader
  %433 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %434 = getelementptr inbounds i8, ptr %433, i64 4
  %435 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext true, ptr noundef nonnull align 1 dereferenceable(4) %434, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.1, i1 noundef zeroext false)
          to label %.preheader777.us.2 unwind label %.split1675.us

.preheader777.us.2:                               ; preds = %.preheader777.us.1
  %436 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %437 = getelementptr inbounds i8, ptr %436, i64 8
  %438 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext true, ptr noundef nonnull align 1 dereferenceable(4) %437, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.2, i1 noundef zeroext false)
          to label %.preheader777.us.3 unwind label %.split1675.us

.preheader777.us.3:                               ; preds = %.preheader777.us.2
  %439 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %440 = getelementptr inbounds i8, ptr %439, i64 12
  %441 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext true, ptr noundef nonnull align 1 dereferenceable(4) %440, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.3, i1 noundef zeroext false)
          to label %.preheader777.us.4 unwind label %.split1675.us

.preheader777.us.4:                               ; preds = %.preheader777.us.3
  %442 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %443 = getelementptr inbounds i8, ptr %442, i64 16
  %444 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext true, ptr noundef nonnull align 1 dereferenceable(4) %443, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.4, i1 noundef zeroext false)
          to label %.preheader777.us.5 unwind label %.split1675.us

.preheader777.us.5:                               ; preds = %.preheader777.us.4
  %445 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %446 = getelementptr inbounds i8, ptr %445, i64 20
  %447 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext true, ptr noundef nonnull align 1 dereferenceable(4) %446, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.5, i1 noundef zeroext false)
          to label %.preheader777.us.6 unwind label %.split1675.us

.preheader777.us.6:                               ; preds = %.preheader777.us.5
  %448 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %449 = getelementptr inbounds i8, ptr %448, i64 24
  %450 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext true, ptr noundef nonnull align 1 dereferenceable(4) %449, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.6, i1 noundef zeroext false)
          to label %.preheader777.us.7 unwind label %.split1675.us

.preheader777.us.7:                               ; preds = %.preheader777.us.6
  %451 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %452 = getelementptr inbounds i8, ptr %451, i64 28
  %453 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext true, ptr noundef nonnull align 1 dereferenceable(4) %452, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.7, i1 noundef zeroext false)
          to label %.preheader777.us.8 unwind label %.split1675.us

.preheader777.us.8:                               ; preds = %.preheader777.us.7
  %454 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %455 = getelementptr inbounds i8, ptr %454, i64 32
  %456 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext true, ptr noundef nonnull align 1 dereferenceable(4) %455, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.8, i1 noundef zeroext false)
          to label %.preheader777.us.9 unwind label %.split1675.us

.preheader777.us.9:                               ; preds = %.preheader777.us.8
  %457 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %458 = getelementptr inbounds i8, ptr %457, i64 36
  %459 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext true, ptr noundef nonnull align 1 dereferenceable(4) %458, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.9, i1 noundef zeroext false)
          to label %.preheader777.us.10 unwind label %.split1675.us

.preheader777.us.10:                              ; preds = %.preheader777.us.9
  %460 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %461 = getelementptr inbounds i8, ptr %460, i64 40
  %462 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext true, ptr noundef nonnull align 1 dereferenceable(4) %461, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.10, i1 noundef zeroext false)
          to label %.preheader777.us.11 unwind label %.split1675.us

.preheader777.us.11:                              ; preds = %.preheader777.us.10
  %463 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %464 = getelementptr inbounds i8, ptr %463, i64 44
  %465 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext true, ptr noundef nonnull align 1 dereferenceable(4) %464, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.11, i1 noundef zeroext false)
          to label %.preheader777.us.12 unwind label %.split1675.us

.preheader777.us.12:                              ; preds = %.preheader777.us.11
  %466 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %467 = getelementptr inbounds i8, ptr %466, i64 48
  %468 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext true, ptr noundef nonnull align 1 dereferenceable(4) %467, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.12, i1 noundef zeroext false)
          to label %.preheader777.us.13 unwind label %.split1675.us

.preheader777.us.13:                              ; preds = %.preheader777.us.12
  %469 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %470 = getelementptr inbounds i8, ptr %469, i64 52
  %471 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext true, ptr noundef nonnull align 1 dereferenceable(4) %470, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.13, i1 noundef zeroext false)
          to label %.preheader777.us.14 unwind label %.split1675.us

.preheader777.us.14:                              ; preds = %.preheader777.us.13
  %472 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %473 = getelementptr inbounds i8, ptr %472, i64 56
  %474 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext true, ptr noundef nonnull align 1 dereferenceable(4) %473, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.14, i1 noundef zeroext false)
          to label %.preheader777.us.15 unwind label %.split1675.us

.preheader777.us.15:                              ; preds = %.preheader777.us.14
  %475 = call noundef ptr @_ZNK6basisu11pixel_block7get_ptrEv(ptr noundef nonnull align 1 dereferenceable(64) %281)
  %476 = getelementptr inbounds i8, ptr %475, i64 60
  %477 = invoke noundef i32 @_ZN6basisu14color_distanceEbRKNS_10color_rgbaES2_b(i1 noundef zeroext true, ptr noundef nonnull align 1 dereferenceable(4) %476, ptr noundef nonnull align 1 dereferenceable(4) %.ptr.us.15, i1 noundef zeroext false)
          to label %.loopexit778.us unwind label %.split1675.us

.preheader774.us:                                 ; preds = %271, %484
  %.0613.us = phi i32 [ %485, %484 ], [ 0, %271 ]
  %478 = invoke noundef i32 @_ZNK6basist20approx_move_to_front4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %2)
          to label %479 unwind label %.split1678.us

479:                                              ; preds = %.preheader774.us
  %480 = icmp ult i32 %.0613.us, %478
  br i1 %480, label %481, label %.loopexit775.us

481:                                              ; preds = %479
  %482 = invoke noundef i32 @_ZN6basist20approx_move_to_frontixEj(ptr noundef nonnull align 8 dereferenceable(20) %2, i32 noundef %.0613.us)
          to label %483 unwind label %.loopexit776.split.us

483:                                              ; preds = %481
  %.not708.us = icmp eq i32 %482, %276
  br i1 %.not708.us, label %486, label %484

484:                                              ; preds = %483
  %485 = add nuw i32 %.0613.us, 1
  br label %.preheader774.us, !llvm.loop !58

486:                                              ; preds = %483
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %3, i32 noundef %.0613.us)
          to label %.thread743.us unwind label %.loopexit.split-lp.split.us

.thread743.us:                                    ; preds = %486
  %487 = add i32 %.24071575.us, 1
  br label %.loopexit775.us

.loopexit775.us:                                  ; preds = %479, %.thread743.us, %432
  %.4612.us = phi i32 [ %.3611.us, %432 ], [ %.0613.us, %.thread743.us ], [ -1, %479 ]
  %.1587.us = phi i32 [ %.0586.us, %432 ], [ %276, %.thread743.us ], [ %276, %479 ]
  %.5414.us = phi i32 [ %.4413.us, %432 ], [ %.24111574.us, %.thread743.us ], [ %.24111574.us, %479 ]
  %.7.us = phi i32 [ %.6.us, %432 ], [ %487, %.thread743.us ], [ %.24071575.us, %479 ]
  %488 = sext i32 %.1587.us to i64
  %489 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %74, i64 noundef %488)
  %490 = load i32, ptr %489, align 4, !tbaa !29
  store i32 %490, ptr %272, align 4, !tbaa !52
  %491 = icmp ne i32 %.15181572.us, 0
  %492 = icmp ne i32 %.4612.us, 0
  %or.cond.us = select i1 %491, i1 %492, i1 false
  br i1 %or.cond.us, label %493, label %.loopexit773.us

493:                                              ; preds = %.loopexit775.us
  %494 = icmp sgt i32 %.15181572.us, 2
  br i1 %494, label %500, label %.preheader772.us

.lr.ph1566.us:                                    ; preds = %.preheader772.us, %498
  %.05591565.us = phi i32 [ %499, %498 ], [ 0, %.preheader772.us ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #9
  store i32 %50, ptr %22, align 4, !tbaa !29
  %495 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %indvars.iv2009)
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %495, ptr noundef nonnull align 4 dereferenceable(4) %22)
          to label %496 unwind label %.split1683.us

496:                                              ; preds = %.lr.ph1566.us
  %497 = load i32, ptr %22, align 4, !tbaa !29
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef %497)
          to label %498 unwind label %.split1683.us

498:                                              ; preds = %496
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #9
  %499 = add nuw nsw i32 %.05591565.us, 1
  %exitcond2004.not = icmp eq i32 %499, %.15181572.us
  br i1 %exitcond2004.not, label %.loopexit773.us, label %.lr.ph1566.us, !llvm.loop !59

500:                                              ; preds = %493
  %501 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %indvars.iv2009)
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %501, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %502 unwind label %.split1686.us

502:                                              ; preds = %500
  %503 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %indvars.iv2009)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #9
  store i32 %.15181572.us, ptr %21, align 4, !tbaa !29
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %503, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %.invoke unwind label %.split1689.us

.invoke:                                          ; preds = %502
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #9
  %504 = icmp ugt i32 %.15181572.us, 65
  %505 = add nsw i32 %.15181572.us, -3
  %506 = select i1 %504, i32 63, i32 %505
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef %506)
          to label %507 unwind label %.split1692.us

507:                                              ; preds = %.invoke
  %508 = load i32, ptr %7, align 4, !tbaa !29
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef %508)
          to label %.loopexit773.us unwind label %.split1692.us

.loopexit773.us:                                  ; preds = %498, %.preheader772.us, %507, %.loopexit775.us
  %.2519.us = phi i32 [ %.15181572.us, %.loopexit775.us ], [ 0, %507 ], [ 0, %.preheader772.us ], [ 0, %498 ]
  %509 = icmp sgt i32 %.4612.us, -1
  br i1 %509, label %515, label %510

510:                                              ; preds = %.loopexit773.us
  %511 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %indvars.iv2009)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #9
  store i32 %.1587.us, ptr %24, align 4, !tbaa !29
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %511, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %512 unwind label %.split1695.us

512:                                              ; preds = %510
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #9
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef %.1587.us)
          to label %513 unwind label %.split1686.us

513:                                              ; preds = %512
  %514 = getelementptr inbounds i8, ptr %146, i64 12
  store i32 %.4612.us, ptr %514, align 4, !tbaa !60
  invoke void @_ZN6basist20approx_move_to_front3addEi(ptr noundef nonnull align 8 dereferenceable(20) %2, i32 noundef %.1587.us)
          to label %530 unwind label %.split1686.us

515:                                              ; preds = %.loopexit773.us
  %516 = icmp eq i32 %.4612.us, 0
  br i1 %516, label %523, label %517

517:                                              ; preds = %515
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #9
  %518 = add i32 %.4612.us, %50
  store i32 %518, ptr %23, align 4, !tbaa !29
  %519 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %indvars.iv2009)
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %519, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %520 unwind label %.split1698.us

520:                                              ; preds = %517
  %521 = load i32, ptr %23, align 4, !tbaa !29
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef %521)
          to label %522 unwind label %.split1698.us

522:                                              ; preds = %520
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #9
  br label %525

523:                                              ; preds = %515
  %524 = add nsw i32 %.2519.us, 1
  br label %525

525:                                              ; preds = %523, %522
  %.3520.ph.us = phi i32 [ %.2519.us, %522 ], [ %524, %523 ]
  %526 = getelementptr inbounds i8, ptr %146, i64 12
  store i32 %.4612.us, ptr %526, align 4, !tbaa !60
  %527 = invoke noundef i32 @_ZNK6basist20approx_move_to_front4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %2)
          to label %528 unwind label %.split1686.us

528:                                              ; preds = %525
  %.not709.us = icmp eq i32 %527, 0
  br i1 %.not709.us, label %530, label %529

529:                                              ; preds = %528
  invoke void @_ZN6basist20approx_move_to_front3useEj(ptr noundef nonnull align 8 dereferenceable(20) %2, i32 noundef %.4612.us)
          to label %530 unwind label %.split1686.us

530:                                              ; preds = %529, %528, %513, %269
  %.4521.us = phi i32 [ %.15181572.us, %269 ], [ %.3520.ph.us, %528 ], [ %.3520.ph.us, %529 ], [ %.2519.us, %513 ]
  %.6415.us = phi i32 [ %.24111574.us, %269 ], [ %.5414.us, %528 ], [ %.5414.us, %529 ], [ %.5414.us, %513 ]
  %.8.us = phi i32 [ %.24071575.us, %269 ], [ %.7.us, %528 ], [ %.7.us, %529 ], [ %.7.us, %513 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %25) #9
  %531 = getelementptr inbounds i8, ptr %146, i64 8
  %532 = load i32, ptr %531, align 4, !tbaa !52
  store i32 %532, ptr %25, align 4, !tbaa !29
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %533 unwind label %.split1701.us

533:                                              ; preds = %530
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #9
  %534 = add nuw i32 %.05541567.us, 1
  %exitcond2005.not = icmp eq i32 %534, %97
  br i1 %exitcond2005.not, label %._crit_edge1577.us, label %143, !llvm.loop !61

535:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #9
  store i32 0, ptr %14, align 4, !tbaa !29
  %536 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN6basisu6vectorINS_8vector2DINS_13encoder_blockEEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %64, i64 noundef %indvars.iv2009)
  %537 = invoke noundef nonnull align 4 dereferenceable(17) ptr @_ZN6basisu8vector2DINS_13encoder_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %536, i32 noundef %.05541567.us, i32 noundef %.05531585.us)
          to label %.preheader771.split.us1602.1 unwind label %.split1704.us

.preheader771.split.us1602.1:                     ; preds = %535
  %.pre = load i32, ptr %14, align 4, !tbaa !29
  %538 = load i32, ptr %537, align 4, !tbaa !34
  %539 = or i32 %.pre, %538
  store i32 %539, ptr %14, align 4, !tbaa !29
  %540 = or disjoint i32 %.05541567.us, 1
  %541 = icmp ult i32 %540, %97
  br i1 %541, label %542, label %.split1548.us1600

542:                                              ; preds = %.preheader771.split.us1602.1
  %543 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN6basisu6vectorINS_8vector2DINS_13encoder_blockEEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %64, i64 noundef %indvars.iv2009)
  %544 = invoke noundef nonnull align 4 dereferenceable(17) ptr @_ZN6basisu8vector2DINS_13encoder_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %543, i32 noundef %540, i32 noundef %.05531585.us)
          to label %545 unwind label %.split1704.us

545:                                              ; preds = %542
  %546 = load i32, ptr %544, align 4, !tbaa !34
  %.pre2017 = load i32, ptr %14, align 4, !tbaa !29
  br label %.split1548.us1600

.preheader772.us:                                 ; preds = %493
  %547 = icmp sgt i32 %.15181572.us, 0
  br i1 %547, label %.lr.ph1566.us, label %.loopexit773.us

.split1548.us1600:                                ; preds = %.preheader771.split.us1602.1, %545
  %548 = phi i32 [ %.pre2017, %545 ], [ %539, %.preheader771.split.us1602.1 ]
  %.0560.us.1 = phi i32 [ %546, %545 ], [ 3, %.preheader771.split.us1602.1 ]
  %549 = shl i32 %.0560.us.1, 2
  %550 = or i32 %548, %549
  store i32 %550, ptr %14, align 4, !tbaa !29
  br i1 %.fr1549.us.1, label %.preheader771.split.us1602.preheader.1, label %.preheader771.split.us.us.1

.preheader771.split.us.us.1:                      ; preds = %.split1548.us1600
  %551 = or i32 %550, 240
  br label %.split1548.us1600.1

.preheader771.split.us1602.preheader.1:           ; preds = %.split1548.us1600
  %552 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN6basisu6vectorINS_8vector2DINS_13encoder_blockEEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %64, i64 noundef %indvars.iv2009)
  %553 = invoke noundef nonnull align 4 dereferenceable(17) ptr @_ZN6basisu8vector2DINS_13encoder_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %552, i32 noundef %.05541567.us, i32 noundef %141)
          to label %.preheader771.split.us1602.1.1 unwind label %.split1704.us

.preheader771.split.us1602.1.1:                   ; preds = %.preheader771.split.us1602.preheader.1
  %.pre2024 = load i32, ptr %14, align 4, !tbaa !29
  %554 = load i32, ptr %553, align 4, !tbaa !34
  %555 = shl i32 %554, 4
  %556 = or i32 %.pre2024, %555
  store i32 %556, ptr %14, align 4, !tbaa !29
  %557 = or disjoint i32 %.05541567.us, 1
  %558 = icmp ult i32 %557, %97
  br i1 %558, label %559, label %.split1548.us1600.loopexit.1

559:                                              ; preds = %.preheader771.split.us1602.1.1
  %560 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN6basisu6vectorINS_8vector2DINS_13encoder_blockEEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %64, i64 noundef %indvars.iv2009)
  %561 = invoke noundef nonnull align 4 dereferenceable(17) ptr @_ZN6basisu8vector2DINS_13encoder_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %560, i32 noundef %557, i32 noundef %141)
          to label %562 unwind label %.split1704.us

562:                                              ; preds = %559
  %563 = load i32, ptr %561, align 4, !tbaa !34
  %.pre2025 = load i32, ptr %14, align 4, !tbaa !29
  br label %.split1548.us1600.loopexit.1

.split1548.us1600.loopexit.1:                     ; preds = %562, %.preheader771.split.us1602.1.1
  %564 = phi i32 [ %.pre2025, %562 ], [ %556, %.preheader771.split.us1602.1.1 ]
  %.0560.us.1.1 = phi i32 [ %563, %562 ], [ 3, %.preheader771.split.us1602.1.1 ]
  %565 = shl i32 %.0560.us.1.1, 6
  %566 = or i32 %564, %565
  br label %.split1548.us1600.1

.split1548.us1600.1:                              ; preds = %.split1548.us1600.loopexit.1, %.preheader771.split.us.us.1
  %storemerge = phi i32 [ %551, %.preheader771.split.us.us.1 ], [ %566, %.split1548.us1600.loopexit.1 ]
  store i32 %storemerge, ptr %14, align 4, !tbaa !29
  %567 = icmp eq i32 %storemerge, %.15231571.us
  br i1 %567, label %169, label %150

._crit_edge1577.us:                               ; preds = %533
  %568 = add nuw i32 %.05531585.us, 1
  %exitcond2006.not = icmp eq i32 %568, %100
  br i1 %exitcond2006.not, label %._crit_edge1593, label %.preheader783.us, !llvm.loop !62

.split1610.us:                                    ; preds = %143
  %569 = landingpad { ptr, i32 }
          cleanup
  br label %656

.split1613.us:                                    ; preds = %.lr.ph.us
  %570 = landingpad { ptr, i32 }
          cleanup
  br label %605

.split1616.us:                                    ; preds = %154
  %571 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #9
  br label %605

.split1619.us:                                    ; preds = %165, %.loopexit782.us, %159, %158
  %572 = landingpad { ptr, i32 }
          cleanup
  br label %605

.split1622.us:                                    ; preds = %161
  %573 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #9
  br label %605

.split1625.us:                                    ; preds = %190
  %574 = landingpad { ptr, i32 }
          cleanup
  br label %656

.split1628.us:                                    ; preds = %192
  %575 = landingpad { ptr, i32 }
          cleanup
  br label %607

.split1631.us:                                    ; preds = %229, %225, %222
  %576 = landingpad { ptr, i32 }
          cleanup
  br label %606

.split1634.us:                                    ; preds = %240
  %577 = landingpad { ptr, i32 }
          cleanup
  br label %606

.split1637.us:                                    ; preds = %245
  %578 = landingpad { ptr, i32 }
          cleanup
  br label %606

.split1640.us:                                    ; preds = %265, %261
  %579 = landingpad { ptr, i32 }
          cleanup
  br label %656

.split1643.us:                                    ; preds = %266
  %580 = landingpad { ptr, i32 }
          cleanup
  br label %656

.split1646.us:                                    ; preds = %280
  %581 = landingpad { ptr, i32 }
          cleanup
  br label %656

.split1649.us:                                    ; preds = %282
  %582 = landingpad { ptr, i32 }
          cleanup
  br label %609

.split1652.us:                                    ; preds = %.preheader779.us.15, %.preheader779.us.14, %.preheader779.us.13, %.preheader779.us.12, %.preheader779.us.11, %.preheader779.us.10, %.preheader779.us.9, %.preheader779.us.8, %.preheader779.us.7, %.preheader779.us.6, %.preheader779.us.5, %.preheader779.us.4, %.preheader779.us.3, %.preheader779.us.2, %.preheader779.us.1, %.preheader779.us.preheader
  %583 = landingpad { ptr, i32 }
          cleanup
  br label %609

.split1655.us:                                    ; preds = %379
  %584 = landingpad { ptr, i32 }
          cleanup
  br label %609

.split1658.us:                                    ; preds = %384
  %585 = landingpad { ptr, i32 }
          cleanup
  br label %609

.split1661.us:                                    ; preds = %387
  %586 = landingpad { ptr, i32 }
          cleanup
  br label %608

.split1664.us:                                    ; preds = %.preheader768.us
  %587 = landingpad { ptr, i32 }
          cleanup
  br label %608

.split1667.us:                                    ; preds = %.preheader767.us
  %588 = landingpad { ptr, i32 }
          cleanup
  br label %608

.split1672.us:                                    ; preds = %.thread754.us
  %589 = landingpad { ptr, i32 }
          cleanup
  br label %609

.split1675.us:                                    ; preds = %.preheader777.us.15, %.preheader777.us.14, %.preheader777.us.13, %.preheader777.us.12, %.preheader777.us.11, %.preheader777.us.10, %.preheader777.us.9, %.preheader777.us.8, %.preheader777.us.7, %.preheader777.us.6, %.preheader777.us.5, %.preheader777.us.4, %.preheader777.us.3, %.preheader777.us.2, %.preheader777.us.1, %.preheader777.us.preheader
  %590 = landingpad { ptr, i32 }
          cleanup
  br label %609

.split1678.us:                                    ; preds = %.preheader774.us
  %591 = landingpad { ptr, i32 }
          cleanup
  br label %656

.loopexit776.split.us:                            ; preds = %481
  %lpad.loopexit.us = landingpad { ptr, i32 }
          cleanup
  br label %656

.loopexit.split-lp.split.us:                      ; preds = %486
  %lpad.loopexit.split-lp.us = landingpad { ptr, i32 }
          cleanup
  br label %656

.split1683.us:                                    ; preds = %496, %.lr.ph1566.us
  %592 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #9
  br label %656

.split1686.us:                                    ; preds = %529, %525, %513, %512, %500
  %593 = landingpad { ptr, i32 }
          cleanup
  br label %656

.split1689.us:                                    ; preds = %502
  %594 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #9
  br label %656

.split1692.us:                                    ; preds = %.invoke, %507
  %595 = landingpad { ptr, i32 }
          cleanup
  br label %656

.split1695.us:                                    ; preds = %510
  %596 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #9
  br label %656

.split1698.us:                                    ; preds = %520, %517
  %597 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #9
  br label %656

.split1701.us:                                    ; preds = %530
  %598 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #9
  br label %656

.split1704.us:                                    ; preds = %559, %.preheader771.split.us1602.preheader.1, %542, %535
  %599 = landingpad { ptr, i32 }
          cleanup
  br label %605

600:                                              ; preds = %92
  %601 = landingpad { ptr, i32 }
          cleanup
  br label %1046

602:                                              ; preds = %101
  %603 = landingpad { ptr, i32 }
          cleanup
  br label %657

._crit_edge1593:                                  ; preds = %._crit_edge1577.us
  %604 = icmp sgt i32 %.4548.us, 0
  br i1 %604, label %610, label %.loopexit788

605:                                              ; preds = %.split1613.us, %.split1616.us, %.split1622.us, %.split1619.us, %.split1704.us
  %.pn714 = phi { ptr, i32 } [ %599, %.split1704.us ], [ %572, %.split1619.us ], [ %573, %.split1622.us ], [ %571, %.split1616.us ], [ %570, %.split1613.us ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #9
  br label %656

606:                                              ; preds = %.split1634.us, %.split1637.us, %.split1631.us
  %.pn675.pn = phi { ptr, i32 } [ %576, %.split1631.us ], [ %578, %.split1637.us ], [ %577, %.split1634.us ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #9
  br label %607

607:                                              ; preds = %606, %.split1628.us
  %.pn675.pn.pn = phi { ptr, i32 } [ %.pn675.pn, %606 ], [ %575, %.split1628.us ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #9
  br label %656

.split1670.us:                                    ; preds = %424
  call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.6, i32 noundef 1024, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6basisu14basisu_backend12encode_imageEv) #10
  unreachable

608:                                              ; preds = %.split1667.us, %.split1664.us, %.split1661.us
  %.pn690.pn = phi { ptr, i32 } [ %586, %.split1661.us ], [ %588, %.split1667.us ], [ %587, %.split1664.us ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #9
  br label %609

609:                                              ; preds = %.split1675.us, %.split1652.us, %.split1655.us, %608, %.split1658.us, %.split1672.us, %.split1649.us
  %.pn702.pn = phi { ptr, i32 } [ %582, %.split1649.us ], [ %590, %.split1675.us ], [ %583, %.split1652.us ], [ %589, %.split1672.us ], [ %584, %.split1655.us ], [ %.pn690.pn, %608 ], [ %585, %.split1658.us ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %19) #9
  br label %656

610:                                              ; preds = %._crit_edge1593
  %611 = icmp ugt i32 %.4548.us, 3
  br i1 %611, label %612, label %.lr.ph

612:                                              ; preds = %610
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef 256)
          to label %613 unwind label %618

613:                                              ; preds = %612
  %614 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %10, i64 noundef %indvars.iv2009)
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %614, ptr noundef nonnull align 4 dereferenceable(4) @_ZN6basistL32ENDPOINT_PRED_REPEAT_LAST_SYMBOLE)
          to label %615 unwind label %618

615:                                              ; preds = %613
  %616 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %10, i64 noundef %indvars.iv2009)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %26) #9
  store i32 %.4548.us, ptr %26, align 4, !tbaa !29
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %616, ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %617 unwind label %620

617:                                              ; preds = %615
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #9
  br label %.loopexit788

618:                                              ; preds = %633, %613, %612
  %619 = landingpad { ptr, i32 }
          cleanup
  br label %656

620:                                              ; preds = %615
  %621 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #9
  br label %656

.lr.ph:                                           ; preds = %610, %624
  %.05581706 = phi i32 [ %625, %624 ], [ 0, %610 ]
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef %.3525.us)
          to label %622 unwind label %626

622:                                              ; preds = %.lr.ph
  %623 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %10, i64 noundef %indvars.iv2009)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %27) #9
  store i32 %.3525.us, ptr %27, align 4, !tbaa !29
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %623, ptr noundef nonnull align 4 dereferenceable(4) %27)
          to label %624 unwind label %628

624:                                              ; preds = %622
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %27) #9
  %625 = add nuw nsw i32 %.05581706, 1
  %exitcond2007.not = icmp eq i32 %625, %.4548.us
  br i1 %exitcond2007.not, label %.loopexit788, label %.lr.ph, !llvm.loop !63

626:                                              ; preds = %.lr.ph
  %627 = landingpad { ptr, i32 }
          cleanup
  br label %656

628:                                              ; preds = %622
  %629 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %27) #9
  br label %656

.loopexit788:                                     ; preds = %624, %617, %._crit_edge1593
  %.not668 = icmp eq i32 %.4521.us, 0
  br i1 %.not668, label %.loopexit786, label %630

630:                                              ; preds = %.loopexit788
  %631 = icmp sgt i32 %.4521.us, 2
  br i1 %631, label %633, label %.preheader785

.preheader785:                                    ; preds = %630
  %632 = icmp sgt i32 %.4521.us, 0
  br i1 %632, label %.lr.ph1708, label %.loopexit786

633:                                              ; preds = %630
  %634 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %indvars.iv2009)
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %634, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %635 unwind label %618

635:                                              ; preds = %633
  %636 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %indvars.iv2009)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %28) #9
  store i32 %.4521.us, ptr %28, align 4, !tbaa !29
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %636, ptr noundef nonnull align 4 dereferenceable(4) %28)
          to label %.invoke2257 unwind label %640

.invoke2257:                                      ; preds = %635
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %28) #9
  %637 = icmp ugt i32 %.4521.us, 65
  %638 = add nsw i32 %.4521.us, -3
  %639 = select i1 %637, i32 63, i32 %638
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef %639)
          to label %644 unwind label %642

640:                                              ; preds = %635
  %641 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %28) #9
  br label %656

642:                                              ; preds = %.invoke2257, %644
  %643 = landingpad { ptr, i32 }
          cleanup
  br label %656

644:                                              ; preds = %.invoke2257
  %645 = load i32, ptr %7, align 4, !tbaa !29
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef %645)
          to label %.loopexit786 unwind label %642

.lr.ph1708:                                       ; preds = %.preheader785, %649
  %.05561707 = phi i32 [ %650, %649 ], [ 0, %.preheader785 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %29) #9
  store i32 %50, ptr %29, align 4, !tbaa !29
  %646 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %indvars.iv2009)
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %646, ptr noundef nonnull align 4 dereferenceable(4) %29)
          to label %647 unwind label %651

647:                                              ; preds = %.lr.ph1708
  %648 = load i32, ptr %29, align 4, !tbaa !29
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef %648)
          to label %649 unwind label %651

649:                                              ; preds = %647
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %29) #9
  %650 = add nuw nsw i32 %.05561707, 1
  %exitcond2008.not = icmp eq i32 %650, %.4521.us
  br i1 %exitcond2008.not, label %.loopexit786, label %.lr.ph1708, !llvm.loop !64

651:                                              ; preds = %647, %.lr.ph1708
  %652 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %29) #9
  br label %656

.loopexit786:                                     ; preds = %649, %.preheader790, %.preheader785, %644, %.loopexit788
  %.1484.lcssa20382048 = phi i32 [ %.6489.us, %.preheader785 ], [ %.6489.us, %644 ], [ %.6489.us, %.loopexit788 ], [ %.04831710, %.preheader790 ], [ %.6489.us, %649 ]
  %.1410.lcssa20392047 = phi i32 [ %.6415.us, %.preheader785 ], [ %.6415.us, %644 ], [ %.6415.us, %.loopexit788 ], [ %.04091711, %.preheader790 ], [ %.6415.us, %649 ]
  %.1406.lcssa20402046 = phi i32 [ %.8.us, %.preheader785 ], [ %.8.us, %644 ], [ %.8.us, %.loopexit788 ], [ %.04051712, %.preheader790 ], [ %.8.us, %649 ]
  call void @_ZN6basisu8vector2DIhED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #9
  %indvars.iv.next2010 = add nuw nsw i64 %indvars.iv2009, 1
  %653 = call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %46)
  %654 = zext i32 %653 to i64
  %655 = icmp ult i64 %indvars.iv.next2010, %654
  br i1 %655, label %92, label %._crit_edge, !llvm.loop !65

656:                                              ; preds = %.loopexit776.split.us, %.loopexit.split-lp.split.us, %.split.split.us, %.split.us.split.us.split.us, %626, %628, %.split1610.us, %605, %.split1686.us, %.split1689.us, %.split1692.us, %.split1683.us, %.split1698.us, %.split1695.us, %.split1678.us, %609, %.split1646.us, %.split1640.us, %607, %.split1625.us, %.split1701.us, %.split1643.us, %651, %642, %640, %620, %618
  %.pn717 = phi { ptr, i32 } [ %643, %642 ], [ %641, %640 ], [ %619, %618 ], [ %652, %651 ], [ %621, %620 ], [ %.pn714, %605 ], [ %569, %.split1610.us ], [ %598, %.split1701.us ], [ %580, %.split1643.us ], [ %579, %.split1640.us ], [ %.pn675.pn.pn, %607 ], [ %574, %.split1625.us ], [ %593, %.split1686.us ], [ %597, %.split1698.us ], [ %596, %.split1695.us ], [ %595, %.split1692.us ], [ %594, %.split1689.us ], [ %592, %.split1683.us ], [ %591, %.split1678.us ], [ %.pn702.pn, %609 ], [ %581, %.split1646.us ], [ %629, %628 ], [ %627, %626 ], [ %138, %.split.split.us ], [ %121, %.split.us.split.us.split.us ], [ %lpad.loopexit.us, %.loopexit776.split.us ], [ %lpad.loopexit.split-lp.us, %.loopexit.split-lp.split.us ]
  call void @_ZN6basisu8vector2DIhED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #9
  br label %657

657:                                              ; preds = %656, %602
  %.pn717.pn = phi { ptr, i32 } [ %.pn717, %656 ], [ %603, %602 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #9
  br label %1046

658:                                              ; preds = %._crit_edge
  %659 = uitofp i32 %.0483.lcssa to float
  %660 = fmul float %659, 1.000000e+02
  %661 = uitofp i32 %75 to float
  %662 = fdiv float %660, %661
  %663 = fpext float %662 to double
  invoke void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef nonnull @.str.12, i32 noundef %.0483.lcssa, double noundef %663)
          to label %664 unwind label %690

664:                                              ; preds = %658
  %665 = invoke noundef i32 @_ZNK6basisu14basisu_backend16get_total_blocksEv(ptr noundef nonnull align 8 dereferenceable(336) %0)
          to label %666 unwind label %690

666:                                              ; preds = %664
  %667 = invoke noundef i32 @_ZNK6basisu14basisu_backend16get_total_blocksEv(ptr noundef nonnull align 8 dereferenceable(336) %0)
          to label %668 unwind label %690

668:                                              ; preds = %666
  %669 = uitofp i32 %.0405.lcssa to float
  %670 = fmul float %669, 1.000000e+02
  %671 = uitofp i32 %.0409.lcssa to float
  %672 = fmul float %671, 1.000000e+02
  %673 = uitofp i32 %665 to float
  %674 = fdiv float %672, %673
  %675 = fpext float %674 to double
  %676 = uitofp i32 %667 to float
  %677 = fdiv float %670, %676
  %678 = fpext float %677 to double
  invoke void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef nonnull @.str.13, i32 noundef %.0409.lcssa, double noundef %675, i32 noundef %.0405.lcssa, double noundef %678)
          to label %679 unwind label %690

679:                                              ; preds = %668
  %.not = icmp ne i32 %.0483.lcssa, 0
  %680 = getelementptr inbounds i8, ptr %0, i64 20
  %681 = load i32, ptr %680, align 4
  %682 = icmp ugt i32 %681, 1
  %or.cond738 = select i1 %.not, i1 %682, i1 false
  br i1 %or.cond738, label %683, label %694

683:                                              ; preds = %679
  %684 = getelementptr inbounds i8, ptr %0, i64 37
  %685 = load i8, ptr %684, align 1, !tbaa !66, !range !38, !noundef !39
  %686 = trunc nuw i8 %685 to i1
  br i1 %686, label %694, label %687

687:                                              ; preds = %683
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %30) #9
  call void @_ZN6basisu6vectorIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %30)
  invoke void @_ZN6basisu15basisu_frontend29reoptimize_remapped_endpointsERKNS_6vectorIjEERNS1_IiEEbPS2_(ptr noundef nonnull align 8 dereferenceable(496) %36, ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %30, i1 noundef zeroext false, ptr noundef nonnull %12)
          to label %688 unwind label %692

688:                                              ; preds = %687
  invoke void @_ZN6basisu14basisu_backend23create_endpoint_paletteEv(ptr noundef nonnull align 8 dereferenceable(336) %0)
          to label %689 unwind label %692

689:                                              ; preds = %688
  call void @_ZN6basisu6vectorIiED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %30) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %30) #9
  br label %694

690:                                              ; preds = %695, %694, %668, %666, %664, %658, %._crit_edge
  %691 = landingpad { ptr, i32 }
          cleanup
  br label %1046

692:                                              ; preds = %688, %687
  %693 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6basisu6vectorIiED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %30) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %30) #9
  br label %1046

694:                                              ; preds = %689, %683, %679
  invoke void @_ZN6basisu14basisu_backend25check_for_valid_cr_blocksEv(ptr noundef nonnull align 8 dereferenceable(336) %0)
          to label %695 unwind label %690

695:                                              ; preds = %694
  invoke void @_ZN6basisu14basisu_backend18compute_slice_crcsEv(ptr noundef nonnull align 8 dereferenceable(336) %0)
          to label %696 unwind label %690

696:                                              ; preds = %695
  %697 = invoke noundef double @_ZNK6basisu9histogram11get_entropyEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %698 unwind label %719

698:                                              ; preds = %696
  %699 = invoke noundef i64 @_ZNK6basisu9histogram9get_totalEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %700 unwind label %719

700:                                              ; preds = %698
  %701 = uitofp i64 %699 to double
  %702 = fdiv double %697, %701
  %703 = invoke noundef double @_ZNK6basisu9histogram11get_entropyEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %704 unwind label %721

704:                                              ; preds = %700
  %705 = invoke noundef i64 @_ZNK6basisu9histogram9get_totalEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %706 unwind label %721

706:                                              ; preds = %704
  %707 = uitofp i64 %705 to double
  %708 = fdiv double %703, %707
  %709 = invoke noundef double @_ZNK6basisu9histogram11get_entropyEv(ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %710 unwind label %723

710:                                              ; preds = %706
  %711 = invoke noundef i64 @_ZNK6basisu9histogram9get_totalEv(ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %712 unwind label %723

712:                                              ; preds = %710
  %713 = uitofp i64 %711 to double
  %714 = fdiv double %709, %713
  invoke void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef nonnull @.str.14, double noundef %702, double noundef %708, double noundef %714)
          to label %715 unwind label %723

715:                                              ; preds = %712
  %716 = invoke noundef i64 @_ZNK6basisu9histogram9get_totalEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %717 unwind label %723

717:                                              ; preds = %715
  %.not633 = icmp eq i64 %716, 0
  br i1 %.not633, label %718, label %725

718:                                              ; preds = %717
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef 0)
          to label %725 unwind label %723

719:                                              ; preds = %698, %696
  %720 = landingpad { ptr, i32 }
          cleanup
  br label %1046

721:                                              ; preds = %704, %700
  %722 = landingpad { ptr, i32 }
          cleanup
  br label %1046

723:                                              ; preds = %718, %715, %712, %710, %706
  %724 = landingpad { ptr, i32 }
          cleanup
  br label %1046

725:                                              ; preds = %718, %717
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %31) #9
  invoke void @_ZN6basisu22huffman_encoding_tableC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31)
          to label %726 unwind label %730

726:                                              ; preds = %725
  %727 = invoke noundef zeroext i1 @_ZN6basisu22huffman_encoding_table4initERKNS_9histogramEj(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef 16)
          to label %728 unwind label %732

728:                                              ; preds = %726
  br i1 %727, label %734, label %729

729:                                              ; preds = %728
  invoke void (ptr, ...) @_ZN6basisu12error_printfEPKcz(ptr noundef nonnull @.str.15)
          to label %1043 unwind label %732

730:                                              ; preds = %725
  %731 = landingpad { ptr, i32 }
          cleanup
  br label %1045

732:                                              ; preds = %737, %734, %729, %726
  %733 = landingpad { ptr, i32 }
          cleanup
  br label %1044

734:                                              ; preds = %728
  %735 = invoke noundef i64 @_ZNK6basisu9histogram9get_totalEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %736 unwind label %732

736:                                              ; preds = %734
  %.not634 = icmp eq i64 %735, 0
  br i1 %.not634, label %737, label %738

737:                                              ; preds = %736
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef 0)
          to label %738 unwind label %732

738:                                              ; preds = %737, %736
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %32) #9
  invoke void @_ZN6basisu22huffman_encoding_tableC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32)
          to label %739 unwind label %743

739:                                              ; preds = %738
  %740 = invoke noundef zeroext i1 @_ZN6basisu22huffman_encoding_table4initERKNS_9histogramEj(ptr noundef nonnull align 8 dereferenceable(32) %32, ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef 16)
          to label %741 unwind label %745

741:                                              ; preds = %739
  br i1 %740, label %747, label %742

742:                                              ; preds = %741
  invoke void (ptr, ...) @_ZN6basisu12error_printfEPKcz(ptr noundef nonnull @.str.16)
          to label %1040 unwind label %745

743:                                              ; preds = %738
  %744 = landingpad { ptr, i32 }
          cleanup
  br label %1042

745:                                              ; preds = %750, %747, %742, %739
  %746 = landingpad { ptr, i32 }
          cleanup
  br label %1041

747:                                              ; preds = %741
  %748 = invoke noundef i64 @_ZNK6basisu9histogram9get_totalEv(ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %749 unwind label %745

749:                                              ; preds = %747
  %.not635 = icmp eq i64 %748, 0
  br i1 %.not635, label %750, label %751

750:                                              ; preds = %749
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef 0)
          to label %751 unwind label %745

751:                                              ; preds = %750, %749
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %33) #9
  invoke void @_ZN6basisu22huffman_encoding_tableC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %33)
          to label %752 unwind label %756

752:                                              ; preds = %751
  %753 = invoke noundef zeroext i1 @_ZN6basisu22huffman_encoding_table4initERKNS_9histogramEj(ptr noundef nonnull align 8 dereferenceable(32) %33, ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef 16)
          to label %754 unwind label %758

754:                                              ; preds = %752
  br i1 %753, label %760, label %755

755:                                              ; preds = %754
  invoke void (ptr, ...) @_ZN6basisu12error_printfEPKcz(ptr noundef nonnull @.str.17)
          to label %1037 unwind label %758

756:                                              ; preds = %751
  %757 = landingpad { ptr, i32 }
          cleanup
  br label %1039

758:                                              ; preds = %763, %760, %755, %752
  %759 = landingpad { ptr, i32 }
          cleanup
  br label %1038

760:                                              ; preds = %754
  %761 = invoke noundef i64 @_ZNK6basisu9histogram9get_totalEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %762 unwind label %758

762:                                              ; preds = %760
  %.not636 = icmp eq i64 %761, 0
  br i1 %.not636, label %763, label %764

763:                                              ; preds = %762
  invoke void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef 0)
          to label %764 unwind label %758

764:                                              ; preds = %763, %762
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %34) #9
  invoke void @_ZN6basisu22huffman_encoding_tableC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34)
          to label %765 unwind label %769

765:                                              ; preds = %764
  %766 = invoke noundef zeroext i1 @_ZN6basisu22huffman_encoding_table4initERKNS_9histogramEj(ptr noundef nonnull align 8 dereferenceable(32) %34, ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef 16)
          to label %767 unwind label %771

767:                                              ; preds = %765
  br i1 %766, label %773, label %768

768:                                              ; preds = %767
  invoke void (ptr, ...) @_ZN6basisu12error_printfEPKcz(ptr noundef nonnull @.str.18)
          to label %1034 unwind label %771

769:                                              ; preds = %764
  %770 = landingpad { ptr, i32 }
          cleanup
  br label %1036

771:                                              ; preds = %768, %765
  %772 = landingpad { ptr, i32 }
          cleanup
  br label %1035

773:                                              ; preds = %767
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %35) #9
  invoke void @_ZN6basisu13bitwise_coderC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35)
          to label %774 unwind label %832

774:                                              ; preds = %773
  invoke void @_ZN6basisu13bitwise_coder4initEj(ptr noundef nonnull align 8 dereferenceable(32) %35, i32 noundef 4194304)
          to label %775 unwind label %834

775:                                              ; preds = %774
  %776 = invoke noundef i32 @_ZN6basisu13bitwise_coder18emit_huffman_tableERKNS_22huffman_encoding_tableE(ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef nonnull align 8 dereferenceable(32) %31)
          to label %777 unwind label %836

777:                                              ; preds = %775
  %778 = invoke noundef i32 @_ZN6basisu13bitwise_coder18emit_huffman_tableERKNS_22huffman_encoding_tableE(ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef nonnull align 8 dereferenceable(32) %32)
          to label %779 unwind label %838

779:                                              ; preds = %777
  %780 = invoke noundef i32 @_ZN6basisu13bitwise_coder18emit_huffman_tableERKNS_22huffman_encoding_tableE(ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef nonnull align 8 dereferenceable(32) %33)
          to label %781 unwind label %840

781:                                              ; preds = %779
  %782 = invoke noundef i32 @_ZN6basisu13bitwise_coder18emit_huffman_tableERKNS_22huffman_encoding_tableE(ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef nonnull align 8 dereferenceable(32) %34)
          to label %783 unwind label %842

783:                                              ; preds = %781
  %784 = invoke noundef i32 @_ZN6basisu13bitwise_coder8put_bitsEjj(ptr noundef nonnull align 8 dereferenceable(32) %35, i32 noundef 64, i32 noundef 13)
          to label %785 unwind label %842

785:                                              ; preds = %783
  %786 = add i32 %776, 7
  %787 = lshr i32 %786, 3
  %788 = invoke noundef i32 @_ZNK6basisu14basisu_backend22get_total_input_texelsEv(ptr noundef nonnull align 8 dereferenceable(336) %0)
          to label %789 unwind label %842

789:                                              ; preds = %785
  %790 = uitofp i32 %776 to float
  %791 = uitofp i32 %788 to float
  %792 = fdiv float %790, %791
  %793 = fpext float %792 to double
  %794 = add i32 %778, 7
  %795 = lshr i32 %794, 3
  %796 = invoke noundef i32 @_ZNK6basisu14basisu_backend22get_total_input_texelsEv(ptr noundef nonnull align 8 dereferenceable(336) %0)
          to label %797 unwind label %842

797:                                              ; preds = %789
  %798 = uitofp i32 %778 to float
  %799 = uitofp i32 %796 to float
  %800 = fdiv float %798, %799
  %801 = fpext float %800 to double
  %802 = add i32 %780, 7
  %803 = lshr i32 %802, 3
  %804 = invoke noundef i32 @_ZNK6basisu14basisu_backend22get_total_input_texelsEv(ptr noundef nonnull align 8 dereferenceable(336) %0)
          to label %805 unwind label %842

805:                                              ; preds = %797
  %806 = invoke noundef i32 @_ZNK6basisu14basisu_backend22get_total_input_texelsEv(ptr noundef nonnull align 8 dereferenceable(336) %0)
          to label %807 unwind label %842

807:                                              ; preds = %805
  %808 = uitofp i32 %782 to float
  %809 = add i32 %782, 7
  %810 = lshr i32 %809, 3
  %811 = uitofp i32 %780 to float
  %812 = uitofp i32 %804 to float
  %813 = fdiv float %811, %812
  %814 = fpext float %813 to double
  %815 = uitofp i32 %806 to float
  %816 = fdiv float %808, %815
  %817 = fpext float %816 to double
  invoke void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef nonnull @.str.19, i32 noundef %776, i32 noundef %787, double noundef %793, i32 noundef %778, i32 noundef %795, double noundef %801, i32 noundef %780, i32 noundef %803, double noundef %814, i32 noundef %782, i32 noundef %810, double noundef %817)
          to label %818 unwind label %842

818:                                              ; preds = %807
  %819 = invoke noundef i32 @_ZN6basisu13bitwise_coder5flushEv(ptr noundef nonnull align 8 dereferenceable(32) %35)
          to label %820 unwind label %842

820:                                              ; preds = %818
  %821 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6basisu13bitwise_coder9get_bytesEv(ptr noundef nonnull align 8 dereferenceable(32) %35)
  %822 = getelementptr inbounds i8, ptr %0, i64 120
  %823 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorIhEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %822, ptr noundef nonnull align 8 dereferenceable(16) %821)
          to label %824 unwind label %842

824:                                              ; preds = %820
  %825 = getelementptr inbounds i8, ptr %0, i64 136
  %826 = call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %46)
  %827 = zext i32 %826 to i64
  invoke void @_ZN6basisu6vectorINS0_IhEEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16) %825, i64 noundef %827, i1 noundef zeroext false)
          to label %.preheader766 unwind label %844

.preheader766:                                    ; preds = %824
  %828 = call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %46)
  %.not1793 = icmp eq i32 %828, 0
  br i1 %.not1793, label %._crit_edge1781, label %.lr.ph1780

.lr.ph1780:                                       ; preds = %.preheader766
  %829 = getelementptr inbounds i8, ptr %0, i64 224
  %830 = getelementptr inbounds i8, ptr %0, i64 240
  br label %846

._crit_edge1781:                                  ; preds = %989, %.preheader766
  %.0539.lcssa = phi i32 [ 0, %.preheader766 ], [ %.1540.lcssa, %989 ]
  %.0535.lcssa = phi i32 [ 0, %.preheader766 ], [ %.1536.lcssa, %989 ]
  %.0528.lcssa = phi i32 [ 0, %.preheader766 ], [ %.1529.lcssa, %989 ]
  %.0527.lcssa = phi i32 [ 0, %.preheader766 ], [ %990, %989 ]
  %831 = invoke noundef i32 @_ZNK6basisu14basisu_backend22get_total_input_texelsEv(ptr noundef nonnull align 8 dereferenceable(336) %0)
          to label %996 unwind label %1028

832:                                              ; preds = %773
  %833 = landingpad { ptr, i32 }
          cleanup
  br label %1033

834:                                              ; preds = %774
  %835 = landingpad { ptr, i32 }
          cleanup
  br label %1032

836:                                              ; preds = %775
  %837 = landingpad { ptr, i32 }
          cleanup
  br label %1032

838:                                              ; preds = %777
  %839 = landingpad { ptr, i32 }
          cleanup
  br label %1032

840:                                              ; preds = %779
  %841 = landingpad { ptr, i32 }
          cleanup
  br label %1032

842:                                              ; preds = %820, %818, %807, %805, %797, %789, %785, %783, %781
  %843 = landingpad { ptr, i32 }
          cleanup
  br label %1032

844:                                              ; preds = %824
  %845 = landingpad { ptr, i32 }
          cleanup
  br label %1032

846:                                              ; preds = %.lr.ph1780, %989
  %indvars.iv2014 = phi i64 [ 0, %.lr.ph1780 ], [ %indvars.iv.next2015, %989 ]
  %.05271778 = phi i32 [ 0, %.lr.ph1780 ], [ %990, %989 ]
  %.05281777 = phi i32 [ 0, %.lr.ph1780 ], [ %.1529.lcssa, %989 ]
  %.05351776 = phi i32 [ 0, %.lr.ph1780 ], [ %.1536.lcssa, %989 ]
  %.05391775 = phi i32 [ 0, %.lr.ph1780 ], [ %.1540.lcssa, %989 ]
  %847 = call noundef nonnull align 4 dereferenceable(46) ptr @_ZN6basisu6vectorINS_25basisu_backend_slice_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %46, i64 noundef %indvars.iv2014)
  %848 = getelementptr inbounds i8, ptr %847, i64 20
  %849 = load i32, ptr %848, align 4, !tbaa !32
  %850 = call noundef nonnull align 4 dereferenceable(46) ptr @_ZN6basisu6vectorINS_25basisu_backend_slice_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %46, i64 noundef %indvars.iv2014)
  %851 = getelementptr inbounds i8, ptr %850, i64 24
  %852 = load i32, ptr %851, align 4, !tbaa !33
  invoke void @_ZN6basisu13bitwise_coder4initEj(ptr noundef nonnull align 8 dereferenceable(32) %35, i32 noundef 4194304)
          to label %.preheader765 unwind label %963

.preheader765:                                    ; preds = %846
  %.not1794 = icmp eq i32 %852, 0
  %.not1795 = icmp eq i32 %849, 0
  %or.cond2258 = select i1 %.not1794, i1 true, i1 %.not1795
  br i1 %or.cond2258, label %._crit_edge1744, label %.preheader.us

.preheader.us:                                    ; preds = %.preheader765, %._crit_edge1726.us
  %.04961743.us = phi i32 [ %949, %._crit_edge1726.us ], [ 0, %.preheader765 ]
  %.04971742.us = phi i32 [ %895, %._crit_edge1726.us ], [ 0, %.preheader765 ]
  %.04991741.us = phi i32 [ %.3502.us, %._crit_edge1726.us ], [ 0, %.preheader765 ]
  %.05031740.us = phi i32 [ %.3506.us, %._crit_edge1726.us ], [ 0, %.preheader765 ]
  %.05071739.us = phi i32 [ %.4511.us, %._crit_edge1726.us ], [ 0, %.preheader765 ]
  %.05121738.us = phi i32 [ %.4516.us, %._crit_edge1726.us ], [ 0, %.preheader765 ]
  %.15291737.us = phi i32 [ %.6534.us, %._crit_edge1726.us ], [ %.05281777, %.preheader765 ]
  %.15361736.us = phi i32 [ %.3538.us, %._crit_edge1726.us ], [ %.05351776, %.preheader765 ]
  %.15401735.us = phi i32 [ %.4543.us, %._crit_edge1726.us ], [ %.05391775, %.preheader765 ]
  br label %853

853:                                              ; preds = %.preheader.us, %947
  %.04951724.us = phi i32 [ 0, %.preheader.us ], [ %948, %947 ]
  %.14981723.us = phi i32 [ %.04971742.us, %.preheader.us ], [ %895, %947 ]
  %.15001722.us = phi i32 [ %.04991741.us, %.preheader.us ], [ %.3502.us, %947 ]
  %.15041721.us = phi i32 [ %.05031740.us, %.preheader.us ], [ %.3506.us, %947 ]
  %.15081720.us = phi i32 [ %.05071739.us, %.preheader.us ], [ %.4511.us, %947 ]
  %.15131719.us = phi i32 [ %.05121738.us, %.preheader.us ], [ %.4516.us, %947 ]
  %.25301718.us = phi i32 [ %.15291737.us, %.preheader.us ], [ %.6534.us, %947 ]
  %.25371717.us = phi i32 [ %.15361736.us, %.preheader.us ], [ %.3538.us, %947 ]
  %.25411716.us = phi i32 [ %.15401735.us, %.preheader.us ], [ %.4543.us, %947 ]
  %854 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN6basisu6vectorINS_8vector2DINS_13encoder_blockEEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %829, i64 noundef %indvars.iv2014)
  %855 = invoke noundef nonnull align 4 dereferenceable(17) ptr @_ZN6basisu8vector2DINS_13encoder_blockEEclEjj(ptr noundef nonnull align 8 dereferenceable(24) %854, i32 noundef %.04951724.us, i32 noundef %.04961743.us)
          to label %856 unwind label %.split1756.us

856:                                              ; preds = %853
  %857 = or i32 %.04951724.us, %.04961743.us
  %858 = and i32 %857, 1
  %or.cond740.us = icmp eq i32 %858, 0
  br i1 %or.cond740.us, label %859, label %890

859:                                              ; preds = %856
  %860 = icmp sgt i32 %.15041721.us, 0
  br i1 %860, label %888, label %861

861:                                              ; preds = %859
  %862 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %10, i64 noundef %indvars.iv2014)
  %863 = add i32 %.15001722.us, 1
  %864 = zext i32 %.15001722.us to i64
  %865 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %862, i64 noundef %864)
  %866 = load i32, ptr %865, align 4, !tbaa !29
  %867 = icmp eq i32 %866, 256
  br i1 %867, label %872, label %868

868:                                              ; preds = %861
  %869 = invoke noundef i32 @_ZN6basisu13bitwise_coder8put_codeEjRKNS_22huffman_encoding_tableE(ptr noundef nonnull align 8 dereferenceable(32) %35, i32 noundef %866, ptr noundef nonnull align 8 dereferenceable(32) %31)
          to label %870 unwind label %.split1759.us

870:                                              ; preds = %868
  %871 = add i32 %869, %.25411716.us
  br label %890

872:                                              ; preds = %861
  %873 = invoke noundef i32 @_ZN6basisu13bitwise_coder8put_codeEjRKNS_22huffman_encoding_tableE(ptr noundef nonnull align 8 dereferenceable(32) %35, i32 noundef 256, ptr noundef nonnull align 8 dereferenceable(32) %31)
          to label %874 unwind label %.split1759.us

874:                                              ; preds = %872
  %875 = add i32 %873, %.25411716.us
  %876 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %10, i64 noundef %indvars.iv2014)
  %877 = add i32 %.15001722.us, 2
  %878 = zext i32 %863 to i64
  %879 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %876, i64 noundef %878)
  %880 = load i32, ptr %879, align 4, !tbaa !29
  %881 = icmp sgt i32 %880, 2
  br i1 %881, label %882, label %.split1762.us

882:                                              ; preds = %874
  %883 = add nsw i32 %880, -3
  %884 = invoke noundef i32 @_ZN6basisu13bitwise_coder7put_vlcEjj(ptr noundef nonnull align 8 dereferenceable(32) %35, i32 noundef %883, i32 noundef 4)
          to label %885 unwind label %.split1759.us

885:                                              ; preds = %882
  %886 = add i32 %875, %884
  %887 = add nsw i32 %880, -1
  br label %890

888:                                              ; preds = %859
  %889 = add nsw i32 %.15041721.us, -1
  br label %890

890:                                              ; preds = %888, %885, %870, %856
  %.4543.us = phi i32 [ %.25411716.us, %888 ], [ %.25411716.us, %856 ], [ %886, %885 ], [ %871, %870 ]
  %.3506.us = phi i32 [ %889, %888 ], [ %.15041721.us, %856 ], [ %887, %885 ], [ 0, %870 ]
  %.3502.us = phi i32 [ %.15001722.us, %888 ], [ %.15001722.us, %856 ], [ %877, %885 ], [ %863, %870 ]
  %891 = getelementptr inbounds i8, ptr %855, i64 4
  %892 = load i32, ptr %891, align 4, !tbaa !44
  %893 = sext i32 %892 to i64
  %894 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %830, i64 noundef %893)
  %895 = load i32, ptr %894, align 4, !tbaa !29
  %896 = load i32, ptr %855, align 4
  %897 = icmp eq i32 %896, 3
  br i1 %897, label %898, label %909

898:                                              ; preds = %890
  %899 = sub i32 %895, %.14981723.us
  %900 = icmp slt i32 %899, 0
  br i1 %900, label %901, label %905

901:                                              ; preds = %898
  %902 = invoke noundef i32 @_ZNK6basisu15basisu_frontend27get_total_endpoint_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %36)
          to label %903 unwind label %.split1764.us

903:                                              ; preds = %901
  %904 = add nsw i32 %902, %899
  br label %905

905:                                              ; preds = %903, %898
  %.0482.us = phi i32 [ %904, %903 ], [ %899, %898 ]
  %906 = invoke noundef i32 @_ZN6basisu13bitwise_coder8put_codeEjRKNS_22huffman_encoding_tableE(ptr noundef nonnull align 8 dereferenceable(32) %35, i32 noundef %.0482.us, ptr noundef nonnull align 8 dereferenceable(32) %32)
          to label %907 unwind label %.split1764.us

907:                                              ; preds = %905
  %908 = add i32 %906, %.25371717.us
  %.pre2026 = load i32, ptr %855, align 4
  br label %909

909:                                              ; preds = %907, %890
  %910 = phi i32 [ %.pre2026, %907 ], [ %896, %890 ]
  %.3538.us = phi i32 [ %908, %907 ], [ %.25371717.us, %890 ]
  %.not638.us = icmp eq i32 %910, 2
  %or.cond741.us = select i1 %40, i1 %.not638.us, i1 false
  br i1 %or.cond741.us, label %947, label %911

911:                                              ; preds = %909
  %.not639.us = icmp eq i32 %.15081720.us, 0
  br i1 %.not639.us, label %912, label %946

912:                                              ; preds = %911
  %913 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %indvars.iv2014)
  %914 = add i32 %.15131719.us, 1
  %915 = zext i32 %.15131719.us to i64
  %916 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %913, i64 noundef %915)
  %917 = load i32, ptr %916, align 4, !tbaa !29
  %918 = load i32, ptr %7, align 4, !tbaa !29
  %919 = icmp eq i32 %917, %918
  br i1 %919, label %920, label %926

920:                                              ; preds = %912
  %921 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %indvars.iv2014)
  %922 = add i32 %.15131719.us, 2
  %923 = zext i32 %914 to i64
  %924 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %921, i64 noundef %923)
  %925 = load i32, ptr %924, align 4, !tbaa !29
  br label %926

926:                                              ; preds = %920, %912
  %.2514.us = phi i32 [ %922, %920 ], [ %914, %912 ]
  %.2509.us = phi i32 [ %925, %920 ], [ 0, %912 ]
  %927 = invoke noundef i32 @_ZN6basisu13bitwise_coder8put_codeEjRKNS_22huffman_encoding_tableE(ptr noundef nonnull align 8 dereferenceable(32) %35, i32 noundef %917, ptr noundef nonnull align 8 dereferenceable(32) %33)
          to label %928 unwind label %.split1767.us

928:                                              ; preds = %926
  %929 = add i32 %927, %.25301718.us
  %930 = load i32, ptr %7, align 4, !tbaa !29
  %931 = icmp eq i32 %917, %930
  br i1 %931, label %932, label %946

932:                                              ; preds = %928
  %933 = add i32 %.2509.us, -3
  %934 = icmp sgt i32 %933, 62
  br i1 %934, label %939, label %935

935:                                              ; preds = %932
  %936 = invoke noundef i32 @_ZN6basisu13bitwise_coder8put_codeEjRKNS_22huffman_encoding_tableE(ptr noundef nonnull align 8 dereferenceable(32) %35, i32 noundef %933, ptr noundef nonnull align 8 dereferenceable(32) %34)
          to label %937 unwind label %.split1770.us

937:                                              ; preds = %935
  %938 = add i32 %936, %929
  br label %946

939:                                              ; preds = %932
  %940 = invoke noundef i32 @_ZN6basisu13bitwise_coder8put_codeEjRKNS_22huffman_encoding_tableE(ptr noundef nonnull align 8 dereferenceable(32) %35, i32 noundef 63, ptr noundef nonnull align 8 dereferenceable(32) %34)
          to label %941 unwind label %.split1770.us

941:                                              ; preds = %939
  %942 = invoke noundef i32 @_ZN6basisu13bitwise_coder7put_vlcEjj(ptr noundef nonnull align 8 dereferenceable(32) %35, i32 noundef %933, i32 noundef 7)
          to label %943 unwind label %.split1773.us

943:                                              ; preds = %941
  %944 = add i32 %940, %929
  %945 = add i32 %944, %942
  br label %946

946:                                              ; preds = %943, %937, %928, %911
  %.5533.us = phi i32 [ %.25301718.us, %911 ], [ %929, %928 ], [ %945, %943 ], [ %938, %937 ]
  %.3515.us = phi i32 [ %.15131719.us, %911 ], [ %.2514.us, %928 ], [ %.2514.us, %943 ], [ %.2514.us, %937 ]
  %.3510.us = phi i32 [ %.15081720.us, %911 ], [ %.2509.us, %928 ], [ %.2509.us, %943 ], [ %.2509.us, %937 ]
  %spec.select742.us = call i32 @llvm.usub.sat.i32(i32 %.3510.us, i32 1)
  br label %947

947:                                              ; preds = %946, %909
  %.6534.us = phi i32 [ %.25301718.us, %909 ], [ %.5533.us, %946 ]
  %.4516.us = phi i32 [ %.15131719.us, %909 ], [ %.3515.us, %946 ]
  %.4511.us = phi i32 [ %.15081720.us, %909 ], [ %spec.select742.us, %946 ]
  %948 = add nuw i32 %.04951724.us, 1
  %exitcond2012.not = icmp eq i32 %948, %849
  br i1 %exitcond2012.not, label %._crit_edge1726.us, label %853, !llvm.loop !67

._crit_edge1726.us:                               ; preds = %947
  %949 = add nuw i32 %.04961743.us, 1
  %exitcond2013.not = icmp eq i32 %949, %852
  br i1 %exitcond2013.not, label %._crit_edge1744, label %.preheader.us, !llvm.loop !68

.split1756.us:                                    ; preds = %853
  %950 = landingpad { ptr, i32 }
          cleanup
  br label %1032

.split1759.us:                                    ; preds = %882, %872, %868
  %951 = landingpad { ptr, i32 }
          cleanup
  br label %1032

.split1764.us:                                    ; preds = %905, %901
  %952 = landingpad { ptr, i32 }
          cleanup
  br label %1032

.split1767.us:                                    ; preds = %926
  %953 = landingpad { ptr, i32 }
          cleanup
  br label %1032

.split1770.us:                                    ; preds = %939, %935
  %954 = landingpad { ptr, i32 }
          cleanup
  br label %1032

.split1773.us:                                    ; preds = %941
  %955 = landingpad { ptr, i32 }
          cleanup
  br label %1032

._crit_edge1744:                                  ; preds = %._crit_edge1726.us, %.preheader765
  %.1540.lcssa = phi i32 [ %.05391775, %.preheader765 ], [ %.4543.us, %._crit_edge1726.us ]
  %.1536.lcssa = phi i32 [ %.05351776, %.preheader765 ], [ %.3538.us, %._crit_edge1726.us ]
  %.1529.lcssa = phi i32 [ %.05281777, %.preheader765 ], [ %.6534.us, %._crit_edge1726.us ]
  %.0512.lcssa = phi i32 [ 0, %.preheader765 ], [ %.4516.us, %._crit_edge1726.us ]
  %.0499.lcssa = phi i32 [ 0, %.preheader765 ], [ %.3502.us, %._crit_edge1726.us ]
  %956 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %10, i64 noundef %indvars.iv2014)
  %957 = call noundef i32 @_ZNK6basisu6vectorIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %956)
  %958 = icmp eq i32 %.0499.lcssa, %957
  call void @_ZN6basisuL6verifyEbi(i1 noundef zeroext %958, i32 noundef 1355)
  %959 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %indvars.iv2014)
  %960 = call noundef i32 @_ZNK6basisu6vectorIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %959)
  %961 = icmp eq i32 %.0512.lcssa, %960
  call void @_ZN6basisuL6verifyEbi(i1 noundef zeroext %961, i32 noundef 1356)
  %962 = invoke noundef i32 @_ZN6basisu13bitwise_coder5flushEv(ptr noundef nonnull align 8 dereferenceable(32) %35)
          to label %965 unwind label %994

963:                                              ; preds = %846
  %964 = landingpad { ptr, i32 }
          cleanup
  br label %1032

.split1762.us:                                    ; preds = %874
  call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.6, i32 noundef 1293, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6basisu14basisu_backend12encode_imageEv) #10
  unreachable

965:                                              ; preds = %._crit_edge1744
  %966 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6basisu13bitwise_coder9get_bytesEv(ptr noundef nonnull align 8 dereferenceable(32) %35)
  %967 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IhEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %825, i64 noundef %indvars.iv2014)
  %968 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorIhEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %967, ptr noundef nonnull align 8 dereferenceable(16) %966)
          to label %969 unwind label %994

969:                                              ; preds = %965
  %970 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6basisu13bitwise_coder9get_bytesEv(ptr noundef nonnull align 8 dereferenceable(32) %35)
  %971 = call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %970)
  %972 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IhEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %825, i64 noundef %indvars.iv2014)
  %973 = call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %972)
  %974 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IhEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %825, i64 noundef %indvars.iv2014)
  %975 = call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %974)
  %976 = uitofp i32 %975 to float
  %977 = fmul float %976, 8.000000e+00
  %978 = call noundef nonnull align 4 dereferenceable(46) ptr @_ZN6basisu6vectorINS_25basisu_backend_slice_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %46, i64 noundef %indvars.iv2014)
  %979 = getelementptr inbounds i8, ptr %978, i64 4
  %980 = load i32, ptr %979, align 4, !tbaa !69
  %981 = call noundef nonnull align 4 dereferenceable(46) ptr @_ZN6basisu6vectorINS_25basisu_backend_slice_descEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %46, i64 noundef %indvars.iv2014)
  %982 = getelementptr inbounds i8, ptr %981, i64 8
  %983 = load i32, ptr %982, align 4, !tbaa !70
  %984 = mul i32 %983, %980
  %985 = uitofp i32 %984 to float
  %986 = fdiv float %977, %985
  %987 = fpext float %986 to double
  %988 = trunc nuw i64 %indvars.iv2014 to i32
  invoke void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef nonnull @.str.21, i32 noundef %988, i32 noundef %973, double noundef %987)
          to label %989 unwind label %994

989:                                              ; preds = %969
  %990 = add i32 %971, %.05271778
  %indvars.iv.next2015 = add nuw nsw i64 %indvars.iv2014, 1
  %991 = call noundef i32 @_ZNK6basisu6vectorINS_25basisu_backend_slice_descEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %46)
  %992 = zext i32 %991 to i64
  %993 = icmp ult i64 %indvars.iv.next2015, %992
  br i1 %993, label %846, label %._crit_edge1781, !llvm.loop !71

994:                                              ; preds = %969, %965, %._crit_edge1744
  %995 = landingpad { ptr, i32 }
          cleanup
  br label %1032

996:                                              ; preds = %._crit_edge1781
  %997 = uitofp i32 %831 to double
  %998 = invoke noundef i32 @_ZNK6basisu14basisu_backend16get_total_blocksEv(ptr noundef nonnull align 8 dereferenceable(336) %0)
          to label %999 unwind label %1030

999:                                              ; preds = %996
  %1000 = uitofp i32 %998 to double
  %1001 = lshr i32 %.0539.lcssa, 3
  %1002 = uitofp i32 %.0539.lcssa to double
  %1003 = fdiv double %1002, %997
  %1004 = fdiv double %1002, %1000
  invoke void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef nonnull @.str.22, i32 noundef %.0539.lcssa, i32 noundef %1001, double noundef %1003, double noundef %1004)
          to label %1005 unwind label %1030

1005:                                             ; preds = %999
  %1006 = lshr i32 %.0535.lcssa, 3
  %1007 = uitofp i32 %.0535.lcssa to double
  %1008 = fdiv double %1007, %997
  %1009 = fdiv double %1007, %1000
  invoke void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef nonnull @.str.23, i32 noundef %.0535.lcssa, i32 noundef %1006, double noundef %1008, double noundef %1009)
          to label %1010 unwind label %1030

1010:                                             ; preds = %1005
  %1011 = lshr i32 %.0528.lcssa, 3
  %1012 = uitofp i32 %.0528.lcssa to double
  %1013 = fdiv double %1012, %997
  %1014 = fdiv double %1012, %1000
  invoke void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef nonnull @.str.24, i32 noundef %.0528.lcssa, i32 noundef %1011, double noundef %1013, double noundef %1014)
          to label %1015 unwind label %1030

1015:                                             ; preds = %1010
  %1016 = call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %822)
  %1017 = call noundef i32 @_ZNK6basisu6vectorIhE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %822)
  %1018 = uitofp i32 %1017 to float
  %1019 = fmul float %1018, 8.000000e+00
  %1020 = fpext float %1019 to double
  %1021 = fdiv double %1020, %997
  invoke void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef nonnull @.str.25, i32 noundef %1016, double noundef %1021)
          to label %1022 unwind label %1030

1022:                                             ; preds = %1015
  %1023 = uitofp i32 %.0527.lcssa to float
  %1024 = fmul float %1023, 8.000000e+00
  %1025 = fpext float %1024 to double
  %1026 = fdiv double %1025, %997
  invoke void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef nonnull @.str.26, i32 noundef %.0527.lcssa, double noundef %1026)
          to label %1027 unwind label %1030

1027:                                             ; preds = %1022
  call void @_ZN6basisu13bitwise_coderD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %35) #9
  br label %1034

1028:                                             ; preds = %._crit_edge1781
  %1029 = landingpad { ptr, i32 }
          cleanup
  br label %1032

1030:                                             ; preds = %1022, %1015, %1010, %1005, %999, %996
  %1031 = landingpad { ptr, i32 }
          cleanup
  br label %1032

1032:                                             ; preds = %836, %840, %844, %994, %.split1764.us, %.split1770.us, %.split1773.us, %.split1767.us, %.split1759.us, %.split1756.us, %963, %1030, %1028, %842, %838, %834
  %.pn640.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %835, %834 ], [ %837, %836 ], [ %839, %838 ], [ %841, %840 ], [ %843, %842 ], [ %845, %844 ], [ %964, %963 ], [ %995, %994 ], [ %951, %.split1759.us ], [ %950, %.split1756.us ], [ %952, %.split1764.us ], [ %953, %.split1767.us ], [ %955, %.split1773.us ], [ %954, %.split1770.us ], [ %1031, %1030 ], [ %1029, %1028 ]
  call void @_ZN6basisu13bitwise_coderD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #9
  br label %1033

1033:                                             ; preds = %1032, %832
  %.pn640.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn640.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1032 ], [ %833, %832 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %35) #9
  br label %1035

1034:                                             ; preds = %768, %1027
  call void @_ZN6basisu22huffman_encoding_tableD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %34) #9
  br label %1037

1035:                                             ; preds = %1033, %771
  %.pn640.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn640.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1033 ], [ %772, %771 ]
  call void @_ZN6basisu22huffman_encoding_tableD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #9
  br label %1036

1036:                                             ; preds = %1035, %769
  %.pn640.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn640.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1035 ], [ %770, %769 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %34) #9
  br label %1038

1037:                                             ; preds = %755, %1034
  %.1 = phi i1 [ %766, %1034 ], [ false, %755 ]
  call void @_ZN6basisu22huffman_encoding_tableD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %33) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %33) #9
  br label %1040

1038:                                             ; preds = %1036, %758
  %.pn640.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn640.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1036 ], [ %759, %758 ]
  call void @_ZN6basisu22huffman_encoding_tableD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %33) #9
  br label %1039

1039:                                             ; preds = %1038, %756
  %.pn640.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn640.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1038 ], [ %757, %756 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %33) #9
  br label %1041

1040:                                             ; preds = %742, %1037
  %.2 = phi i1 [ %.1, %1037 ], [ false, %742 ]
  call void @_ZN6basisu22huffman_encoding_tableD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %32) #9
  br label %1043

1041:                                             ; preds = %1039, %745
  %.pn640.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn640.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1039 ], [ %746, %745 ]
  call void @_ZN6basisu22huffman_encoding_tableD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #9
  br label %1042

1042:                                             ; preds = %1041, %743
  %.pn640.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn640.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1041 ], [ %744, %743 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %32) #9
  br label %1044

1043:                                             ; preds = %729, %1040
  %.3 = phi i1 [ %.2, %1040 ], [ false, %729 ]
  call void @_ZN6basisu22huffman_encoding_tableD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %31) #9
  call void @_ZN6basisu6vectorIjED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #9
  call void @_ZN6basisu6vectorIjED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #9
  call void @_ZN6basisu6vectorINS0_IjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #9
  call void @_ZN6basisu9histogramD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #9
  call void @_ZN6basisu9histogramD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #9
  call void @_ZN6basisu6vectorINS0_IjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #9
  call void @_ZN6basisu9histogramD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #9
  call void @_ZN6basisu9histogramD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #9
  call void @_ZN6basisu9histogramD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #9
  call void @_ZN6basist20approx_move_to_frontD2Ev(ptr noundef nonnull align 8 dereferenceable(20) %2) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #9
  ret i1 %.3

1044:                                             ; preds = %1042, %732
  %.pn640.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn640.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1042 ], [ %733, %732 ]
  call void @_ZN6basisu22huffman_encoding_tableD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #9
  br label %1045

1045:                                             ; preds = %1044, %730
  %.pn640.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn640.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1044 ], [ %731, %730 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %31) #9
  br label %1046

1046:                                             ; preds = %719, %723, %1045, %721, %600, %657, %692, %690
  %.pn717.pn.pn.pn = phi { ptr, i32 } [ %691, %690 ], [ %693, %692 ], [ %.pn717.pn, %657 ], [ %601, %600 ], [ %720, %719 ], [ %722, %721 ], [ %.pn640.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1045 ], [ %724, %723 ]
  call void @_ZN6basisu6vectorIjED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #9
  call void @_ZN6basisu6vectorIjED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #9
  call void @_ZN6basisu6vectorINS0_IjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #9
  br label %1047

1047:                                             ; preds = %1046, %90
  %.pn717.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn717.pn.pn.pn, %1046 ], [ %91, %90 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #9
  call void @_ZN6basisu9histogramD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #9
  br label %1048

1048:                                             ; preds = %1047, %88
  %.pn717.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn717.pn.pn.pn.pn, %1047 ], [ %89, %88 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #9
  call void @_ZN6basisu9histogramD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #9
  br label %1049

1049:                                             ; preds = %1048, %86
  %.pn717.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn717.pn.pn.pn.pn.pn, %1048 ], [ %87, %86 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #9
  br label %1050

1050:                                             ; preds = %1049, %84
  %.pn717.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn717.pn.pn.pn.pn.pn.pn, %1049 ], [ %85, %84 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #9
  call void @_ZN6basisu6vectorINS0_IjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #9
  br label %1051

1051:                                             ; preds = %1050, %82
  %.pn717.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn717.pn.pn.pn.pn.pn.pn.pn, %1050 ], [ %83, %82 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #9
  call void @_ZN6basisu9histogramD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #9
  br label %1052

1052:                                             ; preds = %1051, %80
  %.pn717.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn717.pn.pn.pn.pn.pn.pn.pn.pn, %1051 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #9
  call void @_ZN6basisu9histogramD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #9
  br label %1053

1053:                                             ; preds = %1052, %78
  %.pn717.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn717.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1052 ], [ %79, %78 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #9
  call void @_ZN6basisu9histogramD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #9
  br label %1054

1054:                                             ; preds = %1053, %76
  %.pn717.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn717.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %1053 ], [ %77, %76 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #9
  call void @_ZN6basist20approx_move_to_frontD2Ev(ptr noundef nonnull align 8 dereferenceable(20) %2) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #9
  resume { ptr, i32 } %.pn717.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basist20approx_move_to_frontC2Ej(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu6vectorINS0_IjEEEC2Em(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu6vectorItE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i1 noundef zeroext) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basist20approx_move_to_front5resetEv(ptr noundef nonnull align 8 dereferenceable(20)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu8vector2DIhEC2Ejj(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu9histogram3incEj(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6basisu4iabsEi(i32 noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.ceil.f32(float) #7

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu8vector2DIhED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK6basisu9histogram11get_entropyEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK6basisu9histogram9get_totalEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu22huffman_encoding_tableC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6basisu22huffman_encoding_table4initERKNS_9histogramEj(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #2 align 2

declare void @_ZN6basisu12error_printfEPKcz(ptr noundef, ...) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu13bitwise_coderC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu13bitwise_coder4initEj(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #6 align 2

declare noundef i32 @_ZN6basisu13bitwise_coder18emit_huffman_tableERKNS_22huffman_encoding_tableE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN6basisu13bitwise_coder5flushEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6basisu13bitwise_coder9get_bytesEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorIhEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu6vectorINS0_IhEEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i1 noundef zeroext) local_unnamed_addr #6 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IhEEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu13bitwise_coderD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu22huffman_encoding_tableD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu6vectorINS0_IjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu9histogramD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basist20approx_move_to_frontD2Ev(ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #0 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.usub.sat.i32(i32, i32) #8

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTSN6basisu14basisu_backendE", !7, i64 0, !10, i64 8, !14, i64 40, !15, i64 56, !7, i64 168, !20, i64 176, !21, i64 192, !22, i64 208, !23, i64 224, !24, i64 240, !24, i64 256, !25, i64 272, !25, i64 288, !24, i64 304, !24, i64 320}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN6basisu21basisu_backend_paramsE", !11, i64 0, !11, i64 1, !11, i64 2, !12, i64 4, !12, i64 8, !13, i64 12, !11, i64 16, !13, i64 20, !13, i64 24, !11, i64 28, !11, i64 29}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"float", !8, i64 0}
!13 = !{!"int", !8, i64 0}
!14 = !{!"_ZTSN6basisu6vectorINS_25basisu_backend_slice_descEEE", !7, i64 0, !13, i64 8, !13, i64 12}
!15 = !{!"_ZTSN6basisu21basisu_backend_outputE", !16, i64 0, !11, i64 4, !11, i64 5, !11, i64 6, !13, i64 8, !13, i64 12, !17, i64 16, !17, i64 32, !14, i64 48, !17, i64 64, !18, i64 80, !19, i64 96}
!16 = !{!"_ZTSN6basist16basis_tex_formatE", !8, i64 0}
!17 = !{!"_ZTSN6basisu6vectorIhEE", !7, i64 0, !13, i64 8, !13, i64 12}
!18 = !{!"_ZTSN6basisu6vectorINS0_IhEEEE", !7, i64 0, !13, i64 8, !13, i64 12}
!19 = !{!"_ZTSN6basisu6vectorItEE", !7, i64 0, !13, i64 8, !13, i64 12}
!20 = !{!"_ZTSN6basisu6vectorINS_27etc1_endpoint_palette_entryEEE", !7, i64 0, !13, i64 8, !13, i64 12}
!21 = !{!"_ZTSN6basisu6vectorIN6basist27etc1_selector_palette_entryEEE", !7, i64 0, !13, i64 8, !13, i64 12}
!22 = !{!"_ZTSN6basisu6vectorINS_14basisu_backend34etc1_global_selector_cb_entry_descEEE", !7, i64 0, !13, i64 8, !13, i64 12}
!23 = !{!"_ZTSN6basisu6vectorINS_8vector2DINS_13encoder_blockEEEEE", !7, i64 0, !13, i64 8, !13, i64 12}
!24 = !{!"_ZTSN6basisu6vectorIjEE", !7, i64 0, !13, i64 8, !13, i64 12}
!25 = !{!"_ZTSN6basisu6vectorIbEE", !7, i64 0, !13, i64 8, !13, i64 12}
!26 = !{!27, !28, i64 64}
!27 = !{!"_ZTSN6basisu15basisu_frontend6paramsE", !13, i64 0, !7, i64 8, !13, i64 16, !13, i64 20, !13, i64 24, !11, i64 28, !11, i64 29, !11, i64 30, !11, i64 31, !11, i64 32, !11, i64 33, !11, i64 34, !7, i64 40, !13, i64 48, !13, i64 52, !11, i64 56, !12, i64 60, !28, i64 64, !7, i64 72, !7, i64 80}
!28 = !{!"_ZTSN6basist18basis_texture_typeE", !8, i64 0}
!29 = !{!13, !13, i64 0}
!30 = !{!31, !13, i64 0}
!31 = !{!"_ZTSN6basisu25basisu_backend_slice_descE", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !11, i64 44, !11, i64 45}
!32 = !{!31, !13, i64 20}
!33 = !{!31, !13, i64 24}
!34 = !{!35, !13, i64 0}
!35 = !{!"_ZTSN6basisu13encoder_blockE", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !11, i64 16}
!36 = !{!8, !8, i64 0}
!37 = !{!35, !11, i64 16}
!38 = !{i8 0, i8 2}
!39 = !{}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}
!42 = distinct !{!42, !41}
!43 = distinct !{!43, !41}
!44 = !{!35, !13, i64 4}
!45 = !{!6, !12, i64 12}
!46 = !{!27, !11, i64 28}
!47 = !{!11, !11, i64 0}
!48 = !{!49, !13, i64 4}
!49 = !{!"_ZTSN6basisu27etc1_endpoint_palette_entryE", !50, i64 0, !13, i64 4, !11, i64 8}
!50 = !{!"_ZTSN6basisu10color_rgbaE", !8, i64 0}
!51 = distinct !{!51, !41}
!52 = !{!35, !13, i64 8}
!53 = !{!6, !12, i64 16}
!54 = !{!6, !13, i64 20}
!55 = distinct !{!55, !41}
!56 = distinct !{!56, !41}
!57 = distinct !{!57, !41}
!58 = distinct !{!58, !41}
!59 = distinct !{!59, !41}
!60 = !{!35, !13, i64 12}
!61 = distinct !{!61, !41}
!62 = distinct !{!62, !41}
!63 = distinct !{!63, !41}
!64 = distinct !{!64, !41}
!65 = distinct !{!65, !41}
!66 = !{!6, !11, i64 37}
!67 = distinct !{!67, !41}
!68 = distinct !{!68, !41}
!69 = !{!31, !13, i64 4}
!70 = !{!31, !13, i64 8}
!71 = distinct !{!71, !41}


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