; LLVM IR from modlfo/AudioEngine :: AudioEngine/JuceLibraryCode/modules/juce_core/zip/zlib (deflate)

; 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.z_stream_s = type { ptr, i32, i64, ptr, i32, i64, ptr, ptr, ptr, ptr, ptr, i32, i64, i64 }
%struct.internal_state = type { ptr, i32, ptr, i64, ptr, i32, i32, ptr, i32, i8, i32, i32, i32, i32, ptr, i64, ptr, ptr, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [573 x %struct.ct_data_s], [61 x %struct.ct_data_s], [39 x %struct.ct_data_s], %struct.tree_desc_s, %struct.tree_desc_s, %struct.tree_desc_s, [16 x i16], [573 x i32], i32, i32, [573 x i8], ptr, i32, i32, ptr, i64, i64, i32, i32, i16, i32 }
%struct.ct_data_s = type { %union.anon, %union.anon.0 }
%union.anon = type { i16 }
%union.anon.0 = type { i16 }
%struct.tree_desc_s = type { ptr, i32, ptr }

@z_deflateInit2_.my_version = external hidden constant [6 x i8], align 1
@z_errmsg = external constant [10 x ptr], align 16

; Function Attrs: nounwind uwtable
define dso_local i32 @z_deflateInit2_(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, ptr noundef %6, i32 noundef %7) #0 {
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  store i32 %1, ptr %11, align 4, !tbaa !9
  store i32 %2, ptr %12, align 4, !tbaa !9
  store i32 %3, ptr %13, align 4, !tbaa !9
  store i32 %4, ptr %14, align 4, !tbaa !9
  store i32 %5, ptr %15, align 4, !tbaa !9
  store ptr %6, ptr %16, align 8, !tbaa !5
  store i32 %7, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  store i32 1, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  %22 = load ptr, ptr %16, align 8, !tbaa !5
  %23 = icmp eq ptr %22, null
  br i1 %23, label %36, label %24

24:                                               ; preds = %8
  %25 = load ptr, ptr %16, align 8, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %25, i64 0
  %27 = load i8, ptr %26, align 1, !tbaa !11
  %28 = sext i8 %27 to i32
  %29 = load i8, ptr @z_deflateInit2_.my_version, align 1, !tbaa !11
  %30 = sext i8 %29 to i32
  %31 = icmp ne i32 %28, %30
  br i1 %31, label %36, label %32

32:                                               ; preds = %24
  %33 = load i32, ptr %17, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = icmp ne i64 %34, 112
  br i1 %35, label %36, label %37

36:                                               ; preds = %32, %24, %8
  store i32 -6, ptr %9, align 4
  store i32 1, ptr %21, align 4
  br label %293

37:                                               ; preds = %32
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  %39 = icmp eq ptr %38, null
  br i1 %39, label %40, label %41

40:                                               ; preds = %37
  store i32 -2, ptr %9, align 4
  store i32 1, ptr %21, align 4
  br label %293

41:                                               ; preds = %37
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.z_stream_s, ptr %42, i32 0, i32 6
  store ptr null, ptr %43, align 8, !tbaa !12
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.z_stream_s, ptr %44, i32 0, i32 8
  %46 = load ptr, ptr %45, align 8, !tbaa !15
  %47 = icmp eq ptr %46, null
  br i1 %47, label %48, label %53

48:                                               ; preds = %41
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.z_stream_s, ptr %49, i32 0, i32 8
  store ptr @zcalloc, ptr %50, align 8, !tbaa !15
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.z_stream_s, ptr %51, i32 0, i32 10
  store ptr null, ptr %52, align 8, !tbaa !16
  br label %53

53:                                               ; preds = %48, %41
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.z_stream_s, ptr %54, i32 0, i32 9
  %56 = load ptr, ptr %55, align 8, !tbaa !17
  %57 = icmp eq ptr %56, null
  br i1 %57, label %58, label %61

58:                                               ; preds = %53
  %59 = load ptr, ptr %10, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.z_stream_s, ptr %59, i32 0, i32 9
  store ptr @zcfree, ptr %60, align 8, !tbaa !17
  br label %61

61:                                               ; preds = %58, %53
  %62 = load i32, ptr %11, align 4, !tbaa !9
  %63 = icmp eq i32 %62, -1
  br i1 %63, label %64, label %65

64:                                               ; preds = %61
  store i32 6, ptr %11, align 4, !tbaa !9
  br label %65

65:                                               ; preds = %64, %61
  %66 = load i32, ptr %13, align 4, !tbaa !9
  %67 = icmp slt i32 %66, 0
  br i1 %67, label %68, label %71

68:                                               ; preds = %65
  store i32 0, ptr %19, align 4, !tbaa !9
  %69 = load i32, ptr %13, align 4, !tbaa !9
  %70 = sub nsw i32 0, %69
  store i32 %70, ptr %13, align 4, !tbaa !9
  br label %78

71:                                               ; preds = %65
  %72 = load i32, ptr %13, align 4, !tbaa !9
  %73 = icmp sgt i32 %72, 15
  br i1 %73, label %74, label %77

74:                                               ; preds = %71
  store i32 2, ptr %19, align 4, !tbaa !9
  %75 = load i32, ptr %13, align 4, !tbaa !9
  %76 = sub nsw i32 %75, 16
  store i32 %76, ptr %13, align 4, !tbaa !9
  br label %77

77:                                               ; preds = %74, %71
  br label %78

78:                                               ; preds = %77, %68
  %79 = load i32, ptr %14, align 4, !tbaa !9
  %80 = icmp slt i32 %79, 1
  br i1 %80, label %105, label %81

81:                                               ; preds = %78
  %82 = load i32, ptr %14, align 4, !tbaa !9
  %83 = icmp sgt i32 %82, 9
  br i1 %83, label %105, label %84

84:                                               ; preds = %81
  %85 = load i32, ptr %12, align 4, !tbaa !9
  %86 = icmp ne i32 %85, 8
  br i1 %86, label %105, label %87

87:                                               ; preds = %84
  %88 = load i32, ptr %13, align 4, !tbaa !9
  %89 = icmp slt i32 %88, 8
  br i1 %89, label %105, label %90

90:                                               ; preds = %87
  %91 = load i32, ptr %13, align 4, !tbaa !9
  %92 = icmp sgt i32 %91, 15
  br i1 %92, label %105, label %93

93:                                               ; preds = %90
  %94 = load i32, ptr %11, align 4, !tbaa !9
  %95 = icmp slt i32 %94, 0
  br i1 %95, label %105, label %96

96:                                               ; preds = %93
  %97 = load i32, ptr %11, align 4, !tbaa !9
  %98 = icmp sgt i32 %97, 9
  br i1 %98, label %105, label %99

99:                                               ; preds = %96
  %100 = load i32, ptr %15, align 4, !tbaa !9
  %101 = icmp slt i32 %100, 0
  br i1 %101, label %105, label %102

102:                                              ; preds = %99
  %103 = load i32, ptr %15, align 4, !tbaa !9
  %104 = icmp sgt i32 %103, 4
  br i1 %104, label %105, label %106

105:                                              ; preds = %102, %99, %96, %93, %90, %87, %84, %81, %78
  store i32 -2, ptr %9, align 4
  store i32 1, ptr %21, align 4
  br label %293

106:                                              ; preds = %102
  %107 = load i32, ptr %13, align 4, !tbaa !9
  %108 = icmp eq i32 %107, 8
  br i1 %108, label %109, label %110

109:                                              ; preds = %106
  store i32 9, ptr %13, align 4, !tbaa !9
  br label %110

110:                                              ; preds = %109, %106
  %111 = load ptr, ptr %10, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.z_stream_s, ptr %111, i32 0, i32 8
  %113 = load ptr, ptr %112, align 8, !tbaa !15
  %114 = load ptr, ptr %10, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.z_stream_s, ptr %114, i32 0, i32 10
  %116 = load ptr, ptr %115, align 8, !tbaa !16
  %117 = call ptr %113(ptr noundef %116, i32 noundef 1, i32 noundef 5928)
  store ptr %117, ptr %18, align 8, !tbaa !5
  %118 = load ptr, ptr %18, align 8, !tbaa !5
  %119 = icmp eq ptr %118, null
  br i1 %119, label %120, label %121

120:                                              ; preds = %110
  store i32 -4, ptr %9, align 4
  store i32 1, ptr %21, align 4
  br label %293

121:                                              ; preds = %110
  %122 = load ptr, ptr %18, align 8, !tbaa !5
  %123 = load ptr, ptr %10, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.z_stream_s, ptr %123, i32 0, i32 7
  store ptr %122, ptr %124, align 8, !tbaa !18
  %125 = load ptr, ptr %10, align 8, !tbaa !5
  %126 = load ptr, ptr %18, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.internal_state, ptr %126, i32 0, i32 0
  store ptr %125, ptr %127, align 8, !tbaa !19
  %128 = load i32, ptr %19, align 4, !tbaa !9
  %129 = load ptr, ptr %18, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.internal_state, ptr %129, i32 0, i32 6
  store i32 %128, ptr %130, align 4, !tbaa !23
  %131 = load ptr, ptr %18, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.internal_state, ptr %131, i32 0, i32 7
  store ptr null, ptr %132, align 8, !tbaa !24
  %133 = load i32, ptr %13, align 4, !tbaa !9
  %134 = load ptr, ptr %18, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.internal_state, ptr %134, i32 0, i32 12
  store i32 %133, ptr %135, align 8, !tbaa !25
  %136 = load ptr, ptr %18, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.internal_state, ptr %136, i32 0, i32 12
  %138 = load i32, ptr %137, align 8, !tbaa !25
  %139 = shl i32 1, %138
  %140 = load ptr, ptr %18, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.internal_state, ptr %140, i32 0, i32 11
  store i32 %139, ptr %141, align 4, !tbaa !26
  %142 = load ptr, ptr %18, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.internal_state, ptr %142, i32 0, i32 11
  %144 = load i32, ptr %143, align 4, !tbaa !26
  %145 = sub i32 %144, 1
  %146 = load ptr, ptr %18, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.internal_state, ptr %146, i32 0, i32 13
  store i32 %145, ptr %147, align 4, !tbaa !27
  %148 = load i32, ptr %14, align 4, !tbaa !9
  %149 = add nsw i32 %148, 7
  %150 = load ptr, ptr %18, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.internal_state, ptr %150, i32 0, i32 20
  store i32 %149, ptr %151, align 8, !tbaa !28
  %152 = load ptr, ptr %18, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.internal_state, ptr %152, i32 0, i32 20
  %154 = load i32, ptr %153, align 8, !tbaa !28
  %155 = shl i32 1, %154
  %156 = load ptr, ptr %18, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.internal_state, ptr %156, i32 0, i32 19
  store i32 %155, ptr %157, align 4, !tbaa !29
  %158 = load ptr, ptr %18, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.internal_state, ptr %158, i32 0, i32 19
  %160 = load i32, ptr %159, align 4, !tbaa !29
  %161 = sub i32 %160, 1
  %162 = load ptr, ptr %18, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.internal_state, ptr %162, i32 0, i32 21
  store i32 %161, ptr %163, align 4, !tbaa !30
  %164 = load ptr, ptr %18, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.internal_state, ptr %164, i32 0, i32 20
  %166 = load i32, ptr %165, align 8, !tbaa !28
  %167 = add i32 %166, 3
  %168 = sub i32 %167, 1
  %169 = udiv i32 %168, 3
  %170 = load ptr, ptr %18, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.internal_state, ptr %170, i32 0, i32 22
  store i32 %169, ptr %171, align 8, !tbaa !31
  %172 = load ptr, ptr %10, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.z_stream_s, ptr %172, i32 0, i32 8
  %174 = load ptr, ptr %173, align 8, !tbaa !15
  %175 = load ptr, ptr %10, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.z_stream_s, ptr %175, i32 0, i32 10
  %177 = load ptr, ptr %176, align 8, !tbaa !16
  %178 = load ptr, ptr %18, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.internal_state, ptr %178, i32 0, i32 11
  %180 = load i32, ptr %179, align 4, !tbaa !26
  %181 = call ptr %174(ptr noundef %177, i32 noundef %180, i32 noundef 2)
  %182 = load ptr, ptr %18, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.internal_state, ptr %182, i32 0, i32 14
  store ptr %181, ptr %183, align 8, !tbaa !32
  %184 = load ptr, ptr %10, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.z_stream_s, ptr %184, i32 0, i32 8
  %186 = load ptr, ptr %185, align 8, !tbaa !15
  %187 = load ptr, ptr %10, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.z_stream_s, ptr %187, i32 0, i32 10
  %189 = load ptr, ptr %188, align 8, !tbaa !16
  %190 = load ptr, ptr %18, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.internal_state, ptr %190, i32 0, i32 11
  %192 = load i32, ptr %191, align 4, !tbaa !26
  %193 = call ptr %186(ptr noundef %189, i32 noundef %192, i32 noundef 2)
  %194 = load ptr, ptr %18, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.internal_state, ptr %194, i32 0, i32 16
  store ptr %193, ptr %195, align 8, !tbaa !33
  %196 = load ptr, ptr %10, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.z_stream_s, ptr %196, i32 0, i32 8
  %198 = load ptr, ptr %197, align 8, !tbaa !15
  %199 = load ptr, ptr %10, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.z_stream_s, ptr %199, i32 0, i32 10
  %201 = load ptr, ptr %200, align 8, !tbaa !16
  %202 = load ptr, ptr %18, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.internal_state, ptr %202, i32 0, i32 19
  %204 = load i32, ptr %203, align 4, !tbaa !29
  %205 = call ptr %198(ptr noundef %201, i32 noundef %204, i32 noundef 2)
  %206 = load ptr, ptr %18, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.internal_state, ptr %206, i32 0, i32 17
  store ptr %205, ptr %207, align 8, !tbaa !34
  %208 = load i32, ptr %14, align 4, !tbaa !9
  %209 = add nsw i32 %208, 6
  %210 = shl i32 1, %209
  %211 = load ptr, ptr %18, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.internal_state, ptr %211, i32 0, i32 49
  store i32 %210, ptr %212, align 8, !tbaa !35
  %213 = load ptr, ptr %10, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.z_stream_s, ptr %213, i32 0, i32 8
  %215 = load ptr, ptr %214, align 8, !tbaa !15
  %216 = load ptr, ptr %10, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.z_stream_s, ptr %216, i32 0, i32 10
  %218 = load ptr, ptr %217, align 8, !tbaa !16
  %219 = load ptr, ptr %18, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.internal_state, ptr %219, i32 0, i32 49
  %221 = load i32, ptr %220, align 8, !tbaa !35
  %222 = call ptr %215(ptr noundef %218, i32 noundef %221, i32 noundef 4)
  store ptr %222, ptr %20, align 8, !tbaa !5
  %223 = load ptr, ptr %20, align 8, !tbaa !5
  %224 = load ptr, ptr %18, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.internal_state, ptr %224, i32 0, i32 2
  store ptr %223, ptr %225, align 8, !tbaa !36
  %226 = load ptr, ptr %18, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.internal_state, ptr %226, i32 0, i32 49
  %228 = load i32, ptr %227, align 8, !tbaa !35
  %229 = zext i32 %228 to i64
  %230 = mul i64 %229, 4
  %231 = load ptr, ptr %18, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.internal_state, ptr %231, i32 0, i32 3
  store i64 %230, ptr %232, align 8, !tbaa !37
  %233 = load ptr, ptr %18, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.internal_state, ptr %233, i32 0, i32 14
  %235 = load ptr, ptr %234, align 8, !tbaa !32
  %236 = icmp eq ptr %235, null
  br i1 %236, label %252, label %237

237:                                              ; preds = %121
  %238 = load ptr, ptr %18, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.internal_state, ptr %238, i32 0, i32 16
  %240 = load ptr, ptr %239, align 8, !tbaa !33
  %241 = icmp eq ptr %240, null
  br i1 %241, label %252, label %242

242:                                              ; preds = %237
  %243 = load ptr, ptr %18, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.internal_state, ptr %243, i32 0, i32 17
  %245 = load ptr, ptr %244, align 8, !tbaa !34
  %246 = icmp eq ptr %245, null
  br i1 %246, label %252, label %247

247:                                              ; preds = %242
  %248 = load ptr, ptr %18, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.internal_state, ptr %248, i32 0, i32 2
  %250 = load ptr, ptr %249, align 8, !tbaa !36
  %251 = icmp eq ptr %250, null
  br i1 %251, label %252, label %260

252:                                              ; preds = %247, %242, %237, %121
  %253 = load ptr, ptr %18, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.internal_state, ptr %253, i32 0, i32 1
  store i32 666, ptr %254, align 8, !tbaa !38
  %255 = load ptr, ptr getelementptr inbounds ([10 x ptr], ptr @z_errmsg, i64 0, i64 6), align 16, !tbaa !5
  %256 = load ptr, ptr %10, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.z_stream_s, ptr %256, i32 0, i32 6
  store ptr %255, ptr %257, align 8, !tbaa !12
  %258 = load ptr, ptr %10, align 8, !tbaa !5
  %259 = call i32 @z_deflateEnd(ptr noundef %258)
  store i32 -4, ptr %9, align 4
  store i32 1, ptr %21, align 4
  br label %293

260:                                              ; preds = %247
  %261 = load ptr, ptr %20, align 8, !tbaa !5
  %262 = load ptr, ptr %18, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.internal_state, ptr %262, i32 0, i32 49
  %264 = load i32, ptr %263, align 8, !tbaa !35
  %265 = zext i32 %264 to i64
  %266 = udiv i64 %265, 2
  %267 = getelementptr inbounds i16, ptr %261, i64 %266
  %268 = load ptr, ptr %18, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.internal_state, ptr %268, i32 0, i32 51
  store ptr %267, ptr %269, align 8, !tbaa !39
  %270 = load ptr, ptr %18, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.internal_state, ptr %270, i32 0, i32 2
  %272 = load ptr, ptr %271, align 8, !tbaa !36
  %273 = load ptr, ptr %18, align 8, !tbaa !5
  %274 = getelementptr inbounds %struct.internal_state, ptr %273, i32 0, i32 49
  %275 = load i32, ptr %274, align 8, !tbaa !35
  %276 = zext i32 %275 to i64
  %277 = mul i64 3, %276
  %278 = getelementptr inbounds i8, ptr %272, i64 %277
  %279 = load ptr, ptr %18, align 8, !tbaa !5
  %280 = getelementptr inbounds %struct.internal_state, ptr %279, i32 0, i32 48
  store ptr %278, ptr %280, align 8, !tbaa !40
  %281 = load i32, ptr %11, align 4, !tbaa !9
  %282 = load ptr, ptr %18, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.internal_state, ptr %282, i32 0, i32 33
  store i32 %281, ptr %283, align 4, !tbaa !41
  %284 = load i32, ptr %15, align 4, !tbaa !9
  %285 = load ptr, ptr %18, align 8, !tbaa !5
  %286 = getelementptr inbounds %struct.internal_state, ptr %285, i32 0, i32 34
  store i32 %284, ptr %286, align 8, !tbaa !42
  %287 = load i32, ptr %12, align 4, !tbaa !9
  %288 = trunc i32 %287 to i8
  %289 = load ptr, ptr %18, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct.internal_state, ptr %289, i32 0, i32 9
  store i8 %288, ptr %290, align 4, !tbaa !43
  %291 = load ptr, ptr %10, align 8, !tbaa !5
  %292 = call i32 @z_deflateReset(ptr noundef %291)
  store i32 %292, ptr %9, align 4
  store i32 1, ptr %21, align 4
  br label %293

293:                                              ; preds = %260, %252, %120, %105, %40, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  %294 = load i32, ptr %9, align 4
  ret i32 %294
}

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

declare ptr @zcalloc(ptr noundef, i32 noundef, i32 noundef) #2

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @z_deflateEnd(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @z_deflateReset(ptr noundef) #0

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

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 }

!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 = !{!7, !7, i64 0}
!12 = !{!13, !6, i64 48}
!13 = !{!"z_stream_s", !6, i64 0, !10, i64 8, !14, i64 16, !6, i64 24, !10, i64 32, !14, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !14, i64 96, !14, i64 104}
!14 = !{!"long", !7, i64 0}
!15 = !{!13, !6, i64 64}
!16 = !{!13, !6, i64 80}
!17 = !{!13, !6, i64 72}
!18 = !{!13, !6, i64 56}
!19 = !{!20, !6, i64 0}
!20 = !{!"internal_state", !6, i64 0, !10, i64 8, !6, i64 16, !14, i64 24, !6, i64 32, !10, i64 40, !10, i64 44, !6, i64 48, !10, i64 56, !7, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !6, i64 80, !14, i64 88, !6, i64 96, !6, i64 104, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !14, i64 136, !10, i64 144, !10, i64 148, !10, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !10, i64 168, !10, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !10, i64 192, !7, i64 196, !7, i64 2488, !7, i64 2732, !21, i64 2888, !21, i64 2912, !21, i64 2936, !7, i64 2960, !7, i64 2992, !10, i64 5284, !10, i64 5288, !7, i64 5292, !6, i64 5872, !10, i64 5880, !10, i64 5884, !6, i64 5888, !14, i64 5896, !14, i64 5904, !10, i64 5912, !10, i64 5916, !22, i64 5920, !10, i64 5924}
!21 = !{!"tree_desc_s", !6, i64 0, !10, i64 8, !6, i64 16}
!22 = !{!"short", !7, i64 0}
!23 = !{!20, !10, i64 44}
!24 = !{!20, !6, i64 48}
!25 = !{!20, !10, i64 72}
!26 = !{!20, !10, i64 68}
!27 = !{!20, !10, i64 76}
!28 = !{!20, !10, i64 120}
!29 = !{!20, !10, i64 116}
!30 = !{!20, !10, i64 124}
!31 = !{!20, !10, i64 128}
!32 = !{!20, !6, i64 80}
!33 = !{!20, !6, i64 96}
!34 = !{!20, !6, i64 104}
!35 = !{!20, !10, i64 5880}
!36 = !{!20, !6, i64 16}
!37 = !{!20, !14, i64 24}
!38 = !{!20, !10, i64 8}
!39 = !{!20, !6, i64 5888}
!40 = !{!20, !6, i64 5872}
!41 = !{!20, !10, i64 180}
!42 = !{!20, !10, i64 184}
!43 = !{!20, !7, i64 60}


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

@z_deflateInit2_.my_version = external hidden local_unnamed_addr constant [6 x i8], align 1
@z_errmsg = external local_unnamed_addr constant [10 x ptr], align 16

; Function Attrs: nounwind uwtable
define dso_local i32 @z_deflateInit2_(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, ptr noundef readonly %6, i32 noundef %7) local_unnamed_addr #0 {
  %9 = icmp eq ptr %6, null
  br i1 %9, label %118, label %10

10:                                               ; preds = %8
  %11 = load i8, ptr %6, align 1, !tbaa !5
  %12 = load i8, ptr @z_deflateInit2_.my_version, align 1, !tbaa !5
  %13 = icmp ne i8 %11, %12
  %14 = icmp ne i32 %7, 112
  %or.cond = or i1 %14, %13
  br i1 %or.cond, label %118, label %15

15:                                               ; preds = %10
  %16 = icmp eq ptr %0, null
  br i1 %16, label %118, label %17

17:                                               ; preds = %15
  %18 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr null, ptr %18, align 8, !tbaa !8
  %19 = getelementptr inbounds i8, ptr %0, i64 64
  %20 = load ptr, ptr %19, align 8, !tbaa !13
  %21 = icmp eq ptr %20, null
  br i1 %21, label %22, label %24

22:                                               ; preds = %17
  store ptr @zcalloc, ptr %19, align 8, !tbaa !13
  %23 = getelementptr inbounds i8, ptr %0, i64 80
  store ptr null, ptr %23, align 8, !tbaa !14
  br label %24

24:                                               ; preds = %22, %17
  %25 = phi ptr [ @zcalloc, %22 ], [ %20, %17 ]
  %26 = getelementptr inbounds i8, ptr %0, i64 72
  %27 = load ptr, ptr %26, align 8, !tbaa !15
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %30

29:                                               ; preds = %24
  store ptr @zcfree, ptr %26, align 8, !tbaa !15
  br label %30

30:                                               ; preds = %29, %24
  %31 = icmp eq i32 %1, -1
  %spec.store.select = select i1 %31, i32 6, i32 %1
  %32 = icmp slt i32 %3, 0
  br i1 %32, label %33, label %35

33:                                               ; preds = %30
  %34 = sub nsw i32 0, %3
  br label %38

35:                                               ; preds = %30
  %36 = icmp ugt i32 %3, 15
  %37 = add nsw i32 %3, -16
  %spec.select = select i1 %36, i32 %37, i32 %3
  %spec.select115 = select i1 %36, i32 2, i32 1
  br label %38

38:                                               ; preds = %35, %33
  %.0110 = phi i32 [ %34, %33 ], [ %spec.select, %35 ]
  %.0109 = phi i32 [ 0, %33 ], [ %spec.select115, %35 ]
  %39 = add i32 %4, -10
  %or.cond4 = icmp ult i32 %39, -9
  %40 = icmp ne i32 %2, 8
  %or.cond6 = or i1 %40, %or.cond4
  %41 = add nsw i32 %.0110, -16
  %42 = icmp ult i32 %41, -8
  %or.cond10 = select i1 %or.cond6, i1 true, i1 %42
  %43 = icmp ugt i32 %spec.store.select, 9
  %or.cond14 = or i1 %43, %or.cond10
  %44 = icmp ugt i32 %5, 4
  %or.cond18 = or i1 %44, %or.cond14
  br i1 %or.cond18, label %118, label %45

45:                                               ; preds = %38
  %46 = getelementptr inbounds i8, ptr %0, i64 80
  %47 = load ptr, ptr %46, align 8, !tbaa !14
  %48 = tail call ptr %25(ptr noundef %47, i32 noundef 1, i32 noundef 5928) #2
  %49 = icmp eq ptr %48, null
  br i1 %49, label %118, label %50

50:                                               ; preds = %45
  %51 = icmp eq i32 %.0110, 8
  %spec.store.select19 = select i1 %51, i32 9, i32 %.0110
  %52 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr %48, ptr %52, align 8, !tbaa !16
  store ptr %0, ptr %48, align 8, !tbaa !17
  %53 = getelementptr inbounds i8, ptr %48, i64 44
  store i32 %.0109, ptr %53, align 4, !tbaa !21
  %54 = getelementptr inbounds i8, ptr %48, i64 48
  store ptr null, ptr %54, align 8, !tbaa !22
  %55 = getelementptr inbounds i8, ptr %48, i64 72
  store i32 %spec.store.select19, ptr %55, align 8, !tbaa !23
  %56 = shl nuw nsw i32 1, %spec.store.select19
  %57 = getelementptr inbounds i8, ptr %48, i64 68
  store i32 %56, ptr %57, align 4, !tbaa !24
  %58 = add nsw i32 %56, -1
  %59 = getelementptr inbounds i8, ptr %48, i64 76
  store i32 %58, ptr %59, align 4, !tbaa !25
  %60 = add nuw nsw i32 %4, 7
  %61 = getelementptr inbounds i8, ptr %48, i64 120
  store i32 %60, ptr %61, align 8, !tbaa !26
  %62 = shl nuw nsw i32 128, %4
  %63 = getelementptr inbounds i8, ptr %48, i64 116
  store i32 %62, ptr %63, align 4, !tbaa !27
  %64 = add nsw i32 %62, -1
  %65 = getelementptr inbounds i8, ptr %48, i64 124
  store i32 %64, ptr %65, align 4, !tbaa !28
  %66 = trunc nuw i32 %4 to i8
  %.lhs.trunc = add nuw nsw i8 %66, 9
  %67 = udiv i8 %.lhs.trunc, 3
  %.zext = zext nneg i8 %67 to i32
  %68 = getelementptr inbounds i8, ptr %48, i64 128
  store i32 %.zext, ptr %68, align 8, !tbaa !29
  %69 = load ptr, ptr %19, align 8, !tbaa !13
  %70 = load ptr, ptr %46, align 8, !tbaa !14
  %71 = tail call ptr %69(ptr noundef %70, i32 noundef %56, i32 noundef 2) #2
  %72 = getelementptr inbounds i8, ptr %48, i64 80
  store ptr %71, ptr %72, align 8, !tbaa !30
  %73 = load ptr, ptr %19, align 8, !tbaa !13
  %74 = load ptr, ptr %46, align 8, !tbaa !14
  %75 = load i32, ptr %57, align 4, !tbaa !24
  %76 = tail call ptr %73(ptr noundef %74, i32 noundef %75, i32 noundef 2) #2
  %77 = getelementptr inbounds i8, ptr %48, i64 96
  store ptr %76, ptr %77, align 8, !tbaa !31
  %78 = load ptr, ptr %19, align 8, !tbaa !13
  %79 = load ptr, ptr %46, align 8, !tbaa !14
  %80 = load i32, ptr %63, align 4, !tbaa !27
  %81 = tail call ptr %78(ptr noundef %79, i32 noundef %80, i32 noundef 2) #2
  %82 = getelementptr inbounds i8, ptr %48, i64 104
  store ptr %81, ptr %82, align 8, !tbaa !32
  %83 = shl nuw nsw i32 64, %4
  %84 = getelementptr inbounds i8, ptr %48, i64 5880
  store i32 %83, ptr %84, align 8, !tbaa !33
  %85 = load ptr, ptr %19, align 8, !tbaa !13
  %86 = load ptr, ptr %46, align 8, !tbaa !14
  %87 = tail call ptr %85(ptr noundef %86, i32 noundef %83, i32 noundef 4) #2
  %88 = getelementptr inbounds i8, ptr %48, i64 16
  store ptr %87, ptr %88, align 8, !tbaa !34
  %89 = load i32, ptr %84, align 8, !tbaa !33
  %90 = zext i32 %89 to i64
  %91 = shl nuw nsw i64 %90, 2
  %92 = getelementptr inbounds i8, ptr %48, i64 24
  store i64 %91, ptr %92, align 8, !tbaa !35
  %93 = load ptr, ptr %72, align 8, !tbaa !30
  %94 = icmp eq ptr %93, null
  br i1 %94, label %102, label %95

95:                                               ; preds = %50
  %96 = load ptr, ptr %77, align 8, !tbaa !31
  %97 = icmp eq ptr %96, null
  br i1 %97, label %102, label %98

98:                                               ; preds = %95
  %99 = load ptr, ptr %82, align 8, !tbaa !32
  %100 = icmp eq ptr %99, null
  %101 = icmp eq ptr %87, null
  %or.cond116 = select i1 %100, i1 true, i1 %101
  br i1 %or.cond116, label %102, label %106

102:                                              ; preds = %98, %95, %50
  %103 = getelementptr inbounds i8, ptr %48, i64 8
  store i32 666, ptr %103, align 8, !tbaa !36
  %104 = load ptr, ptr getelementptr inbounds (i8, ptr @z_errmsg, i64 48), align 16, !tbaa !37
  store ptr %104, ptr %18, align 8, !tbaa !8
  %105 = tail call i32 @z_deflateEnd(ptr noundef nonnull %0)
  br label %118

106:                                              ; preds = %98
  %107 = lshr i32 %89, 1
  %108 = zext nneg i32 %107 to i64
  %109 = getelementptr inbounds i16, ptr %87, i64 %108
  %110 = getelementptr inbounds i8, ptr %48, i64 5888
  store ptr %109, ptr %110, align 8, !tbaa !38
  %111 = mul nuw nsw i64 %90, 3
  %112 = getelementptr inbounds i8, ptr %87, i64 %111
  %113 = getelementptr inbounds i8, ptr %48, i64 5872
  store ptr %112, ptr %113, align 8, !tbaa !39
  %114 = getelementptr inbounds i8, ptr %48, i64 180
  store i32 %spec.store.select, ptr %114, align 4, !tbaa !40
  %115 = getelementptr inbounds i8, ptr %48, i64 184
  store i32 %5, ptr %115, align 8, !tbaa !41
  %116 = getelementptr inbounds i8, ptr %48, i64 60
  store i8 8, ptr %116, align 4, !tbaa !42
  %117 = tail call i32 @z_deflateReset(ptr noundef nonnull %0)
  br label %118

118:                                              ; preds = %45, %38, %15, %8, %10, %106, %102
  %.0 = phi i32 [ -4, %102 ], [ %117, %106 ], [ -6, %10 ], [ -6, %8 ], [ -2, %15 ], [ -2, %38 ], [ -4, %45 ]
  ret i32 %.0
}

declare ptr @zcalloc(ptr noundef, i32 noundef, i32 noundef) #1

declare void @zcfree(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @z_deflateEnd(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @z_deflateReset(ptr noundef) local_unnamed_addr #0

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 = { "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 }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !10, i64 48}
!9 = !{!"z_stream_s", !10, i64 0, !11, i64 8, !12, i64 16, !10, i64 24, !11, i64 32, !12, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !11, i64 88, !12, i64 96, !12, i64 104}
!10 = !{!"any pointer", !6, i64 0}
!11 = !{!"int", !6, i64 0}
!12 = !{!"long", !6, i64 0}
!13 = !{!9, !10, i64 64}
!14 = !{!9, !10, i64 80}
!15 = !{!9, !10, i64 72}
!16 = !{!9, !10, i64 56}
!17 = !{!18, !10, i64 0}
!18 = !{!"internal_state", !10, i64 0, !11, i64 8, !10, i64 16, !12, i64 24, !10, i64 32, !11, i64 40, !11, i64 44, !10, i64 48, !11, i64 56, !6, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !10, i64 80, !12, i64 88, !10, i64 96, !10, i64 104, !11, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !12, i64 136, !11, i64 144, !11, i64 148, !11, i64 152, !11, i64 156, !11, i64 160, !11, i64 164, !11, i64 168, !11, i64 172, !11, i64 176, !11, i64 180, !11, i64 184, !11, i64 188, !11, i64 192, !6, i64 196, !6, i64 2488, !6, i64 2732, !19, i64 2888, !19, i64 2912, !19, i64 2936, !6, i64 2960, !6, i64 2992, !11, i64 5284, !11, i64 5288, !6, i64 5292, !10, i64 5872, !11, i64 5880, !11, i64 5884, !10, i64 5888, !12, i64 5896, !12, i64 5904, !11, i64 5912, !11, i64 5916, !20, i64 5920, !11, i64 5924}
!19 = !{!"tree_desc_s", !10, i64 0, !11, i64 8, !10, i64 16}
!20 = !{!"short", !6, i64 0}
!21 = !{!18, !11, i64 44}
!22 = !{!18, !10, i64 48}
!23 = !{!18, !11, i64 72}
!24 = !{!18, !11, i64 68}
!25 = !{!18, !11, i64 76}
!26 = !{!18, !11, i64 120}
!27 = !{!18, !11, i64 116}
!28 = !{!18, !11, i64 124}
!29 = !{!18, !11, i64 128}
!30 = !{!18, !10, i64 80}
!31 = !{!18, !10, i64 96}
!32 = !{!18, !10, i64 104}
!33 = !{!18, !11, i64 5880}
!34 = !{!18, !10, i64 16}
!35 = !{!18, !12, i64 24}
!36 = !{!18, !11, i64 8}
!37 = !{!10, !10, i64 0}
!38 = !{!18, !10, i64 5888}
!39 = !{!18, !10, i64 5872}
!40 = !{!18, !11, i64 180}
!41 = !{!18, !11, i64 184}
!42 = !{!18, !6, i64 60}


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