; LLVM IR from itchio/go-brotli :: enc (brotli_bit_stream)

; 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.BlockEncoder = type { i64, i64, ptr, ptr, i64, %struct.BlockSplitCode, i64, i64, i64, ptr, ptr }
%struct.BlockSplitCode = type { %struct.BlockTypeCodeCalculator, [258 x i8], [258 x i16], [26 x i8], [26 x i16] }
%struct.BlockTypeCodeCalculator = type { i64, i64 }
%struct.Command = type { i32, i32, i32, i16, i16 }
%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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @BrotliWriteBits(i64 noundef, i64 noundef, ptr noalias noundef, ptr noalias noundef) #1

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

; 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) #3

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

; Function Attrs: nounwind uwtable
define hidden void @BrotliStoreMetaBlock(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, i64 noundef %4, i8 noundef zeroext %5, i8 noundef zeroext %6, i32 noundef %7, i32 noundef %8, i32 noundef %9, i32 noundef %10, ptr noundef %11, i64 noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15) #4 {
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i8, align 1
  %23 = alloca i8, align 1
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca ptr, align 8
  %29 = alloca i64, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca i64, align 8
  %34 = alloca i64, align 8
  %35 = alloca i64, align 8
  %36 = alloca ptr, align 8
  %37 = alloca %struct.BlockEncoder, align 8
  %38 = alloca %struct.BlockEncoder, align 8
  %39 = alloca %struct.BlockEncoder, align 8
  %40 = alloca %struct.Command, align 4
  %41 = alloca i64, align 8
  %42 = alloca i64, align 8
  %43 = alloca i64, align 8
  %44 = alloca i64, align 8
  %45 = alloca i8, align 1
  %46 = alloca i64, align 8
  %47 = alloca i32, align 4
  %48 = alloca i64, align 8
  %49 = alloca i64, align 8
  store ptr %0, ptr %17, align 8, !tbaa !5
  store ptr %1, ptr %18, align 8, !tbaa !5
  store i64 %2, ptr %19, align 8, !tbaa !9
  store i64 %3, ptr %20, align 8, !tbaa !9
  store i64 %4, ptr %21, align 8, !tbaa !9
  store i8 %5, ptr %22, align 1, !tbaa !11
  store i8 %6, ptr %23, align 1, !tbaa !11
  store i32 %7, ptr %24, align 4, !tbaa !12
  store i32 %8, ptr %25, align 4, !tbaa !12
  store i32 %9, ptr %26, align 4, !tbaa !12
  store i32 %10, ptr %27, align 4, !tbaa !12
  store ptr %11, ptr %28, align 8, !tbaa !5
  store i64 %12, ptr %29, align 8, !tbaa !9
  store ptr %13, ptr %30, align 8, !tbaa !5
  store ptr %14, ptr %31, align 8, !tbaa !5
  store ptr %15, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #5
  %50 = load i64, ptr %19, align 8, !tbaa !9
  store i64 %50, ptr %33, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #5
  %51 = load i32, ptr %25, align 4, !tbaa !12
  %52 = add i32 16, %51
  %53 = load i32, ptr %26, align 4, !tbaa !12
  %54 = shl i32 48, %53
  %55 = add i32 %52, %54
  %56 = zext i32 %55 to i64
  store i64 %56, ptr %35, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #5
  call void @llvm.lifetime.start.p0(i64 952, ptr %37) #5
  call void @llvm.lifetime.start.p0(i64 952, ptr %38) #5
  call void @llvm.lifetime.start.p0(i64 952, ptr %39) #5
  %57 = load i32, ptr %24, align 4, !tbaa !12
  %58 = load i64, ptr %20, align 8, !tbaa !9
  %59 = load ptr, ptr %31, align 8, !tbaa !5
  %60 = load ptr, ptr %32, align 8, !tbaa !5
  call void @StoreCompressedMetaBlockHeader(i32 noundef %57, i64 noundef %58, ptr noundef %59, ptr noundef %60)
  %61 = load ptr, ptr %17, align 8, !tbaa !5
  %62 = call ptr @BrotliAllocate(ptr noundef %61, i64 noundef 11272)
  store ptr %62, ptr %36, align 8, !tbaa !5
  %63 = load ptr, ptr %30, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.MetaBlockSplit, ptr %63, i32 0, i32 0
  %65 = getelementptr inbounds %struct.BlockSplit, ptr %64, i32 0, i32 0
  %66 = load i64, ptr %65, align 8, !tbaa !14
  %67 = load ptr, ptr %30, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.MetaBlockSplit, ptr %67, i32 0, i32 0
  %69 = getelementptr inbounds %struct.BlockSplit, ptr %68, i32 0, i32 2
  %70 = load ptr, ptr %69, align 8, !tbaa !17
  %71 = load ptr, ptr %30, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.MetaBlockSplit, ptr %71, i32 0, i32 0
  %73 = getelementptr inbounds %struct.BlockSplit, ptr %72, i32 0, i32 3
  %74 = load ptr, ptr %73, align 8, !tbaa !18
  %75 = load ptr, ptr %30, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.MetaBlockSplit, ptr %75, i32 0, i32 0
  %77 = getelementptr inbounds %struct.BlockSplit, ptr %76, i32 0, i32 1
  %78 = load i64, ptr %77, align 8, !tbaa !19
  call void @InitBlockEncoder(ptr noundef %37, i64 noundef 256, i64 noundef %66, ptr noundef %70, ptr noundef %74, i64 noundef %78)
  %79 = load ptr, ptr %30, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.MetaBlockSplit, ptr %79, i32 0, i32 1
  %81 = getelementptr inbounds %struct.BlockSplit, ptr %80, i32 0, i32 0
  %82 = load i64, ptr %81, align 8, !tbaa !20
  %83 = load ptr, ptr %30, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.MetaBlockSplit, ptr %83, i32 0, i32 1
  %85 = getelementptr inbounds %struct.BlockSplit, ptr %84, i32 0, i32 2
  %86 = load ptr, ptr %85, align 8, !tbaa !21
  %87 = load ptr, ptr %30, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.MetaBlockSplit, ptr %87, i32 0, i32 1
  %89 = getelementptr inbounds %struct.BlockSplit, ptr %88, i32 0, i32 3
  %90 = load ptr, ptr %89, align 8, !tbaa !22
  %91 = load ptr, ptr %30, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.MetaBlockSplit, ptr %91, i32 0, i32 1
  %93 = getelementptr inbounds %struct.BlockSplit, ptr %92, i32 0, i32 1
  %94 = load i64, ptr %93, align 8, !tbaa !23
  call void @InitBlockEncoder(ptr noundef %38, i64 noundef 704, i64 noundef %82, ptr noundef %86, ptr noundef %90, i64 noundef %94)
  %95 = load i64, ptr %35, align 8, !tbaa !9
  %96 = load ptr, ptr %30, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.MetaBlockSplit, ptr %96, i32 0, i32 2
  %98 = getelementptr inbounds %struct.BlockSplit, ptr %97, i32 0, i32 0
  %99 = load i64, ptr %98, align 8, !tbaa !24
  %100 = load ptr, ptr %30, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.MetaBlockSplit, ptr %100, i32 0, i32 2
  %102 = getelementptr inbounds %struct.BlockSplit, ptr %101, i32 0, i32 2
  %103 = load ptr, ptr %102, align 8, !tbaa !25
  %104 = load ptr, ptr %30, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.MetaBlockSplit, ptr %104, i32 0, i32 2
  %106 = getelementptr inbounds %struct.BlockSplit, ptr %105, i32 0, i32 3
  %107 = load ptr, ptr %106, align 8, !tbaa !26
  %108 = load ptr, ptr %30, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.MetaBlockSplit, ptr %108, i32 0, i32 2
  %110 = getelementptr inbounds %struct.BlockSplit, ptr %109, i32 0, i32 1
  %111 = load i64, ptr %110, align 8, !tbaa !27
  call void @InitBlockEncoder(ptr noundef %39, i64 noundef %95, i64 noundef %99, ptr noundef %103, ptr noundef %107, i64 noundef %111)
  %112 = load ptr, ptr %36, align 8, !tbaa !5
  %113 = load ptr, ptr %31, align 8, !tbaa !5
  %114 = load ptr, ptr %32, align 8, !tbaa !5
  call void @BuildAndStoreBlockSwitchEntropyCodes(ptr noundef %37, ptr noundef %112, ptr noundef %113, ptr noundef %114)
  %115 = load ptr, ptr %36, align 8, !tbaa !5
  %116 = load ptr, ptr %31, align 8, !tbaa !5
  %117 = load ptr, ptr %32, align 8, !tbaa !5
  call void @BuildAndStoreBlockSwitchEntropyCodes(ptr noundef %38, ptr noundef %115, ptr noundef %116, ptr noundef %117)
  %118 = load ptr, ptr %36, align 8, !tbaa !5
  %119 = load ptr, ptr %31, align 8, !tbaa !5
  %120 = load ptr, ptr %32, align 8, !tbaa !5
  call void @BuildAndStoreBlockSwitchEntropyCodes(ptr noundef %39, ptr noundef %118, ptr noundef %119, ptr noundef %120)
  %121 = load i32, ptr %26, align 4, !tbaa !12
  %122 = zext i32 %121 to i64
  %123 = load ptr, ptr %31, align 8, !tbaa !5
  %124 = load ptr, ptr %32, align 8, !tbaa !5
  call void @BrotliWriteBits(i64 noundef 2, i64 noundef %122, ptr noundef %123, ptr noundef %124)
  %125 = load i32, ptr %25, align 4, !tbaa !12
  %126 = load i32, ptr %26, align 4, !tbaa !12
  %127 = lshr i32 %125, %126
  %128 = zext i32 %127 to i64
  %129 = load ptr, ptr %31, align 8, !tbaa !5
  %130 = load ptr, ptr %32, align 8, !tbaa !5
  call void @BrotliWriteBits(i64 noundef 4, i64 noundef %128, ptr noundef %129, ptr noundef %130)
  store i64 0, ptr %34, align 8, !tbaa !9
  br label %131

131:                                              ; preds = %143, %16
  %132 = load i64, ptr %34, align 8, !tbaa !9
  %133 = load ptr, ptr %30, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.MetaBlockSplit, ptr %133, i32 0, i32 0
  %135 = getelementptr inbounds %struct.BlockSplit, ptr %134, i32 0, i32 0
  %136 = load i64, ptr %135, align 8, !tbaa !14
  %137 = icmp ult i64 %132, %136
  br i1 %137, label %138, label %146

138:                                              ; preds = %131
  %139 = load i32, ptr %27, align 4, !tbaa !12
  %140 = zext i32 %139 to i64
  %141 = load ptr, ptr %31, align 8, !tbaa !5
  %142 = load ptr, ptr %32, align 8, !tbaa !5
  call void @BrotliWriteBits(i64 noundef 2, i64 noundef %140, ptr noundef %141, ptr noundef %142)
  br label %143

143:                                              ; preds = %138
  %144 = load i64, ptr %34, align 8, !tbaa !9
  %145 = add i64 %144, 1
  store i64 %145, ptr %34, align 8, !tbaa !9
  br label %131, !llvm.loop !28

146:                                              ; preds = %131
  %147 = load ptr, ptr %30, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.MetaBlockSplit, ptr %147, i32 0, i32 4
  %149 = load i64, ptr %148, align 8, !tbaa !30
  %150 = icmp eq i64 %149, 0
  br i1 %150, label %151, label %158

151:                                              ; preds = %146
  %152 = load ptr, ptr %30, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.MetaBlockSplit, ptr %152, i32 0, i32 8
  %154 = load i64, ptr %153, align 8, !tbaa !31
  %155 = load ptr, ptr %36, align 8, !tbaa !5
  %156 = load ptr, ptr %31, align 8, !tbaa !5
  %157 = load ptr, ptr %32, align 8, !tbaa !5
  call void @StoreTrivialContextMap(i64 noundef %154, i64 noundef 6, ptr noundef %155, ptr noundef %156, ptr noundef %157)
  br label %172

158:                                              ; preds = %146
  %159 = load ptr, ptr %17, align 8, !tbaa !5
  %160 = load ptr, ptr %30, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.MetaBlockSplit, ptr %160, i32 0, i32 3
  %162 = load ptr, ptr %161, align 8, !tbaa !32
  %163 = load ptr, ptr %30, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.MetaBlockSplit, ptr %163, i32 0, i32 4
  %165 = load i64, ptr %164, align 8, !tbaa !30
  %166 = load ptr, ptr %30, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.MetaBlockSplit, ptr %166, i32 0, i32 8
  %168 = load i64, ptr %167, align 8, !tbaa !31
  %169 = load ptr, ptr %36, align 8, !tbaa !5
  %170 = load ptr, ptr %31, align 8, !tbaa !5
  %171 = load ptr, ptr %32, align 8, !tbaa !5
  call void @EncodeContextMap(ptr noundef %159, ptr noundef %162, i64 noundef %165, i64 noundef %168, ptr noundef %169, ptr noundef %170, ptr noundef %171)
  br label %172

172:                                              ; preds = %158, %151
  %173 = load ptr, ptr %30, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.MetaBlockSplit, ptr %173, i32 0, i32 6
  %175 = load i64, ptr %174, align 8, !tbaa !33
  %176 = icmp eq i64 %175, 0
  br i1 %176, label %177, label %184

177:                                              ; preds = %172
  %178 = load ptr, ptr %30, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.MetaBlockSplit, ptr %178, i32 0, i32 12
  %180 = load i64, ptr %179, align 8, !tbaa !34
  %181 = load ptr, ptr %36, align 8, !tbaa !5
  %182 = load ptr, ptr %31, align 8, !tbaa !5
  %183 = load ptr, ptr %32, align 8, !tbaa !5
  call void @StoreTrivialContextMap(i64 noundef %180, i64 noundef 2, ptr noundef %181, ptr noundef %182, ptr noundef %183)
  br label %198

184:                                              ; preds = %172
  %185 = load ptr, ptr %17, align 8, !tbaa !5
  %186 = load ptr, ptr %30, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.MetaBlockSplit, ptr %186, i32 0, i32 5
  %188 = load ptr, ptr %187, align 8, !tbaa !35
  %189 = load ptr, ptr %30, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.MetaBlockSplit, ptr %189, i32 0, i32 6
  %191 = load i64, ptr %190, align 8, !tbaa !33
  %192 = load ptr, ptr %30, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.MetaBlockSplit, ptr %192, i32 0, i32 12
  %194 = load i64, ptr %193, align 8, !tbaa !34
  %195 = load ptr, ptr %36, align 8, !tbaa !5
  %196 = load ptr, ptr %31, align 8, !tbaa !5
  %197 = load ptr, ptr %32, align 8, !tbaa !5
  call void @EncodeContextMap(ptr noundef %185, ptr noundef %188, i64 noundef %191, i64 noundef %194, ptr noundef %195, ptr noundef %196, ptr noundef %197)
  br label %198

198:                                              ; preds = %184, %177
  %199 = load ptr, ptr %17, align 8, !tbaa !5
  %200 = load ptr, ptr %30, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.MetaBlockSplit, ptr %200, i32 0, i32 7
  %202 = load ptr, ptr %201, align 8, !tbaa !36
  %203 = load ptr, ptr %30, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.MetaBlockSplit, ptr %203, i32 0, i32 8
  %205 = load i64, ptr %204, align 8, !tbaa !31
  %206 = load ptr, ptr %36, align 8, !tbaa !5
  %207 = load ptr, ptr %31, align 8, !tbaa !5
  %208 = load ptr, ptr %32, align 8, !tbaa !5
  call void @BuildAndStoreEntropyCodesLiteral(ptr noundef %199, ptr noundef %37, ptr noundef %202, i64 noundef %205, ptr noundef %206, ptr noundef %207, ptr noundef %208)
  %209 = load ptr, ptr %17, align 8, !tbaa !5
  %210 = load ptr, ptr %30, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.MetaBlockSplit, ptr %210, i32 0, i32 9
  %212 = load ptr, ptr %211, align 8, !tbaa !37
  %213 = load ptr, ptr %30, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.MetaBlockSplit, ptr %213, i32 0, i32 10
  %215 = load i64, ptr %214, align 8, !tbaa !38
  %216 = load ptr, ptr %36, align 8, !tbaa !5
  %217 = load ptr, ptr %31, align 8, !tbaa !5
  %218 = load ptr, ptr %32, align 8, !tbaa !5
  call void @BuildAndStoreEntropyCodesCommand(ptr noundef %209, ptr noundef %38, ptr noundef %212, i64 noundef %215, ptr noundef %216, ptr noundef %217, ptr noundef %218)
  %219 = load ptr, ptr %17, align 8, !tbaa !5
  %220 = load ptr, ptr %30, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.MetaBlockSplit, ptr %220, i32 0, i32 11
  %222 = load ptr, ptr %221, align 8, !tbaa !39
  %223 = load ptr, ptr %30, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.MetaBlockSplit, ptr %223, i32 0, i32 12
  %225 = load i64, ptr %224, align 8, !tbaa !34
  %226 = load ptr, ptr %36, align 8, !tbaa !5
  %227 = load ptr, ptr %31, align 8, !tbaa !5
  %228 = load ptr, ptr %32, align 8, !tbaa !5
  call void @BuildAndStoreEntropyCodesDistance(ptr noundef %219, ptr noundef %39, ptr noundef %222, i64 noundef %225, ptr noundef %226, ptr noundef %227, ptr noundef %228)
  %229 = load ptr, ptr %17, align 8, !tbaa !5
  %230 = load ptr, ptr %36, align 8, !tbaa !5
  call void @BrotliFree(ptr noundef %229, ptr noundef %230)
  store ptr null, ptr %36, align 8, !tbaa !5
  store i64 0, ptr %34, align 8, !tbaa !9
  br label %231

231:                                              ; preds = %372, %198
  %232 = load i64, ptr %34, align 8, !tbaa !9
  %233 = load i64, ptr %29, align 8, !tbaa !9
  %234 = icmp ult i64 %232, %233
  br i1 %234, label %235, label %375

235:                                              ; preds = %231
  call void @llvm.lifetime.start.p0(i64 16, ptr %40) #5
  %236 = load ptr, ptr %28, align 8, !tbaa !5
  %237 = load i64, ptr %34, align 8, !tbaa !9
  %238 = getelementptr inbounds %struct.Command, ptr %236, i64 %237
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %40, ptr align 4 %238, i64 16, i1 false), !tbaa.struct !40
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #5
  %239 = getelementptr inbounds %struct.Command, ptr %40, i32 0, i32 3
  %240 = load i16, ptr %239, align 4, !tbaa !43
  %241 = zext i16 %240 to i64
  store i64 %241, ptr %41, align 8, !tbaa !9
  %242 = load i64, ptr %41, align 8, !tbaa !9
  %243 = load ptr, ptr %31, align 8, !tbaa !5
  %244 = load ptr, ptr %32, align 8, !tbaa !5
  call void @StoreSymbol(ptr noundef %38, i64 noundef %242, ptr noundef %243, ptr noundef %244)
  %245 = load ptr, ptr %31, align 8, !tbaa !5
  %246 = load ptr, ptr %32, align 8, !tbaa !5
  call void @StoreCommandExtra(ptr noundef %40, ptr noundef %245, ptr noundef %246)
  %247 = load ptr, ptr %30, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.MetaBlockSplit, ptr %247, i32 0, i32 4
  %249 = load i64, ptr %248, align 8, !tbaa !30
  %250 = icmp eq i64 %249, 0
  br i1 %250, label %251, label %274

251:                                              ; preds = %235
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #5
  %252 = getelementptr inbounds %struct.Command, ptr %40, i32 0, i32 0
  %253 = load i32, ptr %252, align 4, !tbaa !45
  %254 = zext i32 %253 to i64
  store i64 %254, ptr %42, align 8, !tbaa !9
  br label %255

255:                                              ; preds = %270, %251
  %256 = load i64, ptr %42, align 8, !tbaa !9
  %257 = icmp ne i64 %256, 0
  br i1 %257, label %258, label %273

258:                                              ; preds = %255
  %259 = load ptr, ptr %18, align 8, !tbaa !5
  %260 = load i64, ptr %33, align 8, !tbaa !9
  %261 = load i64, ptr %21, align 8, !tbaa !9
  %262 = and i64 %260, %261
  %263 = getelementptr inbounds i8, ptr %259, i64 %262
  %264 = load i8, ptr %263, align 1, !tbaa !11
  %265 = zext i8 %264 to i64
  %266 = load ptr, ptr %31, align 8, !tbaa !5
  %267 = load ptr, ptr %32, align 8, !tbaa !5
  call void @StoreSymbol(ptr noundef %37, i64 noundef %265, ptr noundef %266, ptr noundef %267)
  %268 = load i64, ptr %33, align 8, !tbaa !9
  %269 = add i64 %268, 1
  store i64 %269, ptr %33, align 8, !tbaa !9
  br label %270

270:                                              ; preds = %258
  %271 = load i64, ptr %42, align 8, !tbaa !9
  %272 = add i64 %271, -1
  store i64 %272, ptr %42, align 8, !tbaa !9
  br label %255, !llvm.loop !46

273:                                              ; preds = %255
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #5
  br label %309

274:                                              ; preds = %235
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #5
  %275 = getelementptr inbounds %struct.Command, ptr %40, i32 0, i32 0
  %276 = load i32, ptr %275, align 4, !tbaa !45
  %277 = zext i32 %276 to i64
  store i64 %277, ptr %43, align 8, !tbaa !9
  br label %278

278:                                              ; preds = %305, %274
  %279 = load i64, ptr %43, align 8, !tbaa !9
  %280 = icmp ne i64 %279, 0
  br i1 %280, label %281, label %308

281:                                              ; preds = %278
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #5
  %282 = load i8, ptr %22, align 1, !tbaa !11
  %283 = load i8, ptr %23, align 1, !tbaa !11
  %284 = load i32, ptr %27, align 4, !tbaa !12
  %285 = call zeroext i8 @Context(i8 noundef zeroext %282, i8 noundef zeroext %283, i32 noundef %284)
  %286 = zext i8 %285 to i64
  store i64 %286, ptr %44, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %45) #5
  %287 = load ptr, ptr %18, align 8, !tbaa !5
  %288 = load i64, ptr %33, align 8, !tbaa !9
  %289 = load i64, ptr %21, align 8, !tbaa !9
  %290 = and i64 %288, %289
  %291 = getelementptr inbounds i8, ptr %287, i64 %290
  %292 = load i8, ptr %291, align 1, !tbaa !11
  store i8 %292, ptr %45, align 1, !tbaa !11
  %293 = load i8, ptr %45, align 1, !tbaa !11
  %294 = zext i8 %293 to i64
  %295 = load i64, ptr %44, align 8, !tbaa !9
  %296 = load ptr, ptr %30, align 8, !tbaa !5
  %297 = getelementptr inbounds %struct.MetaBlockSplit, ptr %296, i32 0, i32 3
  %298 = load ptr, ptr %297, align 8, !tbaa !32
  %299 = load ptr, ptr %31, align 8, !tbaa !5
  %300 = load ptr, ptr %32, align 8, !tbaa !5
  call void @StoreSymbolWithContext(ptr noundef %37, i64 noundef %294, i64 noundef %295, ptr noundef %298, ptr noundef %299, ptr noundef %300, i64 noundef 6)
  %301 = load i8, ptr %22, align 1, !tbaa !11
  store i8 %301, ptr %23, align 1, !tbaa !11
  %302 = load i8, ptr %45, align 1, !tbaa !11
  store i8 %302, ptr %22, align 1, !tbaa !11
  %303 = load i64, ptr %33, align 8, !tbaa !9
  %304 = add i64 %303, 1
  store i64 %304, ptr %33, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %45) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #5
  br label %305

305:                                              ; preds = %281
  %306 = load i64, ptr %43, align 8, !tbaa !9
  %307 = add i64 %306, -1
  store i64 %307, ptr %43, align 8, !tbaa !9
  br label %278, !llvm.loop !47

308:                                              ; preds = %278
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #5
  br label %309

309:                                              ; preds = %308, %273
  %310 = call i32 @CommandCopyLen(ptr noundef %40)
  %311 = zext i32 %310 to i64
  %312 = load i64, ptr %33, align 8, !tbaa !9
  %313 = add i64 %312, %311
  store i64 %313, ptr %33, align 8, !tbaa !9
  %314 = call i32 @CommandCopyLen(ptr noundef %40)
  %315 = icmp ne i32 %314, 0
  br i1 %315, label %316, label %371

316:                                              ; preds = %309
  %317 = load ptr, ptr %18, align 8, !tbaa !5
  %318 = load i64, ptr %33, align 8, !tbaa !9
  %319 = sub i64 %318, 2
  %320 = load i64, ptr %21, align 8, !tbaa !9
  %321 = and i64 %319, %320
  %322 = getelementptr inbounds i8, ptr %317, i64 %321
  %323 = load i8, ptr %322, align 1, !tbaa !11
  store i8 %323, ptr %23, align 1, !tbaa !11
  %324 = load ptr, ptr %18, align 8, !tbaa !5
  %325 = load i64, ptr %33, align 8, !tbaa !9
  %326 = sub i64 %325, 1
  %327 = load i64, ptr %21, align 8, !tbaa !9
  %328 = and i64 %326, %327
  %329 = getelementptr inbounds i8, ptr %324, i64 %328
  %330 = load i8, ptr %329, align 1, !tbaa !11
  store i8 %330, ptr %22, align 1, !tbaa !11
  %331 = getelementptr inbounds %struct.Command, ptr %40, i32 0, i32 3
  %332 = load i16, ptr %331, align 4, !tbaa !43
  %333 = zext i16 %332 to i32
  %334 = icmp sge i32 %333, 128
  br i1 %334, label %335, label %370

335:                                              ; preds = %316
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #5
  %336 = getelementptr inbounds %struct.Command, ptr %40, i32 0, i32 4
  %337 = load i16, ptr %336, align 2, !tbaa !48
  %338 = zext i16 %337 to i64
  store i64 %338, ptr %46, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #5
  %339 = getelementptr inbounds %struct.Command, ptr %40, i32 0, i32 2
  %340 = load i32, ptr %339, align 4, !tbaa !49
  %341 = lshr i32 %340, 24
  store i32 %341, ptr %47, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #5
  %342 = getelementptr inbounds %struct.Command, ptr %40, i32 0, i32 2
  %343 = load i32, ptr %342, align 4, !tbaa !49
  %344 = and i32 %343, 16777215
  %345 = zext i32 %344 to i64
  store i64 %345, ptr %48, align 8, !tbaa !9
  %346 = load ptr, ptr %30, align 8, !tbaa !5
  %347 = getelementptr inbounds %struct.MetaBlockSplit, ptr %346, i32 0, i32 6
  %348 = load i64, ptr %347, align 8, !tbaa !33
  %349 = icmp eq i64 %348, 0
  br i1 %349, label %350, label %354

350:                                              ; preds = %335
  %351 = load i64, ptr %46, align 8, !tbaa !9
  %352 = load ptr, ptr %31, align 8, !tbaa !5
  %353 = load ptr, ptr %32, align 8, !tbaa !5
  call void @StoreSymbol(ptr noundef %39, i64 noundef %351, ptr noundef %352, ptr noundef %353)
  br label %364

354:                                              ; preds = %335
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #5
  %355 = call i32 @CommandDistanceContext(ptr noundef %40)
  %356 = zext i32 %355 to i64
  store i64 %356, ptr %49, align 8, !tbaa !9
  %357 = load i64, ptr %46, align 8, !tbaa !9
  %358 = load i64, ptr %49, align 8, !tbaa !9
  %359 = load ptr, ptr %30, align 8, !tbaa !5
  %360 = getelementptr inbounds %struct.MetaBlockSplit, ptr %359, i32 0, i32 5
  %361 = load ptr, ptr %360, align 8, !tbaa !35
  %362 = load ptr, ptr %31, align 8, !tbaa !5
  %363 = load ptr, ptr %32, align 8, !tbaa !5
  call void @StoreSymbolWithContext(ptr noundef %39, i64 noundef %357, i64 noundef %358, ptr noundef %361, ptr noundef %362, ptr noundef %363, i64 noundef 2)
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #5
  br label %364

364:                                              ; preds = %354, %350
  %365 = load i32, ptr %47, align 4, !tbaa !12
  %366 = zext i32 %365 to i64
  %367 = load i64, ptr %48, align 8, !tbaa !9
  %368 = load ptr, ptr %31, align 8, !tbaa !5
  %369 = load ptr, ptr %32, align 8, !tbaa !5
  call void @BrotliWriteBits(i64 noundef %366, i64 noundef %367, ptr noundef %368, ptr noundef %369)
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #5
  br label %370

370:                                              ; preds = %364, %316
  br label %371

371:                                              ; preds = %370, %309
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #5
  br label %372

372:                                              ; preds = %371
  %373 = load i64, ptr %34, align 8, !tbaa !9
  %374 = add i64 %373, 1
  store i64 %374, ptr %34, align 8, !tbaa !9
  br label %231, !llvm.loop !50

375:                                              ; preds = %231
  %376 = load ptr, ptr %17, align 8, !tbaa !5
  call void @CleanupBlockEncoder(ptr noundef %376, ptr noundef %39)
  %377 = load ptr, ptr %17, align 8, !tbaa !5
  call void @CleanupBlockEncoder(ptr noundef %377, ptr noundef %38)
  %378 = load ptr, ptr %17, align 8, !tbaa !5
  call void @CleanupBlockEncoder(ptr noundef %378, ptr noundef %37)
  %379 = load i32, ptr %24, align 4, !tbaa !12
  %380 = icmp ne i32 %379, 0
  br i1 %380, label %381, label %384

381:                                              ; preds = %375
  %382 = load ptr, ptr %31, align 8, !tbaa !5
  %383 = load ptr, ptr %32, align 8, !tbaa !5
  call void @JumpToByteBoundary(ptr noundef %382, ptr noundef %383)
  br label %384

384:                                              ; preds = %381, %375
  call void @llvm.lifetime.end.p0(i64 952, ptr %39) #5
  call void @llvm.lifetime.end.p0(i64 952, ptr %38) #5
  call void @llvm.lifetime.end.p0(i64 952, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #5
  ret void
}

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

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

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

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

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

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

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

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

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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @StoreCommandExtra(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: alwaysinline nounwind uwtable
declare hidden zeroext i8 @Context(i8 noundef zeroext, i8 noundef zeroext, i32 noundef) #1

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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i32 @CommandCopyLen(ptr noundef) #1

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i32 @CommandDistanceContext(ptr noundef) #1

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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, !10, i64 0}
!15 = !{!"MetaBlockSplit", !16, i64 0, !16, i64 48, !16, 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}
!16 = !{!"BlockSplit", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !10, i64 40}
!17 = !{!15, !6, i64 16}
!18 = !{!15, !6, i64 24}
!19 = !{!15, !10, i64 8}
!20 = !{!15, !10, i64 48}
!21 = !{!15, !6, i64 64}
!22 = !{!15, !6, i64 72}
!23 = !{!15, !10, i64 56}
!24 = !{!15, !10, i64 96}
!25 = !{!15, !6, i64 112}
!26 = !{!15, !6, i64 120}
!27 = !{!15, !10, i64 104}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!15, !10, i64 152}
!31 = !{!15, !10, i64 184}
!32 = !{!15, !6, i64 144}
!33 = !{!15, !10, i64 168}
!34 = !{!15, !10, i64 216}
!35 = !{!15, !6, i64 160}
!36 = !{!15, !6, i64 176}
!37 = !{!15, !6, i64 192}
!38 = !{!15, !10, i64 200}
!39 = !{!15, !6, i64 208}
!40 = !{i64 0, i64 4, !12, i64 4, i64 4, !12, i64 8, i64 4, !12, i64 12, i64 2, !41, i64 14, i64 2, !41}
!41 = !{!42, !42, i64 0}
!42 = !{!"short", !7, i64 0}
!43 = !{!44, !42, i64 12}
!44 = !{!"Command", !13, i64 0, !13, i64 4, !13, i64 8, !42, i64 12, !42, i64 14}
!45 = !{!44, !13, i64 0}
!46 = distinct !{!46, !29}
!47 = distinct !{!47, !29}
!48 = !{!44, !42, i64 14}
!49 = !{!44, !13, i64 8}
!50 = distinct !{!50, !29}


; 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.BlockEncoder = type { i64, i64, ptr, ptr, i64, %struct.BlockSplitCode, i64, i64, i64, ptr, ptr }
%struct.BlockSplitCode = type { %struct.BlockTypeCodeCalculator, [258 x i8], [258 x i16], [26 x i8], [26 x i16] }
%struct.BlockTypeCodeCalculator = type { i64, i64 }
%struct.Command = type { i32, i32, i32, i16, i16 }

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

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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @BrotliWriteBits(i64 noundef, i64 noundef, ptr noalias noundef, ptr noalias noundef) local_unnamed_addr #1

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

; 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) #3

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

; Function Attrs: nounwind uwtable
define hidden void @BrotliStoreMetaBlock(ptr noundef %0, ptr nocapture noundef readonly %1, i64 noundef %2, i64 noundef %3, i64 noundef %4, i8 noundef zeroext %5, i8 noundef zeroext %6, i32 noundef %7, i32 noundef %8, i32 noundef %9, i32 noundef %10, ptr nocapture noundef readonly %11, i64 noundef %12, ptr nocapture noundef readonly %13, ptr noundef %14, ptr noundef %15) local_unnamed_addr #4 {
  %17 = alloca %struct.BlockEncoder, align 8
  %18 = alloca %struct.BlockEncoder, align 8
  %19 = alloca %struct.BlockEncoder, align 8
  %20 = alloca %struct.Command, align 4
  %21 = add i32 %8, 16
  %22 = shl i32 48, %9
  %23 = add i32 %21, %22
  %24 = zext i32 %23 to i64
  call void @llvm.lifetime.start.p0(i64 952, ptr nonnull %17) #5
  call void @llvm.lifetime.start.p0(i64 952, ptr nonnull %18) #5
  call void @llvm.lifetime.start.p0(i64 952, ptr nonnull %19) #5
  tail call void @StoreCompressedMetaBlockHeader(i32 noundef %7, i64 noundef %3, ptr noundef %14, ptr noundef %15)
  %25 = tail call ptr @BrotliAllocate(ptr noundef %0, i64 noundef 11272) #5
  %26 = load i64, ptr %13, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %13, i64 16
  %28 = load ptr, ptr %27, align 8, !tbaa !12
  %29 = getelementptr inbounds i8, ptr %13, i64 24
  %30 = load ptr, ptr %29, align 8, !tbaa !13
  %31 = getelementptr inbounds i8, ptr %13, i64 8
  %32 = load i64, ptr %31, align 8, !tbaa !14
  call void @InitBlockEncoder(ptr noundef nonnull %17, i64 noundef 256, i64 noundef %26, ptr noundef %28, ptr noundef %30, i64 noundef %32)
  %33 = getelementptr inbounds i8, ptr %13, i64 48
  %34 = load i64, ptr %33, align 8, !tbaa !15
  %35 = getelementptr inbounds i8, ptr %13, i64 64
  %36 = load ptr, ptr %35, align 8, !tbaa !16
  %37 = getelementptr inbounds i8, ptr %13, i64 72
  %38 = load ptr, ptr %37, align 8, !tbaa !17
  %39 = getelementptr inbounds i8, ptr %13, i64 56
  %40 = load i64, ptr %39, align 8, !tbaa !18
  call void @InitBlockEncoder(ptr noundef nonnull %18, i64 noundef 704, i64 noundef %34, ptr noundef %36, ptr noundef %38, i64 noundef %40)
  %41 = getelementptr inbounds i8, ptr %13, i64 96
  %42 = load i64, ptr %41, align 8, !tbaa !19
  %43 = getelementptr inbounds i8, ptr %13, i64 112
  %44 = load ptr, ptr %43, align 8, !tbaa !20
  %45 = getelementptr inbounds i8, ptr %13, i64 120
  %46 = load ptr, ptr %45, align 8, !tbaa !21
  %47 = getelementptr inbounds i8, ptr %13, i64 104
  %48 = load i64, ptr %47, align 8, !tbaa !22
  call void @InitBlockEncoder(ptr noundef nonnull %19, i64 noundef %24, i64 noundef %42, ptr noundef %44, ptr noundef %46, i64 noundef %48)
  call void @BuildAndStoreBlockSwitchEntropyCodes(ptr noundef nonnull %17, ptr noundef %25, ptr noundef %14, ptr noundef %15)
  call void @BuildAndStoreBlockSwitchEntropyCodes(ptr noundef nonnull %18, ptr noundef %25, ptr noundef %14, ptr noundef %15)
  call void @BuildAndStoreBlockSwitchEntropyCodes(ptr noundef nonnull %19, ptr noundef %25, ptr noundef %14, ptr noundef %15)
  %49 = zext i32 %9 to i64
  call void @BrotliWriteBits(i64 noundef 2, i64 noundef %49, ptr noundef %14, ptr noundef %15)
  %50 = lshr i32 %8, %9
  %51 = zext i32 %50 to i64
  call void @BrotliWriteBits(i64 noundef 4, i64 noundef %51, ptr noundef %14, ptr noundef %15)
  %52 = load i64, ptr %13, align 8, !tbaa !5
  %.not188 = icmp eq i64 %52, 0
  br i1 %.not188, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %16
  %53 = zext i32 %10 to i64
  br label %54

54:                                               ; preds = %.lr.ph, %54
  %.0155165 = phi i64 [ 0, %.lr.ph ], [ %55, %54 ]
  call void @BrotliWriteBits(i64 noundef 2, i64 noundef %53, ptr noundef %14, ptr noundef %15)
  %55 = add nuw i64 %.0155165, 1
  %56 = load i64, ptr %13, align 8, !tbaa !5
  %57 = icmp ult i64 %55, %56
  br i1 %57, label %54, label %._crit_edge, !llvm.loop !23

._crit_edge:                                      ; preds = %54, %16
  %58 = getelementptr inbounds i8, ptr %13, i64 152
  %59 = load i64, ptr %58, align 8, !tbaa !25
  %60 = icmp eq i64 %59, 0
  br i1 %60, label %61, label %64

61:                                               ; preds = %._crit_edge
  %62 = getelementptr inbounds i8, ptr %13, i64 184
  %63 = load i64, ptr %62, align 8, !tbaa !26
  call void @StoreTrivialContextMap(i64 noundef %63, i64 noundef 6, ptr noundef %25, ptr noundef %14, ptr noundef %15)
  br label %69

64:                                               ; preds = %._crit_edge
  %65 = getelementptr inbounds i8, ptr %13, i64 144
  %66 = load ptr, ptr %65, align 8, !tbaa !27
  %67 = getelementptr inbounds i8, ptr %13, i64 184
  %68 = load i64, ptr %67, align 8, !tbaa !26
  call void @EncodeContextMap(ptr noundef %0, ptr noundef %66, i64 noundef %59, i64 noundef %68, ptr noundef %25, ptr noundef %14, ptr noundef %15)
  br label %69

69:                                               ; preds = %64, %61
  %70 = getelementptr inbounds i8, ptr %13, i64 168
  %71 = load i64, ptr %70, align 8, !tbaa !28
  %72 = icmp eq i64 %71, 0
  br i1 %72, label %73, label %76

73:                                               ; preds = %69
  %74 = getelementptr inbounds i8, ptr %13, i64 216
  %75 = load i64, ptr %74, align 8, !tbaa !29
  call void @StoreTrivialContextMap(i64 noundef %75, i64 noundef 2, ptr noundef %25, ptr noundef %14, ptr noundef %15)
  br label %81

76:                                               ; preds = %69
  %77 = getelementptr inbounds i8, ptr %13, i64 160
  %78 = load ptr, ptr %77, align 8, !tbaa !30
  %79 = getelementptr inbounds i8, ptr %13, i64 216
  %80 = load i64, ptr %79, align 8, !tbaa !29
  call void @EncodeContextMap(ptr noundef %0, ptr noundef %78, i64 noundef %71, i64 noundef %80, ptr noundef %25, ptr noundef %14, ptr noundef %15)
  br label %81

81:                                               ; preds = %76, %73
  %82 = getelementptr inbounds i8, ptr %13, i64 176
  %83 = load ptr, ptr %82, align 8, !tbaa !31
  %84 = getelementptr inbounds i8, ptr %13, i64 184
  %85 = load i64, ptr %84, align 8, !tbaa !26
  call void @BuildAndStoreEntropyCodesLiteral(ptr noundef %0, ptr noundef nonnull %17, ptr noundef %83, i64 noundef %85, ptr noundef %25, ptr noundef %14, ptr noundef %15)
  %86 = getelementptr inbounds i8, ptr %13, i64 192
  %87 = load ptr, ptr %86, align 8, !tbaa !32
  %88 = getelementptr inbounds i8, ptr %13, i64 200
  %89 = load i64, ptr %88, align 8, !tbaa !33
  call void @BuildAndStoreEntropyCodesCommand(ptr noundef %0, ptr noundef nonnull %18, ptr noundef %87, i64 noundef %89, ptr noundef %25, ptr noundef %14, ptr noundef %15)
  %90 = getelementptr inbounds i8, ptr %13, i64 208
  %91 = load ptr, ptr %90, align 8, !tbaa !34
  %92 = getelementptr inbounds i8, ptr %13, i64 216
  %93 = load i64, ptr %92, align 8, !tbaa !29
  call void @BuildAndStoreEntropyCodesDistance(ptr noundef %0, ptr noundef nonnull %19, ptr noundef %91, i64 noundef %93, ptr noundef %25, ptr noundef %14, ptr noundef %15)
  call void @BrotliFree(ptr noundef %0, ptr noundef %25) #5
  %.not189 = icmp eq i64 %12, 0
  br i1 %.not189, label %._crit_edge187, label %.lr.ph186

.lr.ph186:                                        ; preds = %81
  %94 = getelementptr inbounds i8, ptr %20, i64 12
  %95 = getelementptr inbounds i8, ptr %13, i64 144
  %96 = getelementptr inbounds i8, ptr %20, i64 14
  %97 = getelementptr inbounds i8, ptr %20, i64 8
  %98 = getelementptr inbounds i8, ptr %13, i64 160
  br label %99

99:                                               ; preds = %.lr.ph186, %156
  %.0184 = phi i8 [ %5, %.lr.ph186 ], [ %.3, %156 ]
  %.0147183 = phi i8 [ %6, %.lr.ph186 ], [ %.3150, %156 ]
  %.0151182 = phi i64 [ %2, %.lr.ph186 ], [ %127, %156 ]
  %.1156181 = phi i64 [ 0, %.lr.ph186 ], [ %157, %156 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #5
  %100 = getelementptr inbounds %struct.Command, ptr %11, i64 %.1156181
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(16) %100, i64 16, i1 false), !tbaa.struct !35
  %101 = load i16, ptr %94, align 4, !tbaa !40
  %102 = zext i16 %101 to i64
  call void @StoreSymbol(ptr noundef nonnull %18, i64 noundef %102, ptr noundef %14, ptr noundef %15)
  call void @StoreCommandExtra(ptr noundef nonnull %20, ptr noundef %14, ptr noundef %15)
  %103 = load i64, ptr %58, align 8, !tbaa !25
  %104 = icmp eq i64 %103, 0
  %105 = load i32, ptr %20, align 4, !tbaa !42
  %.not162175 = icmp eq i32 %105, 0
  br i1 %104, label %106, label %114

106:                                              ; preds = %99
  br i1 %.not162175, label %.loopexit, label %.lr.ph179.preheader

.lr.ph179.preheader:                              ; preds = %106
  %107 = zext i32 %105 to i64
  br label %.lr.ph179

.lr.ph179:                                        ; preds = %.lr.ph179.preheader, %.lr.ph179
  %.1152177 = phi i64 [ %112, %.lr.ph179 ], [ %.0151182, %.lr.ph179.preheader ]
  %.0157176 = phi i64 [ %113, %.lr.ph179 ], [ %107, %.lr.ph179.preheader ]
  %108 = and i64 %.1152177, %4
  %109 = getelementptr inbounds i8, ptr %1, i64 %108
  %110 = load i8, ptr %109, align 1, !tbaa !43
  %111 = zext i8 %110 to i64
  call void @StoreSymbol(ptr noundef nonnull %17, i64 noundef %111, ptr noundef %14, ptr noundef %15)
  %112 = add i64 %.1152177, 1
  %113 = add nsw i64 %.0157176, -1
  %.not162 = icmp eq i64 %113, 0
  br i1 %.not162, label %.loopexit, label %.lr.ph179, !llvm.loop !44

114:                                              ; preds = %99
  br i1 %.not162175, label %.loopexit, label %.lr.ph172.preheader

.lr.ph172.preheader:                              ; preds = %114
  %115 = zext i32 %105 to i64
  br label %.lr.ph172

.lr.ph172:                                        ; preds = %.lr.ph172.preheader, %.lr.ph172
  %.1170 = phi i8 [ %120, %.lr.ph172 ], [ %.0184, %.lr.ph172.preheader ]
  %.1148169 = phi i8 [ %.1170, %.lr.ph172 ], [ %.0147183, %.lr.ph172.preheader ]
  %.2153168 = phi i64 [ %123, %.lr.ph172 ], [ %.0151182, %.lr.ph172.preheader ]
  %.0158167 = phi i64 [ %124, %.lr.ph172 ], [ %115, %.lr.ph172.preheader ]
  %116 = call zeroext i8 @Context(i8 noundef zeroext %.1170, i8 noundef zeroext %.1148169, i32 noundef %10)
  %117 = zext i8 %116 to i64
  %118 = and i64 %.2153168, %4
  %119 = getelementptr inbounds i8, ptr %1, i64 %118
  %120 = load i8, ptr %119, align 1, !tbaa !43
  %121 = zext i8 %120 to i64
  %122 = load ptr, ptr %95, align 8, !tbaa !27
  call void @StoreSymbolWithContext(ptr noundef nonnull %17, i64 noundef %121, i64 noundef %117, ptr noundef %122, ptr noundef %14, ptr noundef %15, i64 noundef 6)
  %123 = add i64 %.2153168, 1
  %124 = add nsw i64 %.0158167, -1
  %.not161 = icmp eq i64 %124, 0
  br i1 %.not161, label %.loopexit, label %.lr.ph172, !llvm.loop !45

.loopexit:                                        ; preds = %.lr.ph172, %.lr.ph179, %114, %106
  %.3154 = phi i64 [ %.0151182, %106 ], [ %.0151182, %114 ], [ %112, %.lr.ph179 ], [ %123, %.lr.ph172 ]
  %.2149 = phi i8 [ %.0147183, %106 ], [ %.0147183, %114 ], [ %.0147183, %.lr.ph179 ], [ %.1170, %.lr.ph172 ]
  %.2 = phi i8 [ %.0184, %106 ], [ %.0184, %114 ], [ %.0184, %.lr.ph179 ], [ %120, %.lr.ph172 ]
  %125 = call i32 @CommandCopyLen(ptr noundef nonnull %20)
  %126 = zext i32 %125 to i64
  %127 = add i64 %.3154, %126
  %128 = call i32 @CommandCopyLen(ptr noundef nonnull %20)
  %.not163 = icmp eq i32 %128, 0
  br i1 %.not163, label %156, label %129

129:                                              ; preds = %.loopexit
  %130 = add i64 %127, -2
  %131 = and i64 %130, %4
  %132 = getelementptr inbounds i8, ptr %1, i64 %131
  %133 = load i8, ptr %132, align 1, !tbaa !43
  %134 = add i64 %127, -1
  %135 = and i64 %134, %4
  %136 = getelementptr inbounds i8, ptr %1, i64 %135
  %137 = load i8, ptr %136, align 1, !tbaa !43
  %138 = load i16, ptr %94, align 4, !tbaa !40
  %139 = icmp ugt i16 %138, 127
  br i1 %139, label %140, label %156

140:                                              ; preds = %129
  %141 = load i16, ptr %96, align 2, !tbaa !46
  %142 = zext i16 %141 to i64
  %143 = load i32, ptr %97, align 4, !tbaa !47
  %144 = lshr i32 %143, 24
  %145 = and i32 %143, 16777215
  %146 = zext nneg i32 %145 to i64
  %147 = load i64, ptr %70, align 8, !tbaa !28
  %148 = icmp eq i64 %147, 0
  br i1 %148, label %149, label %150

149:                                              ; preds = %140
  call void @StoreSymbol(ptr noundef nonnull %19, i64 noundef %142, ptr noundef %14, ptr noundef %15)
  br label %154

150:                                              ; preds = %140
  %151 = call i32 @CommandDistanceContext(ptr noundef nonnull %20)
  %152 = zext i32 %151 to i64
  %153 = load ptr, ptr %98, align 8, !tbaa !30
  call void @StoreSymbolWithContext(ptr noundef nonnull %19, i64 noundef %142, i64 noundef %152, ptr noundef %153, ptr noundef %14, ptr noundef %15, i64 noundef 2)
  br label %154

154:                                              ; preds = %150, %149
  %155 = zext nneg i32 %144 to i64
  call void @BrotliWriteBits(i64 noundef %155, i64 noundef %146, ptr noundef %14, ptr noundef %15)
  br label %156

156:                                              ; preds = %129, %154, %.loopexit
  %.3150 = phi i8 [ %133, %154 ], [ %133, %129 ], [ %.2149, %.loopexit ]
  %.3 = phi i8 [ %137, %154 ], [ %137, %129 ], [ %.2, %.loopexit ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #5
  %157 = add nuw i64 %.1156181, 1
  %exitcond.not = icmp eq i64 %157, %12
  br i1 %exitcond.not, label %._crit_edge187, label %99, !llvm.loop !48

._crit_edge187:                                   ; preds = %156, %81
  call void @CleanupBlockEncoder(ptr noundef %0, ptr noundef nonnull %19)
  call void @CleanupBlockEncoder(ptr noundef %0, ptr noundef nonnull %18)
  call void @CleanupBlockEncoder(ptr noundef %0, ptr noundef nonnull %17)
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %159, label %158

158:                                              ; preds = %._crit_edge187
  call void @JumpToByteBoundary(ptr noundef %14, ptr noundef %15)
  br label %159

159:                                              ; preds = %158, %._crit_edge187
  call void @llvm.lifetime.end.p0(i64 952, ptr nonnull %19) #5
  call void @llvm.lifetime.end.p0(i64 952, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 952, ptr nonnull %17) #5
  ret void
}

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

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

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

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

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

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

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

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

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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @StoreCommandExtra(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: alwaysinline nounwind uwtable
declare hidden zeroext i8 @Context(i8 noundef zeroext, i8 noundef zeroext, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i32 @CommandCopyLen(ptr noundef) local_unnamed_addr #1

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i32 @CommandDistanceContext(ptr noundef) local_unnamed_addr #1

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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, !8, i64 0}
!6 = !{!"MetaBlockSplit", !7, i64 0, !7, i64 48, !7, i64 96, !11, i64 144, !8, i64 152, !11, i64 160, !8, i64 168, !11, i64 176, !8, i64 184, !11, i64 192, !8, i64 200, !11, i64 208, !8, i64 216}
!7 = !{!"BlockSplit", !8, i64 0, !8, i64 8, !11, i64 16, !11, i64 24, !8, i64 32, !8, i64 40}
!8 = !{!"long", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!6, !11, i64 16}
!13 = !{!6, !11, i64 24}
!14 = !{!6, !8, i64 8}
!15 = !{!6, !8, i64 48}
!16 = !{!6, !11, i64 64}
!17 = !{!6, !11, i64 72}
!18 = !{!6, !8, i64 56}
!19 = !{!6, !8, i64 96}
!20 = !{!6, !11, i64 112}
!21 = !{!6, !11, i64 120}
!22 = !{!6, !8, i64 104}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!6, !8, i64 152}
!26 = !{!6, !8, i64 184}
!27 = !{!6, !11, i64 144}
!28 = !{!6, !8, i64 168}
!29 = !{!6, !8, i64 216}
!30 = !{!6, !11, i64 160}
!31 = !{!6, !11, i64 176}
!32 = !{!6, !11, i64 192}
!33 = !{!6, !8, i64 200}
!34 = !{!6, !11, i64 208}
!35 = !{i64 0, i64 4, !36, i64 4, i64 4, !36, i64 8, i64 4, !36, i64 12, i64 2, !38, i64 14, i64 2, !38}
!36 = !{!37, !37, i64 0}
!37 = !{!"int", !9, i64 0}
!38 = !{!39, !39, i64 0}
!39 = !{!"short", !9, i64 0}
!40 = !{!41, !39, i64 12}
!41 = !{!"Command", !37, i64 0, !37, i64 4, !37, i64 8, !39, i64 12, !39, i64 14}
!42 = !{!41, !37, i64 0}
!43 = !{!9, !9, i64 0}
!44 = distinct !{!44, !24}
!45 = distinct !{!45, !24}
!46 = !{!41, !39, i64 14}
!47 = !{!41, !37, i64 8}
!48 = distinct !{!48, !24}


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