; LLVM IR from Overload-Technologies/Overload :: Dependencies/assimp/contrib/unzip (unzip)

; 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.unz64_s = type { %struct.zlib_filefunc64_32_def_s, i32, ptr, %struct.unz_global_info64_s, i64, i64, i64, i64, i64, i64, i64, %struct.unz_file_info64_s, %struct.unz_file_info64_internal_s, ptr, i32, i32 }
%struct.zlib_filefunc64_32_def_s = type { %struct.zlib_filefunc64_def_s, ptr, ptr, ptr }
%struct.zlib_filefunc64_def_s = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.unz_global_info64_s = type { i64, i64 }
%struct.unz_file_info64_s = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, %struct.tm_unz_s }
%struct.tm_unz_s = type { i32, i32, i32, i32, i32, i32 }
%struct.unz_file_info64_internal_s = type { i64 }
%struct.file_in_zip64_read_info_s = type { ptr, %struct.z_stream_s, i64, i64, i64, i32, i64, i64, i64, i64, i64, i64, %struct.zlib_filefunc64_32_def_s, ptr, i64, i64, i32 }
%struct.z_stream_s = type { ptr, i32, i64, ptr, i32, i64, ptr, ptr, ptr, ptr, ptr, i32, i64, i64 }

@.str = external hidden unnamed_addr constant [7 x i8], align 1

; 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

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

21:                                               ; preds = %5
  store i32 -102, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %237

22:                                               ; preds = %5
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = icmp eq ptr %23, null
  br i1 %24, label %25, label %26

25:                                               ; preds = %22
  store i32 -102, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %237

26:                                               ; preds = %22
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %27, ptr %14, align 8, !tbaa !5
  %28 = load ptr, ptr %14, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.unz64_s, ptr %28, i32 0, i32 7
  %30 = load i64, ptr %29, align 8, !tbaa !11
  %31 = icmp ne i64 %30, 0
  br i1 %31, label %33, label %32

32:                                               ; preds = %26
  store i32 -102, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %237

33:                                               ; preds = %26
  %34 = load ptr, ptr %14, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.unz64_s, ptr %34, i32 0, i32 13
  %36 = load ptr, ptr %35, align 8, !tbaa !21
  %37 = icmp ne ptr %36, null
  br i1 %37, label %38, label %41

38:                                               ; preds = %33
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = call i32 @unzCloseCurrentFile(ptr noundef %39)
  br label %41

41:                                               ; preds = %38, %33
  %42 = load ptr, ptr %14, align 8, !tbaa !5
  %43 = call i32 @unz64local_CheckCurrentFileCoherencyHeader(ptr noundef %42, ptr noundef %13, ptr noundef %16, ptr noundef %17)
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %46

45:                                               ; preds = %41
  store i32 -103, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %237

46:                                               ; preds = %41
  %47 = call noalias ptr @malloc(i64 noundef 320) #7
  store ptr %47, ptr %15, align 8, !tbaa !5
  %48 = load ptr, ptr %15, align 8, !tbaa !5
  %49 = icmp eq ptr %48, null
  br i1 %49, label %50, label %51

50:                                               ; preds = %46
  store i32 -104, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %237

51:                                               ; preds = %46
  %52 = call noalias ptr @malloc(i64 noundef 16384) #7
  %53 = load ptr, ptr %15, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %53, i32 0, i32 0
  store ptr %52, ptr %54, align 8, !tbaa !22
  %55 = load i64, ptr %16, align 8, !tbaa !25
  %56 = load ptr, ptr %15, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %56, i32 0, i32 4
  store i64 %55, ptr %57, align 8, !tbaa !26
  %58 = load i32, ptr %17, align 4, !tbaa !9
  %59 = load ptr, ptr %15, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %59, i32 0, i32 5
  store i32 %58, ptr %60, align 8, !tbaa !27
  %61 = load ptr, ptr %15, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %61, i32 0, i32 6
  store i64 0, ptr %62, align 8, !tbaa !28
  %63 = load i32, ptr %10, align 4, !tbaa !9
  %64 = load ptr, ptr %15, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %64, i32 0, i32 16
  store i32 %63, ptr %65, align 8, !tbaa !29
  %66 = load ptr, ptr %15, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %66, i32 0, i32 0
  %68 = load ptr, ptr %67, align 8, !tbaa !22
  %69 = icmp eq ptr %68, null
  br i1 %69, label %70, label %72

70:                                               ; preds = %51
  %71 = load ptr, ptr %15, align 8, !tbaa !5
  call void @free(ptr noundef %71) #6
  store i32 -104, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %237

72:                                               ; preds = %51
  %73 = load ptr, ptr %15, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %73, i32 0, i32 3
  store i64 0, ptr %74, align 8, !tbaa !30
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = icmp ne ptr %75, null
  br i1 %76, label %77, label %84

77:                                               ; preds = %72
  %78 = load ptr, ptr %14, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.unz64_s, ptr %78, i32 0, i32 11
  %80 = getelementptr inbounds %struct.unz_file_info64_s, ptr %79, i32 0, i32 3
  %81 = load i64, ptr %80, align 8, !tbaa !31
  %82 = trunc i64 %81 to i32
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %82, ptr %83, align 4, !tbaa !9
  br label %84

84:                                               ; preds = %77, %72
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  %86 = icmp ne ptr %85, null
  br i1 %86, label %87, label %101

87:                                               ; preds = %84
  %88 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 6, ptr %88, align 4, !tbaa !9
  %89 = load ptr, ptr %14, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.unz64_s, ptr %89, i32 0, i32 11
  %91 = getelementptr inbounds %struct.unz_file_info64_s, ptr %90, i32 0, i32 2
  %92 = load i64, ptr %91, align 8, !tbaa !32
  %93 = and i64 %92, 6
  switch i64 %93, label %100 [
    i64 6, label %94
    i64 4, label %96
    i64 2, label %98
  ]

94:                                               ; preds = %87
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 1, ptr %95, align 4, !tbaa !9
  br label %100

96:                                               ; preds = %87
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 2, ptr %97, align 4, !tbaa !9
  br label %100

98:                                               ; preds = %87
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 9, ptr %99, align 4, !tbaa !9
  br label %100

100:                                              ; preds = %98, %96, %94, %87
  br label %101

101:                                              ; preds = %100, %84
  %102 = load ptr, ptr %14, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.unz64_s, ptr %102, i32 0, i32 11
  %104 = getelementptr inbounds %struct.unz_file_info64_s, ptr %103, i32 0, i32 3
  %105 = load i64, ptr %104, align 8, !tbaa !31
  %106 = icmp ne i64 %105, 0
  br i1 %106, label %107, label %120

107:                                              ; preds = %101
  %108 = load ptr, ptr %14, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.unz64_s, ptr %108, i32 0, i32 11
  %110 = getelementptr inbounds %struct.unz_file_info64_s, ptr %109, i32 0, i32 3
  %111 = load i64, ptr %110, align 8, !tbaa !31
  %112 = icmp ne i64 %111, 12
  br i1 %112, label %113, label %120

113:                                              ; preds = %107
  %114 = load ptr, ptr %14, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.unz64_s, ptr %114, i32 0, i32 11
  %116 = getelementptr inbounds %struct.unz_file_info64_s, ptr %115, i32 0, i32 3
  %117 = load i64, ptr %116, align 8, !tbaa !31
  %118 = icmp ne i64 %117, 8
  br i1 %118, label %119, label %120

119:                                              ; preds = %113
  store i32 -103, ptr %12, align 4, !tbaa !9
  br label %120

120:                                              ; preds = %119, %113, %107, %101
  %121 = load ptr, ptr %14, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.unz64_s, ptr %121, i32 0, i32 11
  %123 = getelementptr inbounds %struct.unz_file_info64_s, ptr %122, i32 0, i32 5
  %124 = load i64, ptr %123, align 8, !tbaa !33
  %125 = load ptr, ptr %15, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %125, i32 0, i32 9
  store i64 %124, ptr %126, align 8, !tbaa !34
  %127 = load ptr, ptr %15, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %127, i32 0, i32 8
  store i64 0, ptr %128, align 8, !tbaa !35
  %129 = load ptr, ptr %15, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %129, i32 0, i32 7
  store i64 0, ptr %130, align 8, !tbaa !36
  %131 = load ptr, ptr %14, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.unz64_s, ptr %131, i32 0, i32 11
  %133 = getelementptr inbounds %struct.unz_file_info64_s, ptr %132, i32 0, i32 3
  %134 = load i64, ptr %133, align 8, !tbaa !31
  %135 = load ptr, ptr %15, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %135, i32 0, i32 14
  store i64 %134, ptr %136, align 8, !tbaa !37
  %137 = load ptr, ptr %14, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.unz64_s, ptr %137, i32 0, i32 2
  %139 = load ptr, ptr %138, align 8, !tbaa !38
  %140 = load ptr, ptr %15, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %140, i32 0, i32 13
  store ptr %139, ptr %141, align 8, !tbaa !39
  %142 = load ptr, ptr %15, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %142, i32 0, i32 12
  %144 = load ptr, ptr %14, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.unz64_s, ptr %144, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %143, ptr align 8 %145, i64 88, i1 false), !tbaa.struct !40
  %146 = load ptr, ptr %14, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.unz64_s, ptr %146, i32 0, i32 4
  %148 = load i64, ptr %147, align 8, !tbaa !41
  %149 = load ptr, ptr %15, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %149, i32 0, i32 15
  store i64 %148, ptr %150, align 8, !tbaa !42
  %151 = load ptr, ptr %15, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %151, i32 0, i32 1
  %153 = getelementptr inbounds %struct.z_stream_s, ptr %152, i32 0, i32 5
  store i64 0, ptr %153, align 8, !tbaa !43
  %154 = load ptr, ptr %14, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.unz64_s, ptr %154, i32 0, i32 11
  %156 = getelementptr inbounds %struct.unz_file_info64_s, ptr %155, i32 0, i32 3
  %157 = load i64, ptr %156, align 8, !tbaa !31
  %158 = icmp eq i64 %157, 12
  br i1 %158, label %159, label %165

159:                                              ; preds = %120
  %160 = load i32, ptr %10, align 4, !tbaa !9
  %161 = icmp ne i32 %160, 0
  br i1 %161, label %165, label %162

162:                                              ; preds = %159
  %163 = load ptr, ptr %15, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %163, i32 0, i32 16
  store i32 1, ptr %164, align 8, !tbaa !29
  br label %206

165:                                              ; preds = %159, %120
  %166 = load ptr, ptr %14, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.unz64_s, ptr %166, i32 0, i32 11
  %168 = getelementptr inbounds %struct.unz_file_info64_s, ptr %167, i32 0, i32 3
  %169 = load i64, ptr %168, align 8, !tbaa !31
  %170 = icmp eq i64 %169, 8
  br i1 %170, label %171, label %205

171:                                              ; preds = %165
  %172 = load i32, ptr %10, align 4, !tbaa !9
  %173 = icmp ne i32 %172, 0
  br i1 %173, label %205, label %174

174:                                              ; preds = %171
  %175 = load ptr, ptr %15, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %175, i32 0, i32 1
  %177 = getelementptr inbounds %struct.z_stream_s, ptr %176, i32 0, i32 8
  store ptr null, ptr %177, align 8, !tbaa !44
  %178 = load ptr, ptr %15, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %178, i32 0, i32 1
  %180 = getelementptr inbounds %struct.z_stream_s, ptr %179, i32 0, i32 9
  store ptr null, ptr %180, align 8, !tbaa !45
  %181 = load ptr, ptr %15, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %181, i32 0, i32 1
  %183 = getelementptr inbounds %struct.z_stream_s, ptr %182, i32 0, i32 10
  store ptr null, ptr %183, align 8, !tbaa !46
  %184 = load ptr, ptr %15, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %184, i32 0, i32 1
  %186 = getelementptr inbounds %struct.z_stream_s, ptr %185, i32 0, i32 0
  store ptr null, ptr %186, align 8, !tbaa !47
  %187 = load ptr, ptr %15, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %187, i32 0, i32 1
  %189 = getelementptr inbounds %struct.z_stream_s, ptr %188, i32 0, i32 1
  store i32 0, ptr %189, align 8, !tbaa !48
  %190 = load ptr, ptr %15, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %190, i32 0, i32 1
  %192 = call i32 @inflateInit2_(ptr noundef %191, i32 noundef -15, ptr noundef @.str, i32 noundef 112)
  store i32 %192, ptr %12, align 4, !tbaa !9
  %193 = load i32, ptr %12, align 4, !tbaa !9
  %194 = icmp eq i32 %193, 0
  br i1 %194, label %195, label %198

195:                                              ; preds = %174
  %196 = load ptr, ptr %15, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %196, i32 0, i32 3
  store i64 8, ptr %197, align 8, !tbaa !30
  br label %204

198:                                              ; preds = %174
  %199 = load ptr, ptr %15, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %199, i32 0, i32 0
  %201 = load ptr, ptr %200, align 8, !tbaa !22
  call void @free(ptr noundef %201) #6
  %202 = load ptr, ptr %15, align 8, !tbaa !5
  call void @free(ptr noundef %202) #6
  %203 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %203, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %237

204:                                              ; preds = %195
  br label %205

205:                                              ; preds = %204, %171, %165
  br label %206

206:                                              ; preds = %205, %162
  %207 = load ptr, ptr %14, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.unz64_s, ptr %207, i32 0, i32 11
  %209 = getelementptr inbounds %struct.unz_file_info64_s, ptr %208, i32 0, i32 6
  %210 = load i64, ptr %209, align 8, !tbaa !49
  %211 = load ptr, ptr %15, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %211, i32 0, i32 10
  store i64 %210, ptr %212, align 8, !tbaa !50
  %213 = load ptr, ptr %14, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.unz64_s, ptr %213, i32 0, i32 11
  %215 = getelementptr inbounds %struct.unz_file_info64_s, ptr %214, i32 0, i32 7
  %216 = load i64, ptr %215, align 8, !tbaa !51
  %217 = load ptr, ptr %15, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %217, i32 0, i32 11
  store i64 %216, ptr %218, align 8, !tbaa !52
  %219 = load ptr, ptr %14, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.unz64_s, ptr %219, i32 0, i32 12
  %221 = getelementptr inbounds %struct.unz_file_info64_internal_s, ptr %220, i32 0, i32 0
  %222 = load i64, ptr %221, align 8, !tbaa !53
  %223 = add i64 %222, 30
  %224 = load i32, ptr %13, align 4, !tbaa !9
  %225 = zext i32 %224 to i64
  %226 = add i64 %223, %225
  %227 = load ptr, ptr %15, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %227, i32 0, i32 2
  store i64 %226, ptr %228, align 8, !tbaa !54
  %229 = load ptr, ptr %15, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.file_in_zip64_read_info_s, ptr %229, i32 0, i32 1
  %231 = getelementptr inbounds %struct.z_stream_s, ptr %230, i32 0, i32 1
  store i32 0, ptr %231, align 8, !tbaa !48
  %232 = load ptr, ptr %15, align 8, !tbaa !5
  %233 = load ptr, ptr %14, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.unz64_s, ptr %233, i32 0, i32 13
  store ptr %232, ptr %234, align 8, !tbaa !21
  %235 = load ptr, ptr %14, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.unz64_s, ptr %235, i32 0, i32 14
  store i32 0, ptr %236, align 8, !tbaa !55
  store i32 0, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %237

237:                                              ; preds = %206, %198, %70, %50, %45, %32, %25, %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  %238 = load i32, ptr %6, align 4
  ret i32 %238
}

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

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

declare i32 @inflateInit2_(ptr noundef, i32 noundef, ptr noundef, i32 noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 "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(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 }
attributes #7 = { nounwind allocsize(0) }

!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, !16, i64 144}
!12 = !{!"", !13, i64 0, !10, i64 88, !6, i64 96, !15, i64 104, !16, i64 120, !16, i64 128, !16, i64 136, !16, i64 144, !16, i64 152, !16, i64 160, !16, i64 168, !18, i64 176, !20, i64 312, !6, i64 320, !10, i64 328, !10, i64 332}
!13 = !{!"zlib_filefunc64_32_def_s", !14, i64 0, !6, i64 64, !6, i64 72, !6, i64 80}
!14 = !{!"zlib_filefunc64_def_s", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!15 = !{!"unz_global_info64_s", !16, i64 0, !17, i64 8}
!16 = !{!"long long", !7, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!"unz_file_info64_s", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !17, i64 32, !17, i64 40, !16, i64 48, !16, i64 56, !17, i64 64, !17, i64 72, !17, i64 80, !17, i64 88, !17, i64 96, !17, i64 104, !19, i64 112}
!19 = !{!"tm_unz_s", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!20 = !{!"unz_file_info64_internal_s", !16, i64 0}
!21 = !{!12, !6, i64 320}
!22 = !{!23, !6, i64 0}
!23 = !{!"", !6, i64 0, !24, i64 8, !16, i64 120, !17, i64 128, !16, i64 136, !10, i64 144, !16, i64 152, !16, i64 160, !17, i64 168, !17, i64 176, !16, i64 184, !16, i64 192, !13, i64 200, !6, i64 288, !17, i64 296, !16, i64 304, !10, i64 312}
!24 = !{!"z_stream_s", !6, i64 0, !10, i64 8, !17, i64 16, !6, i64 24, !10, i64 32, !17, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !17, i64 96, !17, i64 104}
!25 = !{!16, !16, i64 0}
!26 = !{!23, !16, i64 136}
!27 = !{!23, !10, i64 144}
!28 = !{!23, !16, i64 152}
!29 = !{!23, !10, i64 312}
!30 = !{!23, !17, i64 128}
!31 = !{!12, !17, i64 200}
!32 = !{!12, !17, i64 192}
!33 = !{!12, !17, i64 216}
!34 = !{!23, !17, i64 176}
!35 = !{!23, !17, i64 168}
!36 = !{!23, !16, i64 160}
!37 = !{!23, !17, i64 296}
!38 = !{!12, !6, i64 96}
!39 = !{!23, !6, i64 288}
!40 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !5, i64 32, i64 8, !5, i64 40, i64 8, !5, i64 48, i64 8, !5, i64 56, i64 8, !5, i64 64, i64 8, !5, i64 72, i64 8, !5, i64 80, i64 8, !5}
!41 = !{!12, !16, i64 120}
!42 = !{!23, !16, i64 304}
!43 = !{!23, !17, i64 48}
!44 = !{!23, !6, i64 72}
!45 = !{!23, !6, i64 80}
!46 = !{!23, !6, i64 88}
!47 = !{!23, !6, i64 8}
!48 = !{!23, !10, i64 16}
!49 = !{!12, !16, i64 224}
!50 = !{!23, !16, i64 184}
!51 = !{!12, !16, i64 232}
!52 = !{!23, !16, i64 192}
!53 = !{!12, !16, i64 312}
!54 = !{!23, !16, i64 120}
!55 = !{!12, !10, i64 328}


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

@.str = external hidden unnamed_addr constant [7 x i8], align 1

; 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: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @unzOpenCurrentFile3(ptr noundef %0, ptr noundef writeonly %1, ptr noundef writeonly %2, i32 noundef %3, ptr noundef readnone %4) local_unnamed_addr #2 {
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  %.not = icmp ne ptr %4, null
  %9 = icmp eq ptr %0, null
  %or.cond85 = or i1 %9, %.not
  br i1 %or.cond85, label %89, label %10

10:                                               ; preds = %5
  %11 = getelementptr inbounds i8, ptr %0, i64 144
  %12 = load i64, ptr %11, align 8, !tbaa !5
  %.not77 = icmp eq i64 %12, 0
  br i1 %.not77, label %89, label %13

13:                                               ; preds = %10
  %14 = getelementptr inbounds i8, ptr %0, i64 320
  %15 = load ptr, ptr %14, align 8, !tbaa !19
  %.not78 = icmp eq ptr %15, null
  br i1 %.not78, label %18, label %16

16:                                               ; preds = %13
  %17 = tail call i32 @unzCloseCurrentFile(ptr noundef nonnull %0)
  br label %18

18:                                               ; preds = %16, %13
  %19 = call i32 @unz64local_CheckCurrentFileCoherencyHeader(ptr noundef nonnull %0, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %.not79 = icmp eq i32 %19, 0
  br i1 %.not79, label %20, label %89

20:                                               ; preds = %18
  %21 = call noalias dereferenceable_or_null(320) ptr @malloc(i64 noundef 320) #8
  %22 = icmp eq ptr %21, null
  br i1 %22, label %89, label %23

23:                                               ; preds = %20
  %24 = call noalias dereferenceable_or_null(16384) ptr @malloc(i64 noundef 16384) #8
  store ptr %24, ptr %21, align 8, !tbaa !20
  %25 = load i64, ptr %7, align 8, !tbaa !23
  %26 = getelementptr inbounds i8, ptr %21, i64 136
  store i64 %25, ptr %26, align 8, !tbaa !24
  %27 = load i32, ptr %8, align 4, !tbaa !25
  %28 = getelementptr inbounds i8, ptr %21, i64 144
  store i32 %27, ptr %28, align 8, !tbaa !26
  %29 = getelementptr inbounds i8, ptr %21, i64 152
  store i64 0, ptr %29, align 8, !tbaa !27
  %30 = getelementptr inbounds i8, ptr %21, i64 312
  store i32 %3, ptr %30, align 8, !tbaa !28
  %31 = icmp eq ptr %24, null
  br i1 %31, label %32, label %33

32:                                               ; preds = %23
  call void @free(ptr noundef nonnull %21) #7
  br label %89

33:                                               ; preds = %23
  %34 = getelementptr inbounds i8, ptr %21, i64 128
  store i64 0, ptr %34, align 8, !tbaa !29
  %.not80 = icmp eq ptr %1, null
  br i1 %.not80, label %39, label %35

35:                                               ; preds = %33
  %36 = getelementptr inbounds i8, ptr %0, i64 200
  %37 = load i64, ptr %36, align 8, !tbaa !30
  %38 = trunc i64 %37 to i32
  store i32 %38, ptr %1, align 4, !tbaa !25
  br label %39

39:                                               ; preds = %35, %33
  %.not81 = icmp eq ptr %2, null
  br i1 %.not81, label %46, label %40

40:                                               ; preds = %39
  store i32 6, ptr %2, align 4, !tbaa !25
  %41 = getelementptr inbounds i8, ptr %0, i64 192
  %42 = load i64, ptr %41, align 8, !tbaa !31
  %43 = and i64 %42, 6
  switch i64 %43, label %.unreachabledefault [
    i64 6, label %.sink.split
    i64 4, label %44
    i64 2, label %45
    i64 0, label %46
  ]

44:                                               ; preds = %40
  br label %.sink.split

45:                                               ; preds = %40
  br label %.sink.split

.unreachabledefault:                              ; preds = %40
  unreachable

.sink.split:                                      ; preds = %40, %45, %44
  %.sink = phi i32 [ 2, %44 ], [ 9, %45 ], [ 1, %40 ]
  store i32 %.sink, ptr %2, align 4, !tbaa !25
  br label %46

46:                                               ; preds = %.sink.split, %40, %39
  %47 = getelementptr inbounds i8, ptr %0, i64 200
  %48 = getelementptr inbounds i8, ptr %0, i64 216
  %49 = load i64, ptr %48, align 8, !tbaa !32
  %50 = getelementptr inbounds i8, ptr %21, i64 176
  store i64 %49, ptr %50, align 8, !tbaa !33
  %51 = getelementptr inbounds i8, ptr %21, i64 160
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %51, i8 0, i64 16, i1 false)
  %52 = load i64, ptr %47, align 8, !tbaa !30
  %53 = getelementptr inbounds i8, ptr %21, i64 296
  store i64 %52, ptr %53, align 8, !tbaa !34
  %54 = getelementptr inbounds i8, ptr %0, i64 96
  %55 = load ptr, ptr %54, align 8, !tbaa !35
  %56 = getelementptr inbounds i8, ptr %21, i64 288
  store ptr %55, ptr %56, align 8, !tbaa !36
  %57 = getelementptr inbounds i8, ptr %21, i64 200
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(88) %57, ptr noundef nonnull align 8 dereferenceable(88) %0, i64 88, i1 false), !tbaa.struct !37
  %58 = getelementptr inbounds i8, ptr %0, i64 120
  %59 = load i64, ptr %58, align 8, !tbaa !39
  %60 = getelementptr inbounds i8, ptr %21, i64 304
  store i64 %59, ptr %60, align 8, !tbaa !40
  %61 = getelementptr inbounds i8, ptr %21, i64 8
  %62 = getelementptr inbounds i8, ptr %21, i64 48
  store i64 0, ptr %62, align 8, !tbaa !41
  %63 = icmp ne i64 %52, 12
  %64 = icmp ne i32 %3, 0
  %or.cond = or i1 %64, %63
  br i1 %or.cond, label %66, label %65

65:                                               ; preds = %46
  store i32 1, ptr %30, align 8, !tbaa !28
  br label %76

66:                                               ; preds = %46
  %67 = icmp ne i64 %52, 8
  %or.cond3 = or i1 %64, %67
  br i1 %or.cond3, label %76, label %68

68:                                               ; preds = %66
  %69 = getelementptr inbounds i8, ptr %21, i64 72
  store ptr null, ptr %61, align 8, !tbaa !42
  %70 = getelementptr inbounds i8, ptr %21, i64 16
  store i32 0, ptr %70, align 8, !tbaa !43
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %69, i8 0, i64 24, i1 false)
  %71 = call i32 @inflateInit2_(ptr noundef nonnull %61, i32 noundef -15, ptr noundef nonnull @.str, i32 noundef 112) #7
  %72 = icmp eq i32 %71, 0
  br i1 %72, label %73, label %74

73:                                               ; preds = %68
  store i64 8, ptr %34, align 8, !tbaa !29
  br label %76

74:                                               ; preds = %68
  %75 = load ptr, ptr %21, align 8, !tbaa !20
  call void @free(ptr noundef %75) #7
  call void @free(ptr noundef nonnull %21) #7
  br label %89

76:                                               ; preds = %66, %73, %65
  %77 = getelementptr inbounds i8, ptr %0, i64 224
  %78 = getelementptr inbounds i8, ptr %21, i64 184
  %79 = load <2 x i64>, ptr %77, align 8, !tbaa !23
  store <2 x i64> %79, ptr %78, align 8, !tbaa !23
  %80 = getelementptr inbounds i8, ptr %0, i64 312
  %81 = load i64, ptr %80, align 8, !tbaa !44
  %82 = add i64 %81, 30
  %83 = load i32, ptr %6, align 4, !tbaa !25
  %84 = zext i32 %83 to i64
  %85 = add i64 %82, %84
  %86 = getelementptr inbounds i8, ptr %21, i64 120
  store i64 %85, ptr %86, align 8, !tbaa !45
  %87 = getelementptr inbounds i8, ptr %21, i64 16
  store i32 0, ptr %87, align 8, !tbaa !43
  store ptr %21, ptr %14, align 8, !tbaa !19
  %88 = getelementptr inbounds i8, ptr %0, i64 328
  store i32 0, ptr %88, align 8, !tbaa !46
  br label %89

89:                                               ; preds = %20, %18, %10, %5, %76, %74, %32
  %.0 = phi i32 [ -104, %32 ], [ 0, %76 ], [ %71, %74 ], [ -102, %5 ], [ -102, %10 ], [ -103, %18 ], [ -104, %20 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  ret i32 %.0
}

; Function Attrs: nounwind uwtable
declare hidden i32 @unz64local_CheckCurrentFileCoherencyHeader(ptr noundef, ptr noundef, ptr 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 #4

declare i32 @inflateInit2_(ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { 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 #5 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }

!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, !14, i64 144}
!6 = !{!"", !7, i64 0, !12, i64 88, !9, i64 96, !13, i64 104, !14, i64 120, !14, i64 128, !14, i64 136, !14, i64 144, !14, i64 152, !14, i64 160, !14, i64 168, !16, i64 176, !18, i64 312, !9, i64 320, !12, i64 328, !12, i64 332}
!7 = !{!"zlib_filefunc64_32_def_s", !8, i64 0, !9, i64 64, !9, i64 72, !9, i64 80}
!8 = !{!"zlib_filefunc64_def_s", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24, !9, i64 32, !9, i64 40, !9, i64 48, !9, i64 56}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C/C++ TBAA"}
!12 = !{!"int", !10, i64 0}
!13 = !{!"unz_global_info64_s", !14, i64 0, !15, i64 8}
!14 = !{!"long long", !10, i64 0}
!15 = !{!"long", !10, i64 0}
!16 = !{!"unz_file_info64_s", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !14, i64 48, !14, i64 56, !15, i64 64, !15, i64 72, !15, i64 80, !15, i64 88, !15, i64 96, !15, i64 104, !17, i64 112}
!17 = !{!"tm_unz_s", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20}
!18 = !{!"unz_file_info64_internal_s", !14, i64 0}
!19 = !{!6, !9, i64 320}
!20 = !{!21, !9, i64 0}
!21 = !{!"", !9, i64 0, !22, i64 8, !14, i64 120, !15, i64 128, !14, i64 136, !12, i64 144, !14, i64 152, !14, i64 160, !15, i64 168, !15, i64 176, !14, i64 184, !14, i64 192, !7, i64 200, !9, i64 288, !15, i64 296, !14, i64 304, !12, i64 312}
!22 = !{!"z_stream_s", !9, i64 0, !12, i64 8, !15, i64 16, !9, i64 24, !12, i64 32, !15, i64 40, !9, i64 48, !9, i64 56, !9, i64 64, !9, i64 72, !9, i64 80, !12, i64 88, !15, i64 96, !15, i64 104}
!23 = !{!14, !14, i64 0}
!24 = !{!21, !14, i64 136}
!25 = !{!12, !12, i64 0}
!26 = !{!21, !12, i64 144}
!27 = !{!21, !14, i64 152}
!28 = !{!21, !12, i64 312}
!29 = !{!21, !15, i64 128}
!30 = !{!6, !15, i64 200}
!31 = !{!6, !15, i64 192}
!32 = !{!6, !15, i64 216}
!33 = !{!21, !15, i64 176}
!34 = !{!21, !15, i64 296}
!35 = !{!6, !9, i64 96}
!36 = !{!21, !9, i64 288}
!37 = !{i64 0, i64 8, !38, i64 8, i64 8, !38, i64 16, i64 8, !38, i64 24, i64 8, !38, i64 32, i64 8, !38, i64 40, i64 8, !38, i64 48, i64 8, !38, i64 56, i64 8, !38, i64 64, i64 8, !38, i64 72, i64 8, !38, i64 80, i64 8, !38}
!38 = !{!9, !9, i64 0}
!39 = !{!6, !14, i64 120}
!40 = !{!21, !14, i64 304}
!41 = !{!21, !15, i64 48}
!42 = !{!21, !9, i64 8}
!43 = !{!21, !12, i64 16}
!44 = !{!6, !14, i64 312}
!45 = !{!21, !14, i64 120}
!46 = !{!6, !12, i64 328}


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