; LLVM IR from facebook/hermes :: external/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.zip_t = type { %struct.mz_zip_archive, i32, %struct.zip_entry_t }
%struct.mz_zip_archive = type { i64, i64, i32, i32, i32, i32, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.zip_entry_t = type { i32, ptr, i64, i64, i32, i64, [30 x i8], i64, i16, %struct.mz_zip_writer_add_state, %struct.tdefl_compressor, i32, i64 }
%struct.mz_zip_writer_add_state = type { ptr, i64, i64 }
%struct.tdefl_compressor = type { ptr, ptr, i32, [2 x i32], i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i32, ptr, i64, i64, [33025 x i8], [3 x [288 x i16]], [3 x [288 x i16]], [3 x [288 x i8]], [65536 x i8], [32768 x i16], [32768 x i16], [85196 x i8] }

@.str.1 = external hidden unnamed_addr constant [1 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: nounwind
declare void @free(ptr noundef) #1

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #3

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

; Function Attrs: nounwind uwtable
declare hidden i32 @mz_zip_writer_create_local_dir_header(ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i64 noundef, i64 noundef, i32 noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @mz_zip_writer_add_to_central_dir(ptr noundef, ptr noundef, i16 noundef zeroext, ptr noundef, i16 noundef zeroext, ptr noundef, i16 noundef zeroext, i64 noundef, i64 noundef, i32 noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, i64 noundef, i32 noundef) #2

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

12:                                               ; preds = %1
  store i32 -1, ptr %9, align 4, !tbaa !11
  br label %175

13:                                               ; preds = %1
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.zip_t, ptr %14, i32 0, i32 0
  store ptr %15, ptr %3, align 8, !tbaa !5
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.mz_zip_archive, ptr %16, i32 0, i32 3
  %18 = load i32, ptr %17, align 4, !tbaa !13
  %19 = icmp eq i32 %18, 1
  br i1 %19, label %20, label %21

20:                                               ; preds = %13
  br label %175

21:                                               ; preds = %13
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.zip_t, ptr %22, i32 0, i32 1
  %24 = load i32, ptr %23, align 8, !tbaa !16
  %25 = and i32 %24, 15
  store i32 %25, ptr %4, align 4, !tbaa !11
  %26 = load i32, ptr %4, align 4, !tbaa !11
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %28, label %59

28:                                               ; preds = %21
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.zip_t, ptr %29, i32 0, i32 2
  %31 = getelementptr inbounds %struct.zip_entry_t, ptr %30, i32 0, i32 10
  %32 = call i32 @tdefl_compress_buffer(ptr noundef %31, ptr noundef @.str.1, i64 noundef 0, i32 noundef 4)
  store i32 %32, ptr %5, align 4, !tbaa !11
  %33 = load i32, ptr %5, align 4, !tbaa !11
  %34 = icmp ne i32 %33, 1
  br i1 %34, label %35, label %39

35:                                               ; preds = %28
  %36 = load i32, ptr %5, align 4, !tbaa !11
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %38, label %39

38:                                               ; preds = %35
  store i32 -12, ptr %9, align 4, !tbaa !11
  br label %175

39:                                               ; preds = %35, %28
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.zip_t, ptr %40, i32 0, i32 2
  %42 = getelementptr inbounds %struct.zip_entry_t, ptr %41, i32 0, i32 9
  %43 = getelementptr inbounds %struct.mz_zip_writer_add_state, ptr %42, i32 0, i32 2
  %44 = load i64, ptr %43, align 8, !tbaa !22
  %45 = load ptr, ptr %2, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.zip_t, ptr %45, i32 0, i32 2
  %47 = getelementptr inbounds %struct.zip_entry_t, ptr %46, i32 0, i32 3
  store i64 %44, ptr %47, align 8, !tbaa !23
  %48 = load ptr, ptr %2, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.zip_t, ptr %48, i32 0, i32 2
  %50 = getelementptr inbounds %struct.zip_entry_t, ptr %49, i32 0, i32 9
  %51 = getelementptr inbounds %struct.mz_zip_writer_add_state, ptr %50, i32 0, i32 1
  %52 = load i64, ptr %51, align 8, !tbaa !24
  %53 = load ptr, ptr %2, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.zip_t, ptr %53, i32 0, i32 2
  %55 = getelementptr inbounds %struct.zip_entry_t, ptr %54, i32 0, i32 5
  store i64 %52, ptr %55, align 8, !tbaa !25
  %56 = load ptr, ptr %2, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.zip_t, ptr %56, i32 0, i32 2
  %58 = getelementptr inbounds %struct.zip_entry_t, ptr %57, i32 0, i32 8
  store i16 8, ptr %58, align 8, !tbaa !26
  br label %59

59:                                               ; preds = %39, %21
  %60 = load ptr, ptr %2, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.zip_t, ptr %60, i32 0, i32 2
  %62 = getelementptr inbounds %struct.zip_entry_t, ptr %61, i32 0, i32 1
  %63 = load ptr, ptr %62, align 8, !tbaa !27
  %64 = call i64 @strlen(ptr noundef %63) #5
  %65 = trunc i64 %64 to i16
  store i16 %65, ptr %6, align 2, !tbaa !9
  %66 = load ptr, ptr %2, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.zip_t, ptr %66, i32 0, i32 2
  %68 = getelementptr inbounds %struct.zip_entry_t, ptr %67, i32 0, i32 3
  %69 = load i64, ptr %68, align 8, !tbaa !23
  %70 = icmp ugt i64 %69, 4294967295
  br i1 %70, label %77, label %71

71:                                               ; preds = %59
  %72 = load ptr, ptr %2, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.zip_t, ptr %72, i32 0, i32 2
  %74 = getelementptr inbounds %struct.zip_entry_t, ptr %73, i32 0, i32 5
  %75 = load i64, ptr %74, align 8, !tbaa !25
  %76 = icmp ugt i64 %75, 4294967295
  br i1 %76, label %77, label %78

77:                                               ; preds = %71, %59
  store i32 -6, ptr %9, align 4, !tbaa !11
  br label %175

78:                                               ; preds = %71
  %79 = load ptr, ptr %2, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.zip_t, ptr %79, i32 0, i32 2
  %81 = getelementptr inbounds %struct.zip_entry_t, ptr %80, i32 0, i32 12
  %82 = load i64, ptr %81, align 8, !tbaa !28
  call void @mz_zip_time_t_to_dos_time(i64 noundef %82, ptr noundef %7, ptr noundef %8)
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = load ptr, ptr %2, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.zip_t, ptr %84, i32 0, i32 2
  %86 = getelementptr inbounds %struct.zip_entry_t, ptr %85, i32 0, i32 6
  %87 = getelementptr inbounds [30 x i8], ptr %86, i64 0, i64 0
  %88 = load i16, ptr %6, align 2, !tbaa !9
  %89 = load ptr, ptr %2, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.zip_t, ptr %89, i32 0, i32 2
  %91 = getelementptr inbounds %struct.zip_entry_t, ptr %90, i32 0, i32 2
  %92 = load i64, ptr %91, align 8, !tbaa !29
  %93 = load ptr, ptr %2, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.zip_t, ptr %93, i32 0, i32 2
  %95 = getelementptr inbounds %struct.zip_entry_t, ptr %94, i32 0, i32 3
  %96 = load i64, ptr %95, align 8, !tbaa !23
  %97 = load ptr, ptr %2, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.zip_t, ptr %97, i32 0, i32 2
  %99 = getelementptr inbounds %struct.zip_entry_t, ptr %98, i32 0, i32 4
  %100 = load i32, ptr %99, align 8, !tbaa !30
  %101 = load ptr, ptr %2, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.zip_t, ptr %101, i32 0, i32 2
  %103 = getelementptr inbounds %struct.zip_entry_t, ptr %102, i32 0, i32 8
  %104 = load i16, ptr %103, align 8, !tbaa !26
  %105 = load i16, ptr %7, align 2, !tbaa !9
  %106 = load i16, ptr %8, align 2, !tbaa !9
  %107 = call i32 @mz_zip_writer_create_local_dir_header(ptr noundef %83, ptr noundef %87, i16 noundef zeroext %88, i16 noundef zeroext 0, i64 noundef %92, i64 noundef %96, i32 noundef %100, i16 noundef zeroext %104, i16 noundef zeroext 0, i16 noundef zeroext %105, i16 noundef zeroext %106)
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %110, label %109

109:                                              ; preds = %78
  store i32 -13, ptr %9, align 4, !tbaa !11
  br label %175

110:                                              ; preds = %78
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.mz_zip_archive, ptr %111, i32 0, i32 12
  %113 = load ptr, ptr %112, align 8, !tbaa !31
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.mz_zip_archive, ptr %114, i32 0, i32 14
  %116 = load ptr, ptr %115, align 8, !tbaa !32
  %117 = load ptr, ptr %2, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.zip_t, ptr %117, i32 0, i32 2
  %119 = getelementptr inbounds %struct.zip_entry_t, ptr %118, i32 0, i32 7
  %120 = load i64, ptr %119, align 8, !tbaa !33
  %121 = load ptr, ptr %2, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.zip_t, ptr %121, i32 0, i32 2
  %123 = getelementptr inbounds %struct.zip_entry_t, ptr %122, i32 0, i32 6
  %124 = getelementptr inbounds [30 x i8], ptr %123, i64 0, i64 0
  %125 = call i64 %113(ptr noundef %116, i64 noundef %120, ptr noundef %124, i64 noundef 30)
  %126 = icmp ne i64 %125, 30
  br i1 %126, label %127, label %128

127:                                              ; preds = %110
  store i32 -14, ptr %9, align 4, !tbaa !11
  br label %175

128:                                              ; preds = %110
  %129 = load ptr, ptr %3, align 8, !tbaa !5
  %130 = load ptr, ptr %2, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.zip_t, ptr %130, i32 0, i32 2
  %132 = getelementptr inbounds %struct.zip_entry_t, ptr %131, i32 0, i32 1
  %133 = load ptr, ptr %132, align 8, !tbaa !27
  %134 = load i16, ptr %6, align 2, !tbaa !9
  %135 = load ptr, ptr %2, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.zip_t, ptr %135, i32 0, i32 2
  %137 = getelementptr inbounds %struct.zip_entry_t, ptr %136, i32 0, i32 2
  %138 = load i64, ptr %137, align 8, !tbaa !29
  %139 = load ptr, ptr %2, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.zip_t, ptr %139, i32 0, i32 2
  %141 = getelementptr inbounds %struct.zip_entry_t, ptr %140, i32 0, i32 3
  %142 = load i64, ptr %141, align 8, !tbaa !23
  %143 = load ptr, ptr %2, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.zip_t, ptr %143, i32 0, i32 2
  %145 = getelementptr inbounds %struct.zip_entry_t, ptr %144, i32 0, i32 4
  %146 = load i32, ptr %145, align 8, !tbaa !30
  %147 = load ptr, ptr %2, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.zip_t, ptr %147, i32 0, i32 2
  %149 = getelementptr inbounds %struct.zip_entry_t, ptr %148, i32 0, i32 8
  %150 = load i16, ptr %149, align 8, !tbaa !26
  %151 = load i16, ptr %7, align 2, !tbaa !9
  %152 = load i16, ptr %8, align 2, !tbaa !9
  %153 = load ptr, ptr %2, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.zip_t, ptr %153, i32 0, i32 2
  %155 = getelementptr inbounds %struct.zip_entry_t, ptr %154, i32 0, i32 7
  %156 = load i64, ptr %155, align 8, !tbaa !33
  %157 = load ptr, ptr %2, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.zip_t, ptr %157, i32 0, i32 2
  %159 = getelementptr inbounds %struct.zip_entry_t, ptr %158, i32 0, i32 11
  %160 = load i32, ptr %159, align 8, !tbaa !34
  %161 = call i32 @mz_zip_writer_add_to_central_dir(ptr noundef %129, ptr noundef %133, i16 noundef zeroext %134, ptr noundef null, i16 noundef zeroext 0, ptr noundef @.str.1, i16 noundef zeroext 0, i64 noundef %138, i64 noundef %142, i32 noundef %146, i16 noundef zeroext %150, i16 noundef zeroext 0, i16 noundef zeroext %151, i16 noundef zeroext %152, i64 noundef %156, i32 noundef %160)
  %162 = icmp ne i32 %161, 0
  br i1 %162, label %164, label %163

163:                                              ; preds = %128
  store i32 -15, ptr %9, align 4, !tbaa !11
  br label %175

164:                                              ; preds = %128
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.mz_zip_archive, ptr %165, i32 0, i32 2
  %167 = load i32, ptr %166, align 8, !tbaa !35
  %168 = add i32 %167, 1
  store i32 %168, ptr %166, align 8, !tbaa !35
  %169 = load ptr, ptr %2, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.zip_t, ptr %169, i32 0, i32 2
  %171 = getelementptr inbounds %struct.zip_entry_t, ptr %170, i32 0, i32 5
  %172 = load i64, ptr %171, align 8, !tbaa !25
  %173 = load ptr, ptr %3, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.mz_zip_archive, ptr %173, i32 0, i32 0
  store i64 %172, ptr %174, align 8, !tbaa !36
  br label %175

175:                                              ; preds = %164, %163, %127, %109, %77, %38, %20, %12
  %176 = load ptr, ptr %2, align 8, !tbaa !5
  %177 = icmp ne ptr %176, null
  br i1 %177, label %178, label %199

178:                                              ; preds = %175
  %179 = load ptr, ptr %2, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.zip_t, ptr %179, i32 0, i32 2
  %181 = getelementptr inbounds %struct.zip_entry_t, ptr %180, i32 0, i32 12
  store i64 0, ptr %181, align 8, !tbaa !28
  br label %182

182:                                              ; preds = %178
  %183 = load ptr, ptr %2, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.zip_t, ptr %183, i32 0, i32 2
  %185 = getelementptr inbounds %struct.zip_entry_t, ptr %184, i32 0, i32 1
  %186 = load ptr, ptr %185, align 8, !tbaa !27
  %187 = icmp ne ptr %186, null
  br i1 %187, label %188, label %196

188:                                              ; preds = %182
  %189 = load ptr, ptr %2, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.zip_t, ptr %189, i32 0, i32 2
  %191 = getelementptr inbounds %struct.zip_entry_t, ptr %190, i32 0, i32 1
  %192 = load ptr, ptr %191, align 8, !tbaa !27
  call void @free(ptr noundef %192) #4
  %193 = load ptr, ptr %2, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.zip_t, ptr %193, i32 0, i32 2
  %195 = getelementptr inbounds %struct.zip_entry_t, ptr %194, i32 0, i32 1
  store ptr null, ptr %195, align 8, !tbaa !27
  br label %196

196:                                              ; preds = %188, %182
  br label %197

197:                                              ; preds = %196
  br label %198

198:                                              ; preds = %197
  br label %199

199:                                              ; preds = %198, %175
  %200 = load i32, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  ret i32 %200
}

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

!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 = !{!"short", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 20}
!14 = !{!"", !15, i64 0, !15, i64 8, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !15, 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}
!15 = !{!"long long", !7, i64 0}
!16 = !{!17, !12, i64 112}
!17 = !{!"zip_t", !14, i64 0, !12, i64 112, !18, i64 120}
!18 = !{!"zip_entry_t", !12, i64 0, !6, i64 8, !15, i64 16, !15, i64 24, !12, i64 32, !15, i64 40, !7, i64 48, !15, i64 80, !10, i64 88, !19, i64 96, !20, i64 120, !12, i64 319472, !21, i64 319480}
!19 = !{!"", !6, i64 0, !15, i64 8, !15, i64 16}
!20 = !{!"", !6, i64 0, !6, i64 8, !12, i64 16, !7, i64 20, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !12, i64 80, !12, i64 84, !12, i64 88, !12, i64 92, !12, i64 96, !12, i64 100, !12, i64 104, !12, i64 108, !12, i64 112, !12, i64 116, !12, i64 120, !12, i64 124, !12, i64 128, !12, i64 132, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !12, i64 168, !6, i64 176, !21, i64 184, !21, i64 192, !7, i64 200, !7, i64 33226, !7, i64 34954, !7, i64 36682, !7, i64 37546, !7, i64 103082, !7, i64 168618, !7, i64 234154}
!21 = !{!"long", !7, i64 0}
!22 = !{!17, !15, i64 232}
!23 = !{!17, !15, i64 144}
!24 = !{!17, !15, i64 224}
!25 = !{!17, !15, i64 160}
!26 = !{!17, !10, i64 208}
!27 = !{!17, !6, i64 128}
!28 = !{!17, !21, i64 319600}
!29 = !{!17, !15, i64 136}
!30 = !{!17, !12, i64 152}
!31 = !{!14, !6, i64 80}
!32 = !{!14, !6, i64 96}
!33 = !{!17, !15, i64 200}
!34 = !{!17, !12, i64 319592}
!35 = !{!14, !12, i64 16}
!36 = !{!14, !15, i64 0}


; 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.1 = external hidden unnamed_addr constant [1 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 nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
declare hidden i32 @mz_zip_writer_create_local_dir_header(ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i64 noundef, i64 noundef, i32 noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden i32 @mz_zip_writer_add_to_central_dir(ptr noundef, ptr noundef, i16 noundef zeroext, ptr noundef, i16 noundef zeroext, ptr noundef, i16 noundef zeroext, i64 noundef, i64 noundef, i32 noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, i64 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local range(i32 -15, 1) i32 @zip_entry_close(ptr noundef %0) local_unnamed_addr #2 {
  %2 = alloca i16, align 2
  %3 = alloca i16, align 2
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %2) #4
  store i16 0, ptr %2, align 2, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %3) #4
  store i16 0, ptr %3, align 2, !tbaa !5
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %79, label %4

4:                                                ; preds = %1
  %5 = getelementptr inbounds i8, ptr %0, i64 20
  %6 = load i32, ptr %5, align 4, !tbaa !9
  %7 = icmp eq i32 %6, 1
  br i1 %7, label %74, label %8

8:                                                ; preds = %4
  %9 = getelementptr inbounds i8, ptr %0, i64 112
  %10 = load i32, ptr %9, align 8, !tbaa !14
  %11 = and i32 %10, 15
  %.not48 = icmp eq i32 %11, 0
  br i1 %.not48, label %._crit_edge, label %12

._crit_edge:                                      ; preds = %8
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 144
  %.pre = load i64, ptr %.phi.trans.insert, align 8, !tbaa !20
  br label %23

12:                                               ; preds = %8
  %13 = getelementptr inbounds i8, ptr %0, i64 240
  %14 = tail call i32 @tdefl_compress_buffer(ptr noundef nonnull %13, ptr noundef nonnull @.str.1, i64 noundef 0, i32 noundef 4)
  %or.cond = icmp ugt i32 %14, 1
  br i1 %or.cond, label %74, label %15

15:                                               ; preds = %12
  %16 = getelementptr inbounds i8, ptr %0, i64 232
  %17 = load i64, ptr %16, align 8, !tbaa !21
  %18 = getelementptr inbounds i8, ptr %0, i64 144
  store i64 %17, ptr %18, align 8, !tbaa !20
  %19 = getelementptr inbounds i8, ptr %0, i64 224
  %20 = load i64, ptr %19, align 8, !tbaa !22
  %21 = getelementptr inbounds i8, ptr %0, i64 160
  store i64 %20, ptr %21, align 8, !tbaa !23
  %22 = getelementptr inbounds i8, ptr %0, i64 208
  store i16 8, ptr %22, align 8, !tbaa !24
  br label %23

23:                                               ; preds = %._crit_edge, %15
  %24 = phi i64 [ %.pre, %._crit_edge ], [ %17, %15 ]
  %25 = getelementptr inbounds i8, ptr %0, i64 128
  %26 = load ptr, ptr %25, align 8, !tbaa !25
  %27 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %26) #5
  %28 = trunc i64 %27 to i16
  %29 = getelementptr inbounds i8, ptr %0, i64 144
  %30 = icmp ugt i64 %24, 4294967295
  br i1 %30, label %74, label %31

31:                                               ; preds = %23
  %32 = getelementptr inbounds i8, ptr %0, i64 160
  %33 = load i64, ptr %32, align 8, !tbaa !23
  %34 = icmp ugt i64 %33, 4294967295
  br i1 %34, label %74, label %35

35:                                               ; preds = %31
  %36 = getelementptr inbounds i8, ptr %0, i64 319600
  %37 = load i64, ptr %36, align 8, !tbaa !26
  call void @mz_zip_time_t_to_dos_time(i64 noundef %37, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %38 = getelementptr inbounds i8, ptr %0, i64 168
  %39 = getelementptr inbounds i8, ptr %0, i64 136
  %40 = load i64, ptr %39, align 8, !tbaa !27
  %41 = load i64, ptr %29, align 8, !tbaa !20
  %42 = getelementptr inbounds i8, ptr %0, i64 152
  %43 = load i32, ptr %42, align 8, !tbaa !28
  %44 = getelementptr inbounds i8, ptr %0, i64 208
  %45 = load i16, ptr %44, align 8, !tbaa !24
  %46 = load i16, ptr %2, align 2, !tbaa !5
  %47 = load i16, ptr %3, align 2, !tbaa !5
  %48 = call i32 @mz_zip_writer_create_local_dir_header(ptr noundef nonnull %0, ptr noundef nonnull %38, i16 noundef zeroext %28, i16 noundef zeroext 0, i64 noundef %40, i64 noundef %41, i32 noundef %43, i16 noundef zeroext %45, i16 noundef zeroext 0, i16 noundef zeroext %46, i16 noundef zeroext %47)
  %.not49 = icmp eq i32 %48, 0
  br i1 %.not49, label %74, label %49

49:                                               ; preds = %35
  %50 = getelementptr inbounds i8, ptr %0, i64 80
  %51 = load ptr, ptr %50, align 8, !tbaa !29
  %52 = getelementptr inbounds i8, ptr %0, i64 96
  %53 = load ptr, ptr %52, align 8, !tbaa !30
  %54 = getelementptr inbounds i8, ptr %0, i64 200
  %55 = load i64, ptr %54, align 8, !tbaa !31
  %56 = call i64 %51(ptr noundef %53, i64 noundef %55, ptr noundef nonnull %38, i64 noundef 30) #4
  %.not50 = icmp eq i64 %56, 30
  br i1 %.not50, label %57, label %74

57:                                               ; preds = %49
  %58 = load ptr, ptr %25, align 8, !tbaa !25
  %59 = load i64, ptr %39, align 8, !tbaa !27
  %60 = load i64, ptr %29, align 8, !tbaa !20
  %61 = load i32, ptr %42, align 8, !tbaa !28
  %62 = load i16, ptr %44, align 8, !tbaa !24
  %63 = load i16, ptr %2, align 2, !tbaa !5
  %64 = load i16, ptr %3, align 2, !tbaa !5
  %65 = load i64, ptr %54, align 8, !tbaa !31
  %66 = getelementptr inbounds i8, ptr %0, i64 319592
  %67 = load i32, ptr %66, align 8, !tbaa !32
  %68 = call i32 @mz_zip_writer_add_to_central_dir(ptr noundef nonnull %0, ptr noundef %58, i16 noundef zeroext %28, ptr noundef null, i16 noundef zeroext 0, ptr noundef nonnull @.str.1, i16 noundef zeroext 0, i64 noundef %59, i64 noundef %60, i32 noundef %61, i16 noundef zeroext %62, i16 noundef zeroext 0, i16 noundef zeroext %63, i16 noundef zeroext %64, i64 noundef %65, i32 noundef %67)
  %.not51 = icmp eq i32 %68, 0
  br i1 %.not51, label %74, label %69

69:                                               ; preds = %57
  %70 = getelementptr inbounds i8, ptr %0, i64 16
  %71 = load i32, ptr %70, align 8, !tbaa !33
  %72 = add i32 %71, 1
  store i32 %72, ptr %70, align 8, !tbaa !33
  %73 = load i64, ptr %32, align 8, !tbaa !23
  store i64 %73, ptr %0, align 8, !tbaa !34
  br label %74

74:                                               ; preds = %57, %49, %35, %23, %31, %12, %4, %69
  %.0.ph = phi i32 [ -15, %57 ], [ -14, %49 ], [ -13, %35 ], [ -6, %23 ], [ -6, %31 ], [ -12, %12 ], [ 0, %69 ], [ 0, %4 ]
  %75 = getelementptr inbounds i8, ptr %0, i64 319600
  store i64 0, ptr %75, align 8, !tbaa !26
  %76 = getelementptr inbounds i8, ptr %0, i64 128
  %77 = load ptr, ptr %76, align 8, !tbaa !25
  %.not52 = icmp eq ptr %77, null
  br i1 %.not52, label %79, label %78

78:                                               ; preds = %74
  call void @free(ptr noundef nonnull %77) #4
  store ptr null, ptr %76, align 8, !tbaa !25
  br label %79

79:                                               ; preds = %1, %74, %78
  %.055 = phi i32 [ %.0.ph, %74 ], [ %.0.ph, %78 ], [ -1, %1 ]
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %2) #4
  ret i32 %.055
}

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

!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 = !{!"short", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !12, i64 20}
!10 = !{!"", !11, i64 0, !11, i64 8, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !11, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !13, i64 104}
!11 = !{!"long long", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!15, !12, i64 112}
!15 = !{!"zip_t", !10, i64 0, !12, i64 112, !16, i64 120}
!16 = !{!"zip_entry_t", !12, i64 0, !13, i64 8, !11, i64 16, !11, i64 24, !12, i64 32, !11, i64 40, !7, i64 48, !11, i64 80, !6, i64 88, !17, i64 96, !18, i64 120, !12, i64 319472, !19, i64 319480}
!17 = !{!"", !13, i64 0, !11, i64 8, !11, i64 16}
!18 = !{!"", !13, i64 0, !13, i64 8, !12, i64 16, !7, i64 20, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !12, i64 80, !12, i64 84, !12, i64 88, !12, i64 92, !12, i64 96, !12, i64 100, !12, i64 104, !12, i64 108, !12, i64 112, !12, i64 116, !12, i64 120, !12, i64 124, !12, i64 128, !12, i64 132, !13, i64 136, !13, i64 144, !13, i64 152, !13, i64 160, !12, i64 168, !13, i64 176, !19, i64 184, !19, i64 192, !7, i64 200, !7, i64 33226, !7, i64 34954, !7, i64 36682, !7, i64 37546, !7, i64 103082, !7, i64 168618, !7, i64 234154}
!19 = !{!"long", !7, i64 0}
!20 = !{!15, !11, i64 144}
!21 = !{!15, !11, i64 232}
!22 = !{!15, !11, i64 224}
!23 = !{!15, !11, i64 160}
!24 = !{!15, !6, i64 208}
!25 = !{!15, !13, i64 128}
!26 = !{!15, !19, i64 319600}
!27 = !{!15, !11, i64 136}
!28 = !{!15, !12, i64 152}
!29 = !{!10, !13, i64 80}
!30 = !{!10, !13, i64 96}
!31 = !{!15, !11, i64 200}
!32 = !{!15, !12, i64 319592}
!33 = !{!10, !12, i64 16}
!34 = !{!10, !11, i64 0}


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