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

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

%"class.basisu::vector.6" = type { ptr, i32, i32 }
%"class.basisu::vector.8" = type { ptr, i32, i32 }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon.89 = type { ptr, i32, i32, ptr, ptr }
%"class.basisu::basisu_frontend" = type { %"struct.basisu::basisu_frontend::params", i32, i32, i8, i8, i8, i32, i32, %"class.basisu::vector", %"class.basisu::vector.0", %"class.basisu::vector.0", %"class.basisu::vector.0", %"class.basisu::tree_vector_quant", %"class.basisu::vector.6", %"class.basisu::vector.6", %"class.basisu::vector.8", %"class.basisu::vector.6", %"class.basisu::vector.10", %"class.basisu::vector.12", %"class.basisu::vector.6", %"class.basisu::vector.0", %"class.basisu::vector.6", %"class.basisu::vector.8", %"class.basisu::vector.6", %"class.basisu::vector.14", %"class.basisu::vector.16", %"class.basisu::vector.18", %"class.basisu::vector.20", %"class.std::mutex" }
%"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 }
%"class.basisu::vector" = type { ptr, i32, i32 }
%"class.basisu::tree_vector_quant" = type <{ %"class.basisu::vector.2", %"class.basisu::vector.4", i32, [4 x i8] }>
%"class.basisu::vector.2" = type { ptr, i32, i32 }
%"class.basisu::vector.4" = type { ptr, i32, i32 }
%"class.basisu::vector.10" = type { ptr, i32, i32 }
%"class.basisu::vector.12" = type { ptr, i32, i32 }
%"class.basisu::vector.0" = type { ptr, i32, i32 }
%"class.basisu::vector.14" = type { ptr, i32, i32 }
%"class.basisu::vector.16" = type { ptr, i32, i32 }
%"class.basisu::vector.18" = type { ptr, i32, i32 }
%"class.basisu::vector.20" = type { ptr, i32, i32 }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }

@.str.43 = external hidden unnamed_addr constant [47 x i8], align 1

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN6basisuL21handle_verify_failureEi(i32 noundef) #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6basisu15basisu_frontend45find_optimal_selector_clusters_for_each_blockEv(ptr noundef nonnull align 8 dereferenceable(496) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.basisu::vector.6", align 8
  %9 = alloca %"class.basisu::vector.8", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"class.std::function", align 8
  %20 = alloca %class.anon.89, align 8
  %21 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %22 = load ptr, ptr %2, align 8
  call void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef @.str.43)
  br label %23

23:                                               ; preds = %1
  %24 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 19
  %25 = call noundef i32 @_ZNK6basisu6vectorINS0_IjEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %24)
  %26 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 20
  %27 = call noundef i32 @_ZNK6basisu6vectorINS_9etc_blockEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %26)
  %28 = icmp eq i32 %25, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %23
  call void @_ZN6basisuL21handle_verify_failureEi(i32 noundef 2141)
  br label %30

30:                                               ; preds = %29, %23
  br label %31

31:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %32

32:                                               ; preds = %69, %31
  %33 = load i32, ptr %3, align 4, !tbaa !9
  %34 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 23
  %35 = call noundef i32 @_ZNK6basisu6vectorINS0_IjEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %34)
  %36 = icmp ult i32 %33, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %32
  store i32 4, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %72

38:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %39

39:                                               ; preds = %65, %38
  %40 = load i32, ptr %5, align 4, !tbaa !9
  %41 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 23
  %42 = load i32, ptr %3, align 4, !tbaa !9
  %43 = zext i32 %42 to i64
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %41, i64 noundef %43)
  %45 = call noundef i32 @_ZNK6basisu6vectorIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %44)
  %46 = icmp ult i32 %40, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %39
  store i32 7, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %68

48:                                               ; preds = %39
  br label %49

49:                                               ; preds = %48
  %50 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 23
  %51 = load i32, ptr %3, align 4, !tbaa !9
  %52 = zext i32 %51 to i64
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %50, i64 noundef %52)
  %54 = load i32, ptr %5, align 4, !tbaa !9
  %55 = zext i32 %54 to i64
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %53, i64 noundef %55)
  %57 = load i32, ptr %56, align 4, !tbaa !9
  %58 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 20
  %59 = call noundef i32 @_ZNK6basisu6vectorINS_9etc_blockEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %58)
  %60 = icmp ult i32 %57, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %49
  call void @_ZN6basisuL21handle_verify_failureEi(i32 noundef 2146)
  br label %62

62:                                               ; preds = %61, %49
  br label %63

63:                                               ; preds = %62
  br label %64

64:                                               ; preds = %63
  br label %65

65:                                               ; preds = %64
  %66 = load i32, ptr %5, align 4, !tbaa !9
  %67 = add i32 %66, 1
  store i32 %67, ptr %5, align 4, !tbaa !9
  br label %39, !llvm.loop !11

68:                                               ; preds = %47
  br label %69

69:                                               ; preds = %68
  %70 = load i32, ptr %3, align 4, !tbaa !9
  %71 = add i32 %70, 1
  store i32 %71, ptr %3, align 4, !tbaa !9
  br label %32, !llvm.loop !13

72:                                               ; preds = %37
  %73 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 26
  %74 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 1
  %75 = load i32, ptr %74, align 8, !tbaa !14
  %76 = zext i32 %75 to i64
  call void @_ZN6basisu6vectorIjE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16) %73, i64 noundef %76, i1 noundef zeroext false)
  %77 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 0
  %78 = getelementptr inbounds %"struct.basisu::basisu_frontend::params", ptr %77, i32 0, i32 4
  %79 = load i32, ptr %78, align 8, !tbaa !35
  %80 = icmp eq i32 %79, 0
  br i1 %80, label %81, label %119

81:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %82

82:                                               ; preds = %115, %81
  %83 = load i32, ptr %6, align 4, !tbaa !9
  %84 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 19
  %85 = call noundef i32 @_ZNK6basisu6vectorINS0_IjEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %84)
  %86 = icmp ult i32 %83, %85
  br i1 %86, label %88, label %87

87:                                               ; preds = %82
  store i32 12, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %118

88:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %89

89:                                               ; preds = %111, %88
  %90 = load i32, ptr %7, align 4, !tbaa !9
  %91 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 19
  %92 = load i32, ptr %6, align 4, !tbaa !9
  %93 = zext i32 %92 to i64
  %94 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %91, i64 noundef %93)
  %95 = call noundef i32 @_ZNK6basisu6vectorIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %94)
  %96 = icmp ult i32 %90, %95
  br i1 %96, label %98, label %97

97:                                               ; preds = %89
  store i32 15, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %114

98:                                               ; preds = %89
  %99 = load i32, ptr %6, align 4, !tbaa !9
  %100 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 26
  %101 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 19
  %102 = load i32, ptr %6, align 4, !tbaa !9
  %103 = zext i32 %102 to i64
  %104 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %101, i64 noundef %103)
  %105 = load i32, ptr %7, align 4, !tbaa !9
  %106 = zext i32 %105 to i64
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %104, i64 noundef %106)
  %108 = load i32, ptr %107, align 4, !tbaa !9
  %109 = zext i32 %108 to i64
  %110 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %100, i64 noundef %109)
  store i32 %99, ptr %110, align 4, !tbaa !9
  br label %111

111:                                              ; preds = %98
  %112 = load i32, ptr %7, align 4, !tbaa !9
  %113 = add i32 %112, 1
  store i32 %113, ptr %7, align 4, !tbaa !9
  br label %89, !llvm.loop !36

114:                                              ; preds = %97
  br label %115

115:                                              ; preds = %114
  %116 = load i32, ptr %6, align 4, !tbaa !9
  %117 = add i32 %116, 1
  store i32 %117, ptr %6, align 4, !tbaa !9
  br label %82, !llvm.loop !37

118:                                              ; preds = %87
  br label %249

119:                                              ; preds = %72
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #6
  %120 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 20
  %121 = call noundef i32 @_ZNK6basisu6vectorINS_9etc_blockEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %120)
  %122 = zext i32 %121 to i64
  call void @_ZN6basisu6vectorINS0_IjEEEC2Em(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %122)
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  %123 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 20
  %124 = invoke noundef i32 @_ZNK6basisu6vectorINS_9etc_blockEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %123)
          to label %125 unwind label %136

125:                                              ; preds = %119
  %126 = mul i32 16, %124
  %127 = zext i32 %126 to i64
  invoke void @_ZN6basisu6vectorIhEC2Em(ptr noundef nonnull align 8 dereferenceable(16) %9, i64 noundef %127)
          to label %128 unwind label %136

128:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %129

129:                                              ; preds = %187, %128
  %130 = load i32, ptr %12, align 4, !tbaa !9
  %131 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 20
  %132 = invoke noundef i32 @_ZNK6basisu6vectorINS_9etc_blockEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %131)
          to label %133 unwind label %140

133:                                              ; preds = %129
  %134 = icmp ult i32 %130, %132
  br i1 %134, label %144, label %135

135:                                              ; preds = %133
  store i32 18, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %191

136:                                              ; preds = %125, %119
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %10, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %11, align 4
  br label %248

140:                                              ; preds = %129
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %10, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %11, align 4
  br label %190

144:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %145

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

148:                                              ; preds = %145
  store i32 21, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %186

149:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %150

150:                                              ; preds = %175, %149
  %151 = load i32, ptr %14, align 4, !tbaa !9
  %152 = icmp ult i32 %151, 4
  br i1 %152, label %154, label %153

153:                                              ; preds = %150
  store i32 24, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %182

154:                                              ; preds = %150
  %155 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 20
  %156 = load i32, ptr %12, align 4, !tbaa !9
  %157 = zext i32 %156 to i64
  %158 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6basisu6vectorINS_9etc_blockEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %155, i64 noundef %157)
          to label %159 unwind label %178

159:                                              ; preds = %154
  %160 = load i32, ptr %14, align 4, !tbaa !9
  %161 = load i32, ptr %13, align 4, !tbaa !9
  %162 = invoke noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %158, i32 noundef %160, i32 noundef %161)
          to label %163 unwind label %178

163:                                              ; preds = %159
  %164 = trunc i32 %162 to i8
  %165 = load i32, ptr %12, align 4, !tbaa !9
  %166 = mul i32 %165, 16
  %167 = load i32, ptr %13, align 4, !tbaa !9
  %168 = mul i32 %167, 4
  %169 = add i32 %166, %168
  %170 = load i32, ptr %14, align 4, !tbaa !9
  %171 = add i32 %169, %170
  %172 = zext i32 %171 to i64
  %173 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIhEixEm(ptr noundef nonnull align 8 dereferenceable(16) %9, i64 noundef %172)
          to label %174 unwind label %178

174:                                              ; preds = %163
  store i8 %164, ptr %173, align 1, !tbaa !38
  br label %175

175:                                              ; preds = %174
  %176 = load i32, ptr %14, align 4, !tbaa !9
  %177 = add i32 %176, 1
  store i32 %177, ptr %14, align 4, !tbaa !9
  br label %150, !llvm.loop !39

178:                                              ; preds = %163, %159, %154
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %10, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %190

182:                                              ; preds = %153
  br label %183

183:                                              ; preds = %182
  %184 = load i32, ptr %13, align 4, !tbaa !9
  %185 = add i32 %184, 1
  store i32 %185, ptr %13, align 4, !tbaa !9
  br label %145, !llvm.loop !40

186:                                              ; preds = %148
  br label %187

187:                                              ; preds = %186
  %188 = load i32, ptr %12, align 4, !tbaa !9
  %189 = add i32 %188, 1
  store i32 %189, ptr %12, align 4, !tbaa !9
  br label %129, !llvm.loop !41

190:                                              ; preds = %178, %140
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %247

191:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 1024, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %192

192:                                              ; preds = %218, %191
  %193 = load i32, ptr %16, align 4, !tbaa !9
  %194 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 1
  %195 = load i32, ptr %194, align 8, !tbaa !14
  %196 = icmp ult i32 %193, %195
  br i1 %196, label %198, label %197

197:                                              ; preds = %192
  store i32 27, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %235

198:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %199 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %199, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %200 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 1
  %201 = load i32, ptr %200, align 8, !tbaa !14
  %202 = load i32, ptr %17, align 4, !tbaa !9
  %203 = add i32 %202, 1024
  %204 = invoke noundef i32 @_ZN6basisu7minimumIjEET_S1_S1_(i32 noundef %201, i32 noundef %203)
          to label %205 unwind label %221

205:                                              ; preds = %198
  store i32 %204, ptr %18, align 4, !tbaa !9
  %206 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 0
  %207 = getelementptr inbounds %"struct.basisu::basisu_frontend::params", ptr %206, i32 0, i32 19
  %208 = load ptr, ptr %207, align 8, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #6
  %209 = getelementptr inbounds %class.anon.89, ptr %20, i32 0, i32 0
  store ptr %22, ptr %209, align 8, !tbaa !43
  %210 = getelementptr inbounds %class.anon.89, ptr %20, i32 0, i32 1
  %211 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %211, ptr %210, align 8, !tbaa !45
  %212 = getelementptr inbounds %class.anon.89, ptr %20, i32 0, i32 2
  %213 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %213, ptr %212, align 4, !tbaa !46
  %214 = getelementptr inbounds %class.anon.89, ptr %20, i32 0, i32 3
  store ptr %8, ptr %214, align 8, !tbaa !5
  %215 = getelementptr inbounds %class.anon.89, ptr %20, i32 0, i32 4
  store ptr %9, ptr %215, align 8, !tbaa !5
  invoke void @"_ZNSt8functionIFvvEEC2IZN6basisu15basisu_frontend45find_optimal_selector_clusters_for_each_blockEvE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %216 unwind label %225

216:                                              ; preds = %205
  invoke void @_ZN6basisu8job_pool7add_jobEOSt8functionIFvvEE(ptr noundef nonnull align 8 dereferenceable(189) %208, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %217 unwind label %229

217:                                              ; preds = %216
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %218

218:                                              ; preds = %217
  %219 = load i32, ptr %16, align 4, !tbaa !9
  %220 = add i32 %219, 1024
  store i32 %220, ptr %16, align 4, !tbaa !9
  br label %192, !llvm.loop !47

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

225:                                              ; preds = %205
  %226 = landingpad { ptr, i32 }
          cleanup
  %227 = extractvalue { ptr, i32 } %226, 0
  store ptr %227, ptr %10, align 8
  %228 = extractvalue { ptr, i32 } %226, 1
  store i32 %228, ptr %11, align 4
  br label %233

229:                                              ; preds = %216
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %10, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %11, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  br label %233

233:                                              ; preds = %229, %225
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #6
  br label %234

234:                                              ; preds = %233, %221
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %246

235:                                              ; preds = %197
  %236 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 0
  %237 = getelementptr inbounds %"struct.basisu::basisu_frontend::params", ptr %236, i32 0, i32 19
  %238 = load ptr, ptr %237, align 8, !tbaa !42
  invoke void @_ZN6basisu8job_pool12wait_for_allEv(ptr noundef nonnull align 8 dereferenceable(189) %238)
          to label %239 unwind label %242

239:                                              ; preds = %235
  %240 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 19
  invoke void @_ZN6basisu6vectorINS0_IjEEE4swapERS2_(ptr noundef nonnull align 8 dereferenceable(16) %240, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %241 unwind label %242

241:                                              ; preds = %239
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @_ZN6basisu6vectorIhED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  call void @_ZN6basisu6vectorINS0_IjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  br label %249

242:                                              ; preds = %239, %235
  %243 = landingpad { ptr, i32 }
          cleanup
  %244 = extractvalue { ptr, i32 } %243, 0
  store ptr %244, ptr %10, align 8
  %245 = extractvalue { ptr, i32 } %243, 1
  store i32 %245, ptr %11, align 4
  br label %246

246:                                              ; preds = %242, %234
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %247

247:                                              ; preds = %246, %190
  call void @_ZN6basisu6vectorIhED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  br label %248

248:                                              ; preds = %247, %136
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  call void @_ZN6basisu6vectorINS0_IjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  br label %265

249:                                              ; preds = %241, %118
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %250

250:                                              ; preds = %261, %249
  %251 = load i32, ptr %21, align 4, !tbaa !9
  %252 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 19
  %253 = call noundef i32 @_ZNK6basisu6vectorINS0_IjEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %252)
  %254 = icmp ult i32 %251, %253
  br i1 %254, label %256, label %255

255:                                              ; preds = %250
  store i32 30, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %264

256:                                              ; preds = %250
  %257 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %22, i32 0, i32 19
  %258 = load i32, ptr %21, align 4, !tbaa !9
  %259 = zext i32 %258 to i64
  %260 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %257, i64 noundef %259)
  call void @_ZN6basisu11vector_sortINS_6vectorIjEEEEvRT_(ptr noundef nonnull align 8 dereferenceable(16) %260)
  br label %261

261:                                              ; preds = %256
  %262 = load i32, ptr %21, align 4, !tbaa !9
  %263 = add i32 %262, 1
  store i32 %263, ptr %21, align 4, !tbaa !9
  br label %250, !llvm.loop !48

264:                                              ; preds = %255
  ret void

265:                                              ; preds = %248
  %266 = load ptr, ptr %10, align 8
  %267 = load i32, ptr %11, align 4
  %268 = insertvalue { ptr, i32 } poison, ptr %266, 0
  %269 = insertvalue { ptr, i32 } %268, i32 %267, 1
  resume { ptr, i32 } %269
}

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

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

declare void @_ZN6basisu8job_pool7add_jobEOSt8functionIFvvEE(ptr noundef nonnull align 8 dereferenceable(189), ptr noundef nonnull align 8 dereferenceable(32)) #0

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN6basisu8job_pool12wait_for_allEv(ptr noundef nonnull align 8 dereferenceable(189)) #0

; 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) #1 align 2

; 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) #1 align 2

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN6basisu15basisu_frontend45find_optimal_selector_clusters_for_each_blockEvE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !10, i64 88}
!15 = !{!"_ZTSN6basisu15basisu_frontendE", !16, i64 0, !10, i64 88, !10, i64 92, !17, i64 96, !17, i64 97, !17, i64 98, !10, i64 100, !10, i64 104, !20, i64 112, !21, i64 128, !21, i64 144, !21, i64 160, !22, i64 176, !25, i64 216, !25, i64 232, !26, i64 248, !25, i64 264, !27, i64 280, !28, i64 296, !25, i64 312, !21, i64 328, !25, i64 344, !26, i64 360, !25, i64 376, !29, i64 392, !30, i64 408, !31, i64 424, !32, i64 440, !33, i64 456}
!16 = !{!"_ZTSN6basisu15basisu_frontend6paramsE", !10, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !17, i64 28, !17, i64 29, !17, i64 30, !17, i64 31, !17, i64 32, !17, i64 33, !17, i64 34, !6, i64 40, !10, i64 48, !10, i64 52, !17, i64 56, !18, i64 60, !19, i64 64, !6, i64 72, !6, i64 80}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"float", !7, i64 0}
!19 = !{!"_ZTSN6basist18basis_texture_typeE", !7, i64 0}
!20 = !{!"_ZTSN6basisu6vectorINS_11pixel_blockEEE", !6, i64 0, !10, i64 8, !10, i64 12}
!21 = !{!"_ZTSN6basisu6vectorINS_9etc_blockEEE", !6, i64 0, !10, i64 8, !10, i64 12}
!22 = !{!"_ZTSN6basisu17tree_vector_quantINS_3vecILj6EfEEEE", !23, i64 0, !24, i64 16, !10, i64 32}
!23 = !{!"_ZTSN6basisu6vectorINS_17tree_vector_quantINS_3vecILj6EfEEE9tsvq_nodeEEE", !6, i64 0, !10, i64 8, !10, i64 12}
!24 = !{!"_ZTSN6basisu6vectorISt4pairINS_3vecILj6EfEEmEEE", !6, i64 0, !10, i64 8, !10, i64 12}
!25 = !{!"_ZTSN6basisu6vectorINS0_IjEEEE", !6, i64 0, !10, i64 8, !10, i64 12}
!26 = !{!"_ZTSN6basisu6vectorIhEE", !6, i64 0, !10, i64 8, !10, i64 12}
!27 = !{!"_ZTSN6basisu6vectorINS_15basisu_frontend27endpoint_cluster_etc_paramsEEE", !6, i64 0, !10, i64 8, !10, i64 12}
!28 = !{!"_ZTSN6basisu6vectorINS_5vec2UEEE", !6, i64 0, !10, i64 8, !10, i64 12}
!29 = !{!"_ZTSN6basisu6vectorIN6basist38etc1_global_selector_codebook_entry_idEEE", !6, i64 0, !10, i64 8, !10, i64 12}
!30 = !{!"_ZTSN6basisu6vectorIbEE", !6, i64 0, !10, i64 8, !10, i64 12}
!31 = !{!"_ZTSN6basisu6vectorIjEE", !6, i64 0, !10, i64 8, !10, i64 12}
!32 = !{!"_ZTSN6basisu6vectorINS_15basisu_frontend27subblock_endpoint_quant_errEEE", !6, i64 0, !10, i64 8, !10, i64 12}
!33 = !{!"_ZTSSt5mutex", !34, i64 0}
!34 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!35 = !{!15, !10, i64 24}
!36 = distinct !{!36, !12}
!37 = distinct !{!37, !12}
!38 = !{!7, !7, i64 0}
!39 = distinct !{!39, !12}
!40 = distinct !{!40, !12}
!41 = distinct !{!41, !12}
!42 = !{!15, !6, i64 80}
!43 = !{!44, !6, i64 0}
!44 = !{!"_ZTSZN6basisu15basisu_frontend45find_optimal_selector_clusters_for_each_blockEvE3$_0", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16, !6, i64 24}
!45 = !{!44, !10, i64 8}
!46 = !{!44, !10, i64 12}
!47 = distinct !{!47, !12}
!48 = distinct !{!48, !12}


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

%"class.basisu::vector.6" = type { ptr, i32, i32 }
%"class.basisu::vector.8" = type { ptr, i32, i32 }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon.89 = type { ptr, i32, i32, ptr, ptr }

@.str.43 = external hidden unnamed_addr constant [47 x i8], align 1

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN6basisuL21handle_verify_failureEi(i32 noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6basisu15basisu_frontend45find_optimal_selector_clusters_for_each_blockEv(ptr noundef nonnull align 8 dereferenceable(496) %0) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.basisu::vector.6", align 8
  %3 = alloca %"class.basisu::vector.8", align 8
  %4 = alloca %"class.std::function", align 8
  %5 = alloca %class.anon.89, align 8
  tail call void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef nonnull @.str.43)
  %6 = getelementptr inbounds i8, ptr %0, i64 312
  %7 = tail call noundef i32 @_ZNK6basisu6vectorINS0_IjEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  %8 = getelementptr inbounds i8, ptr %0, i64 328
  %9 = tail call noundef i32 @_ZNK6basisu6vectorINS_9etc_blockEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
  %10 = icmp eq i32 %7, %9
  br i1 %10, label %12, label %11

11:                                               ; preds = %1
  tail call void @_ZN6basisuL21handle_verify_failureEi(i32 noundef 2141)
  br label %12

12:                                               ; preds = %1, %11
  %13 = getelementptr inbounds i8, ptr %0, i64 376
  %14 = tail call noundef i32 @_ZNK6basisu6vectorINS0_IjEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %13)
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %._crit_edge65, label %.preheader62

.preheader62:                                     ; preds = %12, %._crit_edge
  %indvars.iv87 = phi i64 [ %indvars.iv.next88, %._crit_edge ], [ 0, %12 ]
  %15 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %13, i64 noundef %indvars.iv87)
  %16 = tail call noundef i32 @_ZNK6basisu6vectorIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %15)
  %.not80 = icmp eq i32 %16, 0
  br i1 %.not80, label %._crit_edge, label %.lr.ph

._crit_edge65:                                    ; preds = %._crit_edge, %12
  %17 = getelementptr inbounds i8, ptr %0, i64 424
  %18 = getelementptr inbounds i8, ptr %0, i64 88
  %19 = load i32, ptr %18, align 8, !tbaa !5
  %20 = zext i32 %19 to i64
  tail call void @_ZN6basisu6vectorIjE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16) %17, i64 noundef %20, i1 noundef zeroext false)
  %21 = getelementptr inbounds i8, ptr %0, i64 24
  %22 = load i32, ptr %21, align 8, !tbaa !30
  %23 = icmp eq i32 %22, 0
  br i1 %23, label %.preheader57, label %54

.preheader57:                                     ; preds = %._crit_edge65
  %24 = tail call noundef i32 @_ZNK6basisu6vectorINS0_IjEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  %.not83 = icmp eq i32 %24, 0
  br i1 %.not83, label %.loopexit, label %.preheader

._crit_edge:                                      ; preds = %34, %.preheader62
  %indvars.iv.next88 = add nuw nsw i64 %indvars.iv87, 1
  %25 = tail call noundef i32 @_ZNK6basisu6vectorINS0_IjEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %13)
  %26 = zext i32 %25 to i64
  %27 = icmp ult i64 %indvars.iv.next88, %26
  br i1 %27, label %.preheader62, label %._crit_edge65, !llvm.loop !31

.lr.ph:                                           ; preds = %.preheader62, %34
  %indvars.iv = phi i64 [ %indvars.iv.next, %34 ], [ 0, %.preheader62 ]
  %28 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %13, i64 noundef %indvars.iv87)
  %29 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %28, i64 noundef %indvars.iv)
  %30 = load i32, ptr %29, align 4, !tbaa !33
  %31 = tail call noundef i32 @_ZNK6basisu6vectorINS_9etc_blockEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
  %32 = icmp ult i32 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %.lr.ph
  tail call void @_ZN6basisuL21handle_verify_failureEi(i32 noundef 2146)
  br label %34

34:                                               ; preds = %.lr.ph, %33
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %35 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %13, i64 noundef %indvars.iv87)
  %36 = tail call noundef i32 @_ZNK6basisu6vectorIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %35)
  %37 = zext i32 %36 to i64
  %38 = icmp ult i64 %indvars.iv.next, %37
  br i1 %38, label %.lr.ph, label %._crit_edge, !llvm.loop !34

.preheader:                                       ; preds = %.preheader57, %._crit_edge74
  %indvars.iv102 = phi i64 [ %indvars.iv.next103, %._crit_edge74 ], [ 0, %.preheader57 ]
  %39 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %indvars.iv102)
  %40 = tail call noundef i32 @_ZNK6basisu6vectorIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %39)
  %.not84 = icmp eq i32 %40, 0
  br i1 %.not84, label %._crit_edge74, label %.lr.ph73.preheader

.lr.ph73.preheader:                               ; preds = %.preheader
  %41 = trunc nuw i64 %indvars.iv102 to i32
  br label %.lr.ph73

._crit_edge74:                                    ; preds = %.lr.ph73, %.preheader
  %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
  %42 = tail call noundef i32 @_ZNK6basisu6vectorINS0_IjEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  %43 = zext i32 %42 to i64
  %44 = icmp ult i64 %indvars.iv.next103, %43
  br i1 %44, label %.preheader, label %.loopexit, !llvm.loop !35

.lr.ph73:                                         ; preds = %.lr.ph73.preheader, %.lr.ph73
  %indvars.iv99 = phi i64 [ 0, %.lr.ph73.preheader ], [ %indvars.iv.next100, %.lr.ph73 ]
  %45 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %indvars.iv102)
  %46 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %45, i64 noundef %indvars.iv99)
  %47 = load i32, ptr %46, align 4, !tbaa !33
  %48 = zext i32 %47 to i64
  %49 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %17, i64 noundef %48)
  store i32 %41, ptr %49, align 4, !tbaa !33
  %indvars.iv.next100 = add nuw nsw i64 %indvars.iv99, 1
  %50 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %indvars.iv102)
  %51 = tail call noundef i32 @_ZNK6basisu6vectorIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %50)
  %52 = zext i32 %51 to i64
  %53 = icmp ult i64 %indvars.iv.next100, %52
  br i1 %53, label %.lr.ph73, label %._crit_edge74, !llvm.loop !36

54:                                               ; preds = %._crit_edge65
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #6
  %55 = tail call noundef i32 @_ZNK6basisu6vectorINS_9etc_blockEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
  %56 = zext i32 %55 to i64
  call void @_ZN6basisu6vectorINS0_IjEEEC2Em(ptr noundef nonnull align 8 dereferenceable(16) %2, i64 noundef %56)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #6
  %57 = call noundef i32 @_ZNK6basisu6vectorINS_9etc_blockEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
  %58 = shl i32 %57, 4
  %59 = zext i32 %58 to i64
  invoke void @_ZN6basisu6vectorIhEC2Em(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %59)
          to label %.preheader61 unwind label %71

.preheader61:                                     ; preds = %54
  %60 = call noundef i32 @_ZNK6basisu6vectorINS_9etc_blockEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
  %.not81 = icmp eq i32 %60, 0
  br i1 %.not81, label %.preheader58, label %.preheader60

.preheader60:                                     ; preds = %.preheader61, %159
  %indvars.iv96 = phi i64 [ %indvars.iv.next97, %159 ], [ 0, %.preheader61 ]
  %61 = shl nuw nsw i64 %indvars.iv96, 4
  %62 = and i64 %61, 4294967280
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6basisu6vectorINS_9etc_blockEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %indvars.iv96)
  %64 = invoke noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %63, i32 noundef 0, i32 noundef 0)
          to label %73 unwind label %166

.preheader58:                                     ; preds = %159, %.preheader61
  %65 = load i32, ptr %18, align 8, !tbaa !5
  %.not82 = icmp eq i32 %65, 0
  br i1 %.not82, label %._crit_edge71, label %.lr.ph70

.lr.ph70:                                         ; preds = %.preheader58
  %66 = getelementptr inbounds i8, ptr %0, i64 80
  %67 = getelementptr inbounds i8, ptr %5, i64 8
  %68 = getelementptr inbounds i8, ptr %5, i64 12
  %69 = getelementptr inbounds i8, ptr %5, i64 16
  %70 = getelementptr inbounds i8, ptr %5, i64 24
  br label %170

71:                                               ; preds = %54
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %188

73:                                               ; preds = %.preheader60
  %74 = trunc i32 %64 to i8
  %75 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIhEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %62)
  store i8 %74, ptr %75, align 1, !tbaa !37
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6basisu6vectorINS_9etc_blockEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %indvars.iv96)
  %77 = invoke noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %76, i32 noundef 1, i32 noundef 0)
          to label %78 unwind label %166

78:                                               ; preds = %73
  %79 = trunc i32 %77 to i8
  %80 = or disjoint i64 %62, 1
  %81 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIhEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %80)
  store i8 %79, ptr %81, align 1, !tbaa !37
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6basisu6vectorINS_9etc_blockEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %indvars.iv96)
  %83 = invoke noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %82, i32 noundef 2, i32 noundef 0)
          to label %84 unwind label %166

84:                                               ; preds = %78
  %85 = trunc i32 %83 to i8
  %86 = or disjoint i64 %62, 2
  %87 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIhEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %86)
  store i8 %85, ptr %87, align 1, !tbaa !37
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6basisu6vectorINS_9etc_blockEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %indvars.iv96)
  %89 = invoke noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %88, i32 noundef 3, i32 noundef 0)
          to label %.preheader59.1 unwind label %166

.preheader59.1:                                   ; preds = %84
  %90 = trunc i32 %89 to i8
  %91 = or disjoint i64 %62, 3
  %92 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIhEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %91)
  store i8 %90, ptr %92, align 1, !tbaa !37
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6basisu6vectorINS_9etc_blockEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %indvars.iv96)
  %94 = invoke noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %93, i32 noundef 0, i32 noundef 1)
          to label %95 unwind label %166

95:                                               ; preds = %.preheader59.1
  %96 = or disjoint i64 %62, 4
  %97 = trunc i32 %94 to i8
  %98 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIhEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %96)
  store i8 %97, ptr %98, align 1, !tbaa !37
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6basisu6vectorINS_9etc_blockEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %indvars.iv96)
  %100 = invoke noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %99, i32 noundef 1, i32 noundef 1)
          to label %101 unwind label %166

101:                                              ; preds = %95
  %102 = trunc i32 %100 to i8
  %103 = or disjoint i64 %62, 5
  %104 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIhEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %103)
  store i8 %102, ptr %104, align 1, !tbaa !37
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6basisu6vectorINS_9etc_blockEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %indvars.iv96)
  %106 = invoke noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %105, i32 noundef 2, i32 noundef 1)
          to label %107 unwind label %166

107:                                              ; preds = %101
  %108 = trunc i32 %106 to i8
  %109 = or disjoint i64 %62, 6
  %110 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIhEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %109)
  store i8 %108, ptr %110, align 1, !tbaa !37
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6basisu6vectorINS_9etc_blockEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %indvars.iv96)
  %112 = invoke noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %111, i32 noundef 3, i32 noundef 1)
          to label %.preheader59.2 unwind label %166

.preheader59.2:                                   ; preds = %107
  %113 = trunc i32 %112 to i8
  %114 = or disjoint i64 %62, 7
  %115 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIhEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %114)
  store i8 %113, ptr %115, align 1, !tbaa !37
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6basisu6vectorINS_9etc_blockEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %indvars.iv96)
  %117 = invoke noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %116, i32 noundef 0, i32 noundef 2)
          to label %118 unwind label %166

118:                                              ; preds = %.preheader59.2
  %119 = or disjoint i64 %62, 8
  %120 = trunc i32 %117 to i8
  %121 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIhEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %119)
  store i8 %120, ptr %121, align 1, !tbaa !37
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6basisu6vectorINS_9etc_blockEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %indvars.iv96)
  %123 = invoke noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %122, i32 noundef 1, i32 noundef 2)
          to label %124 unwind label %166

124:                                              ; preds = %118
  %125 = trunc i32 %123 to i8
  %126 = or disjoint i64 %62, 9
  %127 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIhEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %126)
  store i8 %125, ptr %127, align 1, !tbaa !37
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6basisu6vectorINS_9etc_blockEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %indvars.iv96)
  %129 = invoke noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %128, i32 noundef 2, i32 noundef 2)
          to label %130 unwind label %166

130:                                              ; preds = %124
  %131 = trunc i32 %129 to i8
  %132 = or disjoint i64 %62, 10
  %133 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIhEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %132)
  store i8 %131, ptr %133, align 1, !tbaa !37
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6basisu6vectorINS_9etc_blockEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %indvars.iv96)
  %135 = invoke noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %134, i32 noundef 3, i32 noundef 2)
          to label %.preheader59.3 unwind label %166

.preheader59.3:                                   ; preds = %130
  %136 = trunc i32 %135 to i8
  %137 = or disjoint i64 %62, 11
  %138 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIhEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %137)
  store i8 %136, ptr %138, align 1, !tbaa !37
  %139 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6basisu6vectorINS_9etc_blockEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %indvars.iv96)
  %140 = invoke noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %139, i32 noundef 0, i32 noundef 3)
          to label %141 unwind label %166

141:                                              ; preds = %.preheader59.3
  %142 = or disjoint i64 %62, 12
  %143 = trunc i32 %140 to i8
  %144 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIhEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %142)
  store i8 %143, ptr %144, align 1, !tbaa !37
  %145 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6basisu6vectorINS_9etc_blockEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %indvars.iv96)
  %146 = invoke noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %145, i32 noundef 1, i32 noundef 3)
          to label %147 unwind label %166

147:                                              ; preds = %141
  %148 = trunc i32 %146 to i8
  %149 = or disjoint i64 %62, 13
  %150 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIhEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %149)
  store i8 %148, ptr %150, align 1, !tbaa !37
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6basisu6vectorINS_9etc_blockEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %indvars.iv96)
  %152 = invoke noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %151, i32 noundef 2, i32 noundef 3)
          to label %153 unwind label %166

153:                                              ; preds = %147
  %154 = trunc i32 %152 to i8
  %155 = or disjoint i64 %62, 14
  %156 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIhEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %155)
  store i8 %154, ptr %156, align 1, !tbaa !37
  %157 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN6basisu6vectorINS_9etc_blockEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %indvars.iv96)
  %158 = invoke noundef i32 @_ZNK6basisu9etc_block12get_selectorEjj(ptr noundef nonnull align 8 dereferenceable(8) %157, i32 noundef 3, i32 noundef 3)
          to label %159 unwind label %166

159:                                              ; preds = %153
  %160 = trunc i32 %158 to i8
  %161 = or disjoint i64 %62, 15
  %162 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIhEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %161)
  store i8 %160, ptr %162, align 1, !tbaa !37
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
  %163 = call noundef i32 @_ZNK6basisu6vectorINS_9etc_blockEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
  %164 = zext i32 %163 to i64
  %165 = icmp ult i64 %indvars.iv.next97, %164
  br i1 %165, label %.preheader60, label %.preheader58, !llvm.loop !38

166:                                              ; preds = %153, %147, %141, %.preheader59.3, %130, %124, %118, %.preheader59.2, %107, %101, %95, %.preheader59.1, %84, %78, %73, %.preheader60
  %167 = landingpad { ptr, i32 }
          cleanup
  br label %187

._crit_edge71:                                    ; preds = %176, %.preheader58
  %168 = getelementptr inbounds i8, ptr %0, i64 80
  %169 = load ptr, ptr %168, align 8, !tbaa !39
  invoke void @_ZN6basisu8job_pool12wait_for_allEv(ptr noundef nonnull align 8 dereferenceable(189) %169)
          to label %184 unwind label %185

170:                                              ; preds = %.lr.ph70, %176
  %171 = phi i32 [ %65, %.lr.ph70 ], [ %177, %176 ]
  %.03969 = phi i32 [ 0, %.lr.ph70 ], [ %172, %176 ]
  %172 = add i32 %.03969, 1024
  %173 = call noundef i32 @_ZN6basisu7minimumIjEET_S1_S1_(i32 noundef %171, i32 noundef %172)
  %174 = load ptr, ptr %66, align 8, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  store ptr %0, ptr %5, align 8, !tbaa !40
  store i32 %.03969, ptr %67, align 8, !tbaa !42
  store i32 %173, ptr %68, align 4, !tbaa !43
  store ptr %2, ptr %69, align 8, !tbaa !44
  store ptr %3, ptr %70, align 8, !tbaa !44
  invoke void @"_ZNSt8functionIFvvEEC2IZN6basisu15basisu_frontend45find_optimal_selector_clusters_for_each_blockEvE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %175 unwind label %179

175:                                              ; preds = %170
  invoke void @_ZN6basisu8job_pool7add_jobEOSt8functionIFvvEE(ptr noundef nonnull align 8 dereferenceable(189) %174, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %176 unwind label %181

176:                                              ; preds = %175
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  %177 = load i32, ptr %18, align 8, !tbaa !5
  %178 = icmp ult i32 %172, %177
  br i1 %178, label %170, label %._crit_edge71, !llvm.loop !45

179:                                              ; preds = %170
  %180 = landingpad { ptr, i32 }
          cleanup
  br label %183

181:                                              ; preds = %175
  %182 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  br label %183

183:                                              ; preds = %181, %179
  %.pn = phi { ptr, i32 } [ %182, %181 ], [ %180, %179 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  br label %187

184:                                              ; preds = %._crit_edge71
  call void @_ZN6basisu6vectorINS0_IjEEE4swapERS2_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %2)
  call void @_ZN6basisu6vectorIhED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  call void @_ZN6basisu6vectorINS0_IjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %2) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #6
  br label %.loopexit

185:                                              ; preds = %._crit_edge71
  %186 = landingpad { ptr, i32 }
          cleanup
  br label %187

187:                                              ; preds = %183, %185, %166
  %.pn54 = phi { ptr, i32 } [ %167, %166 ], [ %.pn, %183 ], [ %186, %185 ]
  call void @_ZN6basisu6vectorIhED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #6
  br label %188

188:                                              ; preds = %187, %71
  %.pn54.pn = phi { ptr, i32 } [ %.pn54, %187 ], [ %72, %71 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  call void @_ZN6basisu6vectorINS0_IjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %2) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn54.pn

.loopexit:                                        ; preds = %._crit_edge74, %.preheader57, %184
  %189 = call noundef i32 @_ZNK6basisu6vectorINS0_IjEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  %.not85 = icmp eq i32 %189, 0
  br i1 %.not85, label %._crit_edge79, label %.lr.ph78

._crit_edge79:                                    ; preds = %.lr.ph78, %.loopexit
  ret void

.lr.ph78:                                         ; preds = %.loopexit, %.lr.ph78
  %indvars.iv105 = phi i64 [ %indvars.iv.next106, %.lr.ph78 ], [ 0, %.loopexit ]
  %190 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %indvars.iv105)
  call void @_ZN6basisu11vector_sortINS_6vectorIjEEEEvRT_(ptr noundef nonnull align 8 dereferenceable(16) %190)
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %191 = call noundef i32 @_ZNK6basisu6vectorINS0_IjEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  %192 = zext i32 %191 to i64
  %193 = icmp ult i64 %indvars.iv.next106, %192
  br i1 %193, label %.lr.ph78, label %._crit_edge79, !llvm.loop !46
}

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

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

declare void @_ZN6basisu8job_pool7add_jobEOSt8functionIFvvEE(ptr noundef nonnull align 8 dereferenceable(189), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN6basisu8job_pool12wait_for_allEv(ptr noundef nonnull align 8 dereferenceable(189)) local_unnamed_addr #0

; 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 #1 align 2

; 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 #1 align 2

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu11vector_sortINS_6vectorIjEEEEvRT_(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN6basisu15basisu_frontend45find_optimal_selector_clusters_for_each_blockEvE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

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

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

!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, !8, i64 88}
!6 = !{!"_ZTSN6basisu15basisu_frontendE", !7, i64 0, !8, i64 88, !8, i64 92, !12, i64 96, !12, i64 97, !12, i64 98, !8, i64 100, !8, i64 104, !15, i64 112, !16, i64 128, !16, i64 144, !16, i64 160, !17, i64 176, !20, i64 216, !20, i64 232, !21, i64 248, !20, i64 264, !22, i64 280, !23, i64 296, !20, i64 312, !16, i64 328, !20, i64 344, !21, i64 360, !20, i64 376, !24, i64 392, !25, i64 408, !26, i64 424, !27, i64 440, !28, i64 456}
!7 = !{!"_ZTSN6basisu15basisu_frontend6paramsE", !8, i64 0, !11, i64 8, !8, i64 16, !8, i64 20, !8, i64 24, !12, i64 28, !12, i64 29, !12, i64 30, !12, i64 31, !12, i64 32, !12, i64 33, !12, i64 34, !11, i64 40, !8, i64 48, !8, i64 52, !12, i64 56, !13, i64 60, !14, i64 64, !11, i64 72, !11, i64 80}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"bool", !9, i64 0}
!13 = !{!"float", !9, i64 0}
!14 = !{!"_ZTSN6basist18basis_texture_typeE", !9, i64 0}
!15 = !{!"_ZTSN6basisu6vectorINS_11pixel_blockEEE", !11, i64 0, !8, i64 8, !8, i64 12}
!16 = !{!"_ZTSN6basisu6vectorINS_9etc_blockEEE", !11, i64 0, !8, i64 8, !8, i64 12}
!17 = !{!"_ZTSN6basisu17tree_vector_quantINS_3vecILj6EfEEEE", !18, i64 0, !19, i64 16, !8, i64 32}
!18 = !{!"_ZTSN6basisu6vectorINS_17tree_vector_quantINS_3vecILj6EfEEE9tsvq_nodeEEE", !11, i64 0, !8, i64 8, !8, i64 12}
!19 = !{!"_ZTSN6basisu6vectorISt4pairINS_3vecILj6EfEEmEEE", !11, i64 0, !8, i64 8, !8, i64 12}
!20 = !{!"_ZTSN6basisu6vectorINS0_IjEEEE", !11, i64 0, !8, i64 8, !8, i64 12}
!21 = !{!"_ZTSN6basisu6vectorIhEE", !11, i64 0, !8, i64 8, !8, i64 12}
!22 = !{!"_ZTSN6basisu6vectorINS_15basisu_frontend27endpoint_cluster_etc_paramsEEE", !11, i64 0, !8, i64 8, !8, i64 12}
!23 = !{!"_ZTSN6basisu6vectorINS_5vec2UEEE", !11, i64 0, !8, i64 8, !8, i64 12}
!24 = !{!"_ZTSN6basisu6vectorIN6basist38etc1_global_selector_codebook_entry_idEEE", !11, i64 0, !8, i64 8, !8, i64 12}
!25 = !{!"_ZTSN6basisu6vectorIbEE", !11, i64 0, !8, i64 8, !8, i64 12}
!26 = !{!"_ZTSN6basisu6vectorIjEE", !11, i64 0, !8, i64 8, !8, i64 12}
!27 = !{!"_ZTSN6basisu6vectorINS_15basisu_frontend27subblock_endpoint_quant_errEEE", !11, i64 0, !8, i64 8, !8, i64 12}
!28 = !{!"_ZTSSt5mutex", !29, i64 0}
!29 = !{!"_ZTSSt12__mutex_base", !9, i64 0}
!30 = !{!6, !8, i64 24}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!8, !8, i64 0}
!34 = distinct !{!34, !32}
!35 = distinct !{!35, !32}
!36 = distinct !{!36, !32}
!37 = !{!9, !9, i64 0}
!38 = distinct !{!38, !32}
!39 = !{!6, !11, i64 80}
!40 = !{!41, !11, i64 0}
!41 = !{!"_ZTSZN6basisu15basisu_frontend45find_optimal_selector_clusters_for_each_blockEvE3$_0", !11, i64 0, !8, i64 8, !8, i64 12, !11, i64 16, !11, i64 24}
!42 = !{!41, !8, i64 8}
!43 = !{!41, !8, i64 12}
!44 = !{!11, !11, i64 0}
!45 = distinct !{!45, !32}
!46 = distinct !{!46, !32}


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