; 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.std::unordered_set" = type { %"class.std::_Hashtable.54" }
%"class.std::_Hashtable.54" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.basisu::vector.18" = type { ptr, i32, i32 }
%"struct.basisu::basisu_frontend::subblock_endpoint_quant_err" = type { i64, i32, i32, i32, i32 }
%"struct.std::pair.67" = type <{ %"struct.std::__detail::_Node_iterator.69", i8, [7 x i8] }>
%"struct.std::__detail::_Node_iterator.69" = type { %"struct.std::__detail::_Node_iterator_base.70" }
%"struct.std::__detail::_Node_iterator_base.70" = type { 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.8" = type { ptr, i32, i32 }
%"class.basisu::vector.6" = type { ptr, i32, i32 }
%"class.basisu::vector.14" = type { ptr, i32, i32 }
%"class.basisu::vector.16" = 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.4 = external hidden unnamed_addr constant [115 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [67 x i8], align 1
@__PRETTY_FUNCTION__._ZN6basisu15basisu_frontend31introduce_new_endpoint_clustersEv = external hidden unnamed_addr constant [64 x i8], align 1

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6basisu15basisu_frontend31introduce_new_endpoint_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %0) #5 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 %"class.std::unordered_set", align 8
  %7 = alloca %"class.basisu::vector.18", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::unordered_set", align 8
  %12 = alloca %"struct.basisu::basisu_frontend::subblock_endpoint_quant_err", align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::pair.67", align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"struct.std::pair.67", align 8
  %19 = alloca %"struct.std::pair.67", align 8
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca %"class.basisu::vector.18", align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %25 = load ptr, ptr %2, align 8
  call void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef @.str.29)
  call void @_ZN6basisu15basisu_frontend32generate_block_endpoint_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %25)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  %26 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %25, i32 0, i32 0
  %27 = getelementptr inbounds %"struct.basisu::basisu_frontend::params", ptr %26, i32 0, i32 2
  %28 = load i32, ptr %27, align 8, !tbaa !9
  %29 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %25, i32 0, i32 13
  %30 = call noundef i32 @_ZNK6basisu6vectorINS0_IjEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %29)
  %31 = sub i32 %28, %30
  store i32 %31, ptr %3, align 4, !tbaa !31
  %32 = load i32, ptr %3, align 4, !tbaa !31
  %33 = icmp sle i32 %32, 0
  br i1 %33, label %34, label %35

34:                                               ; preds = %1
  store i32 1, ptr %4, align 4
  br label %296

35:                                               ; preds = %1
  call void @_ZN6basisu15basisu_frontend35compute_endpoint_subblock_error_vecEv(ptr noundef nonnull align 8 dereferenceable(496) %25)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  %36 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %25, i32 0, i32 13
  %37 = call noundef i32 @_ZNK6basisu6vectorINS0_IjEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %36)
  store i32 %37, ptr %5, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 56, ptr %6) #8
  call void @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #8
  %38 = load i32, ptr %5, align 4, !tbaa !31
  %39 = zext i32 %38 to i64
  invoke void @_ZN6basisu6vectorIjEC2Em(ptr noundef nonnull align 8 dereferenceable(16) %7, i64 noundef %39)
          to label %40 unwind label %46

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

41:                                               ; preds = %62, %40
  %42 = load i32, ptr %10, align 4, !tbaa !31
  %43 = load i32, ptr %5, align 4, !tbaa !31
  %44 = icmp ult i32 %42, %43
  br i1 %44, label %50, label %45

45:                                               ; preds = %41
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %69

46:                                               ; preds = %35
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %8, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %9, align 4
  br label %301

50:                                               ; preds = %41
  %51 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %25, i32 0, i32 13
  %52 = load i32, ptr %10, align 4, !tbaa !31
  %53 = zext i32 %52 to i64
  %54 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %51, i64 noundef %53)
          to label %55 unwind label %65

55:                                               ; preds = %50
  %56 = invoke noundef i32 @_ZNK6basisu6vectorIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %54)
          to label %57 unwind label %65

57:                                               ; preds = %55
  %58 = load i32, ptr %10, align 4, !tbaa !31
  %59 = zext i32 %58 to i64
  %60 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %7, i64 noundef %59)
          to label %61 unwind label %65

61:                                               ; preds = %57
  store i32 %56, ptr %60, align 4, !tbaa !31
  br label %62

62:                                               ; preds = %61
  %63 = load i32, ptr %10, align 4, !tbaa !31
  %64 = add i32 %63, 1
  store i32 %64, ptr %10, align 4, !tbaa !31
  br label %41, !llvm.loop !32

65:                                               ; preds = %57, %55, %50
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %8, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %300

69:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 56, ptr %11) #8
  call void @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #8
  br label %70

70:                                               ; preds = %209, %207, %69
  %71 = load i32, ptr %3, align 4, !tbaa !31
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %73, label %212

73:                                               ; preds = %70
  %74 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %25, i32 0, i32 27
  %75 = invoke noundef i32 @_ZNK6basisu6vectorINS_15basisu_frontend27subblock_endpoint_quant_errEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %74)
          to label %76 unwind label %79

76:                                               ; preds = %73
  %77 = icmp eq i32 %75, 0
  br i1 %77, label %78, label %83

78:                                               ; preds = %76
  br label %212

79:                                               ; preds = %294, %73
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %8, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %9, align 4
  br label %299

83:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #8
  %84 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %25, i32 0, i32 27
  %85 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN6basisu6vectorINS_15basisu_frontend27subblock_endpoint_quant_errEE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %84)
          to label %86 unwind label %93

86:                                               ; preds = %83
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %85, i64 24, i1 false), !tbaa.struct !34
  %87 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %25, i32 0, i32 27
  invoke void @_ZN6basisu6vectorINS_15basisu_frontend27subblock_endpoint_quant_errEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(16) %87)
          to label %88 unwind label %93

88:                                               ; preds = %86
  %89 = getelementptr inbounds %"struct.basisu::basisu_frontend::subblock_endpoint_quant_err", ptr %12, i32 0, i32 1
  %90 = invoke noundef zeroext i1 @_ZN6basisu22unordered_set_containsISt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEEjEEbRT_RKT0_(ptr noundef nonnull align 8 dereferenceable(56) %11, ptr noundef nonnull align 4 dereferenceable(4) %89)
          to label %91 unwind label %93

91:                                               ; preds = %88
  br i1 %90, label %92, label %97

92:                                               ; preds = %91
  store i32 5, ptr %4, align 4
  br label %207, !llvm.loop !37

93:                                               ; preds = %88, %86, %83
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %8, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %9, align 4
  br label %211

97:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %98 = getelementptr inbounds %"struct.basisu::basisu_frontend::subblock_endpoint_quant_err", ptr %12, i32 0, i32 3
  %99 = load i32, ptr %98, align 8, !tbaa !38
  %100 = mul i32 %99, 2
  %101 = getelementptr inbounds %"struct.basisu::basisu_frontend::subblock_endpoint_quant_err", ptr %12, i32 0, i32 4
  %102 = load i32, ptr %101, align 4, !tbaa !40
  %103 = add i32 %100, %102
  store i32 %103, ptr %13, align 4, !tbaa !31
  %104 = getelementptr inbounds %"struct.basisu::basisu_frontend::subblock_endpoint_quant_err", ptr %12, i32 0, i32 1
  %105 = load i32, ptr %104, align 8, !tbaa !41
  %106 = zext i32 %105 to i64
  %107 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %7, i64 noundef %106)
          to label %108 unwind label %112

108:                                              ; preds = %97
  %109 = load i32, ptr %107, align 4, !tbaa !31
  %110 = icmp ule i32 %109, 2
  br i1 %110, label %111, label %116

111:                                              ; preds = %108
  store i32 5, ptr %4, align 4
  br label %206, !llvm.loop !37

112:                                              ; preds = %194, %189, %177, %169, %150, %148, %140, %137, %134, %133, %130, %116, %97
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %8, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %9, align 4
  br label %210

116:                                              ; preds = %108
  %117 = invoke noundef zeroext i1 @_ZN6basisu22unordered_set_containsISt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEEjEEbRT_RKT0_(ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %118 unwind label %112

118:                                              ; preds = %116
  br i1 %117, label %119, label %120

119:                                              ; preds = %118
  store i32 5, ptr %4, align 4
  br label %206, !llvm.loop !37

120:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %121 = load i32, ptr %13, align 4, !tbaa !31
  %122 = xor i32 %121, 1
  store i32 %122, ptr %14, align 4, !tbaa !31
  %123 = invoke noundef zeroext i1 @_ZN6basisu22unordered_set_containsISt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEEjEEbRT_RKT0_(ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %124 unwind label %126

124:                                              ; preds = %120
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br i1 %123, label %125, label %130

125:                                              ; preds = %124
  store i32 5, ptr %4, align 4
  br label %206, !llvm.loop !37

126:                                              ; preds = %120
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %8, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %210

130:                                              ; preds = %124
  %131 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %25, i32 0, i32 13
  %132 = invoke noundef ptr @_ZN6basisu14enlarge_vectorINS_6vectorINS1_IjEEEEEEPNT_10value_typeERS4_m(ptr noundef nonnull align 8 dereferenceable(16) %131, i64 noundef 1)
          to label %133 unwind label %112

133:                                              ; preds = %130
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %132, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %134 unwind label %112

134:                                              ; preds = %133
  %135 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %25, i32 0, i32 17
  %136 = invoke noundef ptr @_ZN6basisu14enlarge_vectorINS_6vectorINS_15basisu_frontend27endpoint_cluster_etc_paramsEEEEEPNT_10value_typeERS5_m(ptr noundef nonnull align 8 dereferenceable(16) %135, i64 noundef 1)
          to label %137 unwind label %112

137:                                              ; preds = %134
  %138 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %25, i32 0, i32 13
  %139 = invoke noundef i32 @_ZNK6basisu6vectorINS0_IjEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %138)
          to label %140 unwind label %112

140:                                              ; preds = %137
  %141 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %25, i32 0, i32 17
  %142 = invoke noundef i32 @_ZNK6basisu6vectorINS_15basisu_frontend27endpoint_cluster_etc_paramsEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %141)
          to label %143 unwind label %112

143:                                              ; preds = %140
  %144 = icmp eq i32 %139, %142
  br i1 %144, label %145, label %146

145:                                              ; preds = %143
  br label %148

146:                                              ; preds = %143
  call void @__assert_fail(ptr noundef @.str.30, ptr noundef @.str.4, i32 noundef 1165, ptr noundef @__PRETTY_FUNCTION__._ZN6basisu15basisu_frontend31introduce_new_endpoint_clustersEv) #9
  unreachable

147:                                              ; No predecessors!
  br label %148

148:                                              ; preds = %147, %145
  %149 = invoke { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertERKj(ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %150 unwind label %112

150:                                              ; preds = %148
  %151 = getelementptr inbounds { ptr, i8 }, ptr %15, i32 0, i32 0
  %152 = extractvalue { ptr, i8 } %149, 0
  store ptr %152, ptr %151, align 8
  %153 = getelementptr inbounds { ptr, i8 }, ptr %15, i32 0, i32 1
  %154 = extractvalue { ptr, i8 } %149, 1
  store i8 %154, ptr %153, align 8
  %155 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %25, i32 0, i32 13
  %156 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %155)
          to label %157 unwind label %112

157:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %158 = load i32, ptr %13, align 4, !tbaa !31
  %159 = xor i32 %158, 1
  store i32 %159, ptr %16, align 4, !tbaa !31
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %156, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %160 unwind label %179

160:                                              ; preds = %157
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %161 = load i32, ptr %13, align 4, !tbaa !31
  %162 = xor i32 %161, 1
  store i32 %162, ptr %17, align 4, !tbaa !31
  %163 = invoke { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertEOj(ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %164 unwind label %183

164:                                              ; preds = %160
  %165 = getelementptr inbounds { ptr, i8 }, ptr %18, i32 0, i32 0
  %166 = extractvalue { ptr, i8 } %163, 0
  store ptr %166, ptr %165, align 8
  %167 = getelementptr inbounds { ptr, i8 }, ptr %18, i32 0, i32 1
  %168 = extractvalue { ptr, i8 } %163, 1
  store i8 %168, ptr %167, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %169

169:                                              ; preds = %164
  %170 = getelementptr inbounds %"struct.basisu::basisu_frontend::subblock_endpoint_quant_err", ptr %12, i32 0, i32 1
  %171 = load i32, ptr %170, align 8, !tbaa !41
  %172 = zext i32 %171 to i64
  %173 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %7, i64 noundef %172)
          to label %174 unwind label %112

174:                                              ; preds = %169
  %175 = load i32, ptr %173, align 4, !tbaa !31
  %176 = icmp uge i32 %175, 2
  br i1 %176, label %187, label %177

177:                                              ; preds = %174
  invoke void @_ZN6basisuL21handle_verify_failureEi(i32 noundef 1172)
          to label %178 unwind label %112

178:                                              ; preds = %177
  br label %187

179:                                              ; preds = %157
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %8, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %210

183:                                              ; preds = %160
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %8, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %210

187:                                              ; preds = %178, %174
  br label %188

188:                                              ; preds = %187
  br label %189

189:                                              ; preds = %188
  %190 = getelementptr inbounds %"struct.basisu::basisu_frontend::subblock_endpoint_quant_err", ptr %12, i32 0, i32 1
  %191 = load i32, ptr %190, align 8, !tbaa !41
  %192 = zext i32 %191 to i64
  %193 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %7, i64 noundef %192)
          to label %194 unwind label %112

194:                                              ; preds = %189
  %195 = load i32, ptr %193, align 4, !tbaa !31
  %196 = sub i32 %195, 2
  store i32 %196, ptr %193, align 4, !tbaa !31
  %197 = getelementptr inbounds %"struct.basisu::basisu_frontend::subblock_endpoint_quant_err", ptr %12, i32 0, i32 1
  %198 = invoke { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertERKj(ptr noundef nonnull align 8 dereferenceable(56) %11, ptr noundef nonnull align 4 dereferenceable(4) %197)
          to label %199 unwind label %112

199:                                              ; preds = %194
  %200 = getelementptr inbounds { ptr, i8 }, ptr %19, i32 0, i32 0
  %201 = extractvalue { ptr, i8 } %198, 0
  store ptr %201, ptr %200, align 8
  %202 = getelementptr inbounds { ptr, i8 }, ptr %19, i32 0, i32 1
  %203 = extractvalue { ptr, i8 } %198, 1
  store i8 %203, ptr %202, align 8
  %204 = load i32, ptr %3, align 4, !tbaa !31
  %205 = add nsw i32 %204, -1
  store i32 %205, ptr %3, align 4, !tbaa !31
  store i32 0, ptr %4, align 4
  br label %206

206:                                              ; preds = %199, %125, %119, %111
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %207

207:                                              ; preds = %206, %92
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #8
  %208 = load i32, ptr %4, align 4
  switch i32 %208, label %307 [
    i32 0, label %209
    i32 5, label %70
  ]

209:                                              ; preds = %207
  br label %70, !llvm.loop !37

210:                                              ; preds = %183, %179, %126, %112
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %211

211:                                              ; preds = %210, %93
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #8
  br label %299

212:                                              ; preds = %78, %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store i32 0, ptr %20, align 4, !tbaa !31
  br label %213

213:                                              ; preds = %288, %212
  %214 = load i32, ptr %20, align 4, !tbaa !31
  %215 = load i32, ptr %5, align 4, !tbaa !31
  %216 = icmp ult i32 %214, %215
  br i1 %216, label %218, label %217

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

218:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %219 = getelementptr inbounds %"class.basisu::basisu_frontend", ptr %25, i32 0, i32 13
  %220 = load i32, ptr %20, align 4, !tbaa !31
  %221 = zext i32 %220 to i64
  %222 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %219, i64 noundef %221)
          to label %223 unwind label %232

223:                                              ; preds = %218
  store ptr %222, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #8
  invoke void @_ZN6basisu6vectorIjEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22)
          to label %224 unwind label %236

224:                                              ; preds = %223
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 0, ptr %23, align 4, !tbaa !31
  br label %225

225:                                              ; preds = %260, %224
  %226 = load i32, ptr %23, align 4, !tbaa !31
  %227 = load ptr, ptr %21, align 8, !tbaa !5
  %228 = invoke noundef i32 @_ZNK6basisu6vectorIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %227)
          to label %229 unwind label %240

229:                                              ; preds = %225
  %230 = icmp ult i32 %226, %228
  br i1 %230, label %244, label %231

231:                                              ; preds = %229
  store i32 12, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %264

232:                                              ; preds = %218
  %233 = landingpad { ptr, i32 }
          cleanup
  %234 = extractvalue { ptr, i32 } %233, 0
  store ptr %234, ptr %8, align 8
  %235 = extractvalue { ptr, i32 } %233, 1
  store i32 %235, ptr %9, align 4
  br label %293

236:                                              ; preds = %223
  %237 = landingpad { ptr, i32 }
          cleanup
  %238 = extractvalue { ptr, i32 } %237, 0
  store ptr %238, ptr %8, align 8
  %239 = extractvalue { ptr, i32 } %237, 1
  store i32 %239, ptr %9, align 4
  br label %292

240:                                              ; preds = %225
  %241 = landingpad { ptr, i32 }
          cleanup
  %242 = extractvalue { ptr, i32 } %241, 0
  store ptr %242, ptr %8, align 8
  %243 = extractvalue { ptr, i32 } %241, 1
  store i32 %243, ptr %9, align 4
  br label %263

244:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  %245 = load ptr, ptr %21, align 8, !tbaa !5
  %246 = load i32, ptr %23, align 4, !tbaa !31
  %247 = zext i32 %246 to i64
  %248 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %245, i64 noundef %247)
          to label %249 unwind label %255

249:                                              ; preds = %244
  %250 = load i32, ptr %248, align 4, !tbaa !31
  store i32 %250, ptr %24, align 4, !tbaa !31
  %251 = invoke noundef zeroext i1 @_ZN6basisu22unordered_set_containsISt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEEjEEbRT_RKT0_(ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %252 unwind label %255

252:                                              ; preds = %249
  br i1 %251, label %259, label %253

253:                                              ; preds = %252
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %254 unwind label %255

254:                                              ; preds = %253
  br label %259

255:                                              ; preds = %253, %249, %244
  %256 = landingpad { ptr, i32 }
          cleanup
  %257 = extractvalue { ptr, i32 } %256, 0
  store ptr %257, ptr %8, align 8
  %258 = extractvalue { ptr, i32 } %256, 1
  store i32 %258, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %263

259:                                              ; preds = %254, %252
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %260

260:                                              ; preds = %259
  %261 = load i32, ptr %23, align 4, !tbaa !31
  %262 = add i32 %261, 1
  store i32 %262, ptr %23, align 4, !tbaa !31
  br label %225, !llvm.loop !42

263:                                              ; preds = %255, %240
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %291

264:                                              ; preds = %231
  %265 = load ptr, ptr %21, align 8, !tbaa !5
  %266 = invoke noundef i32 @_ZNK6basisu6vectorIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %265)
          to label %267 unwind label %278

267:                                              ; preds = %264
  %268 = invoke noundef i32 @_ZNK6basisu6vectorIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %22)
          to label %269 unwind label %278

269:                                              ; preds = %267
  %270 = icmp ne i32 %266, %268
  br i1 %270, label %271, label %287

271:                                              ; preds = %269
  br label %272

272:                                              ; preds = %271
  %273 = invoke noundef i32 @_ZNK6basisu6vectorIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %22)
          to label %274 unwind label %278

274:                                              ; preds = %272
  %275 = icmp ugt i32 %273, 0
  br i1 %275, label %282, label %276

276:                                              ; preds = %274
  invoke void @_ZN6basisuL21handle_verify_failureEi(i32 noundef 1195)
          to label %277 unwind label %278

277:                                              ; preds = %276
  br label %282

278:                                              ; preds = %284, %276, %272, %267, %264
  %279 = landingpad { ptr, i32 }
          cleanup
  %280 = extractvalue { ptr, i32 } %279, 0
  store ptr %280, ptr %8, align 8
  %281 = extractvalue { ptr, i32 } %279, 1
  store i32 %281, ptr %9, align 4
  br label %291

282:                                              ; preds = %277, %274
  br label %283

283:                                              ; preds = %282
  br label %284

284:                                              ; preds = %283
  %285 = load ptr, ptr %21, align 8, !tbaa !5
  invoke void @_ZN6basisu6vectorIjE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(16) %285, ptr noundef nonnull align 8 dereferenceable(16) %22)
          to label %286 unwind label %278

286:                                              ; preds = %284
  br label %287

287:                                              ; preds = %286, %269
  call void @_ZN6basisu6vectorIjED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %288

288:                                              ; preds = %287
  %289 = load i32, ptr %20, align 4, !tbaa !31
  %290 = add i32 %289, 1
  store i32 %290, ptr %20, align 4, !tbaa !31
  br label %213, !llvm.loop !43

291:                                              ; preds = %278, %263
  call void @_ZN6basisu6vectorIjED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #8
  br label %292

292:                                              ; preds = %291, %236
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #8
  br label %293

293:                                              ; preds = %292, %232
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %299

294:                                              ; preds = %217
  invoke void @_ZN6basisu15basisu_frontend32generate_block_endpoint_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %25)
          to label %295 unwind label %79

295:                                              ; preds = %294
  call void @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %11) #8
  call void @_ZN6basisu6vectorIjED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #8
  call void @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  store i32 0, ptr %4, align 4
  br label %296

296:                                              ; preds = %295, %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  %297 = load i32, ptr %4, align 4
  switch i32 %297, label %307 [
    i32 0, label %298
    i32 1, label %298
  ]

298:                                              ; preds = %296, %296
  ret void

299:                                              ; preds = %293, %211, %79
  call void @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %11) #8
  br label %300

300:                                              ; preds = %299, %65
  call void @_ZN6basisu6vectorIjED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #8
  br label %301

301:                                              ; preds = %300, %46
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #8
  call void @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %302

302:                                              ; preds = %301
  %303 = load ptr, ptr %8, align 8
  %304 = load i32, ptr %9, align 4
  %305 = insertvalue { ptr, i32 } poison, ptr %303, 0
  %306 = insertvalue { ptr, i32 } %305, i32 %304, 1
  resume { ptr, i32 } %306

307:                                              ; preds = %296, %207
  unreachable
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu15basisu_frontend32generate_block_endpoint_clustersEv(ptr noundef nonnull align 8 dereferenceable(496)) #5 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6basisu15basisu_frontend35compute_endpoint_subblock_error_vecEv(ptr noundef nonnull align 8 dereferenceable(496)) #5 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN6basisu6vectorINS_15basisu_frontend27subblock_endpoint_quant_errEE4backEv(ptr noundef nonnull align 8 dereferenceable(16)) #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6basisu22unordered_set_containsISt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEEjEEbRT_RKT0_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN6basisu14enlarge_vectorINS_6vectorINS1_IjEEEEEEPNT_10value_typeERS4_m(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN6basisu14enlarge_vectorINS_6vectorINS_15basisu_frontend27endpoint_cluster_etc_paramsEEEEEPNT_10value_typeERS5_m(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #6

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertERKj(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) #5 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertEOj(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) #5 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #4 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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress 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 #8 = { nounwind }
attributes #9 = { noreturn nounwind }

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

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


; 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::unordered_set" = type { %"class.std::_Hashtable.54" }
%"class.std::_Hashtable.54" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.basisu::vector.18" = type { ptr, i32, i32 }
%"struct.basisu::basisu_frontend::subblock_endpoint_quant_err" = type { i64, i32, i32, i32, i32 }

@.str.4 = external hidden unnamed_addr constant [115 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [67 x i8], align 1
@__PRETTY_FUNCTION__._ZN6basisu15basisu_frontend31introduce_new_endpoint_clustersEv = external hidden unnamed_addr constant [64 x i8], align 1

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6basisu15basisu_frontend31introduce_new_endpoint_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %0) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::unordered_set", align 8
  %3 = alloca %"class.basisu::vector.18", align 8
  %4 = alloca %"class.std::unordered_set", align 8
  %5 = alloca %"struct.basisu::basisu_frontend::subblock_endpoint_quant_err", align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.basisu::vector.18", align 8
  %11 = alloca i32, align 4
  tail call void (ptr, ...) @_ZN6basisu12debug_printfEPKcz(ptr noundef nonnull @.str.29)
  tail call void @_ZN6basisu15basisu_frontend32generate_block_endpoint_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %0)
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  %13 = load i32, ptr %12, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %0, i64 216
  %15 = tail call noundef i32 @_ZNK6basisu6vectorINS0_IjEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %14)
  %16 = sub i32 %13, %15
  %17 = icmp slt i32 %16, 1
  br i1 %17, label %131, label %18

18:                                               ; preds = %1
  tail call void @_ZN6basisu15basisu_frontend35compute_endpoint_subblock_error_vecEv(ptr noundef nonnull align 8 dereferenceable(496) %0)
  %19 = tail call noundef i32 @_ZNK6basisu6vectorINS0_IjEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %14)
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %2) #8
  call void @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #8
  %20 = zext i32 %19 to i64
  invoke void @_ZN6basisu6vectorIjEC2Em(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %20)
          to label %.preheader unwind label %26

.preheader:                                       ; preds = %18
  %.not55 = icmp eq i32 %19, 0
  br i1 %.not55, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %4) #8
  call void @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #8
  %21 = getelementptr inbounds i8, ptr %0, i64 440
  %22 = getelementptr inbounds i8, ptr %5, i64 8
  %23 = getelementptr inbounds i8, ptr %5, i64 16
  %24 = getelementptr inbounds i8, ptr %5, i64 20
  %25 = getelementptr inbounds i8, ptr %0, i64 280
  br label %31

26:                                               ; preds = %18
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %133

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader ]
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %14, i64 noundef %indvars.iv)
  %29 = call noundef i32 @_ZNK6basisu6vectorIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %28)
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %indvars.iv)
  store i32 %29, ptr %30, align 4, !tbaa !30
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %20
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !31

31:                                               ; preds = %._crit_edge, %106
  %.02646 = phi i32 [ %16, %._crit_edge ], [ %.2, %106 ]
  %32 = call noundef i32 @_ZNK6basisu6vectorINS_15basisu_frontend27subblock_endpoint_quant_errEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %21)
  %33 = icmp eq i32 %32, 0
  br i1 %33, label %109, label %36

34:                                               ; preds = %._crit_edge54
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %132

36:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #8
  %37 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN6basisu6vectorINS_15basisu_frontend27subblock_endpoint_quant_errEE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %21)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %37, i64 24, i1 false), !tbaa.struct !33
  invoke void @_ZN6basisu6vectorINS_15basisu_frontend27subblock_endpoint_quant_errEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(16) %21)
          to label %38 unwind label %41

38:                                               ; preds = %36
  %39 = invoke noundef zeroext i1 @_ZN6basisu22unordered_set_containsISt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEEjEEbRT_RKT0_(ptr noundef nonnull align 8 dereferenceable(56) %4, ptr noundef nonnull align 4 dereferenceable(4) %22)
          to label %40 unwind label %41

40:                                               ; preds = %38
  br i1 %39, label %106, label %43, !llvm.loop !36

41:                                               ; preds = %38, %36
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %108

43:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  %44 = load i32, ptr %23, align 8, !tbaa !37
  %45 = shl i32 %44, 1
  %46 = load i32, ptr %24, align 4, !tbaa !39
  %47 = add i32 %45, %46
  store i32 %47, ptr %6, align 4, !tbaa !30
  %48 = load i32, ptr %22, align 8, !tbaa !40
  %49 = zext i32 %48 to i64
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %49)
  %51 = load i32, ptr %50, align 4, !tbaa !30
  %52 = icmp ult i32 %51, 3
  br i1 %52, label %105, label %55, !llvm.loop !36

53:                                               ; preds = %96, %75, %68, %67, %65, %55
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %107

55:                                               ; preds = %43
  %56 = invoke noundef zeroext i1 @_ZN6basisu22unordered_set_containsISt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEEjEEbRT_RKT0_(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %57 unwind label %53

57:                                               ; preds = %55
  br i1 %56, label %105, label %58, !llvm.loop !36

58:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  %59 = load i32, ptr %6, align 4, !tbaa !30
  %60 = xor i32 %59, 1
  store i32 %60, ptr %7, align 4, !tbaa !30
  %61 = invoke noundef zeroext i1 @_ZN6basisu22unordered_set_containsISt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEEjEEbRT_RKT0_(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %62 unwind label %63

62:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  br i1 %61, label %105, label %65, !llvm.loop !36

63:                                               ; preds = %58
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  br label %107

65:                                               ; preds = %62
  %66 = invoke noundef ptr @_ZN6basisu14enlarge_vectorINS_6vectorINS1_IjEEEEEEPNT_10value_typeERS4_m(ptr noundef nonnull align 8 dereferenceable(16) %14, i64 noundef 1)
          to label %67 unwind label %53

67:                                               ; preds = %65
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %66, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %68 unwind label %53

68:                                               ; preds = %67
  %69 = invoke noundef ptr @_ZN6basisu14enlarge_vectorINS_6vectorINS_15basisu_frontend27endpoint_cluster_etc_paramsEEEEEPNT_10value_typeERS5_m(ptr noundef nonnull align 8 dereferenceable(16) %25, i64 noundef 1)
          to label %70 unwind label %53

70:                                               ; preds = %68
  %71 = call noundef i32 @_ZNK6basisu6vectorINS0_IjEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %14)
  %72 = call noundef i32 @_ZNK6basisu6vectorINS_15basisu_frontend27endpoint_cluster_etc_paramsEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %25)
  %73 = icmp eq i32 %71, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %70
  call void @__assert_fail(ptr noundef nonnull @.str.30, ptr noundef nonnull @.str.4, i32 noundef 1165, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6basisu15basisu_frontend31introduce_new_endpoint_clustersEv) #9
  unreachable

75:                                               ; preds = %70
  %76 = invoke { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertERKj(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %77 unwind label %53

77:                                               ; preds = %75
  %78 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %14)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  %79 = load i32, ptr %6, align 4, !tbaa !30
  %80 = xor i32 %79, 1
  store i32 %80, ptr %8, align 4, !tbaa !30
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %78, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %81 unwind label %92

81:                                               ; preds = %77
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  %82 = load i32, ptr %6, align 4, !tbaa !30
  %83 = xor i32 %82, 1
  store i32 %83, ptr %9, align 4, !tbaa !30
  %84 = invoke { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertEOj(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %85 unwind label %94

85:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  %86 = load i32, ptr %22, align 8, !tbaa !40
  %87 = zext i32 %86 to i64
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %87)
  %89 = load i32, ptr %88, align 4, !tbaa !30
  %90 = icmp ugt i32 %89, 1
  br i1 %90, label %96, label %91

91:                                               ; preds = %85
  call void @_ZN6basisuL21handle_verify_failureEi(i32 noundef 1172)
  br label %96

92:                                               ; preds = %77
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  br label %107

94:                                               ; preds = %81
  %95 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  br label %107

96:                                               ; preds = %91, %85
  %97 = load i32, ptr %22, align 8, !tbaa !40
  %98 = zext i32 %97 to i64
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %98)
  %100 = load i32, ptr %99, align 4, !tbaa !30
  %101 = add i32 %100, -2
  store i32 %101, ptr %99, align 4, !tbaa !30
  %102 = invoke { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertERKj(ptr noundef nonnull align 8 dereferenceable(56) %4, ptr noundef nonnull align 4 dereferenceable(4) %22)
          to label %103 unwind label %53

103:                                              ; preds = %96
  %104 = add nsw i32 %.02646, -1
  br label %105

105:                                              ; preds = %62, %57, %43, %103
  %.1 = phi i32 [ %104, %103 ], [ %.02646, %43 ], [ %.02646, %57 ], [ %.02646, %62 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  br label %106

106:                                              ; preds = %40, %105
  %.2 = phi i32 [ %.1, %105 ], [ %.02646, %40 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  %.not = icmp eq i32 %.2, 0
  br i1 %.not, label %109, label %31

107:                                              ; preds = %94, %92, %63, %53
  %.pn = phi { ptr, i32 } [ %54, %53 ], [ %95, %94 ], [ %93, %92 ], [ %64, %63 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  br label %108

108:                                              ; preds = %107, %41
  %.pn.pn = phi { ptr, i32 } [ %.pn, %107 ], [ %42, %41 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  br label %132

109:                                              ; preds = %31, %106
  br i1 %.not55, label %._crit_edge54, label %.lr.ph53

._crit_edge54:                                    ; preds = %129, %109
  invoke void @_ZN6basisu15basisu_frontend32generate_block_endpoint_clustersEv(ptr noundef nonnull align 8 dereferenceable(496) %0)
          to label %130 unwind label %34

.lr.ph53:                                         ; preds = %109, %129
  %indvars.iv62 = phi i64 [ %indvars.iv.next63, %129 ], [ 0, %109 ]
  %110 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN6basisu6vectorINS0_IjEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %14, i64 noundef %indvars.iv62)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #8
  call void @_ZN6basisu6vectorIjEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10)
  %111 = call noundef i32 @_ZNK6basisu6vectorIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %110)
  %.not57 = icmp eq i32 %111, 0
  br i1 %.not57, label %._crit_edge50, label %.lr.ph49

._crit_edge50:                                    ; preds = %121, %.lr.ph53
  %112 = call noundef i32 @_ZNK6basisu6vectorIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %110)
  %113 = call noundef i32 @_ZNK6basisu6vectorIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
  %.not40 = icmp eq i32 %112, %113
  br i1 %.not40, label %129, label %125

.lr.ph49:                                         ; preds = %.lr.ph53, %121
  %indvars.iv59 = phi i64 [ %indvars.iv.next60, %121 ], [ 0, %.lr.ph53 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6basisu6vectorIjEixEm(ptr noundef nonnull align 8 dereferenceable(16) %110, i64 noundef %indvars.iv59)
  %115 = load i32, ptr %114, align 4, !tbaa !30
  store i32 %115, ptr %11, align 4, !tbaa !30
  %116 = invoke noundef zeroext i1 @_ZN6basisu22unordered_set_containsISt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEEjEEbRT_RKT0_(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %117 unwind label %119

117:                                              ; preds = %.lr.ph49
  br i1 %116, label %121, label %118

118:                                              ; preds = %117
  invoke void @_ZN6basisu6vectorIjE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %121 unwind label %119

119:                                              ; preds = %118, %.lr.ph49
  %120 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @_ZN6basisu6vectorIjED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  br label %132

121:                                              ; preds = %118, %117
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %122 = call noundef i32 @_ZNK6basisu6vectorIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %110)
  %123 = zext i32 %122 to i64
  %124 = icmp ult i64 %indvars.iv.next60, %123
  br i1 %124, label %.lr.ph49, label %._crit_edge50, !llvm.loop !41

125:                                              ; preds = %._crit_edge50
  %126 = call noundef i32 @_ZNK6basisu6vectorIjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
  %.not41 = icmp eq i32 %126, 0
  br i1 %.not41, label %127, label %128

127:                                              ; preds = %125
  call void @_ZN6basisuL21handle_verify_failureEi(i32 noundef 1195)
  br label %128

128:                                              ; preds = %127, %125
  call void @_ZN6basisu6vectorIjE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(16) %110, ptr noundef nonnull align 8 dereferenceable(16) %10)
  br label %129

129:                                              ; preds = %128, %._crit_edge50
  call void @_ZN6basisu6vectorIjED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %exitcond66.not = icmp eq i64 %indvars.iv.next63, %20
  br i1 %exitcond66.not, label %._crit_edge54, label %.lr.ph53, !llvm.loop !42

130:                                              ; preds = %._crit_edge54
  call void @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %4) #8
  call void @_ZN6basisu6vectorIjED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  call void @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #8
  br label %131

131:                                              ; preds = %1, %130
  ret void

132:                                              ; preds = %119, %108, %34
  %.pn42 = phi { ptr, i32 } [ %120, %119 ], [ %35, %34 ], [ %.pn.pn, %108 ]
  call void @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %4) #8
  call void @_ZN6basisu6vectorIjED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #8
  br label %133

133:                                              ; preds = %132, %26
  %.pn42.pn = phi { ptr, i32 } [ %.pn42, %132 ], [ %27, %26 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  call void @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #8
  resume { ptr, i32 } %.pn42.pn
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: 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 #4 align 2

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6basisu22unordered_set_containsISt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEEjEEbRT_RKT0_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN6basisu14enlarge_vectorINS_6vectorINS1_IjEEEEEEPNT_10value_typeERS4_m(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN6basisu14enlarge_vectorINS_6vectorINS_15basisu_frontend27endpoint_cluster_etc_paramsEEEEEPNT_10value_typeERS5_m(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #6

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertERKj(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertEOj(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #4 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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress 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 #8 = { nounwind }
attributes #9 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !8, i64 16}
!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 = !{!8, !8, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{i64 0, i64 8, !34, i64 8, i64 4, !30, i64 12, i64 4, !30, i64 16, i64 4, !30, i64 20, i64 4, !30}
!34 = !{!35, !35, i64 0}
!35 = !{!"long", !9, i64 0}
!36 = distinct !{!36, !32}
!37 = !{!38, !8, i64 16}
!38 = !{!"_ZTSN6basisu15basisu_frontend27subblock_endpoint_quant_errE", !35, i64 0, !8, i64 8, !8, i64 12, !8, i64 16, !8, i64 20}
!39 = !{!38, !8, i64 20}
!40 = !{!38, !8, i64 8}
!41 = distinct !{!41, !32}
!42 = distinct !{!42, !32}


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