; LLVM IR from pixelsdb/mini-pixels :: pixels-core/lib/encoding/RunLenIntEncoder.ll (ZN16RunLenIntEncoder18preparePatchedBlobEv)

; 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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.RunLenIntEncoder = type { i32, i32, i32, i32, i8, i8, i64, i64, i32, i8, i32, i32, i32, ptr, i32, i32, i32, i32, i32, i64, ptr, ptr, ptr, ptr, %class.EncodingUtils, %"class.std::shared_ptr" }
%class.EncodingUtils = type { ptr, ptr }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN16RunLenIntEncoder18findClosestNumBitsEl(ptr noundef nonnull align 8 dereferenceable(168), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16RunLenIntEncoder18preparePatchedBlobEv(ptr noundef nonnull align 8 dereferenceable(168) %0) #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::vector.3", align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %18 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %19 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 17
  %20 = load i32, ptr %19, align 4, !tbaa !9
  %21 = zext i32 %20 to i64
  %22 = shl i64 1, %21
  %23 = sub nsw i64 %22, 1
  store i64 %23, ptr %3, align 8, !tbaa !19
  %24 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 1
  %25 = load i32, ptr %24, align 4, !tbaa !20
  %26 = sitofp i32 %25 to double
  %27 = fmul double %26, 5.000000e-02
  %28 = call double @llvm.ceil.f64(double %27)
  %29 = fptosi double %28 to i32
  %30 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 12
  store i32 %29, ptr %30, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #7
  call void @llvm.memset.p0.i64(ptr align 8 %4, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %31 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 12
  %32 = load i32, ptr %31, align 8, !tbaa !21
  %33 = sext i32 %32 to i64
  invoke void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %33)
          to label %34 unwind label %59

34:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #7
  call void @llvm.memset.p0.i64(ptr align 8 %7, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIlSaIlEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %35 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 12
  %36 = load i32, ptr %35, align 8, !tbaa !21
  %37 = sext i32 %36 to i64
  invoke void @_ZNSt6vectorIlSaIlEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %37)
          to label %38 unwind label %63

38:                                               ; preds = %34
  %39 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 24
  %40 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 18
  %41 = load i32, ptr %40, align 8, !tbaa !22
  %42 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 17
  %43 = load i32, ptr %42, align 4, !tbaa !9
  %44 = sub nsw i32 %41, %43
  %45 = invoke noundef i32 @_ZN13EncodingUtils19getClosestFixedBitsEi(ptr noundef nonnull align 8 dereferenceable(16) %39, i32 noundef %44)
          to label %46 unwind label %63

46:                                               ; preds = %38
  %47 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 10
  store i32 %45, ptr %47, align 8, !tbaa !23
  %48 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 10
  %49 = load i32, ptr %48, align 8, !tbaa !23
  %50 = icmp eq i32 %49, 64
  br i1 %50, label %51, label %67

51:                                               ; preds = %46
  %52 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 10
  store i32 56, ptr %52, align 8, !tbaa !23
  %53 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 17
  store i32 8, ptr %53, align 4, !tbaa !9
  %54 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 17
  %55 = load i32, ptr %54, align 4, !tbaa !9
  %56 = zext i32 %55 to i64
  %57 = shl i64 1, %56
  %58 = sub nsw i64 %57, 1
  store i64 %58, ptr %3, align 8, !tbaa !19
  br label %67

59:                                               ; preds = %1
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %5, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %6, align 4
  br label %221

63:                                               ; preds = %38, %34
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %5, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %6, align 4
  br label %220

67:                                               ; preds = %51, %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !24
  br label %68

68:                                               ; preds = %124, %67
  %69 = load i32, ptr %13, align 4, !tbaa !24
  %70 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 1
  %71 = load i32, ptr %70, align 4, !tbaa !20
  %72 = icmp slt i32 %69, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %127

74:                                               ; preds = %68
  %75 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 22
  %76 = load ptr, ptr %75, align 8, !tbaa !25
  %77 = load i32, ptr %13, align 4, !tbaa !24
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds i64, ptr %76, i64 %78
  %80 = load i64, ptr %79, align 8, !tbaa !19
  %81 = load i64, ptr %3, align 8, !tbaa !19
  %82 = icmp sgt i64 %80, %81
  br i1 %82, label %83, label %123

83:                                               ; preds = %74
  %84 = load i32, ptr %13, align 4, !tbaa !24
  %85 = load i32, ptr %10, align 4, !tbaa !24
  %86 = sub nsw i32 %84, %85
  store i32 %86, ptr %11, align 4, !tbaa !24
  %87 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %88 unwind label %119

88:                                               ; preds = %83
  %89 = load i32, ptr %87, align 4, !tbaa !24
  store i32 %89, ptr %12, align 4, !tbaa !24
  %90 = load i32, ptr %13, align 4, !tbaa !24
  store i32 %90, ptr %10, align 4, !tbaa !24
  %91 = load i32, ptr %11, align 4, !tbaa !24
  %92 = load i32, ptr %8, align 4, !tbaa !24
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %8, align 4, !tbaa !24
  %94 = sext i32 %92 to i64
  %95 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %94) #7
  store i32 %91, ptr %95, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %96 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 22
  %97 = load ptr, ptr %96, align 8, !tbaa !25
  %98 = load i32, ptr %13, align 4, !tbaa !24
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds i64, ptr %97, i64 %99
  %101 = load i64, ptr %100, align 8, !tbaa !19
  %102 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 17
  %103 = load i32, ptr %102, align 4, !tbaa !9
  %104 = zext i32 %103 to i64
  %105 = lshr i64 %101, %104
  store i64 %105, ptr %14, align 8, !tbaa !19
  %106 = load i64, ptr %14, align 8, !tbaa !19
  %107 = load i32, ptr %9, align 4, !tbaa !24
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %9, align 4, !tbaa !24
  %109 = sext i32 %107 to i64
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %109) #7
  store i64 %106, ptr %110, align 8, !tbaa !19
  %111 = load i64, ptr %3, align 8, !tbaa !19
  %112 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 22
  %113 = load ptr, ptr %112, align 8, !tbaa !25
  %114 = load i32, ptr %13, align 4, !tbaa !24
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds i64, ptr %113, i64 %115
  %117 = load i64, ptr %116, align 8, !tbaa !19
  %118 = and i64 %117, %111
  store i64 %118, ptr %116, align 8, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %123

119:                                              ; preds = %83
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %5, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %219

123:                                              ; preds = %88, %74
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %13, align 4, !tbaa !24
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %13, align 4, !tbaa !24
  br label %68, !llvm.loop !26

127:                                              ; preds = %73
  %128 = load i32, ptr %8, align 4, !tbaa !24
  %129 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 12
  store i32 %128, ptr %129, align 8, !tbaa !21
  %130 = load i32, ptr %12, align 4, !tbaa !24
  %131 = icmp eq i32 %130, 0
  br i1 %131, label %132, label %138

132:                                              ; preds = %127
  %133 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 12
  %134 = load i32, ptr %133, align 8, !tbaa !21
  %135 = icmp ne i32 %134, 0
  br i1 %135, label %136, label %138

136:                                              ; preds = %132
  %137 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 11
  store i32 1, ptr %137, align 4, !tbaa !28
  br label %148

138:                                              ; preds = %132, %127
  %139 = load i32, ptr %12, align 4, !tbaa !24
  %140 = sext i32 %139 to i64
  %141 = invoke noundef i32 @_ZN16RunLenIntEncoder18findClosestNumBitsEl(ptr noundef nonnull align 8 dereferenceable(168) %18, i64 noundef %140)
          to label %142 unwind label %144

142:                                              ; preds = %138
  %143 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 11
  store i32 %141, ptr %143, align 4, !tbaa !28
  br label %148

144:                                              ; preds = %138
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %5, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %6, align 4
  br label %219

148:                                              ; preds = %142, %136
  %149 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 11
  %150 = load i32, ptr %149, align 4, !tbaa !28
  %151 = icmp sgt i32 %150, 8
  br i1 %151, label %152, label %164

152:                                              ; preds = %148
  %153 = load i32, ptr %12, align 4, !tbaa !24
  %154 = icmp eq i32 %153, 511
  br i1 %154, label %155, label %159

155:                                              ; preds = %152
  %156 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 12
  %157 = load i32, ptr %156, align 8, !tbaa !21
  %158 = add nsw i32 %157, 2
  store i32 %158, ptr %156, align 8, !tbaa !21
  br label %163

159:                                              ; preds = %152
  %160 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 12
  %161 = load i32, ptr %160, align 8, !tbaa !21
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %160, align 8, !tbaa !21
  br label %163

163:                                              ; preds = %159, %155
  br label %164

164:                                              ; preds = %163, %148
  store i32 0, ptr %8, align 4, !tbaa !24
  store i32 0, ptr %9, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !24
  br label %165

165:                                              ; preds = %215, %164
  %166 = load i32, ptr %15, align 4, !tbaa !24
  %167 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 12
  %168 = load i32, ptr %167, align 8, !tbaa !21
  %169 = icmp slt i32 %166, %168
  br i1 %169, label %171, label %170

170:                                              ; preds = %165
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %218

171:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %172 = load i32, ptr %8, align 4, !tbaa !24
  %173 = add nsw i32 %172, 1
  store i32 %173, ptr %8, align 4, !tbaa !24
  %174 = sext i32 %172 to i64
  %175 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %174) #7
  %176 = load i32, ptr %175, align 4, !tbaa !24
  %177 = sext i32 %176 to i64
  store i64 %177, ptr %16, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %178 = load i32, ptr %9, align 4, !tbaa !24
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %9, align 4, !tbaa !24
  %180 = sext i32 %178 to i64
  %181 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %180) #7
  %182 = load i64, ptr %181, align 8, !tbaa !19
  store i64 %182, ptr %17, align 8, !tbaa !19
  br label %183

183:                                              ; preds = %186, %171
  %184 = load i64, ptr %16, align 8, !tbaa !19
  %185 = icmp sgt i64 %184, 255
  br i1 %185, label %186, label %199

186:                                              ; preds = %183
  %187 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 10
  %188 = load i32, ptr %187, align 8, !tbaa !23
  %189 = zext i32 %188 to i64
  %190 = shl i64 255, %189
  %191 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 13
  %192 = load ptr, ptr %191, align 8, !tbaa !29
  %193 = load i32, ptr %15, align 4, !tbaa !24
  %194 = add nsw i32 %193, 1
  store i32 %194, ptr %15, align 4, !tbaa !24
  %195 = sext i32 %193 to i64
  %196 = getelementptr inbounds i64, ptr %192, i64 %195
  store i64 %190, ptr %196, align 8, !tbaa !19
  %197 = load i64, ptr %16, align 8, !tbaa !19
  %198 = sub nsw i64 %197, 255
  store i64 %198, ptr %16, align 8, !tbaa !19
  br label %183, !llvm.loop !30

199:                                              ; preds = %183
  %200 = load i64, ptr %16, align 8, !tbaa !19
  %201 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 10
  %202 = load i32, ptr %201, align 8, !tbaa !23
  %203 = zext i32 %202 to i64
  %204 = shl i64 %200, %203
  %205 = load i64, ptr %17, align 8, !tbaa !19
  %206 = or i64 %204, %205
  %207 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 13
  %208 = load ptr, ptr %207, align 8, !tbaa !29
  %209 = load i32, ptr %15, align 4, !tbaa !24
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds i64, ptr %208, i64 %210
  store i64 %206, ptr %211, align 8, !tbaa !19
  %212 = load i32, ptr %15, align 4, !tbaa !24
  %213 = add nsw i32 %212, 1
  %214 = getelementptr inbounds %class.RunLenIntEncoder, ptr %18, i32 0, i32 14
  store i32 %213, ptr %214, align 8, !tbaa !31
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %215

215:                                              ; preds = %199
  %216 = load i32, ptr %15, align 4, !tbaa !24
  %217 = add nsw i32 %216, 1
  store i32 %217, ptr %15, align 4, !tbaa !24
  br label %165, !llvm.loop !32

218:                                              ; preds = %170
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  ret void

219:                                              ; preds = %144, %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %220

220:                                              ; preds = %219, %63
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #7
  br label %221

221:                                              ; preds = %220, %59
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  br label %222

222:                                              ; preds = %221
  %223 = load ptr, ptr %5, align 8
  %224 = load i32, ptr %6, align 4
  %225 = insertvalue { ptr, i32 } poison, ptr %223, 0
  %226 = insertvalue { ptr, i32 } %225, i32 %224, 1
  resume { ptr, i32 } %226
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

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

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

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

declare noundef i32 @_ZN13EncodingUtils19getClosestFixedBitsEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #6

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 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 #7 = { 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 84}
!10 = !{!"_ZTS16RunLenIntEncoder", !11, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !13, i64 16, !13, i64 17, !14, i64 24, !14, i64 32, !12, i64 40, !13, i64 44, !12, i64 48, !12, i64 52, !12, i64 56, !6, i64 64, !12, i64 72, !12, i64 76, !12, i64 80, !12, i64 84, !12, i64 88, !14, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !15, i64 136, !16, i64 152}
!11 = !{!"_ZTSN16RunLenIntEncoder12EncodingTypeE", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTS13EncodingUtils", !6, i64 0, !6, i64 8}
!16 = !{!"_ZTSSt10shared_ptrI10ByteBufferE", !17, i64 0}
!17 = !{!"_ZTSSt12__shared_ptrI10ByteBufferLN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !18, i64 8}
!18 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!19 = !{!14, !14, i64 0}
!20 = !{!10, !12, i64 4}
!21 = !{!10, !12, i64 56}
!22 = !{!10, !12, i64 88}
!23 = !{!10, !12, i64 48}
!24 = !{!12, !12, i64 0}
!25 = !{!10, !6, i64 120}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!10, !12, i64 52}
!29 = !{!10, !6, i64 64}
!30 = distinct !{!30, !27}
!31 = !{!10, !12, i64 72}
!32 = distinct !{!32, !27}


; 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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN16RunLenIntEncoder18findClosestNumBitsEl(ptr noundef nonnull align 8 dereferenceable(168), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16RunLenIntEncoder18preparePatchedBlobEv(ptr noundef nonnull align 8 dereferenceable(168) %0) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %"class.std::vector.3", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = getelementptr inbounds i8, ptr %0, i64 84
  %7 = load i32, ptr %6, align 4, !tbaa !5
  %8 = zext nneg i32 %7 to i64
  %notmask = shl nsw i64 -1, %8
  %9 = xor i64 %notmask, -1
  %10 = getelementptr inbounds i8, ptr %0, i64 4
  %11 = load i32, ptr %10, align 4, !tbaa !18
  %12 = sitofp i32 %11 to double
  %13 = fmul double %12, 5.000000e-02
  %14 = tail call double @llvm.ceil.f64(double %13)
  %15 = fptosi double %14 to i32
  %16 = getelementptr inbounds i8, ptr %0, i64 56
  store i32 %15, ptr %16, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %2, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  %17 = load i32, ptr %16, align 8, !tbaa !19
  %18 = sext i32 %17 to i64
  invoke void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %18)
          to label %19 unwind label %33

19:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %3, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIlSaIlEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %20 = load i32, ptr %16, align 8, !tbaa !19
  %21 = sext i32 %20 to i64
  invoke void @_ZNSt6vectorIlSaIlEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %21)
          to label %22 unwind label %35

22:                                               ; preds = %19
  %23 = getelementptr inbounds i8, ptr %0, i64 136
  %24 = getelementptr inbounds i8, ptr %0, i64 88
  %25 = load i32, ptr %24, align 8, !tbaa !20
  %26 = load i32, ptr %6, align 4, !tbaa !5
  %27 = sub nsw i32 %25, %26
  %28 = invoke noundef i32 @_ZN13EncodingUtils19getClosestFixedBitsEi(ptr noundef nonnull align 8 dereferenceable(16) %23, i32 noundef %27)
          to label %29 unwind label %35

29:                                               ; preds = %22
  %30 = getelementptr inbounds i8, ptr %0, i64 48
  store i32 %28, ptr %30, align 8, !tbaa !21
  %31 = icmp eq i32 %28, 64
  br i1 %31, label %32, label %37

32:                                               ; preds = %29
  store i32 56, ptr %30, align 8, !tbaa !21
  store i32 8, ptr %6, align 4, !tbaa !5
  br label %37

33:                                               ; preds = %1
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %127

35:                                               ; preds = %22, %19
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %126

37:                                               ; preds = %32, %29
  %.0 = phi i64 [ 255, %32 ], [ %9, %29 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 0, ptr %4, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  store i32 0, ptr %5, align 4, !tbaa !22
  %38 = load i32, ptr %10, align 4, !tbaa !18
  %39 = icmp sgt i32 %38, 0
  br i1 %39, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %37
  store i32 0, ptr %16, align 8, !tbaa !19
  br label %76

.lr.ph:                                           ; preds = %37
  %40 = getelementptr inbounds i8, ptr %0, i64 120
  %.pre = load ptr, ptr %40, align 8, !tbaa !23
  br label %42

._crit_edge:                                      ; preds = %70
  %.pre71 = load i32, ptr %5, align 4, !tbaa !22
  store i32 %.137, ptr %16, align 8, !tbaa !19
  %41 = icmp ne i32 %.pre71, 0
  %.not = icmp eq i32 %.137, 0
  %or.cond = select i1 %41, i1 true, i1 %.not
  br i1 %or.cond, label %76, label %.thread

42:                                               ; preds = %.lr.ph, %70
  %43 = phi i32 [ %38, %.lr.ph ], [ %71, %70 ]
  %44 = phi ptr [ %.pre, %.lr.ph ], [ %72, %70 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %70 ]
  %.03245 = phi i32 [ 0, %.lr.ph ], [ %.133, %70 ]
  %.03444 = phi i32 [ 0, %.lr.ph ], [ %.135, %70 ]
  %.03643 = phi i32 [ 0, %.lr.ph ], [ %.137, %70 ]
  %45 = getelementptr inbounds i64, ptr %44, i64 %indvars.iv
  %46 = load i64, ptr %45, align 8, !tbaa !24
  %47 = icmp sgt i64 %46, %.0
  br i1 %47, label %48, label %70

48:                                               ; preds = %42
  %49 = trunc nuw nsw i64 %indvars.iv to i32
  %50 = sub nsw i32 %49, %.03245
  store i32 %50, ptr %4, align 4, !tbaa !22
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %52 = load i32, ptr %51, align 4, !tbaa !22
  store i32 %52, ptr %5, align 4, !tbaa !22
  %53 = load i32, ptr %4, align 4, !tbaa !22
  %54 = add nsw i32 %.03643, 1
  %55 = sext i32 %.03643 to i64
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %55) #8
  store i32 %53, ptr %56, align 4, !tbaa !22
  %57 = load ptr, ptr %40, align 8, !tbaa !23
  %58 = getelementptr inbounds i64, ptr %57, i64 %indvars.iv
  %59 = load i64, ptr %58, align 8, !tbaa !24
  %60 = load i32, ptr %6, align 4, !tbaa !5
  %61 = zext nneg i32 %60 to i64
  %62 = lshr i64 %59, %61
  %63 = add nsw i32 %.03444, 1
  %64 = sext i32 %.03444 to i64
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %64) #8
  store i64 %62, ptr %65, align 8, !tbaa !24
  %66 = load ptr, ptr %40, align 8, !tbaa !23
  %67 = getelementptr inbounds i64, ptr %66, i64 %indvars.iv
  %68 = load i64, ptr %67, align 8, !tbaa !24
  %69 = and i64 %68, %.0
  store i64 %69, ptr %67, align 8, !tbaa !24
  %.pre70 = load i32, ptr %10, align 4, !tbaa !18
  br label %70

70:                                               ; preds = %42, %48
  %71 = phi i32 [ %.pre70, %48 ], [ %43, %42 ]
  %72 = phi ptr [ %66, %48 ], [ %44, %42 ]
  %.137 = phi i32 [ %54, %48 ], [ %.03643, %42 ]
  %.135 = phi i32 [ %63, %48 ], [ %.03444, %42 ]
  %.133 = phi i32 [ %49, %48 ], [ %.03245, %42 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %73 = sext i32 %71 to i64
  %74 = icmp slt i64 %indvars.iv.next, %73
  br i1 %74, label %42, label %._crit_edge, !llvm.loop !25

.thread:                                          ; preds = %._crit_edge
  %75 = getelementptr inbounds i8, ptr %0, i64 52
  store i32 1, ptr %75, align 4, !tbaa !27
  br label %._crit_edge72

76:                                               ; preds = %._crit_edge.thread, %._crit_edge
  %77 = phi i32 [ 0, %._crit_edge.thread ], [ %.pre71, %._crit_edge ]
  %78 = sext i32 %77 to i64
  %79 = invoke noundef i32 @_ZN16RunLenIntEncoder18findClosestNumBitsEl(ptr noundef nonnull align 8 dereferenceable(168) %0, i64 noundef %78)
          to label %82 unwind label %80

80:                                               ; preds = %76
  %81 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  br label %126

82:                                               ; preds = %76
  %83 = getelementptr inbounds i8, ptr %0, i64 52
  store i32 %79, ptr %83, align 4, !tbaa !27
  %84 = icmp sgt i32 %79, 8
  br i1 %84, label %85, label %._crit_edge72

._crit_edge72:                                    ; preds = %.thread, %82
  %.pre73 = load i32, ptr %16, align 8, !tbaa !19
  br label %93

85:                                               ; preds = %82
  %86 = load i32, ptr %5, align 4, !tbaa !22
  %87 = icmp eq i32 %86, 511
  %88 = load i32, ptr %16, align 8, !tbaa !19
  br i1 %87, label %89, label %91

89:                                               ; preds = %85
  %90 = add nsw i32 %88, 2
  store i32 %90, ptr %16, align 8, !tbaa !19
  br label %93

91:                                               ; preds = %85
  %92 = add nsw i32 %88, 1
  store i32 %92, ptr %16, align 8, !tbaa !19
  br label %93

93:                                               ; preds = %._crit_edge72, %89, %91
  %94 = phi i32 [ %.pre73, %._crit_edge72 ], [ %90, %89 ], [ %92, %91 ]
  %95 = icmp sgt i32 %94, 0
  br i1 %95, label %.lr.ph58, label %._crit_edge59

.lr.ph58:                                         ; preds = %93
  %96 = getelementptr inbounds i8, ptr %0, i64 64
  %97 = getelementptr inbounds i8, ptr %0, i64 72
  br label %98

._crit_edge59:                                    ; preds = %._crit_edge51, %93
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #8
  ret void

98:                                               ; preds = %.lr.ph58, %._crit_edge51
  %indvars.iv65 = phi i64 [ 0, %.lr.ph58 ], [ %indvars.iv.next66, %._crit_edge51 ]
  %.02856 = phi i32 [ 0, %.lr.ph58 ], [ %123, %._crit_edge51 ]
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv65) #8
  %100 = load i32, ptr %99, align 4, !tbaa !22
  %101 = sext i32 %100 to i64
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv65) #8
  %103 = load i64, ptr %102, align 8, !tbaa !24
  %104 = icmp sgt i32 %100, 255
  %.pre74 = load i32, ptr %30, align 8, !tbaa !21
  %.pre75 = load ptr, ptr %96, align 8, !tbaa !28
  %105 = zext nneg i32 %.pre74 to i64
  br i1 %104, label %.lr.ph50, label %._crit_edge51

.lr.ph50:                                         ; preds = %98
  %106 = shl i64 255, %105
  %107 = sext i32 %.02856 to i64
  %108 = add nuw nsw i64 %101, 254
  %smin = call i64 @llvm.smin.i64(i64 %101, i64 510)
  %109 = sub nsw i64 %108, %smin
  %110 = udiv i64 %109, 255
  %111 = add nuw nsw i64 %110, 1
  %min.iters.check = icmp ult i64 %109, 765
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph50
  %n.vec = and i64 %111, 288230376151711740
  %ind.end = add nsw i64 %n.vec, %107
  %112 = mul i64 %n.vec, -255
  %ind.end80 = add i64 %112, %101
  %broadcast.splatinsert = insertelement <2 x i64> poison, i64 %106, i64 0
  %broadcast.splat = shufflevector <2 x i64> %broadcast.splatinsert, <2 x i64> poison, <2 x i32> zeroinitializer
  %invariant.gep = getelementptr i64, ptr %.pre75, i64 %107
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %gep = getelementptr i64, ptr %invariant.gep, i64 %index
  %113 = getelementptr inbounds i8, ptr %gep, i64 16
  store <2 x i64> %broadcast.splat, ptr %gep, align 8, !tbaa !24
  store <2 x i64> %broadcast.splat, ptr %113, align 8, !tbaa !24
  %index.next = add nuw i64 %index, 4
  %114 = icmp eq i64 %index.next, %n.vec
  br i1 %114, label %middle.block, label %vector.body, !llvm.loop !29

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %111, %n.vec
  br i1 %cmp.n, label %._crit_edge51.loopexit, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph50
  %indvars.iv62.ph = phi i64 [ %107, %.lr.ph50 ], [ %ind.end, %middle.block ]
  %.02748.ph = phi i64 [ %101, %.lr.ph50 ], [ %ind.end80, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv62 = phi i64 [ %indvars.iv.next63, %scalar.ph ], [ %indvars.iv62.ph, %scalar.ph.preheader ]
  %.02748 = phi i64 [ %116, %scalar.ph ], [ %.02748.ph, %scalar.ph.preheader ]
  %indvars.iv.next63 = add nsw i64 %indvars.iv62, 1
  %115 = getelementptr inbounds i64, ptr %.pre75, i64 %indvars.iv62
  store i64 %106, ptr %115, align 8, !tbaa !24
  %116 = add nsw i64 %.02748, -255
  %117 = icmp sgt i64 %.02748, 510
  br i1 %117, label %scalar.ph, label %._crit_edge51.loopexit, !llvm.loop !32

._crit_edge51.loopexit:                           ; preds = %scalar.ph, %middle.block
  %indvars.iv.next63.lcssa = phi i64 [ %ind.end, %middle.block ], [ %indvars.iv.next63, %scalar.ph ]
  %.lcssa = phi i64 [ %ind.end80, %middle.block ], [ %116, %scalar.ph ]
  %118 = trunc nsw i64 %indvars.iv.next63.lcssa to i32
  br label %._crit_edge51

._crit_edge51:                                    ; preds = %98, %._crit_edge51.loopexit
  %.1.lcssa = phi i32 [ %118, %._crit_edge51.loopexit ], [ %.02856, %98 ]
  %.027.lcssa = phi i64 [ %.lcssa, %._crit_edge51.loopexit ], [ %101, %98 ]
  %119 = shl i64 %.027.lcssa, %105
  %120 = or i64 %119, %103
  %121 = sext i32 %.1.lcssa to i64
  %122 = getelementptr inbounds i64, ptr %.pre75, i64 %121
  store i64 %120, ptr %122, align 8, !tbaa !24
  %123 = add nsw i32 %.1.lcssa, 1
  store i32 %123, ptr %97, align 8, !tbaa !33
  %124 = load i32, ptr %16, align 8, !tbaa !19
  %125 = icmp slt i32 %123, %124
  br i1 %125, label %98, label %._crit_edge59, !llvm.loop !34

126:                                              ; preds = %80, %35
  %.pn = phi { ptr, i32 } [ %81, %80 ], [ %36, %35 ]
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  br label %127

127:                                              ; preds = %126, %33
  %.pn.pn = phi { ptr, i32 } [ %.pn, %126 ], [ %34, %33 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #8
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

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

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

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

declare noundef i32 @_ZN13EncodingUtils19getClosestFixedBitsEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smin.i64(i64, i64) #7

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 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 #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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, !10, i64 84}
!6 = !{!"_ZTS16RunLenIntEncoder", !7, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !11, i64 16, !11, i64 17, !12, i64 24, !12, i64 32, !10, i64 40, !11, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !13, i64 64, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !12, i64 96, !13, i64 104, !13, i64 112, !13, i64 120, !13, i64 128, !14, i64 136, !15, i64 152}
!7 = !{!"_ZTSN16RunLenIntEncoder12EncodingTypeE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"_ZTS13EncodingUtils", !13, i64 0, !13, i64 8}
!15 = !{!"_ZTSSt10shared_ptrI10ByteBufferE", !16, i64 0}
!16 = !{!"_ZTSSt12__shared_ptrI10ByteBufferLN9__gnu_cxx12_Lock_policyE2EE", !13, i64 0, !17, i64 8}
!17 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !13, i64 0}
!18 = !{!6, !10, i64 4}
!19 = !{!6, !10, i64 56}
!20 = !{!6, !10, i64 88}
!21 = !{!6, !10, i64 48}
!22 = !{!10, !10, i64 0}
!23 = !{!6, !13, i64 120}
!24 = !{!12, !12, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!6, !10, i64 52}
!28 = !{!6, !13, i64 64}
!29 = distinct !{!29, !26, !30, !31}
!30 = !{!"llvm.loop.isvectorized", i32 1}
!31 = !{!"llvm.loop.unroll.runtime.disable"}
!32 = distinct !{!32, !26, !31, !30}
!33 = !{!6, !10, i64 72}
!34 = distinct !{!34, !26}


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