; LLVM IR from fhanau/Efficient-Compression-Tool :: src/zopfli (blocksplitter)

; 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.ZopfliLZ77Store = type { ptr, ptr, i64, i8 }
%struct.ZopfliOptions = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.SymbolStats = type { [288 x i64], [32 x i64], [288 x float], [32 x float] }

@.str = external hidden unnamed_addr constant [37 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [94 x i8], align 1
@__PRETTY_FUNCTION__.ZopfliBlockSplit = external hidden unnamed_addr constant [153 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @ZopfliBlockSplit(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, i8 noundef zeroext %7, ptr noundef byval(%struct.ZopfliLZ77Store) align 8 %8) #0 {
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i8, align 1
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca %struct.ZopfliLZ77Store, align 8
  %24 = alloca i32, align 4
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store i64 %2, ptr %12, align 8, !tbaa !9
  store i64 %3, ptr %13, align 8, !tbaa !9
  store ptr %4, ptr %14, align 8, !tbaa !5
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store i8 %7, ptr %17, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  store i64 0, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store ptr null, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  store i64 0, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %29 = load ptr, ptr %15, align 8, !tbaa !5
  %30 = load i64, ptr %29, align 8, !tbaa !9
  store i64 %30, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #7
  call void @ZopfliInitLZ77Store(ptr noundef %23)
  %31 = load i8, ptr %17, align 1, !tbaa !11
  %32 = zext i8 %31 to i32
  %33 = and i32 %32, 2
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %41, label %35

35:                                               ; preds = %9
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = load ptr, ptr %11, align 8, !tbaa !5
  %38 = load i64, ptr %12, align 8, !tbaa !9
  %39 = load i64, ptr %13, align 8, !tbaa !9
  call void @ZopfliLZ77Lazy(ptr noundef %36, ptr noundef %37, i64 noundef %38, i64 noundef %39, ptr noundef %23)
  %40 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 3
  store i8 1, ptr %40, align 8, !tbaa !12
  br label %54

41:                                               ; preds = %9
  %42 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %8, i32 0, i32 2
  %43 = load i64, ptr %42, align 8, !tbaa !14
  %44 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 2
  store i64 %43, ptr %44, align 8, !tbaa !14
  %45 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %8, i32 0, i32 0
  %46 = load ptr, ptr %45, align 8, !tbaa !15
  %47 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 0
  store ptr %46, ptr %47, align 8, !tbaa !15
  %48 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %8, i32 0, i32 1
  %49 = load ptr, ptr %48, align 8, !tbaa !16
  %50 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 1
  store ptr %49, ptr %50, align 8, !tbaa !16
  %51 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %8, i32 0, i32 3
  %52 = load i8, ptr %51, align 8, !tbaa !12
  %53 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 3
  store i8 %52, ptr %53, align 8, !tbaa !12
  br label %54

54:                                               ; preds = %41, %35
  %55 = load i64, ptr %13, align 8, !tbaa !9
  %56 = load i64, ptr %12, align 8, !tbaa !9
  %57 = sub i64 %55, %56
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.ZopfliOptions, ptr %58, i32 0, i32 4
  %60 = load i32, ptr %59, align 4, !tbaa !17
  %61 = zext i32 %60 to i64
  %62 = icmp ult i64 %57, %61
  br i1 %62, label %63, label %68

63:                                               ; preds = %54
  %64 = call noalias ptr @malloc(i64 noundef 3840) #8
  %65 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %64, ptr %65, align 8, !tbaa !5
  %66 = load ptr, ptr %16, align 8, !tbaa !5
  %67 = load ptr, ptr %66, align 8, !tbaa !5
  call void @GetStatistics(ptr noundef %23, ptr noundef %67)
  call void @ZopfliCleanLZ77Store(ptr noundef %23)
  store i32 1, ptr %24, align 4
  br label %374

68:                                               ; preds = %54
  %69 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8, !tbaa !15
  %71 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 1
  %72 = load ptr, ptr %71, align 8, !tbaa !16
  %73 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 2
  %74 = load i64, ptr %73, align 8, !tbaa !14
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 3
  %77 = load i8, ptr %76, align 8, !tbaa !12
  call void @ZopfliBlockSplitLZ77(ptr noundef %70, ptr noundef %72, i64 noundef %74, ptr noundef %20, ptr noundef %21, ptr noundef %75, i8 noundef zeroext %77)
  %78 = load ptr, ptr %16, align 8, !tbaa !5
  %79 = load ptr, ptr %78, align 8, !tbaa !5
  %80 = load i64, ptr %21, align 8, !tbaa !9
  %81 = load i64, ptr %22, align 8, !tbaa !9
  %82 = add i64 %80, %81
  %83 = add i64 %82, 1
  %84 = mul i64 %83, 3840
  %85 = call ptr @realloc(ptr noundef %79, i64 noundef %84) #9
  %86 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %85, ptr %86, align 8, !tbaa !5
  %87 = load ptr, ptr %16, align 8, !tbaa !5
  %88 = load ptr, ptr %87, align 8, !tbaa !5
  %89 = icmp ne ptr %88, null
  br i1 %89, label %91, label %90

90:                                               ; preds = %68
  call void @exit(i32 noundef 1) #10
  unreachable

91:                                               ; preds = %68
  %92 = load i64, ptr %12, align 8, !tbaa !9
  store i64 %92, ptr %18, align 8, !tbaa !9
  %93 = load i64, ptr %21, align 8, !tbaa !9
  %94 = icmp ne i64 %93, 0
  br i1 %94, label %95, label %292

95:                                               ; preds = %91
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %96

96:                                               ; preds = %288, %95
  %97 = load i64, ptr %19, align 8, !tbaa !9
  %98 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 2
  %99 = load i64, ptr %98, align 8, !tbaa !14
  %100 = icmp ult i64 %97, %99
  br i1 %100, label %101, label %291

101:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %102 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 3
  %103 = load i8, ptr %102, align 8, !tbaa !12
  %104 = zext i8 %103 to i32
  %105 = icmp ne i32 %104, 0
  br i1 %105, label %106, label %134

106:                                              ; preds = %101
  %107 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 0
  %108 = load ptr, ptr %107, align 8, !tbaa !15
  %109 = load i64, ptr %19, align 8, !tbaa !9
  %110 = getelementptr inbounds i16, ptr %108, i64 %109
  %111 = load i16, ptr %110, align 2, !tbaa !20
  %112 = zext i16 %111 to i32
  %113 = icmp slt i32 %112, 256
  br i1 %113, label %114, label %115

114:                                              ; preds = %106
  br label %132

115:                                              ; preds = %106
  %116 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 0
  %117 = load ptr, ptr %116, align 8, !tbaa !15
  %118 = load i64, ptr %19, align 8, !tbaa !9
  %119 = getelementptr inbounds i16, ptr %117, i64 %118
  %120 = load i16, ptr %119, align 2, !tbaa !20
  %121 = zext i16 %120 to i32
  %122 = and i32 %121, 511
  %123 = call i32 @symtox(i32 noundef %122)
  %124 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 0
  %125 = load ptr, ptr %124, align 8, !tbaa !15
  %126 = load i64, ptr %19, align 8, !tbaa !9
  %127 = getelementptr inbounds i16, ptr %125, i64 %126
  %128 = load i16, ptr %127, align 2, !tbaa !20
  %129 = zext i16 %128 to i32
  %130 = ashr i32 %129, 9
  %131 = add i32 %123, %130
  br label %132

132:                                              ; preds = %115, %114
  %133 = phi i32 [ 1, %114 ], [ %131, %115 ]
  br label %152

134:                                              ; preds = %101
  %135 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 1
  %136 = load ptr, ptr %135, align 8, !tbaa !16
  %137 = load i64, ptr %19, align 8, !tbaa !9
  %138 = getelementptr inbounds i16, ptr %136, i64 %137
  %139 = load i16, ptr %138, align 2, !tbaa !20
  %140 = zext i16 %139 to i32
  %141 = icmp eq i32 %140, 0
  br i1 %141, label %142, label %143

142:                                              ; preds = %134
  br label %150

143:                                              ; preds = %134
  %144 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 0
  %145 = load ptr, ptr %144, align 8, !tbaa !15
  %146 = load i64, ptr %19, align 8, !tbaa !9
  %147 = getelementptr inbounds i16, ptr %145, i64 %146
  %148 = load i16, ptr %147, align 2, !tbaa !20
  %149 = zext i16 %148 to i32
  br label %150

150:                                              ; preds = %143, %142
  %151 = phi i32 [ 1, %142 ], [ %149, %143 ]
  br label %152

152:                                              ; preds = %150, %132
  %153 = phi i32 [ %133, %132 ], [ %151, %150 ]
  %154 = zext i32 %153 to i64
  store i64 %154, ptr %25, align 8, !tbaa !9
  %155 = load ptr, ptr %20, align 8, !tbaa !5
  %156 = load ptr, ptr %15, align 8, !tbaa !5
  %157 = load i64, ptr %156, align 8, !tbaa !9
  %158 = load i64, ptr %22, align 8, !tbaa !9
  %159 = sub i64 %157, %158
  %160 = getelementptr inbounds i64, ptr %155, i64 %159
  %161 = load i64, ptr %160, align 8, !tbaa !9
  %162 = load i64, ptr %19, align 8, !tbaa !9
  %163 = icmp eq i64 %161, %162
  br i1 %163, label %164, label %281

164:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %165 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 2
  %166 = load i64, ptr %165, align 8, !tbaa !14
  store i64 %166, ptr %26, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %167 = load ptr, ptr %15, align 8, !tbaa !5
  %168 = load i64, ptr %167, align 8, !tbaa !9
  %169 = load i64, ptr %22, align 8, !tbaa !9
  %170 = sub i64 %168, %169
  %171 = icmp ne i64 %170, 0
  br i1 %171, label %172, label %181

172:                                              ; preds = %164
  %173 = load ptr, ptr %20, align 8, !tbaa !5
  %174 = load ptr, ptr %15, align 8, !tbaa !5
  %175 = load i64, ptr %174, align 8, !tbaa !9
  %176 = load i64, ptr %22, align 8, !tbaa !9
  %177 = sub i64 %175, %176
  %178 = sub i64 %177, 1
  %179 = getelementptr inbounds i64, ptr %173, i64 %178
  %180 = load i64, ptr %179, align 8, !tbaa !9
  br label %182

181:                                              ; preds = %164
  br label %182

182:                                              ; preds = %181, %172
  %183 = phi i64 [ %180, %172 ], [ 0, %181 ]
  store i64 %183, ptr %27, align 8, !tbaa !9
  %184 = load i64, ptr %19, align 8, !tbaa !9
  %185 = load i64, ptr %27, align 8, !tbaa !9
  %186 = sub i64 %184, %185
  %187 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 2
  store i64 %186, ptr %187, align 8, !tbaa !14
  %188 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 3
  %189 = load i8, ptr %188, align 8, !tbaa !12
  %190 = icmp ne i8 %189, 0
  br i1 %190, label %191, label %197

191:                                              ; preds = %182
  %192 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 1
  %193 = load ptr, ptr %192, align 8, !tbaa !16
  %194 = load i64, ptr %27, align 8, !tbaa !9
  %195 = getelementptr inbounds i8, ptr %193, i64 %194
  %196 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 1
  store ptr %195, ptr %196, align 8, !tbaa !16
  br label %202

197:                                              ; preds = %182
  %198 = load i64, ptr %27, align 8, !tbaa !9
  %199 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 1
  %200 = load ptr, ptr %199, align 8, !tbaa !16
  %201 = getelementptr inbounds i16, ptr %200, i64 %198
  store ptr %201, ptr %199, align 8, !tbaa !16
  br label %202

202:                                              ; preds = %197, %191
  %203 = load i64, ptr %27, align 8, !tbaa !9
  %204 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 0
  %205 = load ptr, ptr %204, align 8, !tbaa !15
  %206 = getelementptr inbounds i16, ptr %205, i64 %203
  store ptr %206, ptr %204, align 8, !tbaa !15
  %207 = load ptr, ptr %16, align 8, !tbaa !5
  %208 = load ptr, ptr %207, align 8, !tbaa !5
  %209 = load ptr, ptr %15, align 8, !tbaa !5
  %210 = load i64, ptr %209, align 8, !tbaa !9
  %211 = getelementptr inbounds %struct.SymbolStats, ptr %208, i64 %210
  call void @GetStatistics(ptr noundef %23, ptr noundef %211)
  %212 = load i64, ptr %26, align 8, !tbaa !9
  %213 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 2
  store i64 %212, ptr %213, align 8, !tbaa !14
  %214 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 3
  %215 = load i8, ptr %214, align 8, !tbaa !12
  %216 = icmp ne i8 %215, 0
  br i1 %216, label %217, label %224

217:                                              ; preds = %202
  %218 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 1
  %219 = load ptr, ptr %218, align 8, !tbaa !16
  %220 = load i64, ptr %27, align 8, !tbaa !9
  %221 = sub i64 0, %220
  %222 = getelementptr inbounds i8, ptr %219, i64 %221
  %223 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 1
  store ptr %222, ptr %223, align 8, !tbaa !16
  br label %230

224:                                              ; preds = %202
  %225 = load i64, ptr %27, align 8, !tbaa !9
  %226 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 1
  %227 = load ptr, ptr %226, align 8, !tbaa !16
  %228 = sub i64 0, %225
  %229 = getelementptr inbounds i16, ptr %227, i64 %228
  store ptr %229, ptr %226, align 8, !tbaa !16
  br label %230

230:                                              ; preds = %224, %217
  %231 = load i64, ptr %27, align 8, !tbaa !9
  %232 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 0
  %233 = load ptr, ptr %232, align 8, !tbaa !15
  %234 = sub i64 0, %231
  %235 = getelementptr inbounds i16, ptr %233, i64 %234
  store ptr %235, ptr %232, align 8, !tbaa !15
  %236 = load ptr, ptr %15, align 8, !tbaa !5
  %237 = load i64, ptr %236, align 8, !tbaa !9
  %238 = load ptr, ptr %15, align 8, !tbaa !5
  %239 = load i64, ptr %238, align 8, !tbaa !9
  %240 = sub i64 %239, 1
  %241 = and i64 %237, %240
  %242 = icmp ne i64 %241, 0
  br i1 %242, label %260, label %243

243:                                              ; preds = %230
  %244 = load ptr, ptr %15, align 8, !tbaa !5
  %245 = load i64, ptr %244, align 8, !tbaa !9
  %246 = icmp eq i64 %245, 0
  br i1 %246, label %247, label %249

247:                                              ; preds = %243
  %248 = call noalias ptr @malloc(i64 noundef 8) #8
  br label %257

249:                                              ; preds = %243
  %250 = load ptr, ptr %14, align 8, !tbaa !5
  %251 = load ptr, ptr %250, align 8, !tbaa !5
  %252 = load ptr, ptr %15, align 8, !tbaa !5
  %253 = load i64, ptr %252, align 8, !tbaa !9
  %254 = mul i64 %253, 2
  %255 = mul i64 %254, 8
  %256 = call ptr @realloc(ptr noundef %251, i64 noundef %255) #9
  br label %257

257:                                              ; preds = %249, %247
  %258 = phi ptr [ %248, %247 ], [ %256, %249 ]
  %259 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %258, ptr %259, align 8, !tbaa !5
  br label %260

260:                                              ; preds = %257, %230
  %261 = load i64, ptr %18, align 8, !tbaa !9
  %262 = load ptr, ptr %14, align 8, !tbaa !5
  %263 = load ptr, ptr %262, align 8, !tbaa !5
  %264 = load ptr, ptr %15, align 8, !tbaa !5
  %265 = load i64, ptr %264, align 8, !tbaa !9
  %266 = getelementptr inbounds i64, ptr %263, i64 %265
  store i64 %261, ptr %266, align 8, !tbaa !9
  %267 = load ptr, ptr %15, align 8, !tbaa !5
  %268 = load i64, ptr %267, align 8, !tbaa !9
  %269 = add i64 %268, 1
  store i64 %269, ptr %267, align 8, !tbaa !9
  %270 = load ptr, ptr %15, align 8, !tbaa !5
  %271 = load i64, ptr %270, align 8, !tbaa !9
  %272 = load i64, ptr %22, align 8, !tbaa !9
  %273 = sub i64 %271, %272
  %274 = load i64, ptr %21, align 8, !tbaa !9
  %275 = icmp eq i64 %273, %274
  br i1 %275, label %276, label %277

276:                                              ; preds = %260
  store i32 2, ptr %24, align 4
  br label %278

277:                                              ; preds = %260
  store i32 0, ptr %24, align 4
  br label %278

278:                                              ; preds = %277, %276
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  %279 = load i32, ptr %24, align 4
  switch i32 %279, label %285 [
    i32 0, label %280
  ]

280:                                              ; preds = %278
  br label %281

281:                                              ; preds = %280, %152
  %282 = load i64, ptr %25, align 8, !tbaa !9
  %283 = load i64, ptr %18, align 8, !tbaa !9
  %284 = add i64 %283, %282
  store i64 %284, ptr %18, align 8, !tbaa !9
  store i32 0, ptr %24, align 4
  br label %285

285:                                              ; preds = %281, %278
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  %286 = load i32, ptr %24, align 4
  switch i32 %286, label %377 [
    i32 0, label %287
    i32 2, label %291
  ]

287:                                              ; preds = %285
  br label %288

288:                                              ; preds = %287
  %289 = load i64, ptr %19, align 8, !tbaa !9
  %290 = add i64 %289, 1
  store i64 %290, ptr %19, align 8, !tbaa !9
  br label %96, !llvm.loop !22

291:                                              ; preds = %285, %96
  br label %292

292:                                              ; preds = %291, %91
  %293 = load ptr, ptr %15, align 8, !tbaa !5
  %294 = load i64, ptr %293, align 8, !tbaa !9
  %295 = load i64, ptr %22, align 8, !tbaa !9
  %296 = sub i64 %294, %295
  %297 = load i64, ptr %21, align 8, !tbaa !9
  %298 = icmp eq i64 %296, %297
  br i1 %298, label %299, label %300

299:                                              ; preds = %292
  br label %301

300:                                              ; preds = %292
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 354, ptr noundef @__PRETTY_FUNCTION__.ZopfliBlockSplit) #10
  unreachable

301:                                              ; preds = %299
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %302 = load ptr, ptr %15, align 8, !tbaa !5
  %303 = load i64, ptr %302, align 8, !tbaa !9
  %304 = load i64, ptr %22, align 8, !tbaa !9
  %305 = sub i64 %303, %304
  %306 = icmp ne i64 %305, 0
  br i1 %306, label %307, label %316

307:                                              ; preds = %301
  %308 = load ptr, ptr %20, align 8, !tbaa !5
  %309 = load ptr, ptr %15, align 8, !tbaa !5
  %310 = load i64, ptr %309, align 8, !tbaa !9
  %311 = load i64, ptr %22, align 8, !tbaa !9
  %312 = sub i64 %310, %311
  %313 = sub i64 %312, 1
  %314 = getelementptr inbounds i64, ptr %308, i64 %313
  %315 = load i64, ptr %314, align 8, !tbaa !9
  br label %317

316:                                              ; preds = %301
  br label %317

317:                                              ; preds = %316, %307
  %318 = phi i64 [ %315, %307 ], [ 0, %316 ]
  store i64 %318, ptr %28, align 8, !tbaa !9
  %319 = load i64, ptr %28, align 8, !tbaa !9
  %320 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 2
  %321 = load i64, ptr %320, align 8, !tbaa !14
  %322 = sub i64 %321, %319
  store i64 %322, ptr %320, align 8, !tbaa !14
  %323 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 3
  %324 = load i8, ptr %323, align 8, !tbaa !12
  %325 = icmp ne i8 %324, 0
  br i1 %325, label %326, label %332

326:                                              ; preds = %317
  %327 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 1
  %328 = load ptr, ptr %327, align 8, !tbaa !16
  %329 = load i64, ptr %28, align 8, !tbaa !9
  %330 = getelementptr inbounds i8, ptr %328, i64 %329
  %331 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 1
  store ptr %330, ptr %331, align 8, !tbaa !16
  br label %337

332:                                              ; preds = %317
  %333 = load i64, ptr %28, align 8, !tbaa !9
  %334 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 1
  %335 = load ptr, ptr %334, align 8, !tbaa !16
  %336 = getelementptr inbounds i16, ptr %335, i64 %333
  store ptr %336, ptr %334, align 8, !tbaa !16
  br label %337

337:                                              ; preds = %332, %326
  %338 = load i64, ptr %28, align 8, !tbaa !9
  %339 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 0
  %340 = load ptr, ptr %339, align 8, !tbaa !15
  %341 = getelementptr inbounds i16, ptr %340, i64 %338
  store ptr %341, ptr %339, align 8, !tbaa !15
  %342 = load ptr, ptr %16, align 8, !tbaa !5
  %343 = load ptr, ptr %342, align 8, !tbaa !5
  %344 = load ptr, ptr %15, align 8, !tbaa !5
  %345 = load i64, ptr %344, align 8, !tbaa !9
  %346 = getelementptr inbounds %struct.SymbolStats, ptr %343, i64 %345
  call void @GetStatistics(ptr noundef %23, ptr noundef %346)
  %347 = load i64, ptr %28, align 8, !tbaa !9
  %348 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 2
  %349 = load i64, ptr %348, align 8, !tbaa !14
  %350 = add i64 %349, %347
  store i64 %350, ptr %348, align 8, !tbaa !14
  %351 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 3
  %352 = load i8, ptr %351, align 8, !tbaa !12
  %353 = icmp ne i8 %352, 0
  br i1 %353, label %354, label %361

354:                                              ; preds = %337
  %355 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 1
  %356 = load ptr, ptr %355, align 8, !tbaa !16
  %357 = load i64, ptr %28, align 8, !tbaa !9
  %358 = sub i64 0, %357
  %359 = getelementptr inbounds i8, ptr %356, i64 %358
  %360 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 1
  store ptr %359, ptr %360, align 8, !tbaa !16
  br label %367

361:                                              ; preds = %337
  %362 = load i64, ptr %28, align 8, !tbaa !9
  %363 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 1
  %364 = load ptr, ptr %363, align 8, !tbaa !16
  %365 = sub i64 0, %362
  %366 = getelementptr inbounds i16, ptr %364, i64 %365
  store ptr %366, ptr %363, align 8, !tbaa !16
  br label %367

367:                                              ; preds = %361, %354
  %368 = load i64, ptr %28, align 8, !tbaa !9
  %369 = getelementptr inbounds %struct.ZopfliLZ77Store, ptr %23, i32 0, i32 0
  %370 = load ptr, ptr %369, align 8, !tbaa !15
  %371 = sub i64 0, %368
  %372 = getelementptr inbounds i16, ptr %370, i64 %371
  store ptr %372, ptr %369, align 8, !tbaa !15
  %373 = load ptr, ptr %20, align 8, !tbaa !5
  call void @free(ptr noundef %373) #7
  call void @ZopfliCleanLZ77Store(ptr noundef %23)
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  store i32 0, ptr %24, align 4
  br label %374

374:                                              ; preds = %367, %63
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  %375 = load i32, ptr %24, align 4
  switch i32 %375, label %377 [
    i32 0, label %376
    i32 1, label %376
  ]

376:                                              ; preds = %374, %374
  ret void

377:                                              ; preds = %374, %285
  unreachable
}

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

declare void @ZopfliInitLZ77Store(ptr noundef) #2

declare void @ZopfliLZ77Lazy(ptr noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

declare void @GetStatistics(ptr noundef, ptr noundef) #2

declare void @ZopfliCleanLZ77Store(ptr noundef) #2

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

; Function Attrs: nounwind allocsize(1)
declare ptr @realloc(ptr noundef, i64 noundef) #4

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #5

; Function Attrs: nounwind uwtable
declare hidden i32 @symtox(i32 noundef) #0

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

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #6

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 = { "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 = { nounwind allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind allocsize(1) "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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }
attributes #9 = { nounwind allocsize(1) }
attributes #10 = { noreturn nounwind }

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

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


; 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.ZopfliLZ77Store = type { ptr, ptr, i64, i8 }
%struct.SymbolStats = type { [288 x i64], [32 x i64], [288 x float], [32 x float] }

@.str = external hidden unnamed_addr constant [37 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [94 x i8], align 1
@__PRETTY_FUNCTION__.ZopfliBlockSplit = external hidden unnamed_addr constant [153 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @ZopfliBlockSplit(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, ptr nocapture noundef %4, ptr nocapture noundef %5, ptr nocapture noundef %6, i8 noundef zeroext %7, ptr nocapture noundef readonly byval(%struct.ZopfliLZ77Store) align 8 %8) local_unnamed_addr #0 {
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca %struct.ZopfliLZ77Store, align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  store ptr null, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  store i64 0, ptr %11, align 8, !tbaa !9
  %13 = load i64, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #8
  call void @ZopfliInitLZ77Store(ptr noundef nonnull %12) #8
  %14 = and i8 %7, 2
  %.not = icmp eq i8 %14, 0
  br i1 %.not, label %15, label %16

15:                                               ; preds = %9
  call void @ZopfliLZ77Lazy(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, ptr noundef nonnull %12) #8
  br label %23

16:                                               ; preds = %9
  %17 = getelementptr inbounds i8, ptr %8, i64 16
  %18 = load i64, ptr %17, align 8, !tbaa !11
  %19 = getelementptr inbounds i8, ptr %12, i64 16
  store i64 %18, ptr %19, align 16, !tbaa !11
  %20 = load <2 x ptr>, ptr %8, align 8, !tbaa !5
  store <2 x ptr> %20, ptr %12, align 16, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %8, i64 24
  %22 = load i8, ptr %21, align 8, !tbaa !13
  br label %23

23:                                               ; preds = %16, %15
  %24 = phi i8 [ 1, %15 ], [ %22, %16 ]
  %25 = getelementptr inbounds i8, ptr %12, i64 24
  store i8 %24, ptr %25, align 8
  %26 = sub i64 %3, %2
  %27 = getelementptr inbounds i8, ptr %0, i64 16
  %28 = load i32, ptr %27, align 4, !tbaa !14
  %29 = zext i32 %28 to i64
  %30 = icmp ult i64 %26, %29
  br i1 %30, label %31, label %33

31:                                               ; preds = %23
  %32 = call noalias dereferenceable_or_null(3840) ptr @malloc(i64 noundef 3840) #9
  store ptr %32, ptr %6, align 8, !tbaa !5
  call void @GetStatistics(ptr noundef nonnull %12, ptr noundef %32) #8
  br label %164

33:                                               ; preds = %23
  %34 = load ptr, ptr %12, align 16, !tbaa !17
  %35 = getelementptr inbounds i8, ptr %12, i64 8
  %36 = load ptr, ptr %35, align 8, !tbaa !18
  %37 = getelementptr inbounds i8, ptr %12, i64 16
  %38 = load i64, ptr %37, align 16, !tbaa !11
  call void @ZopfliBlockSplitLZ77(ptr noundef %34, ptr noundef %36, i64 noundef %38, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %0, i8 noundef zeroext %24)
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = load i64, ptr %11, align 8, !tbaa !9
  %41 = add i64 %40, %13
  %42 = mul i64 %41, 3840
  %43 = add i64 %42, 3840
  %44 = call ptr @realloc(ptr noundef %39, i64 noundef %43) #10
  store ptr %44, ptr %6, align 8, !tbaa !5
  %.not80 = icmp eq ptr %44, null
  br i1 %.not80, label %45, label %46

45:                                               ; preds = %33
  call void @exit(i32 noundef 1) #11
  unreachable

46:                                               ; preds = %33
  %47 = load i64, ptr %11, align 8, !tbaa !9
  %.not81 = icmp ne i64 %47, 0
  %48 = load i64, ptr %37, align 16
  %49 = icmp ne i64 %48, 0
  %or.cond = select i1 %.not81, i1 %49, i1 false
  br i1 %or.cond, label %.lr.ph, label %..loopexit_crit_edge

..loopexit_crit_edge:                             ; preds = %46
  %.pre105 = load i64, ptr %5, align 8, !tbaa !9
  br label %.loopexit

.lr.ph:                                           ; preds = %46, %.thread
  %.pre104107 = phi i64 [ %.pre104108, %.thread ], [ %48, %46 ]
  %.099 = phi i64 [ %128, %.thread ], [ %2, %46 ]
  %.07398 = phi i64 [ %129, %.thread ], [ 0, %46 ]
  %50 = load i8, ptr %25, align 8, !tbaa !13
  %.not82 = icmp eq i8 %50, 0
  br i1 %.not82, label %66, label %51

51:                                               ; preds = %.lr.ph
  %52 = load ptr, ptr %12, align 16, !tbaa !17
  %53 = getelementptr inbounds i16, ptr %52, i64 %.07398
  %54 = load i16, ptr %53, align 2, !tbaa !19
  %55 = icmp ult i16 %54, 256
  br i1 %55, label %76, label %56

56:                                               ; preds = %51
  %57 = and i16 %54, 511
  %58 = zext nneg i16 %57 to i32
  %59 = call i32 @symtox(i32 noundef %58)
  %60 = load ptr, ptr %12, align 16, !tbaa !17
  %61 = getelementptr inbounds i16, ptr %60, i64 %.07398
  %62 = load i16, ptr %61, align 2, !tbaa !19
  %63 = lshr i16 %62, 9
  %64 = zext nneg i16 %63 to i32
  %65 = add i32 %59, %64
  %.pre104.pre = load i64, ptr %37, align 16, !tbaa !11
  br label %76

66:                                               ; preds = %.lr.ph
  %67 = load ptr, ptr %35, align 8, !tbaa !18
  %68 = getelementptr inbounds i16, ptr %67, i64 %.07398
  %69 = load i16, ptr %68, align 2, !tbaa !19
  %70 = icmp eq i16 %69, 0
  br i1 %70, label %76, label %71

71:                                               ; preds = %66
  %72 = load ptr, ptr %12, align 16, !tbaa !17
  %73 = getelementptr inbounds i16, ptr %72, i64 %.07398
  %74 = load i16, ptr %73, align 2, !tbaa !19
  %75 = zext i16 %74 to i32
  br label %76

76:                                               ; preds = %71, %66, %56, %51
  %.pre104 = phi i64 [ %.pre104.pre, %56 ], [ %.pre104107, %51 ], [ %.pre104107, %71 ], [ %.pre104107, %66 ]
  %77 = phi i32 [ %65, %56 ], [ 1, %51 ], [ %75, %71 ], [ 1, %66 ]
  %78 = zext i32 %77 to i64
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  %80 = load i64, ptr %5, align 8, !tbaa !9
  %81 = sub i64 %80, %13
  %82 = getelementptr inbounds i64, ptr %79, i64 %81
  %83 = load i64, ptr %82, align 8, !tbaa !9
  %84 = icmp eq i64 %83, %.07398
  br i1 %84, label %85, label %.thread

85:                                               ; preds = %76
  %.not83 = icmp eq i64 %80, %13
  br i1 %.not83, label %89, label %86

86:                                               ; preds = %85
  %87 = getelementptr i8, ptr %82, i64 -8
  %88 = load i64, ptr %87, align 8, !tbaa !9
  br label %89

89:                                               ; preds = %85, %86
  %90 = phi i64 [ %88, %86 ], [ 0, %85 ]
  %91 = sub i64 %.07398, %90
  store i64 %91, ptr %37, align 16, !tbaa !11
  %92 = load i8, ptr %25, align 8, !tbaa !13
  %.not84 = icmp eq i8 %92, 0
  %93 = load ptr, ptr %35, align 8
  %94 = getelementptr inbounds i16, ptr %93, i64 %90
  %95 = getelementptr inbounds i8, ptr %93, i64 %90
  %storemerge = select i1 %.not84, ptr %94, ptr %95
  store ptr %storemerge, ptr %35, align 8, !tbaa !18
  %96 = load ptr, ptr %12, align 16, !tbaa !17
  %97 = getelementptr inbounds i16, ptr %96, i64 %90
  store ptr %97, ptr %12, align 16, !tbaa !17
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.SymbolStats, ptr %98, i64 %80
  call void @GetStatistics(ptr noundef nonnull %12, ptr noundef %99) #8
  store i64 %.pre104, ptr %37, align 16, !tbaa !11
  %100 = load i8, ptr %25, align 8, !tbaa !13
  %.not85 = icmp eq i8 %100, 0
  %101 = load ptr, ptr %35, align 8
  %102 = sub i64 0, %90
  %103 = getelementptr inbounds i16, ptr %101, i64 %102
  %104 = getelementptr inbounds i8, ptr %101, i64 %102
  %storemerge86 = select i1 %.not85, ptr %103, ptr %104
  store ptr %storemerge86, ptr %35, align 8, !tbaa !18
  %105 = load ptr, ptr %12, align 16, !tbaa !17
  %106 = getelementptr inbounds i16, ptr %105, i64 %102
  store ptr %106, ptr %12, align 16, !tbaa !17
  %107 = load i64, ptr %5, align 8, !tbaa !9
  %108 = call range(i64 0, 65) i64 @llvm.ctpop.i64(i64 %107)
  %.not87 = icmp ult i64 %108, 2
  br i1 %.not87, label %109, label %._crit_edge

._crit_edge:                                      ; preds = %89
  %.pre = load ptr, ptr %4, align 8, !tbaa !5
  br label %119

109:                                              ; preds = %89
  %110 = icmp eq i64 %107, 0
  br i1 %110, label %111, label %113

111:                                              ; preds = %109
  %112 = call noalias dereferenceable_or_null(8) ptr @malloc(i64 noundef 8) #9
  br label %117

113:                                              ; preds = %109
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = shl i64 %107, 4
  %116 = call ptr @realloc(ptr noundef %114, i64 noundef %115) #10
  %.pre102.pre = load i64, ptr %5, align 8, !tbaa !9
  br label %117

117:                                              ; preds = %113, %111
  %.pre102 = phi i64 [ 0, %111 ], [ %.pre102.pre, %113 ]
  %118 = phi ptr [ %112, %111 ], [ %116, %113 ]
  store ptr %118, ptr %4, align 8, !tbaa !5
  br label %119

119:                                              ; preds = %._crit_edge, %117
  %120 = phi i64 [ %107, %._crit_edge ], [ %.pre102, %117 ]
  %121 = phi ptr [ %.pre, %._crit_edge ], [ %118, %117 ]
  %122 = getelementptr inbounds i64, ptr %121, i64 %120
  store i64 %.099, ptr %122, align 8, !tbaa !9
  %123 = load i64, ptr %5, align 8, !tbaa !9
  %124 = add i64 %123, 1
  store i64 %124, ptr %5, align 8, !tbaa !9
  %125 = sub i64 %124, %13
  %126 = load i64, ptr %11, align 8, !tbaa !9
  %.not88 = icmp eq i64 %125, %126
  br i1 %.not88, label %.loopexit, label %..thread_crit_edge

..thread_crit_edge:                               ; preds = %119
  %.pre103 = load i64, ptr %37, align 16, !tbaa !11
  br label %.thread

.thread:                                          ; preds = %..thread_crit_edge, %76
  %.pre104108 = phi i64 [ %.pre103, %..thread_crit_edge ], [ %.pre104, %76 ]
  %127 = phi i64 [ %124, %..thread_crit_edge ], [ %80, %76 ]
  %128 = add i64 %.099, %78
  %129 = add nuw i64 %.07398, 1
  %130 = icmp ult i64 %129, %.pre104108
  br i1 %130, label %.lr.ph, label %.thread..loopexit.loopexit_crit_edge, !llvm.loop !21

.thread..loopexit.loopexit_crit_edge:             ; preds = %.thread
  %.pre106.pre = load i64, ptr %11, align 8, !tbaa !9
  br label %.loopexit

.loopexit:                                        ; preds = %119, %.thread..loopexit.loopexit_crit_edge, %..loopexit_crit_edge
  %131 = phi i64 [ %47, %..loopexit_crit_edge ], [ %.pre106.pre, %.thread..loopexit.loopexit_crit_edge ], [ %125, %119 ]
  %132 = phi i64 [ %.pre105, %..loopexit_crit_edge ], [ %127, %.thread..loopexit.loopexit_crit_edge ], [ %124, %119 ]
  %133 = sub i64 %132, %13
  %134 = icmp eq i64 %133, %131
  br i1 %134, label %136, label %135

135:                                              ; preds = %.loopexit
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 354, ptr noundef nonnull @__PRETTY_FUNCTION__.ZopfliBlockSplit) #11
  unreachable

136:                                              ; preds = %.loopexit
  %.not89 = icmp eq i64 %132, %13
  br i1 %.not89, label %142, label %137

137:                                              ; preds = %136
  %138 = load ptr, ptr %10, align 8, !tbaa !5
  %139 = getelementptr i64, ptr %138, i64 %131
  %140 = getelementptr i8, ptr %139, i64 -8
  %141 = load i64, ptr %140, align 8, !tbaa !9
  br label %142

142:                                              ; preds = %136, %137
  %143 = phi i64 [ %141, %137 ], [ 0, %136 ]
  %144 = load i64, ptr %37, align 16, !tbaa !11
  %145 = sub i64 %144, %143
  store i64 %145, ptr %37, align 16, !tbaa !11
  %146 = load i8, ptr %25, align 8, !tbaa !13
  %.not90 = icmp eq i8 %146, 0
  %147 = load ptr, ptr %35, align 8
  %148 = getelementptr inbounds i16, ptr %147, i64 %143
  %149 = getelementptr inbounds i8, ptr %147, i64 %143
  %storemerge91 = select i1 %.not90, ptr %148, ptr %149
  store ptr %storemerge91, ptr %35, align 8, !tbaa !18
  %150 = load ptr, ptr %12, align 16, !tbaa !17
  %151 = getelementptr inbounds i16, ptr %150, i64 %143
  store ptr %151, ptr %12, align 16, !tbaa !17
  %152 = load ptr, ptr %6, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.SymbolStats, ptr %152, i64 %132
  call void @GetStatistics(ptr noundef nonnull %12, ptr noundef %153) #8
  %154 = load i64, ptr %37, align 16, !tbaa !11
  %155 = add i64 %154, %143
  store i64 %155, ptr %37, align 16, !tbaa !11
  %156 = load i8, ptr %25, align 8, !tbaa !13
  %.not92 = icmp eq i8 %156, 0
  %157 = load ptr, ptr %35, align 8
  %158 = sub i64 0, %143
  %159 = getelementptr inbounds i16, ptr %157, i64 %158
  %160 = getelementptr inbounds i8, ptr %157, i64 %158
  %storemerge93 = select i1 %.not92, ptr %159, ptr %160
  store ptr %storemerge93, ptr %35, align 8, !tbaa !18
  %161 = load ptr, ptr %12, align 16, !tbaa !17
  %162 = getelementptr inbounds i16, ptr %161, i64 %158
  store ptr %162, ptr %12, align 16, !tbaa !17
  %163 = load ptr, ptr %10, align 8, !tbaa !5
  call void @free(ptr noundef %163) #8
  br label %164

164:                                              ; preds = %142, %31
  call void @ZopfliCleanLZ77Store(ptr noundef nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  ret void
}

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

declare void @ZopfliInitLZ77Store(ptr noundef) local_unnamed_addr #2

declare void @ZopfliLZ77Lazy(ptr noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

declare void @GetStatistics(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @ZopfliCleanLZ77Store(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias noundef ptr @realloc(ptr allocptr nocapture noundef, i64 noundef) local_unnamed_addr #4

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
declare hidden i32 @symtox(i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #6

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

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 = { "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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }
attributes #9 = { nounwind allocsize(0) }
attributes #10 = { nounwind allocsize(1) }
attributes #11 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 16}
!12 = !{!"ZopfliLZ77Store", !6, i64 0, !6, i64 8, !10, i64 16, !7, i64 24}
!13 = !{!12, !7, i64 24}
!14 = !{!15, !16, i64 16}
!15 = !{!"ZopfliOptions", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12, !16, i64 16, !16, i64 20, !16, i64 24, !16, i64 28, !16, i64 32, !16, i64 36, !16, i64 40, !16, i64 44, !16, i64 48, !16, i64 52, !16, i64 56, !16, i64 60, !16, i64 64, !16, i64 68}
!16 = !{!"int", !7, i64 0}
!17 = !{!12, !6, i64 0}
!18 = !{!12, !6, i64 8}
!19 = !{!20, !20, i64 0}
!20 = !{!"short", !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass