; LLVM IR from kuba--/zip :: src (zip)

; 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.mz_zip_archive = type { i64, i64, i32, i32, i32, i32, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.mz_zip_reader_extract_iter_state = type { ptr, i32, i32, i64, i64, i64, i64, i64, i64, %struct.mz_zip_archive_file_stat, ptr, ptr, i64, %struct.tinfl_decompressor_tag, i32 }
%struct.mz_zip_archive_file_stat = type { i32, i64, i16, i16, i16, i16, i32, i64, i64, i16, i32, i64, i32, i32, i32, i32, [512 x i8], [512 x i8], i64 }
%struct.tinfl_decompressor_tag = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [3 x i32], i64, i64, [3 x [1024 x i16]], [576 x i16], [64 x i16], [38 x i16], [288 x i8], [32 x i8], [19 x i8], [4 x i8], [457 x i8] }
%struct.mz_zip_internal_state_tag = type { %struct.mz_zip_array, %struct.mz_zip_array, %struct.mz_zip_array, i32, i32, i32, ptr, i64, ptr, i64, i64 }
%struct.mz_zip_array = type { ptr, i64, i64, i32 }

; 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 i32 @mz_zip_set_error(ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @mz_zip_reader_file_stat(ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local ptr @mz_zip_reader_extract_iter_new(ptr noundef %0, i32 noundef %1, i32 noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca [8 x i32], align 16
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %12 = getelementptr inbounds [8 x i32], ptr %9, i64 0, i64 0
  store ptr %12, ptr %10, align 8, !tbaa !5
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = icmp ne ptr %13, null
  br i1 %14, label %15, label %20

15:                                               ; preds = %3
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.mz_zip_archive, ptr %16, i32 0, i32 15
  %18 = load ptr, ptr %17, align 8, !tbaa !11
  %19 = icmp ne ptr %18, null
  br i1 %19, label %21, label %20

20:                                               ; preds = %15, %3
  store ptr null, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %383

21:                                               ; preds = %15
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.mz_zip_archive, ptr %22, i32 0, i32 7
  %24 = load ptr, ptr %23, align 8, !tbaa !14
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.mz_zip_archive, ptr %25, i32 0, i32 10
  %27 = load ptr, ptr %26, align 8, !tbaa !15
  %28 = call ptr %24(ptr noundef %27, i64 noundef 1, i64 noundef 9584)
  store ptr %28, ptr %8, align 8, !tbaa !5
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = icmp ne ptr %29, null
  br i1 %30, label %34, label %31

31:                                               ; preds = %21
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = call i32 @mz_zip_set_error(ptr noundef %32, i32 noundef 16)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %383

34:                                               ; preds = %21
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = load i32, ptr %6, align 4, !tbaa !9
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %37, i32 0, i32 9
  %39 = call i32 @mz_zip_reader_file_stat(ptr noundef %35, i32 noundef %36, ptr noundef %38)
  %40 = icmp ne i32 %39, 0
  br i1 %40, label %49, label %41

41:                                               ; preds = %34
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.mz_zip_archive, ptr %42, i32 0, i32 8
  %44 = load ptr, ptr %43, align 8, !tbaa !16
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.mz_zip_archive, ptr %45, i32 0, i32 10
  %47 = load ptr, ptr %46, align 8, !tbaa !15
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  call void %44(ptr noundef %47, ptr noundef %48)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %383

49:                                               ; preds = %34
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %50, i32 0, i32 9
  %52 = getelementptr inbounds %struct.mz_zip_archive_file_stat, ptr %51, i32 0, i32 4
  %53 = load i16, ptr %52, align 4, !tbaa !17
  %54 = zext i16 %53 to i32
  %55 = and i32 %54, 97
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %57, label %67

57:                                               ; preds = %49
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = call i32 @mz_zip_set_error(ptr noundef %58, i32 noundef 5)
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.mz_zip_archive, ptr %60, i32 0, i32 8
  %62 = load ptr, ptr %61, align 8, !tbaa !16
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.mz_zip_archive, ptr %63, i32 0, i32 10
  %65 = load ptr, ptr %64, align 8, !tbaa !15
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  call void %62(ptr noundef %65, ptr noundef %66)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %383

67:                                               ; preds = %49
  %68 = load i32, ptr %7, align 4, !tbaa !9
  %69 = and i32 %68, 1024
  %70 = icmp ne i32 %69, 0
  br i1 %70, label %95, label %71

71:                                               ; preds = %67
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %72, i32 0, i32 9
  %74 = getelementptr inbounds %struct.mz_zip_archive_file_stat, ptr %73, i32 0, i32 5
  %75 = load i16, ptr %74, align 2, !tbaa !22
  %76 = zext i16 %75 to i32
  %77 = icmp ne i32 %76, 0
  br i1 %77, label %78, label %95

78:                                               ; preds = %71
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %79, i32 0, i32 9
  %81 = getelementptr inbounds %struct.mz_zip_archive_file_stat, ptr %80, i32 0, i32 5
  %82 = load i16, ptr %81, align 2, !tbaa !22
  %83 = zext i16 %82 to i32
  %84 = icmp ne i32 %83, 8
  br i1 %84, label %85, label %95

85:                                               ; preds = %78
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = call i32 @mz_zip_set_error(ptr noundef %86, i32 noundef 4)
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.mz_zip_archive, ptr %88, i32 0, i32 8
  %90 = load ptr, ptr %89, align 8, !tbaa !16
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.mz_zip_archive, ptr %91, i32 0, i32 10
  %93 = load ptr, ptr %92, align 8, !tbaa !15
  %94 = load ptr, ptr %8, align 8, !tbaa !5
  call void %90(ptr noundef %93, ptr noundef %94)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %383

95:                                               ; preds = %78, %71, %67
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = load ptr, ptr %8, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %97, i32 0, i32 0
  store ptr %96, ptr %98, align 8, !tbaa !23
  %99 = load i32, ptr %7, align 4, !tbaa !9
  %100 = load ptr, ptr %8, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %100, i32 0, i32 1
  store i32 %99, ptr %101, align 8, !tbaa !24
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %102, i32 0, i32 2
  store i32 0, ptr %103, align 4, !tbaa !25
  %104 = load ptr, ptr %8, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %104, i32 0, i32 14
  store i32 0, ptr %105, align 8, !tbaa !26
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %106, i32 0, i32 4
  store i64 0, ptr %107, align 8, !tbaa !27
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %108, i32 0, i32 7
  store i64 0, ptr %109, align 8, !tbaa !28
  %110 = load ptr, ptr %8, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %110, i32 0, i32 10
  store ptr null, ptr %111, align 8, !tbaa !29
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %112, i32 0, i32 11
  store ptr null, ptr %113, align 8, !tbaa !30
  %114 = load ptr, ptr %8, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %114, i32 0, i32 12
  store i64 0, ptr %115, align 8, !tbaa !31
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %116, i32 0, i32 9
  %118 = getelementptr inbounds %struct.mz_zip_archive_file_stat, ptr %117, i32 0, i32 11
  %119 = load i64, ptr %118, align 8, !tbaa !32
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %120, i32 0, i32 8
  store i64 %119, ptr %121, align 8, !tbaa !33
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.mz_zip_archive, ptr %122, i32 0, i32 11
  %124 = load ptr, ptr %123, align 8, !tbaa !34
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.mz_zip_archive, ptr %125, i32 0, i32 14
  %127 = load ptr, ptr %126, align 8, !tbaa !35
  %128 = load ptr, ptr %8, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %128, i32 0, i32 8
  %130 = load i64, ptr %129, align 8, !tbaa !33
  %131 = load ptr, ptr %10, align 8, !tbaa !5
  %132 = call i64 %124(ptr noundef %127, i64 noundef %130, ptr noundef %131, i64 noundef 30)
  %133 = icmp ne i64 %132, 30
  br i1 %133, label %134, label %144

134:                                              ; preds = %95
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = call i32 @mz_zip_set_error(ptr noundef %135, i32 noundef 20)
  %137 = load ptr, ptr %5, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.mz_zip_archive, ptr %137, i32 0, i32 8
  %139 = load ptr, ptr %138, align 8, !tbaa !16
  %140 = load ptr, ptr %5, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.mz_zip_archive, ptr %140, i32 0, i32 10
  %142 = load ptr, ptr %141, align 8, !tbaa !15
  %143 = load ptr, ptr %8, align 8, !tbaa !5
  call void %139(ptr noundef %142, ptr noundef %143)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %383

144:                                              ; preds = %95
  %145 = load ptr, ptr %10, align 8, !tbaa !5
  %146 = getelementptr inbounds i8, ptr %145, i64 0
  %147 = load i8, ptr %146, align 1, !tbaa !36
  %148 = zext i8 %147 to i32
  %149 = load ptr, ptr %10, align 8, !tbaa !5
  %150 = getelementptr inbounds i8, ptr %149, i64 1
  %151 = load i8, ptr %150, align 1, !tbaa !36
  %152 = zext i8 %151 to i32
  %153 = shl i32 %152, 8
  %154 = or i32 %148, %153
  %155 = load ptr, ptr %10, align 8, !tbaa !5
  %156 = getelementptr inbounds i8, ptr %155, i64 2
  %157 = load i8, ptr %156, align 1, !tbaa !36
  %158 = zext i8 %157 to i32
  %159 = shl i32 %158, 16
  %160 = or i32 %154, %159
  %161 = load ptr, ptr %10, align 8, !tbaa !5
  %162 = getelementptr inbounds i8, ptr %161, i64 3
  %163 = load i8, ptr %162, align 1, !tbaa !36
  %164 = zext i8 %163 to i32
  %165 = shl i32 %164, 24
  %166 = or i32 %160, %165
  %167 = icmp ne i32 %166, 67324752
  br i1 %167, label %168, label %178

168:                                              ; preds = %144
  %169 = load ptr, ptr %5, align 8, !tbaa !5
  %170 = call i32 @mz_zip_set_error(ptr noundef %169, i32 noundef 9)
  %171 = load ptr, ptr %5, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.mz_zip_archive, ptr %171, i32 0, i32 8
  %173 = load ptr, ptr %172, align 8, !tbaa !16
  %174 = load ptr, ptr %5, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.mz_zip_archive, ptr %174, i32 0, i32 10
  %176 = load ptr, ptr %175, align 8, !tbaa !15
  %177 = load ptr, ptr %8, align 8, !tbaa !5
  call void %173(ptr noundef %176, ptr noundef %177)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %383

178:                                              ; preds = %144
  %179 = load ptr, ptr %10, align 8, !tbaa !5
  %180 = getelementptr inbounds i8, ptr %179, i64 26
  %181 = getelementptr inbounds i8, ptr %180, i64 0
  %182 = load i8, ptr %181, align 1, !tbaa !36
  %183 = zext i8 %182 to i32
  %184 = load ptr, ptr %10, align 8, !tbaa !5
  %185 = getelementptr inbounds i8, ptr %184, i64 26
  %186 = getelementptr inbounds i8, ptr %185, i64 1
  %187 = load i8, ptr %186, align 1, !tbaa !36
  %188 = zext i8 %187 to i32
  %189 = shl i32 %188, 8
  %190 = or i32 %183, %189
  %191 = zext i32 %190 to i64
  %192 = add i64 30, %191
  %193 = load ptr, ptr %10, align 8, !tbaa !5
  %194 = getelementptr inbounds i8, ptr %193, i64 28
  %195 = getelementptr inbounds i8, ptr %194, i64 0
  %196 = load i8, ptr %195, align 1, !tbaa !36
  %197 = zext i8 %196 to i32
  %198 = load ptr, ptr %10, align 8, !tbaa !5
  %199 = getelementptr inbounds i8, ptr %198, i64 28
  %200 = getelementptr inbounds i8, ptr %199, i64 1
  %201 = load i8, ptr %200, align 1, !tbaa !36
  %202 = zext i8 %201 to i32
  %203 = shl i32 %202, 8
  %204 = or i32 %197, %203
  %205 = zext i32 %204 to i64
  %206 = add i64 %192, %205
  %207 = load ptr, ptr %8, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %207, i32 0, i32 8
  %209 = load i64, ptr %208, align 8, !tbaa !33
  %210 = add i64 %209, %206
  store i64 %210, ptr %208, align 8, !tbaa !33
  %211 = load ptr, ptr %8, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %211, i32 0, i32 8
  %213 = load i64, ptr %212, align 8, !tbaa !33
  %214 = load ptr, ptr %8, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %214, i32 0, i32 9
  %216 = getelementptr inbounds %struct.mz_zip_archive_file_stat, ptr %215, i32 0, i32 7
  %217 = load i64, ptr %216, align 8, !tbaa !37
  %218 = add i64 %213, %217
  %219 = load ptr, ptr %5, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.mz_zip_archive, ptr %219, i32 0, i32 0
  %221 = load i64, ptr %220, align 8, !tbaa !38
  %222 = icmp ugt i64 %218, %221
  br i1 %222, label %223, label %233

223:                                              ; preds = %178
  %224 = load ptr, ptr %5, align 8, !tbaa !5
  %225 = call i32 @mz_zip_set_error(ptr noundef %224, i32 noundef 9)
  %226 = load ptr, ptr %5, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.mz_zip_archive, ptr %226, i32 0, i32 8
  %228 = load ptr, ptr %227, align 8, !tbaa !16
  %229 = load ptr, ptr %5, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.mz_zip_archive, ptr %229, i32 0, i32 10
  %231 = load ptr, ptr %230, align 8, !tbaa !15
  %232 = load ptr, ptr %8, align 8, !tbaa !5
  call void %228(ptr noundef %231, ptr noundef %232)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %383

233:                                              ; preds = %178
  %234 = load ptr, ptr %5, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.mz_zip_archive, ptr %234, i32 0, i32 15
  %236 = load ptr, ptr %235, align 8, !tbaa !11
  %237 = getelementptr inbounds %struct.mz_zip_internal_state_tag, ptr %236, i32 0, i32 8
  %238 = load ptr, ptr %237, align 8, !tbaa !39
  %239 = icmp ne ptr %238, null
  br i1 %239, label %240, label %266

240:                                              ; preds = %233
  %241 = load ptr, ptr %5, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.mz_zip_archive, ptr %241, i32 0, i32 15
  %243 = load ptr, ptr %242, align 8, !tbaa !11
  %244 = getelementptr inbounds %struct.mz_zip_internal_state_tag, ptr %243, i32 0, i32 8
  %245 = load ptr, ptr %244, align 8, !tbaa !39
  %246 = load ptr, ptr %8, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %246, i32 0, i32 8
  %248 = load i64, ptr %247, align 8, !tbaa !33
  %249 = getelementptr inbounds i8, ptr %245, i64 %248
  %250 = load ptr, ptr %8, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %250, i32 0, i32 10
  store ptr %249, ptr %251, align 8, !tbaa !29
  %252 = load ptr, ptr %8, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %252, i32 0, i32 9
  %254 = getelementptr inbounds %struct.mz_zip_archive_file_stat, ptr %253, i32 0, i32 7
  %255 = load i64, ptr %254, align 8, !tbaa !37
  %256 = load ptr, ptr %8, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %256, i32 0, i32 5
  store i64 %255, ptr %257, align 8, !tbaa !42
  %258 = load ptr, ptr %8, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %258, i32 0, i32 3
  store i64 %255, ptr %259, align 8, !tbaa !43
  %260 = load ptr, ptr %8, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %260, i32 0, i32 9
  %262 = getelementptr inbounds %struct.mz_zip_archive_file_stat, ptr %261, i32 0, i32 7
  %263 = load i64, ptr %262, align 8, !tbaa !37
  %264 = load ptr, ptr %8, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %264, i32 0, i32 6
  store i64 %263, ptr %265, align 8, !tbaa !44
  br label %328

266:                                              ; preds = %233
  %267 = load i32, ptr %7, align 4, !tbaa !9
  %268 = and i32 %267, 1024
  %269 = icmp ne i32 %268, 0
  br i1 %269, label %316, label %270

270:                                              ; preds = %266
  %271 = load ptr, ptr %8, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %271, i32 0, i32 9
  %273 = getelementptr inbounds %struct.mz_zip_archive_file_stat, ptr %272, i32 0, i32 5
  %274 = load i16, ptr %273, align 2, !tbaa !22
  %275 = icmp ne i16 %274, 0
  br i1 %275, label %276, label %316

276:                                              ; preds = %270
  %277 = load ptr, ptr %8, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %277, i32 0, i32 9
  %279 = getelementptr inbounds %struct.mz_zip_archive_file_stat, ptr %278, i32 0, i32 7
  %280 = load i64, ptr %279, align 8, !tbaa !37
  %281 = icmp ult i64 %280, 65536
  br i1 %281, label %282, label %287

282:                                              ; preds = %276
  %283 = load ptr, ptr %8, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %283, i32 0, i32 9
  %285 = getelementptr inbounds %struct.mz_zip_archive_file_stat, ptr %284, i32 0, i32 7
  %286 = load i64, ptr %285, align 8, !tbaa !37
  br label %288

287:                                              ; preds = %276
  br label %288

288:                                              ; preds = %287, %282
  %289 = phi i64 [ %286, %282 ], [ 65536, %287 ]
  %290 = load ptr, ptr %8, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %290, i32 0, i32 3
  store i64 %289, ptr %291, align 8, !tbaa !43
  %292 = load ptr, ptr %5, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.mz_zip_archive, ptr %292, i32 0, i32 7
  %294 = load ptr, ptr %293, align 8, !tbaa !14
  %295 = load ptr, ptr %5, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.mz_zip_archive, ptr %295, i32 0, i32 10
  %297 = load ptr, ptr %296, align 8, !tbaa !15
  %298 = load ptr, ptr %8, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %298, i32 0, i32 3
  %300 = load i64, ptr %299, align 8, !tbaa !43
  %301 = call ptr %294(ptr noundef %297, i64 noundef 1, i64 noundef %300)
  %302 = load ptr, ptr %8, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %302, i32 0, i32 10
  store ptr %301, ptr %303, align 8, !tbaa !29
  %304 = icmp eq ptr null, %301
  br i1 %304, label %305, label %315

305:                                              ; preds = %288
  %306 = load ptr, ptr %5, align 8, !tbaa !5
  %307 = call i32 @mz_zip_set_error(ptr noundef %306, i32 noundef 16)
  %308 = load ptr, ptr %5, align 8, !tbaa !5
  %309 = getelementptr inbounds %struct.mz_zip_archive, ptr %308, i32 0, i32 8
  %310 = load ptr, ptr %309, align 8, !tbaa !16
  %311 = load ptr, ptr %5, align 8, !tbaa !5
  %312 = getelementptr inbounds %struct.mz_zip_archive, ptr %311, i32 0, i32 10
  %313 = load ptr, ptr %312, align 8, !tbaa !15
  %314 = load ptr, ptr %8, align 8, !tbaa !5
  call void %310(ptr noundef %313, ptr noundef %314)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %383

315:                                              ; preds = %288
  br label %319

316:                                              ; preds = %270, %266
  %317 = load ptr, ptr %8, align 8, !tbaa !5
  %318 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %317, i32 0, i32 3
  store i64 0, ptr %318, align 8, !tbaa !43
  br label %319

319:                                              ; preds = %316, %315
  %320 = load ptr, ptr %8, align 8, !tbaa !5
  %321 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %320, i32 0, i32 5
  store i64 0, ptr %321, align 8, !tbaa !42
  %322 = load ptr, ptr %8, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %322, i32 0, i32 9
  %324 = getelementptr inbounds %struct.mz_zip_archive_file_stat, ptr %323, i32 0, i32 7
  %325 = load i64, ptr %324, align 8, !tbaa !37
  %326 = load ptr, ptr %8, align 8, !tbaa !5
  %327 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %326, i32 0, i32 6
  store i64 %325, ptr %327, align 8, !tbaa !44
  br label %328

328:                                              ; preds = %319, %240
  %329 = load i32, ptr %7, align 4, !tbaa !9
  %330 = and i32 %329, 1024
  %331 = icmp ne i32 %330, 0
  br i1 %331, label %381, label %332

332:                                              ; preds = %328
  %333 = load ptr, ptr %8, align 8, !tbaa !5
  %334 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %333, i32 0, i32 9
  %335 = getelementptr inbounds %struct.mz_zip_archive_file_stat, ptr %334, i32 0, i32 5
  %336 = load i16, ptr %335, align 2, !tbaa !22
  %337 = icmp ne i16 %336, 0
  br i1 %337, label %338, label %381

338:                                              ; preds = %332
  br label %339

339:                                              ; preds = %338
  %340 = load ptr, ptr %8, align 8, !tbaa !5
  %341 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %340, i32 0, i32 13
  %342 = getelementptr inbounds %struct.tinfl_decompressor_tag, ptr %341, i32 0, i32 0
  store i32 0, ptr %342, align 8, !tbaa !45
  br label %343

343:                                              ; preds = %339
  br label %344

344:                                              ; preds = %343
  %345 = load ptr, ptr %5, align 8, !tbaa !5
  %346 = getelementptr inbounds %struct.mz_zip_archive, ptr %345, i32 0, i32 7
  %347 = load ptr, ptr %346, align 8, !tbaa !14
  %348 = load ptr, ptr %5, align 8, !tbaa !5
  %349 = getelementptr inbounds %struct.mz_zip_archive, ptr %348, i32 0, i32 10
  %350 = load ptr, ptr %349, align 8, !tbaa !15
  %351 = call ptr %347(ptr noundef %350, i64 noundef 1, i64 noundef 32768)
  %352 = load ptr, ptr %8, align 8, !tbaa !5
  %353 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %352, i32 0, i32 11
  store ptr %351, ptr %353, align 8, !tbaa !30
  %354 = icmp eq ptr null, %351
  br i1 %354, label %355, label %380

355:                                              ; preds = %344
  %356 = load ptr, ptr %5, align 8, !tbaa !5
  %357 = call i32 @mz_zip_set_error(ptr noundef %356, i32 noundef 16)
  %358 = load ptr, ptr %8, align 8, !tbaa !5
  %359 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %358, i32 0, i32 10
  %360 = load ptr, ptr %359, align 8, !tbaa !29
  %361 = icmp ne ptr %360, null
  br i1 %361, label %362, label %372

362:                                              ; preds = %355
  %363 = load ptr, ptr %5, align 8, !tbaa !5
  %364 = getelementptr inbounds %struct.mz_zip_archive, ptr %363, i32 0, i32 8
  %365 = load ptr, ptr %364, align 8, !tbaa !16
  %366 = load ptr, ptr %5, align 8, !tbaa !5
  %367 = getelementptr inbounds %struct.mz_zip_archive, ptr %366, i32 0, i32 10
  %368 = load ptr, ptr %367, align 8, !tbaa !15
  %369 = load ptr, ptr %8, align 8, !tbaa !5
  %370 = getelementptr inbounds %struct.mz_zip_reader_extract_iter_state, ptr %369, i32 0, i32 10
  %371 = load ptr, ptr %370, align 8, !tbaa !29
  call void %365(ptr noundef %368, ptr noundef %371)
  br label %372

372:                                              ; preds = %362, %355
  %373 = load ptr, ptr %5, align 8, !tbaa !5
  %374 = getelementptr inbounds %struct.mz_zip_archive, ptr %373, i32 0, i32 8
  %375 = load ptr, ptr %374, align 8, !tbaa !16
  %376 = load ptr, ptr %5, align 8, !tbaa !5
  %377 = getelementptr inbounds %struct.mz_zip_archive, ptr %376, i32 0, i32 10
  %378 = load ptr, ptr %377, align 8, !tbaa !15
  %379 = load ptr, ptr %8, align 8, !tbaa !5
  call void %375(ptr noundef %378, ptr noundef %379)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %383

380:                                              ; preds = %344
  br label %381

381:                                              ; preds = %380, %332, %328
  %382 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %382, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %383

383:                                              ; preds = %381, %372, %305, %223, %168, %134, %85, %57, %41, %31, %20
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  %384 = load ptr, ptr %4, align 8
  ret ptr %384
}

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 = { 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 #3 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 104}
!12 = !{!"", !13, i64 0, !13, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !13, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !6, i64 40}
!15 = !{!12, !6, i64 64}
!16 = !{!12, !6, i64 48}
!17 = !{!18, !20, i64 84}
!18 = !{!"", !6, i64 0, !10, i64 8, !10, i64 12, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !19, i64 64, !6, i64 1176, !6, i64 1184, !13, i64 1192, !21, i64 1200, !10, i64 9576}
!19 = !{!"", !10, i64 0, !13, i64 8, !20, i64 16, !20, i64 18, !20, i64 20, !20, i64 22, !10, i64 24, !13, i64 32, !13, i64 40, !20, i64 48, !10, i64 52, !13, i64 56, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !7, i64 80, !7, i64 592, !13, i64 1104}
!20 = !{!"short", !7, i64 0}
!21 = !{!"tinfl_decompressor_tag", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !7, i64 44, !13, i64 56, !13, i64 64, !7, i64 72, !7, i64 6216, !7, i64 7368, !7, i64 7496, !7, i64 7572, !7, i64 7860, !7, i64 7892, !7, i64 7911, !7, i64 7915}
!22 = !{!18, !20, i64 86}
!23 = !{!18, !6, i64 0}
!24 = !{!18, !10, i64 8}
!25 = !{!18, !10, i64 12}
!26 = !{!18, !10, i64 9576}
!27 = !{!18, !13, i64 24}
!28 = !{!18, !13, i64 48}
!29 = !{!18, !6, i64 1176}
!30 = !{!18, !6, i64 1184}
!31 = !{!18, !13, i64 1192}
!32 = !{!18, !13, i64 120}
!33 = !{!18, !13, i64 56}
!34 = !{!12, !6, i64 72}
!35 = !{!12, !6, i64 96}
!36 = !{!7, !7, i64 0}
!37 = !{!18, !13, i64 96}
!38 = !{!12, !13, i64 0}
!39 = !{!40, !6, i64 128}
!40 = !{!"mz_zip_internal_state_tag", !41, i64 0, !41, i64 32, !41, i64 64, !10, i64 96, !10, i64 100, !10, i64 104, !6, i64 112, !13, i64 120, !6, i64 128, !13, i64 136, !13, i64 144}
!41 = !{!"", !6, i64 0, !13, i64 8, !13, i64 16, !10, i64 24}
!42 = !{!18, !13, i64 32}
!43 = !{!18, !13, i64 16}
!44 = !{!18, !13, i64 40}
!45 = !{!18, !10, i64 1200}


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

; 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 i32 @mz_zip_set_error(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @mz_zip_reader_file_stat(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local ptr @mz_zip_reader_extract_iter_new(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #2 {
  %4 = alloca [8 x i32], align 16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %138, label %5

5:                                                ; preds = %3
  %6 = getelementptr inbounds i8, ptr %0, i64 104
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %.not112 = icmp eq ptr %7, null
  br i1 %.not112, label %138, label %8

8:                                                ; preds = %5
  %9 = getelementptr inbounds i8, ptr %0, i64 40
  %10 = load ptr, ptr %9, align 8, !tbaa !12
  %11 = getelementptr inbounds i8, ptr %0, i64 64
  %12 = load ptr, ptr %11, align 8, !tbaa !13
  %13 = tail call ptr %10(ptr noundef %12, i64 noundef 1, i64 noundef 9584) #5
  %.not113 = icmp eq ptr %13, null
  br i1 %.not113, label %14, label %16

14:                                               ; preds = %8
  %15 = tail call i32 @mz_zip_set_error(ptr noundef nonnull %0, i32 noundef 16)
  br label %138

16:                                               ; preds = %8
  %17 = getelementptr inbounds i8, ptr %13, i64 64
  %18 = tail call i32 @mz_zip_reader_file_stat(ptr noundef nonnull %0, i32 noundef %1, ptr noundef nonnull %17)
  %.not114 = icmp eq i32 %18, 0
  br i1 %.not114, label %19, label %23

19:                                               ; preds = %16
  %20 = getelementptr inbounds i8, ptr %0, i64 48
  %21 = load ptr, ptr %20, align 8, !tbaa !14
  %22 = load ptr, ptr %11, align 8, !tbaa !13
  tail call void %21(ptr noundef %22, ptr noundef nonnull %13) #5
  br label %138

23:                                               ; preds = %16
  %24 = getelementptr inbounds i8, ptr %13, i64 84
  %25 = load i16, ptr %24, align 4, !tbaa !15
  %26 = and i16 %25, 97
  %.not115 = icmp eq i16 %26, 0
  br i1 %.not115, label %32, label %27

27:                                               ; preds = %23
  %28 = tail call i32 @mz_zip_set_error(ptr noundef nonnull %0, i32 noundef 5)
  %29 = getelementptr inbounds i8, ptr %0, i64 48
  %30 = load ptr, ptr %29, align 8, !tbaa !14
  %31 = load ptr, ptr %11, align 8, !tbaa !13
  tail call void %30(ptr noundef %31, ptr noundef nonnull %13) #5
  br label %138

32:                                               ; preds = %23
  %33 = and i32 %2, 1024
  %.not116 = icmp eq i32 %33, 0
  br i1 %.not116, label %34, label %42

34:                                               ; preds = %32
  %35 = getelementptr inbounds i8, ptr %13, i64 86
  %36 = load i16, ptr %35, align 2, !tbaa !20
  switch i16 %36, label %37 [
    i16 0, label %42
    i16 8, label %42
  ]

37:                                               ; preds = %34
  %38 = tail call i32 @mz_zip_set_error(ptr noundef nonnull %0, i32 noundef 4)
  %39 = getelementptr inbounds i8, ptr %0, i64 48
  %40 = load ptr, ptr %39, align 8, !tbaa !14
  %41 = load ptr, ptr %11, align 8, !tbaa !13
  tail call void %40(ptr noundef %41, ptr noundef nonnull %13) #5
  br label %138

42:                                               ; preds = %34, %34, %32
  store ptr %0, ptr %13, align 8, !tbaa !21
  %43 = getelementptr inbounds i8, ptr %13, i64 8
  store i32 %2, ptr %43, align 8, !tbaa !22
  %44 = getelementptr inbounds i8, ptr %13, i64 12
  store i32 0, ptr %44, align 4, !tbaa !23
  %45 = getelementptr inbounds i8, ptr %13, i64 9576
  store i32 0, ptr %45, align 8, !tbaa !24
  %46 = getelementptr inbounds i8, ptr %13, i64 24
  store i64 0, ptr %46, align 8, !tbaa !25
  %47 = getelementptr inbounds i8, ptr %13, i64 48
  store i64 0, ptr %47, align 8, !tbaa !26
  %48 = getelementptr inbounds i8, ptr %13, i64 1176
  %49 = getelementptr inbounds i8, ptr %13, i64 1184
  %50 = getelementptr inbounds i8, ptr %13, i64 120
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %48, i8 0, i64 24, i1 false)
  %51 = load i64, ptr %50, align 8, !tbaa !27
  %52 = getelementptr inbounds i8, ptr %13, i64 56
  store i64 %51, ptr %52, align 8, !tbaa !28
  %53 = getelementptr inbounds i8, ptr %0, i64 72
  %54 = load ptr, ptr %53, align 8, !tbaa !29
  %55 = getelementptr inbounds i8, ptr %0, i64 96
  %56 = load ptr, ptr %55, align 8, !tbaa !30
  %57 = call i64 %54(ptr noundef %56, i64 noundef %51, ptr noundef nonnull %4, i64 noundef 30) #5
  %.not119 = icmp eq i64 %57, 30
  br i1 %.not119, label %63, label %58

58:                                               ; preds = %42
  %59 = call i32 @mz_zip_set_error(ptr noundef nonnull %0, i32 noundef 20)
  %60 = getelementptr inbounds i8, ptr %0, i64 48
  %61 = load ptr, ptr %60, align 8, !tbaa !14
  %62 = load ptr, ptr %11, align 8, !tbaa !13
  call void %61(ptr noundef %62, ptr noundef nonnull %13) #5
  br label %138

63:                                               ; preds = %42
  %64 = load i32, ptr %4, align 16
  %.not120 = icmp eq i32 %64, 67324752
  br i1 %.not120, label %70, label %65

65:                                               ; preds = %63
  %66 = call i32 @mz_zip_set_error(ptr noundef nonnull %0, i32 noundef 9)
  %67 = getelementptr inbounds i8, ptr %0, i64 48
  %68 = load ptr, ptr %67, align 8, !tbaa !14
  %69 = load ptr, ptr %11, align 8, !tbaa !13
  call void %68(ptr noundef %69, ptr noundef nonnull %13) #5
  br label %138

70:                                               ; preds = %63
  %71 = getelementptr inbounds i8, ptr %4, i64 26
  %72 = load i16, ptr %71, align 2
  %73 = zext i16 %72 to i64
  %74 = add nuw nsw i64 %73, 30
  %75 = getelementptr inbounds i8, ptr %4, i64 28
  %76 = load i16, ptr %75, align 4
  %77 = zext i16 %76 to i64
  %78 = add nuw nsw i64 %74, %77
  %79 = load i64, ptr %52, align 8, !tbaa !28
  %80 = add i64 %78, %79
  store i64 %80, ptr %52, align 8, !tbaa !28
  %81 = getelementptr inbounds i8, ptr %13, i64 96
  %82 = load i64, ptr %81, align 8, !tbaa !31
  %83 = add i64 %80, %82
  %84 = load i64, ptr %0, align 8, !tbaa !32
  %85 = icmp ugt i64 %83, %84
  br i1 %85, label %86, label %91

86:                                               ; preds = %70
  %87 = call i32 @mz_zip_set_error(ptr noundef nonnull %0, i32 noundef 9)
  %88 = getelementptr inbounds i8, ptr %0, i64 48
  %89 = load ptr, ptr %88, align 8, !tbaa !14
  %90 = load ptr, ptr %11, align 8, !tbaa !13
  call void %89(ptr noundef %90, ptr noundef nonnull %13) #5
  br label %138

91:                                               ; preds = %70
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = getelementptr inbounds i8, ptr %92, i64 128
  %94 = load ptr, ptr %93, align 8, !tbaa !33
  %.not121 = icmp eq ptr %94, null
  br i1 %.not121, label %98, label %95

95:                                               ; preds = %91
  %96 = getelementptr inbounds i8, ptr %94, i64 %80
  store ptr %96, ptr %48, align 8, !tbaa !36
  %97 = getelementptr inbounds i8, ptr %13, i64 32
  store i64 %82, ptr %97, align 8, !tbaa !37
  br label %115

98:                                               ; preds = %91
  br i1 %.not116, label %99, label %113

99:                                               ; preds = %98
  %100 = getelementptr inbounds i8, ptr %13, i64 86
  %101 = load i16, ptr %100, align 2, !tbaa !20
  %.not122 = icmp eq i16 %101, 0
  br i1 %.not122, label %113, label %102

102:                                              ; preds = %99
  %spec.select = call i64 @llvm.umin.i64(i64 %82, i64 65536)
  %103 = getelementptr inbounds i8, ptr %13, i64 16
  store i64 %spec.select, ptr %103, align 8, !tbaa !38
  %104 = load ptr, ptr %9, align 8, !tbaa !12
  %105 = load ptr, ptr %11, align 8, !tbaa !13
  %106 = call ptr %104(ptr noundef %105, i64 noundef 1, i64 noundef %spec.select) #5
  store ptr %106, ptr %48, align 8, !tbaa !36
  %107 = icmp eq ptr %106, null
  br i1 %107, label %108, label %._crit_edge

._crit_edge:                                      ; preds = %102
  %.pre = load i64, ptr %81, align 8, !tbaa !31
  br label %115

108:                                              ; preds = %102
  %109 = call i32 @mz_zip_set_error(ptr noundef nonnull %0, i32 noundef 16)
  %110 = getelementptr inbounds i8, ptr %0, i64 48
  %111 = load ptr, ptr %110, align 8, !tbaa !14
  %112 = load ptr, ptr %11, align 8, !tbaa !13
  call void %111(ptr noundef %112, ptr noundef nonnull %13) #5
  br label %138

113:                                              ; preds = %99, %98
  %114 = getelementptr inbounds i8, ptr %13, i64 16
  store i64 0, ptr %114, align 8, !tbaa !38
  br label %115

115:                                              ; preds = %113, %._crit_edge, %95
  %.sink128 = phi i64 [ 16, %95 ], [ 32, %._crit_edge ], [ 32, %113 ]
  %.sink126 = phi i64 [ %82, %95 ], [ 0, %._crit_edge ], [ 0, %113 ]
  %.sink = phi i64 [ %82, %95 ], [ %.pre, %._crit_edge ], [ %82, %113 ]
  %116 = getelementptr inbounds i8, ptr %13, i64 %.sink128
  store i64 %.sink126, ptr %116, align 8, !tbaa !39
  %117 = getelementptr inbounds i8, ptr %13, i64 40
  store i64 %.sink, ptr %117, align 8, !tbaa !40
  br i1 %.not116, label %118, label %138

118:                                              ; preds = %115
  %119 = getelementptr inbounds i8, ptr %13, i64 86
  %120 = load i16, ptr %119, align 2, !tbaa !20
  %.not123 = icmp eq i16 %120, 0
  br i1 %.not123, label %138, label %121

121:                                              ; preds = %118
  %122 = getelementptr inbounds i8, ptr %13, i64 1200
  store i32 0, ptr %122, align 8, !tbaa !41
  %123 = load ptr, ptr %9, align 8, !tbaa !12
  %124 = load ptr, ptr %11, align 8, !tbaa !13
  %125 = call ptr %123(ptr noundef %124, i64 noundef 1, i64 noundef 32768) #5
  store ptr %125, ptr %49, align 8, !tbaa !42
  %126 = icmp eq ptr %125, null
  br i1 %126, label %127, label %138

127:                                              ; preds = %121
  %128 = call i32 @mz_zip_set_error(ptr noundef nonnull %0, i32 noundef 16)
  %129 = load ptr, ptr %48, align 8, !tbaa !36
  %.not124 = icmp eq ptr %129, null
  br i1 %.not124, label %134, label %130

130:                                              ; preds = %127
  %131 = getelementptr inbounds i8, ptr %0, i64 48
  %132 = load ptr, ptr %131, align 8, !tbaa !14
  %133 = load ptr, ptr %11, align 8, !tbaa !13
  call void %132(ptr noundef %133, ptr noundef nonnull %129) #5
  br label %134

134:                                              ; preds = %130, %127
  %135 = getelementptr inbounds i8, ptr %0, i64 48
  %136 = load ptr, ptr %135, align 8, !tbaa !14
  %137 = load ptr, ptr %11, align 8, !tbaa !13
  call void %136(ptr noundef %137, ptr noundef nonnull %13) #5
  br label %138

138:                                              ; preds = %115, %118, %121, %3, %5, %134, %108, %86, %65, %58, %37, %27, %19, %14
  %.0 = phi ptr [ null, %27 ], [ null, %58 ], [ null, %65 ], [ null, %86 ], [ null, %134 ], [ null, %108 ], [ null, %37 ], [ null, %19 ], [ null, %14 ], [ null, %5 ], [ null, %3 ], [ %13, %121 ], [ %13, %118 ], [ %13, %115 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  ret ptr %.0
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !11, i64 104}
!6 = !{!"", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !7, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!6, !11, i64 40}
!13 = !{!6, !11, i64 64}
!14 = !{!6, !11, i64 48}
!15 = !{!16, !18, i64 84}
!16 = !{!"", !11, i64 0, !10, i64 8, !10, i64 12, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !17, i64 64, !11, i64 1176, !11, i64 1184, !7, i64 1192, !19, i64 1200, !10, i64 9576}
!17 = !{!"", !10, i64 0, !7, i64 8, !18, i64 16, !18, i64 18, !18, i64 20, !18, i64 22, !10, i64 24, !7, i64 32, !7, i64 40, !18, i64 48, !10, i64 52, !7, i64 56, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !8, i64 80, !8, i64 592, !7, i64 1104}
!18 = !{!"short", !8, i64 0}
!19 = !{!"tinfl_decompressor_tag", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !8, i64 44, !7, i64 56, !7, i64 64, !8, i64 72, !8, i64 6216, !8, i64 7368, !8, i64 7496, !8, i64 7572, !8, i64 7860, !8, i64 7892, !8, i64 7911, !8, i64 7915}
!20 = !{!16, !18, i64 86}
!21 = !{!16, !11, i64 0}
!22 = !{!16, !10, i64 8}
!23 = !{!16, !10, i64 12}
!24 = !{!16, !10, i64 9576}
!25 = !{!16, !7, i64 24}
!26 = !{!16, !7, i64 48}
!27 = !{!16, !7, i64 120}
!28 = !{!16, !7, i64 56}
!29 = !{!6, !11, i64 72}
!30 = !{!6, !11, i64 96}
!31 = !{!16, !7, i64 96}
!32 = !{!6, !7, i64 0}
!33 = !{!34, !11, i64 128}
!34 = !{!"mz_zip_internal_state_tag", !35, i64 0, !35, i64 32, !35, i64 64, !10, i64 96, !10, i64 100, !10, i64 104, !11, i64 112, !7, i64 120, !11, i64 128, !7, i64 136, !7, i64 144}
!35 = !{!"", !11, i64 0, !7, i64 8, !7, i64 16, !10, i64 24}
!36 = !{!16, !11, i64 1176}
!37 = !{!16, !7, i64 32}
!38 = !{!16, !7, i64 16}
!39 = !{!7, !7, i64 0}
!40 = !{!16, !7, i64 40}
!41 = !{!16, !10, i64 1200}
!42 = !{!16, !11, i64 1184}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass