; LLVM IR from DanEngelbrecht/longtail :: lib/brotli/ext/enc (metablock)

; 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"

%struct.BrotliDistanceParams = type { i32, i32, i32, i32, i64 }
%struct.BrotliEncoderParams = type { i32, i32, i32, i32, i64, i64, i32, i32, %struct.BrotliHasherParams, %struct.BrotliDistanceParams, %struct.SharedEncoderDictionary }
%struct.BrotliHasherParams = type { i32, i32, i32, i32 }
%struct.SharedEncoderDictionary = type { i32, %struct.CompoundDictionary, %struct.ContextualEncoderDictionary, i32 }
%struct.CompoundDictionary = type { i64, i64, [16 x ptr], [16 x ptr], [16 x i64], i64, [16 x ptr] }
%struct.ContextualEncoderDictionary = type { i32, i8, [64 x i8], [64 x ptr], i64, %struct.BrotliEncoderDictionary, ptr }
%struct.BrotliEncoderDictionary = type { ptr, i32, i32, i64, ptr, ptr, ptr, ptr, %struct.BrotliTrie, i32, ptr, ptr, ptr, i64, ptr, i64, ptr, ptr }
%struct.BrotliTrie = type { ptr, i64, i64, %struct.BrotliTrieNode }
%struct.BrotliTrieNode = type { i8, i8, i8, i32, i32 }
%struct.MetaBlockSplit = type { %struct.BlockSplit, %struct.BlockSplit, %struct.BlockSplit, ptr, i64, ptr, i64, ptr, i64, ptr, i64, ptr, i64 }
%struct.BlockSplit = type { i64, i64, ptr, ptr, i64, i64 }

; Function Attrs: nounwind uwtable
declare hidden void @BrotliInitDistanceParams(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #0

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

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

; Function Attrs: nounwind uwtable
define hidden void @BrotliBuildMetaBlock(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, ptr noundef %4, i8 noundef zeroext %5, i8 noundef zeroext %6, ptr noundef %7, i64 noundef %8, i32 noundef %9, ptr noundef %10) #0 {
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i8, align 1
  %18 = alloca i8, align 1
  %19 = alloca ptr, align 8
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca double, align 8
  %34 = alloca %struct.BrotliDistanceParams, align 8
  %35 = alloca %struct.BrotliDistanceParams, align 8
  %36 = alloca ptr, align 8
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca double, align 8
  %40 = alloca i32, align 4
  %41 = alloca double, align 8
  %42 = alloca i64, align 8
  store ptr %0, ptr %12, align 8, !tbaa !5
  store ptr %1, ptr %13, align 8, !tbaa !5
  store i64 %2, ptr %14, align 8, !tbaa !9
  store i64 %3, ptr %15, align 8, !tbaa !9
  store ptr %4, ptr %16, align 8, !tbaa !5
  store i8 %5, ptr %17, align 1, !tbaa !11
  store i8 %6, ptr %18, align 1, !tbaa !11
  store ptr %7, ptr %19, align 8, !tbaa !5
  store i64 %8, ptr %20, align 8, !tbaa !9
  store i32 %9, ptr %21, align 4, !tbaa !12
  store ptr %10, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  store ptr null, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  store i64 1, ptr %29, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  store i32 0, ptr %31, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #5
  store i32 1, ptr %32, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #5
  store double 0x547D42AEA2879F2E, ptr %33, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 24, ptr %34) #5
  %43 = load ptr, ptr %16, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.BrotliEncoderParams, ptr %43, i32 0, i32 9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %34, ptr align 8 %44, i64 24, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.start.p0(i64 24, ptr %35) #5
  %45 = load ptr, ptr %16, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.BrotliEncoderParams, ptr %45, i32 0, i32 9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %35, ptr align 8 %46, i64 24, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #5
  %47 = load ptr, ptr %12, align 8, !tbaa !5
  %48 = call ptr @BrotliAllocate(ptr noundef %47, i64 noundef 2192)
  store ptr %48, ptr %36, align 8, !tbaa !5
  store i32 0, ptr %30, align 4, !tbaa !12
  br label %49

49:                                               ; preds = %109, %11
  %50 = load i32, ptr %30, align 4, !tbaa !12
  %51 = icmp ule i32 %50, 3
  br i1 %51, label %52, label %112

52:                                               ; preds = %49
  br label %53

53:                                               ; preds = %97, %52
  %54 = load i32, ptr %31, align 4, !tbaa !12
  %55 = icmp ult i32 %54, 16
  br i1 %55, label %56, label %100

56:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #5
  %57 = load i32, ptr %31, align 4, !tbaa !12
  %58 = load i32, ptr %30, align 4, !tbaa !12
  %59 = shl i32 %57, %58
  store i32 %59, ptr %37, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #5
  %60 = load i32, ptr %30, align 4, !tbaa !12
  %61 = load i32, ptr %37, align 4, !tbaa !12
  %62 = load ptr, ptr %16, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.BrotliEncoderParams, ptr %62, i32 0, i32 7
  %64 = load i32, ptr %63, align 4, !tbaa !17
  call void @BrotliInitDistanceParams(ptr noundef %35, i32 noundef %60, i32 noundef %61, i32 noundef %64)
  %65 = load i32, ptr %30, align 4, !tbaa !12
  %66 = getelementptr inbounds %struct.BrotliDistanceParams, ptr %34, i32 0, i32 0
  %67 = load i32, ptr %66, align 8, !tbaa !27
  %68 = icmp eq i32 %65, %67
  br i1 %68, label %69, label %75

69:                                               ; preds = %56
  %70 = load i32, ptr %37, align 4, !tbaa !12
  %71 = getelementptr inbounds %struct.BrotliDistanceParams, ptr %34, i32 0, i32 1
  %72 = load i32, ptr %71, align 4, !tbaa !28
  %73 = icmp eq i32 %70, %72
  br i1 %73, label %74, label %75

74:                                               ; preds = %69
  store i32 0, ptr %32, align 4, !tbaa !12
  br label %75

75:                                               ; preds = %74, %69, %56
  %76 = load ptr, ptr %19, align 8, !tbaa !5
  %77 = load i64, ptr %20, align 8, !tbaa !9
  %78 = load ptr, ptr %36, align 8, !tbaa !5
  %79 = call i32 @ComputeDistanceCost(ptr noundef %76, i64 noundef %77, ptr noundef %34, ptr noundef %35, ptr noundef %39, ptr noundef %78)
  %80 = icmp ne i32 %79, 0
  %81 = xor i1 %80, true
  %82 = zext i1 %81 to i32
  store i32 %82, ptr %38, align 4, !tbaa !12
  %83 = load i32, ptr %38, align 4, !tbaa !12
  %84 = icmp ne i32 %83, 0
  br i1 %84, label %89, label %85

85:                                               ; preds = %75
  %86 = load double, ptr %39, align 8, !tbaa !14
  %87 = load double, ptr %33, align 8, !tbaa !14
  %88 = fcmp ogt double %86, %87
  br i1 %88, label %89, label %90

89:                                               ; preds = %85, %75
  store i32 5, ptr %40, align 4
  br label %94

90:                                               ; preds = %85
  %91 = load double, ptr %39, align 8, !tbaa !14
  store double %91, ptr %33, align 8, !tbaa !14
  %92 = load ptr, ptr %16, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.BrotliEncoderParams, ptr %92, i32 0, i32 9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %93, ptr align 8 %35, i64 24, i1 false), !tbaa.struct !16
  store i32 0, ptr %40, align 4
  br label %94

94:                                               ; preds = %90, %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #5
  %95 = load i32, ptr %40, align 4
  switch i32 %95, label %424 [
    i32 0, label %96
    i32 5, label %100
  ]

96:                                               ; preds = %94
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %31, align 4, !tbaa !12
  %99 = add i32 %98, 1
  store i32 %99, ptr %31, align 4, !tbaa !12
  br label %53, !llvm.loop !29

100:                                              ; preds = %94, %53
  %101 = load i32, ptr %31, align 4, !tbaa !12
  %102 = icmp ugt i32 %101, 0
  br i1 %102, label %103, label %106

103:                                              ; preds = %100
  %104 = load i32, ptr %31, align 4, !tbaa !12
  %105 = add i32 %104, -1
  store i32 %105, ptr %31, align 4, !tbaa !12
  br label %106

106:                                              ; preds = %103, %100
  %107 = load i32, ptr %31, align 4, !tbaa !12
  %108 = udiv i32 %107, 2
  store i32 %108, ptr %31, align 4, !tbaa !12
  br label %109

109:                                              ; preds = %106
  %110 = load i32, ptr %30, align 4, !tbaa !12
  %111 = add i32 %110, 1
  store i32 %111, ptr %30, align 4, !tbaa !12
  br label %49, !llvm.loop !31

112:                                              ; preds = %49
  %113 = load i32, ptr %32, align 4, !tbaa !12
  %114 = icmp ne i32 %113, 0
  br i1 %114, label %115, label %127

115:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #5
  %116 = load ptr, ptr %19, align 8, !tbaa !5
  %117 = load i64, ptr %20, align 8, !tbaa !9
  %118 = load ptr, ptr %36, align 8, !tbaa !5
  %119 = call i32 @ComputeDistanceCost(ptr noundef %116, i64 noundef %117, ptr noundef %34, ptr noundef %34, ptr noundef %41, ptr noundef %118)
  %120 = load double, ptr %41, align 8, !tbaa !14
  %121 = load double, ptr %33, align 8, !tbaa !14
  %122 = fcmp olt double %120, %121
  br i1 %122, label %123, label %126

123:                                              ; preds = %115
  %124 = load ptr, ptr %16, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.BrotliEncoderParams, ptr %124, i32 0, i32 9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %125, ptr align 8 %34, i64 24, i1 false), !tbaa.struct !16
  br label %126

126:                                              ; preds = %123, %115
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #5
  br label %127

127:                                              ; preds = %126, %112
  %128 = load ptr, ptr %12, align 8, !tbaa !5
  %129 = load ptr, ptr %36, align 8, !tbaa !5
  call void @BrotliFree(ptr noundef %128, ptr noundef %129)
  store ptr null, ptr %36, align 8, !tbaa !5
  %130 = load ptr, ptr %19, align 8, !tbaa !5
  %131 = load i64, ptr %20, align 8, !tbaa !9
  %132 = load ptr, ptr %16, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.BrotliEncoderParams, ptr %132, i32 0, i32 9
  call void @RecomputeDistancePrefixes(ptr noundef %130, i64 noundef %131, ptr noundef %34, ptr noundef %133)
  %134 = load ptr, ptr %12, align 8, !tbaa !5
  %135 = load ptr, ptr %19, align 8, !tbaa !5
  %136 = load i64, ptr %20, align 8, !tbaa !9
  %137 = load ptr, ptr %13, align 8, !tbaa !5
  %138 = load i64, ptr %14, align 8, !tbaa !9
  %139 = load i64, ptr %15, align 8, !tbaa !9
  %140 = load ptr, ptr %16, align 8, !tbaa !5
  %141 = load ptr, ptr %22, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.MetaBlockSplit, ptr %141, i32 0, i32 0
  %143 = load ptr, ptr %22, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.MetaBlockSplit, ptr %143, i32 0, i32 1
  %145 = load ptr, ptr %22, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.MetaBlockSplit, ptr %145, i32 0, i32 2
  call void @BrotliSplitBlock(ptr noundef %134, ptr noundef %135, i64 noundef %136, ptr noundef %137, i64 noundef %138, i64 noundef %139, ptr noundef %140, ptr noundef %142, ptr noundef %144, ptr noundef %146)
  %147 = load ptr, ptr %16, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.BrotliEncoderParams, ptr %147, i32 0, i32 6
  %149 = load i32, ptr %148, align 8, !tbaa !32
  %150 = icmp ne i32 %149, 0
  br i1 %150, label %184, label %151

151:                                              ; preds = %127
  store i64 64, ptr %29, align 8, !tbaa !9
  %152 = load ptr, ptr %22, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.MetaBlockSplit, ptr %152, i32 0, i32 0
  %154 = getelementptr inbounds %struct.BlockSplit, ptr %153, i32 0, i32 0
  %155 = load i64, ptr %154, align 8, !tbaa !33
  %156 = icmp ugt i64 %155, 0
  br i1 %156, label %157, label %165

157:                                              ; preds = %151
  %158 = load ptr, ptr %12, align 8, !tbaa !5
  %159 = load ptr, ptr %22, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.MetaBlockSplit, ptr %159, i32 0, i32 0
  %161 = getelementptr inbounds %struct.BlockSplit, ptr %160, i32 0, i32 0
  %162 = load i64, ptr %161, align 8, !tbaa !33
  %163 = mul i64 %162, 4
  %164 = call ptr @BrotliAllocate(ptr noundef %158, i64 noundef %163)
  br label %166

165:                                              ; preds = %151
  br label %166

166:                                              ; preds = %165, %157
  %167 = phi ptr [ %164, %157 ], [ null, %165 ]
  store ptr %167, ptr %25, align 8, !tbaa !5
  store i64 0, ptr %28, align 8, !tbaa !9
  br label %168

168:                                              ; preds = %180, %166
  %169 = load i64, ptr %28, align 8, !tbaa !9
  %170 = load ptr, ptr %22, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.MetaBlockSplit, ptr %170, i32 0, i32 0
  %172 = getelementptr inbounds %struct.BlockSplit, ptr %171, i32 0, i32 0
  %173 = load i64, ptr %172, align 8, !tbaa !33
  %174 = icmp ult i64 %169, %173
  br i1 %174, label %175, label %183

175:                                              ; preds = %168
  %176 = load i32, ptr %21, align 4, !tbaa !12
  %177 = load ptr, ptr %25, align 8, !tbaa !5
  %178 = load i64, ptr %28, align 8, !tbaa !9
  %179 = getelementptr inbounds i32, ptr %177, i64 %178
  store i32 %176, ptr %179, align 4, !tbaa !12
  br label %180

180:                                              ; preds = %175
  %181 = load i64, ptr %28, align 8, !tbaa !9
  %182 = add i64 %181, 1
  store i64 %182, ptr %28, align 8, !tbaa !9
  br label %168, !llvm.loop !36

183:                                              ; preds = %168
  br label %184

184:                                              ; preds = %183, %127
  %185 = load ptr, ptr %22, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.MetaBlockSplit, ptr %185, i32 0, i32 0
  %187 = getelementptr inbounds %struct.BlockSplit, ptr %186, i32 0, i32 0
  %188 = load i64, ptr %187, align 8, !tbaa !33
  %189 = load i64, ptr %29, align 8, !tbaa !9
  %190 = mul i64 %188, %189
  store i64 %190, ptr %26, align 8, !tbaa !9
  %191 = load i64, ptr %26, align 8, !tbaa !9
  %192 = icmp ugt i64 %191, 0
  br i1 %192, label %193, label %198

193:                                              ; preds = %184
  %194 = load ptr, ptr %12, align 8, !tbaa !5
  %195 = load i64, ptr %26, align 8, !tbaa !9
  %196 = mul i64 %195, 1040
  %197 = call ptr @BrotliAllocate(ptr noundef %194, i64 noundef %196)
  br label %199

198:                                              ; preds = %184
  br label %199

199:                                              ; preds = %198, %193
  %200 = phi ptr [ %197, %193 ], [ null, %198 ]
  store ptr %200, ptr %24, align 8, !tbaa !5
  %201 = load ptr, ptr %24, align 8, !tbaa !5
  %202 = load i64, ptr %26, align 8, !tbaa !9
  call void @ClearHistogramsLiteral(ptr noundef %201, i64 noundef %202)
  %203 = load ptr, ptr %22, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.MetaBlockSplit, ptr %203, i32 0, i32 2
  %205 = getelementptr inbounds %struct.BlockSplit, ptr %204, i32 0, i32 0
  %206 = load i64, ptr %205, align 8, !tbaa !37
  %207 = shl i64 %206, 2
  store i64 %207, ptr %27, align 8, !tbaa !9
  %208 = load i64, ptr %27, align 8, !tbaa !9
  %209 = icmp ugt i64 %208, 0
  br i1 %209, label %210, label %215

210:                                              ; preds = %199
  %211 = load ptr, ptr %12, align 8, !tbaa !5
  %212 = load i64, ptr %27, align 8, !tbaa !9
  %213 = mul i64 %212, 2192
  %214 = call ptr @BrotliAllocate(ptr noundef %211, i64 noundef %213)
  br label %216

215:                                              ; preds = %199
  br label %216

216:                                              ; preds = %215, %210
  %217 = phi ptr [ %214, %210 ], [ null, %215 ]
  store ptr %217, ptr %23, align 8, !tbaa !5
  %218 = load ptr, ptr %23, align 8, !tbaa !5
  %219 = load i64, ptr %27, align 8, !tbaa !9
  call void @ClearHistogramsDistance(ptr noundef %218, i64 noundef %219)
  %220 = load ptr, ptr %22, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.MetaBlockSplit, ptr %220, i32 0, i32 1
  %222 = getelementptr inbounds %struct.BlockSplit, ptr %221, i32 0, i32 0
  %223 = load i64, ptr %222, align 8, !tbaa !38
  %224 = load ptr, ptr %22, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.MetaBlockSplit, ptr %224, i32 0, i32 10
  store i64 %223, ptr %225, align 8, !tbaa !39
  %226 = load ptr, ptr %22, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.MetaBlockSplit, ptr %226, i32 0, i32 10
  %228 = load i64, ptr %227, align 8, !tbaa !39
  %229 = icmp ugt i64 %228, 0
  br i1 %229, label %230, label %237

230:                                              ; preds = %216
  %231 = load ptr, ptr %12, align 8, !tbaa !5
  %232 = load ptr, ptr %22, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.MetaBlockSplit, ptr %232, i32 0, i32 10
  %234 = load i64, ptr %233, align 8, !tbaa !39
  %235 = mul i64 %234, 2832
  %236 = call ptr @BrotliAllocate(ptr noundef %231, i64 noundef %235)
  br label %238

237:                                              ; preds = %216
  br label %238

238:                                              ; preds = %237, %230
  %239 = phi ptr [ %236, %230 ], [ null, %237 ]
  %240 = load ptr, ptr %22, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.MetaBlockSplit, ptr %240, i32 0, i32 9
  store ptr %239, ptr %241, align 8, !tbaa !40
  %242 = load ptr, ptr %22, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.MetaBlockSplit, ptr %242, i32 0, i32 9
  %244 = load ptr, ptr %243, align 8, !tbaa !40
  %245 = load ptr, ptr %22, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.MetaBlockSplit, ptr %245, i32 0, i32 10
  %247 = load i64, ptr %246, align 8, !tbaa !39
  call void @ClearHistogramsCommand(ptr noundef %244, i64 noundef %247)
  %248 = load ptr, ptr %19, align 8, !tbaa !5
  %249 = load i64, ptr %20, align 8, !tbaa !9
  %250 = load ptr, ptr %22, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.MetaBlockSplit, ptr %250, i32 0, i32 0
  %252 = load ptr, ptr %22, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.MetaBlockSplit, ptr %252, i32 0, i32 1
  %254 = load ptr, ptr %22, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.MetaBlockSplit, ptr %254, i32 0, i32 2
  %256 = load ptr, ptr %13, align 8, !tbaa !5
  %257 = load i64, ptr %14, align 8, !tbaa !9
  %258 = load i64, ptr %15, align 8, !tbaa !9
  %259 = load i8, ptr %17, align 1, !tbaa !11
  %260 = load i8, ptr %18, align 1, !tbaa !11
  %261 = load ptr, ptr %25, align 8, !tbaa !5
  %262 = load ptr, ptr %24, align 8, !tbaa !5
  %263 = load ptr, ptr %22, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.MetaBlockSplit, ptr %263, i32 0, i32 9
  %265 = load ptr, ptr %264, align 8, !tbaa !40
  %266 = load ptr, ptr %23, align 8, !tbaa !5
  call void @BrotliBuildHistogramsWithContext(ptr noundef %248, i64 noundef %249, ptr noundef %251, ptr noundef %253, ptr noundef %255, ptr noundef %256, i64 noundef %257, i64 noundef %258, i8 noundef zeroext %259, i8 noundef zeroext %260, ptr noundef %261, ptr noundef %262, ptr noundef %265, ptr noundef %266)
  %267 = load ptr, ptr %12, align 8, !tbaa !5
  %268 = load ptr, ptr %25, align 8, !tbaa !5
  call void @BrotliFree(ptr noundef %267, ptr noundef %268)
  store ptr null, ptr %25, align 8, !tbaa !5
  %269 = load ptr, ptr %22, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.MetaBlockSplit, ptr %269, i32 0, i32 0
  %271 = getelementptr inbounds %struct.BlockSplit, ptr %270, i32 0, i32 0
  %272 = load i64, ptr %271, align 8, !tbaa !33
  %273 = shl i64 %272, 6
  %274 = load ptr, ptr %22, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.MetaBlockSplit, ptr %274, i32 0, i32 4
  store i64 %273, ptr %275, align 8, !tbaa !41
  %276 = load ptr, ptr %22, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.MetaBlockSplit, ptr %276, i32 0, i32 4
  %278 = load i64, ptr %277, align 8, !tbaa !41
  %279 = icmp ugt i64 %278, 0
  br i1 %279, label %280, label %287

280:                                              ; preds = %238
  %281 = load ptr, ptr %12, align 8, !tbaa !5
  %282 = load ptr, ptr %22, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.MetaBlockSplit, ptr %282, i32 0, i32 4
  %284 = load i64, ptr %283, align 8, !tbaa !41
  %285 = mul i64 %284, 4
  %286 = call ptr @BrotliAllocate(ptr noundef %281, i64 noundef %285)
  br label %288

287:                                              ; preds = %238
  br label %288

288:                                              ; preds = %287, %280
  %289 = phi ptr [ %286, %280 ], [ null, %287 ]
  %290 = load ptr, ptr %22, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.MetaBlockSplit, ptr %290, i32 0, i32 3
  store ptr %289, ptr %291, align 8, !tbaa !42
  %292 = load ptr, ptr %22, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.MetaBlockSplit, ptr %292, i32 0, i32 4
  %294 = load i64, ptr %293, align 8, !tbaa !41
  %295 = load ptr, ptr %22, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.MetaBlockSplit, ptr %295, i32 0, i32 8
  store i64 %294, ptr %296, align 8, !tbaa !43
  %297 = load ptr, ptr %22, align 8, !tbaa !5
  %298 = getelementptr inbounds %struct.MetaBlockSplit, ptr %297, i32 0, i32 8
  %299 = load i64, ptr %298, align 8, !tbaa !43
  %300 = icmp ugt i64 %299, 0
  br i1 %300, label %301, label %308

301:                                              ; preds = %288
  %302 = load ptr, ptr %12, align 8, !tbaa !5
  %303 = load ptr, ptr %22, align 8, !tbaa !5
  %304 = getelementptr inbounds %struct.MetaBlockSplit, ptr %303, i32 0, i32 8
  %305 = load i64, ptr %304, align 8, !tbaa !43
  %306 = mul i64 %305, 1040
  %307 = call ptr @BrotliAllocate(ptr noundef %302, i64 noundef %306)
  br label %309

308:                                              ; preds = %288
  br label %309

309:                                              ; preds = %308, %301
  %310 = phi ptr [ %307, %301 ], [ null, %308 ]
  %311 = load ptr, ptr %22, align 8, !tbaa !5
  %312 = getelementptr inbounds %struct.MetaBlockSplit, ptr %311, i32 0, i32 7
  store ptr %310, ptr %312, align 8, !tbaa !44
  %313 = load ptr, ptr %12, align 8, !tbaa !5
  %314 = load ptr, ptr %24, align 8, !tbaa !5
  %315 = load i64, ptr %26, align 8, !tbaa !9
  %316 = load ptr, ptr %22, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.MetaBlockSplit, ptr %316, i32 0, i32 7
  %318 = load ptr, ptr %317, align 8, !tbaa !44
  %319 = load ptr, ptr %22, align 8, !tbaa !5
  %320 = getelementptr inbounds %struct.MetaBlockSplit, ptr %319, i32 0, i32 8
  %321 = load ptr, ptr %22, align 8, !tbaa !5
  %322 = getelementptr inbounds %struct.MetaBlockSplit, ptr %321, i32 0, i32 3
  %323 = load ptr, ptr %322, align 8, !tbaa !42
  call void @BrotliClusterHistogramsLiteral(ptr noundef %313, ptr noundef %314, i64 noundef %315, i64 noundef 256, ptr noundef %318, ptr noundef %320, ptr noundef %323)
  %324 = load ptr, ptr %12, align 8, !tbaa !5
  %325 = load ptr, ptr %24, align 8, !tbaa !5
  call void @BrotliFree(ptr noundef %324, ptr noundef %325)
  store ptr null, ptr %24, align 8, !tbaa !5
  %326 = load ptr, ptr %16, align 8, !tbaa !5
  %327 = getelementptr inbounds %struct.BrotliEncoderParams, ptr %326, i32 0, i32 6
  %328 = load i32, ptr %327, align 8, !tbaa !32
  %329 = icmp ne i32 %328, 0
  br i1 %329, label %330, label %364

330:                                              ; preds = %309
  %331 = load ptr, ptr %22, align 8, !tbaa !5
  %332 = getelementptr inbounds %struct.MetaBlockSplit, ptr %331, i32 0, i32 0
  %333 = getelementptr inbounds %struct.BlockSplit, ptr %332, i32 0, i32 0
  %334 = load i64, ptr %333, align 8, !tbaa !33
  store i64 %334, ptr %28, align 8, !tbaa !9
  br label %335

335:                                              ; preds = %362, %330
  %336 = load i64, ptr %28, align 8, !tbaa !9
  %337 = icmp ne i64 %336, 0
  br i1 %337, label %338, label %363

338:                                              ; preds = %335
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #5
  store i64 0, ptr %42, align 8, !tbaa !9
  %339 = load i64, ptr %28, align 8, !tbaa !9
  %340 = add i64 %339, -1
  store i64 %340, ptr %28, align 8, !tbaa !9
  br label %341

341:                                              ; preds = %359, %338
  %342 = load i64, ptr %42, align 8, !tbaa !9
  %343 = icmp ult i64 %342, 64
  br i1 %343, label %344, label %362

344:                                              ; preds = %341
  %345 = load ptr, ptr %22, align 8, !tbaa !5
  %346 = getelementptr inbounds %struct.MetaBlockSplit, ptr %345, i32 0, i32 3
  %347 = load ptr, ptr %346, align 8, !tbaa !42
  %348 = load i64, ptr %28, align 8, !tbaa !9
  %349 = getelementptr inbounds i32, ptr %347, i64 %348
  %350 = load i32, ptr %349, align 4, !tbaa !12
  %351 = load ptr, ptr %22, align 8, !tbaa !5
  %352 = getelementptr inbounds %struct.MetaBlockSplit, ptr %351, i32 0, i32 3
  %353 = load ptr, ptr %352, align 8, !tbaa !42
  %354 = load i64, ptr %28, align 8, !tbaa !9
  %355 = shl i64 %354, 6
  %356 = load i64, ptr %42, align 8, !tbaa !9
  %357 = add i64 %355, %356
  %358 = getelementptr inbounds i32, ptr %353, i64 %357
  store i32 %350, ptr %358, align 4, !tbaa !12
  br label %359

359:                                              ; preds = %344
  %360 = load i64, ptr %42, align 8, !tbaa !9
  %361 = add i64 %360, 1
  store i64 %361, ptr %42, align 8, !tbaa !9
  br label %341, !llvm.loop !45

362:                                              ; preds = %341
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #5
  br label %335, !llvm.loop !46

363:                                              ; preds = %335
  br label %364

364:                                              ; preds = %363, %309
  %365 = load ptr, ptr %22, align 8, !tbaa !5
  %366 = getelementptr inbounds %struct.MetaBlockSplit, ptr %365, i32 0, i32 2
  %367 = getelementptr inbounds %struct.BlockSplit, ptr %366, i32 0, i32 0
  %368 = load i64, ptr %367, align 8, !tbaa !37
  %369 = shl i64 %368, 2
  %370 = load ptr, ptr %22, align 8, !tbaa !5
  %371 = getelementptr inbounds %struct.MetaBlockSplit, ptr %370, i32 0, i32 6
  store i64 %369, ptr %371, align 8, !tbaa !47
  %372 = load ptr, ptr %22, align 8, !tbaa !5
  %373 = getelementptr inbounds %struct.MetaBlockSplit, ptr %372, i32 0, i32 6
  %374 = load i64, ptr %373, align 8, !tbaa !47
  %375 = icmp ugt i64 %374, 0
  br i1 %375, label %376, label %383

376:                                              ; preds = %364
  %377 = load ptr, ptr %12, align 8, !tbaa !5
  %378 = load ptr, ptr %22, align 8, !tbaa !5
  %379 = getelementptr inbounds %struct.MetaBlockSplit, ptr %378, i32 0, i32 6
  %380 = load i64, ptr %379, align 8, !tbaa !47
  %381 = mul i64 %380, 4
  %382 = call ptr @BrotliAllocate(ptr noundef %377, i64 noundef %381)
  br label %384

383:                                              ; preds = %364
  br label %384

384:                                              ; preds = %383, %376
  %385 = phi ptr [ %382, %376 ], [ null, %383 ]
  %386 = load ptr, ptr %22, align 8, !tbaa !5
  %387 = getelementptr inbounds %struct.MetaBlockSplit, ptr %386, i32 0, i32 5
  store ptr %385, ptr %387, align 8, !tbaa !48
  %388 = load ptr, ptr %22, align 8, !tbaa !5
  %389 = getelementptr inbounds %struct.MetaBlockSplit, ptr %388, i32 0, i32 6
  %390 = load i64, ptr %389, align 8, !tbaa !47
  %391 = load ptr, ptr %22, align 8, !tbaa !5
  %392 = getelementptr inbounds %struct.MetaBlockSplit, ptr %391, i32 0, i32 12
  store i64 %390, ptr %392, align 8, !tbaa !49
  %393 = load ptr, ptr %22, align 8, !tbaa !5
  %394 = getelementptr inbounds %struct.MetaBlockSplit, ptr %393, i32 0, i32 12
  %395 = load i64, ptr %394, align 8, !tbaa !49
  %396 = icmp ugt i64 %395, 0
  br i1 %396, label %397, label %404

397:                                              ; preds = %384
  %398 = load ptr, ptr %12, align 8, !tbaa !5
  %399 = load ptr, ptr %22, align 8, !tbaa !5
  %400 = getelementptr inbounds %struct.MetaBlockSplit, ptr %399, i32 0, i32 12
  %401 = load i64, ptr %400, align 8, !tbaa !49
  %402 = mul i64 %401, 2192
  %403 = call ptr @BrotliAllocate(ptr noundef %398, i64 noundef %402)
  br label %405

404:                                              ; preds = %384
  br label %405

405:                                              ; preds = %404, %397
  %406 = phi ptr [ %403, %397 ], [ null, %404 ]
  %407 = load ptr, ptr %22, align 8, !tbaa !5
  %408 = getelementptr inbounds %struct.MetaBlockSplit, ptr %407, i32 0, i32 11
  store ptr %406, ptr %408, align 8, !tbaa !50
  %409 = load ptr, ptr %12, align 8, !tbaa !5
  %410 = load ptr, ptr %23, align 8, !tbaa !5
  %411 = load ptr, ptr %22, align 8, !tbaa !5
  %412 = getelementptr inbounds %struct.MetaBlockSplit, ptr %411, i32 0, i32 6
  %413 = load i64, ptr %412, align 8, !tbaa !47
  %414 = load ptr, ptr %22, align 8, !tbaa !5
  %415 = getelementptr inbounds %struct.MetaBlockSplit, ptr %414, i32 0, i32 11
  %416 = load ptr, ptr %415, align 8, !tbaa !50
  %417 = load ptr, ptr %22, align 8, !tbaa !5
  %418 = getelementptr inbounds %struct.MetaBlockSplit, ptr %417, i32 0, i32 12
  %419 = load ptr, ptr %22, align 8, !tbaa !5
  %420 = getelementptr inbounds %struct.MetaBlockSplit, ptr %419, i32 0, i32 5
  %421 = load ptr, ptr %420, align 8, !tbaa !48
  call void @BrotliClusterHistogramsDistance(ptr noundef %409, ptr noundef %410, i64 noundef %413, i64 noundef 256, ptr noundef %416, ptr noundef %418, ptr noundef %421)
  %422 = load ptr, ptr %12, align 8, !tbaa !5
  %423 = load ptr, ptr %23, align 8, !tbaa !5
  call void @BrotliFree(ptr noundef %422, ptr noundef %423)
  store ptr null, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  ret void

424:                                              ; preds = %94
  unreachable
}

; 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

declare hidden ptr @BrotliAllocate(ptr noundef, i64 noundef) #3

; Function Attrs: nounwind uwtable
declare hidden i32 @ComputeDistanceCost(ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

declare hidden void @BrotliFree(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @RecomputeDistancePrefixes(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #0

declare hidden void @BrotliSplitBlock(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @ClearHistogramsLiteral(ptr noundef, i64 noundef) #4

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @ClearHistogramsDistance(ptr noundef, i64 noundef) #4

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @ClearHistogramsCommand(ptr noundef, i64 noundef) #4

declare hidden void @BrotliBuildHistogramsWithContext(ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef, i8 noundef zeroext, i8 noundef zeroext, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare hidden void @BrotliClusterHistogramsLiteral(ptr noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare hidden void @BrotliClusterHistogramsDistance(ptr noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) #3

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { alwaysinline 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 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = !{i64 0, i64 4, !12, i64 4, i64 4, !12, i64 8, i64 4, !12, i64 12, i64 4, !12, i64 16, i64 8, !9}
!17 = !{!18, !13, i64 36}
!18 = !{!"BrotliEncoderParams", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !10, i64 16, !10, i64 24, !13, i64 32, !13, i64 36, !19, i64 40, !20, i64 56, !21, i64 80}
!19 = !{!"BrotliHasherParams", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12}
!20 = !{!"BrotliDistanceParams", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !10, i64 16}
!21 = !{!"SharedEncoderDictionary", !13, i64 0, !22, i64 8, !23, i64 544, !13, i64 1312}
!22 = !{!"CompoundDictionary", !10, i64 0, !10, i64 8, !7, i64 16, !7, i64 144, !7, i64 272, !10, i64 400, !7, i64 408}
!23 = !{!"ContextualEncoderDictionary", !13, i64 0, !7, i64 4, !7, i64 5, !7, i64 72, !10, i64 584, !24, i64 592, !6, i64 760}
!24 = !{!"BrotliEncoderDictionary", !6, i64 0, !13, i64 8, !13, i64 12, !10, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !25, i64 56, !13, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !10, i64 128, !6, i64 136, !10, i64 144, !6, i64 152, !6, i64 160}
!25 = !{!"BrotliTrie", !6, i64 0, !10, i64 8, !10, i64 16, !26, i64 24}
!26 = !{!"BrotliTrieNode", !7, i64 0, !7, i64 1, !7, i64 2, !13, i64 4, !13, i64 8}
!27 = !{!20, !13, i64 0}
!28 = !{!20, !13, i64 4}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30}
!32 = !{!18, !13, i64 32}
!33 = !{!34, !10, i64 0}
!34 = !{!"MetaBlockSplit", !35, i64 0, !35, i64 48, !35, i64 96, !6, i64 144, !10, i64 152, !6, i64 160, !10, i64 168, !6, i64 176, !10, i64 184, !6, i64 192, !10, i64 200, !6, i64 208, !10, i64 216}
!35 = !{!"BlockSplit", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !10, i64 40}
!36 = distinct !{!36, !30}
!37 = !{!34, !10, i64 96}
!38 = !{!34, !10, i64 48}
!39 = !{!34, !10, i64 200}
!40 = !{!34, !6, i64 192}
!41 = !{!34, !10, i64 152}
!42 = !{!34, !6, i64 144}
!43 = !{!34, !10, i64 184}
!44 = !{!34, !6, i64 176}
!45 = distinct !{!45, !30}
!46 = distinct !{!46, !30}
!47 = !{!34, !10, i64 168}
!48 = !{!34, !6, i64 160}
!49 = !{!34, !10, i64 216}
!50 = !{!34, !6, i64 208}


; 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"

%struct.BrotliDistanceParams = type { i32, i32, i32, i32, i64 }

; Function Attrs: nounwind uwtable
declare hidden void @BrotliInitDistanceParams(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
define hidden void @BrotliBuildMetaBlock(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, ptr noundef %4, i8 noundef zeroext %5, i8 noundef zeroext %6, ptr noundef %7, i64 noundef %8, i32 noundef %9, ptr noundef %10) local_unnamed_addr #0 {
.lr.ph.preheader:
  %11 = alloca %struct.BrotliDistanceParams, align 8
  %12 = alloca %struct.BrotliDistanceParams, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #6
  %15 = getelementptr inbounds i8, ptr %4, i64 56
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %15, i64 24, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %15, i64 24, i1 false), !tbaa.struct !5
  %16 = tail call ptr @BrotliAllocate(ptr noundef %0, i64 noundef 2192) #6
  %17 = getelementptr inbounds i8, ptr %4, i64 36
  %18 = getelementptr inbounds i8, ptr %11, i64 4
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %28
  %.1198 = phi double [ %26, %28 ], [ 0x547D42AEA2879F2E, %.lr.ph.preheader ]
  %.1145197 = phi i32 [ %.2146, %28 ], [ 1, %.lr.ph.preheader ]
  %.1149196 = phi i32 [ %29, %28 ], [ 0, %.lr.ph.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %19 = load i32, ptr %17, align 4, !tbaa !12
  call void @BrotliInitDistanceParams(ptr noundef nonnull %12, i32 noundef 0, i32 noundef %.1149196, i32 noundef %19)
  %20 = load i32, ptr %11, align 8, !tbaa !23
  %21 = icmp eq i32 %20, 0
  %22 = load i32, ptr %18, align 4
  %23 = icmp eq i32 %.1149196, %22
  %or.cond = select i1 %21, i1 %23, i1 false
  %.2146 = select i1 %or.cond, i32 0, i32 %.1145197
  %24 = call i32 @ComputeDistanceCost(ptr noundef %7, i64 noundef %8, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef %16)
  %.not176 = icmp eq i32 %24, 0
  br i1 %.not176, label %.thread, label %25

25:                                               ; preds = %.lr.ph
  %26 = load double, ptr %13, align 8, !tbaa !24
  %27 = fcmp ogt double %26, %.1198
  br i1 %27, label %.thread, label %28

.thread:                                          ; preds = %25, %.lr.ph
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  br label %.loopexit190

28:                                               ; preds = %25
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %12, i64 24, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  %29 = add nuw nsw i32 %.1149196, 1
  %exitcond.not = icmp eq i32 %29, 16
  br i1 %exitcond.not, label %.loopexit190, label %.lr.ph, !llvm.loop !26

.loopexit190:                                     ; preds = %28, %.thread
  %.1149195 = phi i32 [ %.1149196, %.thread ], [ 16, %28 ]
  %.1192 = phi double [ %.1198, %.thread ], [ %26, %28 ]
  %spec.select = call i32 @llvm.usub.sat.i32(i32 %.1149195, i32 1)
  %30 = lshr i32 %spec.select, 1
  %31 = icmp ult i32 %spec.select, 32
  br i1 %31, label %.lr.ph.1, label %.loopexit190.1

.lr.ph.1:                                         ; preds = %.loopexit190, %42
  %.1198.1 = phi double [ %40, %42 ], [ %.1192, %.loopexit190 ]
  %.1145197.1 = phi i32 [ %.2146.1, %42 ], [ %.2146, %.loopexit190 ]
  %.1149196.1 = phi i32 [ %43, %42 ], [ %30, %.loopexit190 ]
  %32 = shl nuw nsw i32 %.1149196.1, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %33 = load i32, ptr %17, align 4, !tbaa !12
  call void @BrotliInitDistanceParams(ptr noundef nonnull %12, i32 noundef 1, i32 noundef %32, i32 noundef %33)
  %34 = load i32, ptr %11, align 8, !tbaa !23
  %35 = icmp eq i32 %34, 1
  %36 = load i32, ptr %18, align 4
  %37 = icmp eq i32 %32, %36
  %or.cond.1 = select i1 %35, i1 %37, i1 false
  %.2146.1 = select i1 %or.cond.1, i32 0, i32 %.1145197.1
  %38 = call i32 @ComputeDistanceCost(ptr noundef %7, i64 noundef %8, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef %16)
  %.not176.1 = icmp eq i32 %38, 0
  br i1 %.not176.1, label %.thread.1, label %39

39:                                               ; preds = %.lr.ph.1
  %40 = load double, ptr %13, align 8, !tbaa !24
  %41 = fcmp ogt double %40, %.1198.1
  br i1 %41, label %.thread.1, label %42

42:                                               ; preds = %39
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %12, i64 24, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  %43 = add nuw i32 %.1149196.1, 1
  %exitcond.1.not = icmp eq i32 %43, 16
  br i1 %exitcond.1.not, label %.loopexit190.1, label %.lr.ph.1, !llvm.loop !26

.thread.1:                                        ; preds = %39, %.lr.ph.1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  br label %.loopexit190.1

.loopexit190.1:                                   ; preds = %42, %.thread.1, %.loopexit190
  %.1149195.1 = phi i32 [ %.1149196.1, %.thread.1 ], [ %30, %.loopexit190 ], [ 16, %42 ]
  %.1192.1 = phi double [ %.1198.1, %.thread.1 ], [ %.1192, %.loopexit190 ], [ %40, %42 ]
  %.3147.1 = phi i32 [ %.2146.1, %.thread.1 ], [ %.2146, %.loopexit190 ], [ %.2146.1, %42 ]
  %spec.select.1 = call i32 @llvm.usub.sat.i32(i32 %.1149195.1, i32 1)
  %44 = lshr i32 %spec.select.1, 1
  %45 = icmp ult i32 %spec.select.1, 32
  br i1 %45, label %.lr.ph.2, label %.loopexit190.2

.lr.ph.2:                                         ; preds = %.loopexit190.1, %56
  %.1198.2 = phi double [ %54, %56 ], [ %.1192.1, %.loopexit190.1 ]
  %.1145197.2 = phi i32 [ %.2146.2, %56 ], [ %.3147.1, %.loopexit190.1 ]
  %.1149196.2 = phi i32 [ %57, %56 ], [ %44, %.loopexit190.1 ]
  %46 = shl nuw nsw i32 %.1149196.2, 2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %47 = load i32, ptr %17, align 4, !tbaa !12
  call void @BrotliInitDistanceParams(ptr noundef nonnull %12, i32 noundef 2, i32 noundef %46, i32 noundef %47)
  %48 = load i32, ptr %11, align 8, !tbaa !23
  %49 = icmp eq i32 %48, 2
  %50 = load i32, ptr %18, align 4
  %51 = icmp eq i32 %46, %50
  %or.cond.2 = select i1 %49, i1 %51, i1 false
  %.2146.2 = select i1 %or.cond.2, i32 0, i32 %.1145197.2
  %52 = call i32 @ComputeDistanceCost(ptr noundef %7, i64 noundef %8, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef %16)
  %.not176.2 = icmp eq i32 %52, 0
  br i1 %.not176.2, label %.thread.2, label %53

53:                                               ; preds = %.lr.ph.2
  %54 = load double, ptr %13, align 8, !tbaa !24
  %55 = fcmp ogt double %54, %.1198.2
  br i1 %55, label %.thread.2, label %56

56:                                               ; preds = %53
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %12, i64 24, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  %57 = add nuw i32 %.1149196.2, 1
  %exitcond.2.not = icmp eq i32 %57, 16
  br i1 %exitcond.2.not, label %.loopexit190.2, label %.lr.ph.2, !llvm.loop !26

.thread.2:                                        ; preds = %53, %.lr.ph.2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  br label %.loopexit190.2

.loopexit190.2:                                   ; preds = %56, %.thread.2, %.loopexit190.1
  %.1149195.2 = phi i32 [ %.1149196.2, %.thread.2 ], [ %44, %.loopexit190.1 ], [ 16, %56 ]
  %.1192.2 = phi double [ %.1198.2, %.thread.2 ], [ %.1192.1, %.loopexit190.1 ], [ %54, %56 ]
  %.3147.2 = phi i32 [ %.2146.2, %.thread.2 ], [ %.3147.1, %.loopexit190.1 ], [ %.2146.2, %56 ]
  %spec.select.2 = call i32 @llvm.usub.sat.i32(i32 %.1149195.2, i32 1)
  %58 = icmp ult i32 %spec.select.2, 32
  br i1 %58, label %.lr.ph.preheader.3, label %.loopexit190.3

.lr.ph.preheader.3:                               ; preds = %.loopexit190.2
  %59 = lshr i32 %spec.select.2, 1
  br label %.lr.ph.3

.lr.ph.3:                                         ; preds = %70, %.lr.ph.preheader.3
  %.1198.3 = phi double [ %68, %70 ], [ %.1192.2, %.lr.ph.preheader.3 ]
  %.1145197.3 = phi i32 [ %.2146.3, %70 ], [ %.3147.2, %.lr.ph.preheader.3 ]
  %.1149196.3 = phi i32 [ %71, %70 ], [ %59, %.lr.ph.preheader.3 ]
  %60 = shl nuw nsw i32 %.1149196.3, 3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %61 = load i32, ptr %17, align 4, !tbaa !12
  call void @BrotliInitDistanceParams(ptr noundef nonnull %12, i32 noundef 3, i32 noundef %60, i32 noundef %61)
  %62 = load i32, ptr %11, align 8, !tbaa !23
  %63 = icmp eq i32 %62, 3
  %64 = load i32, ptr %18, align 4
  %65 = icmp eq i32 %60, %64
  %or.cond.3 = select i1 %63, i1 %65, i1 false
  %.2146.3 = select i1 %or.cond.3, i32 0, i32 %.1145197.3
  %66 = call i32 @ComputeDistanceCost(ptr noundef %7, i64 noundef %8, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef %16)
  %.not176.3 = icmp eq i32 %66, 0
  br i1 %.not176.3, label %.thread.3, label %67

67:                                               ; preds = %.lr.ph.3
  %68 = load double, ptr %13, align 8, !tbaa !24
  %69 = fcmp ogt double %68, %.1198.3
  br i1 %69, label %.thread.3, label %70

70:                                               ; preds = %67
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %12, i64 24, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  %71 = add nuw i32 %.1149196.3, 1
  %exitcond.3.not = icmp eq i32 %71, 16
  br i1 %exitcond.3.not, label %.loopexit190.3, label %.lr.ph.3, !llvm.loop !26

.thread.3:                                        ; preds = %67, %.lr.ph.3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  br label %.loopexit190.3

.loopexit190.3:                                   ; preds = %70, %.thread.3, %.loopexit190.2
  %.1192.3 = phi double [ %.1198.3, %.thread.3 ], [ %.1192.2, %.loopexit190.2 ], [ %68, %70 ]
  %.3147.3 = phi i32 [ %.2146.3, %.thread.3 ], [ %.3147.2, %.loopexit190.2 ], [ %.2146.3, %70 ]
  %.not = icmp eq i32 %.3147.3, 0
  br i1 %.not, label %78, label %72

72:                                               ; preds = %.loopexit190.3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  %73 = call i32 @ComputeDistanceCost(ptr noundef %7, i64 noundef %8, ptr noundef nonnull %11, ptr noundef nonnull %11, ptr noundef nonnull %14, ptr noundef %16)
  %74 = load double, ptr %14, align 8, !tbaa !24
  %75 = fcmp olt double %74, %.1192.3
  br i1 %75, label %76, label %77

76:                                               ; preds = %72
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %11, i64 24, i1 false), !tbaa.struct !5
  br label %77

77:                                               ; preds = %76, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  br label %78

78:                                               ; preds = %77, %.loopexit190.3
  call void @BrotliFree(ptr noundef %0, ptr noundef %16) #6
  call void @RecomputeDistancePrefixes(ptr noundef %7, i64 noundef %8, ptr noundef nonnull %11, ptr noundef nonnull %15)
  %79 = getelementptr inbounds i8, ptr %10, i64 48
  %80 = getelementptr inbounds i8, ptr %10, i64 96
  call void @BrotliSplitBlock(ptr noundef %0, ptr noundef %7, i64 noundef %8, ptr noundef %1, i64 noundef %2, i64 noundef %3, ptr noundef nonnull %4, ptr noundef %10, ptr noundef nonnull %79, ptr noundef nonnull %80) #6
  %81 = getelementptr inbounds i8, ptr %4, i64 32
  %82 = load i32, ptr %81, align 8, !tbaa !28
  %.not165 = icmp eq i32 %82, 0
  %.pre219 = load i64, ptr %10, align 8, !tbaa !29
  br i1 %.not165, label %83, label %.loopexit189

83:                                               ; preds = %78
  %.not166 = icmp eq i64 %.pre219, 0
  br i1 %.not166, label %.loopexit189, label %84

84:                                               ; preds = %83
  %85 = shl i64 %.pre219, 2
  %86 = call ptr @BrotliAllocate(ptr noundef %0, i64 noundef %85) #6
  %.pre = load i64, ptr %10, align 8, !tbaa !29
  %.not211 = icmp eq i64 %.pre, 0
  br i1 %.not211, label %.loopexit189, label %.lr.ph206.preheader

.lr.ph206.preheader:                              ; preds = %84
  %min.iters.check = icmp ult i64 %.pre, 8
  br i1 %min.iters.check, label %.lr.ph206.preheader266, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph206.preheader
  %n.vec = and i64 %.pre, -8
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %9, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %87 = getelementptr inbounds i32, ptr %86, i64 %index
  %88 = getelementptr inbounds i8, ptr %87, i64 16
  store <4 x i32> %broadcast.splat, ptr %87, align 4, !tbaa !6
  store <4 x i32> %broadcast.splat, ptr %88, align 4, !tbaa !6
  %index.next = add nuw i64 %index, 8
  %89 = icmp eq i64 %index.next, %n.vec
  br i1 %89, label %middle.block, label %vector.body, !llvm.loop !32

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %.pre, %n.vec
  br i1 %cmp.n, label %.loopexit189, label %.lr.ph206.preheader266

.lr.ph206.preheader266:                           ; preds = %middle.block, %.lr.ph206.preheader
  %.0153205.ph = phi i64 [ 0, %.lr.ph206.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph206

.lr.ph206:                                        ; preds = %.lr.ph206.preheader266, %.lr.ph206
  %.0153205 = phi i64 [ %91, %.lr.ph206 ], [ %.0153205.ph, %.lr.ph206.preheader266 ]
  %90 = getelementptr inbounds i32, ptr %86, i64 %.0153205
  store i32 %9, ptr %90, align 4, !tbaa !6
  %91 = add nuw i64 %.0153205, 1
  %exitcond217.not = icmp eq i64 %91, %.pre
  br i1 %exitcond217.not, label %.loopexit189, label %.lr.ph206, !llvm.loop !35

.loopexit189:                                     ; preds = %.lr.ph206, %middle.block, %83, %84, %78
  %92 = phi i64 [ %.pre219, %78 ], [ 0, %84 ], [ 0, %83 ], [ %.pre, %middle.block ], [ %.pre, %.lr.ph206 ]
  %.0155 = phi ptr [ null, %78 ], [ %86, %84 ], [ null, %83 ], [ %86, %middle.block ], [ %86, %.lr.ph206 ]
  %.0152 = phi i64 [ 1, %78 ], [ 64, %84 ], [ 64, %83 ], [ 64, %middle.block ], [ 64, %.lr.ph206 ]
  %93 = mul i64 %92, %.0152
  %.not167 = icmp eq i64 %93, 0
  br i1 %.not167, label %97, label %94

94:                                               ; preds = %.loopexit189
  %95 = mul i64 %93, 1040
  %96 = call ptr @BrotliAllocate(ptr noundef %0, i64 noundef %95) #6
  br label %97

97:                                               ; preds = %.loopexit189, %94
  %98 = phi ptr [ %96, %94 ], [ null, %.loopexit189 ]
  call void @ClearHistogramsLiteral(ptr noundef %98, i64 noundef %93)
  %99 = load i64, ptr %80, align 8, !tbaa !36
  %100 = shl i64 %99, 2
  %.not168 = icmp eq i64 %100, 0
  br i1 %.not168, label %104, label %101

101:                                              ; preds = %97
  %102 = mul i64 %99, 8768
  %103 = call ptr @BrotliAllocate(ptr noundef %0, i64 noundef %102) #6
  br label %104

104:                                              ; preds = %97, %101
  %105 = phi ptr [ %103, %101 ], [ null, %97 ]
  call void @ClearHistogramsDistance(ptr noundef %105, i64 noundef %100)
  %106 = load i64, ptr %79, align 8, !tbaa !37
  %107 = getelementptr inbounds i8, ptr %10, i64 200
  store i64 %106, ptr %107, align 8, !tbaa !38
  %.not169 = icmp eq i64 %106, 0
  br i1 %.not169, label %111, label %108

108:                                              ; preds = %104
  %109 = mul i64 %106, 2832
  %110 = call ptr @BrotliAllocate(ptr noundef %0, i64 noundef %109) #6
  %.pre220 = load i64, ptr %107, align 8, !tbaa !38
  br label %111

111:                                              ; preds = %104, %108
  %112 = phi i64 [ %.pre220, %108 ], [ 0, %104 ]
  %113 = phi ptr [ %110, %108 ], [ null, %104 ]
  %114 = getelementptr inbounds i8, ptr %10, i64 192
  store ptr %113, ptr %114, align 8, !tbaa !39
  call void @ClearHistogramsCommand(ptr noundef %113, i64 noundef %112)
  %115 = load ptr, ptr %114, align 8, !tbaa !39
  call void @BrotliBuildHistogramsWithContext(ptr noundef %7, i64 noundef %8, ptr noundef nonnull %10, ptr noundef nonnull %79, ptr noundef nonnull %80, ptr noundef %1, i64 noundef %2, i64 noundef %3, i8 noundef zeroext %5, i8 noundef zeroext %6, ptr noundef %.0155, ptr noundef %98, ptr noundef %115, ptr noundef %105) #6
  call void @BrotliFree(ptr noundef %0, ptr noundef %.0155) #6
  %116 = load i64, ptr %10, align 8, !tbaa !29
  %117 = shl i64 %116, 6
  %118 = getelementptr inbounds i8, ptr %10, i64 152
  store i64 %117, ptr %118, align 8, !tbaa !40
  %.not170 = icmp eq i64 %117, 0
  br i1 %.not170, label %.thread183, label %121

.thread183:                                       ; preds = %111
  %119 = getelementptr inbounds i8, ptr %10, i64 144
  store ptr null, ptr %119, align 8, !tbaa !41
  %120 = getelementptr inbounds i8, ptr %10, i64 184
  store i64 0, ptr %120, align 8, !tbaa !42
  br label %129

121:                                              ; preds = %111
  %122 = shl i64 %116, 8
  %123 = call ptr @BrotliAllocate(ptr noundef %0, i64 noundef %122) #6
  %.pr = load i64, ptr %118, align 8, !tbaa !40
  %124 = getelementptr inbounds i8, ptr %10, i64 144
  store ptr %123, ptr %124, align 8, !tbaa !41
  %125 = getelementptr inbounds i8, ptr %10, i64 184
  store i64 %.pr, ptr %125, align 8, !tbaa !42
  %.not171 = icmp eq i64 %.pr, 0
  br i1 %.not171, label %129, label %126

126:                                              ; preds = %121
  %127 = mul i64 %.pr, 1040
  %128 = call ptr @BrotliAllocate(ptr noundef %0, i64 noundef %127) #6
  %.pre221 = load ptr, ptr %124, align 8, !tbaa !41
  br label %129

129:                                              ; preds = %.thread183, %121, %126
  %130 = phi ptr [ %.pre221, %126 ], [ %123, %121 ], [ null, %.thread183 ]
  %131 = phi ptr [ %125, %126 ], [ %125, %121 ], [ %120, %.thread183 ]
  %132 = phi ptr [ %124, %126 ], [ %124, %121 ], [ %119, %.thread183 ]
  %133 = phi ptr [ %128, %126 ], [ null, %121 ], [ null, %.thread183 ]
  %134 = getelementptr inbounds i8, ptr %10, i64 176
  store ptr %133, ptr %134, align 8, !tbaa !43
  call void @BrotliClusterHistogramsLiteral(ptr noundef %0, ptr noundef %98, i64 noundef %93, i64 noundef 256, ptr noundef %133, ptr noundef nonnull %131, ptr noundef %130) #6
  call void @BrotliFree(ptr noundef %0, ptr noundef %98) #6
  %135 = load i32, ptr %81, align 8, !tbaa !28
  %.not172 = icmp eq i32 %135, 0
  br i1 %.not172, label %.loopexit188, label %136

136:                                              ; preds = %129
  %137 = load i64, ptr %10, align 8, !tbaa !29
  %.not173208 = icmp eq i64 %137, 0
  br i1 %.not173208, label %.loopexit188, label %.lr.ph210

.lr.ph210:                                        ; preds = %136
  %138 = load ptr, ptr %132, align 8, !tbaa !41
  br label %vector.ph259

vector.ph259:                                     ; preds = %.lr.ph210, %vector.ph259
  %.1154209 = phi i64 [ %137, %.lr.ph210 ], [ %139, %vector.ph259 ]
  %139 = add i64 %.1154209, -1
  %140 = getelementptr inbounds i32, ptr %138, i64 %139
  %.pre222 = load i32, ptr %140, align 4, !tbaa !6
  %broadcast.splatinsert263 = insertelement <4 x i32> poison, i32 %.pre222, i64 0
  %broadcast.splat264 = shufflevector <4 x i32> %broadcast.splatinsert263, <4 x i32> poison, <4 x i32> zeroinitializer
  %.idx = shl i64 %139, 8
  %invariant.gep = getelementptr i8, ptr %138, i64 %.idx
  %141 = getelementptr i8, ptr %invariant.gep, i64 16
  store <4 x i32> %broadcast.splat264, ptr %invariant.gep, align 4, !tbaa !6
  store <4 x i32> %broadcast.splat264, ptr %141, align 4, !tbaa !6
  %142 = getelementptr i8, ptr %invariant.gep, i64 32
  %143 = getelementptr i8, ptr %invariant.gep, i64 48
  store <4 x i32> %broadcast.splat264, ptr %142, align 4, !tbaa !6
  store <4 x i32> %broadcast.splat264, ptr %143, align 4, !tbaa !6
  %144 = getelementptr i8, ptr %invariant.gep, i64 64
  %145 = getelementptr i8, ptr %invariant.gep, i64 80
  store <4 x i32> %broadcast.splat264, ptr %144, align 4, !tbaa !6
  store <4 x i32> %broadcast.splat264, ptr %145, align 4, !tbaa !6
  %146 = getelementptr i8, ptr %invariant.gep, i64 96
  %147 = getelementptr i8, ptr %invariant.gep, i64 112
  store <4 x i32> %broadcast.splat264, ptr %146, align 4, !tbaa !6
  store <4 x i32> %broadcast.splat264, ptr %147, align 4, !tbaa !6
  %148 = getelementptr i8, ptr %invariant.gep, i64 128
  %149 = getelementptr i8, ptr %invariant.gep, i64 144
  store <4 x i32> %broadcast.splat264, ptr %148, align 4, !tbaa !6
  store <4 x i32> %broadcast.splat264, ptr %149, align 4, !tbaa !6
  %150 = getelementptr i8, ptr %invariant.gep, i64 160
  %151 = getelementptr i8, ptr %invariant.gep, i64 176
  store <4 x i32> %broadcast.splat264, ptr %150, align 4, !tbaa !6
  store <4 x i32> %broadcast.splat264, ptr %151, align 4, !tbaa !6
  %152 = getelementptr i8, ptr %invariant.gep, i64 192
  %153 = getelementptr i8, ptr %invariant.gep, i64 208
  store <4 x i32> %broadcast.splat264, ptr %152, align 4, !tbaa !6
  store <4 x i32> %broadcast.splat264, ptr %153, align 4, !tbaa !6
  %154 = getelementptr i8, ptr %invariant.gep, i64 224
  %155 = getelementptr i8, ptr %invariant.gep, i64 240
  store <4 x i32> %broadcast.splat264, ptr %154, align 4, !tbaa !6
  store <4 x i32> %broadcast.splat264, ptr %155, align 4, !tbaa !6
  %.not173 = icmp eq i64 %139, 0
  br i1 %.not173, label %.loopexit188, label %vector.ph259, !llvm.loop !44

.loopexit188:                                     ; preds = %vector.ph259, %136, %129
  %156 = load i64, ptr %80, align 8, !tbaa !36
  %157 = shl i64 %156, 2
  %158 = getelementptr inbounds i8, ptr %10, i64 168
  store i64 %157, ptr %158, align 8, !tbaa !45
  %.not174 = icmp eq i64 %157, 0
  br i1 %.not174, label %.thread186, label %161

.thread186:                                       ; preds = %.loopexit188
  %159 = getelementptr inbounds i8, ptr %10, i64 160
  store ptr null, ptr %159, align 8, !tbaa !46
  %160 = getelementptr inbounds i8, ptr %10, i64 216
  store i64 0, ptr %160, align 8, !tbaa !47
  br label %169

161:                                              ; preds = %.loopexit188
  %162 = shl i64 %156, 4
  %163 = call ptr @BrotliAllocate(ptr noundef %0, i64 noundef %162) #6
  %.pr185 = load i64, ptr %158, align 8, !tbaa !45
  %164 = getelementptr inbounds i8, ptr %10, i64 160
  store ptr %163, ptr %164, align 8, !tbaa !46
  %165 = getelementptr inbounds i8, ptr %10, i64 216
  store i64 %.pr185, ptr %165, align 8, !tbaa !47
  %.not175 = icmp eq i64 %.pr185, 0
  br i1 %.not175, label %169, label %166

166:                                              ; preds = %161
  %167 = mul i64 %.pr185, 2192
  %168 = call ptr @BrotliAllocate(ptr noundef %0, i64 noundef %167) #6
  %.pre223 = load i64, ptr %158, align 8, !tbaa !45
  %.pre224 = load ptr, ptr %164, align 8, !tbaa !46
  br label %169

169:                                              ; preds = %.thread186, %161, %166
  %170 = phi ptr [ %.pre224, %166 ], [ %163, %161 ], [ null, %.thread186 ]
  %171 = phi i64 [ %.pre223, %166 ], [ 0, %161 ], [ 0, %.thread186 ]
  %172 = phi ptr [ %165, %166 ], [ %165, %161 ], [ %160, %.thread186 ]
  %173 = phi ptr [ %168, %166 ], [ null, %161 ], [ null, %.thread186 ]
  %174 = getelementptr inbounds i8, ptr %10, i64 208
  store ptr %173, ptr %174, align 8, !tbaa !48
  call void @BrotliClusterHistogramsDistance(ptr noundef %0, ptr noundef %105, i64 noundef %171, i64 noundef 256, ptr noundef %173, ptr noundef nonnull %172, ptr noundef %170) #6
  call void @BrotliFree(ptr noundef %0, ptr noundef %105) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #6
  ret void
}

; 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

declare hidden ptr @BrotliAllocate(ptr noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden i32 @ComputeDistanceCost(ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare hidden void @BrotliFree(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden void @RecomputeDistancePrefixes(ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare hidden void @BrotliSplitBlock(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @ClearHistogramsLiteral(ptr noundef, i64 noundef) local_unnamed_addr #4

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @ClearHistogramsDistance(ptr noundef, i64 noundef) local_unnamed_addr #4

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @ClearHistogramsCommand(ptr noundef, i64 noundef) local_unnamed_addr #4

declare hidden void @BrotliBuildHistogramsWithContext(ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef, i8 noundef zeroext, i8 noundef zeroext, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare hidden void @BrotliClusterHistogramsLiteral(ptr noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare hidden void @BrotliClusterHistogramsDistance(ptr noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{i64 0, i64 4, !6, i64 4, i64 4, !6, i64 8, i64 4, !6, i64 12, i64 4, !6, i64 16, i64 8, !10}
!6 = !{!7, !7, i64 0}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!13, !7, i64 36}
!13 = !{!"BrotliEncoderParams", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !11, i64 16, !11, i64 24, !7, i64 32, !7, i64 36, !14, i64 40, !15, i64 56, !16, i64 80}
!14 = !{!"BrotliHasherParams", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12}
!15 = !{!"BrotliDistanceParams", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !11, i64 16}
!16 = !{!"SharedEncoderDictionary", !7, i64 0, !17, i64 8, !18, i64 544, !7, i64 1312}
!17 = !{!"CompoundDictionary", !11, i64 0, !11, i64 8, !8, i64 16, !8, i64 144, !8, i64 272, !11, i64 400, !8, i64 408}
!18 = !{!"ContextualEncoderDictionary", !7, i64 0, !8, i64 4, !8, i64 5, !8, i64 72, !11, i64 584, !19, i64 592, !20, i64 760}
!19 = !{!"BrotliEncoderDictionary", !20, i64 0, !7, i64 8, !7, i64 12, !11, i64 16, !20, i64 24, !20, i64 32, !20, i64 40, !20, i64 48, !21, i64 56, !7, i64 96, !20, i64 104, !20, i64 112, !20, i64 120, !11, i64 128, !20, i64 136, !11, i64 144, !20, i64 152, !20, i64 160}
!20 = !{!"any pointer", !8, i64 0}
!21 = !{!"BrotliTrie", !20, i64 0, !11, i64 8, !11, i64 16, !22, i64 24}
!22 = !{!"BrotliTrieNode", !8, i64 0, !8, i64 1, !8, i64 2, !7, i64 4, !7, i64 8}
!23 = !{!15, !7, i64 0}
!24 = !{!25, !25, i64 0}
!25 = !{!"double", !8, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!13, !7, i64 32}
!29 = !{!30, !11, i64 0}
!30 = !{!"MetaBlockSplit", !31, i64 0, !31, i64 48, !31, i64 96, !20, i64 144, !11, i64 152, !20, i64 160, !11, i64 168, !20, i64 176, !11, i64 184, !20, i64 192, !11, i64 200, !20, i64 208, !11, i64 216}
!31 = !{!"BlockSplit", !11, i64 0, !11, i64 8, !20, i64 16, !20, i64 24, !11, i64 32, !11, i64 40}
!32 = distinct !{!32, !27, !33, !34}
!33 = !{!"llvm.loop.isvectorized", i32 1}
!34 = !{!"llvm.loop.unroll.runtime.disable"}
!35 = distinct !{!35, !27, !34, !33}
!36 = !{!30, !11, i64 96}
!37 = !{!30, !11, i64 48}
!38 = !{!30, !11, i64 200}
!39 = !{!30, !20, i64 192}
!40 = !{!30, !11, i64 152}
!41 = !{!30, !20, i64 144}
!42 = !{!30, !11, i64 184}
!43 = !{!30, !20, i64 176}
!44 = distinct !{!44, !27}
!45 = !{!30, !11, i64 168}
!46 = !{!30, !20, i64 160}
!47 = !{!30, !11, i64 216}
!48 = !{!30, !20, i64 208}


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