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

; 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.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<basisu::sym_freq, std::allocator<basisu::sym_freq>>::_Vector_impl" }
%"struct.std::_Vector_base<basisu::sym_freq, std::allocator<basisu::sym_freq>>::_Vector_impl" = type { %"struct.std::_Vector_base<basisu::sym_freq, std::allocator<basisu::sym_freq>>::_Vector_impl_data" }
%"struct.std::_Vector_base<basisu::sym_freq, std::allocator<basisu::sym_freq>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.13" = type { i8 }
%"struct.basisu::sym_freq" = type { i32, i16 }
%"class.basisu::huffman_encoding_table" = type { %"class.basisu::vector.16", %"class.basisu::vector.4" }
%"class.basisu::vector.16" = type { ptr, i32, i32 }
%"class.basisu::vector.4" = type { ptr, i32, i32 }

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

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

declare i32 @__gxx_personality_v0(...)

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu46canonical_huffman_calculate_minimum_redundancyEPNS_8sym_freqEi(ptr noundef, i32 noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu39canonical_huffman_enforce_max_code_sizeEPiii(ptr noundef, i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN6basisu33canonical_huffman_radix_sort_symsEjPNS_8sym_freqES1_(i32 noundef, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6basisu22huffman_encoding_table4initEjPKtj(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef %1, ptr noundef %2, i32 noundef %3) #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::vector.11", align 8
  %14 = alloca %"class.std::allocator.13", align 1
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::vector.11", align 8
  %18 = alloca %"class.std::allocator.13", align 1
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca [32 x i32], align 16
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca [32 x i32], align 16
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  %35 = load ptr, ptr %6, align 8
  %36 = load i32, ptr %9, align 4, !tbaa !9
  %37 = icmp ugt i32 %36, 16
  br i1 %37, label %38, label %39

38:                                               ; preds = %4
  store i1 false, ptr %5, align 1
  br label %314

39:                                               ; preds = %4
  %40 = load i32, ptr %7, align 4, !tbaa !9
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %42, label %45

42:                                               ; preds = %39
  %43 = load i32, ptr %7, align 4, !tbaa !9
  %44 = icmp ugt i32 %43, 16384
  br i1 %44, label %45, label %46

45:                                               ; preds = %42, %39
  store i1 false, ptr %5, align 1
  br label %314

46:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %47

47:                                               ; preds = %63, %46
  %48 = load i32, ptr %11, align 4, !tbaa !9
  %49 = load i32, ptr %7, align 4, !tbaa !9
  %50 = icmp ult i32 %48, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %66

52:                                               ; preds = %47
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = load i32, ptr %11, align 4, !tbaa !9
  %55 = zext i32 %54 to i64
  %56 = getelementptr inbounds i16, ptr %53, i64 %55
  %57 = load i16, ptr %56, align 2, !tbaa !11
  %58 = icmp ne i16 %57, 0
  br i1 %58, label %59, label %62

59:                                               ; preds = %52
  %60 = load i32, ptr %10, align 4, !tbaa !9
  %61 = add i32 %60, 1
  store i32 %61, ptr %10, align 4, !tbaa !9
  br label %62

62:                                               ; preds = %59, %52
  br label %63

63:                                               ; preds = %62
  %64 = load i32, ptr %11, align 4, !tbaa !9
  %65 = add i32 %64, 1
  store i32 %65, ptr %11, align 4, !tbaa !9
  br label %47, !llvm.loop !13

66:                                               ; preds = %51
  %67 = load i32, ptr %10, align 4, !tbaa !9
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %70, label %69

69:                                               ; preds = %66
  store i1 false, ptr %5, align 1
  store i32 1, ptr %12, align 4
  br label %313

70:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #5
  %71 = load i32, ptr %10, align 4, !tbaa !9
  %72 = zext i32 %71 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #5
  call void @_ZNSaIN6basisu8sym_freqEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  invoke void @_ZNSt6vectorIN6basisu8sym_freqESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %72, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %73 unwind label %82

73:                                               ; preds = %70
  call void @_ZNSt15__new_allocatorIN6basisu8sym_freqEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #5
  %74 = load i32, ptr %10, align 4, !tbaa !9
  %75 = zext i32 %74 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  call void @_ZNSaIN6basisu8sym_freqEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  invoke void @_ZNSt6vectorIN6basisu8sym_freqESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %75, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %76 unwind label %86

76:                                               ; preds = %73
  call void @_ZNSt15__new_allocatorIN6basisu8sym_freqEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %77

77:                                               ; preds = %116, %76
  %78 = load i32, ptr %19, align 4, !tbaa !9
  %79 = load i32, ptr %7, align 4, !tbaa !9
  %80 = icmp ult i32 %78, %79
  br i1 %80, label %90, label %81

81:                                               ; preds = %77
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %119

82:                                               ; preds = %70
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %15, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %16, align 4
  call void @_ZNSt15__new_allocatorIN6basisu8sym_freqEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  br label %312

86:                                               ; preds = %73
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %15, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %16, align 4
  call void @_ZNSt15__new_allocatorIN6basisu8sym_freqEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  br label %311

90:                                               ; preds = %77
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = load i32, ptr %19, align 4, !tbaa !9
  %93 = zext i32 %92 to i64
  %94 = getelementptr inbounds i16, ptr %91, i64 %93
  %95 = load i16, ptr %94, align 2, !tbaa !11
  %96 = icmp ne i16 %95, 0
  br i1 %96, label %97, label %115

97:                                               ; preds = %90
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = load i32, ptr %19, align 4, !tbaa !9
  %100 = zext i32 %99 to i64
  %101 = getelementptr inbounds i16, ptr %98, i64 %100
  %102 = load i16, ptr %101, align 2, !tbaa !11
  %103 = zext i16 %102 to i32
  %104 = load i32, ptr %20, align 4, !tbaa !9
  %105 = zext i32 %104 to i64
  %106 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN6basisu8sym_freqESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %105) #5
  %107 = getelementptr inbounds %"struct.basisu::sym_freq", ptr %106, i32 0, i32 0
  store i32 %103, ptr %107, align 4, !tbaa !15
  %108 = load i32, ptr %19, align 4, !tbaa !9
  %109 = trunc i32 %108 to i16
  %110 = load i32, ptr %20, align 4, !tbaa !9
  %111 = add i32 %110, 1
  store i32 %111, ptr %20, align 4, !tbaa !9
  %112 = zext i32 %110 to i64
  %113 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN6basisu8sym_freqESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %112) #5
  %114 = getelementptr inbounds %"struct.basisu::sym_freq", ptr %113, i32 0, i32 1
  store i16 %109, ptr %114, align 4, !tbaa !17
  br label %115

115:                                              ; preds = %97, %90
  br label %116

116:                                              ; preds = %115
  %117 = load i32, ptr %19, align 4, !tbaa !9
  %118 = add i32 %117, 1
  store i32 %118, ptr %19, align 4, !tbaa !9
  br label %77, !llvm.loop !18

119:                                              ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %120 = load i32, ptr %10, align 4, !tbaa !9
  %121 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN6basisu8sym_freqESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef 0) #5
  %122 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN6basisu8sym_freqESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef 0) #5
  %123 = invoke noundef ptr @_ZN6basisu33canonical_huffman_radix_sort_symsEjPNS_8sym_freqES1_(i32 noundef %120, ptr noundef %121, ptr noundef %122)
          to label %124 unwind label %133

124:                                              ; preds = %119
  store ptr %123, ptr %21, align 8, !tbaa !5
  %125 = load ptr, ptr %21, align 8, !tbaa !5
  %126 = load i32, ptr %10, align 4, !tbaa !9
  call void @_ZN6basisu46canonical_huffman_calculate_minimum_redundancyEPNS_8sym_freqEi(ptr noundef %125, i32 noundef %126)
  call void @llvm.lifetime.start.p0(i64 128, ptr %22) #5
  invoke void @_ZN6basisu9clear_objIA32_iEEvRT_(ptr noundef nonnull align 4 dereferenceable(128) %22)
          to label %127 unwind label %137

127:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %128

128:                                              ; preds = %161, %127
  %129 = load i32, ptr %23, align 4, !tbaa !9
  %130 = load i32, ptr %10, align 4, !tbaa !9
  %131 = icmp ult i32 %129, %130
  br i1 %131, label %141, label %132

132:                                              ; preds = %128
  store i32 8, ptr %12, align 4
  br label %164

133:                                              ; preds = %119
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %15, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %16, align 4
  br label %310

137:                                              ; preds = %177, %175, %171, %166, %124
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %15, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %16, align 4
  br label %309

141:                                              ; preds = %128
  %142 = load ptr, ptr %21, align 8, !tbaa !5
  %143 = load i32, ptr %23, align 4, !tbaa !9
  %144 = zext i32 %143 to i64
  %145 = getelementptr inbounds %"struct.basisu::sym_freq", ptr %142, i64 %144
  %146 = getelementptr inbounds %"struct.basisu::sym_freq", ptr %145, i32 0, i32 0
  %147 = load i32, ptr %146, align 4, !tbaa !15
  %148 = icmp ugt i32 %147, 31
  br i1 %148, label %149, label %150

149:                                              ; preds = %141
  store i1 false, ptr %5, align 1
  store i32 1, ptr %12, align 4
  br label %164

150:                                              ; preds = %141
  %151 = load ptr, ptr %21, align 8, !tbaa !5
  %152 = load i32, ptr %23, align 4, !tbaa !9
  %153 = zext i32 %152 to i64
  %154 = getelementptr inbounds %"struct.basisu::sym_freq", ptr %151, i64 %153
  %155 = getelementptr inbounds %"struct.basisu::sym_freq", ptr %154, i32 0, i32 0
  %156 = load i32, ptr %155, align 4, !tbaa !15
  %157 = zext i32 %156 to i64
  %158 = getelementptr inbounds [32 x i32], ptr %22, i64 0, i64 %157
  %159 = load i32, ptr %158, align 4, !tbaa !9
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %158, align 4, !tbaa !9
  br label %161

161:                                              ; preds = %150
  %162 = load i32, ptr %23, align 4, !tbaa !9
  %163 = add i32 %162, 1
  store i32 %163, ptr %23, align 4, !tbaa !9
  br label %128, !llvm.loop !19

164:                                              ; preds = %149, %132
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  %165 = load i32, ptr %12, align 4
  switch i32 %165, label %308 [
    i32 8, label %166
  ]

166:                                              ; preds = %164
  %167 = getelementptr inbounds [32 x i32], ptr %22, i64 0, i64 0
  %168 = load i32, ptr %10, align 4, !tbaa !9
  %169 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN6basisu39canonical_huffman_enforce_max_code_sizeEPiii(ptr noundef %167, i32 noundef %168, i32 noundef %169)
  %170 = getelementptr inbounds %"class.basisu::huffman_encoding_table", ptr %35, i32 0, i32 1
  invoke void @_ZN6basisu6vectorIhE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16) %170, i64 noundef 0, i1 noundef zeroext false)
          to label %171 unwind label %137

171:                                              ; preds = %166
  %172 = getelementptr inbounds %"class.basisu::huffman_encoding_table", ptr %35, i32 0, i32 1
  %173 = load i32, ptr %7, align 4, !tbaa !9
  %174 = zext i32 %173 to i64
  invoke void @_ZN6basisu6vectorIhE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16) %172, i64 noundef %174, i1 noundef zeroext false)
          to label %175 unwind label %137

175:                                              ; preds = %171
  %176 = getelementptr inbounds %"class.basisu::huffman_encoding_table", ptr %35, i32 0, i32 0
  invoke void @_ZN6basisu6vectorItE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16) %176, i64 noundef 0, i1 noundef zeroext false)
          to label %177 unwind label %137

177:                                              ; preds = %175
  %178 = getelementptr inbounds %"class.basisu::huffman_encoding_table", ptr %35, i32 0, i32 0
  %179 = load i32, ptr %7, align 4, !tbaa !9
  %180 = zext i32 %179 to i64
  invoke void @_ZN6basisu6vectorItE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16) %178, i64 noundef %180, i1 noundef zeroext false)
          to label %181 unwind label %137

181:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 1, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %182 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %182, ptr %25, align 4, !tbaa !9
  br label %183

183:                                              ; preds = %219, %181
  %184 = load i32, ptr %24, align 4, !tbaa !9
  %185 = load i32, ptr %9, align 4, !tbaa !9
  %186 = icmp ule i32 %184, %185
  br i1 %186, label %188, label %187

187:                                              ; preds = %183
  store i32 11, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %222

188:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %189 = load i32, ptr %24, align 4, !tbaa !9
  %190 = zext i32 %189 to i64
  %191 = getelementptr inbounds [32 x i32], ptr %22, i64 0, i64 %190
  %192 = load i32, ptr %191, align 4, !tbaa !9
  store i32 %192, ptr %26, align 4, !tbaa !9
  br label %193

193:                                              ; preds = %211, %188
  %194 = load i32, ptr %26, align 4, !tbaa !9
  %195 = icmp ugt i32 %194, 0
  br i1 %195, label %197, label %196

196:                                              ; preds = %193
  store i32 14, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  br label %218

197:                                              ; preds = %193
  %198 = load i32, ptr %24, align 4, !tbaa !9
  %199 = trunc i32 %198 to i8
  %200 = getelementptr inbounds %"class.basisu::huffman_encoding_table", ptr %35, i32 0, i32 1
  %201 = load ptr, ptr %21, align 8, !tbaa !5
  %202 = load i32, ptr %25, align 4, !tbaa !9
  %203 = add i32 %202, -1
  store i32 %203, ptr %25, align 4, !tbaa !9
  %204 = zext i32 %203 to i64
  %205 = getelementptr inbounds %"struct.basisu::sym_freq", ptr %201, i64 %204
  %206 = getelementptr inbounds %"struct.basisu::sym_freq", ptr %205, i32 0, i32 1
  %207 = load i16, ptr %206, align 4, !tbaa !17
  %208 = zext i16 %207 to i64
  %209 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIhEixEm(ptr noundef nonnull align 8 dereferenceable(16) %200, i64 noundef %208)
          to label %210 unwind label %214

210:                                              ; preds = %197
  store i8 %199, ptr %209, align 1, !tbaa !20
  br label %211

211:                                              ; preds = %210
  %212 = load i32, ptr %26, align 4, !tbaa !9
  %213 = add i32 %212, -1
  store i32 %213, ptr %26, align 4, !tbaa !9
  br label %193, !llvm.loop !21

214:                                              ; preds = %197
  %215 = landingpad { ptr, i32 }
          cleanup
  %216 = extractvalue { ptr, i32 } %215, 0
  store ptr %216, ptr %15, align 8
  %217 = extractvalue { ptr, i32 } %215, 1
  store i32 %217, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %309

218:                                              ; preds = %196
  br label %219

219:                                              ; preds = %218
  %220 = load i32, ptr %24, align 4, !tbaa !9
  %221 = add i32 %220, 1
  store i32 %221, ptr %24, align 4, !tbaa !9
  br label %183, !llvm.loop !22

222:                                              ; preds = %187
  call void @llvm.lifetime.start.p0(i64 128, ptr %27) #5
  %223 = getelementptr inbounds [32 x i32], ptr %27, i64 0, i64 1
  store i32 0, ptr %223, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  store i32 0, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  store i32 2, ptr %29, align 4, !tbaa !9
  br label %224

224:                                              ; preds = %241, %222
  %225 = load i32, ptr %29, align 4, !tbaa !9
  %226 = load i32, ptr %9, align 4, !tbaa !9
  %227 = icmp ule i32 %225, %226
  br i1 %227, label %229, label %228

228:                                              ; preds = %224
  store i32 17, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  br label %244

229:                                              ; preds = %224
  %230 = load i32, ptr %28, align 4, !tbaa !9
  %231 = load i32, ptr %29, align 4, !tbaa !9
  %232 = sub i32 %231, 1
  %233 = zext i32 %232 to i64
  %234 = getelementptr inbounds [32 x i32], ptr %22, i64 0, i64 %233
  %235 = load i32, ptr %234, align 4, !tbaa !9
  %236 = add i32 %230, %235
  %237 = shl i32 %236, 1
  store i32 %237, ptr %28, align 4, !tbaa !9
  %238 = load i32, ptr %29, align 4, !tbaa !9
  %239 = zext i32 %238 to i64
  %240 = getelementptr inbounds [32 x i32], ptr %27, i64 0, i64 %239
  store i32 %237, ptr %240, align 4, !tbaa !9
  br label %241

241:                                              ; preds = %229
  %242 = load i32, ptr %29, align 4, !tbaa !9
  %243 = add i32 %242, 1
  store i32 %243, ptr %29, align 4, !tbaa !9
  br label %224, !llvm.loop !23

244:                                              ; preds = %228
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  store i32 0, ptr %30, align 4, !tbaa !9
  br label %245

245:                                              ; preds = %301, %244
  %246 = load i32, ptr %30, align 4, !tbaa !9
  %247 = load i32, ptr %7, align 4, !tbaa !9
  %248 = icmp ult i32 %246, %247
  br i1 %248, label %250, label %249

249:                                              ; preds = %245
  store i32 20, ptr %12, align 4
  br label %304

250:                                              ; preds = %245
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  store i32 0, ptr %31, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #5
  %251 = getelementptr inbounds %"class.basisu::huffman_encoding_table", ptr %35, i32 0, i32 1
  %252 = load i32, ptr %30, align 4, !tbaa !9
  %253 = zext i32 %252 to i64
  %254 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIhEixEm(ptr noundef nonnull align 8 dereferenceable(16) %251, i64 noundef %253)
          to label %255 unwind label %260

255:                                              ; preds = %250
  %256 = load i8, ptr %254, align 1, !tbaa !20
  %257 = zext i8 %256 to i32
  store i32 %257, ptr %33, align 4, !tbaa !9
  %258 = icmp eq i32 %257, 0
  br i1 %258, label %259, label %264

259:                                              ; preds = %255
  store i32 22, ptr %12, align 4
  br label %298

260:                                              ; preds = %290, %250
  %261 = landingpad { ptr, i32 }
          cleanup
  %262 = extractvalue { ptr, i32 } %261, 0
  store ptr %262, ptr %15, align 8
  %263 = extractvalue { ptr, i32 } %261, 1
  store i32 %263, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr %27) #5
  br label %309

264:                                              ; preds = %255
  %265 = load i32, ptr %33, align 4, !tbaa !9
  %266 = icmp ugt i32 %265, 31
  br i1 %266, label %267, label %268

267:                                              ; preds = %264
  store i1 false, ptr %5, align 1
  store i32 1, ptr %12, align 4
  br label %298

268:                                              ; preds = %264
  %269 = load i32, ptr %33, align 4, !tbaa !9
  %270 = zext i32 %269 to i64
  %271 = getelementptr inbounds [32 x i32], ptr %27, i64 0, i64 %270
  %272 = load i32, ptr %271, align 4, !tbaa !9
  %273 = add i32 %272, 1
  store i32 %273, ptr %271, align 4, !tbaa !9
  store i32 %272, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #5
  %274 = load i32, ptr %33, align 4, !tbaa !9
  store i32 %274, ptr %34, align 4, !tbaa !9
  br label %275

275:                                              ; preds = %285, %268
  %276 = load i32, ptr %34, align 4, !tbaa !9
  %277 = icmp ugt i32 %276, 0
  br i1 %277, label %279, label %278

278:                                              ; preds = %275
  store i32 23, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #5
  br label %290

279:                                              ; preds = %275
  %280 = load i32, ptr %31, align 4, !tbaa !9
  %281 = shl i32 %280, 1
  %282 = load i32, ptr %32, align 4, !tbaa !9
  %283 = and i32 %282, 1
  %284 = or i32 %281, %283
  store i32 %284, ptr %31, align 4, !tbaa !9
  br label %285

285:                                              ; preds = %279
  %286 = load i32, ptr %34, align 4, !tbaa !9
  %287 = add i32 %286, -1
  store i32 %287, ptr %34, align 4, !tbaa !9
  %288 = load i32, ptr %32, align 4, !tbaa !9
  %289 = lshr i32 %288, 1
  store i32 %289, ptr %32, align 4, !tbaa !9
  br label %275, !llvm.loop !24

290:                                              ; preds = %278
  %291 = load i32, ptr %31, align 4, !tbaa !9
  %292 = trunc i32 %291 to i16
  %293 = getelementptr inbounds %"class.basisu::huffman_encoding_table", ptr %35, i32 0, i32 0
  %294 = load i32, ptr %30, align 4, !tbaa !9
  %295 = zext i32 %294 to i64
  %296 = invoke noundef nonnull align 2 dereferenceable(2) ptr @_ZN6basisu6vectorItEixEm(ptr noundef nonnull align 8 dereferenceable(16) %293, i64 noundef %295)
          to label %297 unwind label %260

297:                                              ; preds = %290
  store i16 %292, ptr %296, align 2, !tbaa !11
  store i32 0, ptr %12, align 4
  br label %298

298:                                              ; preds = %297, %267, %259
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  %299 = load i32, ptr %12, align 4
  switch i32 %299, label %304 [
    i32 0, label %300
    i32 22, label %301
  ]

300:                                              ; preds = %298
  br label %301

301:                                              ; preds = %300, %298
  %302 = load i32, ptr %30, align 4, !tbaa !9
  %303 = add i32 %302, 1
  store i32 %303, ptr %30, align 4, !tbaa !9
  br label %245, !llvm.loop !25

304:                                              ; preds = %298, %249
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  %305 = load i32, ptr %12, align 4
  switch i32 %305, label %307 [
    i32 20, label %306
  ]

306:                                              ; preds = %304
  store i1 true, ptr %5, align 1
  store i32 1, ptr %12, align 4
  br label %307

307:                                              ; preds = %306, %304
  call void @llvm.lifetime.end.p0(i64 128, ptr %27) #5
  br label %308

308:                                              ; preds = %307, %164
  call void @llvm.lifetime.end.p0(i64 128, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @_ZNSt6vectorIN6basisu8sym_freqESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #5
  call void @_ZNSt6vectorIN6basisu8sym_freqESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #5
  br label %313

309:                                              ; preds = %260, %214, %137
  call void @llvm.lifetime.end.p0(i64 128, ptr %22) #5
  br label %310

310:                                              ; preds = %309, %133
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @_ZNSt6vectorIN6basisu8sym_freqESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  br label %311

311:                                              ; preds = %310, %86
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #5
  call void @_ZNSt6vectorIN6basisu8sym_freqESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  br label %312

312:                                              ; preds = %311, %82
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %316

313:                                              ; preds = %308, %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %314

314:                                              ; preds = %313, %45, %38
  %315 = load i1, ptr %5, align 1
  ret i1 %315

316:                                              ; preds = %312
  %317 = load ptr, ptr %15, align 8
  %318 = load i32, ptr %16, align 4
  %319 = insertvalue { ptr, i32 } poison, ptr %317, 0
  %320 = insertvalue { ptr, i32 } %319, i32 %318, 1
  resume { ptr, i32 } %320
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN6basisu8sym_freqESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6basisu6vectorItE6resizeEmb(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 nonnull align 2 dereferenceable(2) ptr @_ZN6basisu6vectorItEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #1 align 2

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

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

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

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

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


; 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.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<basisu::sym_freq, std::allocator<basisu::sym_freq>>::_Vector_impl" }
%"struct.std::_Vector_base<basisu::sym_freq, std::allocator<basisu::sym_freq>>::_Vector_impl" = type { %"struct.std::_Vector_base<basisu::sym_freq, std::allocator<basisu::sym_freq>>::_Vector_impl_data" }
%"struct.std::_Vector_base<basisu::sym_freq, std::allocator<basisu::sym_freq>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.13" = type { i8 }
%"struct.basisu::sym_freq" = type { i32, i16 }

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

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

declare i32 @__gxx_personality_v0(...)

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu46canonical_huffman_calculate_minimum_redundancyEPNS_8sym_freqEi(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu39canonical_huffman_enforce_max_code_sizeEPiii(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN6basisu33canonical_huffman_radix_sort_symsEjPNS_8sym_freqES1_(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6basisu22huffman_encoding_table4initEjPKtj(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef %1, ptr nocapture noundef readonly %2, i32 noundef %3) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::vector.11", align 8
  %6 = alloca %"class.std::allocator.13", align 1
  %7 = alloca %"class.std::vector.11", align 8
  %8 = alloca %"class.std::allocator.13", align 1
  %9 = alloca [32 x i32], align 16
  %10 = alloca [32 x i32], align 16
  %11 = icmp ugt i32 %3, 16
  %12 = add i32 %1, -16385
  %or.cond = icmp ult i32 %12, -16384
  %or.cond118 = or i1 %or.cond, %11
  br i1 %or.cond118, label %137, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %4
  %wide.trip.count = zext nneg i32 %1 to i64
  %min.iters.check = icmp ult i32 %1, 8
  br i1 %min.iters.check, label %.lr.ph.preheader191, label %vector.ph

.lr.ph.preheader191:                              ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  %.085123.ph = phi i32 [ 0, %.lr.ph.preheader ], [ %22, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %wide.trip.count, 32760
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %19, %vector.body ]
  %vec.phi188 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %20, %vector.body ]
  %13 = getelementptr inbounds i16, ptr %2, i64 %index
  %14 = getelementptr inbounds i8, ptr %13, i64 8
  %wide.load = load <4 x i16>, ptr %13, align 2, !tbaa !5
  %wide.load189 = load <4 x i16>, ptr %14, align 2, !tbaa !5
  %15 = icmp ne <4 x i16> %wide.load, zeroinitializer
  %16 = icmp ne <4 x i16> %wide.load189, zeroinitializer
  %17 = zext <4 x i1> %15 to <4 x i32>
  %18 = zext <4 x i1> %16 to <4 x i32>
  %19 = add <4 x i32> %vec.phi, %17
  %20 = add <4 x i32> %vec.phi188, %18
  %index.next = add nuw i64 %index, 8
  %21 = icmp eq i64 %index.next, %n.vec
  br i1 %21, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %20, %19
  %22 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader191

._crit_edge:                                      ; preds = %.lr.ph, %middle.block
  %spec.select.lcssa = phi i32 [ %22, %middle.block ], [ %spec.select, %.lr.ph ]
  %.not = icmp eq i32 %spec.select.lcssa, 0
  br i1 %.not, label %137, label %26

.lr.ph:                                           ; preds = %.lr.ph.preheader191, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader191 ]
  %.085123 = phi i32 [ %spec.select, %.lr.ph ], [ %.085123.ph, %.lr.ph.preheader191 ]
  %23 = getelementptr inbounds i16, ptr %2, i64 %indvars.iv
  %24 = load i16, ptr %23, align 2, !tbaa !5
  %.not115 = icmp ne i16 %24, 0
  %25 = zext i1 %.not115 to i32
  %spec.select = add i32 %.085123, %25
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !13

26:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  %27 = zext i32 %spec.select.lcssa to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @_ZNSaIN6basisu8sym_freqEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt6vectorIN6basisu8sym_freqESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %27, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %28 unwind label %32

28:                                               ; preds = %26
  call void @_ZNSt15__new_allocatorIN6basisu8sym_freqEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #6
  call void @_ZNSaIN6basisu8sym_freqEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  invoke void @_ZNSt6vectorIN6basisu8sym_freqESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %27, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %.lr.ph127.preheader unwind label %34

.lr.ph127.preheader:                              ; preds = %28
  call void @_ZNSt15__new_allocatorIN6basisu8sym_freqEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  %wide.trip.count164 = zext nneg i32 %1 to i64
  br label %.lr.ph127

._crit_edge128:                                   ; preds = %46
  %29 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN6basisu8sym_freqESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 0) #6
  %30 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN6basisu8sym_freqESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef 0) #6
  %31 = invoke noundef ptr @_ZN6basisu33canonical_huffman_radix_sort_symsEjPNS_8sym_freqES1_(i32 noundef %spec.select.lcssa, ptr noundef nonnull %29, ptr noundef nonnull %30)
          to label %47 unwind label %48

32:                                               ; preds = %26
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIN6basisu8sym_freqEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  br label %136

34:                                               ; preds = %28
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIN6basisu8sym_freqEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  br label %135

.lr.ph127:                                        ; preds = %.lr.ph127.preheader, %46
  %indvars.iv161 = phi i64 [ 0, %.lr.ph127.preheader ], [ %indvars.iv.next162, %46 ]
  %.087125 = phi i32 [ 0, %.lr.ph127.preheader ], [ %.188, %46 ]
  %36 = getelementptr inbounds i16, ptr %2, i64 %indvars.iv161
  %37 = load i16, ptr %36, align 2, !tbaa !5
  %.not114 = icmp eq i16 %37, 0
  br i1 %.not114, label %46, label %38

38:                                               ; preds = %.lr.ph127
  %39 = zext i16 %37 to i32
  %40 = zext i32 %.087125 to i64
  %41 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN6basisu8sym_freqESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %40) #6
  store i32 %39, ptr %41, align 4, !tbaa !14
  %42 = trunc i64 %indvars.iv161 to i16
  %43 = add i32 %.087125, 1
  %44 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorIN6basisu8sym_freqESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %40) #6
  %45 = getelementptr inbounds i8, ptr %44, i64 4
  store i16 %42, ptr %45, align 4, !tbaa !17
  br label %46

46:                                               ; preds = %.lr.ph127, %38
  %.188 = phi i32 [ %43, %38 ], [ %.087125, %.lr.ph127 ]
  %indvars.iv.next162 = add nuw nsw i64 %indvars.iv161, 1
  %exitcond165.not = icmp eq i64 %indvars.iv.next162, %wide.trip.count164
  br i1 %exitcond165.not, label %._crit_edge128, label %.lr.ph127, !llvm.loop !18

47:                                               ; preds = %._crit_edge128
  call void @_ZN6basisu46canonical_huffman_calculate_minimum_redundancyEPNS_8sym_freqEi(ptr noundef %31, i32 noundef %spec.select.lcssa)
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %9) #6
  call void @_ZN6basisu9clear_objIA32_iEEvRT_(ptr noundef nonnull align 4 dereferenceable(128) %9)
  %umax = call i32 @llvm.umax.i32(i32 %spec.select.lcssa, i32 1)
  %wide.trip.count169 = zext i32 %umax to i64
  br label %52

48:                                               ; preds = %._crit_edge128
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %134

50:                                               ; preds = %65, %64, %62, %.critedge
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %9) #6
  br label %134

52:                                               ; preds = %47, %56
  %indvars.iv166 = phi i64 [ 0, %47 ], [ %indvars.iv.next167, %56 ]
  %53 = getelementptr inbounds %"struct.basisu::sym_freq", ptr %31, i64 %indvars.iv166
  %54 = load i32, ptr %53, align 4, !tbaa !14
  %55 = icmp ugt i32 %54, 31
  br i1 %55, label %.loopexit, label %56

56:                                               ; preds = %52
  %57 = zext nneg i32 %54 to i64
  %58 = getelementptr inbounds [32 x i32], ptr %9, i64 0, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !19
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %58, align 4, !tbaa !19
  %indvars.iv.next167 = add nuw nsw i64 %indvars.iv166, 1
  %exitcond170.not = icmp eq i64 %indvars.iv.next167, %wide.trip.count169
  br i1 %exitcond170.not, label %.critedge, label %52, !llvm.loop !20

.critedge:                                        ; preds = %56
  call void @_ZN6basisu39canonical_huffman_enforce_max_code_sizeEPiii(ptr noundef nonnull %9, i32 noundef %spec.select.lcssa, i32 noundef %3)
  %61 = getelementptr inbounds i8, ptr %0, i64 16
  invoke void @_ZN6basisu6vectorIhE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16) %61, i64 noundef 0, i1 noundef zeroext false)
          to label %62 unwind label %50

62:                                               ; preds = %.critedge
  %63 = zext nneg i32 %1 to i64
  invoke void @_ZN6basisu6vectorIhE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16) %61, i64 noundef %63, i1 noundef zeroext false)
          to label %64 unwind label %50

64:                                               ; preds = %62
  invoke void @_ZN6basisu6vectorItE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16) %0, i64 noundef 0, i1 noundef zeroext false)
          to label %65 unwind label %50

65:                                               ; preds = %64
  invoke void @_ZN6basisu6vectorItE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(16) %0, i64 noundef %63, i1 noundef zeroext false)
          to label %.preheader120 unwind label %50

.preheader120:                                    ; preds = %65
  %.not109137 = icmp eq i32 %3, 0
  br i1 %.not109137, label %._crit_edge141.thread, label %.lr.ph140.preheader

._crit_edge141.thread:                            ; preds = %.preheader120
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %10) #6
  %66 = getelementptr inbounds i8, ptr %10, i64 4
  store i32 0, ptr %66, align 4, !tbaa !19
  br label %.lr.ph153.preheader

.lr.ph140.preheader:                              ; preds = %.preheader120
  %67 = add nuw nsw i32 %3, 1
  %wide.trip.count174 = zext nneg i32 %67 to i64
  br label %.lr.ph140

._crit_edge141:                                   ; preds = %._crit_edge135
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %10) #6
  %68 = getelementptr inbounds i8, ptr %10, i64 4
  store i32 0, ptr %68, align 4, !tbaa !19
  %.not110142 = icmp eq i32 %3, 1
  br i1 %.not110142, label %.lr.ph153.preheader, label %.lr.ph146.preheader

.lr.ph146.preheader:                              ; preds = %._crit_edge141
  %xtraiter = and i64 %wide.trip.count174, 1
  %69 = icmp eq i32 %67, 3
  br i1 %69, label %.lr.ph153.preheader.loopexit.unr-lcssa, label %.lr.ph146.preheader.new

.lr.ph146.preheader.new:                          ; preds = %.lr.ph146.preheader
  %70 = and i64 %wide.trip.count174, 62
  %71 = add nsw i64 %70, -4
  br label %.lr.ph146

.lr.ph140:                                        ; preds = %.lr.ph140.preheader, %._crit_edge135
  %indvars.iv171 = phi i64 [ 1, %.lr.ph140.preheader ], [ %indvars.iv.next172, %._crit_edge135 ]
  %.081139 = phi i32 [ %spec.select.lcssa, %.lr.ph140.preheader ], [ %.182.lcssa, %._crit_edge135 ]
  %72 = getelementptr inbounds [32 x i32], ptr %9, i64 0, i64 %indvars.iv171
  %73 = load i32, ptr %72, align 4, !tbaa !19
  %.not113130 = icmp eq i32 %73, 0
  br i1 %.not113130, label %._crit_edge135, label %.lr.ph134

.lr.ph134:                                        ; preds = %.lr.ph140
  %74 = trunc i64 %indvars.iv171 to i8
  br label %75

._crit_edge135:                                   ; preds = %75, %.lr.ph140
  %.182.lcssa = phi i32 [ %.081139, %.lr.ph140 ], [ %76, %75 ]
  %indvars.iv.next172 = add nuw nsw i64 %indvars.iv171, 1
  %exitcond175.not = icmp eq i64 %indvars.iv.next172, %wide.trip.count174
  br i1 %exitcond175.not, label %._crit_edge141, label %.lr.ph140, !llvm.loop !21

75:                                               ; preds = %.lr.ph134, %75
  %.080132 = phi i32 [ %73, %.lr.ph134 ], [ %82, %75 ]
  %.182131 = phi i32 [ %.081139, %.lr.ph134 ], [ %76, %75 ]
  %76 = add i32 %.182131, -1
  %77 = zext i32 %76 to i64
  %78 = getelementptr inbounds %"struct.basisu::sym_freq", ptr %31, i64 %77, i32 1
  %79 = load i16, ptr %78, align 4, !tbaa !17
  %80 = zext i16 %79 to i64
  %81 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIhEixEm(ptr noundef nonnull align 8 dereferenceable(16) %61, i64 noundef %80)
  store i8 %74, ptr %81, align 1, !tbaa !22
  %82 = add i32 %.080132, -1
  %.not113 = icmp eq i32 %82, 0
  br i1 %.not113, label %._crit_edge135, label %75, !llvm.loop !23

.lr.ph146:                                        ; preds = %.lr.ph146, %.lr.ph146.preheader.new
  %indvars.iv176 = phi i64 [ 2, %.lr.ph146.preheader.new ], [ %indvars.iv.next177.1, %.lr.ph146 ]
  %.079143 = phi i32 [ 0, %.lr.ph146.preheader.new ], [ %92, %.lr.ph146 ]
  %niter = phi i64 [ 0, %.lr.ph146.preheader.new ], [ %niter.next.1, %.lr.ph146 ]
  %83 = add nsw i64 %indvars.iv176, -1
  %84 = getelementptr inbounds [32 x i32], ptr %9, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !19
  %86 = add i32 %85, %.079143
  %87 = shl i32 %86, 1
  %88 = getelementptr inbounds [32 x i32], ptr %10, i64 0, i64 %indvars.iv176
  store i32 %87, ptr %88, align 8, !tbaa !19
  %indvars.iv.next177 = or disjoint i64 %indvars.iv176, 1
  %89 = getelementptr inbounds [32 x i32], ptr %9, i64 0, i64 %indvars.iv176
  %90 = load i32, ptr %89, align 8, !tbaa !19
  %91 = add i32 %90, %87
  %92 = shl i32 %91, 1
  %93 = getelementptr inbounds [32 x i32], ptr %10, i64 0, i64 %indvars.iv.next177
  store i32 %92, ptr %93, align 4, !tbaa !19
  %indvars.iv.next177.1 = add nuw nsw i64 %indvars.iv176, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter, %71
  br i1 %niter.ncmp.1, label %.lr.ph153.preheader.loopexit.unr-lcssa, label %.lr.ph146, !llvm.loop !24

.lr.ph153.preheader.loopexit.unr-lcssa:           ; preds = %.lr.ph146, %.lr.ph146.preheader
  %indvars.iv176.unr = phi i64 [ 2, %.lr.ph146.preheader ], [ %indvars.iv.next177.1, %.lr.ph146 ]
  %.079143.unr = phi i32 [ 0, %.lr.ph146.preheader ], [ %92, %.lr.ph146 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph153.preheader, label %.lr.ph146.epil

.lr.ph146.epil:                                   ; preds = %.lr.ph153.preheader.loopexit.unr-lcssa
  %94 = add nsw i64 %indvars.iv176.unr, -1
  %95 = getelementptr inbounds [32 x i32], ptr %9, i64 0, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !19
  %97 = add i32 %96, %.079143.unr
  %98 = shl i32 %97, 1
  %99 = getelementptr inbounds [32 x i32], ptr %10, i64 0, i64 %indvars.iv176.unr
  store i32 %98, ptr %99, align 4, !tbaa !19
  br label %.lr.ph153.preheader

.lr.ph153.preheader:                              ; preds = %.lr.ph146.epil, %.lr.ph153.preheader.loopexit.unr-lcssa, %._crit_edge141, %._crit_edge141.thread
  br label %.lr.ph153

.lr.ph153:                                        ; preds = %.lr.ph153.preheader, %133
  %indvars.iv181 = phi i64 [ %indvars.iv.next182, %133 ], [ 0, %.lr.ph153.preheader ]
  %.not112152 = phi i1 [ %.not112, %133 ], [ false, %.lr.ph153.preheader ]
  %100 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6basisu6vectorIhEixEm(ptr noundef nonnull align 8 dereferenceable(16) %61, i64 noundef %indvars.iv181)
  %101 = load i8, ptr %100, align 1, !tbaa !22
  %102 = zext i8 %101 to i32
  %103 = icmp eq i8 %101, 0
  br i1 %103, label %133, label %104

104:                                              ; preds = %.lr.ph153
  %105 = icmp ugt i8 %101, 31
  br i1 %105, label %.critedge117, label %106

106:                                              ; preds = %104
  %107 = zext nneg i8 %101 to i64
  %108 = getelementptr inbounds [32 x i32], ptr %10, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !19
  %110 = add i32 %109, 1
  store i32 %110, ptr %108, align 4, !tbaa !19
  %xtraiter195 = and i32 %102, 3
  %111 = icmp ult i8 %101, 4
  br i1 %111, label %.unr-lcssa, label %.new

.new:                                             ; preds = %106
  %unroll_iter198 = and i32 %102, 28
  br label %118

.unr-lcssa:                                       ; preds = %118, %106
  %.lcssa.ph = phi i32 [ poison, %106 ], [ %131, %118 ]
  %.075148.unr = phi i32 [ %109, %106 ], [ %132, %118 ]
  %.076147.unr = phi i32 [ 0, %106 ], [ %131, %118 ]
  %lcmp.mod196.not = icmp eq i32 %xtraiter195, 0
  br i1 %lcmp.mod196.not, label %.epilog-lcssa, label %.epil.preheader

.epil.preheader:                                  ; preds = %.unr-lcssa, %.epil.preheader
  %.075148.epil = phi i32 [ %115, %.epil.preheader ], [ %.075148.unr, %.unr-lcssa ]
  %.076147.epil = phi i32 [ %114, %.epil.preheader ], [ %.076147.unr, %.unr-lcssa ]
  %epil.iter = phi i32 [ %epil.iter.next, %.epil.preheader ], [ 0, %.unr-lcssa ]
  %112 = shl i32 %.076147.epil, 1
  %113 = and i32 %.075148.epil, 1
  %114 = or disjoint i32 %113, %112
  %115 = lshr i32 %.075148.epil, 1
  %epil.iter.next = add i32 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i32 %epil.iter.next, %xtraiter195
  br i1 %epil.iter.cmp.not, label %.epilog-lcssa, label %.epil.preheader, !llvm.loop !25

.epilog-lcssa:                                    ; preds = %.epil.preheader, %.unr-lcssa
  %.lcssa = phi i32 [ %.lcssa.ph, %.unr-lcssa ], [ %114, %.epil.preheader ]
  %116 = trunc i32 %.lcssa to i16
  %117 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZN6basisu6vectorItEixEm(ptr noundef nonnull align 8 dereferenceable(16) %0, i64 noundef %indvars.iv181)
  store i16 %116, ptr %117, align 2, !tbaa !5
  br label %133

118:                                              ; preds = %118, %.new
  %.075148 = phi i32 [ %109, %.new ], [ %132, %118 ]
  %.076147 = phi i32 [ 0, %.new ], [ %131, %118 ]
  %niter199 = phi i32 [ 0, %.new ], [ %niter199.next.3, %118 ]
  %119 = shl i32 %.076147, 3
  %120 = shl i32 %.075148, 2
  %121 = and i32 %120, 4
  %122 = or disjoint i32 %119, %121
  %123 = and i32 %.075148, 2
  %124 = or disjoint i32 %123, %122
  %125 = lshr i32 %.075148, 2
  %126 = and i32 %125, 1
  %127 = or disjoint i32 %126, %124
  %128 = lshr i32 %.075148, 3
  %129 = shl i32 %127, 1
  %130 = and i32 %128, 1
  %131 = or disjoint i32 %130, %129
  %132 = lshr i32 %.075148, 4
  %niter199.next.3 = add i32 %niter199, 4
  %niter199.ncmp.3 = icmp eq i32 %niter199.next.3, %unroll_iter198
  br i1 %niter199.ncmp.3, label %.unr-lcssa, label %118, !llvm.loop !27

133:                                              ; preds = %.epilog-lcssa, %.lr.ph153
  %indvars.iv.next182 = add nuw nsw i64 %indvars.iv181, 1
  %.not112 = icmp uge i64 %indvars.iv.next182, %63
  %exitcond184 = icmp eq i64 %indvars.iv.next182, %63
  br i1 %exitcond184, label %.critedge117, label %.lr.ph153, !llvm.loop !28

.critedge117:                                     ; preds = %133, %104
  %.not112.lcssa.ph = phi i1 [ %.not112, %133 ], [ %.not112152, %104 ]
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %10) #6
  br label %.loopexit

.loopexit:                                        ; preds = %52, %.critedge117
  %.5 = phi i1 [ %.not112.lcssa.ph, %.critedge117 ], [ false, %52 ]
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %9) #6
  call void @_ZNSt6vectorIN6basisu8sym_freqESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @_ZNSt6vectorIN6basisu8sym_freqESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  br label %137

134:                                              ; preds = %50, %48
  %.pn = phi { ptr, i32 } [ %51, %50 ], [ %49, %48 ]
  call void @_ZNSt6vectorIN6basisu8sym_freqESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  br label %135

135:                                              ; preds = %134, %34
  %.pn.pn = phi { ptr, i32 } [ %.pn, %134 ], [ %35, %34 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @_ZNSt6vectorIN6basisu8sym_freqESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  br label %136

136:                                              ; preds = %135, %32
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %135 ], [ %33, %32 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  resume { ptr, i32 } %.pn.pn.pn

137:                                              ; preds = %.loopexit, %._crit_edge, %4
  %.7 = phi i1 [ false, %4 ], [ %.5, %.loopexit ], [ false, %._crit_edge ]
  ret i1 %.7
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu9clear_objIA32_iEEvRT_(ptr noundef nonnull align 4 dereferenceable(128)) local_unnamed_addr #1

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"short", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10, !12, !11}
!14 = !{!15, !16, i64 0}
!15 = !{!"_ZTSN6basisu8sym_freqE", !16, i64 0, !6, i64 4}
!16 = !{!"int", !7, i64 0}
!17 = !{!15, !6, i64 4}
!18 = distinct !{!18, !10}
!19 = !{!16, !16, i64 0}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = !{!7, !7, i64 0}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.unroll.disable"}
!27 = distinct !{!27, !10}
!28 = distinct !{!28, !10}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass